/* The Examined Life — shared styles.
   Look: cool marble ground, lapis ink, one gold accent used sparingly.
   Every branch of philosophy owns one color, used for its tiles, rules and widgets. */
:root {
  --bg: #eef1f5; --surface: #fbfcfd; --surface-2: #e3e8ef; --ink: #141b2d; --muted: #536077; --line: #cfd6e1;
  --lapis: #233f94; --lapis-soft: #dfe6f7; --gold: #9c6b0e; --gold-soft: #f5ead2;
  --ok: #1d7445; --ok-soft: #dff2e6; --bad: #b02a22; --bad-soft: #fbe4e1;
  --c-phil: #233f94; --c-meta: #6a44b8; --c-epis: #0b7168; --c-value: #9c6b0e; --c-ethics: #b0365a; --c-aes: #b35a07; --c-logic: #2b4fb8; --c-method: #3f4a5e;
  --shadow: 0 1px 2px rgb(20 27 45 / .06), 0 10px 30px rgb(20 27 45 / .07);
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --ui: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --r-sm: 8px; --r: 14px; --r-lg: 22px;
  --wrap: 1120px; --read: 68ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c111d; --surface: #141b2b; --surface-2: #1b2438; --ink: #e7ebf3; --muted: #9ba7bd; --line: #28324a;
  --lapis: #8ca6f4; --lapis-soft: #1c2747; --gold: #e2b456; --gold-soft: #33290f;
  --ok: #62cf8f; --ok-soft: #12301f; --bad: #f28b82; --bad-soft: #3a1a17;
  --c-phil: #8ca6f4; --c-meta: #ad8cf2; --c-epis: #4dc6bb; --c-value: #e2b456; --c-ethics: #ef7f9d; --c-aes: #f2a24f; --c-logic: #8ca6f4; --c-method: #aab5c8;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px rgb(0 0 0 / .28);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0c111d; --surface: #141b2b; --surface-2: #1b2438; --ink: #e7ebf3; --muted: #9ba7bd; --line: #28324a;
  --lapis: #8ca6f4; --lapis-soft: #1c2747; --gold: #e2b456; --gold-soft: #33290f;
  --ok: #62cf8f; --ok-soft: #12301f; --bad: #f28b82; --bad-soft: #3a1a17;
  --c-phil: #8ca6f4; --c-meta: #ad8cf2; --c-epis: #4dc6bb; --c-value: #e2b456; --c-ethics: #ef7f9d; --c-aes: #f2a24f; --c-logic: #8ca6f4; --c-method: #aab5c8;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px rgb(0 0 0 / .28);
  color-scheme: dark; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.65 var(--body); overflow-x: hidden;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased }
