/* ------------------------------------------------------------------
   GLOBAL: ensure [hidden] always wins. Many rules in this file set
   display: flex/grid/etc., which beat the UA's `[hidden] { display:none }`.
   ------------------------------------------------------------------ */
[hidden] { display: none !important; }

/* ------------------------------------------------------------------
   THEME TOKENS
   - planapus  → original dark/neon (default if no data-theme attr)
   - paper-light → Paper Engineering, cream rapeseed ground
   - paper-dark  → Paper Engineering, warm near-black ground
   ------------------------------------------------------------------ */
:root,
:root[data-theme="planapus"] {
  --bg-0: #0a0e1a;
  --bg-1: #111827;
  --bg-2: #1a2236;
  --bg-page-grad: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(20,32,66,0.5) 0%, transparent 60%), #07091a;
  --line: #2a3454;
  --line-soft: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --muted: #8896b3;
  --text: #ebeefa;
  --text-dim: #c6cce0;
  --human: #f59f4a;
  --human-soft: #f59f4a26;
  --ai: #6dd6ff;
  --ai-soft: #6dd6ff26;
  --brand: #ff5d8f;
  --brand-2: #ffa17a;
  --brand-soft: rgba(255,93,143,0.16);
  --good: #4ade80;
  --bad: #f97070;
  --shadow: 0 10px 40px rgba(0,0,0,0.5);

  /* Structural tokens */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --topbar-h: 70px;

  /* Gradients (collapse to flat in paper themes) */
  --grad-brand: linear-gradient(135deg, var(--brand), #ff8e6a);
  --grad-wins: linear-gradient(135deg, var(--brand) 0%, #ffa17a 60%, #f5d27a 100%);
  --grad-logo: linear-gradient(90deg, var(--brand), #ffa17a);

  /* Effects */
  --shadow-button: 0 6px 24px rgba(255, 93, 143, 0.32);
  --shadow-button-hover: 0 8px 30px rgba(255, 93, 143, 0.42);
  --shadow-card: var(--shadow);

  --font-body: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-display: "Iowan Old Style", "Georgia", "Cambria", "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

:root[data-theme="paper-light"] {
  /* Grounds — warm rapeseed cream */
  --bg-0: #F7F1E0;
  --bg-1: #FDF8E6;
  --bg-2: #EBE2C8;
  --bg-page-grad: #F7F1E0;
  --line: rgba(18,17,14, 0.16);
  --line-soft: rgba(18,17,14, 0.09);
  --line-strong: rgba(18,17,14, 0.16);
  /* Ink — warm-shifted, not neutral gray */
  --text: #12110E;
  --text-dim: #49473F;
  --muted: #7B7769;
  /* Lane palette: clay vs cobalt */
  --human: #C96E4E;          /* clay (Whitney warmth) */
  --human-soft: rgba(201,110,78, 0.16);
  --ai: #1F3BB3;             /* cobalt — the accent / KG */
  --ai-soft: rgba(31,59,179, 0.12);
  /* Brand accent for emphasis numbers */
  --brand: #E0452A;          /* vermillion (Albers red) */
  --brand-2: #C96E4E;        /* clay */
  --brand-soft: rgba(224,69,42, 0.12);
  --good: #2E6B3A;           /* cat-taxation green */
  --bad: #C63B2B;            /* employment red */
  --shadow: none;

  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
  --radius-pill: 0;

  --grad-brand: var(--brand);
  --grad-wins: var(--brand);
  --grad-logo: var(--brand);

  --shadow-button: none;
  --shadow-button-hover: none;
  --shadow-card: none;

  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

:root[data-theme="paper-dark"] {
  /* Grounds — warm near-black with cool-purple elevated tones */
  --bg-0: #0E0E0B;
  --bg-1: #17161F;
  --bg-2: #1F1E28;
  --bg-page-grad: #0E0E0B;
  --line: rgba(240,236,224, 0.13);
  --line-soft: rgba(240,236,224, 0.07);
  --line-strong: rgba(240,236,224, 0.13);
  --text: #F0ECE0;
  --text-dim: #9B968B;
  --muted: #615D54;
  --human: #D8864A;          /* clay-bright for dark ground */
  --human-soft: rgba(216,134,74, 0.16);
  --ai: #6B86F0;             /* cobalt brightened */
  --ai-soft: rgba(107,134,240, 0.14);
  --brand: #E0452A;
  --brand-2: #D8864A;
  --brand-soft: rgba(224,69,42, 0.16);
  --good: #4E9659;
  --bad: #E05B47;
  --shadow: none;

  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
  --radius-pill: 0;

  --grad-brand: var(--brand);
  --grad-wins: var(--brand);
  --grad-logo: var(--brand);

  --shadow-button: none;
  --shadow-button-hover: none;
  --shadow-card: none;

  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100vh;
  background: var(--bg-page-grad);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
  /* Damp non-essential transitions and animations for vestibular safety. */
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
em { font-style: italic; }
button { font-family: inherit; cursor: pointer; }
hr.nb-rule {
  border: none;
  height: 1px;
  background: var(--line-soft);
  margin: 56px 0;
}

/* ---- Top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-page-grad);
  background-color: var(--bg-0);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}
.theme-picker {
  display: flex; gap: 4px;
  padding: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
}
.theme-btn {
  background: transparent; color: var(--text-dim); border: none;
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.theme-btn:hover { color: var(--text); }
.theme-btn.active {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.topbar-cta {
  background: var(--brand);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-left: 8px;
  transition: filter 0.15s, transform 0.15s;
}
.topbar-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
[data-theme^="paper"] .topbar-cta {
  background: var(--ai);
  border-radius: 0;
  color: #F0ECE0;
}
[data-theme^="paper"] .topbar-cta:hover { filter: brightness(0.94); transform: none; }
.logo {
  font-weight: 700; font-size: 18px;
  background: linear-gradient(90deg, var(--brand), #ffa17a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.02em;
}
.logo::before { content: "🐙 "; -webkit-text-fill-color: initial; }
.topbar .spacer { flex: 1; }
.topnav {
  display: flex; gap: 4px; margin-left: 12px;
  padding: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
.topnav-btn {
  background: transparent; color: var(--text-dim); border: none;
  padding: 7px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.topnav-btn:hover { color: var(--text); }
.topnav-btn.active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,93,143,0.35);
}

/* ============ NOTEBOOK ============ */
.notebook {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 32px 120px;
}

/* Eyebrow label */
.nb-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 14px;
}

/* (i) tooltip — used for inline assumption explanations */
.tt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(198, 204, 224, 0.45);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  font-style: italic;
  color: rgba(198, 204, 224, 0.75);
  background: transparent;
  cursor: help;
  margin-left: 6px;
  position: relative;
  vertical-align: 1px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
}
.tt:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.tt:hover::after {
  content: attr(data-tt);
  position: absolute;
  top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 20, 38, 0.98);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px; font-weight: 400; font-style: normal;
  color: var(--text);
  white-space: normal;
  width: max-content; max-width: 300px;
  text-align: left; line-height: 1.5;
  z-index: 50; pointer-events: none;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  text-transform: none; letter-spacing: 0;
}
.tt:hover::before {
  content: "";
  position: absolute;
  top: calc(100% + 2px); left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--line);
  z-index: 51;
  pointer-events: none;
}

/* Hero */
.nb-hero {
  margin-bottom: 32px;
}
.nb-hero h1 {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 940px;
  margin-bottom: 28px;
  color: var(--text);
}
.nb-hero h1 em {
  font-style: italic;
  background: linear-gradient(90deg, var(--brand), #ffa17a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nb-lede {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 760px;
  margin: 0 0 28px;
  line-height: 1.7;
}

/* Inline "fill-in-the-blank" intake sentence above the cards */
.nb-intake {
  font-family: var(--font-display);
  font-size: 22px !important;
  line-height: 1.7 !important;
  color: var(--text) !important;
  max-width: 920px;
  margin: 0 0 28px !important;
  font-weight: 400 !important;
}
/* Custom dropdown — replaces native <select> because macOS renders the
   native popup at OS scale, ignoring our font/size CSS. The button + ul menu
   below lets us style the menu items at notebook-prose scale. */
.nb-intake-ctl {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
}
.nb-intake-btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  color: var(--brand);
  border: none;
  border-bottom: 2px solid var(--brand);
  padding: 0 18px 1px 4px;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0;
  position: relative;
  top: -2px;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Caret */
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    right 4px top 60%,
    right 9px top 60%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.nb-intake-btn:focus,
.nb-intake-btn:hover,
.nb-intake-btn-open {
  outline: none;
  background-color: rgba(255,93,143,0.06);
}
.nb-intake-btn-active { font-weight: 700; }

.nb-intake-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 60;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  min-width: 240px;
  max-width: 320px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-1, #14172a);
  border: 1px solid var(--line-strong, rgba(255,255,255,0.16));
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}
.nb-intake-option {
  padding: 7px 14px;
  cursor: pointer;
  color: var(--text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nb-intake-option:hover {
  background: rgba(255,93,143,0.12);
  color: var(--brand);
}
[data-theme^="paper"] .nb-intake { font-family: var(--font-display); }
[data-theme^="paper"] .nb-intake-btn {
  color: var(--ai);
  border-bottom-color: var(--ai);
}
[data-theme^="paper"] .nb-intake-btn:focus,
[data-theme^="paper"] .nb-intake-btn:hover,
[data-theme^="paper"] .nb-intake-btn-open {
  background-color: var(--ai-soft, rgba(0,90,160,0.06));
}
[data-theme^="paper"] .nb-intake-menu {
  background: var(--bg-0, #fafaf6);
  border-color: var(--line-strong, rgba(0,0,0,0.18));
  color: var(--text);
}
[data-theme^="paper"] .nb-intake-option:hover {
  background: var(--ai-soft, rgba(0,90,160,0.1));
  color: var(--ai);
}

.nb-cards-hint.no-matches {
  color: var(--brand);
  font-weight: 500;
}
.nb-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 16px;
}
@media (min-width: 980px) {
  .nb-cards { grid-template-columns: repeat(4, 1fr); }
}
.nb-cards-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}
.card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 22px 20px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,93,143,0.45);
  background: rgba(255,255,255,0.04);
}
.card .icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 20px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-soft);
}
.card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card .desc {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}
.card .meta {
  display: flex; gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.card .meta .pill {
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid var(--line-soft);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-custom { border-color: rgba(255,93,143,0.3); }
.card-custom .icon {
  background: linear-gradient(135deg, rgba(255,93,143,0.22), rgba(255,142,106,0.12));
  border-color: rgba(255,93,143,0.45);
}

/* Notebook section */
.nb-section {
  margin-bottom: 56px;
}
.nb-section.nb-race { margin-bottom: 28px; }
.nb-section.nb-dist { margin-bottom: 56px; }
.nb-section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.18;
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--text);
  letter-spacing: -0.015em;
}
.nb-section p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 760px;
  margin: 0 0 16px;
}
.nb-section p em {
  color: var(--text);
  font-style: italic;
}
.nb-section p strong {
  color: var(--text);
  font-weight: 600;
}

