/* Journey — design tokens and component styles.
   White, deep forest, vivid lime. No gradients, no raster imagery, no web
   fonts. No inline styles anywhere in the output, because the deployed
   Content-Security-Policy sets style-src 'self'. Every contrast pair the
   layout composes is computed from the tokens below by scripts/validate.mjs
   and must meet WCAG 2.2 AA (4.5:1 body text, 3:1 interface boundaries). */

:root {
  color-scheme: light dark;

  --forest-900: #0b2a21;
  --forest-800: #10372c;
  --forest-700: #144435;
  --forest-600: #1c5c48;
  --forest-100: #dcede4;
  --forest-050: #f4f7f3;

  --lime-500: #c9f24a;
  --lime-400: #dbf77f;
  --lime-100: #eefbc9;
  --lime-ink: #0b2a21;

  /* Semantic accents. These flip in the dark scheme; the forest scale above
     does not, so components reference these rather than the raw ramp. */
  --accent-700: var(--forest-700);
  --accent-100: var(--forest-100);
  --accent-line: var(--forest-600);
  --em-highlight: var(--lime-100);

  --signal-700: #8a4b00;
  --signal-100: #fdf1e0;
  --good-700: #0f6b4f;
  --good-100: #e0f3e9;
  --warn-700: #8f2f2f;
  --warn-100: #fbeaea;

  --bg: #ffffff;
  --bg-muted: #f4f7f3;
  --bg-raised: #ffffff;
  --bg-invert: #0b2a21;
  --bg-invert-raised: #10372c;
  --text: #16241f;
  --text-muted: #4c5f57;
  --text-invert: #f1f8f4;
  --text-invert-muted: #afcbbc;
  --border: #e2e7e1;
  --border-strong: #6c817a;
  --border-invert: #284c3e;
  --link: #1c5c48;
  --link-hover: #0b2a21;
  --focus: #1c5c48;
  --focus-invert: #c9f24a;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step--2: clamp(0.72rem, 0.71rem + 0.06vw, 0.77rem);
  --step--1: clamp(0.83rem, 0.81rem + 0.1vw, 0.89rem);
  --step-0: clamp(1.02rem, 0.99rem + 0.17vw, 1.11rem);
  --step-1: clamp(1.2rem, 1.14rem + 0.34vw, 1.4rem);
  --step-2: clamp(1.46rem, 1.32rem + 0.66vw, 1.84rem);
  --step-3: clamp(1.8rem, 1.54rem + 1.25vw, 2.5rem);
  --step-4: clamp(2.2rem, 1.78rem + 2.05vw, 3.3rem);
  --step-5: clamp(2.45rem, 1.76rem + 3.4vw, 4.4rem);
  --step-6: clamp(3rem, 2.05rem + 4.7vw, 5.4rem);

  --wrap: 76rem;
  --wrap-wide: 85rem;
  --wrap-narrow: 44rem;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11, 42, 33, 0.06), 0 1px 3px rgba(11, 42, 33, 0.05);
  --shadow-md: 0 6px 18px rgba(11, 42, 33, 0.08), 0 1px 3px rgba(11, 42, 33, 0.05);
  --shadow-lg: 0 24px 56px rgba(11, 42, 33, 0.13);
  --rhythm: clamp(4rem, 9vw, 8rem);
  --header-h: 4.0625rem;
  --guide-w: 380px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061a14;
    --bg-muted: #0a241b;
    --bg-raised: #0d2b20;
    --bg-invert: #030f0b;
    --bg-invert-raised: #0a241b;
    --text: #e6f2eb;
    --text-muted: #a6c4b5;
    --text-invert: #e6f2eb;
    --text-invert-muted: #a6c4b5;
    --border: #1a3a2d;
    --border-strong: #608577;
    --border-invert: #1d4234;
    --link: #c9f24a;
    --link-hover: #dbf77f;
    --focus: #c9f24a;
    --accent-100: #113025;
    --accent-700: #c9f24a;
    --accent-line: #3aa87e;
    --em-highlight: transparent;
    --signal-700: #f0c48a;
    --signal-100: #2a1f10;
    --good-700: #7fdcaf;
    --good-100: #0d2b1f;
    --warn-700: #f5a8a8;
    --warn-100: #2a1414;
    --forest-100: #113025;
    --forest-050: #0a241b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.55);
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Typography -------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  color: var(--text);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 2em 0 0.55em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
  margin-top: 0;
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.1;
}
/* V1.5 highlighter: a mint band behind the emphasised line, a mint rule under it. */
h1 em,
h2 em {
  font-style: normal;
  background: var(--em-highlight);
  box-shadow: 0 0.12em 0 var(--lime-500);
}
@media (prefers-color-scheme: dark) {
  h1 em,
  h2 em {
    color: var(--lime-500);
    box-shadow: none;
  }
}
h2 {
  font-size: var(--step-3);
  letter-spacing: -0.028em;
  font-weight: 660;
}
h3 {
  font-size: var(--step-1);
  letter-spacing: -0.018em;
  font-weight: 640;
  line-height: 1.25;
}
h4 {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 640;
  color: var(--text-muted);
  line-height: 1.4;
}

p,
ul,
ol,
blockquote,
table {
  margin: 0 0 1.15em;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 660;
  color: var(--text);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.08em 0.34em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

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

ul,
ol {
  padding-left: 1.3rem;
}
li + li {
  margin-top: 0.35rem;
}

blockquote {
  margin: 1.6rem 0;
  padding: 0 0 0 1.2rem;
  border-left: 3px solid var(--lime-500);
  color: var(--text);
  font-size: var(--step-1);
}
blockquote p:last-child {
  margin-bottom: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}
.wrap-wide {
  max-width: var(--wrap-wide);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--lime-500);
  color: var(--lime-ink);
  padding: 0.7rem 1.1rem;
  font-weight: 640;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(10px)) and (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
  }
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-logo {
  display: block;
  height: 1.7rem;
  width: auto;
}
@media (prefers-color-scheme: dark) {
  .brand-logo {
    filter: brightness(0) invert(1);
  }
}
.brand-word {
  line-height: 1;
}

.site-nav {
  margin-inline-start: auto;
}
.nav-list {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-list a {
  display: inline-block;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  white-space: nowrap;
}
.nav-list a:hover {
  background: var(--bg-muted);
  color: var(--link);
}
.nav-list a[aria-current='page'] {
  color: var(--text);
  background: var(--accent-100);
  font-weight: 650;
}
.nav-list a.facts-link {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
}
.header-actions .btn {
  white-space: nowrap;
}
.header-search {
  font-size: var(--step--1);
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.4rem;
  font-weight: 560;
}
.header-login {
  font-size: var(--step--1);
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.4rem;
  font-weight: 560;
}
.header-login:hover {
  color: var(--link);
  text-decoration: underline;
}
.nav-login {
  display: none;
}

.header-search:hover {
  color: var(--link);
  text-decoration: underline;
}

.nav-toggle {
  display: none;
}

@media (max-width: 64rem) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .site-nav {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
  }
  .header-actions {
    margin-inline-start: auto;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: var(--step--1);
    font-weight: 600;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
    margin: 0 0 0.4rem;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 1rem;
    height: 2px;
    background: currentColor;
    content: '';
  }
  .nav-toggle-bars {
    position: relative;
  }
  .nav-toggle-bars::before {
    position: absolute;
    top: -5px;
  }
  .nav-toggle-bars::after {
    position: absolute;
    top: 5px;
  }
  .nav-panel {
    display: none;
    padding-bottom: 0.6rem;
  }
  .nav-panel.is-open {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--border);
  }
  .nav-list li {
    margin: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-list a {
    display: block;
    padding: 0.8rem 0.2rem;
    border-radius: 0;
    font-size: var(--step-0);
  }
  .nav-list a[aria-current='page'] {
    box-shadow: inset 3px 0 0 var(--lime-500);
    padding-left: 0.7rem;
  }
}

