/* ============================================================
   MOSTLY BETTER — design system
   "Workshop diagnostic" aesthetic: paper + ink + severity colors.
   Palette encodes audit outcomes: green=pass, amber=warning,
   red=critical, blue=info. Hard shadows, 2px ink borders.
   ============================================================ */

:root {
  --paper: #F2F5F1;
  --paper-2: #E7ECE6;
  --paper-3: #DDE5DC;
  --card: #FFFFFF;
  --ink: #12261E;
  --ink-2: #335046;
  --ink-3: #52675E; /* darkened for WCAG AA (>=5.1:1 on all paper tints) */
  --line: #12261E;
  --green: #0B7243; /* darkened for WCAG AA (5.5:1 on paper) */
  --green-bright: #17B877;
  --green-ink: #0A3B26;
  --dark: #0C231B;
  --dark-2: #123127;
  --dark-3: #1A4234;
  --amber: #C77E06;
  --amber-bg: #FBEED3;
  --red: #A72918; /* darkened for WCAG AA (5.7:1 on red-bg) */
  --red-bg: #F9E1DC;
  --blue: #155A94; /* darkened for WCAG AA (5.9:1 on blue-bg) */
  --blue-bg: #DDEBF7;
  --green-bg: #D9F0E4;
  --field-bg: #FFFFFF;
  --shadow-ink: #12261E;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --body: "IBM Plex Sans", system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --shadow-hard: 5px 5px 0 var(--shadow-ink);
  --shadow-hard-sm: 3px 3px 0 var(--shadow-ink);
  --r: 8px;
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* safety net: nothing may widen the document (overflow-x: clip keeps
   position:sticky working, unlike hidden) */
html, body { overflow-x: clip; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  /* layered ambient background: faint grid + two soft tints */
  background-image:
    radial-gradient(1100px 500px at 85% -5%, rgba(23, 184, 119, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(29, 111, 184, 0.07), transparent 55%),
    linear-gradient(rgba(18, 38, 30, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 38, 30, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--green-bright); color: var(--dark); }

img, svg { display: block; max-width: 100%; }
a { color: var(--green); }
a:hover { color: var(--green-ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- type scale ---------- */
.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
}
h2.display-sm {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
}
h3 { font-family: var(--display); font-weight: 700; font-size: 1.22rem; line-height: 1.25; }
.kicker {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green);
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 26px; height: 3px; background: var(--green); }
.lede { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 62ch; }
strong, b { font-weight: 700; }
.mono { font-family: var(--mono); }

/* ---------- header / nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; gap: 20px; padding: 12px clamp(16px, 4vw, 32px); }
/* NOTE: .nav-wrap is also a .container, but the flex padding above must
   include the horizontal gutter — with `12px 0` the brand mark and burger
   sat flush against the screen edge on phones (broken logo margins). */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand .wordmark { font-family: var(--display); font-weight: 800; font-size: 1.22rem; letter-spacing: -0.01em; line-height: 1; }
.brand .wordmark em { font-style: normal; color: var(--green); }
.mainnav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.mainnav a {
  text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: var(--r);
  transition: background .15s ease, color .15s ease;
}
.mainnav a:hover { background: var(--paper-3); color: var(--green-ink); }
.mainnav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

.lang-select {
  font-family: var(--mono); font-weight: 600; font-size: 0.82rem;
  padding: 7px 10px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-2); cursor: pointer; flex: none;
  transition: background .15s ease, color .15s ease;
}
.lang-select:hover { background: var(--paper-3); color: var(--green-ink); }
.lang-select:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* ---------- cookie / analytics consent banner ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 300;
  max-width: 660px; margin: 0 auto;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--shadow-ink); padding: 16px 18px;
}
.consent[hidden] { display: none; }
.consent h2 { font-size: 1rem; margin: 0 0 6px; }
.consent p { margin: 0 0 12px; font-size: .92rem; line-height: 1.45; }
.consent summary { cursor: pointer; font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--green-ink); }
.consent-detail { margin-top: 10px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: var(--r); font-size: .85rem; color: var(--ink-2); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
@media (max-width: 760px) {
  .consent { left: 8px; right: 8px; bottom: 8px; padding: 14px; }
}

.nav-burger { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1rem;
  padding: 13px 22px;
  border-radius: var(--r);
  border: 2px solid var(--line);
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: var(--shadow-hard);
  background: var(--card); color: var(--ink);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow-ink); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-ink); }
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { color: #fff; background: var(--green-ink); }
.btn-amber { background: var(--amber); color: #2A1703; } /* dark text for AA (8:1) */
.btn-sm { padding: 9px 15px; font-size: 0.9rem; box-shadow: var(--shadow-hard-sm); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- severity chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; border: 1.5px solid var(--line);
  white-space: normal; max-width: 100%; line-height: 1.4;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.chip.crit { background: var(--red-bg); color: var(--red); }
.chip.crit::before { background: var(--red); }
.chip.warn { background: var(--amber-bg); color: #8A5A00; } /* amber text too light; darkened for AA */
.chip.warn::before { background: var(--amber); }
.chip.ok { background: var(--green-bg); color: var(--green-ink); }
.chip.ok::before { background: var(--green); }
.chip.info { background: var(--blue-bg); color: var(--blue); }
.chip.info::before { background: var(--blue); }

/* ---------- hero ---------- */
.hero { padding: clamp(44px, 7vw, 88px) 0 clamp(36px, 5vw, 64px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1.display .hl {
  color: var(--green);
  text-decoration: underline wavy var(--amber) 3px;
  text-underline-offset: 8px;
}
.hero .lede { margin: 22px 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-proof {
  margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2);
}
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof .tick { color: var(--green); font-weight: 700; }

/* scan console */
.console {
  background: var(--dark); color: #DCEDE3;
  border: 2px solid var(--line); border-radius: 12px;
  box-shadow: 8px 8px 0 rgba(18, 38, 30, 0.85);
  overflow: hidden; position: relative;
}
.console::after { /* scanline sweep */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(23,184,119,0.07) 50%, transparent 100%);
  background-size: 100% 220%;
  animation: sweep 5s linear infinite;
}
@keyframes sweep { from { background-position: 0 -120%; } to { background-position: 0 120%; } }
.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; background: var(--dark-2); border-bottom: 2px solid var(--dark-3);
  font-family: var(--mono); font-size: 0.78rem; color: #9FC3B0;
}
.console-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.console-bar .dot:nth-child(1) { background: var(--red); }
.console-bar .dot:nth-child(2) { background: var(--amber); }
.console-bar .dot:nth-child(3) { background: var(--green-bright); }
.console-bar .file { margin-left: 8px; }
.console-body { padding: 18px 18px 20px; font-family: var(--mono); font-size: 0.83rem; }
.scan-target { color: #9FC3B0; margin-bottom: 12px; word-break: break-all; }
.scan-target b { color: #fff; }
.scan-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; opacity: 0; transform: translateX(-8px);
  transition: opacity .3s ease, transform .3s ease;
}
.scan-row.show { opacity: 1; transform: none; }
.scan-row .st { margin-left: auto; font-weight: 600; }
.scan-row .st.ok { color: var(--green-bright); }
.scan-row .st.warn { color: #E9B949; }
.scan-row .st.crit { color: #F07A6A; }
.scan-row .ic { width: 18px; text-align: center; }
.scan-progress { height: 8px; background: var(--dark-3); border-radius: 99px; margin: 14px 0 6px; overflow: hidden; }
.scan-progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green-bright), #7FE0B0);
  transition: width .45s ease;
}
.scan-score {
  display: flex; align-items: baseline; gap: 12px; margin-top: 10px;
  border-top: 1px dashed var(--dark-3); padding-top: 12px;
}
.scan-score .num {
  font-family: var(--display); font-weight: 800; font-size: 2.6rem; color: #fff; line-height: 1;
}
.scan-score .lab { color: #9FC3B0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .1em; }
.scan-score .verdict { margin-left: auto; }

/* ---------- ticker ---------- */
.ticker {
  border-block: 2px solid var(--line);
  background: var(--dark); color: #CFE8DA;
  overflow: hidden; padding: 12px 0;
}
.ticker-track { display: flex; gap: 42px; width: max-content; animation: tick 36s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { font-family: var(--mono); font-size: 0.86rem; white-space: nowrap; display: inline-flex; gap: 10px; align-items: center; }
.ticker-track .k { color: #E9B949; } /* brightened: amber text on dark bg must pass AA */
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section.block { padding: clamp(52px, 8vw, 96px) 0; }
.block-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.block-head .lede { margin-top: 14px; }

/* service ladder — staircase, not card row */
.ladder { display: grid; gap: 0; counter-reset: rung; }
.rung {
  display: grid; grid-template-columns: 92px 1fr auto; gap: clamp(16px, 3vw, 30px);
  align-items: start; padding: 26px 22px;
  border: 2px solid var(--line); background: var(--card);
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}
.rung + .rung { margin-top: 22px; margin-left: clamp(0px, 4vw, 54px); }
.rung:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--shadow-ink); z-index: 2; }
.rung .num {
  font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1;
  color: var(--paper-3); -webkit-text-stroke: 2px var(--ink);
}
.rung h3 { font-size: 1.35rem; margin-bottom: 6px; }
.rung p { color: var(--ink-2); font-size: 0.98rem; max-width: 58ch; }
.rung .price {
  font-family: var(--mono); font-weight: 600; white-space: nowrap;
  border: 2px solid var(--line); background: var(--green-bg); color: var(--green-ink);
  padding: 7px 13px; border-radius: var(--r); align-self: center;
}
.rung .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rung.future { background: var(--paper-2); border-style: dashed; }
.rung.future .price { background: var(--blue-bg); color: var(--blue); }

/* finding anatomy */
.anatomy-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.anatomy-list { display: grid; gap: 12px; }
.anatomy-item {
  border: 2px solid var(--line); background: var(--card); border-radius: var(--r);
  padding: 14px 16px; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.anatomy-item:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-sm); }
.anatomy-item[aria-expanded="true"] { background: var(--green-bg); box-shadow: var(--shadow-hard-sm); }
.anatomy-item h3 { font-size: 1.02rem; display: flex; gap: 10px; align-items: center; }
.anatomy-item h3 .n { font-family: var(--mono); color: var(--green); font-size: 0.85rem; }
.anatomy-item .body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.anatomy-item[aria-expanded="true"] .body { max-height: 220px; }
.anatomy-item .body p { padding-top: 8px; color: var(--ink-2); font-size: 0.94rem; }

.demo-finding {
  border: 2px solid var(--line); border-radius: 12px; background: var(--card);
  box-shadow: var(--shadow-hard); overflow: hidden;
}
.demo-finding .df-head {
  padding: 16px 20px; border-bottom: 2px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--paper-2);
}
.demo-finding .df-head h3 { font-size: 1.1rem; }
.df-sec { padding: 16px 20px; border-top: 1.5px dashed var(--paper-3); }
.df-sec:first-of-type { border-top: 0; }
.df-sec .lab {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--green); display: block; margin-bottom: 6px;
}
.df-sec p { font-size: 0.95rem; color: var(--ink-2); }
.df-evidence {
  background: var(--dark); color: #CDE7D9; font-family: var(--mono); font-size: 0.8rem;
  padding: 12px 14px; border-radius: var(--r); overflow-x: auto; white-space: pre; line-height: 1.5;
}
.done-means {
  background: var(--green-bg); border: 2px solid var(--green-ink); border-radius: var(--r);
  padding: 12px 14px;
}
.done-means p { color: var(--green-ink) !important; font-weight: 500; }

/* report teaser gauges */
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.gauge-card {
  border: 2px solid var(--line); background: var(--card); border-radius: var(--r);
  padding: 18px; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.gauge-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hard-sm); }
.gauge { --p: 0; width: 118px; height: 118px; border-radius: 50%; margin: 0 auto 10px;
  background: conic-gradient(var(--gc, var(--green)) calc(var(--p) * 1%), var(--paper-3) 0);
  display: grid; place-items: center; position: relative;
  transition: --p 1s ease;
}
.gauge::before { content: ""; position: absolute; inset: 10px; background: var(--card); border-radius: 50%; }
.gauge b { position: relative; font-family: var(--display); font-size: 1.7rem; font-weight: 800; }
.gauge .of { position: relative; font-family: var(--mono); font-size: 0.65rem; color: var(--ink-3); margin-top: -6px; }
.gauge-card .gl { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); }

/* fit / not fit */
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.fit-col { border: 2px solid var(--line); border-radius: 12px; padding: 24px; background: var(--card); }
.fit-col.good { background: var(--green-bg); }
.fit-col h3 { margin-bottom: 14px; font-size: 1.15rem; }
.fit-col ul { list-style: none; display: grid; gap: 10px; }
.fit-col li { display: flex; gap: 10px; font-size: 0.97rem; }
.fit-col li::before { font-weight: 800; flex: none; }
.fit-col.good li::before { content: "✓"; color: var(--green-ink); }
.fit-col.bad li::before { content: "✗"; color: var(--red); }

/* CTA band */
.cta-band {
  background: var(--dark); color: #EAF5EE; border-block: 2px solid var(--line);
  padding: clamp(44px, 6vw, 72px) 0; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, rgba(23,184,119,0.06) 0 14px, transparent 14px 28px);
}
.cta-band .container { position: relative; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.4rem); max-width: 24ch; }
.cta-band p { color: #A9CDB9; margin-top: 8px; max-width: 52ch; }

/* ---------- footer ---------- */
footer { background: var(--dark-2); color: #B9D6C6; padding: 40px 0 30px; border-top: 2px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.foot-title { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 0.75rem; color: #7FA893; margin-bottom: 12px; }
footer a { color: #DCEDE3; text-decoration: none; }
footer a:hover { color: var(--green-bright); text-decoration: underline; }
footer ul { list-style: none; display: grid; gap: 2px; font-size: 0.94rem; }
footer ul a { display: inline-block; padding: 4px 0; }
.foot-note { margin-top: 30px; padding-top: 18px; border-top: 1px dashed var(--dark-3); font-family: var(--mono); font-size: 0.76rem; color: #7FA893; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   PACKAGES PAGE
   ============================================================ */
.price-table { border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-hard); }
.pt-row { display: grid; grid-template-columns: 1.35fr 1fr 1.1fr 0.62fr; gap: 0; border-top: 2px solid var(--line); transition: background .15s ease; }
.pt-row:first-child { border-top: 0; }
.pt-row:hover { background: var(--paper-2); }
.pt-row > div { padding: 20px 22px; }
.pt-row > div + div { border-left: 1.5px solid var(--paper-3); }
.pt-row.head { background: var(--dark); color: #DCEDE3; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .1em; }
.pt-row.head > div + div { border-left-color: var(--dark-3); }
.pt-name h3 { font-size: 1.2rem; }
.pt-name .sub { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); margin-top: 4px; }
.pt-incl { font-size: 0.92rem; color: var(--ink-2); }
.pt-incl ul { list-style: none; display: grid; gap: 5px; }
.pt-incl li::before { content: "→ "; color: var(--green); font-weight: 700; }
.pt-price { font-family: var(--display); font-weight: 800; font-size: 1.5rem; display: flex; flex-direction: column; justify-content: center; }
.pt-price small { font-family: var(--mono); font-weight: 500; font-size: 0.74rem; color: var(--ink-3); }
.pt-cta { display: flex; align-items: center; }
.care-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.care-card { border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: 24px; position: relative; transition: transform .2s ease, box-shadow .2s ease; }
.care-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hard); }
.care-card.featured { background: var(--green-bg); }
.care-card .ribbon {
  position: absolute; top: -13px; right: 16px;
  background: var(--amber); color: #2A1703; border: 2px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  padding: 3px 11px; border-radius: 99px;
}
.care-card h3 { font-size: 1.25rem; }
.care-card .cp { font-family: var(--display); font-weight: 800; font-size: 2rem; margin: 10px 0 2px; }
.care-card .cp small { font-size: 0.9rem; font-family: var(--mono); font-weight: 500; color: var(--ink-3); }
.care-card ul { list-style: none; margin-top: 14px; display: grid; gap: 8px; font-size: 0.93rem; }
.care-card li { display: flex; gap: 8px; }
.care-card li::before { content: "✓"; color: var(--green); font-weight: 800; }
.honest-note {
  border: 2px dashed var(--line); background: var(--amber-bg); border-radius: 12px;
  padding: 20px 24px; display: flex; gap: 14px; align-items: flex-start;
}
.honest-note .big { font-size: 1.6rem; line-height: 1; }
.faq { display: grid; gap: 14px; max-width: 820px; }
.faq details { border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 1.3rem; color: var(--green); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--ink-2); }