/* Combined hero block: process intro + big wins */
.nb-hr-title {
  font-family: var(--font-display);
  font-size: 38px !important;
  margin-bottom: 12px !important;
  font-weight: 600;
}
.nb-hr-desc {
  font-size: 16px;
  max-width: 760px;
  color: var(--text-dim);
  margin-bottom: 14px !important;
}
.nb-hr-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 36px;
  font-size: 13px;
  color: var(--muted);
  /* Hero stats are metadata — should not compete with the dollar figures
     further down the page. Smaller numbers, mono font for hard data look. */
}
.nb-hr-stats > span { display: inline-flex; align-items: baseline; gap: 6px; }
.nb-hr-stats b {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1;
  font-feature-settings: "tnum";
}
.nb-hr-stats .sep {
  color: var(--muted);
  opacity: 0.4;
}

/* The big wins — scream-size numbers, no boxes */
.nb-wins-prompt {
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 24px !important;
}
/* Three wins side-by-side on one line on any reasonable viewport. The grid
   guarantees equal columns; the "why" caption inside any column is now
   constrained so it can't expand the column and force a wrap. */
.nb-wins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 40px;
  margin-bottom: 18px;
  align-items: start;
}
.nb-win { display: flex; flex-direction: column; min-width: 0; }
.nb-win-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--brand) 0%, #ffa17a 60%, #f5d27a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-feature-settings: "tnum";
}
.nb-win-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nb-impact-fineprint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 720px;
}
@media (max-width: 820px) {
  .nb-wins { grid-template-columns: 1fr; gap: 28px; }
}

/* ----- Talk-to-us closing CTA section + form ----- */
.nb-talk-cta {
  margin-top: 24px;
  padding: 36px 32px;
  background: linear-gradient(135deg, rgba(255,93,143,0.08), rgba(255,142,106,0.04));
  border: 1px solid rgba(255,93,143,0.3);
  border-radius: var(--radius-lg);
}
[data-theme^="paper"] .nb-talk-cta {
  background: var(--bg-1);
  border-color: var(--brand);
  border-radius: 0;
}
.nb-talk-cta h2 { margin-bottom: 12px !important; }
.nb-talk-cta p { font-size: 16px; max-width: 720px; }
.nb-talk-btn { margin-top: 8px; font-size: 15px; padding: 14px 26px; }

.modal-label-optional {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 10px;
  font-weight: 500;
}

/* Talk-to-us multi-step wizard */
.talk-progress {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.talk-progress-current {
  color: var(--brand);
}
.talk-progress-label {
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
}
.talk-step { transition: opacity 0.2s; }
.talk-step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.btn-secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
[data-theme^="paper"] .btn-secondary {
  border-radius: 0;
  border-color: var(--line-strong);
  color: var(--text-dim);
}
[data-theme^="paper"] .btn-secondary:hover {
  background: var(--bg-2);
  color: var(--text);
}
.talk-modal-intro {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 18px;
  line-height: 1.55;
}
.talk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}
.talk-grid-full { grid-column: 1 / -1; }
.talk-fieldset {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 4px 0 0;
}
[data-theme^="paper"] .talk-fieldset { border-radius: 0; border-color: var(--line-strong); }
.talk-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px;
}
.talk-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 8px 0 10px;
}
.talk-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.talk-checkbox input { margin-top: 3px; accent-color: var(--brand); }
.talk-ops-other {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-0);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-top: 6px;
}
[data-theme^="paper"] .talk-ops-other { border-radius: 0; border-color: var(--line-strong); }
.talk-ops-other:focus { outline: none; border-color: var(--brand); }

@media (max-width: 720px) {
  .talk-grid, .talk-checkbox-grid { grid-template-columns: 1fr; }
}

