/* Vantage. Tokens mirror DESIGN.md; change them there first. Shared by the dashboard and onboarding. */
:root {
  --forest: #0A211F; --forest-2: #12302C; --ink-2: #3C4A47; --muted: #5E6B68;
  --cream: #F7F9F2; --surface: #FFFFFF; --sunken: #EEF1E6;
  /* Channels for translucent cream and forest, and light text on dark. Both palettes set them. */
  --cream-rgb: 247, 249, 242; --forest-rgb: 10, 33, 31; --on-dark-text: #DDE6E3;
  --line: #DDE2D3; --line-strong: #C9D0BF; --on-dark-muted: #9FB2AD; --on-dark-line: rgba(var(--cream-rgb), 0.14);
  --lime: #D8FF85; --mint: #8DFDBA;
  --green: #1B7A4B; --green-fill: #2E9E63; --green-tint: #E1F3E8;
  --amber: #8A5A00; --amber-fill: #E0A01B; --amber-tint: #FBEFD5;
  --red: #B42A21; --red-fill: #D2453B; --red-tint: #F9E1DE;
  /* Band meters and band pills only: the step between red and amber (At Risk). */
  --orange: #A4460F; --orange-fill: #E3732C; --orange-tint: #FCE6D6;
  --sans: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wordmark: "Hanken Grotesk", var(--sans);
  --label: 400 12px/1.5 var(--sans);
  --label-track: 0.15em;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
  --lift: 0 12px 32px rgba(var(--forest-rgb), 0.10);
  --rail: 264px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* Components that set display (flex, grid) must still disappear when hidden. */
[hidden] { display: none !important; }
body { background: var(--cream); color: var(--forest); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 16px; top: -56px; background: var(--forest); color: var(--cream); padding: 10px 16px; border-radius: 999px; z-index: 10; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.noscript { padding: 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Logo: the wordmark alone. The icon is its own "v" (the #mark symbol), shown only where the wordmark does not fit ---------- */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand svg { display: none; width: 22px; height: 22px; }
.brand span { font: 700 30px/1 var(--wordmark); letter-spacing: -0.035em; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--forest); color: var(--cream); padding: 24px 16px; display: flex; flex-direction: column; gap: 2px; }
.rail .brand { padding: 4px 10px 26px; }
.rail a.nav { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 14px; border-radius: 999px; color: var(--cream); text-decoration: none; font: 500 15px/1.3 var(--sans); }
.rail a.nav:hover { background: var(--forest-2); }
.rail a.nav[aria-current="page"] { background: var(--cream); color: var(--forest); font-weight: 600; }
.rail a.nav svg { width: 16px; height: 16px; flex: none; }
.rail a.nav:focus-visible { outline-color: var(--cream); }
.rail .group { display: block; margin: 22px 14px 6px; color: var(--on-dark-muted); }
.rail a.nav.audit { justify-content: space-between; }
.rail .count { font: 600 12px/1 var(--sans); font-feature-settings: "tnum" 1; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(var(--cream-rgb), 0.35); color: var(--cream); }
.rail a.nav[aria-current="page"] .count { border-color: var(--forest); color: var(--forest); }
.rail .dim { display: block; color: var(--on-dark-muted); font: 500 12px/1.2 var(--sans); margin-top: 2px; }
.rail a.nav[aria-current="page"] .dim { color: var(--ink-2); }
.rail-foot { margin-top: auto; padding: 24px 14px 0; color: var(--on-dark-muted); font-size: 12px; }

.main-col { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; background: rgba(var(--cream-rgb), 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar b { display: block; font: 600 17px/1.2 var(--sans); }
.topbar small { display: block; margin-top: 4px; font: var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
main { padding: 24px 32px 80px; max-width: 1344px; outline: none; }

/* ---------- Type ---------- */
/* Superside's eyebrow style. Monospace is kept for verbatim evidence only. */
.label, .eyebrow { font: var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--muted); }
h2.section { font: 400 44px/1.08 var(--sans); letter-spacing: -0.01em; margin: 56px 0 18px; }
/* Instrument Serif sits smaller than Inter Tight at the same size, so the highlight phrase is scaled up to match. */
h2.section em, .hero-title em, .serif-lead em, .nextno h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.1em; line-height: 1; }
.h3 { font: 500 20px/1.3 var(--sans); letter-spacing: -0.01em; }
h3 { font: 600 16px/1.35 var(--sans); }
.sub { color: var(--muted); font-size: 13px; }
.prose p { color: var(--ink-2); max-width: 72ch; font-size: 16px; }
.prose p + p { margin-top: 12px; }
.serif-lead { font: 500 30px/1.15 var(--sans); letter-spacing: -0.01em; max-width: 30ch; }
.num { font-feature-settings: "tnum" 1; }

/* ---------- Hero bands ---------- */
.hero { background: var(--forest); color: var(--cream); border-radius: var(--r-xl); padding: 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; margin-bottom: 20px; }
.hero .label, .hero .eyebrow { color: var(--on-dark-muted); }
.hero-main { flex: 3 1 420px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-width: 0; }
.hero-title { font: 400 56px/1.08 var(--sans); letter-spacing: -0.015em; }
.hero-title em { color: var(--mint); }
.hero p.lead { color: var(--on-dark-text); font-size: 17px; max-width: 60ch; }
.hero-compact { padding: 32px 40px; }
.hero-compact .hero-title { font-size: 48px; }
.hero-reading { flex: 2 1 300px; background: var(--forest-2); border-radius: var(--r-md); padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero-reading a { color: var(--cream); }
.hero-aside { flex: 1 1 240px; display: flex; align-items: flex-end; justify-content: flex-end; }
.hero-audit { padding-bottom: 76px; }
.hero-title.is-long { font-size: 42px; line-height: 1.12; }
.hero-title.is-longer { font-size: 34px; line-height: 1.2; }
.stages-section { margin-bottom: 20px; }
.finding-title { font: 500 28px/1.15 var(--sans); letter-spacing: -0.01em; margin-bottom: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(var(--cream-rgb), 0.35); font-size: 13px; }
.tag.solid { background: var(--cream); color: var(--forest); border-color: var(--cream); font-weight: 600; }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 999px; font: 600 15px/1 var(--sans); border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--lime); color: var(--forest); }
.btn-primary:hover { background: #C9F56B; }
.btn-dark { background: var(--forest); color: var(--cream); }
.btn-dark:hover { background: #000; }
.btn-secondary { background: var(--surface); color: var(--forest); border-color: var(--forest); }
.btn-secondary:hover { background: var(--sunken); }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }
.ext { display: inline-flex; align-items: center; gap: 4px; }
.ext svg { width: 12px; height: 12px; opacity: 0.7; }

/* ---------- Cards and grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.stack > * + * { margin-top: 20px; }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 24px; color: var(--ink-2); background: transparent; }
.forest-band { background: var(--forest); color: var(--cream); border-radius: var(--r-xl); padding: 48px; }
.forest-band .label { color: var(--on-dark-muted); }
.bq { display: flex; flex-wrap: wrap; gap: 40px; }
.bq-head { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.bq .rows { flex: 2 1 480px; min-width: 0; }

/* ---------- Status, markers, evidence ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px; font: 600 12px/1.3 var(--sans); white-space: nowrap; }
.status svg { width: 10px; height: 10px; flex: none; }
.s-green { background: var(--green-tint); color: var(--green); }
.s-amber { background: var(--amber-tint); color: var(--amber); }
.s-red { background: var(--red-tint); color: var(--red); }
.marker { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font: 500 11px/1.5 var(--sans); border: 1px solid var(--forest); color: var(--forest); white-space: nowrap; }
.marker.est { border-style: dashed; border-color: var(--ink-2); color: var(--ink-2); }
.hero .marker, .forest-band .marker { border-color: rgba(var(--cream-rgb), 0.6); color: var(--on-dark-text); }
.evidence { background: var(--sunken); border-radius: var(--r-sm); padding: 14px 18px; font: 400 13px/1.6 var(--mono); color: var(--forest); overflow-wrap: anywhere; }
.evidence cite { display: block; margin-top: 6px; color: var(--muted); font-style: normal; font-size: 12px; }
.evidence + .evidence { margin-top: 8px; }
.mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.yes, .no { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.yes svg, .no svg { width: 14px; height: 14px; }
.no { color: var(--muted); }

/* ---------- Score reading (always inside a forest band) ---------- */
.score { display: flex; align-items: baseline; gap: 8px; }
.score .n { font: 400 128px/0.85 var(--serif); letter-spacing: -0.03em; }
.score .of { font: 400 36px/1 var(--serif); color: var(--on-dark-muted); }
.meter { display: grid; gap: 4px; }
.meter div { height: 8px; background: rgba(var(--cream-rgb), 0.18); border-radius: 4px; }
.meter div.on { background: var(--cream); }
/* Score bands are colour-coded from the lowest: Critical red, At Risk orange, Average amber, Strong green.
   Only the filled segments take their band's colour; the band name is always shown in words too. */
.meter div.on:nth-child(1) { background: var(--red-fill); }
.meter div.on:nth-child(2) { background: var(--orange-fill); }
.meter div.on:nth-child(3) { background: var(--amber-fill); }
.meter div.on:nth-child(4) { background: var(--green-fill); }
.meter-labels { display: grid; gap: 4px; margin-top: 6px; }
.meter-labels span { font: 400 11px/1.2 var(--sans); color: var(--on-dark-muted); }
.meter-labels span.on { color: var(--cream); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Key numbers ---------- */
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--lift); margin: -44px 24px 8px; position: relative; }
.numbers > div { padding: 26px 28px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--sunken); }
.numbers > div:first-child { border-left: 0; }
.numbers .n { font: 400 60px/1 var(--serif); }
.numbers .n small { font-size: 28px; color: var(--muted); }
.numbers p { font-size: 14px; color: var(--ink-2); }

/* ---------- Category bars ---------- */
.cat { display: grid; grid-template-columns: minmax(120px, 170px) 1fr 56px 112px; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--sunken); font-size: 14px; }
.cat:first-child { border-top: 0; }
.bar { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--forest); border-radius: 3px; }
.bar.modelled { background: transparent; border: 1px dashed var(--line-strong); height: 8px; }
.bar.modelled i { background: var(--ink-2); opacity: 0.35; }
.cat .pts { font: 600 14px/1 var(--sans); font-feature-settings: "tnum" 1; text-align: right; }
.cat .band-pill { justify-self: start; }
/* Band status pills: tint fill, dark text of the same hue, the word always shown. */
.band-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 99px; font: 600 12px/1.2 var(--sans); white-space: nowrap; vertical-align: middle; letter-spacing: 0; text-transform: none; }
.band-critical { background: var(--red-tint); color: var(--red); }
.band-at-risk { background: var(--orange-tint); color: var(--orange); }
.band-average { background: var(--amber-tint); color: var(--amber); }
.band-strong { background: var(--green-tint); color: var(--green); }
.cats-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); column-gap: 40px; }
.cats-2 .cat:nth-child(2) { border-top: 0; }

