/* ============================================================
   Ai RevOps Labs
   Design direction: Ledger and Signal
   Editorial field manual, Swiss information design,
   operations dashboard.
   ============================================================ */

:root {
  /* Mandated palette, spec section 4 */
  --paper:        #F3F0E8;   /* warm paper background */
  --surface:      #FFFDF8;   /* light paper surface   */
  --graphite:     #1C2230;   /* deep graphite         */
  --paper-2:      #E9E5DA;   /* secondary paper       */
  --cobalt:       #2855D9;   /* signal cobalt         */
  --cobalt-dark:  #17378E;   /* dark cobalt           */
  --rust:         #C65C38;   /* risk rust             */
  --sage:         #3C8066;   /* healthy sage          */
  --rule:         #D7D3C8;   /* rule gray             */
  --muted:        #6D7280;   /* muted text            */

  /* Text safe derivatives. The mandated rust, sage and muted
     values reach only 3.7, 4.1 and 4.2 to 1 on warm paper, below
     the 4.5 to 1 that spec section 11 requires for body text.
     The mandated values are kept for dots, rules, bars and fills,
     where the 3 to 1 non text bar applies and all three pass. */
  --rust-text:    #A44C2E;
  --sage-text:    #35715A;
  --muted-text:   #626673;

  /* On graphite surfaces. Signal cobalt on deep graphite is
     2.57 to 1, below even the non text floor, so the rail and the
     dark panel use lifted variants for anything interactive. */
  --cobalt-on-dark: #6484E3;
  --rust-on-dark:   #CC6F4F;
  --sage-on-dark:   #5B947E;
  --control-edge:   #8E8879;   /* control boundaries, 3.1 to 1 on paper   */
  --field-line:     #737B8E;   /* field boundaries on graphite, 3.8 to 1  */
  --muted-on-dark:  #99A0AE;
  --ink-on-dark:    #F3F0E8;
  --body-on-dark:   #C6CBD6;

  --graphite-2:   #262D3D;
  --graphite-3:   #333B4D;

  /* Type */
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:  'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* Rhythm */
  --rail-w:     268px;
  --gutter:     clamp(22px, 4.4vw, 76px);
  --section-y:  clamp(64px, 8.5vw, 128px);
  --measure:    64ch;

  /* Motion, spec section 9: 160 to 280 ms */
  --t-fast:  160ms;
  --t-base:  200ms;
  --t-slow:  240ms;
  --t-panel: 280ms;
  --ease: cubic-bezier(0.2, 0.6, 0.25, 1);

  --shadow-lift: 0 1px 2px rgba(28, 34, 48, 0.07), 0 6px 18px rgba(28, 34, 48, 0.06);
  --shadow-flat: 0 1px 0 rgba(28, 34, 48, 0.05);
}

/* ============================================================
   Reset
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  /* Paper texture, spec section 4 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
svg { display: block; }

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--cobalt-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }

button, input { font: inherit; color: inherit; }

/* Focus, spec sections 9 and 11 */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 1px;
}
.rail :focus-visible,
.drawer :focus-visible,
.topbar :focus-visible,
.panel :focus-visible,
.notes :focus-visible { outline-color: var(--cobalt-on-dark); }

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 200;
  background: var(--graphite);
  color: var(--ink-on-dark);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip:focus-visible { top: 8px; }

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

/* ============================================================
   Type primitives
   ============================================================ */

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-text);
  display: block;
}

.serif-xl, .serif-l, .serif-m {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.06;
  text-wrap: balance;
}
.serif-xl { font-size: clamp(40px, 6.4vw, 76px); }
.serif-l  { font-size: clamp(30px, 4.3vw, 50px); line-height: 1.1; }
.serif-m  { font-size: clamp(21px, 2.5vw, 28px); line-height: 1.2; }

.lede {
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.55;
  color: var(--muted-text);
  max-width: var(--measure);
}

/* ============================================================
   Shell
   ============================================================ */

.wrap { margin-left: var(--rail-w); min-width: 0; }

.bleed { padding-inline: var(--gutter); }