/* ----- Report gate (post-custom-generation blur + email capture) ----- */
.report-gate { display: none; }
body.report-locked .report-gate {
  display: block;
  position: sticky;
  top: 80px;
  z-index: 6;
  margin: 0 auto 24px;
  max-width: 680px;
}
body.report-locked .nb-intro,
body.report-locked .nb-race,
body.report-locked .nb-impact,
body.report-locked .nb-dist,
body.report-locked .nb-knobs {
  filter: blur(9px) saturate(0.6);
  pointer-events: none;
  user-select: none;
  transition: filter 0.4s;
}
.report-gate-card {
  background: rgba(10, 14, 26, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.55);
}
[data-theme^="paper"] .report-gate-card {
  background: var(--bg-1);
  box-shadow: none;
  border-color: var(--brand);
  border-radius: 0;
}
.report-gate-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 8px 0 12px;
  color: var(--text);
}
.report-gate-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 18px;
  line-height: 1.55;
}
.report-gate-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.report-gate-form input {
  flex: 1; min-width: 220px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
}
.report-gate-form input:focus { outline: none; border-color: var(--brand); }
.report-gate-form .btn-primary { white-space: nowrap; }
.report-gate-error {
  color: var(--bad);
  font-size: 12px;
  margin: 10px 0 0;
  min-height: 14px;
}

/* Company-scale extrapolation block — sits between per-process wins and CTA */
.nb-scale-block {
  margin-top: 36px;
  padding: 24px 28px 26px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}
[data-theme^="paper"] .nb-scale-block {
  background: var(--bg-1);
  border-color: var(--line-strong);
  border-left-color: var(--brand);
}
.nb-scale-prompt {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.4;
  color: var(--text);
  margin: 0 0 18px;
  font-weight: 400;
}
.nb-scale-prompt b {
  font-weight: 600;
  color: var(--brand);
  font-feature-settings: "tnum";
}

/* Portfolio chip list — shows which processes were rolled up */
.nb-scale-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}
.nb-scale-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.2;
}
.nb-scale-chip-icon {
  font-size: 13px;
  line-height: 1;
}
.nb-scale-chip-name {
  font-weight: 500;
}
[data-theme^="paper"] .nb-scale-chip {
  background: var(--bg-1);
  border-color: var(--line-strong);
}
.nb-scale-wins {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 56px;
  margin: 4px 0 16px;
}
.nb-scale-win { display: flex; flex-direction: column; }
.nb-scale-num {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-feature-settings: "tnum";
}
.nb-scale-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nb-scale-note {
  font-size: 12px !important;
  color: var(--muted) !important;
  margin: 0 !important;
  line-height: 1.55;
}
[data-theme^="paper"] .nb-scale-num { font-family: var(--font-display); }
[data-theme^="paper"] .nb-scale-label { font-family: var(--font-mono); letter-spacing: 0.12em; }

/* Email-capture CTA inside the wins block */
.nb-impact-cta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--line-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.nb-impact-cta-note {
  font-size: 13px !important;
  color: var(--muted) !important;
  margin: 0 !important;
  max-width: 520px;
}
.nb-impact-cta .btn-primary.captured {
  background: transparent;
  color: var(--good);
  box-shadow: none;
  border: 1px solid var(--good);
  cursor: default;
}
[data-theme^="paper"] .nb-impact-cta .btn-primary.captured {
  background: transparent;
  border-color: var(--good);
  color: var(--good);
}

/* Anchor jumps land below the topbar (and below the TL;DR strip when it's
   visible). Without this, clicking "Tune to your reality ↓" or
   "↑ Back to results" lands with content half-hidden under the topbar. */
.nb-section { scroll-margin-top: calc(var(--topbar-h) + 12px); }
body.tldr-pinned .nb-section { scroll-margin-top: calc(var(--topbar-h) + 56px); }

/* ==============================================================
   SANDBOX REVISION — added blocks for the revision pass
   ============================================================== */

/* "Today's tax" headline block — what the human-only way costs right now.
   Big, somber, anchors the page on the cost of the status quo. */
.nb-tax {
  border-left: 4px solid var(--human);
  padding-left: 28px;
  margin-bottom: 16px;
}
.nb-tax-prompt {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-dim);
  margin: 0 0 16px;
  font-weight: 400;
}
.nb-tax-wins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 40px;
  margin: 8px 0 12px;
  align-items: start;
}
.nb-tax-win { display: flex; flex-direction: column; min-width: 0; }
.nb-tax-num {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.8vw, 72px);
  line-height: 1;
  font-weight: 600;
  color: var(--human);
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
@media (max-width: 820px) {
  .nb-tax-wins { grid-template-columns: 1fr; gap: 28px; }
}
.nb-tax-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}
.nb-tax-caption {
  font-size: 14px;
  color: var(--text-dim);
  margin: 12px 0 0;
  font-style: italic;
}

/* Race section refinements */
.nb-race-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.nb-race-tip { letter-spacing: 0.02em; }
.lane svg { cursor: pointer; transition: filter 0.15s; }
.lane svg:hover { filter: brightness(1.08); }
.lane-caption {
  font-size: 13px;
  color: var(--text-dim);
  margin: 12px 0 0;
  padding: 0 12px;
  line-height: 1.5;
  text-align: center;
}
/* (VS badge styled in the original .lane-row block; see line ~1677.) */

/* AI-actions micro-callouts — slim row directly under the race. No box,
   no eyebrow on its own line; the label sits inline with the chips so the
   whole thing reads as a single annotation row rather than a separate
   section. */
.nb-ai-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 0 0;
  border-top: 1px dashed var(--line-soft);
}
.nb-ai-actions-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ai);
  margin: 0;
  white-space: nowrap;
}
.nb-ai-actions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nb-ai-actions-list li {
  font-size: 12.5px;
  color: var(--text);
  padding: 4px 12px;
  background: var(--ai-soft);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  line-height: 1.4;
}

/* Step breakdown — compact two-line stacked timeline.
   Each <track> is a single 100%-width row of <seg> elements; each segment's
   width is its handoff's share of total wall-clock time. */
.nb-section-sub {
  font-size: 15px;
  color: var(--text-dim);
  margin: 4px 0 18px;
  max-width: 720px;
}
.nb-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.nb-steps-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 14px;
}
.nb-steps-mode-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.nb-steps-mode-total {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  min-width: 52px;
  text-align: right;
  font-feature-settings: "tnum";
}
.nb-steps-track {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.nb-step-seg {
  position: relative;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.12s, filter 0.12s;
  cursor: default;
  border-right: 1px solid rgba(0,0,0,0.25);
}
.nb-step-seg:last-child { border-right: 0; }
.nb-step-seg:hover { filter: brightness(1.15); opacity: 1 !important; }
.nb-step-seg-label {
  padding: 0 6px;
  font-size: 10px;
  color: rgba(0,0,0,0.7);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
}
.nb-steps-cuts {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
}
.nb-steps-cuts-label { font-weight: 500; }
.nb-steps-cut-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ai-soft);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 12px;
}
.nb-steps-cut-chip b {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ai);
  font-feature-settings: "tnum";
}
[data-theme^="paper"] .nb-steps-track { background: var(--bg-1); }

/* Wins block: deals "why" caption + per-win FTE caption */
.nb-win-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}
.nb-win-why {
  font-size: 12px !important;
  color: var(--muted) !important;
  margin: 8px 0 0 !important;
  font-style: italic;
  line-height: 1.5;
}

/* Histogram callout */
.nb-dist-headline {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 18px;
  max-width: 760px;
  letter-spacing: -0.01em;
}
.nb-methodology-link {
  font-size: 12px;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}
.nb-methodology-link:hover { color: var(--text); }

