/* =====================================================================
   QOC — main stylesheet
   1. Tokens (light / dark)      5. Header & footer
   2. Base & typography          6. Home page
   3. Layout helpers             7. Section pages, field map, about
   4. Components                 8. Motion & responsive
   ===================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --wrap: 1180px;
  --wrap-narrow: 780px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;

  /* brand (same in both themes) */
  --brand-cyan: #22d3ee;
  --brand-violet: #7c5cff;
  --brand-magenta: #f0469b;
  --brand-grad: linear-gradient(100deg, var(--brand-cyan), var(--brand-violet) 50%, var(--brand-magenta));

  /* light theme */
  --bg: #f7f8fc;
  --bg-elev: #ffffff;
  --bg-sunken: #eef1f8;
  --ink: #0e1530;
  --ink-2: #3a4466;
  --ink-3: #646c8a;   /* ≥4.5:1 on --bg and --bg-sunken (WCAG AA) */
  --line: #e0e4ef;
  --line-strong: #c9cfe0;
  --accent: #5b3df5;
  --accent-ink: #ffffff;
  --accent-soft: #ece8ff;
  --focus: #5b3df5;
  --shadow: 0 1px 2px rgba(14, 21, 48, .05), 0 6px 24px -8px rgba(14, 21, 48, .12);
  --shadow-hover: 0 2px 4px rgba(14, 21, 48, .06), 0 16px 40px -12px rgba(14, 21, 48, .22);
  --header-bg: rgba(247, 248, 252, .82);
  --wave-alpha: .2;

  /* family colours (taxonomy) */
  --fam-foundations: #475a7a;
  --fam-limits: #b45309;
  --fam-algorithms: #6d28d9;
  --fam-analytic: #0f766e;
  --fam-robust: #1d4ed8;
  --fam-learning: #be185d;
  --fam-open-systems: #15803d;
  --fam-many-body: #c2410c;
  --fam-tasks: #0e7490;
  --fam-platforms: #9f1239;

  /* status */
  --st-live: #15803d;
  --st-building: #b45309;
  --st-planned: #69718f;
  --st-done: #15803d;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b1c;
    --bg-elev: #0e1430;
    --bg-sunken: #0a1026;
    --ink: #eef1ff;
    --ink-2: #b9c0dd;
    --ink-3: #848cae;
    --line: #1d2548;
    --line-strong: #2c3561;
    --accent: #8f7bff;
    --accent-ink: #0b0f22;
    --accent-soft: #1d1a45;
    --focus: #a596ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -10px rgba(0, 0, 0, .6);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px -12px rgba(0, 0, 0, .75);
    --header-bg: rgba(7, 11, 28, .78);
    --wave-alpha: .26;

    --fam-foundations: #a3b3d1;
    --fam-limits: #fbbf24;
    --fam-algorithms: #a78bfa;
    --fam-analytic: #2dd4bf;
    --fam-robust: #60a5fa;
    --fam-learning: #f472b6;
    --fam-open-systems: #4ade80;
    --fam-many-body: #fb923c;
    --fam-tasks: #22d3ee;
    --fam-platforms: #fb7185;

    --st-live: #4ade80;
    --st-building: #fbbf24;
    --st-planned: #848cae;
    --st-done: #4ade80;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #070b1c;
  --bg-elev: #0e1430;
  --bg-sunken: #0a1026;
  --ink: #eef1ff;
  --ink-2: #b9c0dd;
  --ink-3: #848cae;
  --line: #1d2548;
  --line-strong: #2c3561;
  --accent: #8f7bff;
  --accent-ink: #0b0f22;
  --accent-soft: #1d1a45;
  --focus: #a596ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -10px rgba(0, 0, 0, .6);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px -12px rgba(0, 0, 0, .75);
  --header-bg: rgba(7, 11, 28, .78);
  --wave-alpha: .26;

  --fam-foundations: #a3b3d1;
  --fam-limits: #fbbf24;
  --fam-algorithms: #a78bfa;
  --fam-analytic: #2dd4bf;
  --fam-robust: #60a5fa;
  --fam-learning: #f472b6;
  --fam-open-systems: #4ade80;
  --fam-many-body: #fb923c;
  --fam-tasks: #22d3ee;
  --fam-platforms: #fb7185;

  --st-live: #4ade80;
  --st-building: #fbbf24;
  --st-planned: #848cae;
  --st-done: #4ade80;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- 2. Base */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
