/* Rubric Agents site styles
   One stylesheet, no framework. Tokens first, then base, layout, motion, components, pages. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f2f2ee;
  --ink: #0e1012;
  --ink-2: #43474e;
  --muted: #6b7079;
  --line: #e7e6e0;
  --line-strong: #d0cfc7;
  --accent: #0f766e;
  --accent-2: #14958a;
  --accent-soft: #e3f3f0;
  --accent-ink: #ffffff;
  --pass: #237a52;
  --pass-soft: #e2f1e8;
  --fail: #c2462b;
  --fail-soft: #fbe9e4;
  --threshold: #0e1012;
  --grid: rgba(14, 16, 18, 0.035);
  --glow: rgba(20, 149, 138, 0.16);

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --container: 1160px;
  --gutter: 16px;
  --section: clamp(64px, 9vw, 120px);
  --shadow: 0 1px 2px rgba(14, 16, 18, 0.04), 0 8px 32px rgba(14, 16, 18, 0.06);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d0f;
    --surface: #121518;
    --surface-2: #181c20;
    --ink: #f2f1ed;
    --ink-2: #b6bac1;
    --muted: #858a93;
    --line: #22262b;
    --line-strong: #353b42;
    --accent: #3cc7b6;
    --accent-2: #5fd9c9;
    --accent-soft: #0f2c29;
    --accent-ink: #06201d;
    --pass: #5cc495;
    --pass-soft: #12291f;
    --fail: #f08b6f;
    --fail-soft: #33201b;
    --threshold: #f2f1ed;
    --grid: rgba(242, 241, 237, 0.035);
    --glow: rgba(60, 199, 182, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -0.04em; line-height: 1.02; font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.75rem); letter-spacing: -0.03em; }
h3 { font-size: 1.18rem; letter-spacing: -0.015em; line-height: 1.25; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li + li { margin-top: 0.35em; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

::selection { background: var(--accent-soft); color: var(--ink); }

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

strong { font-weight: 600; }

[hidden] { display: none !important; }

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

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section) 0; }
.section--tight { padding: calc(var(--section) * 0.55) 0; }
.section--alt { background: var(--surface-2); }
.section + .section:not(.section--alt) { border-top: 1px solid var(--line); }
.section--alt + .section { border-top: 0; }

.section-head { max-width: 44rem; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--ink-2); font-size: 1.1rem; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.lede { font-size: clamp(1.1rem, 1.9vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 38rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.mono { font-family: var(--font-mono); }

.grid { display: grid; gap: 20px; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.split { display: grid; gap: clamp(40px, 6vw, 80px); align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.25fr 1fr; }
  .split--wide-right { grid-template-columns: 1fr 1.25fr; }
  .split--center { align-items: center; }
}

.stack > * + * { margin-top: 16px; }

/* ---------- Motion ---------- */
/* Page-to-page crossfade in browsers that support cross-document view transitions. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms var(--ease) both vt-out; }
::view-transition-new(root) { animation: 320ms var(--ease) both vt-in; }
.site-header { view-transition-name: site-header; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* Scroll reveal: only hidden once JS is running, so content never disappears without it. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 24px var(--glow); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease, gap 0.2s var(--ease);
}
.text-link:hover { border-color: var(--accent); color: var(--accent); gap: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark { width: 26px; height: 26px; flex: none; transition: transform 0.4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand img.brand-logo { height: 28px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav li + li { margin-top: 0; }
.site-nav > ul > li > a, .nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.site-nav > ul > li > a:hover, .nav-menu-btn:hover { color: var(--ink); background: var(--surface-2); }
.site-nav > ul > li > a[aria-current="page"], .nav-menu-btn.is-current { color: var(--ink); background: var(--surface-2); }
.chev { width: 12px; height: 12px; transition: transform 0.25s var(--ease); }

.has-menu { position: relative; }
.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -12px;
  display: grid;
  gap: 2px;
  width: 330px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.nav-menu::before { /* hover bridge so the menu doesn't close in the gap */
  content: "";
  position: absolute;
  left: 0; right: 0; top: -12px; height: 12px;
}
.nav-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--surface-2); }
.nav-menu strong { display: block; font-weight: 500; font-size: 0.95rem; }
.nav-menu span { display: block; font-size: 0.84rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
@media (min-width: 960px) {
  .has-menu:hover .nav-menu, .has-menu:focus-within .nav-menu, .nav-menu-btn[aria-expanded="true"] + .nav-menu {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s;
  }
  .has-menu:hover .chev, .nav-menu-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block;
  width: 20px; height: 1.5px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 959px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .js .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s; }
  .js .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav > ul > li > a { display: flex; padding: 14px 0; font-size: 1.05rem; border-radius: 0; border-bottom: 1px solid var(--line); background: none; }
  .js .site-nav > ul > li > a[aria-current="page"] { font-weight: 600; }
  .js .nav-menu-btn { display: none; }
  .js .nav-menu {
    position: static; width: auto; padding: 4px 0 8px; opacity: 1; visibility: visible; transform: none;
    background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none;
  }
  .js .nav-menu a { padding: 10px 0; }
  .js .site-nav .btn { width: 100%; min-height: 48px; }

  /* Without JS, the nav wraps under the brand instead of collapsing. */
  html:not(.js) .header-inner { flex-wrap: wrap; padding: 12px 0; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: 12px; }
  html:not(.js) .site-nav > ul { flex-wrap: wrap; gap: 4px; }
  html:not(.js) .nav-menu { position: static; opacity: 1; visibility: visible; transform: none; width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 clamp(72px, 10vw, 136px);
  overflow: hidden;
}
.hero::before { /* soft teal glow + fading grid */
  content: "";
  position: absolute;
  inset: -20% -10% 0;
  background:
    radial-gradient(42% 50% at 78% 30%, var(--glow), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 35%, #000 30%, transparent 85%);
  mask-image: radial-gradient(70% 70% at 50% 35%, #000 30%, transparent 85%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 { max-width: 11.5em; }
.hero .lede { margin-top: 24px; }
.hero-note { margin-top: 22px; font-size: 0.88rem; color: var(--muted); }
@media (min-width: 900px) {
  .hero .split { grid-template-columns: 1.05fr 1fr; }
}

.page-hero {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 7vw, 88px);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 60% at 85% 0%, var(--glow), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
  mask-image: linear-gradient(180deg, #000, transparent 90%);
  pointer-events: none;
}
.page-hero > .container { position: relative; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 16em; }

/* ---------- Scorecard (dimensional scoring visual) ---------- */
.scorecard {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 0.92rem;
  container-type: inline-size;
}

.sc-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.sc-head strong { color: var(--ink); font-weight: 500; }

.sc-task {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.5;
}
.sc-task .label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.sc-rows {
  list-style: none;
  margin: 0;
  padding: 18px 18px 8px;
  display: grid;
  gap: 12px;
}
.sc-rows li + li { margin-top: 0; }

.sc-scale {
  display: grid;
  grid-template-columns: 10.5rem 1fr 2.8rem 3.4rem;
  gap: 12px;
  padding: 0 18px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.sc-scale .sc-scale-track { position: relative; height: 14px; }
.sc-scale .sc-scale-track span { position: absolute; transform: translateX(-50%); }
.sc-scale .sc-scale-track span:first-child { transform: none; }
.sc-scale .sc-scale-track span:last-child { transform: translateX(-100%); }
.sc-scale .sc-scale-track .thr { color: var(--ink); font-weight: 500; }

.sc-row {
  display: grid;
  grid-template-columns: 10.5rem 1fr 2.8rem 3.4rem;
  align-items: center;
  gap: 12px;
}
.sc-name { color: var(--ink); font-weight: 500; font-size: 0.88rem; line-height: 1.25; }
.sc-track {
  position: relative;
  height: 10px;
  background: var(--surface-2);
  border-radius: 2px;
}
.sc-track::after {
  /* threshold line, continuous across rows */
  content: "";
  position: absolute;
  left: var(--threshold-pos, 80%);
  top: -7px; bottom: -7px;
  border-left: 1.5px dashed var(--threshold);
  opacity: 0.7;
}
.sc-fill {
  display: block;
  height: 100%;
  width: calc(var(--score) * 100%);
  border-radius: 2px;
  background: var(--pass);
}
.sc-row.is-fail .sc-fill { background: var(--fail); }
.sc-val { font-family: var(--font-mono); font-size: 0.85rem; text-align: right; color: var(--ink); }
.sc-status {
  justify-self: end;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--pass-soft);
  color: var(--pass);
}
.sc-row.is-fail .sc-status { background: var(--fail-soft); color: var(--fail); }

.sc-feedback {
  grid-column: 1 / -1;
  margin: 2px 0 4px;
  padding: 10px 12px;
  border-left: 2px solid var(--fail);
  background: var(--fail-soft);
  border-radius: 0 4px 4px 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink);
}
.sc-feedback .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fail);
  margin-right: 6px;
}

.sc-verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}
.sc-verdict .verdict-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fail);
}
.scorecard figcaption {
  padding: 10px 18px 14px;
  font-size: 0.78rem;
  color: var(--muted);
}