/* Promoted failure-rate bar (replaces tiny corner text) */
.nb-failrate-bar {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
}
.nb-failbar-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 600;
}
.nb-failbar-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  margin: 8px 0;
}
.nb-failbar-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}
.nb-failbar-track {
  position: relative;
  height: 22px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: visible;
}
.nb-failbar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s;
}
.nb-failbar-val {
  position: absolute;
  top: 50%;
  right: -56px;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "tnum";
}
[data-theme^="paper"] .nb-failrate-bar { background: var(--bg-1); }
[data-theme^="paper"] .nb-failbar-track { background: rgba(0,0,0,0.06); }

/* Wins → impact-cta: support multiple buttons */
.nb-impact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.share-link-copied { background: var(--good); color: white; border-color: var(--good); }

/* Knobs: accent the high-leverage levers (hourly rate + runs/year) */
.knob-accent {
  border-left: 3px solid var(--brand);
  padding-left: 16px;
  background: rgba(255,93,143,0.04);
  border-radius: var(--radius-sm);
}
.knob-accent-badge {
  display: inline-block;
  margin-left: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: 2px;
}
.nb-knobs-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.nb-back-to-results {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
}
.nb-back-to-results:hover { color: var(--brand); }
.nb-rerun { margin-top: 0; }

/* TL;DR strip — fixed below the topbar, but only visible AFTER the user
   has scrolled past the per-process wins block. Before that, the strip
   would be redundant with the wins they're looking at AND would eat ~50px
   of vertical above each section as they scroll. */
.nb-tldr-strip {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 24px;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  flex-wrap: wrap;
  /* Hidden by default; reveal via JS once wins exit the viewport. */
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  pointer-events: none;
}
.nb-tldr-strip.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
[data-theme^="paper"] .nb-tldr-strip {
  background: rgba(250, 250, 246, 0.95);
}
.nb-tldr-content {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--font-body);
}
.nb-tldr-proc {
  font-weight: 600;
  color: var(--text);
}
.nb-tldr-stat b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin-right: 4px;
  font-feature-settings: "tnum";
}
.nb-tldr-sep { color: var(--muted); opacity: 0.5; }
.nb-tldr-cta {
  font-size: 12px;
  padding: 6px 14px;
}
@media (max-width: 760px) {
  .nb-tldr-strip { flex-direction: column; align-items: flex-start; padding: 8px 16px; }
  .nb-tldr-cta { align-self: flex-end; }
}

/* Empty-state card (no catalog match for current filter) */
.nb-empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  text-align: center;
  background: rgba(255,255,255,0.02);
  margin-bottom: 12px;
}
.nb-empty-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
}
.nb-empty-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 22px;
}
.nb-empty-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
[data-theme^="paper"] .nb-empty-state { background: var(--bg-1); }

/* Custom-process card now a distinct dashed button */
.card.card-custom {
  font-family: inherit;
  text-align: left;
  background: var(--brand-soft) !important;
  border: 2px dashed var(--brand) !important;
  position: relative;
}
.card.card-custom:hover { background: rgba(255,93,143,0.16) !important; }
.card-custom-prelude {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Picker card focus state for keyboard nav */
.card { font-family: inherit; text-align: left; }
.card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Intake clear-× chip inside an active dropdown button */
.nb-intake-clear {
  margin-left: 4px;
  background: transparent;
  border: none;
  color: var(--brand);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  vertical-align: 1px;
}
.nb-intake-clear:hover { color: var(--text); }

/* FAB hidden state */
.sandbox-fab.sandbox-fab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.25s, transform 0.25s;
}

/* Social proof / testimonials */
.nb-proof { margin-top: 64px; }
.nb-proof-quotes {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 20px;
}
@media (min-width: 880px) {
  .nb-proof-quotes { grid-template-columns: repeat(3, 1fr); }
}
.nb-proof-quote {
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.025);
}
.nb-proof-quote blockquote {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 12px;
  font-style: italic;
}
.nb-proof-quote figcaption {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
[data-theme^="paper"] .nb-proof-quote { background: var(--bg-1); }

/* Methodology modal */
.methodology-modal {
  max-width: 720px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 36px 40px;
}
.methodology-body h3 {
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 18px 0 8px;
  font-weight: 600;
}
.methodology-body p, .methodology-body li {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.65;
}
.methodology-body ul {
  padding-left: 22px;
  margin: 8px 0;
}

/* Print stylesheet — single-column report, no FAB or sticky strip */
@media print {
  .topbar, .sandbox-fab, .nb-tldr-strip, .story, .mycelium,
  .nb-cards, .nb-empty-state, .nb-cards-hint, .nb-intake,
  .nb-impact-actions, .modal-backdrop, #report-gate,
  .nb-knobs, .nb-talk-cta, .nb-proof, .nb-jump,
  .story-controls { display: none !important; }
  .nb-results, .nb-results > * { break-inside: avoid; }
  body { background: white !important; color: #000 !important; }
  .nb-section { break-inside: avoid; }
  .nb-tax-num, .nb-win-num { color: #000 !important; }
}

/* Race */
.nb-race-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.nb-race-head h2 { margin-bottom: 0 !important; }
.nb-jump {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 93, 143, 0.5);
  background: linear-gradient(135deg, rgba(255, 93, 143, 0.18), rgba(255, 142, 106, 0.08));
  box-shadow: 0 4px 18px rgba(255, 93, 143, 0.18);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
  letter-spacing: 0;
}
.nb-jump:hover {
  background: linear-gradient(135deg, rgba(255, 93, 143, 0.3), rgba(255, 142, 106, 0.18));
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(255, 93, 143, 0.32);
}

/* Distribution */
.nb-dist-summary {
  font-size: 15px;
  margin-top: 18px;
  color: var(--text-dim);
  max-width: 820px;
}
.nb-dist-summary .nb-num {
  color: var(--text);
  font-weight: 600;
  font-feature-settings: "tnum";
}

/* Knobs */
.nb-knob-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 40px;
  margin-top: 8px;
  margin-bottom: 28px;
}
@media (max-width: 720px) {
  .nb-knob-grid { grid-template-columns: 1fr; }
}
.knob { margin: 0; }
.knob label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 8px;
}
.knob label .val {
  color: var(--text);
  font-feature-settings: "tnum";
  font-weight: 600;
  font-size: 15px;
}
.knob input[type=range] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 22px;
}
.knob input[type=range]::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
.knob input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand);
  margin-top: -7px;
  box-shadow: 0 2px 10px rgba(255,93,143,0.6);
  cursor: grab;
}
.knob input[type=range]::-moz-range-track {
  height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px;
}
.knob input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); border: none;
  box-shadow: 0 2px 10px rgba(255,93,143,0.6);
  cursor: grab;
}
.knob .hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.55;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #ff8e6a);
  color: white; border: none;
  padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 24px rgba(255, 93, 143, 0.32);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(255, 93, 143, 0.42); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; transform: none; }
.nb-rerun { margin-top: 6px; }

/* ---- Lanes (the race) ---- */
.lane-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 12px;
}
.vs {
  align-self: center;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand); font-weight: 700; font-size: 12px;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 10px rgba(255, 93, 143, 0.25);
  border: 1.5px solid var(--brand);
  position: relative; z-index: 2;
}
.lane {
  position: relative;
  height: 520px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
}
.lane-node { transition: opacity 0.25s; }
.lane-node-uninvolved { opacity: 0.22; }
.lane.human { border-color: rgba(245,159,74,0.3); }
.lane.ai { border-color: rgba(109,214,255,0.3); }
.lane-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.lane-header .title { font-size: 14px; font-weight: 600; color: var(--text); }
.lane-header .clock {
  font-feature-settings: "tnum";
  font-weight: 600; font-size: 13px;
  color: var(--text-dim);
}
.lane.human .lane-header .title::before { content: "✉️ "; margin-right: 4px; }
.lane.ai .lane-header .title::before { content: "🐙 "; margin-right: 4px; }
.lane svg { width: 100%; height: calc(100% - 50px); display: block; }