@media (max-width: 34rem) {
  .header-search,
  .header-login {
    display: none;
  }
  .nav-login {
    display: block;
    padding: 0.8rem 0.2rem;
    font-size: var(--step-0);
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
  }
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--forest-900);
  color: #ffffff;
  border: 2px solid var(--forest-900);
  border-radius: 999px;
  padding: 0.7em 1.3em;
  font: inherit;
  font-size: var(--step-0);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.btn:hover {
  background: var(--forest-700);
  border-color: var(--forest-700);
  color: #ffffff;
}
.section-invert .btn,
.site-footer .btn {
  background: var(--lime-500);
  border-color: var(--lime-500);
  color: var(--lime-ink);
}
.section-invert .btn:hover,
.site-footer .btn:hover {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--lime-ink);
}
@media (prefers-color-scheme: dark) {
  .btn {
    background: var(--lime-500);
    border-color: var(--lime-500);
    color: var(--lime-ink);
  }
  .btn:hover {
    background: var(--lime-400);
    border-color: var(--lime-400);
    color: var(--lime-ink);
  }
}
.btn-sm {
  padding: 0.45em 1em;
  font-size: var(--step--1);
}
.btn-secondary {
  background: transparent;
  color: var(--forest-900);
  border-color: var(--forest-900);
}
.btn-secondary:hover {
  background: var(--accent-100);
  color: var(--forest-900);
  border-color: var(--forest-900);
}
@media (prefers-color-scheme: dark) {
  .btn-secondary {
    color: var(--lime-500);
    border-color: var(--lime-500);
  }
  .btn-secondary:hover {
    background: var(--accent-100);
    color: var(--lime-500);
    border-color: var(--lime-500);
  }
}
.btn-quiet {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.btn-quiet:hover {
  background: var(--bg-muted);
  color: var(--text);
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.8rem 0 0;
}

/* Main layout ------------------------------------------------------------ */

.site-main {
  display: block;
  min-height: 50vh;
}

.breadcrumb {
  border-bottom: 1px solid var(--border);
  font-size: var(--step--1);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 auto;
  padding: 0.75rem clamp(1.15rem, 4vw, 2.5rem);
  max-width: var(--wrap);
  color: var(--text-muted);
}
.breadcrumb li + li::before {
  content: '/';
  margin-right: 0.4rem;
  color: var(--border-strong);
}
.breadcrumb li {
  margin: 0;
}
.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb [aria-current='page'] {
  color: var(--text);
  font-weight: 560;
}

.section {
  padding: var(--rhythm) 0;
}
.section-tight {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0;
}
.section-muted {
  background: var(--bg-muted);
  border-block: 1px solid var(--border);
}
/* Two plain bands in a row read as one long column without a seam. */
.section + .section:not(.section-muted):not(.section-invert) {
  border-top: 1px solid var(--border);
}
.section-invert {
  background: var(--bg-invert);
  color: var(--text-invert);
}
.section-invert h1,
.section-invert h2,
.section-invert h3 {
  color: var(--text-invert);
}
.section-invert h4,
.section-invert .eyebrow {
  color: var(--lime-500);
}
.section-invert p,
.section-invert li {
  color: var(--text-invert);
}
.section-invert .text-muted,
.section-invert .card p {
  color: var(--text-invert-muted);
}
.section-invert a {
  color: var(--lime-500);
}
.section-invert a:hover {
  color: var(--lime-400);
}
.section-invert .card {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
}
.section-invert .card h3 {
  color: var(--text-invert);
}
.section-invert :focus-visible {
  outline-color: var(--focus-invert);
}
.section-invert .btn-secondary {
  color: var(--text-invert);
  border-color: var(--text-invert-muted);
}
.section-invert .btn-secondary:hover {
  background: var(--bg-invert-raised);
  color: var(--text-invert);
  border-color: var(--lime-500);
}

.section-head {
  max-width: 56rem;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}
.section-head h2 {
  margin-top: 0;
  font-size: var(--step-4);
  max-width: 20ch;
}
.section-head p {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 0;
  max-width: 54ch;
}
.section-head p + p {
  margin-top: 0.7rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 1em;
}
.eyebrow::before {
  content: '';
  flex: none;
  width: 1.6rem;
  height: 3px;
  border-radius: 2px;
  background: var(--lime-500);
}
.section-invert .eyebrow {
  color: var(--lime-500);
}

.lede {
  font-size: var(--step-2);
  line-height: 1.34;
  color: var(--text);
  letter-spacing: -0.018em;
  max-width: 30ch;
  font-weight: 450;
}
@media (min-width: 52rem) {
  .lede {
    max-width: 34ch;
  }
}

/* Prose ------------------------------------------------------------------ */

.prose {
  max-width: var(--wrap-narrow);
  font-size: var(--step-0);
}
.prose-wide {
  max-width: 60rem;
}
.prose > h2:first-child,
.prose > h3:first-child {
  margin-top: 0;
}
.prose h2 {
  margin-top: 2.6em;
  padding-top: 0.2em;
}
.prose h2 + p,
.prose h3 + p {
  margin-top: 0;
}
.prose > .grid,
.prose > .table-wrap,
.prose > .note,
.prose > .statement,
.prose > .chain,
.prose > .frag,
.prose > .layer {
  margin-block: 2rem;
}

.anchor {
  margin-left: 0.4rem;
  color: var(--border-strong);
  text-decoration: none;
  font-weight: 400;
  opacity: 0;
  font-size: 0.8em;
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

.page-head {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--border);
}
.page-head h1 {
  max-width: 30ch;
}
.page-head h1 em {
  font-style: normal;
  color: var(--accent-700);
}
.page-head .lede {
  margin: 1.1rem 0 0;
  color: var(--text-muted);
  max-width: 52ch;
  font-size: var(--step-1);
}
.page-meta {
  margin: 1.6rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.page-meta span + span::before {
  content: '·';
  margin-right: 0.75rem;
  color: var(--border-strong);
}

.layout-doc {
  display: block;
}
@media (min-width: 64rem) {
  .layout-doc.has-toc {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .layout-doc.has-toc .toc {
    position: sticky;
    top: 6rem;
  }
}

.toc {
  border-left: 2px solid var(--border);
  padding-left: 1.1rem;
  margin-bottom: 2rem;
  font-size: var(--step--1);
}
.toc-heading {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.7rem;
  font-weight: 680;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.toc li {
  margin: 0 0 0.5rem;
}
.toc a {
  color: var(--text-muted);
  text-decoration: none;
}
.toc a:hover {
  color: var(--link);
  text-decoration: underline;
}

/* Cards and grids -------------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.6rem);
}
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
}
.grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.4vw, 1.7rem);
  position: relative;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}
.card::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 3px;
  background: var(--lime-500);
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity 0.14s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card:hover::before {
  opacity: 1;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: var(--step-1);
}
.card h3 a {
  color: var(--text);
  text-decoration: none;
}
.card h3 a:hover {
  color: var(--link);
  text-decoration: underline;
}
.card p {
  margin: 0 0 0.8rem;
  color: var(--text-muted);
}
.card p:last-child {
  margin-bottom: 0;
}
.card-link {
  font-size: var(--step--1);
  font-weight: 640;
  text-decoration: none;
  color: var(--link);
}
.card-link::after {
  content: ' →';
}
.card-link:hover {
  text-decoration: underline;
}
.card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 5px;
  background: var(--forest-900);
  color: var(--lime-500);
  font-size: var(--step--1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.9rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}
.tag-row li {
  margin: 0;
}
.tag {
  display: inline-block;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.24rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-100);
  color: var(--accent-700);
  white-space: nowrap;
}
.tag-status {
  margin-left: 0.4rem;
}
.tag-demonstrated {
  background: var(--good-100);
  color: var(--good-700);
}
.tag-implementation-dependent {
  background: var(--signal-100);
  color: var(--signal-700);
}
.tag-architectural-position {
  background: var(--accent-100);
  color: var(--accent-700);
}
.tag-unverified {
  background: var(--warn-100);
  color: var(--warn-700);
}

/* Hero (V1.5) ------------------------------------------------------------ */

.hero {
  background: var(--bg);
  color: var(--text);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3.5rem);
}
.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(2.6rem, 5vw, var(--step-5));
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: wrap;
}
.hero .lede {
  margin: 1.6rem 0 1.8rem;
  color: var(--text-muted);
  max-width: 46ch;
  font-size: var(--step-1);
  line-height: 1.5;
  letter-spacing: -0.005em;
  font-weight: 400;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
@media (max-width: 52rem) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.hero .btn-row {
  margin: 0;
}
.hero-trust {
  margin: 1.4rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.hero-support {
  margin: 0.5rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
  max-width: 46ch;
}

/* Journey takes / You keep: dark teal left column, white right column. */
.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.panel li {
  padding: 0.3em 0;
  font-size: var(--step-0);
  font-weight: 600;
}
.panel-take li + li,
.panel-keep li + li {
  border-top: 1px solid var(--border-invert);
}
.panel-keep li + li {
  border-top-color: var(--border);
}
.panel-take,
.panel-keep {
  padding: 1.35rem 1.5rem;
}
.panel-take {
  background: var(--forest-900);
  color: var(--text-invert);
}
.panel-label {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.2em;
}
.panel-take .panel-label {
  color: var(--lime-500);
}

/* "Ask about this:" rows. Revealed by guide.js. */
.ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.9rem;
  margin: 1.4rem 0 0;
  font-size: 0.8125rem;
}
.ask[hidden] {
  display: none;
}
.ask-l {
  color: var(--text-muted);
}
.ask-q {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  cursor: pointer;
  text-align: left;
}
.ask-q:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}
.section-invert .ask-l,
.section-invert .ask-q {
  color: var(--text-invert-muted);
}
.section-invert .ask-q:hover {
  color: var(--text-invert);
}

/* Just the facts band */
.facts-band {
  background: var(--forest-900);
  color: var(--text-invert);
  padding: clamp(1.75rem, 3.5vw, 2.75rem) 0;
  scroll-margin-top: var(--header-h);
}
.facts-h {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--lime-500);
  margin: 0 0 1.2em;
}
.facts-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 1.5rem;
}
.facts-list dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime-500);
  margin-bottom: 0.4em;
}
.facts-list dd {
  margin: 0;
  font-size: var(--step-0);
  line-height: 1.45;
  color: var(--text-invert);
}
.facts-list > div {
  border-top: 1px solid var(--border-invert);
  padding-top: 0.9rem;
}
.facts-note {
  margin: 1.4rem 0 0;
  font-size: var(--step--1);
  color: var(--text-invert-muted);
}
.facts-band a {
  color: var(--lime-500);
}
.facts-band strong {
  color: var(--text-invert);
}
.facts-band :focus-visible {
  outline-color: var(--focus-invert);
}
@media (max-width: 52rem) {
  .facts-list {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 32rem) {
  .facts-list {
    grid-template-columns: 1fr;
  }
}

/* Hero diagram: the stack above, the layer between, the outcome below. */

.stack-diagram {
  border: 1px solid var(--border-invert);
  border-radius: var(--radius-lg);
  background: var(--bg-invert-raised);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  display: grid;
  gap: 0.85rem;
}
.stack-row {
  display: grid;
  gap: 0.5rem;
}
.stack-label {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-invert-muted);
  margin: 0;
}
.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.stack-chips li {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 560;
  color: var(--text-invert);
  border: 1px solid var(--border-invert);
  background: var(--bg-invert);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
}
.stack-join {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-invert-muted);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin: 0;
}
.stack-join::before,
.stack-join::after {
  content: '';
  height: 1px;
  flex: 1 1 auto;
  background: var(--border-invert);
}
.stack-core {
  border: 1px solid var(--lime-500);
  border-radius: var(--radius);
  background: var(--bg-invert);
  padding: 1rem 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(201, 242, 74, 0.18);
}
.stack-core-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.55rem;
}
.stack-core-name strong {
  color: var(--lime-500);
  font-size: var(--step-1);
  letter-spacing: -0.02em;
}
.stack-core-name span {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-invert-muted);
  font-weight: 700;
}
.stack-core-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
  color: var(--text-invert);
}
.stack-core-steps li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 560;
}
.stack-core-steps li + li::before {
  content: '';
  width: 0.9rem;
  height: 2px;
  background: var(--lime-500);
}
.stack-out {
  display: grid;
  gap: 0.35rem;
  border-radius: var(--radius);
  background: var(--lime-500);
  color: var(--lime-ink);
  padding: 0.85rem 1.1rem;
}
.stack-out p {
  margin: 0;
  color: var(--lime-ink);
}
.stack-out-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.stack-out-note {
  font-size: var(--step--1);
}

