/* statix-tokens.css - LOOK C, the one STATIX theme for the website and the app (owner 2 Nov 2026: "look C everywhere").
   UX #8, from the theme audit (STATIX-handoff/theme-audit-2026-11-02/THEME-AUDIT.md section 4), with these decisions:
   - every text colour passes WCAG AA (4.5:1) on white, the soft panel, the header bar AND the grey ground: faint is #5F666D
     (the audit's #6A7178 was 4.25:1 on the ground);
   - the tokens sit on :root AND on body, so a page-level body block (calculator-theme.css, :where(body...)) can never shadow them;
   - old token names are NOT aliased here: a page that still uses them links statix-tokens-legacy.css while it migrates.
   Link it FIRST on every page: <link rel="stylesheet" href="/assets/statix-tokens.css?v=1">  */

:root, html body {
  /* surfaces */
  --stx-ground:#ECEEF0;        /* the page */
  --stx-panel:#FFFFFF;         /* cards, inputs, sheets */
  --stx-panel-soft:#F3F4F5;    /* soft fill, zebra rows, hover */
  --stx-head:#E6E8EB;          /* card header bar, table head */
  --stx-chrome:#2B3035;        /* the dark app title bar */
  /* lines */
  --stx-line:#C4C9CE; --stx-line-soft:#E6E8EB; --stx-line-strong:#9AA0A6;
  /* text (contrast on white / ground / header bar) */
  --stx-ink:#1B1D1F;           /* 16.9 / 14.5 / 13.8 */
  --stx-dim:#4F565D;           /*  7.4 /  6.4 /  6.1 */
  --stx-faint:#5F666D;         /*  5.8 /  5.0 /  4.7 */
  /* brand */
  --stx-accent:#126F66;        /* 6.0 on white */
  --stx-accent-press:#0B5C55;
  --stx-accent-tint:#E3F1EF;
  --stx-on-accent:#FFFFFF;
  --stx-focus:#0B5C55;
  /* verdicts: always a word or a mark with the colour, never colour alone */
  --stx-pass:#13741F;   --stx-pass-bg:#EAF4EB;     /* PASS */
  --stx-fail:#C00000;   --stx-fail-bg:#FBEAEA;     /* FAIL */
  --stx-review:#9A5400; --stx-review-bg:#FBF1E4;   /* REVIEW, near the limit */
  --stx-nc:#4F565D;     --stx-nc-bg:#F3F4F5;       /* NOT CHECKED */
  --stx-stale:#6B4FA8;  --stx-stale-bg:#F1EEF8;    /* OUT OF DATE */
  /* drawings and plots (replace the 29 Oct blue #2D5BA8) */
  --stx-draw-conc:#F3F4F5; --stx-draw-rebar:#C00000; --stx-draw-load:#C00000;
  --stx-draw-mom:#126F66;  --stx-draw-shear:#13741F; --stx-draw-defl:#9A5400; --stx-draw-steel:#D5DBE0;
  /* type: one family; no web font download */
  --stx-font:'Segoe UI', Tahoma, Arial, sans-serif;
  --stx-font-math:Georgia, 'Times New Roman', serif;
  --stx-font-code:Consolas, 'Cascadia Mono', ui-monospace, monospace;
  --stx-fs-xs:11px; --stx-fs-sm:12px; --stx-fs-ui:12.5px;
  --stx-fs-body:14px;
  --stx-fs-h4:13px; --stx-fs-h3:14px; --stx-fs-h2:17px; --stx-fs-h1:22px; --stx-fs-hero:28px;
  --stx-lh-ui:1.35; --stx-lh-body:1.55;
  --stx-fw-head:600; --stx-fw-strong:700;
  /* spacing */
  --stx-s1:2px; --stx-s2:4px; --stx-s3:6px; --stx-s4:8px; --stx-s5:10px; --stx-s6:14px; --stx-s7:20px; --stx-s8:28px; --stx-s9:40px;
  --stx-wrap:1200px; --stx-prose:760px;
  /* shape */
  --stx-r:2px; --stx-shadow:none;
  /* controls */
  --stx-btn-h:26px; --stx-btn-h-touch:44px; --stx-btn-px:10px; --stx-btn-fs:12px; --stx-input-h:26px;
}

/* ---------- base (opt-in per page with body.stx-look; the app and the calculators keep their own base for now) ---------- */
body.stx-look { margin:0; background:var(--stx-ground); color:var(--stx-ink); font:var(--stx-fs-ui)/var(--stx-lh-ui) var(--stx-font); font-variant-numeric:tabular-nums; }
body.stx-look h1 { font:var(--stx-fw-head) var(--stx-fs-h1)/1.25 var(--stx-font); margin:0 0 var(--stx-s5); color:var(--stx-ink); }
body.stx-look h2 { font:var(--stx-fw-head) var(--stx-fs-h2)/1.3 var(--stx-font); margin:var(--stx-s7) 0 var(--stx-s4); }
body.stx-look h3 { font:var(--stx-fw-strong) var(--stx-fs-h3)/1.3 var(--stx-font); margin:var(--stx-s6) 0 var(--stx-s3); }
body.stx-look a { color:var(--stx-accent); }
body.stx-look a:hover { color:var(--stx-accent-press); }
body.stx-look :focus-visible { outline:2px solid var(--stx-focus); outline-offset:2px; }
.stx-wrap { max-width:var(--stx-wrap); margin:0 auto; padding:0 16px; }
.stx-prose { max-width:var(--stx-prose); font-size:var(--stx-fs-body); line-height:var(--stx-lh-body); }
.stx-hero { font:var(--stx-fw-head) var(--stx-fs-hero)/1.2 var(--stx-font); }
.stx-eyebrow { font:600 var(--stx-fs-xs)/1.2 var(--stx-font); letter-spacing:.06em; text-transform:uppercase; color:var(--stx-dim); }