section[id] { scroll-margin-top: 24px; }

.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  gap: 14px;
  max-width: var(--measure);
  margin-bottom: clamp(32px, 4vw, 52px);
}

/* ============================================================
   Brand mark
   Two offset cobalt brackets and a signal path.
   Deliberately abstract: it reads as a signal gate rather than a
   letterform, because spec section 7 removes the previous brand
   and a monogram would be its most visible possible residue.
   ============================================================ */

.mark { width: 34px; height: 34px; flex: none; }
.mark .br { stroke: var(--cobalt); stroke-width: 5.5; fill: none; stroke-linecap: square; }
.mark .br-2 { stroke: var(--cobalt-dark); }
.mark .path { stroke: var(--rust); stroke-width: 4; fill: none; stroke-linecap: round; }
.mark .node { fill: var(--rust); }

.rail .mark .br, .notes .mark .br, .topbar .mark .br, .drawer .mark .br { stroke: var(--cobalt-on-dark); }
.rail .mark .br-2, .notes .mark .br-2, .topbar .mark .br-2, .drawer .mark .br-2 { stroke: #3F63C9; }
.rail .mark .path, .notes .mark .path, .topbar .mark .path, .drawer .mark .path { stroke: var(--rust-on-dark); }
.rail .mark .node, .notes .mark .node, .topbar .mark .node, .drawer .mark .node { fill: var(--rust-on-dark); }

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--graphite);
}
.rail .wordmark, .notes .wordmark, .topbar .wordmark, .drawer .wordmark { color: var(--ink-on-dark); }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}

/* ============================================================
   Left rail, spec section 5
   ============================================================ */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  background: var(--graphite);
  color: var(--ink-on-dark);
  display: flex;
  flex-direction: column;
  padding: 30px 26px 26px;
  z-index: 60;
  border-right: 1px solid var(--graphite-3);
  overflow-y: auto;
}

.rail__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--graphite-3);
}

.rail__nav { margin-top: 26px; display: grid; gap: 1px; }

.rail__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 10px 9px 12px;
  color: var(--ink-on-dark);
  text-decoration: none;
  font-size: 15px;
  border-left: 2px solid transparent;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.rail__link .idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-on-dark);
  transition: color var(--t-fast) var(--ease);
}
.rail__link:hover { background: var(--graphite-2); }
.rail__link:hover .idx { color: var(--cobalt-on-dark); }
.rail__link[aria-current="true"] {
  border-left-color: var(--cobalt-on-dark);
  background: var(--graphite-2);
  font-weight: 500;
}
.rail__link[aria-current="true"] .idx { color: var(--cobalt-on-dark); }

.rail__note {
  margin-top: auto;
  padding-top: 26px;
  border-top: 1px solid var(--graphite-3);
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.42;
  color: var(--ink-on-dark);
  font-style: italic;
}

.rail__status {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rail__status::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--cobalt-on-dark);
  flex: none;
}

/* ============================================================
   Mobile top bar and drawer, spec sections 5 and 10
   ============================================================ */

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 70;
  background: var(--graphite);
  color: var(--ink-on-dark);
  padding: 12px var(--gutter);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.menu-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 1px solid var(--graphite-3);
  color: var(--ink-on-dark);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 13px;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.menu-btn:hover { background: var(--graphite-2); }
.menu-btn:active { transform: scale(0.97); }
.menu-btn .bars { width: 15px; height: 11px; position: relative; }
.menu-btn .bars i {
  position: absolute; left: 0; right: 0; height: 1.5px;
  background: currentColor;
  transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.menu-btn .bars i:nth-child(1) { top: 0; }
.menu-btn .bars i:nth-child(2) { top: 4.75px; }
.menu-btn .bars i:nth-child(3) { top: 9.5px; }
.menu-btn[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(4.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-4.75px) rotate(-45deg); }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(28, 34, 48, 0.55);
  z-index: 80;
  opacity: 0;
  transition: opacity var(--t-panel) var(--ease);
}
.scrim[hidden] { display: none; }
.scrim.is-open { opacity: 1; }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 86vw);
  background: var(--graphite);
  color: var(--ink-on-dark);
  z-index: 90;
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--t-panel) var(--ease);
  overflow-y: auto;
}
.drawer[hidden] { display: none; }
.drawer.is-open { transform: translateX(0); }

.drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--graphite-3);
}

.drawer__close {
  background: transparent;
  border: 1px solid var(--graphite-3);
  color: var(--ink-on-dark);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.drawer__close:hover { background: var(--graphite-2); }
.drawer__close:active { transform: scale(0.94); }
.drawer__close svg { width: 15px; height: 15px; }
.drawer__close svg path { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.drawer__nav { margin-top: 18px; display: grid; gap: 2px; }
.drawer__nav a {
  color: var(--ink-on-dark);
  text-decoration: none;
  font-size: 17px;
  padding: 13px 12px;
  border-left: 2px solid transparent;
  display: flex;
  align-items: baseline;
  gap: 12px;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.drawer__nav a .idx { font-family: var(--mono); font-size: 11px; color: var(--muted-on-dark); }
.drawer__nav a:hover { background: var(--graphite-2); }
.drawer__nav a[aria-current="true"] { border-left-color: var(--cobalt-on-dark); background: var(--graphite-2); }

.drawer__note {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--graphite-3);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.42;
}
.drawer__status {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

/* ============================================================
   Buttons, spec section 9
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  padding: 15px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: scale(0.975); box-shadow: none; }

.btn--primary { background: var(--cobalt); color: var(--surface); }
.btn--primary:hover { background: var(--cobalt-dark); }

.btn--ghost {
  background: transparent;
  color: var(--graphite);
  border-color: var(--graphite);
}
.btn--ghost:hover { background: var(--graphite); color: var(--surface); }

.btn--quiet {
  background: transparent;
  border-color: var(--rule);
  color: var(--muted-text);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 15px;
}
.btn--quiet:hover { border-color: var(--graphite); color: var(--graphite); }

.btn--onDark { background: var(--cobalt-on-dark); color: var(--graphite); font-weight: 600; }
.btn--onDark:hover { background: #8098EA; }

.btn .arrow { width: 15px; height: 15px; flex: none; transition: transform var(--t-base) var(--ease); }
.btn .arrow path { stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Section 1, Overview
   ============================================================ */

.hero {
  padding-block: clamp(52px, 7vw, 104px) var(--section-y);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.82fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}

.hero__copy { display: grid; gap: 22px; max-width: 34em; }
.hero h1 { margin-top: 4px; }
.hero h1 .accent { color: var(--cobalt-dark); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.hero__trust li {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero__trust li::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--cobalt);
  flex: none;
}

/* Signal board */

.board {
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-lift);
  padding: 20px;
  display: grid;
  gap: 16px;
  position: relative;
}
.board::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--rule);
  pointer-events: none;
  opacity: 0.55;
}

.board__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  position: relative;
}
.board__title,
.board__id {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-text);
}

/* The eyebrow now sits inside the H2 so the heading text carries the
   term spec section 12 names, without changing how it looks. */
.section-head h2 .eyebrow {
  margin-bottom: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.board__brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mark--sm { width: 20px; height: 20px; }
.mark--sm .br { stroke-width: 6.5; }
.mark--sm .path { stroke-width: 5; }

.board__note {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-text);
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  position: relative;
}

.board__map { position: relative; }
.board__map svg { width: 100%; height: auto; }

.board__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; }

.datacard {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 13px 14px;
  display: grid;
  gap: 3px;
  border-top-width: 3px;
}
.datacard--ok   { border-top-color: var(--cobalt); }
.datacard--risk { border-top-color: var(--rust); }