/* Statement bands -------------------------------------------------------- */

.statement {
  border-top: 4px solid var(--lime-500);
  padding-top: clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 50rem;
}
.statement-kicker {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.section-invert .statement-kicker {
  color: var(--lime-500);
}
.statement-text {
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 680;
  margin: 0;
  text-wrap: balance;
}
.statement-text em {
  font-style: normal;
  color: var(--accent-700);
  box-shadow: inset 0 -0.32em 0 var(--em-highlight);
}
.section-invert .statement-text em {
  color: var(--lime-500);
  box-shadow: none;
}
.statement-note {
  margin: 1.3rem 0 0;
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 44ch;
}
.section-invert .statement-note {
  color: var(--text-invert-muted);
}
.statement-note:last-child {
  margin-bottom: 0;
}

/* Fragmentation diagram -------------------------------------------------- */

.frag {
  display: grid;
  gap: 1.1rem;
}
.frag-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.frag-tile {
  position: relative;
  margin: 0;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 1.05rem 2.1rem 1.05rem 1.1rem;
}
.frag-tile::after {
  content: '';
  position: absolute;
  right: 0.85rem;
  top: 1.25rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}
.section-invert .frag-tile {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
}
.frag-tile-label {
  display: block;
  font-weight: 660;
  font-size: var(--step-0);
  letter-spacing: -0.015em;
  margin-bottom: 0.2rem;
}
.frag-tile-note {
  display: block;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.section-invert .frag-tile-note {
  color: var(--text-invert-muted);
}
.frag-spine {
  display: grid;
  gap: 0.5rem;
  border-radius: var(--radius-lg);
  background: var(--forest-900);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-md);
}
.frag-spine p {
  margin: 0;
}
.frag-spine-title {
  font-weight: 700;
  font-size: var(--step-3);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--lime-500);
}
.frag-spine-note {
  font-size: var(--step-0);
  color: var(--text-invert-muted);
  max-width: 70ch;
}

/* Chain diagram: signal to learning ------------------------------------- */

.chain {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: chain;
}
.chain-node {
  margin: 0;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 1.05rem 1.05rem 1.15rem;
  display: grid;
  gap: 0.3rem;
  align-content: start;
}
.section-invert .chain-node {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
}
.chain-node::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: var(--lime-500);
  border-radius: var(--radius) var(--radius) 0 0;
}
.chain-node-human::after {
  background: var(--accent-line);
}
.chain-num {
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin: 0.15rem 0 0;
}
.section-invert .chain-num {
  color: var(--lime-500);
}
.chain-name {
  font-size: var(--step-1);
  font-weight: 660;
  letter-spacing: -0.02em;
  margin: 0;
}
.chain-note {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin: 0;
}
.section-invert .chain-note {
  color: var(--text-invert-muted);
}
.chain-owner {
  margin: 0.35rem 0 0;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--accent-700);
}
.section-invert .chain-owner {
  color: var(--lime-500);
}

/* Connection-layer diagram ---------------------------------------------- */

.layer {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
  padding: clamp(1rem, 2.5vw, 1.75rem);
}
.section-invert .layer {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
}
.layer-band {
  display: grid;
  gap: 0.55rem;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 1rem 1.1rem;
}
.section-invert .layer-band {
  background: var(--bg-invert);
  border-color: var(--border-invert);
}
.layer-band-core {
  background: var(--forest-900);
  border-color: var(--forest-900);
  color: var(--text-invert);
}
.layer-band-core .layer-band-label {
  color: var(--lime-500);
}
.layer-band-label {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
}
.layer-band-title {
  font-size: var(--step-1);
  font-weight: 660;
  letter-spacing: -0.02em;
  margin: 0;
}
.layer-band-core .layer-band-title {
  color: var(--text-invert);
}
.layer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.layer-chips li {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 560;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: var(--bg-muted);
}
.layer-band-core .layer-chips li {
  background: var(--forest-800);
  border-color: var(--border-invert);
  color: var(--text-invert);
}
.section-invert .layer-chips li {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
}
.layer-arrow {
  margin: 0;
  text-align: center;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--accent-700);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.section-invert .layer-arrow {
  color: var(--lime-500);
}
.layer-arrow::before,
.layer-arrow::after {
  content: '';
  height: 2px;
  flex: 1 1 auto;
  background: var(--lime-500);
}

/* Pillars ---------------------------------------------------------------- */

.pillars {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pillar;
}
.pillar {
  margin: 0;
  border-top: 2px solid var(--text);
  padding-top: 1.1rem;
}
.section-invert .pillar {
  border-top-color: var(--lime-500);
}
.pillar-name {
  font-size: var(--step-2);
  font-weight: 660;
  letter-spacing: -0.028em;
  margin: 0 0 0.6rem;
  line-height: 1.15;
}
.pillar-body {
  margin: 0;
  color: var(--text-muted);
}
.section-invert .pillar-body {
  color: var(--text-invert-muted);
}

/* Conversion band -------------------------------------------------------- */

.cta {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 60rem) {
  .cta {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 3rem;
  }
}
.cta-title {
  font-size: var(--step-4);
  line-height: 1.1;
  letter-spacing: -0.032em;
  margin: 0;
  font-weight: 680;
  text-wrap: balance;
}
.cta-note {
  margin: 1rem 0 0;
  color: var(--text-invert-muted);
  max-width: 44ch;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: stretch;
}
.cta-actions .btn {
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-size: var(--step-0);
}
.cta-actions .btn::after {
  content: '→';
  font-weight: 400;
}

/* Notes and callouts ----------------------------------------------------- */

.note {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-line);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-muted);
  padding: 1.1rem 1.25rem;
  margin: 1.9rem 0;
  font-size: var(--step--1);
}
.note > :last-child {
  margin-bottom: 0;
}
.note-label {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}
.note-limits {
  border-left-color: var(--border-strong);
}
.note-limits .note-label {
  color: var(--text-muted);
}
.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}
.callout > :last-child {
  margin-bottom: 0;
}
.callout-title {
  margin: 0 0 0.6rem;
  font-size: var(--step-1);
}

/* Tables ---------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.9rem 0;
  background: var(--bg-raised);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--step--1);
  margin: 0;
}
td,
th {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--border);
}
thead th {
  background: var(--bg-muted);
  font-size: var(--step--1);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--text-muted);
  white-space: normal;
}
tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}
tbody th {
  font-weight: 640;
  color: var(--text);
}

/* Sources and citations -------------------------------------------------- */

.sources {
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.sources h2 {
  font-size: var(--step-1);
  margin: 0 0 0.5rem;
}
.source-list {
  font-size: var(--step--1);
  padding-left: 1.3rem;
  color: var(--text-muted);
}
.source-list li {
  margin-bottom: 0.75rem;
}
.source-org {
  font-weight: 640;
  color: var(--text);
}
.source-meta {
  display: block;
  color: var(--text-muted);
}

/* Answer pages ---------------------------------------------------------- */

.answer-block {
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--forest-050);
  padding: clamp(1.2rem, 2.5vw, 1.7rem);
  margin: 0 0 2.5rem;
}
.answer-block p {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--text);
}
.answer-block .note-label {
  color: var(--accent-700);
}

.qa-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.qa-item {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  background: var(--bg-raised);
  transition: border-color 0.14s ease;
}
.qa-item:hover {
  border-color: var(--border-strong);
}
.qa-item h3 {
  margin: 0 0 0.35rem;
  font-size: var(--step-1);
}
.qa-item h3 a {
  color: var(--text);
  text-decoration: none;
}
.qa-item h3 a:hover {
  color: var(--link);
  text-decoration: underline;
}
.qa-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}
.related-list li {
  margin: 0;
}
.related-list a {
  display: block;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 560;
  font-size: var(--step--1);
}
.related-list a:hover {
  border-color: var(--border-strong);
  background: var(--bg-muted);
  color: var(--link);
}

/* Demo ------------------------------------------------------------------ */