/* ---- Histogram ---- */
.histo {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 18px 22px 20px;
}
.histo .h-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 12px;
}
.h-legend {
  display: flex; gap: 18px;
  font-size: 13px;
  color: var(--text-dim);
}
.h-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
.histo svg { width: 100%; height: 240px; display: block; margin-top: 6px; }
.swatch {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: 6px;
  vertical-align: middle;
}
.swatch.h { background: var(--human); }
.swatch.a { background: var(--ai); }
.histo .series path { pointer-events: all; cursor: pointer; transition: filter 0.15s; }
.histo .series .p90-group { opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.histo .series:hover .p90-group { opacity: 1; }
.histo .series:hover path { filter: brightness(1.18); }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 8, 18, 0.78);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(560px, 100%);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  max-height: 90vh; overflow: hidden;
}
.modal-wide { width: min(720px, 100%); }
.modal-narrow { width: min(440px, 100%); }
.modal-label-required {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-left: 10px;
  vertical-align: 1px;
}
.email-modal-intro {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 6px;
}
.modal-body-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 24px;
  gap: 12px;
}
/* [hidden] attribute applies display:none, but our display:flex above
   overrides it. Re-honor [hidden] explicitly. */
.modal-body-success[hidden] { display: none; }

/* Share-link block inside the talk-modal success state */
.share-link-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-soft);
  width: 100%;
  max-width: 380px;
  text-align: left;
}
.share-link-label {
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted) !important;
  margin: 0 0 8px !important;
}
.share-link-row {
  display: flex;
  gap: 8px;
}
#share-link-input {
  flex: 1; min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg-0);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
}
#share-link-input:focus { outline: none; border-color: var(--brand); }
[data-theme^="paper"] #share-link-input { border-radius: 0; border-color: var(--line-strong); }
.share-link-copied {
  color: var(--good) !important;
  font-weight: 500;
}
.email-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.15);
  color: var(--good);
  display: grid; place-items: center;
  font-size: 28px;
  font-weight: 700;
}
.email-success-title {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--text);
}
.email-success-body {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
  max-width: 320px;
  line-height: 1.5;
}
.modal-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.modal-section-label + .modal-cards { margin-bottom: 6px; }
.modal-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.modal-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}
.modal-card:hover {
  border-color: var(--brand);
  background: rgba(255,255,255,0.05);
}
.modal-card-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.modal-card-body { flex: 1; min-width: 0; }
.modal-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.modal-card p {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.45;
}
.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

/* Paper themes — flat, square */
[data-theme^="paper"] .modal-card {
  border-radius: 0;
  background: var(--bg-2);
  border-color: var(--line-strong);
}
[data-theme^="paper"] .modal-card:hover { border-color: var(--brand); }
[data-theme^="paper"] .modal-card h4 { font-family: var(--font-display); font-weight: 500; }
[data-theme^="paper"] .modal-section-label { font-family: var(--font-mono); }

/* ---- Sandbox floating action button ---- */
.sandbox-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9;
  background: var(--brand);
  color: white;
  border: none;
  padding: 12px 20px 12px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(255, 93, 143, 0.42);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.sandbox-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.sandbox-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(255, 93, 143, 0.55);
}
body.story-mode .sandbox-fab,
body.myc-mode .sandbox-fab { display: none; }

[data-theme^="paper"] .sandbox-fab {
  background: var(--ai);
  border-radius: 0;
  box-shadow: none;
  color: #F0ECE0;
}
[data-theme^="paper"] .sandbox-fab:hover {
  background: var(--ai);
  filter: brightness(0.94);
  transform: none;
  box-shadow: none;
}
[data-theme^="paper"] .sandbox-fab-icon {
  border-radius: 0;
  background: rgba(240, 236, 224, 0.2);
}

@media (max-width: 760px) {
  .sandbox-fab { right: 16px; bottom: 16px; padding: 10px 16px 10px 12px; font-size: 13px; }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  font-size: 16px;
  background: linear-gradient(90deg, var(--brand), #ffa17a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal-close {
  background: transparent; color: var(--text-dim); border: none;
  font-size: 22px; line-height: 1; padding: 4px 10px; border-radius: 6px;
}
.modal-close:hover { background: var(--bg-0); color: var(--text); }
.modal-body {
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.modal-body[hidden] { display: none; }
.modal-label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.modal-label small {
  font-size: 11px; color: var(--muted); text-transform: none; letter-spacing: 0;
  font-weight: normal;
}
.modal-label input, .modal-label textarea {
  font-family: inherit; font-size: 13px;
  color: var(--text); background: var(--bg-0);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px;
  text-transform: none; letter-spacing: 0;
}
.modal-label textarea { resize: vertical; min-height: 90px; }
.modal-label input:focus, .modal-label textarea:focus {
  outline: none; border-color: var(--brand);
}
.modal-error {
  color: var(--bad); font-size: 12px; min-height: 16px;
}
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end;
}

@media (max-width: 1100px) {
  .lane-row { grid-template-columns: 1fr; }
  .vs { margin: 0 auto; }
  .vs::before, .vs::after { display: none; }
  .nb-hero h1 { font-size: 38px; }
  .nb-section h2 { font-size: 26px; }
  .nb-impact-prose { font-size: 22px; }
}

/* ============ MYCELIUM ============ */
.mycelium {
  display: none;
  position: relative;
  height: 700vh;
  background: radial-gradient(ellipse at center, #0c1430 0%, #050810 75%);
}
.mycelium.active { display: block; }
body.myc-mode .notebook { display: none !important; }
body.myc-mode { overflow-x: hidden; }

.myc-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}
#myc-svg {
  width: 100%;
  height: 100%;
  display: block;
  background: radial-gradient(ellipse at center, #0c1633 0%, #050810 65%, #02040a 100%);
}

.myc-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(2,4,10,0.55) 100%);
}

/* Cluster boundaries — dotted ring + label per organization */
.myc-cluster { transition: opacity 0.3s; }
.myc-cluster-ring {
  fill: none;
  stroke: rgba(180, 200, 240, 0.22);
  stroke-width: 0.8;
  stroke-dasharray: 3 6;
}
.myc-cluster-small .myc-cluster-ring {
  stroke-width: 0.5;
  stroke-dasharray: 2 4;
  stroke: rgba(180, 200, 240, 0.16);
}
.myc-cluster-label {
  fill: rgba(231, 236, 246, 0.7);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(5, 10, 22, 0.85);
  stroke-width: 3;
}
.myc-cluster-small .myc-cluster-label {
  font-size: 7px;
  letter-spacing: 0.04em;
  fill: rgba(231, 236, 246, 0.45);
  stroke-width: 2;
}

/* Edges */
.myc-edge {
  stroke: rgba(160, 160, 200, 0.18);
  stroke-width: 0.8;
  fill: none;
  transition: stroke 0.4s, stroke-width 0.4s;
}
.myc-edge-automated {
  stroke: rgba(109, 214, 255, 0.6);
  stroke-width: 1.1;
}
.myc-edge-auto {
  stroke: rgba(109, 214, 255, 0.55);
  stroke-width: 1;
}
.myc-edge-pulse {
  stroke: rgba(109, 214, 255, 0.75);
  stroke-dasharray: 4 16;
  stroke-width: 1.4;
  animation: myc-flow 2.4s linear infinite;
}
@keyframes myc-flow {
  to { stroke-dashoffset: -200; }
}