/* ---------- Five audits ---------- */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stage { display: flex; flex-direction: column; gap: 8px; padding: 18px; min-height: 172px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.stage b { font: 600 16px/1.3 var(--sans); }
.stage .result { font: 400 13px/1.3 var(--sans); color: var(--on-dark-text); }
.stage .result .n { font: 400 36px/1 var(--serif); color: var(--cream); margin-right: 2px; }
.stage .result .band-pill { margin-left: 8px; }
.stage .pending { font: 400 13px/1.3 var(--sans); color: var(--muted); }
.stage .go { margin-top: auto; padding-top: 8px; }
.stage.done { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.stage.done .label { color: var(--on-dark-muted); }
.stage.requested { border-color: var(--forest); }
.stage.requested .pending { color: var(--forest); font-weight: 600; }
.stage .btn { min-height: 38px; padding: 0 16px; font-size: 13px; align-self: flex-start; margin-top: auto; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }

/* ---------- Definition chains: label and value ---------- */
.chain { display: grid; grid-template-columns: 128px 1fr; gap: 10px 16px; font-size: 14px; }
.chain dt { font: var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--muted); padding-top: 1px; }
.chain dd { color: var(--ink-2); }
.chain dd b { color: var(--forest); font-weight: 600; }

/* ---------- Lists, tables, details ---------- */
.rows > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rows > li:first-child { border-top: 0; }
.rows b { font-weight: 600; }
.rows small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.forest-band .rows > li { border-color: var(--on-dark-line); font-size: 16px; align-items: flex-start; }
.forest-band .rows small { color: var(--on-dark-muted); font-size: 14px; margin-top: 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--cream); white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-feature-settings: "tnum" 1; white-space: nowrap; }
td b { color: var(--forest); }
details.cat-detail { border-top: 1px solid var(--line); }
details.cat-detail:first-of-type { border-top: 0; }
details.cat-detail > summary { list-style: none; cursor: pointer; }
details.cat-detail > summary::-webkit-details-marker { display: none; }
details.cat-detail > summary .cat { border-top: 0; grid-template-columns: 20px minmax(120px, 190px) 1fr 76px 120px; padding: 16px 0; }
details.cat-detail > summary .pts { font: 400 30px/1 var(--serif); }
details.cat-detail > summary .pts small { font-size: 16px; color: var(--muted); }
details.cat-detail > summary .chev { width: 12px; height: 12px; transition: transform 0.15s; color: var(--muted); }
details.cat-detail[open] > summary .chev { transform: rotate(90deg); }
.criteria { padding: 0 0 22px 34px; }
.criterion { padding: 14px 0; border-top: 1px dashed var(--line); }
.criterion:first-child { border-top: 0; }
.criterion-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.criterion-head b { font-weight: 600; }
.criterion p { color: var(--ink-2); font-size: 14px; }
.criterion ul.facts { margin-top: 8px; }
.criterion ul.facts li { font-size: 13px; color: var(--ink-2); padding-left: 14px; position: relative; }
.criterion ul.facts li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 1px; background: var(--muted); }
.criterion .evidence { margin-top: 8px; }