@container (max-width: 540px) {
  .sc-row {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "name val status" "track track track";
    row-gap: 6px;
  }
  .sc-name { grid-area: name; }
  .sc-track { grid-area: track; }
  .sc-track::after { top: -3px; bottom: -3px; }
  .sc-val { grid-area: val; }
  .sc-status { grid-area: status; }
  .sc-scale { grid-template-columns: 1fr; }
  .sc-scale > span:not(.sc-scale-track) { display: none; }
  .sc-name { font-size: 0.86rem; }
  .sc-rows { gap: 14px; }
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: 22px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 899px) {
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (min-width: 900px) {
  .stat { border-bottom: 0; }
  .stat:last-child { border-right: 0; }
}
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.stat-label { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--ink-2); line-height: 1.4; }
.stats-note { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s ease, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card h3 { margin-bottom: 10px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p { color: var(--ink-2); }
.card .card-index {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}
.card--link { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card--link:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.card--link .card-foot { margin-top: auto; padding-top: 18px; font-weight: 500; color: var(--ink); font-size: 0.95rem; transition: color 0.2s ease; }
.card--link:hover .card-foot { color: var(--accent); }

.quote-card { border-left: 2px solid var(--accent); }
.quote-card .quote {
  font-size: 1.08rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 12px;
}

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  position: relative;
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 4px 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  counter-increment: step;
}
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li + li { margin-top: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 3px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-2); margin-bottom: 0; }
.steps .step-body { min-width: 0; }

@media (min-width: 900px) {
  .steps--row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
  }
  .steps--row > li {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 12px;
    padding: 24px 20px 0 0;
    border-top: 0;
  }
  .steps--row > li:last-child { border-bottom: 0; }
  .steps--row > li + li { padding-left: 20px; border-left: 1px solid var(--line); }
}

/* Detailed steps on the method page */
.step-detail {
  display: grid;
  gap: 24px;
  padding: clamp(32px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
}
.step-detail:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
  .step-detail { grid-template-columns: 14rem 1fr; gap: 48px; }
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.step-num strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.step-detail .step-content > p { color: var(--ink-2); max-width: 42rem; }
.step-detail .outputs {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.step-detail .outputs h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.step-detail .outputs ul { margin: 0; }

/* ---------- Tag list ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { margin: 0; }
.tags li span, .tag {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-2);
  background: var(--surface);
}

/* ---------- Checklists ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 26px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.6em;
  width: 10px; height: 5px;
  border-left: 1.5px solid var(--pass);
  border-bottom: 1.5px solid var(--pass);
  transform: rotate(-45deg) translateY(-50%);
}
.dashlist { list-style: none; padding: 0; margin: 0 0 1em; }
.dashlist li { position: relative; padding-left: 20px; }
.dashlist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.8em;
  width: 10px; height: 1.5px;
  background: var(--muted);
}

/* ---------- Comparison table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface-2);
}
.compare tbody th { font-weight: 500; color: var(--ink); width: 26%; }
.compare td { color: var(--ink-2); }
.compare td.is-good { color: var(--ink); }

/* ---------- Rubric sample ---------- */
.rubric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.rubric-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.rubric-head h3 { margin: 0; font-size: 1.05rem; }
.rubric-head .mono { font-size: 0.8rem; color: var(--muted); align-self: center; }
.rubric-body { padding: 20px; display: grid; gap: 20px; }
.rubric-body h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.rubric-body p, .rubric-body li { font-size: 0.95rem; color: var(--ink-2); }
.rubric-examples { display: grid; gap: 12px; }
@media (min-width: 720px) { .rubric-examples { grid-template-columns: 1fr 1fr; } }
.example {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  border-left: 2px solid var(--pass);
  background: var(--pass-soft);
  color: var(--ink);
}
.example.is-fail { border-left-color: var(--fail); background: var(--fail-soft); }
.example .label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pass);
}
.example.is-fail .label { color: var(--fail); }
.example p { margin: 0; color: var(--ink); font-size: 0.92rem; }