/* Nodes — only animate opacity. Scaling transforms on SVG <circle> can't
   reliably pivot around the element's center across all browsers, which
   shows up visually as the halo oscillating sideways. Opacity-only pulses
   stay anchored to the node. */
.myc-node { transition: opacity 0.3s; }
.myc-node .myc-halo {
  animation: myc-pulse 4s ease-in-out infinite;
}
.myc-node-trigger .myc-halo {
  animation: myc-pulse-fast 1.8s ease-in-out infinite;
}
.myc-node-automated .myc-halo {
  animation: myc-pulse-fast 2.2s ease-in-out infinite;
}
@keyframes myc-pulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}
@keyframes myc-pulse-fast {
  0%, 100% { opacity: 0.8; }
  50%      { opacity: 1; }
}

.myc-core {
  fill: #f5a056;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 0.4;
  transition: fill 0.5s;
}
.myc-node-trigger .myc-core { fill: #ff5d8f; }
.myc-node-automated .myc-core { fill: #6dd6ff; }
.myc-node-core .myc-core { stroke-width: 0.6; }

.myc-node-label {
  fill: rgba(231, 236, 246, 0.85);
  font-size: 9px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  paint-order: stroke;
  stroke: rgba(5, 10, 22, 0.8);
  stroke-width: 2.5;
}

/* Overlay text */
.myc-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 24px 80px;
  text-align: center;
}
.myc-card {
  max-width: 640px;
  background: rgba(10, 14, 26, 0.65);
  border: 1px solid rgba(255, 93, 143, 0.18);
  border-radius: 14px;
  padding: 18px 24px;
  backdrop-filter: blur(8px);
  transition: transform 0.25s, box-shadow 0.25s;
}
.myc-card.myc-card-flash {
  box-shadow: 0 0 28px rgba(255, 93, 143, 0.35);
}
.myc-card h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffd5a3, #ffa17a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.myc-card p {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}
.myc-final {
  margin-top: 16px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--brand), #6dd6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0;
  transition: opacity 0.4s;
}
.myc-final.visible { opacity: 1; }

/* Legend */
.myc-legend {
  position: absolute;
  top: 18px;
  left: 24px;
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  pointer-events: none;
}
.myc-legend i.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.myc-legend .dot.human { background: #f5a056; }
.myc-legend .dot.auto { background: #6dd6ff; }
.myc-legend .dot.trigger { background: #ff5d8f; }

/* Scroll progress */
.myc-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}
.myc-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), #6dd6ff);
  box-shadow: 0 0 12px rgba(109, 214, 255, 0.5);
  transition: width 0.05s linear;
}
.myc-hint {
  position: absolute;
  top: 50%; right: 28px;
  transform: translateY(-50%) rotate(0deg);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: myc-hint-bob 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes myc-hint-bob {
  0%, 100% { transform: translateY(-50%); opacity: 0.5; }
  50%      { transform: translateY(-46%); opacity: 1; }
}

/* ==============================================================
   PAPER ENGINEERING THEME OVERRIDES
   Honors the five prohibitions: no gradients, no shadows,
   no border-radius, no glow effects, orthogonal geometry.
   ============================================================== */
:root[data-theme="paper-light"] body,
:root[data-theme="paper-dark"] body { background: var(--bg-page-grad); }

[data-theme^="paper"] .logo {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
}
[data-theme^="paper"] .logo::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--brand);
  margin-right: 8px;
  vertical-align: -2px;
}

[data-theme^="paper"] .theme-picker {
  background: var(--bg-1);
  border-color: var(--line-strong);
}
[data-theme^="paper"] .theme-btn.active {
  background: var(--ai-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--ai);
}

[data-theme^="paper"] .topnav {
  background: var(--bg-1);
  border-color: var(--line-strong);
}
[data-theme^="paper"] .topnav-btn.active {
  background: var(--ai-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--ai);
}

/* ---- Cards & panels — square corners, flat fills ---- */
[data-theme^="paper"] .card,
[data-theme^="paper"] .lane,
[data-theme^="paper"] .histo,
[data-theme^="paper"] .modal,
[data-theme^="paper"] .nb-jump,
[data-theme^="paper"] .nb-hr-stats span,
[data-theme^="paper"] .nb-proc-meta .org-pill,
[data-theme^="paper"] .card .meta .pill {
  border-radius: 0 !important;
}
[data-theme^="paper"] .card {
  background: var(--bg-1);
  border-color: var(--line-strong);
}
[data-theme^="paper"] .card:hover {
  background: var(--bg-2);
  transform: none;
  border-color: var(--brand);
}
[data-theme^="paper"] .card-custom {
  border-color: var(--brand);
}
[data-theme^="paper"] .card .icon {
  background: var(--bg-2);
  border-color: var(--line-strong);
  border-radius: 0;
}
[data-theme^="paper"] .card .meta .pill {
  background: var(--bg-2);
  border-color: var(--line-strong);
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

/* ---- Typography ---- */
[data-theme^="paper"] .nb-eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
}
[data-theme^="paper"] .nb-hero h1,
[data-theme^="paper"] .nb-section h2,
[data-theme^="paper"] .nb-hr-title {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
}
[data-theme^="paper"] .nb-hero h1 em {
  background: none;
  -webkit-background-clip: initial;
  color: var(--brand);
  -webkit-text-fill-color: var(--brand);
  font-style: italic;
}

/* ---- Wins — flat color, not gradient text ---- */
[data-theme^="paper"] .nb-win-num {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  color: var(--brand) !important;
  -webkit-text-fill-color: var(--brand) !important;
  font-family: var(--font-display);
  font-weight: 500;
}
[data-theme^="paper"] .nb-win-label {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}
[data-theme^="paper"] .nb-wins-prompt {
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.18em;
}

/* Big-stat numbers in the meta row */
[data-theme^="paper"] .nb-hr-stats b {
  font-family: var(--font-display);
  font-weight: 500;
}

/* ---- Race & lanes ---- */
[data-theme^="paper"] .lane {
  background: var(--bg-1);
  border-color: var(--line-strong) !important;
}
[data-theme^="paper"] .lane.human { border-top: 4px solid var(--human) !important; }
[data-theme^="paper"] .lane.ai { border-top: 4px solid var(--ai) !important; }
[data-theme^="paper"] .lane-header { border-bottom-color: var(--line-soft); }
[data-theme^="paper"] .lane-header .title { font-family: var(--font-mono); letter-spacing: 0.08em; }
[data-theme^="paper"] .lane.human .lane-header .title::before,
[data-theme^="paper"] .lane.ai .lane-header .title::before { content: ""; margin: 0; }

/* VS — square tile, vermillion dot motif */
[data-theme^="paper"] .vs {
  background: var(--brand) !important;
  border-radius: 0;
  border: none;
  box-shadow: none;
  color: var(--bg-0);
  width: 48px; height: 48px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}
[data-theme^="paper"] .vs::before,
[data-theme^="paper"] .vs::after { background: var(--line-strong); }

/* ---- Histogram ---- */
[data-theme^="paper"] .histo {
  background: var(--bg-1);
  border-color: var(--line-strong);
}
[data-theme^="paper"] .h-legend { font-family: var(--font-mono); letter-spacing: 0.06em; }

