/* ראשי — palette from the dashboard Jacki already uses; colourblind-safe:
   glyph and word carry meaning, never a red+green pair. */
:root{
  --bg:#EFF1F4; --surface:#FFFFFF; --surface-2:#E5E9EE;
  --border:#CFD6DE; --border-strong:#AEB8C4;
  --text:#131820; --text-dim:#59636F; --text-faint:#828E9C;
  --accent:#1B6AAF; --on-accent:#FFFFFF;
  --ok:#1B6AAF; --ok-bg:#DEEBF7;
  --warn:#A5620A; --warn-bg:#F7EBD6;
  --crit:#A22A62; --crit-bg:#F7DFEB;
  --shadow:0 1px 2px rgba(19,24,32,.06), 0 6px 18px rgba(19,24,32,.05);
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0E1218; --surface:#161B23; --surface-2:#1D242E;
    --border:#2A323E; --border-strong:#3B4553;
    --text:#E7EBF1; --text-dim:#9BA6B4; --text-faint:#78838F;
    --accent:#61A9EC; --on-accent:#0E1218;
    --ok:#61A9EC; --ok-bg:#152736;
    --warn:#DFA044; --warn-bg:#2E2413;
    --crit:#E571A5; --crit-bg:#331726;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:"Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  font-size:17px; line-height:1.6;
}
a{color:var(--accent)}
.top{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 20px; background:var(--surface); border-bottom:1px solid var(--border);
}
.brand{font-size:22px; font-weight:700; color:var(--text); text-decoration:none}
.top nav{display:flex; align-items:center; gap:18px; flex-wrap:wrap}
.top nav a{font-weight:600; text-decoration:none}
.wrap{max-width:1000px; margin:0 auto; padding:24px 16px 80px}
.card{
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  padding:22px; margin:0 0 18px; box-shadow:var(--shadow);
}
.card.narrow{max-width:460px; margin-inline:auto}
h1{font-size:26px; margin:0 0 10px}
h2{font-size:20px; margin:0 0 8px}
.lede{color:var(--text-dim); margin:0 0 14px}
.small{font-size:14px; color:var(--text-dim); margin:8px 0 4px}
.hello h1{font-size:32px; margin:6px 0 2px}
label{display:block; font-weight:600; margin:0 0 14px}
input{
  display:block; width:100%; margin-top:6px; padding:11px 12px; font:inherit;
  color:var(--text); background:var(--surface-2);
  border:1px solid var(--border-strong); border-radius:8px;
}
input:focus{outline:2px solid var(--accent); outline-offset:1px}
button,.button{
  display:inline-block; font:inherit; font-weight:700; cursor:pointer;
  padding:11px 20px; border-radius:8px; text-decoration:none;
  background:var(--accent); color:var(--on-accent); border:1px solid var(--accent);
}
button.secondary{background:transparent; color:var(--text); border-color:var(--border-strong); font-weight:600}
button.link{background:none; border:0; padding:0; color:var(--accent); font-weight:600}
form.inline{display:inline}
.flash{background:var(--ok-bg); color:var(--ok); border-radius:8px; padding:10px 14px; font-weight:600}
.error{background:var(--crit-bg); color:var(--crit); border-radius:8px; padding:10px 14px; font-weight:600}
.mono{font-family:Consolas,"Courier New",monospace}
.secret{font-size:18px; letter-spacing:.06em; background:var(--surface-2); padding:10px 12px; border-radius:8px; word-break:break-all}
.qr{display:block; margin:6px auto 4px; background:#fff; border-radius:8px}
.codes{font-size:18px; columns:2; padding-inline-start:28px; margin:0 0 18px}
.more{margin-top:18px}
.more summary{cursor:pointer; color:var(--accent); font-weight:600; margin-bottom:12px}
.chip{display:inline-block; font-size:12.5px; font-weight:700; padding:2px 8px; border-radius:6px; background:var(--warn-bg); color:var(--warn)}
.tablewrap{overflow-x:auto}
table{border-collapse:collapse; width:100%}
th,td{text-align:right; padding:10px 8px; border-bottom:1px solid var(--border); vertical-align:middle}
th{font-size:13px; color:var(--text-faint)}

/* ---- P1: the board ---- */
.chip.crit{background:var(--crit-bg); color:var(--crit)}
.chip.warn{background:var(--warn-bg); color:var(--warn)}
.chip.ok{background:var(--ok-bg); color:var(--ok)}
.chip.plain{background:var(--surface-2); color:var(--text-dim)}
.count{display:inline-block; min-width:1.6em; text-align:center; font-size:14px; font-weight:700;
  padding:1px 8px; border-radius:999px; background:var(--surface-2); color:var(--text-dim); vertical-align:middle}
.band-crit{border-inline-start:6px solid var(--crit)}
.band-warn{border-inline-start:6px solid var(--warn)}
.rows{list-style:none; margin:0; padding:0}
.row{padding:12px 0; border-bottom:1px solid var(--border); display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center}
.row:last-child{border-bottom:0}
.row-main{display:flex; gap:10px; align-items:center; flex:1 1 380px; min-width:0}
.row-title{font-weight:600; color:var(--text); text-decoration:none; overflow-wrap:anywhere}
a.row-title:hover{text-decoration:underline}
.row-meta{display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:14px}
.row-actions{display:flex; gap:4px}
.row-detail{flex-basis:100%; margin:0; font-size:15px; color:var(--text-dim)}
.code{font-family:Consolas,"Courier New",monospace; color:var(--text-faint); font-weight:700}
.proj{font-weight:600; text-decoration:none}
.dim{color:var(--text-faint); font-size:14px}
button.icon{padding:4px 10px; font-size:13px; background:var(--surface-2); color:var(--text); border-color:var(--border-strong)}
.section-h{margin:28px 0 12px}
.tiles{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px}
.tile{display:flex; flex-direction:column; gap:6px; background:var(--surface); border:1px solid var(--border);
  border-radius:12px; padding:16px; box-shadow:var(--shadow); text-decoration:none; color:var(--text)}
a.tile:hover{border-color:var(--accent)}
.tile-name{font-size:18px; font-weight:700; color:var(--text); text-decoration:none}
.tile-status{font-size:14px; color:var(--text-dim)}
.tile-summary{font-size:14px; color:var(--text-dim)}
.tile-counts,.tile-links{display:flex; flex-wrap:wrap; gap:6px; font-size:14px}
.tabs{display:flex; flex-wrap:wrap; gap:6px; margin:0 0 16px}
.tabs a{padding:8px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border);
  text-decoration:none; font-weight:600}