.datacard .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-text);
}
.datacard .v {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.datacard--ok .v   { color: var(--cobalt-dark); }
.datacard--risk .v { color: var(--rust-text); }
.datacard .s { font-size: 12.5px; color: var(--muted-text); line-height: 1.35; }

/* ============================================================
   Section 2, The shift
   ============================================================ */

.shift__strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--rule);
  background: var(--surface);
  margin-bottom: 30px;
}
.shift__strip li {
  padding: 15px 20px;
  border-left: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite);
}
.shift__strip li:first-child { border-left: none; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot--cobalt { background: var(--cobalt); }
.dot--sage   { background: var(--sage); }
.dot--rust   { background: var(--rust); }

.shift__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.shift__item { display: grid; gap: 9px; align-content: start; padding-top: 20px; border-top: 2px solid var(--rule); }
.shift__item--cobalt { border-top-color: var(--cobalt); }
.shift__item--sage   { border-top-color: var(--sage); }
.shift__item--rust   { border-top-color: var(--rust); }
.shift__item h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
.shift__item p { font-size: 15.5px; line-height: 1.5; color: var(--muted-text); }

/* ============================================================
   Section 3, Revenue Architecture Health Score
   ============================================================ */

.score {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: clamp(26px, 3.4vw, 52px);
  align-items: start;
}

.panel {
  position: sticky;
  top: 24px;
  background: var(--graphite);
  color: var(--ink-on-dark);
  padding: 26px 24px 24px;
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-lift);
}

.panel__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

.panel__score {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 54px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-variant-numeric: tabular-nums;
}
.panel__score .of {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted-on-dark);
}

.meter {
  height: 10px;
  background: var(--graphite-3);
  position: relative;
  overflow: hidden;
}
.meter__fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--muted-on-dark);
  transition: transform var(--t-slow) var(--ease), background-color var(--t-slow) var(--ease);
}
.meter__fill[data-band="blind"] { background: var(--rust-on-dark); }
.meter__fill[data-band="risk"]  { background: var(--rust-on-dark); opacity: 0.72; }
.meter__fill[data-band="op"]    { background: var(--sage-on-dark); }

.panel__state {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding-top: 16px;
  border-top: 1px solid var(--graphite-3);
}
.panel__state .dot { width: 10px; height: 10px; background: var(--muted-on-dark); }
.panel__state[data-band="blind"] .dot { background: var(--rust-on-dark); }
.panel__state[data-band="risk"]  .dot { background: var(--rust-on-dark); opacity: 0.72; }
.panel__state[data-band="op"]    .dot { background: var(--sage-on-dark); }

.panel__answered { font-family: var(--mono); font-size: 12px; color: var(--muted-on-dark); font-variant-numeric: tabular-nums; }

.panel .btn--quiet { border-color: var(--graphite-3); color: var(--muted-on-dark); justify-self: start; }
.panel .btn--quiet:hover { border-color: var(--cobalt-on-dark); color: var(--ink-on-dark); }

.qlist { display: grid; }

.q {
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 14px;
}
.q:first-child { border-top: none; padding-top: 0; }

.q__head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline; }
.q__n { font-family: var(--mono); font-size: 12px; color: var(--muted-text); }
.q__t { font-family: var(--serif); font-size: clamp(18px, 1.9vw, 21px); font-weight: 600; line-height: 1.28; letter-spacing: -0.012em; text-wrap: balance; }

.q__answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.ans {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--control-edge);
  border-radius: 2px;
  padding: 14px 15px;
  cursor: pointer;
  text-align: left;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--graphite);
  transition: border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.ans:hover { border-color: var(--muted); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.ans:active { transform: scale(0.985); }

.ans__tick {
  width: 15px; height: 15px;
  border: 1.5px solid var(--control-edge);
  border-radius: 50%;
  flex: none;
  margin-top: 2px;
  display: grid;
  place-items: center;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.ans__tick::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surface);
  transform: scale(0);
  transition: transform var(--t-fast) var(--ease);
}

.ans[aria-checked="true"] {
  border-color: var(--cobalt);
  box-shadow: inset 0 0 0 1px var(--cobalt);
}
.ans[aria-checked="true"] .ans__tick { border-color: var(--cobalt); background: var(--cobalt); }
.ans[aria-checked="true"] .ans__tick::after { transform: scale(1); }

.ans__pts {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted-text);
  padding-left: 8px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.ans[aria-checked="true"] .ans__pts { color: var(--cobalt-dark); font-weight: 500; }