img, svg { max-width: 100%; display: block }
a { color: var(--lapis); text-underline-offset: 3px; text-decoration-thickness: 1px }
a:hover { text-decoration-thickness: 2px }
:focus-visible { outline: 3px solid var(--lapis); outline-offset: 3px; border-radius: 6px }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -.015em; margin: 0; text-wrap: balance }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); letter-spacing: -.03em }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -.02em }
h3 { font-size: 1.3rem }
h4 { font-size: 1.05rem }
p { margin: 0 }
ul, ol { margin: 0; padding-left: 1.25em }
li + li { margin-top: var(--s2) }
strong { font-weight: 650 }
em { font-style: italic }
[hidden] { display: none !important }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; left: var(--s4); top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: var(--s2) var(--s4); border-radius: var(--r-sm); font: 600 15px var(--ui) }
.skip:focus { top: var(--s4) }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
.read { max-width: var(--read) }
.stack { display: grid; gap: var(--s4); align-content: start }
.stack-lg { display: grid; gap: var(--s6); align-content: start }
.eyebrow { font: 700 13px/1.2 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--c, var(--muted)) }
.lead { font-size: clamp(1.1rem, 2vw, 1.28rem); color: var(--muted); max-width: 60ch }
.muted { color: var(--muted) }
.mono { font-family: var(--mono); font-size: .9em }
section.band { padding-block: var(--s8) }
section.band + section.band { padding-top: 0 }
.band-alt { background: var(--surface); border-block: 1px solid var(--line) }
.band-alt + section.band { padding-top: var(--s8) }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg) }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s }
.site-head.scrolled { border-bottom-color: var(--line) }
.head-row { display: flex; align-items: center; gap: var(--s4); min-height: 68px }
.brand { display: flex; align-items: center; gap: var(--s3); color: var(--ink); text-decoration: none; font: 700 19px/1 var(--display); letter-spacing: -.02em; margin-right: auto }
.brand svg { width: 30px; height: 30px; flex: none }
.nav { display: flex; gap: var(--s1); align-items: center }
.nav a { font: 600 15px/1 var(--ui); color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 999px; transition: color .15s, background .15s }
.nav a:hover { color: var(--ink); background: var(--surface-2) }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2) }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; flex: none }
.icon-btn:hover { border-color: var(--lapis); background: var(--lapis-soft) }
.icon-btn svg { width: 20px; height: 20px }
.menu-btn { display: none }
.theme-btn .moon { display: none }
:root[data-theme="dark"] .theme-btn .moon { display: block } :root[data-theme="dark"] .theme-btn .sun { display: none }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .moon { display: block } :root:not([data-theme="light"]) .theme-btn .sun { display: none } }
.progress-line { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--c, var(--lapis)); transition: width .1s linear }
@media (max-width: 900px) {
  .menu-btn { display: inline-grid }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: var(--s2) max(16px, env(safe-area-inset-right, 0px)) var(--s4) max(16px, env(safe-area-inset-left, 0px)); display: none }
  .nav.open { display: flex }
  .nav a { padding: 14px 12px; border-radius: var(--r-sm); font-size: 17px }
}

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); font: 650 16px/1 var(--ui); padding: 14px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s }
.btn:hover { border-color: var(--c, var(--lapis)); transform: translateY(-1px); box-shadow: var(--shadow) }
.btn.primary { background: var(--c, var(--lapis)); border-color: var(--c, var(--lapis)); color: var(--surface) }
.btn.small { padding: 10px 14px; font-size: 15px }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none }
.btn svg { width: 18px; height: 18px }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center }
.chip { font: 600 14px/1 var(--ui); padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s }
.chip:hover { border-color: var(--lapis) }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.chip.right { background: var(--ok-soft); border-color: var(--ok); color: var(--ok) }
.chip.wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad) }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 650 12px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px;
  color: var(--c, var(--muted)); background: color-mix(in srgb, var(--c, var(--muted)) 12%, transparent) }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor }

/* ---------- Home hero ---------- */
.hero { padding-block: var(--s8) var(--s7); position: relative }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s7); align-items: center }
.hero h1 .accent { color: var(--lapis) }
.hero .greek { font: 500 15px/1 var(--mono); color: var(--muted); letter-spacing: .04em }
.hero .greek b { color: var(--gold); font-weight: 600 }
.ticker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); box-shadow: var(--shadow); display: grid; gap: var(--s4); position: relative; overflow: hidden }
.ticker::after { content: "?"; position: absolute; right: -10px; bottom: -70px; font: 800 260px/1 var(--display); color: var(--c, var(--lapis)); opacity: .07; pointer-events: none; transition: color .4s }
.ticker-q { font: 600 clamp(1.4rem, 2.6vw, 1.9rem)/1.25 var(--display); letter-spacing: -.015em; min-height: 3.75em; transition: opacity .35s }
.ticker-q.fade { opacity: 0 }
.ticker-dots { display: flex; gap: 0; align-items: center }
.ticker-dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center }
.ticker-dots button::before { content: ""; width: 9px; height: 9px; border-radius: 99px; background: var(--line); transition: width .2s, background .2s }
.ticker-dots button[aria-current="true"]::before { background: var(--c, var(--lapis)); width: 20px }
.ticker-dots .pause { width: 32px; height: 32px; margin-left: var(--s2); border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font: 700 11px/1 var(--ui) }
.ticker-dots .pause::before { display: none }
.ticker-dots .pause:hover { color: var(--ink); border-color: var(--lapis) }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s6) } }

/* ---------- Definition strip ---------- */
.define { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--s7); align-items: start }
.word { font: 800 clamp(3rem, 9vw, 6rem)/.9 var(--display); letter-spacing: -.04em }
.word span { color: var(--gold) }
.parts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s5) }
.part { border-top: 2px solid var(--ink); padding-top: var(--s2); font: 500 15px/1.4 var(--ui) }
.part b { display: block; font: 700 22px/1.2 var(--mono); letter-spacing: -.02em }
.big-three { display: grid; gap: 0; border-top: 1px solid var(--line) }
.big-three li { list-style: none; margin: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); padding-block: var(--s4); border-bottom: 1px solid var(--line) }
.big-three .q { font: 650 1.15rem/1.3 var(--display) }
.big-three .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c) }
.big-three .ico svg { width: 22px; height: 22px }
.big-three ul, .big-three { padding: 0 }
@media (max-width: 860px) { .define { grid-template-columns: 1fr; gap: var(--s6) } }