.demo {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 0;
}
.demo-notice {
  margin: 0;
  background: var(--forest-900);
  color: var(--text-invert);
  font-size: var(--step--1);
  padding: 0.7rem clamp(1rem, 3vw, 1.75rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  border-bottom: 1px solid var(--forest-900);
}
.demo-notice strong {
  color: var(--lime-500);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: var(--step--2);
  font-weight: 700;
}
.demo-head {
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 1.75rem) 0;
}
.demo-head h2,
.demo-head h3 {
  margin: 0 0 0.6rem;
  font-size: var(--step-3);
  letter-spacing: -0.03em;
  max-width: 22ch;
}
.demo-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 62ch;
}
.demo-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.5rem, 4vw, 3rem);
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
}
.demo-meta-row li {
  margin: 0;
  display: grid;
  gap: 0.1rem;
}
.demo-fig {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--text);
}
.demo-fig-label {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
}

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background: var(--bg-muted);
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1rem, 3vw, 1.75rem) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 620;
  padding: 0.7rem 1rem;
  cursor: pointer;
  position: relative;
  bottom: -1px;
}
.demo-tab-count {
  min-width: 1.4rem;
  text-align: center;
  font-size: var(--step--2);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  background: var(--border);
  color: var(--text-muted);
}
.demo-tab[aria-selected='true'] .demo-tab-count {
  background: var(--forest-900);
  color: var(--lime-500);
}
.demo-tab:hover {
  color: var(--text);
  background: var(--bg-raised);
}
.demo-tab[aria-selected='true'] {
  color: var(--text);
  background: var(--bg-raised);
  border-color: var(--border);
}
.demo-tab[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 3px;
  background: var(--lime-500);
  border-radius: 3px 3px 0 0;
}

.demo-panel {
  padding: clamp(1.25rem, 3vw, 1.9rem) clamp(1rem, 3vw, 1.75rem);
}
.demo-panel[hidden] {
  display: none;
}
.demo-role-head {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.demo-role-count {
  margin: 0;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-muted);
}
.demo-role-head h3 {
  margin: 0;
  font-size: var(--step-2);
  letter-spacing: -0.028em;
}
.demo-role-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
  max-width: 70ch;
}

.demo-queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.demo-item {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  overflow: hidden;
}
.demo-item:hover {
  border-color: var(--border-strong);
}
.demo-item-heading {
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  font-size: var(--step-0);
}
.demo-item-toggle {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  background: var(--bg-muted);
  border: 0;
  border-bottom: 1px solid var(--border);
  font: inherit;
  color: var(--text);
  text-align: left;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
}
.demo-item-toggle:hover {
  background: var(--accent-100);
}
.demo-item-caret {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 4px;
  background: var(--forest-900);
  position: relative;
}
.demo-item-caret::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.42rem;
  height: 0.42rem;
  margin: -0.28rem 0 0 -0.24rem;
  border-right: 2px solid var(--lime-500);
  border-bottom: 2px solid var(--lime-500);
  transform: rotate(-45deg);
  transition: transform 0.14s ease;
}
.demo-item-toggle[aria-expanded='true'] .demo-item-caret::before {
  transform: rotate(45deg);
  margin-top: -0.34rem;
}
.demo-item-titles {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
}
.demo-item-account {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
}
.demo-item-headline {
  font-weight: 620;
  letter-spacing: -0.015em;
}
.demo-priority {
  flex: 0 0 auto;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.24rem 0.5rem;
  white-space: nowrap;
}
.demo-priority-high {
  background: var(--warn-100);
  color: var(--warn-700);
}
.demo-priority-medium {
  background: var(--signal-100);
  color: var(--signal-700);
}
.demo-priority-low {
  background: var(--accent-100);
  color: var(--accent-700);
}

.demo-item-body {
  padding: 1.25rem 1.1rem 1.4rem;
  display: grid;
  gap: 1.1rem;
}
.demo-item-body[hidden] {
  display: none;
}

/* The lineage rail: which stage this item is at, and what it carries. */
.demo-lineage-rail {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
}
.demo-lineage-label {
  margin: 0;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-muted);
}
.demo-lineage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.demo-lineage li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.24rem 0.6rem;
}
.demo-lineage li::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--lime-500);
}
.demo-lineage li.demo-lineage-human {
  border-color: var(--accent-line);
  color: var(--accent-700);
  background: var(--accent-100);
}
.demo-lineage li.demo-lineage-human::before {
  background: var(--accent-700);
}
.demo-lineage li.demo-lineage-human.is-done {
  background: var(--lime-500);
  border-color: var(--lime-500);
  color: var(--lime-ink);
}
.demo-lineage li.demo-lineage-human.is-done::before {
  background: var(--lime-ink);
}

.demo-stage {
  border-left: 2px solid var(--border);
  padding-left: 1.1rem;
}
.demo-stage > :last-child {
  margin-bottom: 0;
}
.demo-stage-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 0.55rem;
}
.demo-stage-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--forest-900);
  color: var(--lime-500);
  font-size: 0.72rem;
  letter-spacing: 0;
}
.demo-stage ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: var(--step--1);
}
.demo-stage p {
  margin: 0 0 0.5rem;
  font-size: var(--step--1);
}
.demo-meta {
  color: var(--text-muted);
  font-size: var(--step--2);
}
.demo-source {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-700);
  background: var(--accent-100);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.5rem;
}

.demo-draft {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  padding: 1rem 1.1rem;
}
.demo-draft-kind {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin: -1rem -1.1rem 0.9rem;
  padding: 0.55rem 1.1rem;
  background: var(--forest-900);
  color: var(--text-invert);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.demo-draft-kind span {
  color: var(--lime-500);
}
.demo-draft-subject {
  font-weight: 660;
  margin: 0 0 0.5rem;
  font-size: var(--step-0);
  letter-spacing: -0.015em;
}
.demo-draft-body {
  margin: 0 0 0.7rem;
  font-size: var(--step--1);
  line-height: 1.6;
}
.demo-draft-note {
  margin: 0;
  font-size: var(--step--2);
  color: var(--text-muted);
  border-top: 1px dashed var(--border-strong);
  padding-top: 0.6rem;
}

.demo-decision {
  border: 1px solid var(--accent-line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--forest-050);
  padding: 1.2rem 1.25rem;
}
.demo-decision .demo-stage-label {
  color: var(--accent-700);
}
.demo-decision-prompt {
  font-weight: 620;
  margin: 0 0 0.9rem;
  font-size: var(--step-0);
}
.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.demo-actions [data-selected] {
  box-shadow: 0 0 0 2px var(--text);
}
.demo-outcome {
  margin-top: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-line);
  background: var(--bg-raised);
  padding: 0.8rem 0.95rem;
  font-size: var(--step--1);
}
.demo-outcome[hidden] {
  display: none;
}
.demo-outcome-label {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-700);
  margin: 0 0 0.35rem;
}
.demo-outcome p:last-child {
  margin-bottom: 0;
}
.demo-outcome-static {
  margin-top: 0.9rem;
  font-size: var(--step--1);
}
.demo-outcome-static ul {
  margin: 0;
  padding-left: 1.15rem;
}

.demo-log {
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  padding: clamp(1.25rem, 3vw, 1.9rem) clamp(1rem, 3vw, 1.75rem);
}
.demo-log h3 {
  margin: 0 0 0.4rem;
  font-size: var(--step-1);
}
.demo-log p {
  margin: 0 0 0.9rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  max-width: 66ch;
}
.demo-log ol {
  margin: 0;
  padding-left: 1.3rem;
  font-size: var(--step--1);
}
.demo-log ol li {
  margin-bottom: 0.5rem;
}
.demo-log-empty {
  font-style: italic;
}
.demo-reset {
  margin-top: 0.6rem;
}

.demo-timeline {
  list-style: none;
  margin: 2rem 0;
  padding: 0 0 0 1.9rem;
  position: relative;
}
.demo-timeline li {
  position: relative;
  padding-bottom: 1.9rem;
  margin: 0;
}
.demo-timeline li::after {
  content: '';
  position: absolute;
  left: -1.9rem;
  top: 1.6rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.demo-timeline li:last-child {
  padding-bottom: 0;
}
.demo-timeline li:last-child::after {
  display: none;
}
.demo-timeline li::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.45rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--lime-500);
  border: 2px solid var(--bg);
}
.demo-timeline-when {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 0.2rem;
}
.demo-timeline h3 {
  margin: 0 0 0.35rem;
  font-size: var(--step-1);
}
.demo-timeline p {
  margin: 0 0 0.4rem;
  color: var(--text-muted);
  font-size: var(--step--1);
  max-width: 62ch;
}
.demo-timeline-gate {
  color: var(--text);
  border-left: 2px solid var(--lime-500);
  padding-left: 0.7rem;
  margin-bottom: 0;
}

/* Forms ----------------------------------------------------------------- */