strong { font-weight: 600; }

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

::selection { background: color-mix(in srgb, var(--brand-violet) 30%, transparent); }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: var(--radius-s);
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }

/* ---------------------------------------------------------------- 3. Layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
/* Narrow content keeps the page's left edge (aligned with headings above it). */
.narrow > * { max-width: var(--wrap-narrow); }

.eyebrow {
  display: flex; align-items: center; gap: .6em; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .9rem;
}

.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 46em; }
.muted { color: var(--ink-3); font-size: .95rem; }

.grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.section-head { margin-bottom: 28px; }
.section-head h2 { margin-bottom: .35em; }
.section-lead { color: var(--ink-2); max-width: 42em; }

/* ---------------------------------------------------------------- 4. Components */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .72em 1.25em; border-radius: 999px;
  font-weight: 600; font-size: .98rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn .icon { transition: transform .2s ease; }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); background: color-mix(in srgb, var(--bg-elev) 60%, transparent); }
.btn-ghost:hover { border-color: var(--ink-3); }

.text-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; }
.text-link .icon { transition: transform .2s ease; }
.text-link:hover .icon { transform: translateX(3px); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--ink); }

.status {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--st, var(--ink-3));
}
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent);
}
.status-live { --st: var(--st-live); }
.status-building { --st: var(--st-building); }
.status-next { --st: var(--accent); }
.status-planned { --st: var(--st-planned); }
.status-done { --st: var(--st-done); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip {
  font-size: .78rem; line-height: 1.2; padding: .38em .7em;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-sunken); color: var(--ink-2);
}
.chip-more { font-family: var(--font-mono); color: var(--ink-3); }

.feature-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  color: var(--accent); background: var(--accent-soft);
}
.feature-icon .icon { width: 24px; height: 24px; }
.feature-icon-lg { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 18px; }
.feature-icon-lg .icon { width: 30px; height: 30px; }

.notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 20px; margin: 0 0 28px;
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--st-building) 35%, var(--line));
  background: color-mix(in srgb, var(--st-building) 8%, var(--bg-elev));
  color: var(--ink-2);
}
.notice .icon { color: var(--st-building); margin-top: 2px; }
.notice p { margin: 0; }

.fam-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--fam);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fam) 22%, transparent);
}

/* ---------------------------------------------------------------- 5. Header & footer */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; color: var(--ink); margin-right: auto; }
.brand-logo { height: 34px; width: auto; display: block; }

.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 9px;
  color: var(--ink-2); text-decoration: none; font-size: .94rem; font-weight: 500;
}
.site-nav a:hover { color: var(--ink); background: var(--bg-sunken); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-sunken); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-menu { display: none; }
.nav-open .nav-toggle .i-close { display: block; }

/* Theme toggle shows the icon of the theme you would switch to. */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
  font-size: .94rem;
}
.footer-inner {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px; padding-block: 48px 32px;
}
.footer-brand { color: var(--ink); }
.footer-logo { height: 40px; width: auto; display: block; margin-bottom: 14px; }
.footer-brand p { color: var(--ink-3); max-width: 30em; }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.footer-cols h2 {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-cols a { color: var(--ink-2); text-decoration: none; }
.footer-cols a:hover { color: var(--ink); text-decoration: underline; }
.footer-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 18px 28px; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: .84rem;
}
.footer-meta a { color: inherit; }