/* ---------- Service blocks ---------- */
.service {
  display: grid;
  gap: 28px;
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  scroll-margin-top: 88px;
}
.service + .service { margin-top: 24px; }
@media (min-width: 900px) { .service { grid-template-columns: 1fr 1.4fr; gap: 48px; } }
.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.service-meta li { margin: 0; }
.service-meta strong { color: var(--ink); font-weight: 500; }
.service h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: 0; }
.service-intro { color: var(--ink-2); }
.service-cols { display: grid; gap: 24px; }
@media (min-width: 640px) { .service-cols { grid-template-columns: 1fr 1fr; } }
.service-cols h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.service-cols ul { font-size: 0.96rem; color: var(--ink-2); }
.service-outcome {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
  color: var(--ink);
}
.service-outcome strong { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-right: 8px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); }
.timeline > li { position: relative; padding: 0 0 28px 24px; }
.timeline > li + li { margin-top: 0; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -5px; top: 7px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--ink);
}
.timeline .when { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.timeline h3 { margin: 4px 0 6px; font-size: 1.1rem; }
.timeline p { color: var(--ink-2); margin: 0; }

/* ---------- Proof list ---------- */
.proof { display: grid; gap: 0; border-top: 1px solid var(--line); }
.proof-item {
  display: grid;
  gap: 8px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 800px) { .proof-item { grid-template-columns: 12rem 1fr; } }
.proof-figure {
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.proof-figure small { display: block; margin-top: 6px; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; font-weight: 400; }
.proof-item h3 { margin-bottom: 6px; }
.proof-item p { color: var(--ink-2); margin: 0; max-width: 44rem; }

/* ---------- Founder ---------- */
.founder { display: grid; gap: 28px; align-items: start; }
@media (min-width: 760px) { .founder { grid-template-columns: 240px 1fr; gap: 48px; } }
.founder--large { }
@media (min-width: 900px) { .founder--large { grid-template-columns: 320px 1fr; gap: 64px; } }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.portrait .portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 2.4rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.portrait img {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
}
.founder-name { margin-bottom: 2px; }
.founder-role { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.founder p { color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: 20px 40px 20px 0;
  font-weight: 500;
  font-size: 1.04rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px; top: 50%;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .faq-body { padding: 0 0 22px; color: var(--ink-2); max-width: 46rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { padding: clamp(32px, 6vw, 72px) 0 var(--section); }
.cta-inner {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 80px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}
.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 80% at 100% 100%, var(--glow), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(135deg, transparent 30%, #000);
  mask-image: linear-gradient(135deg, transparent 30%, #000);
  pointer-events: none;
}
.cta-inner > * { position: relative; }
.cta-band h2 { max-width: 18em; }
.cta-band p { color: var(--ink-2); max-width: 34rem; font-size: 1.1rem; }

/* ---------- Contact ---------- */
.contact-option {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.contact-option h2 { font-size: 1.5rem; }
.contact-option p { color: var(--ink-2); }
.contact-option .btn { margin-top: auto; align-self: flex-start; }
.contact-option .email {
  display: inline-block;
  margin: 4px 0 20px;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2.6vw, 1rem);
  word-break: break-all;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-2);
}
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-grid h2 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; transition: color 0.2s ease; }
.footer-grid a:hover { color: var(--accent); }
.footer-tagline { max-width: 26rem; margin-top: 14px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; display: grid; align-items: center; }
.not-found .code { font-family: var(--font-mono); font-size: 0.9rem; color: var(--muted); }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mt-s { margin-top: 16px; }
.mt-m { margin-top: 32px; }
.mt-l { margin-top: 56px; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.max-prose { max-width: 42rem; }

/* Late additions */
a.tag { text-decoration: none; transition: border-color 0.15s ease, color 0.15s ease; }
a.tag:hover { border-color: var(--ink); color: var(--ink); }
@media (min-width: 900px) {
  .steps--row.steps--row-3 { grid-template-columns: repeat(3, 1fr); }
}
[id] { scroll-margin-top: 84px; }

/* ---------- Task review card (review stack visual) ---------- */
:root { --fixed: #2457c5; --fixed-soft: #e7eefc; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --fixed: #8aabff; --fixed-soft: #19223a; }
}
.taskcard {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 0.92rem;
  container-type: inline-size;
}
.tc-rows { list-style: none; margin: 0; padding: 6px 0; }
.tc-rows li + li { margin-top: 0; }
.tc-row {
  position: relative;
  display: grid;
  grid-template-columns: 5.8rem 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 12px 18px;
}
.tc-row + .tc-row::before {
  /* connector between layers */
  content: "";
  position: absolute;
  left: calc(18px + 2.9rem);
  top: -10px;
  height: 16px;
  border-left: 1px solid var(--line-strong);
}
.tc-layer {
  display: grid;
  place-items: center;
  width: 100%;
  height: 1.7rem;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}
.tc-name { display: block; font-weight: 500; color: var(--ink); line-height: 1.3; }
.tc-detail { display: block; margin-top: 2px; font-size: 0.84rem; line-height: 1.45; color: var(--ink-2); }
.tc-status {
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--pass-soft);
  color: var(--pass);
}
.tc-row.is-fail .tc-status { background: var(--fail-soft); color: var(--fail); }
.tc-row.is-fail .tc-layer { border-color: var(--fail); color: var(--fail); }
.tc-row.is-fixed { background: var(--fixed-soft); }
.tc-row.is-fixed .tc-status { background: var(--surface); color: var(--fixed); }
.tc-row.is-fixed .tc-layer { border-color: var(--fixed); color: var(--fixed); }
.verdict-tag.is-ready { color: var(--pass); }
.taskcard figcaption { padding: 10px 18px 14px; font-size: 0.78rem; color: var(--muted); }
.taskcard .sc-verdict { margin-top: 0; }

/* ---------- Layer list (method) ---------- */
.layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.layers > li + li { margin-top: 0; }
.layer {
  display: grid;
  gap: 16px 40px;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 84px;
}
@media (min-width: 900px) { .layer { grid-template-columns: 15rem 1fr 1fr; } }
.layer-head .layer-num {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-2);
}
.layer-head h3 { font-size: 1.3rem; margin-bottom: 6px; }
.layer-head p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.layer h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.layer ul { font-size: 0.96rem; color: var(--ink-2); margin-bottom: 0; }
.catch {
  padding: 14px 16px;
  border-left: 2px solid var(--fail);
  background: var(--fail-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.93rem;
  color: var(--ink);
}
.catch p { margin: 0; }
.catch .label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fail);
}
.catch + .catch { margin-top: 10px; }

/* Compact layer row on the home page */
@media (min-width: 900px) {
  .steps--row.steps--layers > li::before { content: "L" counter(step); }
}
.steps--layers > li::before { content: "L" counter(step); }

/* Principle callout */
.principle {
  margin-top: clamp(32px, 5vw, 48px);
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--ink);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--surface);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}
.principle span { display: block; margin-top: 6px; font-size: 0.95rem; font-weight: 400; color: var(--ink-2); }

/* ---------- What we review ---------- */
.artifact {
  display: grid;
  gap: 24px 48px;
  padding: clamp(36px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}
.artifact:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .artifact { grid-template-columns: 1fr 1.6fr; } }
.artifact-head .card-index { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; }
.artifact-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
.artifact-head p { color: var(--ink-2); }
.artifact-cols { display: grid; gap: 24px; }
@media (min-width: 640px) { .artifact-cols { grid-template-columns: 1fr 1fr; } }
.artifact-cols h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.artifact-cols ul { font-size: 0.96rem; color: var(--ink-2); }
.artifact-wide { grid-column: 1 / -1; }