.form {
  display: grid;
  gap: 1.2rem;
  max-width: 34rem;
  margin: 2rem 0;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field > label {
  font-weight: 620;
  font-size: var(--step--1);
}
.field-hint {
  margin: 0;
  font-size: var(--step--2);
  color: var(--text-muted);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  width: 100%;
}
.field textarea {
  min-height: 9rem;
  resize: vertical;
}
.field-required {
  color: var(--warn-700);
}
.field-checkbox {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.6rem;
}
.field-checkbox input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.25rem;
}
.field-checkbox label {
  font-weight: 400;
  font-size: var(--step--1);
}
.form-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Search ---------------------------------------------------------------- */

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: end;
  margin: 0 0 1.5rem;
}
.search-form .field {
  flex: 1 1 18rem;
}
.search-status {
  font-size: var(--step--1);
  color: var(--text-muted);
}
.search-results {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.search-results li {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: var(--bg-raised);
}
.search-results h3 {
  margin: 0 0 0.3rem;
  font-size: var(--step-1);
}
.search-results p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.search-results mark {
  background: var(--lime-100);
  color: var(--lime-ink);
  padding: 0 0.1em;
}
.search-kind {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

/* Draft banner ---------------------------------------------------------- */

.draft-banner {
  background: var(--warn-100);
  color: var(--warn-700);
  border-bottom: 1px solid var(--warn-700);
  font-size: var(--step--1);
  padding: 0.7rem 0;
}
.draft-banner .wrap {
  max-width: var(--wrap);
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  background: var(--bg-invert);
  color: var(--text-invert);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem;
  font-size: var(--step--1);
}
.site-footer a {
  color: var(--text-invert);
}
.site-footer a:hover {
  color: var(--lime-500);
}
.site-footer :focus-visible {
  outline-color: var(--focus-invert);
}
.footer-top {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 60rem) {
  .footer-top {
    grid-template-columns: 20rem minmax(0, 1fr);
  }
}
.footer-brand .brand {
  font-size: var(--step-2);
  color: var(--text-invert);
}
.footer-brand .brand-logo {
  filter: brightness(0) invert(1);
}
.footer-tagline {
  font-weight: 660;
  color: var(--lime-500);
  margin: 0.9rem 0 0.6rem;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
}
.footer-note {
  color: var(--text-invert-muted);
  margin: 0;
}
.footer-nav {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
}
.footer-heading {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lime-500);
  margin: 0 0 0.75rem;
  font-weight: 700;
}
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li {
  margin: 0 0 0.5rem;
}
.footer-nav a {
  color: var(--text-invert);
  text-decoration: none;
}
.footer-nav a:hover {
  text-decoration: underline;
  color: var(--lime-500);
}
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--border-invert);
  color: var(--text-invert-muted);
  display: grid;
  gap: 0.4rem;
}
.footer-bottom p {
  margin: 0;
  color: var(--text-invert-muted);
}
.build-meta a {
  color: var(--text-invert-muted);
}

/* Utilities ------------------------------------------------------------- */

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

.stack-tight > * + * {
  margin-top: 0.5rem;
}
.text-muted {
  color: var(--text-muted);
}
.no-js-note {
  margin: 1rem 0 0;
}
html.has-js .no-js-note {
  display: none;
}
.center {
  text-align: center;
  margin-inline: auto;
}