/* ---------------------------------------------------------------- 6. Home */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 10vw, 112px) 0 clamp(56px, 8vw, 96px);
  text-align: center;
  isolation: isolate;
}
.hero::before {           /* soft brand glow */
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -2;
  background:
    radial-gradient(40% 50% at 30% 40%, color-mix(in srgb, var(--brand-cyan) 16%, transparent), transparent 70%),
    radial-gradient(40% 50% at 70% 45%, color-mix(in srgb, var(--brand-magenta) 13%, transparent), transparent 70%),
    radial-gradient(50% 60% at 50% 30%, color-mix(in srgb, var(--brand-violet) 16%, transparent), transparent 70%);
}
.hero-waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: var(--wave-alpha); }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: min(420px, 78vw); height: auto; color: var(--ink); margin-bottom: 28px; }
.hero-title { max-width: 16em; margin-bottom: .4em; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 36em; margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
  padding-block: clamp(32px, 6vw, 72px);
}
.intro-text p { color: var(--ink-2); }
.intro-figure { margin: 0; padding: 22px 22px 18px; }
.pwc-plot { display: block; width: 100%; height: auto; margin-bottom: 4px; }
.pwc-plot .axis { stroke: var(--line-strong); stroke-width: 1.2; }
.pwc-plot .bar { fill: color-mix(in srgb, var(--brand-violet) 20%, transparent); stroke: var(--brand-violet); stroke-width: 1.4; }
.pwc-plot .env { fill: none; stroke: var(--brand-magenta); stroke-width: 2; stroke-dasharray: 5 5; }
.pwc-plot text { fill: var(--ink-3); font-family: var(--font-mono); font-size: 12px; }
.eqs { overflow-x: auto; overflow-y: hidden; color: var(--ink); }
.eqs .katex-display { margin: .5em 0; }
.intro-figure figcaption { font-size: .9rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }

.explore, .families { padding-block: clamp(32px, 6vw, 64px); }

/* Bento layout: two wide flagship cards, then three. */
.card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.card-grid > * { grid-column: span 2; }
.card-grid > :nth-child(-n+2) { grid-column: span 3; }
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid > *, .card-grid > :nth-child(-n+2) { grid-column: span 1; }
  .card-grid > :first-child { grid-column: span 2; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .card-grid > :first-child { grid-column: span 1; }
}
.feature-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px; color: inherit; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.feature-card .feature-icon { margin-bottom: 12px; }
.feature-card h3 { margin-bottom: .3em; }
.feature-card p { color: var(--ink-2); font-size: .95rem; flex: 1; }
.feature-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.feature-foot .go { color: var(--ink-3); transition: transform .2s ease, color .2s ease; }
.feature-card:hover .go { color: var(--accent); transform: translateX(3px); }

