/* Whyloop: editorial research-lab layout.
   Type: Newsreader (display serif, optical sizes) for headlines and quotes,
   Geist for interface and body, Geist Mono for labels, data and citations.
   Colour follows the operating system's light/dark setting. */

:root {
  color-scheme: light dark;

  --serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Light: clean white, neutral greys and deep green ink */
  --bg: #FFFFFF;
  --bg-alt: #F7F8F7;
  --surface: #FFFFFF;
  --surface-2: #F1F3F2;
  --text: #0B1411;
  --muted: #4B5651;
  --dim: #7F8984;
  --line: #E5E8E6;
  --line-strong: #CDD2CF;
  --accent: #1D6A4E;
  --accent-ink: #1D6A4E;
  --accent-soft: #E6F2EC;
  --on-accent: #FFFFFF;
  --warn: #A4442A;
  --glow: rgba(29, 106, 78, 0.05);
  --shadow: 0 1px 0 rgba(11, 20, 17, 0.04), 0 24px 48px -28px rgba(11, 20, 17, 0.18);

  --w-head: 400;
  --w-body: 400;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1.02rem + 0.4vw, 1.4375rem);
  --fs-h3: 1.375rem;
  --fs-h2: clamp(2rem, 1.35rem + 2.6vw, 3.375rem);
  --fs-h1: clamp(2.875rem, 1.4rem + 5.4vw, 7.25rem);
  --fs-stat: clamp(3.25rem, 2.2rem + 4vw, 5.5rem);

  --wrap: 100rem;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1713;
    --bg-alt: #0D1D18;
    --surface: #0F211B;
    --surface-2: #16302A;
    --text: #ECF2EE;
    --muted: #A1B5AB;
    --dim: #6E857A;
    --line: #20382F;
    --line-strong: #2E4B40;
    --accent: #9BE3BF;
    --accent-ink: #9BE3BF;
    --accent-soft: #143A2E;
    --on-accent: #06201A;
    --warn: #F2B8A0;
    --glow: rgba(155, 227, 191, 0.10);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
    /* Light text on dark reads heavier; take a little weight off */
    --w-head: 360;
    --w-body: 370;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1713;
  --bg-alt: #0D1D18;
  --surface: #0F211B;
  --surface-2: #16302A;
  --text: #ECF2EE;
  --muted: #A1B5AB;
  --dim: #6E857A;
  --line: #20382F;
  --line-strong: #2E4B40;
  --accent: #9BE3BF;
  --accent-ink: #9BE3BF;
  --accent-soft: #143A2E;
  --on-accent: #06201A;
  --warn: #F2B8A0;
  --glow: rgba(155, 227, 191, 0.10);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --w-head: 360;
  --w-body: 370;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: var(--w-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: var(--w-head);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  text-wrap: balance;
  letter-spacing: -0.012em;
  margin: 0;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
@media (min-width: 640px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: clamp(48px, 4.5vw, 88px); } }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.eyebrow .n { color: var(--accent-ink); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.accent { color: var(--accent-ink); }

/* Citations: [n] in mono, linked to the reference list */
.cite {
  font-family: var(--mono);
  font-size: 0.68em;
  font-weight: 500;
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
  color: var(--accent-ink);
  text-decoration: none;
  padding: 0 1px;
}
.cite::before { content: "["; opacity: 0.6; }
.cite::after { content: "]"; opacity: 0.6; }
.cite:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-family: var(--sans); font-weight: 500; font-size: 0.9375rem; line-height: 1;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--text); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { padding: 10px 16px; font-size: 0.875rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn:hover .arrow.down { transform: translateY(3px); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.topbar.scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
  opacity: 0; transition: opacity 0.25s ease;
}
.topbar.scrolled .progress { opacity: 1; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; transition: padding 0.25s ease; }
.topbar.scrolled .nav { padding-block: 12px; }
/* Wordmark: ring-and-dot symbol (the loop, and the dot of a question) + tight Geist */
.mark {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text); text-decoration: none;
  font-family: var(--sans); font-weight: 500; font-size: 1.1875rem; line-height: 1;
  letter-spacing: -0.04em; font-feature-settings: "kern", "liga";
}
.mark svg { width: 22px; height: 22px; flex: none; color: var(--text); --mark-dot: var(--accent); transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1); }
.mark:hover svg { transform: rotate(-90deg); }
.nav-links { display: none; gap: 32px; font-size: 0.9375rem; }
.nav-links a { position: relative; color: var(--muted); text-decoration: none; transition: color 0.15s ease; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.25s ease;
}
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }
@media (min-width: 880px) { .nav-links { display: flex; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; gap: 56px; align-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding-block: 56px 88px;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(48px, 5vw, 120px);
    min-height: calc(100svh - 80px); padding-block: 48px 80px; align-content: center;
  }
}
.hero-copy { display: grid; gap: 28px; justify-items: start; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 10px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.status .dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.status .dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent);
  animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.8; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.028em;
  max-width: 13ch;
}
.hero h1 .dim { color: var(--dim); }
.hero h1 em { color: var(--accent-ink); font-style: italic; letter-spacing: -0.01em; }
.hero .lede { font-size: var(--fs-lg); line-height: 1.55; color: var(--muted); max-width: 44ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* Hero loop visual */
.viz { position: relative; width: 100%; max-width: 640px; aspect-ratio: 1; margin-inline: auto; }
.viz svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.viz .track { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.viz .inner { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 7; transform-origin: 200px 200px; animation: spin 90s linear infinite; }
.viz .ticks line { stroke: var(--line-strong); stroke-width: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.viz .comet { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.viz .dot-glow { fill: var(--accent); opacity: 0.16; }
.viz .dot { fill: var(--accent); }
.viz .node { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.5; transition: fill 0.3s ease, stroke 0.3s ease; }
.viz .node.on { fill: var(--accent); stroke: var(--accent); }
.viz-label {
  position: absolute; font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--dim); font-variant-numeric: tabular-nums; transition: color 0.3s ease;
}
.viz-label.on { color: var(--accent-ink); }
.viz-label[data-i="0"] { left: 50%; top: 12.5%; transform: translate(-50%, 12px); }
.viz-label[data-i="1"] { left: 87.5%; top: 50%; transform: translate(calc(-100% - 12px), -50%); }
.viz-label[data-i="2"] { left: 50%; top: 87.5%; transform: translate(-50%, calc(-100% - 12px)); }
.viz-label[data-i="3"] { left: 12.5%; top: 50%; transform: translate(12px, -50%); }
.viz-wrap { width: 100%; max-width: 640px; margin-inline: auto; display: grid; gap: 20px; }
.viz-legend {
  list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px;
  font-size: var(--fs-sm); color: var(--dim);
}
@media (min-width: 560px) { .viz-legend { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.viz-legend li { display: grid; gap: 2px; transition: color 0.3s ease; line-height: 1.3; }
.viz-legend span { font-family: var(--mono); font-size: var(--fs-xs); color: var(--dim); transition: color 0.3s ease; }
.viz-legend li.on { color: var(--text); }
.viz-legend li.on span { color: var(--accent-ink); }
.viz-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46%; text-align: center; display: grid; gap: 8px; justify-items: center;
}
.viz-step { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); transition: opacity 0.28s ease; font-variant-numeric: tabular-nums; }
.viz-text {
  font-family: var(--serif); font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); line-height: 1.3; font-weight: var(--w-head);
  min-height: 3.9em; display: grid; align-items: center; text-wrap: balance;
  transition: opacity 0.28s ease, transform 0.28s ease, filter 0.28s ease;
}
.viz-text.out { opacity: 0; transform: translateY(6px); filter: blur(3px); }
@media (max-width: 480px) { .viz-center { width: 56%; } }

/* ---------- Sections ---------- */
.section { padding-block: 104px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .section { padding-block: 72px; } }
.section-head { display: grid; gap: 20px; max-width: 48rem; }
.section-head h2 { font-size: var(--fs-h2); line-height: 1.04; letter-spacing: -0.022em; }
.section-head p { color: var(--muted); font-size: var(--fs-lg); line-height: 1.55; max-width: 58ch; }
.section-head p.eyebrow, .partners-head p.eyebrow { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }

/* Evidence strip */
.evidence { border-top: 1px solid var(--line); background: var(--bg-alt); }
.evidence .wrap { padding-block: 56px 48px; display: grid; gap: 32px; }
.evidence-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.evidence-head a { font-size: var(--fs-sm); color: var(--muted); text-decoration: none; }
.evidence-head a:hover { color: var(--text); }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stats li { padding: 28px 0 8px; display: grid; gap: 10px; align-content: start; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) {
  .stats li { padding: 32px 32px 8px 0; border-bottom: 0; }
  .stats li + li { padding-left: 32px; border-left: 1px solid var(--line); }
}
.stat-n {
  font-family: var(--serif); font-size: var(--fs-stat); line-height: 0.9; font-weight: 300; letter-spacing: -0.03em;
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-n small { font-size: 0.5em; letter-spacing: 0; margin-left: 2px; color: var(--dim); }
.stats p { color: var(--muted); max-width: 30ch; }

/* Pull quote */
.pull { padding-block: 96px; }
.pull figure { margin: 0; display: grid; gap: 20px; max-width: 54rem; }
.pull blockquote {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.75rem); line-height: 1.08; letter-spacing: -0.02em;
  hanging-punctuation: first; text-wrap: balance;
}
.pull figcaption { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Problem: editorial two column */
.split { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 80px; }
  .split .section-head { position: sticky; top: 120px; align-self: start; }
}
.points { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.points li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 16px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.points .eyebrow { padding-top: 6px; color: var(--accent-ink); }
.points h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.15; }
.points p { grid-column: 2; color: var(--muted); max-width: 52ch; }

/* ---------- Live demo ---------- */
.demo-section { background: var(--bg-alt); }
.demo {
  margin-top: 56px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 40%, var(--surface));
}
.demo-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-tab {
  font: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--muted);
  background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.demo-tab:hover { color: var(--text); }
.demo-tab[aria-pressed="true"] { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.demo-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.demo-steps li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; transition: color 0.2s ease; }
.demo-steps li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; transition: background-color 0.2s ease; }
.demo-steps li.done { color: var(--muted); }
.demo-steps li.done::before { background: currentColor; }
.demo-steps li.current { color: var(--accent-ink); }
.demo-steps li.current::before { background: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) { .demo-steps { display: none; } }