/* ---------- Verdict ---------- */
.verdict-quote { font: italic 400 48px/1.1 var(--serif); max-width: 24ch; }

/* ---------- Plan and findings ---------- */
.phase { display: flex; flex-direction: column; gap: 8px; }
.phase .when { font: 400 40px/1 var(--serif); }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--forest); flex: none; cursor: pointer; }
.checklist label { cursor: pointer; color: var(--ink-2); font-size: 14px; }
.checklist input:checked + label { text-decoration: line-through; color: var(--muted); }
.finding-rank { font: 400 48px/1 var(--serif); color: var(--line-strong); }
.finding-head { display: flex; gap: 18px; align-items: flex-start; }
.steps-list li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.steps-list li:first-child { border-top: 0; }
.steps-list b { color: var(--forest); }
.compare { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.compare .n { font: 400 72px/1 var(--serif); letter-spacing: -0.02em; }
.compare .arrow { color: var(--muted); font-size: 24px; }
.next-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.next-steps li:first-child { border-top: 0; }
.next-steps b { color: var(--forest); }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--forest); color: var(--cream); display: grid; place-items: center; font: 600 13px/1 var(--sans); }

/* ---------- The advisor's review ---------- */
.tag.review-stamp { gap: 6px; border-color: var(--cream); }
.tag.review-stamp svg { width: 13px; height: 13px; }
.hero-aside .tag.review-stamp { align-self: flex-end; }
.advisor-note { border-color: var(--forest); display: flex; flex-direction: column; gap: 12px; }
.advisor-note .prose { font-size: 17px; line-height: 1.6; max-width: 72ch; }
.advisor-note .sign { font: italic 400 22px/1.2 var(--serif); }
.advisor-inline { border-left: 3px solid var(--forest); padding: 4px 0 4px 14px; margin-top: 14px; }
.advisor-inline p { margin-top: 4px; color: var(--forest); }