.family-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .family-grid { grid-template-columns: minmax(0, 1fr); } }
.family-card {
  position: relative; display: flex; flex-direction: column;
  padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--line);
  color: inherit; text-decoration: none; overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.family-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--fam);
}
.family-card:hover { border-color: color-mix(in srgb, var(--fam) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.family-card h3 { padding-right: 36px; margin-bottom: .4em; font-size: 1.04rem; }
.family-card p { color: var(--ink-2); font-size: .87rem; line-height: 1.5; flex: 1; }
.family-card .chip { font-size: .74rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.family-count {
  position: absolute; top: 16px; right: 18px;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
  color: var(--fam); background: color-mix(in srgb, var(--fam) 12%, transparent);
  padding: .2em .6em; border-radius: 999px;
}

.principles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  padding-block: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.principle h3 { font-size: 1.05rem; }
.principle h3::before {
  content: ""; display: block; width: 32px; height: 3px; border-radius: 2px;
  background: var(--brand-grad); margin-bottom: 14px;
}
.principle p { color: var(--ink-2); font-size: .95rem; margin: 0; }

/* ---------------------------------------------------------------- 7. Pages */
.page-hero {
  position: relative; padding: clamp(40px, 7vw, 80px) 0 clamp(28px, 4vw, 44px);
  margin-bottom: 12px;
}
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}
.page-hero h1 { margin-bottom: .3em; }

.plan-card { padding: clamp(22px, 4vw, 36px); margin-top: 28px; }
.plan-card h2 { font-size: 1.3rem; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.check-list .icon { color: var(--st-live); margin-top: 2px; }

/* field map (draft outline) */
.family-index {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px;
}
.family-index a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: .45em .9em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 500;
}
.family-index a:hover { border-color: color-mix(in srgb, var(--fam) 50%, var(--line)); color: var(--ink); }
.family-index .fam-dot { width: 8px; height: 8px; }

.family-block { margin-bottom: 56px; }
.family-head { margin-bottom: 18px; }
.family-head h2 { display: flex; align-items: center; gap: 14px; font-size: 1.6rem; }
.family-head p { color: var(--ink-2); max-width: 46em; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.topic-card {
  padding: 18px 20px; border-top: 3px solid var(--fam);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.topic-card:target { box-shadow: 0 0 0 2px var(--fam), var(--shadow-hover); }
.topic-card h3 { margin-bottom: .4em; }
.topic-card > p { font-size: .93rem; color: var(--ink-2); margin-bottom: .8em; }
.topic-card .aliases, .topic-card .related { font-size: .82rem; color: var(--ink-3); margin-bottom: .5em; }
.topic-card .aliases span, .topic-card .related span {
  display: block; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px;
}
.topic-card .related { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.topic-card .related span { flex-basis: 100%; margin-bottom: 0; }
.topic-card .related a {
  font-size: .78rem; text-decoration: none; color: var(--ink-2);
  padding: .25em .6em; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--fam) 35%, var(--line));
  background: color-mix(in srgb, var(--fam) 7%, transparent);
}
.topic-card .related a:hover { color: var(--ink); border-color: var(--fam); }

/* long-form text */
.prose { padding-top: 12px; }
.prose h2 { margin-top: 1.8em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }

.roadmap { list-style: none; padding: 0; margin: 1.2em 0 0; position: relative; }
.roadmap::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line);
}
.roadmap li { position: relative; padding: 0 0 22px 36px; margin: 0; }
.roadmap li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
}
.roadmap li.is-done::before { background: var(--st-done); border-color: var(--st-done); }
.roadmap li.is-next::before { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.roadmap li.is-building::before { border-color: var(--st-building); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st-building) 20%, transparent); }
.roadmap-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 4px; }
.roadmap-head h3 { margin: 0; font-size: 1.08rem; }
.roadmap-head h3 a { color: var(--ink); text-decoration: none; }
.roadmap-head h3 a:hover { text-decoration: underline; }
.roadmap-phase { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-3); letter-spacing: .05em; }
.roadmap p { margin: 0; font-size: .95rem; }

.not-found { text-align: center; padding-block: 80px 40px; }
.not-found > * { margin-inline: auto; }
.nf-logo { width: 240px; height: auto; color: var(--ink); margin-bottom: 28px; }
.not-found .lead { margin-inline: auto; }

/* ---------------------------------------------------------------- 8. Motion & responsive */
@keyframes qoc-draw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes qoc-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.qoc-logo.is-animated .qoc-pulse { stroke-dasharray: 1000; animation: qoc-draw 1.8s cubic-bezier(.45, .05, .25, 1) .15s both; }
.qoc-logo.is-animated .qoc-letters { animation: qoc-fade .9s ease both; }
.hero-title, .hero-lead, .hero-actions { animation: qoc-fade .8s ease both; }
.hero-title { animation-delay: .35s; }
.hero-lead { animation-delay: .5s; }
.hero-actions { animation-delay: .65s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-hover);
    padding: 10px var(--gutter) 18px;
    display: none;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 12px 12px; font-size: 1rem; }
  .intro { grid-template-columns: minmax(0, 1fr); }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-logo { height: 30px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .intro-figure { padding: 16px 14px 14px; }
}