/* ============================================================
   REPORT PAGES
   ============================================================ */
.rep-hero { background: var(--dark); color: #EAF5EE; border-bottom: 2px solid var(--line); padding: clamp(40px, 6vw, 72px) 0; }
.rep-hero .kicker { color: var(--green-bright); }
.rep-hero .kicker::before { background: var(--green-bright); }
.rep-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; font-family: var(--mono); font-size: 0.82rem; color: #A9CDB9; }
.score-hero { display: flex; gap: clamp(22px, 4vw, 46px); align-items: center; flex-wrap: wrap; margin-top: 30px; }
.dial { width: 168px; height: 168px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--green-bright) calc(var(--p, 0) * 1%), var(--dark-3) 0);
  display: grid; place-items: center; position: relative;
}
.dial::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--dark); }
.dial .dv { position: relative; text-align: center; }
.dial .dv b { font-family: var(--display); font-size: 3rem; font-weight: 800; line-height: 1; }
.dial .dv span { font-family: var(--mono); font-size: 0.7rem; color: #A9CDB9; display: block; }
.score-breakdown { display: grid; gap: 12px; flex: 1; min-width: 280px; }
.sb-row { display: grid; grid-template-columns: 150px 1fr 42px; gap: 12px; align-items: center; font-size: 0.86rem; }
.sb-row .bar { height: 12px; background: var(--dark-3); border-radius: 99px; overflow: hidden; }
.sb-row .bar i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 1s ease .2s; }
.sb-row .v { font-family: var(--mono); font-weight: 600; text-align: right; }