/* ---------- The map (tree) ---------- */
.tree { display: grid; gap: 0; justify-items: center; margin-top: var(--s6) }
.tree .root-node { width: min(420px, 100%) }
.tree-stem { width: 2px; height: 32px; background: var(--line) }
.tree-bar { width: 66.6%; height: 2px; background: var(--line); position: relative }
.tree-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); width: 100%; position: relative }
.tree-row > .col { display: grid; justify-items: center; align-content: start }
.tree-row > .col::before { content: ""; width: 2px; height: 28px; background: var(--line) }
.sub-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); width: 100%; position: relative; padding-top: 28px }
.sub-row::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 14px; background: var(--line) }
.sub-row::after { content: ""; position: absolute; top: 14px; left: 25%; right: 25%; height: 14px; border: 2px solid var(--line); border-bottom: 0 }
.tools-label { margin: var(--s7) 0 var(--s4); display: flex; align-items: center; gap: var(--s4); width: 100% }
.tools-label::before, .tools-label::after { content: ""; flex: 1; height: 1px; background: var(--line) }
.tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); width: 100% }
.node { position: relative; display: grid; gap: var(--s2); width: 100%; text-align: left; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden }
.node::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c) }
.node:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c) }
.node .nm { font: 700 1.3rem/1.15 var(--display); color: var(--c); letter-spacing: -.015em }
.node .qq { font-size: 1rem; color: var(--ink) }
.node .meta { font: 600 13px/1.3 var(--ui); color: var(--muted); display: flex; justify-content: space-between; gap: var(--s2); align-items: center; margin-top: var(--s1) }
.node .done { display: none; color: var(--ok); align-items: center; gap: 4px }
.node.visited .done { display: inline-flex }
.node.compact { padding: var(--s4) } .node.compact .nm { font-size: 1.1rem } .node.compact .qq { font-size: .95rem }
.node.tool { border-style: dashed } .node.tool::before { height: 0 }
.root-node.node::before { height: 0 } .root-node { text-align: center; justify-items: center; background: var(--ink); color: var(--bg); border-color: var(--ink) }
.root-node .nm { color: var(--bg); font-size: 1.6rem } .root-node .qq { color: color-mix(in srgb, var(--bg) 80%, transparent) }
@media (max-width: 860px) {
  .tree-bar, .tree-row > .col::before, .sub-row::before, .sub-row::after { display: none }
  .tree-row { grid-template-columns: 1fr; gap: var(--s3); margin-top: var(--s3) }
  .sub-row { padding-top: var(--s3) }
  .tree-stem { height: 0 }
}
@media (max-width: 420px) { .sub-row, .tools-row { grid-template-columns: 1fr } }

/* ---------- Generic cards & grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s4) }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s4) }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); display: grid; gap: var(--s3); align-content: start; min-width: 0 }
.card h3 { font-size: 1.2rem }
.card p, .card li { font-size: 1rem }
.section-head { display: grid; gap: var(--s3); margin-bottom: var(--s6); max-width: 64ch }
.num-list { counter-reset: n; list-style: none; padding: 0; display: grid; gap: var(--s4) }
.num-list > li { counter-increment: n; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s3); margin: 0 }
.num-list > li::before { content: counter(n); font: 700 15px/40px var(--mono); width: 40px; height: 40px; text-align: center; border-radius: 50%; background: var(--surface-2); color: var(--c, var(--ink)) }

/* ---------- Branch page header ---------- */
.page-hero { padding-block: var(--s8) var(--s7); border-bottom: 1px solid var(--line); position: relative; overflow: hidden }
.page-hero::after { content: attr(data-glyph); position: absolute; right: max(16px, calc((100vw - var(--wrap)) / 2)); top: 50%; transform: translateY(-50%);
  font: 800 clamp(160px, 26vw, 340px)/1 var(--display); color: var(--c); opacity: .08; pointer-events: none; letter-spacing: -.06em }