.tabs a.active{background:var(--accent); color:var(--on-accent); border-color:var(--accent)}
.facts{display:grid; grid-template-columns:max-content 1fr; gap:6px 16px; margin:0}
.facts dt{color:var(--text-faint); font-weight:600}
.facts dd{margin:0; overflow-wrap:anywhere}
.evidence{white-space:pre-wrap; font-size:15px; background:var(--surface-2); padding:12px; border-radius:8px}
details > summary{cursor:pointer; list-style:revert}
.inline-h{display:inline; margin:0}
.row-form{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.row-form input{width:auto; margin:0}
select{display:block; width:100%; margin-top:6px; padding:11px 12px; font:inherit; color:var(--text);
  background:var(--surface-2); border:1px solid var(--border-strong); border-radius:8px}
form button + button{margin-inline-start:8px}

/* ---- P2: gauges ---- */
.gauge-line{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 14px; color:var(--text-dim); font-size:15px}
.gauge-line a{font-weight:700}

/* ---- security ---- */
textarea{display:block; width:100%; margin-top:6px; padding:11px 12px; font:inherit; font-family:Consolas,"Courier New",monospace; color:var(--text); background:var(--surface-2); border:1px solid var(--border-strong); border-radius:8px}
table td.mono{font-size:14px; overflow-wrap:anywhere}
.verdict{text-align:center}
.verdict-ok h2{font-size:24px}
.verdict-mark{font-size:64px; line-height:1; margin:4px 0 8px}
.verdict-item{text-align:start; border-top:1px solid var(--border); padding-top:12px; margin-top:12px}
.verdict-item p{margin:4px 0}

/* the copy-prompt button */
.prompt-box{margin:10px 0 4px}
.prompt-box details{margin-top:6px}
.prompt-box textarea{font-size:13px}

/* a problem and its steps */
.problem{list-style:none; padding:12px 0; border-top:1px solid var(--border)}
.problem:first-child{border-top:0}
.problem-status{margin:6px 0}
.step{margin:8px 0 0; padding:8px 12px; border-left:3px solid var(--accent); background:var(--surface-2); border-radius:6px}
.step-done{border-left-color:var(--border-strong); opacity:.75}
.step-locked{border-left-color:var(--border-strong); opacity:.55}
.step-head{margin:0 0 4px}
.choices{margin-top:10px}
.choices form.choice{margin-top:10px}
.step-entry + .step-entry{margin-top:10px; padding-top:8px; border-top:1px dashed var(--border)}

.choice-h{margin:12px 0 2px; font-weight:700}

/* a card's title opens its page — it must look like a link */
.problem a.row-title{color:var(--accent); text-decoration:underline}
.problem a.row-title::after{content:" ›"}