.rep-toc { border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: 22px 26px; }
.rep-toc ol { margin-left: 20px; display: grid; gap: 2px; }
.rep-toc li > a { display: inline-block; padding: 4px 0; }
.rep-toc a { color: var(--ink); text-decoration: none; font-weight: 600; }
.rep-toc a:hover { color: var(--green); text-decoration: underline; }

.rep-section { margin-top: clamp(40px, 6vw, 64px); }
.rep-section > h2 { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.rep-section > h2 .no { font-family: var(--mono); color: var(--green); font-size: 0.9rem; }

.finding { border: 2px solid var(--line); border-radius: 12px; background: var(--card); margin-top: 22px; overflow: hidden; }
.finding .f-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px 22px; background: var(--paper-2); border-bottom: 2px solid var(--line); }
.finding .f-head h3 { font-size: 1.08rem; flex: 1; min-width: 220px; }
.finding .f-id { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-3); }
.finding .f-body { padding: 18px 22px; display: grid; gap: 16px; }
.f-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f-label { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; color: var(--green); margin-bottom: 5px; display: block; }
.finding p { font-size: 0.95rem; color: var(--ink-2); }
.evidence { background: var(--dark); color: #CDE7D9; font-family: var(--mono); font-size: 0.79rem; padding: 13px 15px; border-radius: var(--r); overflow-x: auto; white-space: pre; line-height: 1.55; }
.evidence .ev-cap { color: #7FA893; }
.pasos { list-style: none; display: grid; gap: 8px; counter-reset: paso; }
.pasos li { display: flex; gap: 12px; font-size: 0.95rem; color: var(--ink-2); }
.pasos li::before { counter-increment: paso; content: counter(paso); font-family: var(--mono); font-weight: 700; color: var(--green-ink); background: var(--green-bg); border: 1.5px solid var(--green-ink); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; flex: none; }

.impact-matrix { overflow-x: auto; }
.impact-matrix table { width: 100%; border-collapse: collapse; background: var(--card); border: 2px solid var(--line); font-size: 0.9rem; }
.impact-matrix th, .impact-matrix td { padding: 12px 14px; text-align: left; border: 1.5px solid var(--paper-3); }
.impact-matrix th { background: var(--dark); color: #DCEDE3; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .08em; }
.impact-matrix tr:nth-child(even) td { background: var(--paper); }
.dotm { font-weight: 800; }
.dotm.hi { color: var(--green); }
.dotm.md { color: #8A5A00; }
.dotm.lo { color: var(--ink-3); }

.raw-evidence { border: 2px dashed var(--line); border-radius: 12px; background: var(--paper-2); padding: 22px 26px; }
.raw-evidence h3 { margin-bottom: 10px; }
.raw-evidence .kv { display: grid; grid-template-columns: 220px 1fr; gap: 6px 18px; font-family: var(--mono); font-size: 0.82rem; }
.raw-evidence .kv dt { color: var(--ink-3); }

.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.method-card { border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 20px; }
.method-card .n { font-family: var(--mono); color: var(--green); font-size: 0.8rem; font-weight: 700; }
.method-card .mc-h { font-family: var(--display); font-weight: 700; font-size: 1.22rem; line-height: 1.25; margin: 6px 0 8px; }
.method-card p { font-size: 0.93rem; color: var(--ink-2); }

.rep-cta { margin-top: clamp(44px, 6vw, 64px); }

.print-btn { /* static near the report heading; full-width below 760px */ }

/* ============================================================
   REQUEST PAGE
   ============================================================ */
.req-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 4vw, 44px); align-items: start; }
.form-card { border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-hard); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field .hint { font-size: 0.8rem; color: var(--ink-3); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r); background: var(--field-bg);
  padding: 12px 14px; width: 100%;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 3px 3px 0 var(--green);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); box-shadow: 3px 3px 0 var(--red); }
