/* Generated from brand/acas/tokens.json by scripts/build_interactive.js */
:root {
  --t-obsidian-navy: #0A0E24;
  --t-deep-slate-navy: #1B2A44;
  --t-heritage-gold: #C9A227;
  --t-gold-highlight: #E8C766;
  --t-oxblood-maroon: #7C1632;
  --t-parchment-white: #F5F3EC;
  --t-pure-white: #FFFFFF;
  --t-ink-charcoal: #1C2333;
  --t-antique-gold: #9A7B1D;
  --t-signal-red: #C4433D;
  --t-success-green: #3E7C5C;
  --t-muted-gold: #8C7F57;
}
/* ACAS Interactive System. Mobile-first (360px and up).
   Brand colours come from brand/acas/tokens.json: the build prepends a :root block of --t-* variables.
   Neutral greys and hairlines match landing/index.html (not tokens; same values as the live page). */

:root {
  --canvas: var(--t-parchment-white);
  --surface: var(--t-pure-white);
  --ink: var(--t-ink-charcoal);
  --ink-heading: var(--t-obsidian-navy);
  --ink-muted: #5f6272;            /* 5.3:1 on parchment (AA) */
  --maroon: var(--t-oxblood-maroon);
  --maroon-hover: #5e1026;
  --maroon-tint: #f9eef1;
  --gold: var(--t-antique-gold);
  --gold-tint: #faf6ea;
  --ok: var(--t-success-green);
  --warn: var(--t-signal-red);
  --hairline: #e5e1d8;
  --focus: var(--t-oxblood-maroon);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.6 var(--font-body); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

header.bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
header.bar .brand { font-family: var(--font-display); font-weight: 600; color: var(--ink-heading); text-decoration: none; letter-spacing: 0.04em; }
header.bar .mode { font-size: 13px; color: var(--ink-muted); }

main { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
a { color: var(--maroon); text-underline-offset: 3px; }
a:hover { color: var(--maroon-hover); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink-heading); line-height: 1.2; font-weight: 600; }
h1 { font-size: 30px; margin: 8px 0 12px; }
h2 { font-size: 22px; margin: 28px 0 8px; }
h3 { font-size: 18px; margin: 20px 0 6px; }
h1:focus, h2:focus { outline: none; }
p.lede { color: var(--ink-muted); margin-top: 0; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--maroon); }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 20px 16px; margin: 16px 0; }

