:root {
  color-scheme: light;
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-3: #6e6e73;
  --ink-4: #86868b;
  --hair: rgba(0, 0, 0, 0.08);
  --hair-2: rgba(0, 0, 0, 0.14);
  --link: #0066cc;
  --cta: #0071e3;
  --c-beliefact: #2a78d6;
  --c-naive: #eb6834;
  --c-bsg: #1baf7a;
  --c-pce: #eda100;
  --c-hume: #e87ba4;
  --c-good: #0ca30c;
  --c-bad: #d03b3b;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.04), 0 18px 48px rgba(0, 0, 0, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --nav-h: 52px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
}
.brand { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-2); font-size: 13px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cta); color: #fff !important; border-radius: 980px;
  padding: 6px 14px; font-size: 13px; font-weight: 500;
}
.pill:hover { background: #0077ed; text-decoration: none; }
.pill.ghost { background: transparent; color: var(--cta) !important; border: 1px solid var(--cta); }
.pill.ghost:hover { background: rgba(0, 113, 227, 0.06); }
.pill.lg { font-size: 17px; padding: 11px 22px; }

/* ---------- layout ---------- */
.section { padding: 110px 22px; }
.section.alt { background: var(--bg-alt); }
.wrap { max-width: 1080px; margin: 0 auto; }
.wrap.wide { max-width: 1280px; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--ink-3); margin: 0 0 10px; letter-spacing: -0.01em; }
.h1 { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.04; font-weight: 700; letter-spacing: -0.035em; margin: 0; }
.h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.07; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 18px; }
.h3 { font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; }
.lede { font-size: clamp(19px, 2vw, 24px); line-height: 1.4; color: var(--ink-3); font-weight: 500; max-width: 820px; margin: 0; letter-spacing: -0.015em; }
.lede strong { color: var(--ink); font-weight: 600; }
.small { font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- hero ---------- */
.hero { padding: 84px 22px 40px; text-align: center; }
.hero .h1 { max-width: 980px; margin: 0 auto; }
.hero .sub { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.25; font-weight: 600; color: var(--ink-3); margin: 18px auto 0; max-width: 820px; letter-spacing: -0.02em; }
.authors { margin: 28px auto 6px; font-size: 17px; color: var(--ink-2); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.authors span { white-space: nowrap; }
.affil { font-size: 15px; color: var(--ink-3); }
.cta-row { display: flex; gap: 14px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.hero-stage { max-width: 1180px; margin: 54px auto 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.figure-card { padding: 28px; }
.figure-card img { width: 100%; height: auto; }
.caption { font-size: 14px; color: var(--ink-3); margin-top: 14px; line-height: 1.5; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.stat { background: var(--card); border-radius: var(--radius-md); padding: 28px 26px; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.05); }
.stat .num { font-size: 48px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; color: var(--ink); }
.stat .num small { font-size: 22px; font-weight: 600; color: var(--ink-3); letter-spacing: -0.02em; }
.stat .what { font-size: 15px; color: var(--ink-3); margin-top: 10px; line-height: 1.45; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.feature { background: var(--card); border-radius: var(--radius-md); padding: 28px; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.05); }
.feature p { margin: 0; color: var(--ink-3); font-size: 16px; }
.feature .k { font-size: 13px; font-weight: 600; color: var(--c-beliefact); letter-spacing: 0; margin-bottom: 10px; }

/* ---------- replay ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 36px auto 28px; }
.tab {
  border: 0; background: rgba(0,0,0,.05); color: var(--ink-2);
  font: 500 14px/1 var(--font); padding: 10px 16px; border-radius: 980px; cursor: pointer;
  transition: background .2s, color .2s;
}
.tab:hover { background: rgba(0,0,0,.08); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab .tag { font-size: 11px; opacity: .7; margin-left: 6px; }

.replay { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.replay > * { min-width: 0; }
.stage-card { position: relative; }
.stage { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #fff; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .chip {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair); border-radius: 980px; padding: 6px 12px; font-size: 12px; color: var(--ink-2);
}
.stage .roundbig {
  position: absolute; top: 12px; right: 16px; z-index: 2; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.stage .roundbig .n { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.stage .roundbig .l { font-size: 12px; color: var(--ink-3); }
.montage {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 3;
  background: rgba(29,29,31,.86); color: #fff; border-radius: 16px; padding: 14px 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform: translateY(14px); opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.montage.on { opacity: 1; transform: none; }
.montage .t { font-weight: 600; font-size: 16px; display: flex; gap: 10px; align-items: center; }
.montage .t .r { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.65); font-variant-numeric: tabular-nums; }
.montage .d { font-size: 14px; color: rgba(255,255,255,.86); margin-top: 4px; line-height: 1.45; }
.montage .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.controls { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--hair); flex-wrap: wrap; }
.play {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.play svg { width: 16px; height: 16px; fill: currentColor; }
.scrub { position: relative; flex: 1 1 260px; min-width: 200px; height: 40px; }
.scrub input[type=range] { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; height: 40px; cursor: pointer; }
.scrub input[type=range]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.scrub input[type=range]::-moz-range-track { height: 4px; background: transparent; }
.scrub input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.2); margin-top: -6px; }
.scrub input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.2); }
.scrub .rail { position: absolute; left: 0; right: 0; top: 18px; height: 4px; border-radius: 2px; background: rgba(0,0,0,.08); pointer-events: none; }
.scrub .fill { position: absolute; left: 0; top: 18px; height: 4px; border-radius: 2px; background: var(--ink); pointer-events: none; }
.scrub .mk { position: absolute; top: 8px; width: 2px; height: 8px; border-radius: 1px; pointer-events: none; }
.scrub .fin { position: absolute; top: 24px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; pointer-events: none; border: 2px solid #fff; }
.seg { display: inline-flex; background: rgba(0,0,0,.05); border-radius: 980px; padding: 3px; }
.seg button { border: 0; background: transparent; font: 500 12px/1 var(--font); color: var(--ink-2); padding: 7px 11px; border-radius: 980px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ctl-group { display: flex; align-items: center; gap: 8px; }
.ctl-label { font-size: 12px; color: var(--ink-3); }

.panel { padding: 24px 24px 22px; }
.panel .task-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.panel .scene { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.panel .lead { font-size: 15px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.5; }
.hidden-box { background: var(--bg-alt); border-radius: 12px; padding: 11px 13px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.hidden-box b { font-weight: 600; color: var(--ink); display: block; font-size: 12px; margin-bottom: 2px; color: var(--ink-3); }
.board { margin: 18px 0 6px; display: grid; gap: 10px; }
.agent-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.agent-row .sw { width: 12px; height: 12px; border-radius: 50%; }
.agent-row .nm { font-weight: 600; font-size: 15px; }
.agent-row .st { font-size: 13px; color: var(--ink-3); grid-column: 2 / 4; margin-top: -6px; min-height: 18px; }
.agent-row .rn { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 980px; margin-left: 6px; vertical-align: 1px; }
.badge.ok { background: rgba(12,163,12,.12); color: #0a7d0a; }
.badge.no { background: rgba(208,59,59,.12); color: #b42f2f; }
.panel h4 { font-size: 12px; font-weight: 600; color: var(--ink-3); margin: 20px 0 8px; letter-spacing: 0; }
.belief-q { margin-bottom: 12px; }
.belief-q .q { font-size: 14px; font-weight: 600; margin-bottom: 6px; line-height: 1.35; }
.ans { display: grid; grid-template-columns: 1fr 44px; gap: 2px 10px; align-items: center; font-size: 13px; margin: 4px 0; }
.ans .txt { color: var(--ink-2); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ans .p { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.ans .bar { grid-column: 1 / 3; height: 4px; border-radius: 2px; background: rgba(0,0,0,.06); overflow: hidden; }
.ans .bar i { display: block; height: 100%; background: var(--c-beliefact); border-radius: 2px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.ans.refuted .txt { text-decoration: line-through; color: var(--ink-4); }
.ans.refuted .bar i { background: rgba(0,0,0,.18); }
.ans.supported .txt::after { content: " ✓"; color: var(--c-good); font-weight: 700; }
.thought { font-size: 13px; color: var(--ink-2); line-height: 1.5; background: var(--bg-alt); border-radius: 12px; padding: 10px 12px; min-height: 64px; }
.thought .who { font-weight: 600; font-size: 12px; margin-bottom: 3px; }
.empty-note { font-size: 13px; color: var(--ink-4); }

.moments { display: flex; gap: 14px; overflow-x: auto; padding: 22px 2px 8px; scroll-snap-type: x mandatory; }
.moment {
  flex: 0 0 260px; scroll-snap-align: start; background: var(--card); border-radius: 16px; padding: 14px 16px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.06); border: 2px solid transparent; transition: border-color .25s, transform .25s; text-align: left;
  font: inherit; color: inherit;
}
.moment:hover { transform: translateY(-2px); }
.moment.active { border-color: var(--ink); }
.moment .r { font-size: 12px; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.moment .r i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.moment .t { font-weight: 600; font-size: 15px; margin: 4px 0 4px; }
.moment .d { font-size: 13px; color: var(--ink-3); line-height: 1.42; }
.note-under { margin-top: 10px; }

/* ---------- charts ---------- */
.chart-card { padding: 28px 28px 22px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.chart-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.chart-sub { font-size: 14px; color: var(--ink-3); margin: 4px 0 0; }
.chart-tools { display: flex; gap: 8px; }
.chart { position: relative; margin-top: 14px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); }
.tip {
  position: absolute; pointer-events: none; background: rgba(255,255,255,.96); border: 1px solid var(--hair-2); border-radius: 10px;
  padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.12); opacity: 0; transition: opacity .12s; white-space: nowrap; z-index: 5;
}
.tip.on { opacity: 1; }
.tip .row { display: flex; align-items: center; gap: 6px; margin: 2px 0; font-variant-numeric: tabular-nums; }
.tip .row i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tip .row b { margin-left: auto; padding-left: 12px; font-weight: 600; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--hair); }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.data-table tr.ours td { font-weight: 600; }
.data-table .grp { text-align: center; color: var(--ink-2); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- citation / footer ---------- */
pre.bib {
  background: var(--card); border-radius: var(--radius-md); padding: 22px 24px; font: 13px/1.6 var(--mono); color: var(--ink-2);
  overflow-x: auto; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.05); margin: 0;
}
.copy { margin-top: 12px; }
footer { padding: 40px 22px 60px; font-size: 12px; color: var(--ink-4); border-top: 1px solid var(--hair); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .replay { grid-template-columns: 1fr; }
  .stats, .feature-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links a.hide-sm { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 72px 16px; }
  .hero { padding: 56px 16px 24px; }
  .nav-inner { padding: 0 16px; }
  .nav-links { gap: 14px; }
  .stage { aspect-ratio: 1 / 1; }
  .figure-card, .chart-card, .panel { padding: 18px; }
  .stage .roundbig .n { font-size: 26px; }
  .montage { left: 10px; right: 10px; bottom: 10px; padding: 10px 14px; }
  .montage .d { display: none; }
}