.icon-line { width: 36px; height: 36px; color: var(--ink); margin-bottom: 16px; }
.card .icon-line { margin-bottom: 14px; }

.grid--5 { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid--5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--5 { grid-template-columns: repeat(5, 1fr); } }
.grid--5 .card { padding: 22px 20px; }
.grid--5 .card h3 { font-size: 1.02rem; }
.grid--5 .card p { font-size: 0.92rem; }

.service-meta .badge-new {
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--fixed-soft);
  color: var(--fixed);
}
.catch.is-fixed { border-left-color: var(--fixed); background: var(--fixed-soft); }
.catch.is-fixed .label { color: var(--fixed); }

/* ---------- Anatomy of a task (primer diagram) ---------- */
.anatomy { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: anat; }
.anatomy > li + li { margin-top: 0; }
@media (min-width: 1000px) { .anatomy { grid-template-columns: repeat(6, 1fr); gap: 0; } }
.anat-step {
  position: relative;
  padding: 18px 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  counter-increment: anat;
}
@media (min-width: 1000px) {
  .anat-step { border-radius: 0; border-left-width: 0; }
  .anat-step:first-child { border-left-width: 1px; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
  .anat-step:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
  .anat-step + .anat-step::before {
    content: "";
    position: absolute;
    left: -7px; top: 26px;
    width: 12px; height: 12px;
    background: var(--surface);
    border-top: 1px solid var(--line-strong);
    border-right: 1px solid var(--line-strong);
    transform: rotate(45deg);
  }
}
@media (max-width: 999px) {
  .anat-step + .anat-step::before {
    content: "\2193";
    position: absolute;
    top: -13px; left: 22px;
    font-size: 0.8rem;
    color: var(--muted);
    background: var(--bg);
    padding: 0 4px;
  }
}
.anat-step .anat-num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.anat-step .anat-num::before { content: counter(anat, decimal-leading-zero) " "; }
.anat-step h3 { margin: 6px 0 6px; font-size: 1.02rem; }
.anat-step p { margin: 0; font-size: 0.88rem; color: var(--ink-2); line-height: 1.5; }
.anat-step .aka { display: block; margin-top: 8px; font-size: 0.78rem; color: var(--muted); }
.anat-step.is-key { border-color: var(--ink); }
@media (min-width: 1000px) { .anat-step.is-key { border-left-width: 1px; margin-left: -1px; } }
.anatomy-note {
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--ink-2);
}
.anatomy-note strong { color: var(--ink); }

/* ---------- Term styling ---------- */
.term { font-weight: 500; color: var(--ink); text-decoration: underline dotted var(--line-strong); text-underline-offset: 3px; }
a.term:hover { text-decoration-color: var(--ink); }

/* ---------- Benchmarks strip ---------- */
.benchmarks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.benchmarks li { margin: 0; }
.benchmarks li span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--surface);
}
.benchmarks-label { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; }
.disclaimer { margin-top: 12px; font-size: 0.8rem; color: var(--muted); }

/* ---------- What we review: groups and intros ---------- */
.group-head {
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}
.group-head:first-child { margin-top: 0; }
.group-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 6px; }
.group-head p { color: var(--ink-2); max-width: 44rem; margin-bottom: 0; }
.group-head + .artifact { border-top: 0; }
.what-it-is {
  margin: 14px 0 0;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-size: 0.93rem;
  color: var(--ink);
}
.what-it-is .label, .aka-line .label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.aka-line { margin-top: 12px; font-size: 0.88rem; color: var(--ink-2); }
.aka-line .label { display: inline; margin-right: 6px; }
.artifact-head .card-index + h3 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); }

/* ---------- Glossary ---------- */
.glossary-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.glossary-index li { margin: 0; }
.gloss-group { padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.gloss-group:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .gloss-group { display: grid; grid-template-columns: 15rem 1fr; gap: 48px; } }
.gloss-group > h2 { font-size: 1.3rem; position: sticky; top: 88px; align-self: start; }
.gloss { margin: 0; }
.gloss > div { padding: 16px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.gloss > div:first-child { padding-top: 0; }
.gloss > div:target { background: var(--fixed-soft); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: var(--radius); }
.gloss dt { font-weight: 600; color: var(--ink); }
.gloss dt .aka { font-weight: 400; font-size: 0.88rem; color: var(--muted); margin-left: 6px; }
.gloss dd { margin: 4px 0 0; color: var(--ink-2); max-width: 46rem; }
.gloss dd p { margin: 0 0 6px; }
.gloss dd .eg { font-size: 0.9rem; color: var(--muted); }

/* ---------- Logo colours ---------- */
:root { --logo-teal: #167e77; --logo-navy: #1c2c4f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --logo-teal: #22a397; --logo-navy: #c9d3ea; }
}
.brand-mark { width: 28px; height: 28px; }


/* Task card on narrow screens: label sits above the step title */
@container (max-width: 440px) {
  .tc-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "layer status" "body body";
    row-gap: 6px;
  }
  .tc-layer { grid-area: layer; width: auto; justify-self: start; padding: 0 8px; }
  .tc-body { grid-area: body; }
  .tc-status { grid-area: status; margin-top: 0; }
  .tc-row + .tc-row::before { display: none; }
  .tc-row + .tc-row { border-top: 1px solid var(--line); }
}

/* =====================================================================
   Revamp components (2026-10): live task card, proof tiles, verifier game,
   audience routes, layer rail, founder strip, evaluations, GenAI pipeline.
   ===================================================================== */

/* ---------- Task card: live run ---------- */
.taskcard { border-radius: var(--radius-lg); }
.taskcard .tc-row { transition: opacity 0.4s ease, background-color 0.4s ease; }
.taskcard .tc-status { transition: background-color 0.3s ease, color 0.3s ease; min-width: 4.6rem; text-align: center; }
.taskcard.is-live .tc-row { opacity: 0.32; }
.taskcard.is-live .tc-row.is-reached { opacity: 1; }
.taskcard.is-live .tc-row:not(.is-reached) .tc-status,
.taskcard.is-live .tc-row.is-running .tc-status { background: var(--surface-2); color: var(--muted); }
.taskcard.is-live .tc-row.is-running .tc-status { animation: pulse-soft 0.9s ease-in-out infinite; }
.taskcard.is-live .tc-row:not(.is-reached) .tc-layer,
.taskcard.is-live .tc-row.is-running .tc-layer { border-color: var(--line-strong); color: var(--ink-2); }
.taskcard.is-live .tc-row.is-fixed:not(.is-reached), .taskcard.is-live .tc-row.is-fixed.is-running { background: transparent; }
.taskcard.is-live .sc-verdict { opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.5s var(--ease); }
.taskcard.is-live.is-done .sc-verdict { opacity: 1; transform: none; }
.taskcard.is-live.is-done .verdict-tag::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px var(--pass-soft);
  vertical-align: 1px;
}
@keyframes pulse-soft { 50% { opacity: 0.45; } }