.page-hero .stack-lg { position: relative; z-index: 1 }
.crumbs { font: 600 14px/1 var(--ui); color: var(--muted); display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center }
.crumbs a { color: var(--muted); text-decoration: none } .crumbs a:hover { color: var(--ink) }
.page-hero h1 { color: var(--ink) }
.page-hero h1 .dot { color: var(--c) }
.def-box { border-left: 4px solid var(--c); padding: var(--s1) 0 var(--s1) var(--s5); font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.55; max-width: 60ch }
.facts { display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7); font: 500 14px/1.3 var(--ui); color: var(--muted) }
.facts b { display: block; font: 700 16px/1.3 var(--ui); color: var(--ink) }

/* ---------- Long-form article layout ---------- */
.article { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s8); padding-block: var(--s7) var(--s8) }
.toc { position: sticky; top: 96px; align-self: start; display: grid; gap: var(--s1); font: 600 14px/1.3 var(--ui) }
.toc .eyebrow { margin-bottom: var(--s2) }
.toc a { color: var(--muted); text-decoration: none; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); transition: color .15s, border-color .15s }
.toc a:hover { color: var(--ink) }
.toc a.active { color: var(--ink); border-left-color: var(--c) }
.prose { display: grid; gap: var(--s8); min-width: 0 }
.prose > section { display: grid; gap: var(--s5); scroll-margin-top: 96px }
.prose > section > p, .prose > section > ul { max-width: var(--read) }
.prose h2 { display: flex; align-items: baseline; gap: var(--s3) }
.prose h2 .n { font: 600 15px/1 var(--mono); color: var(--c); flex: none }
@media (max-width: 960px) { .article { grid-template-columns: minmax(0, 1fr); gap: var(--s5) } .toc { display: none } }

/* Question list */
.qs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--s3) }
.qs li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); font: 600 1.05rem/1.35 var(--display); letter-spacing: -.01em; position: relative }
.qs li::before { content: "?"; position: absolute; right: var(--s4); top: var(--s2); font: 800 28px/1 var(--display); color: var(--c); opacity: .35 }
.qs li { padding-right: var(--s7) }

/* Positions (expandable debate cards) */
.positions { display: grid; gap: var(--s3) }
.pos { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden }
.pos summary { list-style: none; cursor: pointer; padding: var(--s4) var(--s5); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s4); align-items: center }
.pos summary::-webkit-details-marker { display: none }
.pos summary:hover { background: color-mix(in srgb, var(--c) 5%, var(--surface)) }
.pos .pn { font: 700 1.15rem/1.2 var(--display) }
.pos .ps { grid-column: 1; font-size: 1rem; color: var(--muted) }
.pos .chev { grid-row: 1 / span 2; grid-column: 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); transition: transform .2s }
.pos[open] .chev { transform: rotate(45deg); background: var(--c); color: var(--surface) }
.pos .chev svg { width: 16px; height: 16px }
.pos-body { padding: 0 var(--s5) var(--s5); display: grid; gap: var(--s4); font-size: 1rem }
.procon { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) }
.procon > div { border-radius: var(--r-sm); padding: var(--s3) var(--s4); display: grid; gap: var(--s1) }
.procon .pro { background: var(--ok-soft) } .procon .con { background: var(--bad-soft) }
.procon h4 { font: 700 12px/1.2 var(--ui); letter-spacing: .1em; text-transform: uppercase }
.procon .pro h4 { color: var(--ok) } .procon .con h4 { color: var(--bad) }
.who { font: 600 14px/1.3 var(--ui); color: var(--muted) }
@media (max-width: 560px) { .procon { grid-template-columns: 1fr } }

/* Terms */
.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 var(--s6); border-top: 1px solid var(--line) }
.terms > div { padding-block: var(--s4); border-bottom: 1px solid var(--line); display: grid; gap: var(--s1) }
.terms dt { font: 700 1.05rem/1.25 var(--display); color: var(--c) }
.terms dd { margin: 0; font-size: 1rem; color: var(--ink) }
dl { margin: 0 }

/* Quote */
.quote { margin: 0; padding: var(--s6); background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); display: grid; gap: var(--s3); position: relative }
.quote p { font: 500 clamp(1.25rem, 2.4vw, 1.6rem)/1.35 var(--display); letter-spacing: -.015em }
.quote p::before { content: "\201C"; color: var(--c); margin-right: 2px }
.quote p::after { content: "\201D"; color: var(--c) }
.quote cite { font: 600 14px/1.3 var(--ui); color: var(--muted); font-style: normal }