.action-map {
  margin-top: 34px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--cobalt);
  padding: clamp(22px, 3vw, 32px);
  display: grid;
  gap: 12px;
  justify-items: start;
}
.action-map h3 { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 25px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; text-wrap: balance; }
.action-map p { color: var(--muted-text); max-width: 52ch; }

/* ============================================================
   Section 4, The 60 day blueprint
   ============================================================ */

.bp { display: grid; gap: clamp(26px, 3.2vw, 44px); }

.bp__road { background: var(--surface); border: 1px solid var(--rule); padding: clamp(18px, 2.4vw, 28px); box-shadow: var(--shadow-flat); }
.bp__road svg { width: 100%; height: auto; }

.bp__body {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 44px);
  align-items: start;
}

.tabs { display: grid; border-top: 1px solid var(--rule); }

.tab {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  border-left: 2px solid transparent;
  padding: 17px 14px 17px 13px;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              padding-left var(--t-base) var(--ease);
}
.tab:hover { background: var(--surface); }
.tab:active { transform: scale(0.99); }
.tab__n { font-family: var(--mono); font-size: 11.5px; color: var(--muted-text); }
.tab__t { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.tab__c { width: 8px; height: 8px; border-radius: 50%; background: var(--control-edge); transition: background-color var(--t-fast) var(--ease); }

.tab[aria-selected="true"] {
  background: var(--surface);
  border-left-color: var(--cobalt);
  padding-left: 19px;
}
.tab[aria-selected="true"] .tab__n { color: var(--cobalt-dark); }
.tab[aria-selected="true"] .tab__c { background: var(--cobalt); }

.tabpanel { display: grid; gap: 16px; align-content: start; }
.tabpanel[hidden] { display: none; }

.tabpanel .eyebrow { color: var(--cobalt-dark); }
.tabpanel h3 { font-family: var(--serif); font-size: clamp(23px, 2.7vw, 31px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
.tabpanel p { font-size: clamp(16px, 1.4vw, 17.5px); line-height: 1.58; color: var(--muted-text); max-width: var(--measure); }

.output {
  display: grid;
  gap: 5px;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--sage);
  background: var(--surface);
  padding: 15px 17px;
  justify-self: start;
  max-width: 100%;
}
.output .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted-text); }
.output .v { font-size: 16px; font-weight: 600; color: var(--sage-text); }

/* ============================================================
   Section 5, Build checklist
   ============================================================ */

.checks { display: grid; border-top: 1px solid var(--rule); }

.check {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  border-left: 2px solid transparent;
  padding: 22px 16px 22px 14px;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.check:hover { background: var(--surface); }
.check:active { transform: scale(0.995); }
.check__body { display: block; min-width: 0; }

.check__box {
  width: 21px; height: 21px;
  border: 1.5px solid var(--control-edge);
  border-radius: 2px;
  flex: none;
  margin-top: 3px;
  display: grid;
  place-items: center;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.check__box svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.6); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.check__box svg path { stroke: var(--surface); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; fill: none; }

.check__t { display: block; font-family: var(--serif); font-size: clamp(18px, 1.9vw, 21px); font-weight: 600; letter-spacing: -0.012em; line-height: 1.25; margin-bottom: 6px; text-wrap: balance; }
.check__d { display: block; font-size: 15.5px; line-height: 1.5; color: var(--muted-text); max-width: 58ch; }

.check__flag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--sage-text);
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  flex: none;
  margin-top: 5px;
}
.check__flag::before { content: ""; width: 8px; height: 8px; background: var(--sage); flex: none; }

.check[aria-pressed="true"] { border-left-color: var(--sage); background: var(--surface); }
.check[aria-pressed="true"] .check__box { background: var(--sage); border-color: var(--sage); }
.check[aria-pressed="true"] .check__box svg { opacity: 1; transform: scale(1); }
.check[aria-pressed="true"] .check__flag { opacity: 1; visibility: visible; transform: translateY(0); }

.checks__count { margin-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--muted-text); }

/* ============================================================
   Section 6, Field notes
   ============================================================ */