/* ---------- Proof tiles ---------- */
.proof-tiles { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.proof-tiles li { margin: 0; }
@media (min-width: 820px) { .proof-tiles { grid-template-columns: repeat(3, 1fr); } }
.proof-tiles a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s ease;
}
.proof-tiles a:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.pt-num {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 6vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pt-num small { font-size: 0.42em; letter-spacing: -0.02em; color: var(--muted); font-weight: 500; }
.pt-label { display: block; margin-top: 16px; font-size: 1.02rem; line-height: 1.45; color: var(--ink); }
.pt-meta { display: block; margin-top: auto; padding-top: 18px; font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent); }

/* ---------- Verifier game ---------- */
.game {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.game-board { padding: clamp(20px, 4vw, 36px); }
.game-board.is-swap { animation: swap-in 0.45s var(--ease); }
@keyframes swap-in { from { opacity: 0; transform: translateX(14px); } }
.game-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.game-kind {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
}
.game-count { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.game-dots { display: inline-flex; gap: 6px; }
.game-dots span { width: 18px; height: 4px; border-radius: 2px; background: var(--line-strong); transition: background-color 0.3s ease; }
.game-dots .is-past { background: var(--accent); }
.game-dots .is-now { background: var(--ink); }
.game-task { margin: 0 0 18px; font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.45; color: var(--ink); font-weight: 500; }
.game-task .label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.game-code {
  padding: 10px 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: clamp(0.74rem, 1.6vw, 0.88rem);
  overflow-x: auto;
}
.game-code pre { margin: 0; padding: 0 16px; }
.code-line {
  display: flex;
  gap: 14px;
  width: 100%;
  min-width: max-content;
  padding: 5px 16px 5px 0;
  border: 0;
  border-left: 3px solid transparent;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  white-space: pre;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.code-line .ln { width: 2.2em; flex: none; text-align: right; color: var(--muted); user-select: none; }
.code-line code { font: inherit; }
.code-line:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 9%, transparent); border-left-color: var(--accent); }
.code-line:disabled { cursor: default; }
.code-line.is-miss { animation: shake 0.4s ease; background: color-mix(in srgb, var(--muted) 10%, transparent); }
.code-line.is-hit, .code-line.is-shown { background: var(--fail-soft); border-left-color: var(--fail); }
.code-line.is-hit { animation: hit 0.5s var(--ease); }
.tok-kw { color: var(--accent); }
.tok-str { color: var(--fixed); }
.tok-num { color: var(--fail); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes hit { 30% { transform: scale(1.012); } }
.game-feedback { margin-top: 18px; min-height: 3.2em; font-size: 0.98rem; color: var(--ink-2); }
.game-feedback p { margin: 0 0 8px; }
.game-feedback p:last-child { margin-bottom: 0; }
.game-feedback.is-good, .game-feedback.is-reveal { animation: swap-in 0.4s var(--ease); }
.game-verdict { font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.game-feedback.is-good .game-verdict::before { content: "\2713  "; color: var(--pass); }
.game-how { font-size: 0.92rem; }
.chip {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  vertical-align: 1px;
}
.game-actions { display: flex; gap: 10px; margin-top: 18px; }
.game-actions:empty { display: none; }
.game-end { padding: clamp(32px, 6vw, 56px); text-align: center; animation: swap-in 0.45s var(--ease); }
.game-end-score { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 8px; }
.game-end p { color: var(--ink-2); }
.game-end .btn-row { justify-content: center; }
/* Before JS takes over, show the first round as a static example. */
.game:not(.is-ready) .game-feedback { padding: 14px 16px; border-left: 2px solid var(--fail); background: var(--fail-soft); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); }

/* ---------- Audience routes ---------- */
.routes { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.routes li { margin: 0; border-bottom: 1px solid var(--line-strong); }
.routes a {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 16px;
  padding: clamp(22px, 3.4vw, 34px) 4px;
  color: inherit;
  text-decoration: none;
  isolation: isolate;
}
.routes a::before { /* hover wash that sweeps in from the left */
  content: "";
  position: absolute;
  inset: 0 -16px;
  z-index: -1;
  background: var(--surface);
  border-radius: var(--radius-lg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.routes a:hover::before, .routes a:focus-visible::before { transform: scaleX(1); }
.route-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.route-body strong { display: block; font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.route-body span { display: block; margin-top: 6px; color: var(--ink-2); max-width: 40rem; }
.route-arrow {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--ink);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.35s var(--ease);
}
.routes a:hover .route-arrow { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateX(4px); }
@media (max-width: 600px) {
  .routes a { grid-template-columns: 1fr auto; }
  .route-num { display: none; }
}

/* ---------- Layer rail ---------- */
.layer-rail {
  position: relative;
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.layer-rail li { position: relative; margin: 0; padding-left: 44px; }
.layer-rail li::before { /* node */
  content: "";
  position: absolute;
  left: 9px; top: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  z-index: 1;
}
.layer-rail::before { /* rail */
  content: "";
  position: absolute;
  left: 15px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--line-strong);
}
.lr-num { display: block; font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent); margin-bottom: 6px; }
.layer-rail h3 { margin-bottom: 6px; }
.layer-rail p { margin: 0; color: var(--ink-2); font-size: 0.96rem; }
@media (min-width: 900px) {
  .layer-rail { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .layer-rail li { padding: 36px 0 0; }
  .layer-rail li::before { left: 0; top: 0; }
  .layer-rail::before { left: 6px; right: 0; top: 6px; bottom: auto; width: auto; height: 1px; }
  .js .layer-rail::before { transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) 0.2s; }
  .js .layer-rail:has(li.is-in)::before { transform: scaleX(1); }
}

/* ---------- Founder strip ---------- */
.founder-strip {
  display: grid;
  gap: 24px;
  align-items: center;
  max-width: 900px;
}
@media (min-width: 640px) { .founder-strip { grid-template-columns: 120px 1fr; gap: 36px; } }
.portrait--sm { max-width: 120px; aspect-ratio: 1; border-radius: 50%; }
.portrait--sm .portrait-fallback { font-size: 1.4rem; }
.founder-quote { font-size: clamp(1.35rem, 2.8vw, 1.9rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.3; color: var(--ink); margin-bottom: 12px; }
.founder-by { color: var(--ink-2); margin: 0; }

/* ---------- Evaluations index ---------- */
.evals { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.eval {
  display: grid;
  gap: 16px 40px;
  margin: 0;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
@media (min-width: 900px) { .eval { grid-template-columns: 11rem 1fr 13rem; } }
.eval:target { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.eval-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
@media (min-width: 900px) { .eval-meta { flex-direction: column; } }
.eval-bench { color: var(--ink); font-weight: 500; }
.eval h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-bottom: 10px; }
.eval h2 a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.35s var(--ease); }
.eval h2 a:hover { background-size: 100% 1px; }
.eval-main > p { color: var(--ink-2); max-width: 40rem; }
.eval-example {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 2px solid var(--fail);
  background: var(--fail-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
  color: var(--ink) !important;
}
.eval-example .label { display: block; margin-bottom: 3px; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fail); }
.eval-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.eval-num { font-size: clamp(2.4rem, 5vw, 3.2rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.eval-num small { font-size: 0.45em; color: var(--muted); font-weight: 500; letter-spacing: -0.02em; }
.eval-num-label { font-size: 0.86rem; color: var(--muted); margin-bottom: 14px; }

.verify-steps { margin: 0; padding: 0; list-style: none; counter-reset: vs; display: grid; gap: 14px; }
.verify-steps li {
  position: relative;
  margin: 0;
  padding: 18px 20px 18px 56px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-2);
  counter-increment: vs;
}
.verify-steps li::before {
  content: counter(vs);
  position: absolute;
  left: 18px; top: 18px;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}
.verify-steps strong { color: var(--ink); }

/* ---------- Feature list (GenAI page) ---------- */
.feature-list { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 760px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
.feature-list li { margin: 0; padding: clamp(24px, 4vw, 40px); background: var(--bg); transition: background-color 0.3s ease; }
.feature-list li:hover { background: var(--surface); }
.fl-num { display: block; margin-bottom: 22px; font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent); }
.feature-list h3 { font-size: 1.3rem; }
.feature-list p { margin: 0; color: var(--ink-2); }

/* ---------- GenAI pipeline ---------- */
.pipe {
  padding: clamp(18px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.pipe-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: clamp(20px, 3vw, 32px);
  background: var(--surface-2);
  border-radius: 999px;
}
.pipe-tabs button {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.pipe-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

.pipe-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
@media (min-width: 900px) {
  .pipe-stage {
    display: grid;
    grid-template-columns: 1.05fr 36px 1.3fr 36px 1.35fr 36px 1fr;
    align-items: center;
    padding-bottom: 92px;
  }
}

.pnode {
  position: relative;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--ink);
  transition: opacity 0.5s ease, transform 0.5s var(--ease), border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}
.pn-label { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pipe-agents { display: grid; gap: 8px; }
.pn-agent { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.pn-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--line-strong); transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.pn-text { margin: 0; font-size: 0.92rem; line-height: 1.45; }
.pn-text mark { background: none; color: inherit; transition: background-color 0.3s ease, color 0.3s ease; border-radius: 3px; }
.v2 { display: none; }

.pipe-wire { position: relative; align-self: center; width: 1px; height: 28px; margin: 0 auto; background: var(--line-strong); }
@media (min-width: 900px) { .pipe-wire { width: 100%; height: 1px; } }
.pipe-wire span { position: absolute; left: -2px; top: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0; box-shadow: 0 0 8px var(--accent); }
@media (min-width: 900px) { .pipe-wire span { top: -2px; left: 0; } }

.metrics { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 7px; }
.metrics li { display: grid; grid-template-columns: 6.6rem 1fr; align-items: center; gap: 10px; margin: 0; font-size: 0.8rem; color: var(--ink-2); }
.metrics i { position: relative; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.metrics i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v2) * 100%); border-radius: 3px; background: var(--pass); transition: width 0.9s var(--ease), background-color 0.3s ease; }
.metrics i::after { content: ""; position: absolute; left: 80%; top: -2px; bottom: -2px; border-left: 1px dashed var(--ink); opacity: 0.5; }
.gate-verdict { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; }
.gv-fail { display: none; color: var(--fail); }
.gv-pass { color: var(--pass); }
.gate-none {
  display: none;
  padding: 18px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.pn-gate { padding: 12px 14px; }
.pipe[data-mode="without"] .pn-gate { padding: 0; border: 0; background: none; }
.pipe[data-mode="without"] .gate-none { display: block; }
.pipe[data-mode="without"] .gate-qa { display: none; }

.pipe-end { display: grid; gap: 8px; }
.users-status { font-size: 0.86rem; font-weight: 500; }
.us-bad { color: var(--fail); }
.us-good { color: var(--pass); display: none; }
.pipe[data-mode="with"] .us-bad { display: none; }
.pipe[data-mode="with"] .us-good { display: inline; }
.pipe[data-mode="without"] .pn-users { border-color: var(--fail); }
.pipe[data-mode="with"] .pn-users { border-color: var(--pass); }
.pn-rework { border-style: dashed; border-color: var(--fail); background: var(--fail-soft); font-size: 0.84rem; color: var(--ink-2); }
.pipe[data-mode="with"] .pn-rework { display: none; }

.pipe-loop { display: none; }
.loop-label {
  display: block;
  order: 5;
  margin: 10px 0 0;
  padding: 8px 12px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  transition: opacity 0.4s ease, transform 0.4s var(--ease);
}
.pipe[data-mode="without"] .loop-label { display: none; }
@media (max-width: 899px) {
  .pipe-stage > .pipe-agents { order: 0; }
  .pipe-stage > .pw-1 { order: 1; }
  .pipe-stage > .pn-output { order: 2; }
  .pipe-stage > .pw-2 { order: 3; }
  .pipe-stage > .pn-gate { order: 4; }
  .pipe-stage > .loop-label { order: 5; margin-bottom: 0; }
  .pipe-stage > .pw-3 { order: 6; }
  .pipe-stage > .pipe-end { order: 7; }
}
@media (min-width: 900px) {
  .pipe-loop {
    display: block;
    position: absolute;
    left: 0; right: 0; bottom: 6px;
    width: 100%; height: 82px;
    overflow: visible;
  }
  .pipe-loop path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
  .pipe[data-mode="without"] .pipe-loop { display: none; }
  .loop-label { position: absolute; left: 39%; bottom: 0; transform: translateX(-50%); margin: 0; white-space: nowrap; }
}

.pipe-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.pipe-caption { margin: 0; min-height: 1.6em; font-size: 0.98rem; color: var(--ink); max-width: 46rem; }
.pipe-progress { display: flex; gap: 5px; }
.pipe-progress span { width: 16px; height: 4px; border-radius: 2px; background: var(--line-strong); transition: background-color 0.3s ease; }
.pipe-progress span.is-on { background: var(--accent); }

/* Live story states. Classes s-* are added one by one by motion.js. */
.pipe.is-live .pn-agent, .pipe.is-live .pn-output, .pipe.is-live .pn-gate,
.pipe.is-live .pipe-end > .pnode { opacity: 0.35; }
.pipe.is-live .pn-output { opacity: 0; transform: scale(0.96); }
.pipe.is-live .pn-rework { opacity: 0; transform: translateY(-8px); }
.pipe.is-live .loop-label { opacity: 0; }
.pipe.is-live .pipe-loop path { stroke-dashoffset: 0; opacity: 0; transition: opacity 0.4s ease; }
.pipe.is-live .metrics i::before { width: 0; }
.pipe.is-live .gv-pass { display: none; }

.pipe.s-run .pn-agent { opacity: 1; border-color: var(--accent); }
.pipe.s-run .pn-agent .pn-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse-soft 1s ease-in-out infinite; animation-delay: calc(var(--n) * 0.2s); }
.pipe.s-merge .pn-agent { border-color: var(--line-strong); }
.pipe.s-merge .pn-agent .pn-dot { animation: none; background: var(--pass); box-shadow: none; }
.pipe.s-merge .pn-output { opacity: 1; transform: none; }
.pipe.s-merge .pw-1 span { animation: flow 1.1s var(--ease) 2; }
.pipe.s-nogate .pn-gate, .pipe.s-scan .pn-gate { opacity: 1; }
.pipe.s-nogate .pw-2 span, .pipe.s-scan .pw-2 span, .pipe.s-loop .pw-2 span { animation: flow 1.1s var(--ease) 2; }
.pipe.s-scan .pn-gate { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pipe.s-scan .metrics i::before { width: calc(var(--v1) * 100%); }
.pipe.s-fail .m-faith i::before { background: var(--fail); }
.pipe.s-fail .gv-fail { display: inline; }
.pipe.s-fail .pn-gate { border-color: var(--fail); box-shadow: 0 0 0 4px var(--fail-soft); }
.pipe.s-fail .pn-text mark { background: var(--fail-soft); color: var(--fail); }
.pipe.s-loop .loop-label { opacity: 1; }
.pipe.s-loop .pipe-loop path { opacity: 1; animation: dash 1s linear infinite; }
.pipe.s-loop .pn-agent { opacity: 1; }
.pipe.s-loop .pn-agent .pn-dot { background: var(--accent); animation: pulse-soft 1s ease-in-out infinite; }
.pipe.s-fixed .v1 { display: none; }
.pipe.s-fixed .v2 { display: inline; }
.pipe.s-fixed .pn-output { animation: hit 0.5s var(--ease); }
.pipe.s-fixed .metrics i::before { width: calc(var(--v2) * 100%); background: var(--pass); }
.pipe.s-fixed .gv-fail { display: none; }
.pipe.s-fixed .gv-pass { display: inline; }
.pipe.s-fixed .pn-gate { border-color: var(--pass); box-shadow: 0 0 0 4px var(--pass-soft); }
.pipe.s-fixed .pn-agent .pn-dot { animation: none; background: var(--pass); }
.pipe.s-fixed .loop-label, .pipe.s-fixed .pipe-loop path { opacity: 0.35; animation: none; }
.pipe.s-ship-bad .pipe-end > .pn-users, .pipe.s-ship-good .pipe-end > .pn-users { opacity: 1; }
.pipe.s-ship-bad .pw-3 span, .pipe.s-ship-good .pw-3 span { animation: flow 1.1s var(--ease) 2; }
.pipe.s-complaint .pn-users { animation: shake 0.45s ease 2; box-shadow: 0 0 0 4px var(--fail-soft); }
.pipe.s-complaint .pn-text mark { background: var(--fail-soft); color: var(--fail); }
.pipe.s-rework .pn-rework { opacity: 1; transform: none; }
.pipe.s-ship-good .pn-users { box-shadow: 0 0 0 4px var(--pass-soft); }

/* Static (no JS or reduced motion): the "with" story shows its fixed end state. */
.pipe:not(.is-live)[data-mode="with"] .v1 { display: none; }
.pipe:not(.is-live)[data-mode="with"] .v2 { display: inline; }

@keyframes flow {
  from { opacity: 1; top: 0; }
  to { opacity: 1; top: calc(100% - 5px); }
}
@media (min-width: 900px) {
  @keyframes flow {
    from { opacity: 1; left: 0; }
    to { opacity: 1; left: calc(100% - 5px); }
  }
}
@keyframes dash { to { stroke-dashoffset: -16; } }

/* Page hero sits directly on the first tight section. */
.page-hero + .section--tight { padding-top: 0; }
@media (max-width: 600px) {
  .code-line { white-space: pre-wrap; min-width: 0; }
  .code-line code { overflow-wrap: anywhere; }
}

/* =====================================================================
   Inner pages (2026-10 trim): expandable detail, layer stack, kinds,
   services, principles.
   ===================================================================== */

/* ---------- Expandable detail ---------- */
.more { margin-top: 14px; border-top: 1px solid var(--line); }
.more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.3s var(--ease), background-color 0.2s ease, color 0.2s ease;
}
.more summary:hover { color: var(--ink); }
.more[open] summary::after { transform: rotate(45deg); background: var(--ink); color: var(--bg); border-color: var(--ink); }
.more > :not(summary) { margin-top: 12px; }
.more[open] > :not(summary) { animation: more-in 0.35s var(--ease); }
.more ul { font-size: 0.94rem; color: var(--ink-2); margin-bottom: 0; }
@keyframes more-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Layer stack (method) ---------- */
.stack-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.stack-item {
  display: grid;
  gap: 16px 40px;
  margin: 0;
  padding: clamp(22px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  scroll-margin-top: 90px;
  transition: border-color 0.25s ease, box-shadow 0.35s var(--ease);
}
.stack-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .stack-item { grid-template-columns: 1fr 1fr; align-items: start; }
  .stack-item .more { grid-column: 1 / -1; }
}
.si-head { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; align-items: baseline; }
.si-num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  align-self: start;
}
.si-head h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin: 6px 0 4px; }
.si-head p { margin: 0; color: var(--ink-2); }

/* ---------- Kinds (what we review) ---------- */
.kinds { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 760px) { .kinds { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .kinds { grid-template-columns: repeat(3, 1fr); } }
.kinds--wide { grid-template-columns: 1fr !important; }
.kind {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  scroll-margin-top: 90px;
  transition: border-color 0.25s ease, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.kind:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.kind:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.kind h3 { font-size: 1.2rem; margin-bottom: 6px; }
.kind > p { color: var(--ink-2); font-size: 0.96rem; }
.kind .catch { margin-top: auto; }
.kind .more { margin-top: 16px; }
.kind .icon-line { width: 30px; height: 30px; margin-bottom: 16px; color: var(--accent); }
.catch-row { display: grid; gap: 10px; margin-top: auto; }
@media (min-width: 760px) { .catch-row { grid-template-columns: 1fr 1fr; } .catch-row .catch + .catch { margin-top: 0; } }
.group-head { border-top: 0; padding-top: 0; }
.group-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.group-head .eyebrow { margin-bottom: 10px; }

.signs { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .signs { grid-template-columns: repeat(2, 1fr); } }
.signs li {
  position: relative;
  margin: 0;
  padding: 20px 22px 20px 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: 1.02rem;
  color: var(--ink);
}
.signs li::before {
  content: "";
  position: absolute;
  left: 22px; top: 27px;
  width: 12px; height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Services ---------- */
.services { display: grid; gap: 16px; }
@media (min-width: 760px) { .services { grid-template-columns: repeat(2, 1fr); } }
.svc {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  scroll-margin-top: 90px;
  transition: border-color 0.25s ease, box-shadow 0.35s var(--ease);
}
.svc:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.svc:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.svc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.svc-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.svc-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
}
.svc-tag--new { background: var(--fixed-soft); color: var(--fixed); }
.svc h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-bottom: 6px; }
.svc-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 16px; }
.svc > p { color: var(--ink-2); }
.svc .svc-outcome {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}
.layer-rail--4 { }
@media (min-width: 900px) { .layer-rail--4 { grid-template-columns: repeat(4, 1fr); } }
.section--alt .layer-rail li::before { background: var(--surface-2); }

/* ---------- Principles ---------- */
.principles { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; counter-reset: pr; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principles li {
  margin: 0;
  padding: clamp(22px, 3vw, 32px);
  background: var(--surface);
  counter-increment: pr;
  transition: background-color 0.3s ease;
}
.section:not(.section--alt) .principles li { background: var(--bg); }
.principles li:hover { background: var(--surface-2); }
.principles li::before {
  content: counter(pr, decimal-leading-zero);
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
}
.principles h3 { margin-bottom: 6px; }
.principles p { margin: 0; color: var(--ink-2); font-size: 0.96rem; }

.name-line { max-width: 44rem; font-size: clamp(1.2rem, 2.4vw, 1.55rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.4; color: var(--ink); margin: 0; }
.name-line .eyebrow { display: flex; margin-bottom: 12px; }

/* ---------- Track record tiles ---------- */
@media (min-width: 820px) { .proof-tiles--4 { grid-template-columns: repeat(4, 1fr); } }
.pt-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.proof-figure { color: var(--ink); }
.proof-figure small { color: var(--muted); }

/* Founder without a photo */
.founder-strip { grid-template-columns: 1fr !important; border-left: 2px solid var(--accent); padding-left: clamp(18px, 3vw, 32px); }
.founder-solo { max-width: 46rem; }
.founder-solo .founder-role { margin-bottom: 18px; }
.founder-solo p { color: var(--ink-2); }


/* ---------- Consent notice ---------- */
.consent {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  color: var(--ink-2);
  animation: consent-in 0.4s var(--ease);
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}
.consent p { margin: 0; }
.consent a { color: var(--ink); }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; }
.consent.is-leaving { opacity: 0; transform: translateY(8px); }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Prose pages (privacy) ---------- */
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }
.footer-legal { display: inline-flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Task card v2: dot rail, one short line per layer ---------- */
.taskcard .tc-rows { padding: 10px 0; }
.taskcard .tc-row,
.taskcard .tc-row:is(*) {
  grid-template-columns: 12px 1fr auto;
  grid-template-areas: none;
  align-items: center;
  gap: 16px;
  padding: 11px 20px;
}
.taskcard .tc-row + .tc-row { border-top: 0; }
.taskcard .tc-row + .tc-row::before { /* rail between dots */
  display: block;
  left: 25px;
  top: -11px;
  height: 22px;
}
.taskcard .tc-layer {
  grid-area: auto;
  width: 11px; height: 11px;
  padding: 0;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.taskcard .tc-row.is-fail .tc-layer { border-color: var(--fail); background: var(--fail); }
.taskcard .tc-row.is-fixed .tc-layer { border-color: var(--fixed); background: var(--fixed); }
.taskcard .tc-row:not(.is-fail):not(.is-fixed) .tc-layer { border-color: var(--pass); background: var(--pass); }
.taskcard .tc-body, .taskcard .tc-status { grid-area: auto; }
.taskcard .tc-status { margin-top: 0; }
.taskcard .tc-name { font-size: 0.95rem; }
.taskcard .tc-detail { margin-top: 1px; font-size: 0.85rem; color: var(--muted); }

.taskcard.is-live .tc-row:not(.is-reached) .tc-layer { border-color: var(--line-strong); background: var(--surface); }
.taskcard.is-live .tc-row.is-running .tc-layer { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }

.taskcard .sc-verdict { margin-top: 0; justify-content: flex-start; gap: 10px; }
.taskcard .verdict-note::before { content: "\00b7"; margin-right: 10px; }
.verdict-wait { display: none; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); animation: pulse-soft 1.2s ease-in-out infinite; }
.taskcard.is-live .sc-verdict { opacity: 1; transform: none; }
.taskcard.is-live:not(.is-done) .verdict-wait { display: inline; }
.taskcard.is-live:not(.is-done) .verdict-tag,
.taskcard.is-live:not(.is-done) .verdict-note { display: none; }
.taskcard.is-live.is-done .verdict-tag, .taskcard.is-live.is-done .verdict-note { animation: swap-in 0.4s var(--ease); }

/* ---------- Character field (cursor glow and click ripples, drawn by motion.js) ---------- */
.char-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(85% 90% at 55% 40%, #000 35%, transparent 92%);
  mask-image: radial-gradient(85% 90% at 55% 40%, #000 35%, transparent 92%);
}
.hero.has-field::before { background: radial-gradient(42% 50% at 78% 30%, var(--glow), transparent 70%); }
.page-hero.has-field::before { background: radial-gradient(40% 60% at 85% 0%, var(--glow), transparent 70%); }
.page-hero > .container { z-index: 1; }

/* Hero card with a real finding: header link, "needs a human" verdict, issue link */
.taskcard .sc-head a { color: var(--accent); text-decoration: none; }
.taskcard .sc-head a:hover { text-decoration: underline; }
.verdict-tag.is-human { color: var(--fixed); }
.taskcard.is-live.is-done .verdict-tag.is-human::before { box-shadow: 0 0 0 4px var(--fixed-soft); }
.taskcard a.verdict-note { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); font-size: 0.86rem; }
.taskcard a.verdict-note:hover { color: var(--accent); }

/* Upstream issues line under the proof tiles */
.issues-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 20px; font-size: 0.95rem; color: var(--ink-2); }
.issues-line strong { color: var(--ink); font-weight: 500; }
.issues-line a {
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.issues-line a:hover { border-color: var(--accent); color: var(--accent); }
.eval-issues { margin: -6px 0 14px; font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); }
.eval-issues a { color: var(--accent); }
.eval-kind { color: var(--fixed); }