.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .demo-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (min-width: 1400px) { .demo-grid { grid-template-columns: minmax(0, 1fr) 380px; } }
.demo-main { padding: 28px 20px 32px; display: grid; gap: 18px; align-content: start; min-height: 420px; }
@media (min-width: 640px) { .demo-main { padding: 36px 40px 40px; } }
.demo-aside { border-top: 1px solid var(--line); padding: 28px 20px; display: grid; gap: 16px; align-content: start; background: color-mix(in srgb, var(--surface-2) 25%, var(--surface)); }
@media (min-width: 1000px) { .demo-aside { border-top: 0; border-left: 1px solid var(--line); padding: 36px 28px; } }
.demo-aside h3 { font-size: 1.25rem; line-height: 1.2; }
.demo-aside p { font-size: var(--fs-sm); color: var(--muted); }
.memory { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.memory li { font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); display: grid; gap: 4px; animation: enter 0.45s ease-out both; }
.memory li .k { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.memory .empty { color: var(--dim); border-style: dashed; background: transparent; animation: none; }
.privacy { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-xs) !important; font-family: var(--mono); letter-spacing: 0.02em; }
.privacy svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.d-enter { animation: enter 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

.d-msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 480px) { .d-msg { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; } .d-avatar { width: 28px; height: 28px; font-size: 0.5625rem; } }
.d-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 500;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.d-avatar.you { background: var(--text); color: var(--bg); border-color: var(--text); }
.d-avatar.wl { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.d-avatar.wl svg { width: 16px; height: 16px; }
.d-who { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.d-who .case { color: var(--muted); }
.d-context { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 10px; }
.d-proposal { font-family: var(--serif); font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); line-height: 1.2; font-weight: var(--w-head); }
.d-proposal .s {
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 58% / 0% 2px;
  transition: background-size 0.7s cubic-bezier(0.65, 0, 0.35, 1), color 0.7s ease;
}
.d-msg.overridden .d-proposal .s { background-size: 100% 2px; color: var(--dim); }
.d-why-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.d-why-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; }
.d-why-list li::before { content: "–"; color: var(--dim); }
.d-applied {
  margin-top: 12px; display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px;
  background: var(--accent-soft); font-size: var(--fs-sm);
}
.d-applied .k { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }

.thinking { display: inline-flex; gap: 5px; align-items: center; height: 1.75rem; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: blink 1s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: 0.15s; }
.thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.d-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 50px; }
@media (max-width: 480px) { .d-actions { padding-left: 0; } }

.d-options { border: 0; margin: 0; padding: 0 0 0 50px; display: grid; gap: 8px; }
@media (max-width: 480px) { .d-options { padding-left: 0; } }
.d-options legend { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 8px; padding: 0; }
.d-option { position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.d-option:hover { border-color: var(--line-strong); }
.d-option input { position: absolute; left: 14px; top: 15px; margin: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.d-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.d-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-option strong { font-weight: 500; }
.d-option span { font-size: var(--fs-sm); color: var(--muted); }
.d-options .btn { justify-self: start; margin-top: 6px; }

.d-human { font-family: var(--serif); font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem); line-height: 1.25; font-weight: var(--w-head); }

.d-whybox {
  margin-left: 50px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 16px;
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); padding: 16px; display: grid; gap: 14px;
}
@media (max-width: 480px) { .d-whybox { margin-left: 0; } }
.d-msg .d-whybox { margin-left: 0; }
.d-whybox .q { display: flex; gap: 10px; align-items: center; font-family: var(--serif); font-size: 1.3125rem; line-height: 1.25; font-weight: var(--w-head); color: var(--text); }
.d-whybox .q svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  font: inherit; font-size: var(--fs-sm); text-align: left; line-height: 1.35; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; cursor: pointer;
  transition: border-color 0.15s ease;
}
.chip-btn:hover { border-color: var(--accent); }
.d-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; }
.d-input:focus-within { border-color: var(--accent); }
.d-input textarea { font: inherit; font-size: 1rem; color: var(--text); background: transparent; border: 0; resize: none; min-height: 3.2em; padding: 6px 0; outline: none; width: 100%; }
.d-input textarea::placeholder { color: var(--dim); }
.send { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; transition: opacity 0.15s ease, transform 0.15s ease; }
.send:disabled { opacity: 0.35; cursor: not-allowed; }
.send svg { width: 16px; height: 16px; }
.d-whybox .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--fs-xs); color: var(--muted); font-family: var(--mono); letter-spacing: 0.02em; }
.linkish { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--text); }