/* Host challenge notice: forest left rule, like the other notes that qualify a reading. */
.host-notice { border-left: 4px solid var(--forest); display: flex; flex-direction: column; gap: 10px; }
.host-notice .card-head { margin-bottom: 0; }
.host-notice p { color: var(--ink-2); max-width: 80ch; }
.host-notice b { color: var(--forest); }

/* Buyer question answers: icon, word and fill, never the traffic-light colours. */
.qa { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 10px; border-radius: 999px; border: 1px solid currentColor; font: 600 12px/1.3 var(--sans); white-space: nowrap; }
.qa svg { width: 11px; height: 11px; flex: none; }
.qa-answered { background: var(--cream); border-color: var(--cream); color: var(--forest); }
.qa-partial { color: var(--cream); }
.qa-unanswered { color: var(--on-dark-muted); border-style: dashed; }

/* ---------- Forms: shared by onboarding and the review page ---------- */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label, .field legend { font: 600 14px/1.3 var(--sans); color: var(--forest); }
.field .opt { font-weight: 400; color: var(--muted); }
.field .hint { color: var(--muted); font-size: 13px; margin-top: -2px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field input[type="password"], .field select, .field textarea {
  width: 100%; font: 400 15px/1.4 var(--sans); color: var(--forest); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 12px 14px; min-height: 46px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
/* Focus is a hairline that turns forest, the same weight as hover: no ring. */
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--forest); }
/* Specific enough to beat the per-type input rule above. */
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--forest); border-width: 2px; padding: 11px 13px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { margin-bottom: 8px; }