.field .err { font-size: 0.8rem; color: var(--red); font-weight: 600; display: none; }
.field.invalid .err { display: block; }
fieldset.consent { border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; background: var(--paper); }
fieldset.consent legend { font-weight: 700; font-size: 0.9rem; padding: 0 8px; }
.consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.consent input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--green); flex: none; }
.side-card { border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: 22px; }
.side-card + .side-card { margin-top: 18px; }
.side-card h2 { font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.25; margin-bottom: 10px; }
.side-card ul { list-style: none; display: grid; gap: 9px; font-size: 0.93rem; }
.side-card li { display: flex; gap: 10px; }
.side-card li::before { content: "→"; color: var(--green); font-weight: 800; }
.steps-mini { display: grid; gap: 0; counter-reset: sm; }
.steps-mini li { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.steps-mini li::before { counter-increment: sm; content: counter(sm); font-family: var(--mono); font-weight: 700; background: var(--dark); color: var(--green-bright); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.82rem; flex: none; }
.result-card { display: none; border: 2px solid var(--green-ink); background: var(--green-bg); border-radius: 12px; padding: 22px; margin-top: 20px; }
.result-card.show { display: block; animation: pop .3s ease; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-card h2 { font-family: var(--display); font-weight: 700; font-size: 1.22rem; line-height: 1.25; color: var(--green-ink); margin-bottom: 10px; }
.result-card .kv2 { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; font-size: 0.92rem; }
.result-card .kv2 dt { font-weight: 700; }

/* ============================================================
   ADMIN (fictional)
   ============================================================ */
.admin-banner {
  background: var(--amber-bg); border-bottom: 2px solid var(--line);
  font-family: var(--mono); font-size: 0.8rem; padding: 9px 0; text-align: center;
}
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile { border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: 18px 20px; transition: transform .2s ease, box-shadow .2s ease; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hard-sm); }
.tile .t-lab { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }
.tile .t-val { font-family: var(--display); font-weight: 800; font-size: 2.1rem; margin-top: 4px; }
.tile .t-delta { font-size: 0.8rem; color: var(--green); font-weight: 600; }
.admin-grid2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; margin-top: 22px; }
.panel { border: 2px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.panel .p-head { padding: 14px 20px; background: var(--paper-2); border-bottom: 2px solid var(--line); font-family: var(--mono); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; display: flex; justify-content: space-between; align-items: center; }
.jobs-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.jobs-table th, .jobs-table td { padding: 11px 16px; text-align: left; border-top: 1.5px solid var(--paper-3); }
.jobs-table th { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; color: var(--ink-3); }
.jobs-table tr { transition: background .12s ease; }
.jobs-table tbody tr:hover { background: var(--paper); }
.pill { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; border: 1.5px solid var(--line); }
.pill.run { background: var(--blue-bg); color: var(--blue); }
.pill.wait { background: var(--amber-bg); color: #8A5A00; } /* darkened for AA */
.pill.done { background: var(--green-bg); color: var(--green-ink); }
.pill.rev { background: #EFE4F7; color: #6B3FA0; }
.bars { padding: 18px 20px; display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr 34px; gap: 10px; align-items: center; font-size: 0.82rem; }
.bar-row .tr { height: 14px; background: var(--paper-3); border-radius: 99px; overflow: hidden; }
.bar-row .tr i { display: block; height: 100%; width: 0; transition: width 1s ease .2s; }
.pipewrap { padding: 18px 20px; }
.pipe-stage { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 0.9rem; }
.pipe-stage .pc { font-family: var(--mono); font-weight: 700; width: 30px; text-align: right; }
.pipe-stage .pl { flex: 1; height: 12px; background: var(--paper-3); border-radius: 99px; overflow: hidden; }
.pipe-stage .pl i { display: block; height: 100%; background: var(--green); width: 0; transition: width 1s ease .2s; }
.alert-row { display: flex; gap: 12px; padding: 13px 20px; border-top: 1.5px solid var(--paper-3); font-size: 0.88rem; align-items: flex-start; }
.alert-row:first-of-type { border-top: 0; }
.alert-row .tm { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; padding-top: 2px; }

/* ---------- evidence mockups (annotated fictional "screenshots") ---------- */
.ev-mock { border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); margin: 0; }
.ev-mock .ev-bar { display: flex; gap: 6px; align-items: center; padding: 8px 12px; background: var(--dark-2); border-bottom: 2px solid var(--line); }
.ev-mock .ev-bar i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ev-mock .ev-bar i:nth-child(1) { background: var(--red); }
.ev-mock .ev-bar i:nth-child(2) { background: var(--amber); }
.ev-mock .ev-bar i:nth-child(3) { background: var(--green-bright); }
.ev-mock .ev-url { flex: 1; min-width: 0; background: var(--dark-3); color: #9FC3B0; font-family: var(--mono); font-size: 0.72rem; padding: 4px 10px; border-radius: 99px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-mock .ev-body { padding: 16px; position: relative; background: #FBFDF9; }
.ev-mock figcaption { padding: 10px 14px; border-top: 1.5px dashed var(--paper-3); background: var(--paper-2); display: flex; gap: 8px 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-2); }
.ev-fic { font-family: var(--mono); font-size: 0.66rem; font-weight: 700; color: #8A5A00; background: var(--amber-bg); border: 1.5px solid var(--amber); padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.ev-ann { position: absolute; z-index: 2; font-family: var(--mono); font-size: 0.66rem; font-weight: 700; background: var(--red-bg); color: var(--red); border: 1.5px solid var(--red); border-radius: 6px; padding: 3px 8px; box-shadow: 2px 2px 0 var(--shadow-ink); max-width: 46%; }
/* mock 1 — broken form */
.mock-field { display: grid; gap: 3px; margin-bottom: 10px; max-width: 340px; }
.mock-field span { font-size: 0.74rem; font-weight: 600; color: var(--ink-2); }
.mock-field b { display: block; border: 1.5px solid var(--paper-3); background: #fff; border-radius: 6px; padding: 7px 10px; font-weight: 400; font-size: 0.85rem; color: var(--ink-3); }
.mock-submit { border: 2px solid var(--line); background: var(--green); color: #fff; font-weight: 700; font-size: 0.88rem; padding: 9px 18px; border-radius: var(--r); display: inline-block; margin-top: 2px; }
.mock-error { margin-top: 12px; max-width: 340px; background: var(--red-bg); border: 2px solid var(--red); color: var(--red); font-family: var(--mono); font-size: 0.8rem; font-weight: 600; padding: 10px 14px; border-radius: var(--r); }
/* mock 2 — oversized image */
.file-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 480px; }
.file-card { border: 2px solid var(--line); border-radius: var(--r); padding: 12px; background: #fff; }
.file-card .fn { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; word-break: break-all; }
.file-card .fs { font-size: 0.74rem; color: var(--ink-3); margin: 3px 0 8px; }
.file-card .fbar { height: 10px; background: var(--paper-3); border-radius: 99px; overflow: hidden; }
.file-card .fbar i { display: block; height: 100%; }
.file-card.bad { border-color: var(--red); }
.file-card.bad .fbar i { background: var(--red); width: 100%; }
.file-card.good { border-color: var(--green); }
.file-card.good .fbar i { background: var(--green); width: 5%; }
.ev-save { position: absolute; top: 12px; right: 12px; background: var(--green-bg); color: var(--green-ink); border: 2px solid var(--green-ink); font-family: var(--mono); font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; box-shadow: 2px 2px 0 var(--shadow-ink); }
/* mock 3 — google listing */
.g-card { max-width: 380px; border: 1.5px solid var(--paper-3); border-radius: 10px; background: #fff; padding: 14px 16px; box-shadow: 0 1px 4px rgba(18,38,30,.12); }
.g-card .g-t { font-weight: 700; font-size: 0.95rem; }
.g-card .g-l { font-size: 0.82rem; margin-top: 8px; display: flex; gap: 8px; align-items: baseline; }
.g-card .g-l.bad { color: var(--red); font-weight: 600; }
.g-card .g-l.good { color: var(--green-ink); font-weight: 600; }

/* ---------- score weights block ---------- */
.score-weights { margin-top: 30px; background: var(--dark-2); border: 2px solid var(--dark-3); border-radius: 12px; padding: 22px 26px; color: #DCEDE3; }
.score-weights h3 { color: #7FE0B0; font-size: 1.05rem; }
.score-weights .sw-d { font-size: 0.9rem; color: #B9D6C6; margin-top: 8px; max-width: 75ch; }
.sw-rows { display: grid; gap: 8px; margin: 16px 0 4px; }
.sw-row { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 12px; align-items: center; font-size: 0.8rem; }
.sw-row .sw-t { background: var(--dark-3); border-radius: 99px; overflow: hidden; height: 12px; }
.sw-row .sw-t i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-bright), #7FE0B0); }
.sw-note { font-size: 0.76rem; color: #7FA893; margin-top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .anatomy-grid { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .admin-grid2 { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .pt-row { grid-template-columns: 1fr 1fr; }
  .pt-row > div:nth-child(3) { border-left: 0; border-top: 1.5px solid var(--paper-3); }
  .pt-row > div:nth-child(4) { border-top: 1.5px solid var(--paper-3); }
}
/* ---------- responsive: tablet (761–900px) — burger nav earlier so the
   desktop nav + lang toggle never overflow (they don't fit below ~900px) ---------- */
@media (min-width: 761px) and (max-width: 900px) {
  .mainnav { position: fixed; inset: 62px 0 auto 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 14px 20px 20px; border-bottom: 2px solid var(--line); display: none; }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 12px; }
  .nav-burger { display: inline-flex; margin-left: auto; border: 2px solid var(--line); background: var(--card); border-radius: var(--r); width: 44px; height: 42px; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem; }
  .lang-select { margin-left: 10px; }
}

@media (max-width: 760px) {
  .mainnav { position: fixed; inset: 62px 0 auto 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 14px 20px 20px; border-bottom: 2px solid var(--line); display: none; }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 12px; }
  .nav-burger { display: inline-flex; margin-left: auto; border: 2px solid var(--line); background: var(--card); border-radius: var(--r); width: 44px; height: 42px; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem; }
  .lang-select { margin-left: 10px; }
  .nav-wrap { flex-wrap: wrap; }
  .gauges { grid-template-columns: 1fr; }
  .fit-grid { grid-template-columns: 1fr; }
  .care-grid { grid-template-columns: 1fr; }
  .f-2col { grid-template-columns: 1fr; }
  .f-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .rung { grid-template-columns: 1fr; }
  /* .rung .num restyled as a mono badge — see "MOBILE POLISH" at EOF */
  .pt-row { grid-template-columns: 1fr; }
  .pt-row > div + div { border-left: 0; border-top: 1.5px solid var(--paper-3); }
  .sb-row { grid-template-columns: 110px 1fr 38px; }

  /* grid children must be allowed to shrink below content width
     (report evidence blocks are min-content monsters otherwise) */
  .rung, .finding, .f-body, .f-2col, .demo-finding, .price-table, .pt-row,
  .req-grid > *, .anatomy-grid > *, .stat-tiles, .admin-grid2,
  .impact-matrix, .raw-evidence, .side-card, .form-card, .score-hero,
  .score-breakdown, .tile, .panel, .method-grid, .rep-toc, .honest-note,
  .cta-band .container, .hero-grid, .ladder, .fit-col, .care-card,
  .care-grid, .fit-grid, .anatomy-list, .gauges, .gauge-card, .faq {
    min-width: 0;
  }

  /* evidence blocks wrap safely instead of forcing horizontal scroll */
  .evidence, .df-evidence { white-space: pre-wrap; word-break: break-word; overflow-x: hidden; }
  .raw-evidence .kv { grid-template-columns: 1fr; gap: 2px; }
  .raw-evidence .kv dt { margin-top: 8px; }

  /* report tables become stacked cards */
  .impact-matrix { overflow-x: visible; }
  .impact-matrix td a { display: inline-block; padding: 4px 0; }
  .impact-matrix table, .impact-matrix thead, .impact-matrix tbody,
  .impact-matrix tr, .impact-matrix th, .impact-matrix td {
    display: block; width: 100%;
  }
  .impact-matrix thead { display: none; }
  .impact-matrix tr {
    border: 2px solid var(--line); border-radius: var(--r);
    margin-bottom: 12px; padding: 6px 12px; background: var(--card);
  }
  .impact-matrix td { border: 0 !important; padding: 5px 0; background: transparent !important; }
  .impact-matrix td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono); font-size: 0.66rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
    margin-bottom: 1px;
  }
  .impact-matrix caption { display: block; width: 100%; }
  .impact-matrix td[data-label=""]::before { display: none; }
  .impact-matrix td[colspan] { font-size: 0.82rem; color: var(--ink-3); }

  .method-grid { grid-template-columns: 1fr; }
  .method-card { min-width: 0; }

  /* evidence mockup annotations flow inline instead of floating */
  .ev-ann { position: static; display: inline-block; margin: 10px 10px 0 0; max-width: none; }
  .ev-save { position: static; display: inline-block; margin-bottom: 10px; }
  .file-row { grid-template-columns: 1fr; }
  .sw-row { grid-template-columns: 1fr; gap: 4px; }

  /* print button: full-width, static — never floats over content on mobile */
  .print-btn {
    position: static; display: flex; width: 100%; margin: 22px 0 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- print (sample report → PDF) ---------- */
@media print {
  /* dark theme must not leak into paper: restore light tokens */
  html[data-theme="dark"] {
    --paper: #F2F5F1; --paper-2: #E7ECE6; --paper-3: #DDE5DC;
    --card: #FFFFFF; --field-bg: #FFFFFF;
    --ink: #12261E; --ink-2: #335046; --ink-3: #52675E;
    --line: #12261E; --shadow-ink: #12261E;
    --green: #0B7243; --green-bright: #17B877; --green-ink: #0A3B26; --green-bg: #D9F0E4;
    --amber: #C77E06; --amber-bg: #FBEED3;
    --red: #A72918; --red-bg: #F9E1DC;
    --blue: #155A94; --blue-bg: #DDEBF7;
  }
  html[data-theme="dark"] .chip.warn { color: #8A5A00; }
  html[data-theme="dark"] .dotm.md { color: #8A5A00; }
  html[data-theme="dark"] .ev-fic { color: #8A5A00; border-color: #C77E06; }
  .consent, .site-head, .ticker, .print-btn, footer, .rep-cta, .skip-link { display: none !important; }
  .theme-toggle { display: none !important; }
  body { background: #fff; }
  .finding, .panel, .rep-toc { break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   DARK THEME — html[data-theme="dark"]
   Same "workshop diagnostic" identity, inverted: deep green-charcoal
   paper, bright ink, luminous severity colors. Every token pair was
   contrast-checked (WCAG): body text >= 7:1, secondary/meta >= 4.6:1,
   colored text on tinted chips >= 5.5:1.
   Persistence + no-flash: a tiny inline <head> script sets the
   data-theme attribute from localStorage("mb-theme") before first
   paint; js/app.js owns the toggle.
   ============================================================ */
html[data-theme="dark"] {
  --paper: #0F1613;
  --paper-2: #16211B;
  --paper-3: #24342C;
  --card: #18241F;
  --field-bg: #0D1411;
  --ink: #E9F1EB;      /* on paper 14.4:1 */
  --ink-2: #B9CCC0;    /* on paper 9.3:1 */
  --ink-3: #93AB9D;    /* on card 5.6:1 (meta/small) */
  --line: #31453A;
  --shadow-ink: #040906;
  --green: #36C285;        /* links/labels on dark >= 6.6:1 */
  --green-bright: #2ED48C;
  --green-ink: #8CE6BC;    /* text on green-bg 9.1:1 */
  --green-bg: #153423;
  --amber: #C77E06;        /* fills keep light-mode hue */
  --amber-bg: #302510;
  --red: #EC7465;          /* on red-bg 5.7:1 */
  --red-bg: #391D16;
  --blue: #74B7EA;         /* on blue-bg 6.7:1 */
  --blue-bg: #152C40;
  color-scheme: dark; /* native inputs, scrollbars, select popups */
}
html[data-theme="dark"] body {
  background-image:
    radial-gradient(1100px 500px at 85% -5%, rgba(46, 212, 140, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(116, 183, 234, 0.05), transparent 55%),
    linear-gradient(rgba(233, 241, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 241, 235, 0.03) 1px, transparent 1px);
}
html[data-theme="dark"] ::selection { background: #17B877; color: #04241A; }
html[data-theme="dark"] a:hover { color: var(--green-bright); }
html[data-theme="dark"] .skip-link { background: #E9F1EB; color: #0F1613; }

/* buttons: default card button inverts cleanly via tokens;
   solid green needs dark text on the brighter dark-mode green,
   hover deepens instead of lightening */
html[data-theme="dark"] .btn-solid { background: #19B878; color: #04241A; }
html[data-theme="dark"] .btn-solid:hover { background: #0A6E42; color: #FFFFFF; } /* white 5.9:1 */
html[data-theme="dark"] .btn-amber { background: #E9B949; color: #2A1703; } /* dark text ~8:1 */

/* amber-as-TEXT must brighten (fills keep via --amber) */
html[data-theme="dark"] .chip.warn { color: #E9B949; }
html[data-theme="dark"] .dotm.md { color: #E9B949; }
html[data-theme="dark"] .ticker-track .k { color: #E9B949; }
html[data-theme="dark"] .ev-fic { color: #E9B949; border-color: #E9B949; }
html[data-theme="dark"] .hero h1.display .hl { text-decoration-color: #E9B949; }
/* care-card ribbon: dark text on amber keeps contrast in dark mode */
html[data-theme="dark"] .care-card .ribbon { background: #E9B949; color: #2A1703; }

/* hero highlight underline stays visible */
html[data-theme="dark"] .mainnav a[aria-current="page"] { background: #E9F1EB; color: #0F1613; }

/* service-ladder ghost numbers: outlined via text-stroke. Light mode =
   light fill + dark stroke; dark mode mirrors that (visible fill +
   dark stroke) so the numerals stay legible, not just outlined. */
html[data-theme="dark"] .rung .num { color: #93AB9D; -webkit-text-stroke: 2px #10201A; }

/* admin pill.wait keeps its darkened light-mode amber in dark: override */
html[data-theme="dark"] .pill.wait { color: #E9B949; }

/* admin-only purple pill (hardcoded in light) */
html[data-theme="dark"] .pill.rev { background: #2C2138; color: #CDA9EC; }

/* forms */
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder { color: var(--ink-3); opacity: 1; }

/* brand mark: dark tile would vanish on the dark header */
html[data-theme="dark"] .brand .mark rect { fill: #24342C; }

/* evidence mockups are fictional bright-page screenshots: they stay
   light in dark mode (a screenshot does not follow the app theme),
   so pin their inner text to light-theme values */
html[data-theme="dark"] .ev-mock .ev-body { background: #FBFDF9; }
html[data-theme="dark"] .mock-field span { color: #335046; }
html[data-theme="dark"] .mock-field b { background: #FFFFFF; color: #5B7269; }
html[data-theme="dark"] .mock-submit { background: #0B7243; color: #fff; }
html[data-theme="dark"] .file-card { background: #FFFFFF; }
html[data-theme="dark"] .file-card .fn { color: #12261E; }
html[data-theme="dark"] .file-card .fs { color: #5B7269; }
html[data-theme="dark"] .g-card { background: #FFFFFF; }
html[data-theme="dark"] .g-card .g-t { color: #12261E; }
html[data-theme="dark"] .g-card .g-l { color: #335046; }
html[data-theme="dark"] .g-card .g-l.bad { color: #C63D2C; }
html[data-theme="dark"] .g-card .g-l.good { color: #0A3B26; }

/* ---------- theme toggle button ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 38px; flex: none; cursor: pointer;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-2);
  transition: background .15s ease, color .15s ease;
}
.theme-toggle:hover { background: var(--paper-3); color: var(--green-ink); }
.theme-toggle:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

/* ============================================================
   MOBILE POLISH (<=760px)
   ============================================================ */
@media (max-width: 760px) {
  /* service-ladder numbers: the outlined display-font "ghost numerals"
     render garbled at phone sizes (2px stroke overwhelms the glyph).
     On mobile they become clean mono badges: solid, legible, on-brand. */
  .rung .num {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    -webkit-text-stroke: 0;
    color: var(--green);
    background: var(--green-bg);
    border: 2px solid var(--line);
    border-radius: var(--r);
    padding: 3px 10px;
    width: fit-content;
    margin-bottom: 6px;
  }
  html[data-theme="dark"] .rung .num {
    -webkit-text-stroke: 0;
    color: var(--green);
    background: var(--green-bg);
  }

  /* report findings: implicit grid tracks were sized by a nowrap child
     (ev-fic label) and pushed content 80px past the viewport edge,
     clipped by .finding{overflow:hidden}. Cap every track with
     minmax(0,1fr) so nothing can force the track wider than the card. */
  .finding .f-body { grid-template-columns: minmax(0, 1fr); }
  .f-2col { grid-template-columns: minmax(0, 1fr); }
  .ev-mock { min-width: 0; }
  .ev-mock figcaption { min-width: 0; }
  .ev-fic { white-space: normal; text-align: center; }
  .ev-mock .ev-url { min-width: 0; }

  /* tap targets: bring interactive elements up to the 44px touch minimum */
  .theme-toggle { width: 44px; height: 44px; }
  .lang-select { padding: 10px 12px; min-height: 44px; }
  .nav-burger { height: 44px; }
  .btn-sm { padding: 12px 16px; }
  .mainnav a { padding: 14px 12px; }

  /* admin tile labels at 11.5px are too small for phones */
  .tile .t-lab { font-size: 0.78rem; }

  /* data tables keep their horizontal scroll but feel native on touch */
  .jobs-table { font-size: 0.82rem; }
  .jobs-table th, .jobs-table td { padding: 9px 12px; }
}