/* ---- Buttons — cobalt accent, square corners, flat ---- */
[data-theme^="paper"] .btn-primary {
  background: var(--ai) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #F0ECE0 !important;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--ai) !important;
}
[data-theme^="paper"] .btn-primary:hover {
  background: var(--ai) !important;
  filter: brightness(0.92);
  transform: none;
  box-shadow: none !important;
}
[data-theme^="paper"] .nb-jump {
  background: var(--ai-soft);
  border-color: var(--ai);
  color: var(--text);
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-body);
}
[data-theme^="paper"] .nb-jump:hover {
  background: var(--ai-soft);
  box-shadow: none;
  transform: none;
  filter: brightness(0.96);
}

/* Knob slider thumb → cobalt */
[data-theme^="paper"] .knob input[type=range]::-webkit-slider-thumb {
  background: var(--ai);
  box-shadow: none;
  border-radius: 0;
  width: 14px; height: 14px;
  margin-top: -5px;
}
[data-theme^="paper"] .knob input[type=range]::-moz-range-thumb {
  background: var(--ai);
  box-shadow: none;
  border-radius: 0;
  width: 14px; height: 14px;
}
[data-theme^="paper"] .knob input[type=range]::-webkit-slider-runnable-track {
  background: var(--line-strong);
}

/* ---- Stats / meta pills ---- */
[data-theme^="paper"] .nb-hr-stats .sep { color: var(--muted); }

/* ---- Tooltip (i) ---- */
[data-theme^="paper"] .tt { border-color: var(--line-strong); color: var(--muted); }
[data-theme^="paper"] .tt:hover { color: var(--brand); border-color: var(--brand); }
[data-theme^="paper"] .tt:hover::after {
  background: var(--bg-1);
  border-color: var(--line-strong);
  color: var(--text);
  border-radius: 0;
  box-shadow: none;
}
[data-theme^="paper"] .tt:hover::before { border-bottom-color: var(--line-strong); }

/* ---- Modal ---- */
[data-theme^="paper"] .modal {
  background: var(--bg-1);
  border-color: var(--line-strong);
  border-radius: 0 !important;
  box-shadow: none;
}
[data-theme^="paper"] .modal-head h3 {
  background: none;
  -webkit-background-clip: initial;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
}
[data-theme^="paper"] .modal-label input,
[data-theme^="paper"] .modal-label textarea {
  background: var(--bg-0);
  border-color: var(--line-strong);
  border-radius: 0;
  color: var(--text);
}

/* ---- Delta banner (legacy element) ---- */
[data-theme^="paper"] .nb-rule { background: var(--line-strong); }

/* ---- Histogram swatches & legend already pull from var(--human/ai) ---- */
[data-theme^="paper"] .swatch.h { background: var(--human); }
[data-theme^="paper"] .swatch.a { background: var(--ai); }

/* Knob value display */
[data-theme^="paper"] .knob label .val { font-family: var(--font-mono); font-weight: 500; }

/* The original style listed .lane.human/.lane.ai border-color shifts;
   the !important borders above keep our top-bar accents in paper themes. */

/* ==============================================================
   STORY MODE — 7-scene guided experience
   Each scene is a full-viewport panel with an IntersectionObserver-
   triggered reveal animation. Visible only when body.story-mode.
   ============================================================== */
.story { display: none; }
body.story-mode .story { display: block; }
body.story-mode .notebook,
body.story-mode .mycelium,
body.story-mode .pitch { display: none !important; }

/* ==============================================================
   PITCH MODE — deck-style scrollable slides for the AI2 pitch
   Reuses .story-scene typography. Visible only when body.pitch-mode.
   ============================================================== */
.pitch { display: none; }
body.pitch-mode .pitch { display: block; }
body.pitch-mode .notebook,
body.pitch-mode .story,
body.pitch-mode .mycelium { display: none !important; }

.pitch .story-scene { scroll-snap-align: start; }
.pitch-body {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 880px;
  margin: 0 0 14px;
}
.pitch-body strong { color: var(--text); }
.pitch-body em { color: var(--brand); font-style: italic; }
.pitch-callout {
  border-left: 3px solid var(--brand);
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  margin-top: 22px;
  font-size: 17px;
}

/* Stat row (FGF slide) */
.pitch-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 24px 0 32px;
  max-width: 1000px;
}
.pitch-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 20px 22px;
}
.pitch-stat-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  color: var(--brand);
  margin-bottom: 8px;
}
.pitch-stat-label {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-dim);
}

/* Three-column role/feature row (What Planapus does, Moat) */
.pitch-roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0 28px;
  max-width: 1200px;
}
.pitch-role {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 22px 22px 24px;
}
.pitch-role-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.pitch-role p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}
.pitch-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  text-transform: uppercase;
}

/* Bulleted list (Why this wedge) */
.pitch-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
  max-width: 980px;
}
.pitch-list li {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-dim);
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.pitch-list li:last-child { border-bottom: none; }
.pitch-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}
.pitch-list li strong { color: var(--text); }

/* Pull quotes (Early signals) */
.pitch-quote {
  border-left: 3px solid var(--brand);
  padding: 14px 20px 16px;
  margin: 18px 0;
  max-width: 1000px;
  background: rgba(255,255,255,0.025);
  border-radius: 0 8px 8px 0;
}
.pitch-quote p {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.4;
  color: var(--text);
  margin: 0 0 10px;
  font-style: italic;
}
.pitch-quote-followup {
  font-family: inherit !important;
  font-style: normal !important;
  font-size: 16px !important;
  color: var(--text-dim) !important;
  line-height: 1.5 !important;
}
.pitch-quote-followup em {
  font-style: italic;
  color: var(--text);
}
.pitch-quote footer {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* Timeline (Trajectory + Ask) */
.pitch-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 22px 0 28px;
  max-width: 1200px;
}
.pitch-tl-col {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pitch-tl-when {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}
.pitch-tl-in {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  line-height: 1.25;
}
.pitch-tl-out {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}
.pitch-tl-flow {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono, monospace);
  margin-top: auto;
}

/* Team grid */
.pitch-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 22px 0 26px;
  max-width: 1200px;
}
.pitch-person {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 20px 22px;
}
.pitch-person-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  margin-bottom: 10px;
}
.pitch-person p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}

.pitch-cta { margin-top: 28px; align-self: flex-start; }

.story-scene {
  /* Subtract the sticky topbar so content centers in the visible area
     and the scroll-hint at the bottom of the scene actually lands above
     the fold. */
  min-height: calc(100vh - var(--topbar-h));
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  scroll-snap-align: start;
  scroll-margin-top: var(--topbar-h);
}

.story-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 18px;
}

.story-display {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 28px;
  max-width: 1100px;
  color: var(--text);
}
.story-display em {
  font-style: italic;
  background: var(--grad-wins);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
[data-theme^="paper"] .story-display em {
  background: none;
  -webkit-text-fill-color: var(--brand);
  color: var(--brand);
}
.story-h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0 0 18px;
  max-width: 1000px;
}
.story-lede {
  font-size: 22px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 0 40px;
}
/* Story intake scene — inline fill-in-the-blank sentence */
.story-intake-prompt {
  line-height: 1.45;
  max-width: 1100px;
}
.story-intake-prompt .nb-intake-btn {
  font-family: var(--font-display);
  font-size: inherit;
  font-weight: 600;
  border-bottom-width: 3px;
  padding: 0 26px 2px 8px;
  background-position:
    right 6px top 60%,
    right 13px top 60%;
  background-size: 7px 7px, 7px 7px;
  top: 0;
  max-width: none;
}
.story-intake-prompt .nb-intake-menu {
  font-family: var(--font-body);
  font-size: 15px;
  min-width: 260px;
}
.story-intake-sub {
  font-size: 16px !important;
  color: var(--muted) !important;
  margin: 12px 0 32px !important;
}

.story-proc-desc {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 760px;
  margin: 0 0 24px;
}