.notes {
  background: var(--graphite);
  color: var(--ink-on-dark);
  padding: clamp(34px, 5vw, 68px) var(--gutter);
  margin-top: var(--section-y);
}
.notes__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.notes .eyebrow { color: var(--cobalt-on-dark); }
.notes h2 { margin: 12px 0 14px; }
.notes p { color: var(--body-on-dark); max-width: 46ch; }

.form { display: grid; gap: 12px; }
.form__row { display: flex; gap: 10px; flex-wrap: wrap; }
.form label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

.form input {
  flex: 1 1 220px;
  min-width: 0;
  background: var(--graphite-2);
  border: 1px solid var(--field-line);
  border-radius: 2px;
  color: var(--ink-on-dark);
  padding: 15px 16px;
  font-size: 15px;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.form input::placeholder { color: #8E96A8; }
.form input:hover { border-color: #8A93A6; }
.form input:focus-visible { border-color: var(--cobalt-on-dark); }

.form__help { font-size: 13.5px; color: var(--muted-on-dark); }

.form__ok {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-on-dark);
  border-left: 2px solid var(--sage-on-dark);
  padding: 4px 0 4px 12px;
}
.form__ok[hidden] { display: none; }
.form__ok .dot { background: var(--sage-on-dark); }

.form__err {
  font-size: 13.5px;
  color: var(--rust-on-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form__err[hidden] { display: none; }
.form__err .dot { background: var(--rust-on-dark); }

/* ============================================================
   Footer, spec section 8
   ============================================================ */

.foot {
  padding: 30px var(--gutter) 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 30px;
}
.foot__copy { display: grid; gap: 3px; text-align: right; }
.foot__copy p:first-child { font-size: 14.5px; color: var(--muted-text); }
.foot__copy p:last-child { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.07em; color: var(--muted-text); }

/* ============================================================
   Reveal, spec section 9.
   Content is readable at rest; only the transform animates, and
   it is switched off under reduced motion.
   ============================================================ */

.reveal { transform: translateY(14px); transition: transform var(--t-panel) var(--ease); }
.reveal.is-in { transform: none; }

/* ============================================================
   Responsive, spec section 10
   ============================================================ */

@media (max-width: 1180px) {
  :root { --rail-w: 216px; }
  .rail { padding: 24px 20px 22px; }
  .rail__note { font-size: 13.5px; }
  .hero { grid-template-columns: 1fr; }
  .hero__copy { max-width: 40em; }
  .score { grid-template-columns: 1fr; }
  .panel { position: static; }
}

@media (max-width: 900px) {
  .bp__body { grid-template-columns: 1fr; }
  .notes__inner { grid-template-columns: 1fr; }
  .shift__grid { grid-template-columns: 1fr; gap: 22px; }
  .shift__strip { grid-template-columns: 1fr; }
  .shift__strip li { border-left: none; border-top: 1px solid var(--rule); }
  .shift__strip li:first-child { border-top: none; }
}

@media (max-width: 780px) {
  /* Both figures use a wide viewBox with absolute label sizes, so let
     them keep their intrinsic width and scroll rather than shrink the
     type below a readable floor. */
  .board__map, .bp__road { overflow-x: auto; }
  .board__map svg { min-width: 380px; }
  .bp__road svg { min-width: 640px; }

  :root { --rail-w: 0px; }
  .rail { display: none; }
  .topbar { display: flex; }
  .wrap { margin-left: 0; }
  section[id] { scroll-margin-top: 76px; }
  .q__answers { grid-template-columns: 1fr; }
  .board__cards { grid-template-columns: 1fr; }
  .foot { justify-content: flex-start; }
  .foot__copy { text-align: left; }
}

@media (max-width: 520px) {
  body { font-size: 15.5px; }
  .btn { width: 100%; justify-content: center; }
  .btn--quiet { width: auto; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .check { grid-template-columns: auto 1fr; }
  .check__flag { grid-column: 2; margin-top: 10px; }
  .panel__score { font-size: 46px; }
}

/* ============================================================
   Reduced motion, spec section 9
   ============================================================ */

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