.d-lesson { margin-left: 50px; border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; background: var(--surface); }
@media (max-width: 480px) { .d-lesson { margin-left: 0; } }
.d-lesson header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.d-lesson header .eyebrow { color: var(--accent-ink); }
.d-lesson .badge { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.d-lesson dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.d-lesson .row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); animation: enter 0.4s ease-out both; }
.d-lesson .row:last-child { border-bottom: 0; }
.d-lesson dt { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); padding-top: 3px; }
.d-lesson dd { margin: 0; }
.d-lesson dd q { font-family: var(--serif); font-style: italic; font-size: 1.0625rem; }

.d-note { margin-left: 50px; font-size: var(--fs-sm); color: var(--muted); border-left: 2px solid var(--accent); padding: 4px 0 4px 14px; display: grid; gap: 10px; justify-items: start; }
@media (max-width: 480px) { .d-note { margin-left: 0; } }
.d-divider { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.d-divider::before, .d-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Approach ---------- */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; position: relative; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { position: relative; padding: 28px 0 32px; border-top: 1px solid var(--line); counter-increment: step; display: grid; gap: 12px; align-content: start; }
@media (min-width: 860px) { .steps li { padding: 32px 40px 8px 0; } }
.steps li::before { content: "0" counter(step); font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--accent-ink); }
.steps .bar { position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1); }
.steps.in .bar { transform: scaleX(1); }
.steps.in li:nth-child(2) .bar { transition-delay: 0.25s; }
.steps.in li:nth-child(3) .bar { transition-delay: 0.5s; }
.steps h3 { font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem); line-height: 1.15; }
.steps h3 em { color: var(--accent-ink); }
.steps p { color: var(--muted); max-width: 36ch; }

.context { margin-top: 72px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); padding: 32px 0 0; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .context { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 80px; } }
.context h3 { font-size: clamp(1.5rem, 1.25rem + 0.8vw, 2rem); line-height: 1.15; }
.context .body { display: grid; gap: 16px; color: var(--muted); max-width: 60ch; }