@media print {
  .site-header,
  .site-footer,
  .breadcrumb,
  .toc,
  .demo-actions,
  .skip-link {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}

/* ===== Conversion / proof blocks ======================================== */

/* Card tag pill */
.card-tag {
  display: inline-block;
  margin: 0 0 0.8rem;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-100);
  color: var(--accent-700);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section-invert .card-tag {
  background: var(--lime-500);
  color: var(--lime-ink);
}

/* Lead form (hero, light bands, invert bands) */
.leadform {
  margin: 1.8rem 0 0;
  max-width: 40rem;
}
.leadform-fields {
  display: grid;
  gap: 0.75rem;
  align-items: end;
}
@media (min-width: 40rem) {
  .leadform-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }
}
.leadform .field > label {
  color: inherit;
}
.leadform .btn {
  min-height: 2.9rem;
  white-space: nowrap;
}
.leadform-note {
  margin: 0.7rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.section-invert .leadform-note {
  color: var(--text-invert-muted);
}
.section-invert .leadform .field input {
  background: var(--bg-invert-raised);
  color: var(--text-invert);
  border-color: var(--text-invert-muted);
}
.section-invert .leadform label {
  color: var(--text-invert);
}

/* TBD stat placeholder */
.stat-tbd {
  display: inline-block;
  padding: 0.1em 0.5em;
  border: 2px dashed var(--signal-700);
  border-radius: var(--radius-sm);
  color: var(--signal-700);
  background: var(--signal-100);
  font-size: 0.6em;
  letter-spacing: 0.08em;
  vertical-align: middle;
}
.section-invert .stat-tbd {
  background: transparent;
  color: var(--lime-500);
  border-color: var(--lime-500);
}

/* Feature (case study) band */
.feature {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: clamp(1.4rem, 4vw, 3rem);
}
@media (min-width: 56rem) {
  .feature {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}
.section-invert .feature {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
}
.feature-label {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--lime-500);
  color: var(--lime-ink);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.feature-title {
  margin: 0 0 1rem;
  font-size: var(--step-3);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.feature-body {
  margin: 0 0 1.5rem;
  max-width: 48ch;
  color: var(--text-muted);
}
.section-invert .feature-body {
  color: var(--text-invert-muted);
}
.feature-stats {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.feature-stat {
  margin: 0;
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-muted);
  border-inline-start: 4px solid var(--lime-500);
}
.section-invert .feature-stat {
  background: var(--bg-invert);
}
.feature-stat-value {
  font-size: var(--step-4);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.feature-stat-label {
  font-size: var(--step--1);
  color: var(--text-muted);
}
.section-invert .feature-stat-label {
  color: var(--text-invert-muted);
}

/* Proof strip */
.proof {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--border);
}
.section-invert .proof {
  border-color: var(--border-invert);
}
@media (min-width: 48rem) {
  .proof {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .proof-item + .proof-item {
    border-inline-start: 1px solid var(--border);
  }
  .section-invert .proof-item + .proof-item {
    border-inline-start-color: var(--border-invert);
  }
}
.proof-item {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 1.5rem clamp(0.5rem, 2vw, 1.75rem);
}
@media (max-width: 47.99rem) {
  .proof-item + .proof-item {
    border-top: 1px solid var(--border);
  }
  .section-invert .proof-item + .proof-item {
    border-top-color: var(--border-invert);
  }
}
.proof-value {
  font-size: var(--step-5);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent-700);
}
.section-invert .proof-value {
  color: var(--lime-500);
}
.proof-label {
  font-size: var(--step-0);
  font-weight: 600;
}
.proof-source {
  font-size: var(--step--2);
  color: var(--text-muted);
}
.section-invert .proof-source {
  color: var(--text-invert-muted);
}

/* Tool stack row (text-only tiles) */
.stackrow {
  display: grid;
  gap: 1rem;
}
.stackrow-title {
  margin: 0;
  font-size: var(--step-2);
  font-weight: 660;
  letter-spacing: -0.025em;
}
.stackrow-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.stackrow-tile {
  margin: 0;
  display: grid;
  gap: 0.1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.section-invert .stackrow-tile {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
}
.stackrow-name {
  font-weight: 660;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.stackrow-cap {
  font-size: var(--step--2);
  color: var(--text-muted);
}
.section-invert .stackrow-cap {
  color: var(--text-invert-muted);
}
.stackrow-caveat {
  margin: 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.section-invert .stackrow-caveat {
  color: var(--text-invert-muted);
}

/* Problem / needs rows */
.problem {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
}
.problem-label {
  margin: 0 0 0.9rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warn-700);
}
.problem-row-needs .problem-label {
  color: var(--accent-700);
}
.section-invert .problem-label,
.section-invert .problem-row-needs .problem-label {
  color: var(--lime-500);
}
.problem-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 48rem) {
  .problem-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.problem-item {
  margin: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--warn-700);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.problem-row-needs .problem-item {
  border-inline-start-color: var(--lime-500);
}
.section-invert .problem-item {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
  border-inline-start-color: var(--text-invert-muted);
}
.section-invert .problem-row-needs .problem-item {
  border-inline-start-color: var(--lime-500);
}
.problem-title {
  margin: 0 0 0.3rem;
  font-weight: 660;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
}
.problem-body {
  margin: 0;
  color: var(--text-muted);
}
.section-invert .problem-body {
  color: var(--text-invert-muted);
}

/* Loop (flywheel) */
.loop {
  max-width: 44rem;
  margin-inline: auto;
}
.loop-svg {
  display: none;
  width: 100%;
  height: auto;
}
.loop-list {
  display: grid;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.loop-list-item {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.section-invert .loop-list-item {
  background: var(--bg-invert-raised);
  border-color: var(--border-invert);
}
.loop-list-num {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--lime-500);
  color: var(--lime-ink);
  font-weight: 700;
  font-size: var(--step--1);
}
.loop-return {
  margin: 0.8rem 0 0;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--accent-700);
}
.section-invert .loop-return {
  color: var(--lime-500);
}
@media (min-width: 48rem) {
  .loop-svg {
    display: block;
  }
  .loop-list,
  .loop-return {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
}
.loop-arc {
  fill: none;
  stroke: var(--accent-line);
  stroke-width: 2.5;
}
.loop-head {
  fill: var(--accent-line);
}
.section-invert .loop-arc {
  stroke: var(--lime-500);
}
.section-invert .loop-head {
  fill: var(--lime-500);
}
.loop-node rect {
  fill: var(--bg-raised);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}
.section-invert .loop-node rect {
  fill: var(--bg-invert-raised);
  stroke: var(--border-invert);
}
.loop-name {
  fill: var(--text);
  font-size: 17px;
  font-weight: 660;
  font-family: var(--font-sans);
}
.section-invert .loop-name {
  fill: var(--text-invert);
}
.loop-num {
  fill: var(--accent-700);
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-sans);
}
.section-invert .loop-num {
  fill: var(--lime-500);
}
.loop-centre {
  fill: var(--text-muted);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.section-invert .loop-centre {
  fill: var(--text-invert-muted);
}

.section-invert a.btn,
.section-invert a.btn:hover {
  color: var(--lime-ink);
}
.section-invert a.btn-secondary,
.section-invert a.btn-secondary:hover {
  color: var(--text-invert);
}
.loop-list-item strong {
  color: inherit;
}
.section-invert .feature-label,
.section-invert .card-tag {
  color: var(--lime-ink);
}

/* Pull quote (:::quote) */
.pullquote {
  margin: 0;
  padding: 0.25rem 0 0.25rem clamp(1rem, 3vw, 1.75rem);
  border-inline-start: 4px solid var(--accent-line);
  max-width: 46rem;
}
.pullquote-text {
  margin: 0;
  padding: 0;
  border: 0;
}
.pullquote-text p {
  margin: 0;
  font-size: var(--step-2);
  line-height: 1.3;
  font-weight: 620;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: none;
}
.pullquote-text p::before {
  content: '\201C';
}
.pullquote-text p::after {
  content: '\201D';
}
.pullquote-by {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.pullquote-name {
  font-weight: 700;
  color: var(--text);
}
.section-invert .pullquote {
  border-inline-start-color: var(--lime-500);
}
.section-invert .pullquote-text p,
.section-invert .pullquote-name {
  color: var(--text-invert);
}
.section-invert .pullquote-by {
  color: var(--text-invert-muted);
}

/* Primary nav dropdowns */
.nav-list li {
  position: relative;
}
.nav-sub {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  min-width: 14rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 0;
  z-index: 60;
}
.nav-sub li {
  margin: 0;
}
.nav-sub a {
  display: block;
  white-space: nowrap;
}
.has-sub:hover > .nav-sub,
.has-sub:focus-within > .nav-sub {
  display: block;
}
@media (max-width: 64rem) {
  .nav-sub,
  .has-sub:hover > .nav-sub,
  .has-sub:focus-within > .nav-sub {
    display: block;
    position: static;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0.4rem 1rem;
    min-width: 0;
  }
  .nav-sub a {
    padding: 0.5rem 0.2rem;
    font-size: var(--step--1);
    color: var(--text-muted);
  }
  .nav-list .nav-sub li {
    border-bottom: 0;
  }
}
.pullquote {
  margin-block: 2rem;
}
.leadform + p {
  margin-top: 1.4rem;
}

/* Journey guide (src/js/guide.js) ----------------------------------------
   Built entirely by script; nothing here renders without JavaScript. Tokens
   only, so light and dark schemes follow the rest of the site. */

.jg-root [hidden],
.jg-launcher[hidden],
.jg-panel[hidden] {
  display: none;
}

.jg-launcher {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: min(21rem, calc(100vw - 2.5rem));
}

/* Dark teal pill, mint dot, white text. The white ring keeps it legible when
   it floats over the dark teal bands. */
.jg-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-size: var(--step-0);
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 0.8em 1.3em;
  background: var(--forest-900);
  color: #ffffff;
  box-shadow: 0 0 0 2px #ffffff, var(--shadow-lg);
  cursor: pointer;
}
.jg-launch-btn:hover {
  background: var(--forest-700);
}
.jg-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--lime-500);
}

.jg-nudge {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--forest-600);
  border-radius: var(--radius);
  background: var(--lime-100);
  color: var(--lime-ink);
  box-shadow: var(--shadow-md);
  animation: jg-pop 0.25s ease-out;
}
.jg-nudge-q {
  flex: 1;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--step--1);
  padding: 0.6em 0.8em;
  cursor: pointer;
  color: inherit;
}
.jg-nudge-k {
  display: block;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--forest-600);
}
.jg-nudge-x {
  background: none;
  border: 0;
  font-size: 1.25rem;
  padding: 0 0.7rem;
  cursor: pointer;
  color: inherit;
}
.jg-nudge :focus-visible {
  outline-color: var(--forest-900);
}
@keyframes jg-pop {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
}

/* Docked right rail below the header (V1.5). On desktop the page content
   narrows to make room; below 64rem it becomes a bottom sheet. */
.jg-panel {
  position: fixed;
  z-index: 90;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  width: var(--guide-w);
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  color: var(--text);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
@media (min-width: 64.01rem) {
  .site-main,
  .site-footer {
    transition: padding-right 0.2s;
  }
  body.jg-open .site-main,
  body.jg-open .site-footer {
    padding-right: var(--guide-w);
  }
}

.jg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--forest-900);
  color: var(--text-invert);
}
.jg-head-title {
  min-width: 0;
}
.jg-title {
  display: inline;
  margin: 0;
  font-size: var(--step-0);
  font-weight: 700;
  color: inherit;
}
.jg-head .jg-muted {
  color: var(--text-invert-muted);
}
.jg-head :focus-visible {
  outline-color: var(--focus-invert);
}
.jg-head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.jg-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--lime-500);
  font: inherit;
  font-size: var(--step--1);
  cursor: pointer;
  text-decoration: underline;
}
.jg-x {
  background: none;
  border: 0;
  color: var(--text-invert);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.jg-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.jg-top,
.jg-lead {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.jg-top:empty,
.jg-lead:empty,
.jg-chips:empty {
  display: none;
}
.jg-muted {
  color: var(--text-muted);
}
.jg-small {
  font-size: 0.75rem;
}
.jg-opt {
  font-weight: 400;
  font-size: var(--step--1);
}

.jg-msg {
  padding: 0.65em 0.9em;
  border-radius: 14px;
  max-width: 92%;
  white-space: pre-wrap;
  font-size: 0.97rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.jg-bot {
  background: var(--bg-muted);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.jg-user {
  background: var(--forest-900);
  color: #ffffff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.jg-error {
  border-color: var(--warn-700);
  background: var(--warn-100);
  color: var(--warn-700);
}
@media (prefers-color-scheme: dark) {
  .jg-user {
    background: var(--lime-500);
    color: var(--lime-ink);
  }
  .jg-launch-btn {
    background: var(--lime-500);
    border-color: var(--lime-500);
    color: var(--lime-ink);
  }
  .jg-launch-btn:hover {
    background: var(--lime-400);
    border-color: var(--lime-400);
  }
  .jg-dot {
    background: var(--lime-ink);
  }
}
.jg-suggest {
  font-size: var(--step--1);
  font-weight: 600;
}

.jg-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.9rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.jg-card p {
  margin: 0;
}
.jg-card-title {
  font-weight: 700;
  font-size: 1.05rem;
}
.jg-card label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: var(--step--1);
  font-weight: 600;
}
.jg-field,
.jg-input {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 400;
  padding: 0.5em 0.7em;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  min-width: 0;
}
.jg-seats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.jg-seat {
  font: inherit;
  font-weight: 650;
  padding: 0.6em;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
}
.jg-seat:hover {
  background: var(--lime-100);
  color: var(--lime-ink);
  border-color: var(--forest-600);
}
.jg-skips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.jg-skip {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: var(--step--1);
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
}
.jg-row {
  display: flex;
  gap: 0.5rem;
}
.jg-err {
  color: var(--warn-700);
  font-size: var(--step--1);
}
.jg-err:empty {
  display: none;
}
.jg-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.jg-facts {
  margin: 0;
  display: grid;
  gap: 0.7rem;
}
.jg-facts dt {
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--good-700);
}
.jg-facts dd {
  margin: 0.15rem 0 0;
  font-size: var(--step--1);
}
.jg-factlinks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  font-size: var(--step--1);
  font-weight: 600;
}

.jg-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.jg-chip {
  font: inherit;
  font-size: var(--step--1);
  padding: 0.4em 0.9em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.jg-chip:hover {
  background: var(--lime-100);
  border-color: var(--forest-600);
  color: var(--lime-ink);
}

.jg-compose {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}
.jg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 650;
  border-radius: 999px;
  padding: 0.7em 1.3em;
  border: 2px solid var(--forest-900);
  background: var(--forest-900);
  color: #ffffff;
  cursor: pointer;
}
.jg-btn-sm {
  padding: 0.45em 1em;
  font-size: var(--step--1);
}
.jg-btn:hover:not(:disabled) {
  background: var(--forest-700);
  border-color: var(--forest-700);
}
.jg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
@media (prefers-color-scheme: dark) {
  .jg-btn {
    background: var(--lime-500);
    border-color: var(--lime-500);
    color: var(--lime-ink);
  }
  .jg-btn:hover:not(:disabled) {
    background: var(--lime-400);
    border-color: var(--lime-400);
  }
}

.jg-typing {
  display: inline-flex;
  gap: 4px;
}
.jg-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: jg-bounce 1s infinite;
}
.jg-typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.jg-typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes jg-bounce {
  50% {
    transform: translateY(-4px);
    opacity: 0.4;
  }
}

