/**
 * tokens.css — the shared design token sheet (colours, type sizes, cards, chips).
 * One palette, one card, one chip, one blue.
 * Colour appears only when it MEANS something. Every tappable thing is >= 44px.
 */
:root{
  --canvas:#f7f8fa;   /* page background: soft neutral, never stark */
  --surface:#ffffff;  /* cards + sheets: the only "white" */
  --ink:#171c22;      /* text: near-black (pure black vibrates) */
  --muted:#5c6570;    /* secondary text */
  --line:#e3e7ec;     /* hairlines */
  --brand:#0b6bcb;    /* THE blue: actions, links, focus */
  --brand-soft:#eaf2fc;
  --ok:#178745;       /* pass / done / healthy */
  --ok-soft:#eef6ee;
  --warn:#b57a00;     /* pending / attention */
  --warn-soft:#fdf6e7;
  --bad:#c4372c;      /* fail / danger */
  --bad-soft:#fbeeec;
  --info:#5b53c7;     /* neutral-informational, sparingly */
  --info-soft:#efeefb;
  --radius:14px;
  --shadow:0 1px 2px rgba(23,28,34,.05);
  --shadow-lg:0 -4px 24px rgba(23,28,34,.12);
  --tap:44px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  background:var(--canvas);color:var(--ink);
  font-family:'Segoe UI',system-ui,-apple-system,'Helvetica Neue',sans-serif;
  font-size:16px;line-height:1.6;-webkit-text-size-adjust:100%;
}
/* TYPE — sizes only from this ladder: 12 14 16 18 22 28 */
.t12{font-size:12px}.t14{font-size:14px}.t16{font-size:16px}
.t18{font-size:18px}.t22{font-size:22px}.t28{font-size:28px}
.mono{font-family:Consolas,'SF Mono',ui-monospace,monospace}
.muted{color:var(--muted)}
h1,h2,h3{margin:0;letter-spacing:-.01em;font-weight:700}
h1{font-size:22px}h2{font-size:18px}h3{font-size:16px}

/* THE CARD */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:16px 18px;margin:0 0 12px}

/* THE CHIP — icon + word + colour, always all three */
.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 12px;border-radius:999px;
  font-size:12px;font-weight:700;border:1.5px solid;white-space:nowrap;line-height:1.6}
.chip.ok{color:var(--ok);border-color:var(--ok);background:var(--ok-soft)}
.chip.warn{color:var(--warn);border-color:var(--warn);background:var(--warn-soft)}
.chip.bad{color:var(--bad);border-color:var(--bad);background:var(--bad-soft)}
.chip.info{color:var(--info);border-color:var(--info);background:var(--info-soft)}
.chip.quiet{color:var(--muted);border-color:var(--line);background:var(--canvas)}
.chip svg{width:14px;height:14px;flex:0 0 auto}

/* THE BUTTONS — one filled primary per region, quiet outline second, ghost third */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:var(--tap);padding:0 18px;border-radius:10px;font-weight:700;font-size:15px;
  border:1.5px solid transparent;cursor:pointer;background:none;color:var(--ink);
  font-family:inherit;transition:background .15s,border-color .15s,color .15s}
.btn.primary{background:var(--brand);color:#fff}
.btn.primary:hover{background:#0a5fb5}
.btn.primary:disabled{background:#a9bed6;cursor:not-allowed}
.btn.quiet{color:var(--brand);border-color:var(--brand);background:transparent}
.btn.quiet:hover{background:var(--brand-soft)}
.btn.ghost{color:var(--muted);border-color:var(--line);background:var(--surface)}
.btn.ghost:hover{border-color:var(--muted);color:var(--ink)}
.btn.danger{color:var(--bad);border-color:var(--bad);background:transparent}
.btn.danger:hover{background:var(--bad-soft)}
.btn.sm{min-height:36px;padding:0 12px;font-size:13px;border-radius:8px}
.btn svg{width:18px;height:18px;flex:0 0 auto}
.btn:focus-visible,.inp:focus-visible,a:focus-visible{outline:3px solid var(--brand-soft);
  outline-offset:1px;border-color:var(--brand)}

/* ICON BUTTON — always a full 44px target even when the glyph is 18px */
.ibtn{display:inline-grid;place-items:center;width:var(--tap);height:var(--tap);
  border-radius:10px;border:1.5px solid transparent;background:transparent;color:var(--muted);
  cursor:pointer;flex:0 0 auto}
.ibtn:hover{background:var(--canvas);color:var(--ink)}
.ibtn svg{width:20px;height:20px}

/* INPUTS */
.inp{width:100%;min-height:var(--tap);padding:10px 12px;border:1.5px solid var(--line);
  border-radius:10px;background:var(--surface);color:var(--ink);font-size:16px;
  font-family:inherit;outline:none;transition:border-color .15s,box-shadow .15s}
.inp:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
textarea.inp{min-height:80px;line-height:1.5;resize:vertical}
.lbl{display:block;font-size:12px;font-weight:700;color:var(--muted);
  text-transform:uppercase;letter-spacing:.05em;margin:0 0 6px}

/* GHOST HELP — the ?-swarm cure: invisible until the row is touched */
.ghelp{opacity:0;transition:opacity .15s;color:var(--muted)}
.row:hover .ghelp,.row:focus-within .ghelp,.ghelp:focus{opacity:.65}
@media (hover:none){.ghelp{opacity:.35}}

/* THE SHEET — bottom sheet on a phone, centred card on a desk */
.scrim{position:fixed;inset:0;background:rgba(23,28,34,.35);z-index:60;display:none}
.scrim.on{display:block}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:61;background:var(--surface);
  border-radius:16px 16px 0 0;box-shadow:var(--shadow-lg);max-height:90vh;overflow-y:auto;
  padding:10px 16px calc(18px + env(safe-area-inset-bottom));display:none}
.sheet.on{display:block}
.sheet .grab{width:44px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 12px}
@media(min-width:760px){
  .sheet{left:50%;right:auto;bottom:auto;top:50%;transform:translate(-50%,-50%);
    width:560px;max-width:92vw;border-radius:var(--radius);padding:18px 22px}
  .sheet .grab{display:none}
}

/* THE FOOTER STAMP — keep the world honest */
.stamp{text-align:center;color:var(--muted);font-size:12px;padding:22px 0 30px}