/* Thinkers strip */
.thinkers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: var(--s3) }
.thinker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); display: grid; gap: var(--s1); align-content: start }
.thinker .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--display); background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); margin-bottom: var(--s2) }
.thinker b { font: 700 1.05rem/1.2 var(--display) }
.thinker .yrs { font: 500 13px/1.2 var(--mono); color: var(--muted) }
.thinker p { font-size: .95rem }

/* ---------- Widgets (shared shell) ---------- */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(var(--s5), 4vw, var(--s7)); display: grid; gap: var(--s5); box-shadow: var(--shadow); min-width: 0 }
.widget-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3) }
.widget-head .eyebrow::before { content: "● "; color: var(--c) }
.widget h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem) }
.fb { font: 500 1rem/1.5 var(--body); border-radius: var(--r-sm); padding: var(--s3) var(--s4) }
.fb.ok { background: var(--ok-soft) } .fb.bad { background: var(--bad-soft) } .fb.info { background: var(--surface-2) }
.fb b { font-family: var(--ui) }
.fb.ok b { color: var(--ok) } .fb.bad b { color: var(--bad) }
.score { font: 700 15px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden }
.meter > i { display: block; height: 100%; width: 0; background: var(--c, var(--lapis)); border-radius: 99px; transition: width .5s cubic-bezier(.2, .8, .2, 1) }
input[type="range"] { width: 100%; accent-color: var(--c, var(--lapis)); height: 28px }
textarea, input[type="text"], input[type="search"] { width: 100%; font: 400 1rem/1.5 var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3) var(--s4) }
textarea { min-height: 96px; resize: vertical }
textarea:focus-visible, input:focus-visible { outline: 3px solid var(--c, var(--lapis)); outline-offset: 1px }
label.lbl { font: 650 14px/1.3 var(--ui); color: var(--ink); display: block; margin-bottom: var(--s2) }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); align-items: start }
@media (max-width: 760px) { .split { grid-template-columns: 1fr } }

/* Vote bars */
.votes { display: grid; gap: var(--s3) }
.vote { display: grid; gap: 6px }
.vote .vl { display: flex; justify-content: space-between; font: 600 14px/1.2 var(--ui) }
.vote .meter { height: 10px }

/* Ship of Theseus */
.ship { width: 100%; height: auto; overflow: visible }
.ship .plank { transition: fill .35s }
.ship-stage { background: linear-gradient(to bottom, transparent 62%, color-mix(in srgb, var(--c-epis) 18%, transparent) 62%); border-radius: var(--r); padding: var(--s4) var(--s4) 0; overflow: hidden }
.ship-count { font: 700 clamp(2rem, 5vw, 3rem)/1 var(--mono); color: var(--c); font-variant-numeric: tabular-nums }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: var(--s2); border-bottom: 1px solid var(--line); padding-bottom: var(--s3) }
.tabs button { font: 650 15px/1 var(--ui); padding: 11px 15px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer }
.tabs button:hover { color: var(--ink); background: var(--surface-2) }
.tabs button[aria-pressed="true"] { color: var(--surface); background: var(--c, var(--ink)) }
.tab-panel { display: grid; gap: var(--s3); font-size: 1rem }

/* Truth table */
.tt-wrap { overflow-x: auto }
table.tt { border-collapse: collapse; font: 600 16px/1 var(--mono); min-width: 320px; width: 100% }
.tt th, .tt td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: center }
.tt th { font-size: 14px; color: var(--muted) }
.tt td.T { color: var(--ok) } .tt td.F { color: var(--bad) }
.tt tr.hl td { background: color-mix(in srgb, var(--c) 10%, transparent) }

/* Argument display */
.arg { font: 500 15px/1.5 var(--mono); display: grid; gap: 2px; background: var(--bg); border-radius: var(--r-sm); padding: var(--s3) var(--s4) }
.arg .concl { border-top: 1.5px solid var(--ink); padding-top: 4px; margin-top: 4px; font-weight: 700 }
.arg .form { color: var(--muted); font-size: 13px; margin-bottom: 4px }