@media (max-width: 64rem) {
  .jg-panel {
    top: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 78vh;
    border-left: 0;
    border-top: 1px solid var(--border-strong);
    border-radius: 18px 18px 0 0;
  }
}
@media (max-width: 40rem) {
  .jg-launcher {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}
@media print {
  .jg-root {
    display: none;
  }
}

/* ===== Agent library ===================================================== */
.agent-nav {
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}
.agent-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.agent-nav li {
  margin: 0;
  padding: 0;
}
.agent-nav li::before {
  content: none;
}
.agent-nav a {
  display: inline-block;
  line-height: 1.3;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
}
.agent-nav a:hover {
  border-color: var(--link);
  color: var(--link);
}
.agent-fn {
  margin: 0 0 clamp(2rem, 4vw, 3.25rem);
}
.agent-fn h2 {
  scroll-margin-top: 5.5rem;
}
.agent-intro {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}
.agent-group {
  margin: 2rem 0 1rem;
}
.agent-card h3,
.agent-card h4 {
  margin: 0 0 0.6rem;
  font-size: var(--step-0);
}
.agent-card p {
  font-size: var(--step--1);
  margin: 0 0 0.55rem;
}
.agent-card p strong {
  color: var(--text);
}
.agent-card .card-tag {
  margin-bottom: 0.65rem;
}

/* Get to the Number waterfall (:::gtn) */
.gtn {
  margin: 2.4rem auto 0;
  max-width: 52rem;
}
.gtn-svg {
  display: none;
  width: 100%;
  height: auto;
}
@media (min-width: 48rem) {
  .gtn-svg {
    display: block;
  }
  .gtn-table {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
}
.gtn-bar {
  stroke-width: 1.5;
}
.gtn-gap .gtn-bar {
  fill: var(--warn-100);
  stroke: var(--warn-700);
}
.gtn-play .gtn-bar {
  fill: var(--accent-line);
  stroke: var(--accent-line);
}
.gtn-name {
  fill: var(--text);
  font-size: 15px;
  font-weight: 660;
  font-family: var(--font-sans);
}
.gtn-sub {
  fill: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-sans);
}
.gtn-val {
  fill: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
}
.gtn-axis {
  fill: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.gtn-target {
  stroke: var(--text);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}
.gtn-cap {
  margin: 0.9rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* Link out to the interactive model (:::modellink) */
.modellink {
  margin: 1.2rem 0 0;
}
.modellink-note {
  margin: 0.7rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.section-invert .modellink-note {
  color: var(--text-invert-muted);
}

/* Link band (home) */
.linkband {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.linkband > p {
  margin: 0;
  max-width: 44rem;
}

/* Video block (:::video) -------------------------------------------------- */
.video-block {
  margin: 1.6rem auto 0;
  max-width: 56rem;
}
.video-el {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--forest-900);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.video-transcript {
  margin: 0.9rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.video-transcript summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--text);
}
.video-transcript ol,
.video-transcript ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

/* Get to the number guided tour (:::gtntour) ------------------------------- */
.gt-tour {
  --gt-seg: #1f5559;
  --gt-seg-alt: #2d7378;
  --gt-seg-ink: #ffffff;
  position: relative;
  margin: 1.8rem auto 0;
  max-width: 64rem;
}
@media (prefers-color-scheme: dark) {
  .gt-tour {
    --gt-seg: #7affc3;
    --gt-seg-alt: #4fcf9f;
    --gt-seg-ink: #102b2d;
  }
}
.gt-static-note {
  color: var(--text-muted);
  font-size: var(--step--1);
}
.gt-static-list {
  padding-left: 1.2rem;
}
.gt-static-list li + li {
  margin-top: 0.5rem;
}
.gt-tour.is-ready .gt-static {
  display: none;
}

.gt-frame {
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.gt-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.65rem 1rem;
  background: var(--forest-900);
  color: #ffffff;
}
.gt-dots {
  display: inline-flex;
  gap: 0.35rem;
}
.gt-dots i {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #2f5a49;
}
.gt-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.7rem;
  font-size: var(--step--1);
  flex: 1;
  min-width: 0;
}
.gt-brand strong {
  color: #ffffff;
}
.gt-synth {
  background: var(--lime-500);
  color: var(--lime-ink);
  border-radius: 999px;
  padding: 0.1em 0.7em;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gt-restart {
  background: transparent;
  color: #dcede4;
  border: 1px solid #3f6d59;
  border-radius: 999px;
  padding: 0.3em 0.9em;
  font: inherit;
  font-size: var(--step--1);
  cursor: pointer;
}
.gt-restart:hover {
  background: #1c5c48;
  color: #ffffff;
}
.gt-progress {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}
.gt-prog-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 0.3rem;
  font-size: var(--step--2);
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  text-align: center;
}
.gt-prog-n {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  font-weight: 700;
  flex: none;
}
.gt-prog-item.is-done .gt-prog-n {
  background: var(--accent-line);
  border-color: var(--accent-line);
  color: #ffffff;
}
.gt-prog-item.is-current {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--accent-700);
}
.gt-prog-item.is-current .gt-prog-n {
  background: var(--forest-900);
  border-color: var(--forest-900);
  color: #ffffff;
}
@media (prefers-color-scheme: dark) {
  .gt-prog-item.is-current .gt-prog-n {
    background: var(--lime-500);
    border-color: var(--lime-500);
    color: var(--lime-ink);
  }
}
@media (max-width: 47.99rem) {
  .gt-prog-t {
    display: none;
  }
  .gt-prog-item.is-current .gt-prog-t {
    display: inline;
  }
  .gt-prog-item.is-current {
    flex: 4;
  }
}

.gt-stage {
  padding: 1.4rem 1.4rem 1.2rem;
  min-height: 24rem;
}
.gt-head {
  margin-bottom: 1.1rem;
}
.gt-step-l {
  margin: 0 0 0.2rem;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.gt-h {
  margin: 0;
  font-size: var(--step-2);
  line-height: 1.15;
}
.gt-h:focus {
  outline: none;
}
.gt-sub {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: var(--step--1);
}
.gt-fine {
  margin: 0.6rem 0 0;
  font-size: var(--step--2);
  color: var(--text-muted);
}
.gt-neg {
  color: var(--warn-700);
}
.gt-neg-strong {
  color: var(--warn-700);
  font-weight: 800;
}
.gt-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
}
.gt-foot .btn {
  padding: 0.35em 1em;
  font-size: var(--step--1);
}
.gt-foot .btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.gt-foot-note {
  font-size: var(--step--2);
  color: var(--text-muted);
}

/* Forecast table */
.gt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}
.gt-table th,
.gt-table td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.gt-table thead th {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.gt-table .num {
  text-align: right;
  white-space: nowrap;
}
.gt-table tbody th {
  font-weight: 600;
}
.gt-total th,
.gt-total td {
  border-top: 2px solid var(--text);
  border-bottom: 0;
  font-weight: 800;
  font-size: var(--step-0);
  padding-top: 1rem;
}
.gt-total-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 800;
  color: var(--link);
  background: var(--accent-100);
  border: 2px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 0.3em 0.7em;
  cursor: pointer;
}
.gt-total-btn:hover,
.gt-total-btn.is-pressed {
  background: var(--forest-900);
  color: #ffffff;
  border-color: var(--forest-900);
}
@media (prefers-color-scheme: dark) {
  .gt-total-btn:hover,
  .gt-total-btn.is-pressed {
    background: var(--lime-500);
    color: var(--lime-ink);
    border-color: var(--lime-500);
  }
}
.gt-total-hint {
  font-size: var(--step--2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@media (max-width: 29.99rem) {
  .gt-table th,
  .gt-table td {
    padding: 0.6rem 0.3rem;
    font-size: var(--step--2);
  }
  .gt-total th,
  .gt-total td {
    font-size: var(--step--1);
  }
  .gt-total-hint {
    display: none;
  }
}

/* Coach marks */
.gt-coachwrap {
  position: relative;
  display: inline-block;
}
.gt-coach[hidden] {
  display: none;
}
.gt-coach {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 2;
  white-space: nowrap;
  background: var(--lime-500);
  color: var(--lime-ink);
  font-size: var(--step--1);
  font-weight: 750;
  padding: 0.35em 0.8em;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  animation: gt-bob 1.6s ease-in-out infinite;
}
.gt-actions .gt-coach {
  left: 0;
  right: auto;
}
.gt-coach-arrow {
  position: absolute;
  top: -0.3rem;
  right: 1.2rem;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--lime-500);
  transform: rotate(45deg);
}
.gt-actions .gt-coach-arrow {
  left: 1.4rem;
  right: auto;
}
@keyframes gt-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
@media (prefers-color-scheme: dark) {
  .gt-coach {
    border: 1px solid var(--lime-400);
  }
}
@media (min-width: 48rem) {
  .gt-actions-tight .gt-coach {
    top: 50%;
    left: calc(100% + 0.9rem);
    margin-top: -1rem;
    animation: none;
  }
  .gt-actions-tight .gt-coach-arrow {
    top: 50%;
    left: -0.3rem;
    margin-top: -0.3rem;
  }
}
@media (min-width: 56rem) {
  .gt-wf-col {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
  }
}

/* Tiles, coverage */
.gt-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
@media (max-width: 47.99rem) {
  .gt-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}
.gt-tile,
.gt-counter-card,
.gt-remain {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  padding: 0.9rem 1rem;
}
.gt-tile-l {
  margin: 0;
  font-size: var(--step--2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.gt-tile-v {
  margin: 0.25rem 0 0;
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.gt-tile-gap {
  background: var(--warn-100);
  border-color: var(--warn-700);
}
.gt-tile-gap .gt-tile-v {
  color: var(--warn-700);
}
.gt-covrow {
  margin-top: 1.1rem;
}
.gt-cov {
  position: relative;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--warn-100);
  border: 1px solid var(--warn-700);
}
.gt-cov-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--gt-seg);
  transition: width 0.9s ease;
}
.gt-cov-mark {
  position: absolute;
  top: -0.3rem;
  bottom: -0.3rem;
  border-left: 2px dashed var(--text);
}
.gt-actions > .gt-coachwrap {
  margin-bottom: 2.4rem;
}
.gt-actions-tight > .gt-coachwrap {
  margin-bottom: 0;
}
.gt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1rem;
  margin-top: 1.4rem;
}
.gt-actions-tight {
  margin-top: 0;
  margin-bottom: 0.9rem;
}
.gt-cta {
  font-size: var(--step-1);
  padding: 0.7em 1.6em;
}
.gt-actions-tight .gt-cta {
  font-size: var(--step-0);
  padding: 0.55em 1.2em;
}
.btn.is-pressed {
  transform: scale(0.97);
}

/* Drivers */
.gt-drivers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}
.gt-driver {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  padding: 0.9rem 1rem;
}
.gt-driver-n {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--warn-100);
  color: var(--warn-700);
  border: 1.5px solid var(--warn-700);
  font-weight: 800;
}
.gt-driver-t,
.gt-confirm-t {
  margin: 0;
  font-size: var(--step-0);
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}
.gt-driver-d {
  margin: 0.3rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.gt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
}
.gt-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-100);
  color: var(--text);
  padding: 0.15em 0.8em;
  font-size: var(--step--2);
}
.gt-chip-l {
  color: var(--text-muted);
}