/* ---------- buttons ---------- */
.stx-b { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:var(--stx-btn-h); padding:0 var(--stx-btn-px);
  font:600 var(--stx-btn-fs)/1 var(--stx-font); border:1px solid var(--stx-line-strong); border-radius:var(--stx-r);
  background:var(--stx-panel); color:var(--stx-ink); cursor:pointer; text-decoration:none; white-space:nowrap; }
.stx-b:hover { background:var(--stx-panel-soft); border-color:var(--stx-accent); color:var(--stx-ink); }
.stx-b--pri { background:var(--stx-accent); border-color:var(--stx-accent); color:var(--stx-on-accent); }
.stx-b--pri:hover { background:var(--stx-accent-press); border-color:var(--stx-accent-press); color:var(--stx-on-accent); }
.stx-b--lg { min-height:34px; padding:0 16px; font-size:13px; }
.stx-b:disabled, .stx-b[aria-disabled="true"] { opacity:.55; cursor:not-allowed; }
.stx-b:focus-visible { outline:2px solid var(--stx-focus); outline-offset:2px; }
.stx-bgroup { display:inline-flex; } .stx-bgroup .stx-b + .stx-b { margin-left:-1px; }
.stx-bgroup .stx-b[aria-pressed="true"] { background:var(--stx-accent); border-color:var(--stx-accent); color:var(--stx-on-accent); }
@media (pointer:coarse) { .stx-b { min-height:var(--stx-btn-h-touch); padding:0 14px; font-size:13px; } }

/* ---------- cards ---------- */
.stx-c { background:var(--stx-panel); border:1px solid var(--stx-line); border-radius:var(--stx-r); box-shadow:none; }
.stx-c > h2, .stx-c > h3, .stx-c > .stx-c-h { margin:0; padding:5px 10px; background:var(--stx-head); border-bottom:1px solid var(--stx-line);
  font:var(--stx-fw-strong) var(--stx-fs-sm)/1.35 var(--stx-font); color:var(--stx-ink); }
.stx-c > .stx-c-b { padding:var(--stx-s5); }
.stx-c--accent { border-left:3px solid var(--stx-accent); }
.stx-c--review { border-left:3px solid var(--stx-review); }

/* ---------- tables ---------- */
.stx-t { width:100%; border-collapse:collapse; background:var(--stx-panel); border:1px solid var(--stx-line); font-size:var(--stx-fs-ui); }
.stx-t th { background:var(--stx-head); color:var(--stx-ink); font-weight:700; font-size:var(--stx-fs-sm); text-align:left; padding:4px 10px; border-bottom:1px solid var(--stx-line); }
.stx-t td { padding:4px 10px; border-top:1px solid var(--stx-line-soft); vertical-align:top; }
.stx-t td.n, .stx-t th.n { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.stx-tscroll { overflow-x:auto; max-width:100%; }

/* ---------- verdicts and status chips ---------- */
.stx-v { font-weight:700; letter-spacing:.02em; }
.stx-v.pass { color:var(--stx-pass); } .stx-v.fail { color:var(--stx-fail); } .stx-v.review { color:var(--stx-review); }
.stx-v.nc { color:var(--stx-nc); } .stx-v.stale { color:var(--stx-stale); }
.stx-tag { display:inline-flex; align-items:center; gap:4px; padding:1px 6px; border:1px solid currentColor; border-radius:var(--stx-r);
  font:700 var(--stx-fs-xs)/1.4 var(--stx-font); letter-spacing:.03em; text-transform:uppercase; white-space:nowrap; }
.stx-tag.pass { background:var(--stx-pass-bg); color:var(--stx-pass); } .stx-tag.fail { background:var(--stx-fail-bg); color:var(--stx-fail); }
.stx-tag.review { background:var(--stx-review-bg); color:var(--stx-review); } .stx-tag.nc { background:var(--stx-nc-bg); color:var(--stx-nc); }
.stx-tag.stale { background:var(--stx-stale-bg); color:var(--stx-stale); }
.stx-tag.info { background:var(--stx-accent-tint); color:var(--stx-accent-press); }   /* a status that is not a verdict: 'Live', 'In development' */
.stx-tag.neutral { background:var(--stx-panel-soft); color:var(--stx-dim); }

/* ---------- media: a video or picture block with a caption ---------- */
.stx-media { background:var(--stx-panel); border:1px solid var(--stx-line); border-radius:var(--stx-r); }
.stx-media video, .stx-media img { display:block; width:100%; height:auto; background:var(--stx-chrome); }
.stx-media figcaption, .stx-media .stx-media-cap { padding:6px 10px; font-size:var(--stx-fs-sm); color:var(--stx-dim); border-top:1px solid var(--stx-line-soft); }

/* ---------- notices ---------- */
.stx-note { padding:var(--stx-s4) var(--stx-s5); background:var(--stx-panel); border:1px solid var(--stx-line); border-left:3px solid var(--stx-accent); border-radius:var(--stx-r); font-size:var(--stx-fs-sm); color:var(--stx-ink); }
.stx-note.review { border-left-color:var(--stx-review); } .stx-note.fail { border-left-color:var(--stx-fail); }

@media print {
  body.stx-look { background:#fff; }
  .stx-c > h2, .stx-c > h3, .stx-c > .stx-c-h, .stx-t th { background:#fff; border-bottom-color:var(--stx-line-strong); }
}