/* Outcomes */
.outcomes { list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .outcomes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.outcomes li {
  border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 12px; align-content: start;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.outcomes li:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.outcomes svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 24px; }
.outcomes h3 { font-size: 1.5rem; line-height: 1.2; }
.outcomes p { color: var(--muted); }

/* ---------- Research index ---------- */
.refs { list-style: none; margin: 48px 0 0; padding: 0; border-top: 1px solid var(--line); counter-reset: ref; }
.ref { border-bottom: 1px solid var(--line); }
.ref a {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px; gap: 4px 16px; padding: 24px 0;
  text-decoration: none; color: inherit; transition: background-color 0.2s ease;
}
@media (min-width: 900px) { .ref a { grid-template-columns: 56px 200px minmax(0, 1fr) 24px; padding: 28px 0; } }
.ref a:hover { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.ref .n { font-family: var(--mono); font-size: var(--fs-xs); color: var(--accent-ink); padding-top: 5px; font-variant-numeric: tabular-nums; }
.ref .meta { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--muted); padding-top: 5px; line-height: 1.6; }
@media (max-width: 899px) { .ref .meta { grid-column: 2; grid-row: 1; } .ref .main { grid-column: 2; } .ref .go { grid-column: 3; grid-row: 1; } }
.ref .main { display: grid; gap: 6px; }
.ref .title { font-family: var(--serif); font-size: 1.375rem; line-height: 1.25; font-weight: var(--w-head); }
.ref .src { font-size: var(--fs-sm); color: var(--muted); }
.ref .why { font-size: var(--fs-sm); color: var(--text); max-width: 64ch; }
.ref .go { color: var(--dim); padding-top: 4px; transition: transform 0.2s ease, color 0.2s ease; }
.ref a:hover .go { color: var(--accent-ink); transform: translate(2px, -2px); }
.ref:target a { background: var(--accent-soft); }
.refs-note { margin-top: 20px; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Partners + form ---------- */
.partners-head { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 960px) { .partners-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 80px; } }
.partners-head h2 { font-size: var(--fs-h1); line-height: 0.98; letter-spacing: -0.028em; }
.partners-head h2 .dim { color: var(--dim); }
.partners-head p { color: var(--muted); font-size: var(--fs-lg); max-width: 46ch; }

.fit { margin-top: 64px; display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 860px) { .fit { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fit > div + div { border-left: 1px solid var(--line); padding-left: 40px; } }
.fit > div { padding: 32px 40px 32px 0; }
.fit ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.fit li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.fit li::before { content: ""; width: 12px; height: 12px; margin-top: 7px; border-radius: 50%; border: 1.5px solid var(--accent); }

.cta-panel {
  margin-top: 64px; display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 24px; padding: 28px 20px; background: var(--surface); box-shadow: var(--shadow);
}
@media (min-width: 560px) { .cta-panel { padding: 40px; } }
@media (min-width: 960px) { .cta-panel { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; padding: 56px; } }
.cta-intro { display: grid; gap: 14px; align-content: start; }
.cta-intro h3 { font-size: var(--fs-h2); line-height: 1.04; letter-spacing: -0.022em; }
.cta-intro p { color: var(--muted); max-width: 40ch; }
.form-note { font-size: var(--fs-sm); }
.email-line { color: var(--muted); }
.email-line a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-thickness 0.15s ease; }
.email-line a:hover { text-decoration-thickness: 2px; }

.enquiry { display: grid; gap: 18px; min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: var(--fs-sm); font-weight: 500; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-width: 0;
  transition: border-color 0.15s ease;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%237C8A83' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field [aria-invalid="true"] { border-color: var(--warn); }
.field textarea { min-height: 7.5rem; resize: vertical; }
.field ::placeholder { color: var(--dim); }
.pair { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit { justify-self: start; }
.form-status { font-size: 0.95rem; padding: 12px 14px; border-radius: 12px; }
.form-status.error { border: 1px solid var(--warn); color: var(--warn); }
.form-status.ok { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); }
footer.site .wrap { padding-block: 32px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; font-size: var(--fs-sm); color: var(--muted); }
footer.site .mark { font-size: 1.0625rem; }
footer.site .mark svg { width: 19px; height: 19px; }

/* ---------- Motion ---------- */
.js [data-reveal] { transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(18px); }
.js .hero-copy > * { animation: enter 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.js .viz-wrap { animation: fade 1.2s 0.2s ease-out both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js [data-reveal]:not(.in) { opacity: 1; transform: none; }
  .status .dot::after { display: none; }
}