fieldset { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--surface); margin: 0 0 12px; padding: 12px 12px 8px; }
legend { font-weight: 500; color: var(--ink-heading); padding: 0 4px; }
fieldset.symptom legend { font-weight: 400; color: var(--ink); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.choices label { flex: 1 1 auto; min-width: 88px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; min-height: 44px; }
.choices.stack label { flex-basis: 100%; }
.choices input { accent-color: var(--maroon); width: 18px; height: 18px; margin: 0; }
.choices label:has(input:checked) { border-color: var(--maroon); background: var(--maroon-tint); }
fieldset.invalid { border-color: var(--warn); }

textarea, input[type=text], input[type=email], input[type=password] {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 96px; }

button, .btn { font: inherit; font-weight: 500; border-radius: var(--radius-sm); padding: 12px 20px; min-height: 44px; cursor: pointer; border: 1px solid transparent; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-hover); }
.btn-secondary { background: transparent; color: var(--ink-heading); border-color: var(--hairline); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.error { color: var(--warn); font-weight: 500; }
.note { color: var(--ink-muted); font-size: 14px; }
.stub { border-left: 3px solid var(--gold); background: var(--gold-tint); padding: 10px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14px; }

.verdict .lever { font-family: var(--font-display); font-size: 26px; color: var(--ink-heading); margin: 4px 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; background: var(--gold-tint); color: var(--ink-heading); border: 1px solid var(--hairline); }
.pill.likely { background: var(--maroon-tint); color: var(--maroon); }
dl.result { margin: 12px 0 0; }
dl.result dt { font-weight: 600; color: var(--ink-heading); margin-top: 12px; }
dl.result dd { margin: 2px 0 0; }
.kitref { font-size: 14px; color: var(--ink-heading); border-top: 1px solid var(--hairline); margin-top: 16px; padding-top: 12px; }

/* B3: form fields, Pain Grid, promise check, numbers */
.field { margin: 0 0 12px; }
.field label { display: block; font-weight: 500; color: var(--ink-heading); margin-bottom: 4px; }
.field .hint { margin: -2px 0 6px; }
input.invalid, textarea.invalid { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
input[type=date] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px; max-width: 100%; }
input.short { max-width: 120px; }
textarea[rows="2"] { min-height: 64px; }
fieldset.grid-row legend, fieldset.day legend { font-family: var(--font-display); font-size: 18px; }
label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 8px 0 12px; cursor: pointer; }
label.check input { accent-color: var(--maroon); width: 20px; height: 20px; margin: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pair .field label { font-size: 14px; }
details { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--surface); padding: 12px; margin: 16px 0; }
summary { font-weight: 500; color: var(--ink-heading); cursor: pointer; min-height: 32px; }
blockquote { margin: 8px 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--gold); font-style: italic; color: var(--ink-heading); overflow-wrap: anywhere; }
.pain { padding: 12px 0; border-top: 1px solid var(--hairline); }
.pain:first-of-type { border-top: none; }
.pain dd { overflow-wrap: anywhere; }
ul.tests { list-style: none; padding: 0; margin: 12px 0 0; }
ul.tests li { padding: 4px 0; }
ul.tests .state { display: inline-block; min-width: 44px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
ul.tests li.pass .state { color: var(--ok); }
ul.tests li.fail .state { color: var(--warn); }
ul.notes { padding-left: 18px; margin: 12px 0 0; font-size: 14px; }
dd.stub { margin-top: 8px; }
table.metrics { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
table.metrics th, table.metrics td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.metrics thead th { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
table.metrics tbody th { font-weight: 500; color: var(--ink-heading); }
table.metrics tr.fail td:last-child { color: var(--warn); font-weight: 600; }
table.metrics tr.pass td:last-child { color: var(--ok); font-weight: 600; }
table.metrics tr.hold td:last-child { color: var(--ink-heading); font-weight: 600; }
table.metrics tr.waits th, table.metrics tr.waits td { color: var(--ink-muted); font-weight: 400; }

ol.modules { list-style: none; padding: 0; margin: 0; }
ol.modules li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--hairline); background: var(--surface); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; }
ol.modules .status { font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
ol.modules .status.done { color: var(--ok); font-weight: 600; }

@media (min-width: 640px) {
  main { padding-top: 40px; }
  h1 { font-size: 36px; }
  .card { padding: 24px; }
}

@media print {
  header.bar, .actions, .no-print, .skip { display: none !important; }
  body { background: #fff; }
  .card { border: none; padding: 0; }
  details { border: none; padding: 0; }
}

/* Intake submission block */
textarea.code { font: 13px/1.5 ui-monospace, Consolas, monospace; min-height: 220px; white-space: pre; overflow: auto; }

/* M5 setup checklist */
ol.steps { padding-left: 20px; margin: 8px 0 0; }
ol.steps li { margin-bottom: 12px; }
label.step { align-items: flex-start; margin: 0; min-height: 44px; }
label.step input { margin-top: 3px; flex: none; }
ol.steps .note { margin: 2px 0 0 30px; }
dd.big { font-family: var(--font-display); font-size: 22px; color: var(--ink-heading); }
code { font: 13px/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
input[type=url], input[type=datetime-local] { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px; }

/* M7 tracker */
.plan-day { border-top: 1px solid var(--hairline); padding-top: 4px; }
.plan-day.today h3 { color: var(--maroon); }
@media print { details > *:not(summary) { display: block !important; } }