/* Plays */
.gt-plays-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: "left right" "left cont";
  grid-template-rows: auto 1fr;
  gap: 0 1.2rem;
  align-items: start;
}
.gt-plays-col { grid-area: left; }
.gt-wf-col { grid-area: right; }
.gt-plays-grid .gt-cont { grid-area: cont; margin-top: 1rem; }
@media (max-width: 55.99rem) {
  .gt-plays-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "right" "left" "cont";
  }
}
.gt-group-h {
  margin: 0.8rem 0 0.4rem;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.gt-playlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.gt-play {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--bg-raised);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}
.gt-play:hover {
  background: var(--bg-muted);
}
.gt-play.is-on {
  border-color: var(--gt-seg);
  background: var(--accent-100);
}
.gt-play.is-pressed {
  transform: scale(0.99);
}
.gt-play-box {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  font-size: var(--step--2);
  font-weight: 800;
  color: var(--text-muted);
}
.gt-play.is-on .gt-play-box {
  background: var(--gt-seg);
  border-color: var(--gt-seg);
  color: var(--gt-seg-ink);
}
.gt-play-body {
  display: grid;
  gap: 0.1rem;
}
.gt-play-name {
  font-weight: 700;
  font-size: var(--step--1);
}
.gt-play-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.8rem;
  font-size: var(--step--2);
  color: var(--text-muted);
}
.gt-owner {
  color: var(--text);
  font-weight: 600;
}
.gt-play-what {
  font-size: var(--step--2);
  color: var(--text-muted);
}
.gt-play-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: var(--step--1);
  white-space: nowrap;
  color: var(--text-muted);
}
.gt-play.is-on .gt-play-val {
  color: var(--text);
}
.gt-counter {
  margin: 0.2rem 0 0.7rem;
  line-height: 1.1;
}
.gt-counter-num {
  font-size: var(--step-5);
  font-weight: 800;
  color: var(--warn-700);
  font-variant-numeric: tabular-nums;
}
.gt-counter-s {
  font-size: var(--step--1);
  color: var(--text-muted);
}
.gt-wf {
  display: flex;
  width: 100%;
  height: 2.2rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  background: var(--warn-100);
}
.gt-wf-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  overflow: hidden;
  background: var(--gt-seg);
  color: var(--gt-seg-ink);
  font-size: var(--step--2);
  font-weight: 800;
  border-right: 2px solid var(--bg-raised);
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gt-wf-seg.gt-s1 {
  background: var(--gt-seg-alt);
}
.gt-wf-rest {
  width: 100%;
  background: repeating-linear-gradient(135deg, var(--warn-100) 0 6px, transparent 6px 12px);
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  margin: 0.6rem 0 0;
  font-size: var(--step--1);
}
.gt-lg-open strong {
  color: var(--warn-700);
}

/* What has to be true */
.gt-remain .gt-tile-v {
  font-size: var(--step-4);
}
.gt-choices {
  border: 0;
  padding: 0;
  margin: 1.1rem 0 0;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, 1fr);
}
.gt-legend-t {
  grid-column: 1 / -1;
  padding: 0;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
@media (max-width: 47.99rem) {
  .gt-choices {
    grid-template-columns: 1fr;
  }
}
.gt-choice {
  position: relative;
  display: block;
  cursor: pointer;
}
.gt-choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.gt-choice-body {
  display: grid;
  gap: 0.3rem;
  height: 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem 0.8rem 2.5rem;
  background: var(--bg-raised);
  position: relative;
}
.gt-choice-body::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.95rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
}
.gt-choice input:checked + .gt-choice-body {
  border-color: var(--gt-seg);
  background: var(--accent-100);
}
.gt-choice input:checked + .gt-choice-body::before {
  border-color: var(--gt-seg);
  background: radial-gradient(circle, var(--gt-seg) 0 45%, transparent 50%);
}
.gt-choice input:focus-visible + .gt-choice-body {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.gt-choice-t {
  font-weight: 750;
}
.gt-choice-d {
  font-size: var(--step--2);
  color: var(--text-muted);
}
.gt-error {
  margin: 0.6rem 0 0;
  color: var(--warn-700);
  font-weight: 700;
  font-size: var(--step--1);
}
.gt-confirm {
  margin-top: 1.2rem;
  border: 2px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-100);
  padding: 1rem 1.2rem;
}
.gt-confirm-t {
  margin: 0 0 0.4rem;
  font-size: var(--step-1);
}
.gt-confirm-t:focus {
  outline: none;
}
.gt-confirm-p {
  margin: 0.3rem 0;
  font-size: var(--step--1);
}
.gt-owners {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  font-size: var(--step--1);
}
.gt-owners li + li {
  margin-top: 0.3rem;
}
.gt-confirm .gt-actions {
  margin-top: 0.9rem;
}

/* Focus rings for the tour's own buttons */
.gt-tour button:focus-visible,
.gt-tour a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Autoplay caption bar and cursor (recording mode only) */
.gt-cap {
  padding: 0.9rem 1.2rem;
  background: var(--forest-900);
  color: #ffffff;
  font-size: var(--step-0);
  font-weight: 600;
  min-height: 3.3rem;
}
.gt-cap[hidden] {
  display: none;
}
.gt-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  pointer-events: none;
  width: 0;
  height: 0;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.45, 0, 0.25, 1);
}
.gt-cursor[hidden] {
  display: none;
}
.gt-cursor-svg {
  max-width: none;
  width: 26px;
  height: 26px;
  position: absolute;
  left: 0;
  top: 0;
  fill: #ffffff;
  stroke: #0b2a21;
  stroke-width: 1.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}
.gt-cursor-ring {
  position: absolute;
  left: -0.9rem;
  top: -0.9rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  border: 3px solid var(--lime-500);
  opacity: 0;
  transform: scale(0.3);
}
.gt-cursor.is-click .gt-cursor-ring {
  opacity: 1;
  transform: scale(1.3);
  transition: transform 0.28s ease-out, opacity 0.28s ease-out;
}
html.gt-autoplay,
html.gt-autoplay body {
  overflow: hidden;
}
html.gt-autoplay .gt-tour {
  position: fixed;
  inset: 0;
  z-index: 9999;
  max-width: none;
  margin: 0;
  padding: 1rem 1.4rem;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
}
html.gt-autoplay .gt-app {
  width: 100%;
  max-width: 78rem;
  margin: 0 auto;
}
html.gt-autoplay .gt-frame {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 2rem);
}
html.gt-autoplay .gt-sub {
  display: none;
}
html.gt-autoplay .gt-play {
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
}
html.gt-autoplay .gt-play-meta span + span {
  display: none;
}
html.gt-autoplay .gt-stage.is-saved .gt-choices,
html.gt-autoplay .gt-stage.is-saved .gt-remain,
html.gt-autoplay .gt-stage.is-saved .gt-actions:not(.gt-confirm .gt-actions) {
  display: none;
}
html.gt-autoplay .gt-stage {
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 0.8rem 1.4rem 0.5rem;
}
html.gt-autoplay .gt-top {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}
html.gt-autoplay .gt-prog-item {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
html.gt-autoplay .gt-cap {
  min-height: 3rem;
  padding: 0.7rem 1.2rem;
}
html.gt-autoplay .gt-play {
  padding: 0.3rem 0.7rem;
  gap: 0.6rem;
}
html.gt-autoplay .gt-play-body {
  grid-auto-flow: column;
  justify-content: start;
  align-items: baseline;
  gap: 1rem;
}
html.gt-autoplay .gt-playlist {
  gap: 0.25rem;
}
html.gt-autoplay .gt-actions-tight {
  margin-bottom: 0.2rem;
}
html.gt-autoplay .gt-plays-grid .gt-cont {
  margin-top: 1rem;
}
html.gt-autoplay .gt-cta {
  font-size: var(--step-0);
  padding: 0.5em 1.4em;
}
html.gt-autoplay .gt-driver {
  padding: 0.6rem 0.9rem;
}
html.gt-autoplay .gt-drivers {
  gap: 0.55rem;
}
html.gt-autoplay .gt-counter-num {
  font-size: var(--step-4);
}
html.gt-autoplay .gt-tile-v {
  font-size: var(--step-3);
}
html.gt-autoplay .gt-actions-tight > .gt-coachwrap {
  margin-bottom: 0;
}
html.gt-autoplay .gt-head {
  margin-bottom: 0.45rem;
}
html.gt-autoplay .gt-foot,
html.gt-autoplay .gt-restart {
  display: none;
}
html.gt-autoplay .gt-play-what {
  display: none;
}
html.gt-autoplay .gt-group-h {
  margin: 0.5rem 0 0.3rem;
}

@media (prefers-reduced-motion: reduce) {
  .gt-coach {
    animation: none;
  }
  .gt-cov-fill,
  .gt-wf-seg,
  .gt-wf-rest,
  .gt-cursor,
  .gt-cursor.is-click .gt-cursor-ring {
    transition: none;
  }
}