/* Scene 3 enrichment — list each org with its participants */
.story-proc-roster {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 0;
  max-width: 900px;
}
.story-roster-org {
  display: grid;
  grid-template-columns: 16px auto 1fr;
  align-items: baseline;
  gap: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
}
.story-roster-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.story-roster-org-name {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.story-roster-people {
  color: var(--text-dim);
}
[data-theme^="paper"] .story-roster-dot { border-radius: 0; }

/* Skip button on the context scene */
.story-context-skip {
  align-self: flex-start;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  margin-top: 8px;
}
.story-context-skip:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--text);
}
.story-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: baseline;
  font-size: 15px;
  color: var(--text-dim);
}
.story-stats > span { display: inline-flex; align-items: baseline; gap: 8px; }
.story-stats b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  color: var(--text);
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
  line-height: 1;
}
.story-stats .sep { color: var(--muted); opacity: 0.5; }

/* The pill in the bottom-right corner already serves as the "go forward"
   nudge. The centered hint duplicated the same prompt; we keep it only on
   scene 1 as a first-touch affordance and hide it elsewhere. */
.story-scroll-hint {
  position: absolute;
  bottom: 56px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  animation: story-bob 2.2s ease-in-out infinite;
  display: none;
}
#story-scene-1 .story-scroll-hint { display: block; }
@keyframes story-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%      { transform: translateX(-50%) translateY(4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .story-scroll-hint { animation: none; opacity: 0.7; }
}

/* Scene 2: picker */
.story-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 1100px;
}
@media (min-width: 980px) { .story-cards { grid-template-columns: repeat(4, 1fr); } }

/* Scene 4 & 5: lanes */
.story-lane-wrap {
  display: grid;
  align-items: stretch;
  gap: 18px;
  margin: 8px 0 20px;
}
.story-lane-wrap-single {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}
.story-lane-wrap-single .lane { height: 620px; }
.story-lane-wrap-dual {
  grid-template-columns: 1fr auto 1fr;
}
.story-lane-wrap-dual .lane { height: 560px; }

.story-annotation {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  color: var(--text);
  margin: 12px 0 0;
  min-height: 1.5em;
  text-align: center;
  transition: opacity 0.4s;
}

/* Scene 6: histogram fills the available width */
.story-histo-wrap { width: 100%; max-width: 1100px; }
.story-histo-wrap .histo { padding: 24px 28px 28px; }
.story-histo-wrap svg { height: 320px; }

/* Scene 7: wins */
.story-wins { margin: 12px 0 36px; gap: 56px 80px; }
.story-wins .nb-win-num { font-size: clamp(64px, 8vw, 96px); }
.story-cta-prose {
  font-size: 17px;
  color: var(--text-dim);
  margin: 0 0 28px;
  max-width: 680px;
}
.story-cta-prose strong { color: var(--text); }
.story-unlock-btn {
  font-size: 16px;
  padding: 16px 28px;
  align-self: flex-start;
}

/* Story mode forces snap on the document scroll for a deliberate pacing feel */
body.story-mode { scroll-snap-type: y proximity; }

/* Smaller scenes for short viewports */
@media (max-height: 760px) {
  .story-scene { padding: 48px 32px 80px; }
  .story-lane-wrap-single .lane { height: 460px; }
  .story-lane-wrap-dual .lane { height: 400px; }
  .story-wins { gap: 28px 56px; margin: 4px 0 20px; }
  .story-wins .nb-win-num { font-size: clamp(48px, 6vw, 72px); }
}
@media (max-width: 880px) {
  .story-lane-wrap-dual { grid-template-columns: 1fr; }
  .story-lane-wrap-dual .vs { margin: 0 auto; }
  /* Stack the dot stack horizontally at the bottom instead of right edge */
  .story-dots {
    flex-direction: row;
    right: auto;
    top: auto;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
  }
  .story-dot::after { display: none; } /* hover tooltip is unusable on touch */
  .story-scene-summary { display: none; }
  .story-pill { bottom: 24px; right: auto; left: 50%; transform: translateX(-50%); }
  .story-pill:hover { transform: translateX(-50%) translateY(-1px); }
  .story-kbd-hint { display: none; }
}

/* Lane SVG cursor: only show "click to skip" on the active scene */
.story-scene .lane svg { cursor: pointer; }
.story-scene .lane svg:hover { filter: brightness(1.05); }

/* ==============================================================
   STORY CONTROLS — persistent nav: side-dot stack + bottom-right
   "Continue" pill + keyboard-shortcut hint. Visible only in story mode.
   ============================================================== */
.story-controls { display: none; }
body.story-mode .story-controls {
  display: block;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 12;
}

/* Side dot stack */
.story-dots {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}
.story-dot {
  position: relative;
  width: 10px; height: 10px;
  padding: 0;
  background: transparent;
  border: 1.5px solid rgba(198, 204, 224, 0.45);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  font-family: inherit;
}
.story-dot::before {
  /* Larger invisible hit target for easier clicking */
  content: "";
  position: absolute;
  inset: -10px;
}
.story-dot:hover { transform: scale(1.4); border-color: var(--brand); }
.story-dot.active {
  background: var(--brand);
  border-color: var(--brand);
}
.story-dot::after {
  content: attr(data-label);
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 20, 38, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.story-dot:hover::after,
.story-dot:focus-visible::after { opacity: 1; }

/* Continue pill */
.story-pill {
  position: absolute;
  bottom: 28px;
  right: 28px;
  pointer-events: auto;
  background: var(--brand);
  color: white;
  border: none;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(255, 93, 143, 0.42);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.story-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(255, 93, 143, 0.55);
}
.story-pill.idle {
  animation: pill-pulse 1.8s ease-in-out infinite;
}
@keyframes pill-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 8px 26px rgba(255, 93, 143, 0.42); }
  50%      { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(255, 93, 143, 0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .story-pill.idle { animation: none; }
  .story-pill:hover { transform: none; }
}

/* Scene-summary line (bottom-left) — a one-liner about the current scene */
.story-scene-summary {
  position: absolute;
  bottom: 24px;
  left: 32px;
  pointer-events: none;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  max-width: 360px;
  line-height: 1.45;
  opacity: 0.85;
}

/* Keyboard hint — small text under the pill */
.story-kbd-hint {
  position: absolute;
  bottom: 8px;
  right: 36px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  opacity: 0.55;
}

/* Paper themes — flat, square, cobalt accent */
[data-theme^="paper"] .story-dot { border-color: var(--line-strong); border-radius: 0; }
[data-theme^="paper"] .story-dot.active { background: var(--ai); border-color: var(--ai); }
[data-theme^="paper"] .story-dot:hover { border-color: var(--ai); }
[data-theme^="paper"] .story-dot::after {
  background: var(--bg-1);
  border-color: var(--line-strong);
  color: var(--text);
  border-radius: 0;
}
[data-theme^="paper"] .story-pill {
  background: var(--ai);
  border-radius: 0;
  box-shadow: none;
  color: #F0ECE0;
}
[data-theme^="paper"] .story-pill:hover {
  background: var(--ai);
  filter: brightness(0.94);
  transform: none;
  box-shadow: none;
}
[data-theme^="paper"] .story-pill.idle { animation: pill-pulse-flat 1.8s ease-in-out infinite; }
@keyframes pill-pulse-flat {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.78; }
}

/* Mobile: hide dot stack to keep the viewport clean; pill is enough */
@media (max-width: 760px) {
  .story-dots { display: none; }
  .story-pill { right: 16px; bottom: 16px; }
  .story-kbd-hint { display: none; }
}