/* Errors: forest, an icon and words. Red is reserved for customer returns. */
.field-error, .form-error { display: flex; align-items: flex-start; gap: 8px; font: 600 13px/1.4 var(--sans); color: var(--forest); }
.field-error svg, .form-error svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.form-error { padding: 12px 14px; border: 1px solid var(--forest); border-left-width: 4px; border-radius: var(--r-sm); background: var(--surface); margin-bottom: 20px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: sticky; top: 0; z-index: 6; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 12px; gap: 4px; }
  .rail .brand { padding: 0 10px 0 4px; }
  .rail .brand span { display: none; }
  .rail .brand svg { display: block; }
  .rail .group, .rail-foot { display: none; }
  .rail a.nav { white-space: nowrap; }
  .topbar { position: static; padding: 14px 16px; flex-wrap: wrap; }
  main { padding: 16px 16px 64px; }
  .hero { padding: 28px 22px; }
  .hero-title { font-size: 40px; }
  .numbers { margin: -32px 8px 8px; }
  .forest-band { padding: 28px 22px; }
}
@media (max-width: 600px) {
  .hero-title, .hero-compact .hero-title, .hero-title.is-long { font-size: 32px; }
  .hero-title.is-longer { font-size: 26px; }
  .finding-title { font-size: 23px; }
  .score .n { font-size: 96px; }
  h2.section { font-size: 32px; }
  .card { padding: 20px; }
  .numbers .n { font-size: 48px; }
  .numbers > div { border-left: 0; border-top: 1px solid var(--sunken); }
  .numbers > div:first-child { border-top: 0; }
  .cat { grid-template-columns: 1fr 48px; }
  .cat .bar { grid-column: 1 / -1; grid-row: 2; }
  .cat .band-pill { display: none; }
  details.cat-detail > summary .cat { grid-template-columns: 16px 1fr 64px; }
  details.cat-detail > summary .cat .bar { grid-column: 2 / -1; }
  .criteria { padding-left: 0; }
  .chain { grid-template-columns: 1fr; gap: 2px; }
  .chain dd { margin-bottom: 10px; }
  .verdict-quote { font-size: 34px; }
  .serif-lead { font-size: 24px; }
}

/* The public example's notice: a fictional business, on every view. */
.demo-notice { margin: 0 0 20px; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink-2); font-size: 14px; }
.demo-notice b { color: var(--forest); }

/* The public example: one page, no side menu. */
.no-rail .app { grid-template-columns: 1fr; }
.no-rail .rail { display: none; }

/* ==========================================================================
   mariomalik.com palette for the visitor-facing product pages: the example report
   and onboarding (body.palette-mm). Colours only, as on the public site (site/site.css).
   Client workspaces and the review page keep the forest palette above.
   ========================================================================== */
.palette-mm {
  --forest: #000000; --forest-2: #1a1a1a; --cream: #f0f0f0; --surface: #ffffff;
  --lime: #0063e1; --mint: #8a8a8a; --muted: #6b6b6b; --ink-2: #666666;
  --line: #0000001a; --line-strong: #00000033; --on-dark-muted: #a3a3a3; --on-dark-line: #ffffff26;
  --sunken: #e6e6e6; --cream-rgb: 255, 255, 255; --forest-rgb: 0, 0, 0; --on-dark-text: #d4d4d4;
  --lift: 0 12px 32px rgba(0, 0, 0, 0.10);
  background: #f0f0f0; color: #000;
}
.palette-mm .btn-primary { background: #0063e1; color: #fff; }
/* The serif-italic phrase is the primary blue, as on the public site. */
.palette-mm h1 em, .palette-mm h2 em, .palette-mm h3 em, .palette-mm .hero-title em, .palette-mm .ob-promise-title em { color: var(--lime); }
.palette-mm .btn-primary:hover { background: #0056c4; }
.palette-mm .ob-steps li[aria-current="step"] .dot { color: #fff; }