/* Two-step worksheet */
.stepper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) }
.stepper .st { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); display: grid; gap: var(--s1); background: var(--bg); transition: border-color .2s, background .2s }
.stepper .st b { font: 700 13px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.stepper .st span { font: 700 1.15rem/1.2 var(--display) }
.stepper .st.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)) }
.stepper .st.on b { color: var(--c) }
.prompts { display: grid; gap: var(--s4) }
.reveal { display: grid; gap: var(--s2); border-left: 3px solid var(--c); padding-left: var(--s4); font-size: 1rem }

/* Glossary */
.gloss-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); position: sticky; top: 76px; z-index: 5; background: var(--bg); padding-block: var(--s3) }
.gloss { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s3) }
.gloss .card { gap: var(--s2) }
.gloss .card dt { font: 700 1.1rem/1.25 var(--display) }
.gloss .card dd { margin: 0; font-size: 1rem }
.gloss-empty { color: var(--muted); padding: var(--s6) 0 }

/* Timeline */
.timeline { position: relative; display: grid; gap: var(--s4); padding-left: 36px }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line) }
.era { font: 700 13px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: var(--s5); position: relative }
.era::before { content: ""; position: absolute; left: -31px; top: -3px; width: 14px; height: 14px; border-radius: 4px; background: var(--ink); transform: rotate(45deg) }
.tl { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); display: grid; gap: var(--s2) }
.tl::before { content: ""; position: absolute; left: -31px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c) }
.tl-top { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: baseline }
.tl-top b { font: 700 1.2rem/1.2 var(--display) }
.tl-top .yrs { font: 500 14px/1 var(--mono); color: var(--muted) }
.tl p { font-size: 1rem }
.tl .tags { display: flex; flex-wrap: wrap; gap: var(--s2) }

/* Next/prev */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); padding-block: var(--s7) var(--s8); border-top: 1px solid var(--line) }
.pager a { display: grid; gap: var(--s1); text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); transition: border-color .15s, transform .15s }
.pager a:hover { border-color: var(--c); transform: translateY(-2px) }
.pager .dir { font: 600 13px/1 var(--ui); color: var(--muted); letter-spacing: .08em; text-transform: uppercase }
.pager .t { font: 700 1.25rem/1.2 var(--display); color: var(--c) }
.pager .next { text-align: right }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr } .pager .next { text-align: left } }

/* CTA band */
.cta { background: var(--ink); color: var(--bg); border-radius: var(--r-lg); padding: clamp(var(--s6), 6vw, var(--s8)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s5); align-items: center }
.cta h2 { color: var(--bg) } .cta p { color: color-mix(in srgb, var(--bg) 78%, transparent) }
.cta .btn { background: var(--bg); color: var(--ink); border-color: var(--bg) }
@media (max-width: 700px) { .cta { grid-template-columns: 1fr } }

/* Path progress */
.path { display: grid; gap: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4) var(--s5) }
.path-top { display: flex; justify-content: space-between; gap: var(--s3); font: 650 15px/1.3 var(--ui) }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: var(--s7) calc(var(--s6) + env(safe-area-inset-bottom, 0px)); font: 500 15px/1.5 var(--ui); color: var(--muted); background: var(--surface) }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s6) }
.foot-grid .foot-h { font: 700 13px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: var(--s3) }
.foot-grid ul { list-style: none; padding: 0; display: grid; gap: var(--s2) } .foot-grid li { margin: 0 }
.foot-grid a { color: var(--muted); text-decoration: none } .foot-grid a:hover { color: var(--ink) }
.foot-base { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); font-size: 14px }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr } .foot-grid > :first-child { grid-column: 1 / -1 } }

/* ---------- Motion ---------- */
@keyframes rise { from { transform: translateY(14px) } to { transform: none } }
.hero .stack-lg > *, .page-hero .stack-lg > * { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both }
.hero .stack-lg > :nth-child(2), .page-hero .stack-lg > :nth-child(2) { animation-delay: .05s }
.hero .stack-lg > :nth-child(3), .page-hero .stack-lg > :nth-child(3) { animation-delay: .1s }
.hero .stack-lg > :nth-child(4), .page-hero .stack-lg > :nth-child(4) { animation-delay: .15s }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important } }

/* Single-column grids must not grow to fit wide intrinsic content (SVG viewBoxes, tables). */
.stack, .stack-lg, .prose, .prose > section, .widget, .card, .tab-panel, .prompts, .positions, .pos-body { grid-template-columns: minmax(0, 1fr) }
