:root {
  color-scheme: dark;
  --bg: #0a0a0d;
  --panel: #15141a;
  --panel-2: #1c1923;
  --line: #38323f;
  --text: #f2eef5;
  --muted: #c4bbc9;
  --quiet: #a89caf;
  --accent: #c69cff;
  --accent-strong: #9951e4;
  --mint: #a8e2cb;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 78% 0%, rgba(121, 54, 174, .17), transparent 35rem),
              radial-gradient(circle at 7% 55%, rgba(92, 42, 133, .08), transparent 36rem);
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: #e0c8ff; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
p, ul { margin-top: 0; }
h1, h2, h3 { line-height: 1.17; letter-spacing: -.03em; }
h1 { font-size: clamp(2.8rem, 6.2vw, 5.8rem); margin: 0 0 1.4rem; }
h2 { font-size: clamp(2rem, 3.2vw, 3.2rem); margin: 0 0 1.1rem; }
h3 { font-size: 1.36rem; margin: 0 0 .6rem; }
strong { color: var(--text); }
.wrap { width: min(calc(100% - 3rem), var(--max)); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 100; background: var(--accent); color: #100c15; padding: .7rem 1rem; font-weight: 700; }
.skip-link:focus { top: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow, .mono, .status, .tag { font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
.eyebrow { color: var(--accent); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.15rem; }
.lede { font-size: clamp(1.1rem, 1.55vw, 1.32rem); line-height: 1.65; color: var(--muted); max-width: 740px; }
.muted { color: var(--muted); }
.quiet { color: var(--quiet); }
.accent { color: var(--accent); }
.rule { border-top: 1px solid var(--line); }

.site-header { position: relative; z-index: 10; background: rgba(10, 10, 13, .9); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }
.brand { color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.15rem; letter-spacing: -.035em; white-space: nowrap; }
.brand span { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: .2rem 1.15rem; align-items: center; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .93rem; padding: .45rem .2rem; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); border-color: var(--accent); }

.hero { padding: clamp(5rem, 9vw, 9rem) 0 6rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr); gap: 3rem; align-items: center; }
.hero .lede { margin-bottom: 2rem; }
.hero-note { margin-top: 2.5rem; color: var(--quiet); font-size: .92rem; border-left: 2px solid var(--accent-strong); padding-left: 1rem; max-width: 640px; }
.hero-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 1px solid rgba(198, 156, 255, .24); border-radius: 50%; background: radial-gradient(circle, rgba(112, 48, 164, .2), rgba(17, 15, 22, .3) 58%, transparent 73%); }
.hero-art::before, .hero-art::after { content: ""; position: absolute; border: 1px solid rgba(198, 156, 255, .18); border-radius: 50%; inset: 9%; }
.hero-art::after { inset: 21%; border-style: dashed; }
.hero-art img { width: 72%; opacity: .34; filter: drop-shadow(0 0 38px rgba(198, 156, 255, .23)); }
.hero-art .art-label { position: absolute; bottom: 2.7rem; left: 50%; transform: translateX(-50%); white-space: nowrap; color: var(--accent); background: #131018; border: 1px solid var(--line); padding: .35rem .7rem; font-size: .7rem; letter-spacing: .12em; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .78rem 1.2rem; border-radius: 4px; text-decoration: none; font-weight: 650; line-height: 1.2; }
.button-primary { color: #140d1c; background: var(--accent); }
.button-primary:hover { color: #140d1c; background: #dfc6ff; }
.button-outline { color: var(--text); border: 1px solid #79678a; background: rgba(255,255,255,.025); }
.button-outline:hover { color: var(--text); border-color: var(--accent); background: rgba(198,156,255,.08); }

.section { padding: clamp(4rem, 7vw, 6.5rem) 0; }
.section-intro { max-width: 760px; margin-bottom: 2.4rem; }
.section-intro p:last-child { color: var(--muted); font-size: 1.08rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { background: linear-gradient(150deg, rgba(33,29,40,.92), rgba(18,17,22,.96)); border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.4rem, 2.5vw, 2.1rem); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.card a { font-weight: 650; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.2rem; }
.card-index { color: var(--accent); font-size: .79rem; letter-spacing: .12em; }
.status { display: inline-block; border: 1px solid #5b4b68; border-radius: 999px; padding: .28rem .57rem; color: var(--muted); font-size: .69rem; line-height: 1.2; white-space: nowrap; }
.status-building { color: #e6c6ff; border-color: #8857a7; }
.status-planned { color: #bfc1ca; }
.status-research { color: var(--mint); border-color: #4c8271; }
.card-link { display: inline-block; margin-top: .7rem; }
.detail-list { padding-left: 1.2rem; color: var(--muted); }
.detail-list li { margin: .5rem 0; }
.detail-list li::marker { color: var(--accent); }

.statement { background: linear-gradient(100deg, rgba(78, 38, 111, .29), rgba(17, 16, 21, .35)); border-block: 1px solid var(--line); }
.statement .wrap { padding-block: clamp(3.5rem, 6vw, 5.5rem); }
.statement blockquote { margin: 0; max-width: 980px; font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.35; letter-spacing: -.025em; }
.statement cite { display: block; margin-top: 1.2rem; color: var(--quiet); font-size: .85rem; font-style: normal; }

.diagram { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 1rem; margin: 2rem 0; }
.diagram-node { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 1.45rem; }
.diagram-node strong { display: block; font-size: 1.1rem; margin-bottom: .4rem; }
.diagram-node p { color: var(--muted); margin: 0; }
.diagram-join { align-self: center; color: var(--accent); font: 1.6rem ui-monospace, monospace; }
.diagram-output { grid-column: 1 / -1; background: rgba(101, 52, 142, .19); border-color: #6b4b82; }
.diagram-caption { color: var(--quiet); font-size: .9rem; }

.page-hero { padding: 5.6rem 0 4.2rem; }
.page-hero h1 { max-width: 990px; }
.page-hero .lede { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .55fr); gap: 3rem; align-items: start; }
.callout { padding: 1.4rem 1.6rem; background: rgba(132, 77, 180, .12); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout h3 { font-size: 1.05rem; }
.step-list { list-style: none; padding: 0; counter-reset: step; }
.step-list li { counter-increment: step; position: relative; padding: 0 0 2rem 3.6rem; border-left: 1px solid var(--line); margin-left: .8rem; }
.step-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.step-list li::before { content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: -1.2rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--panel-2); border: 1px solid #73558b; color: var(--accent); font: .72rem ui-monospace, monospace; }
.step-list h3 { margin-bottom: .3rem; }
.step-list p { color: var(--muted); margin: 0; }
.comparison { width: 100%; border-collapse: collapse; margin: 2rem 0; }
.comparison th, .comparison td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 1rem; }
.comparison th { color: var(--accent); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.comparison td { color: var(--muted); }
.comparison td:first-child { color: var(--text); font-weight: 650; width: 25%; }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--muted); }
.prose h2 { font-size: 1.55rem; margin: 2.7rem 0 .8rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.7rem; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--accent); }
.fine-print { font-size: .88rem; color: var(--quiet); }

/* Temporal Club keeps the site palette but reads like a public field notebook. */
.club-hero { padding: clamp(4.5rem, 8vw, 7.5rem) 0 5.5rem; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, rgba(34, 64, 56, .18), transparent 60%); }
.club-hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(230px, .6fr); gap: 3rem; align-items: end; }
.club-page .eyebrow, .club-page .card-index, .club-page .detail-list li::marker { color: var(--mint); }
.club-page .button-primary { background: var(--mint); }
.club-page .button-primary:hover { background: #d1f2e2; }
.club-page .button-outline:hover { border-color: var(--mint); background: rgba(168,226,203,.08); }
.club-page a:focus-visible { outline-color: var(--mint); }
.club-aside { border-top: 2px solid var(--mint); padding-top: 1.3rem; color: var(--muted); }
.club-aside .mono { color: var(--mint); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.club-aside p:last-child { margin-bottom: 0; }
.note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.note-card { display: flex; flex-direction: column; }
.note-card .note-number { color: var(--mint); font-size: .76rem; letter-spacing: .12em; margin-bottom: 1rem; }
.note-card p { flex: 1; }
.note-card a { align-self: start; }
.note-card a + a { margin-top: .45rem; font-size: .9rem; }
.note-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.note-body h2 { font-size: 1.65rem; margin: 2.7rem 0 .85rem; }
.note-body h2:first-child { margin-top: 0; }
.note-body p, .note-body li { color: var(--muted); }
.note-body ul, .note-body ol { padding-left: 1.4rem; }
.note-body li { margin-bottom: .55rem; }
.note-body li::marker { color: var(--mint); }
.note-body strong { color: var(--text); }
.note-sidebar { position: sticky; top: 2rem; }
.note-sidebar .card { padding: 1.4rem; }
.note-sidebar h2 { font-size: 1rem; letter-spacing: 0; }
.note-sidebar p, .note-sidebar li { font-size: .9rem; }
.note-sidebar ul { padding-left: 1.15rem; margin-bottom: 0; }
.note-sidebar li { margin-bottom: .45rem; }
.note-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .94rem; }
.note-table th, .note-table td { text-align: left; vertical-align: top; padding: .75rem; border-bottom: 1px solid var(--line); }
.note-table th { color: var(--mint); font-family: ui-monospace, Consolas, monospace; font-size: .73rem; text-transform: uppercase; letter-spacing: .06em; }
.note-table td { color: var(--muted); }
.note-table td:first-child { color: var(--text); }
.problem-box { border: 1px solid #4a7164; background: rgba(38, 77, 63, .13); border-radius: 8px; padding: 1.4rem; margin: 1.5rem 0; }
.problem-box p:last-child, .problem-box ul:last-child { margin-bottom: 0; }
.problem-box .mono { display: block; color: var(--mint); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .55rem; }
.club-reply { margin-top: 3rem; padding: 2rem; border-top: 2px solid var(--mint); background: var(--panel); border-radius: 0 0 8px 8px; }
.club-reply h2 { margin-top: 0; }
.club-reply p { color: var(--muted); }
.club-reply .fine-print { margin-bottom: 0; }

.cta { padding: 5rem 0; border-top: 1px solid var(--line); }
.cta .wrap { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.cta p { color: var(--muted); max-width: 660px; margin: 0; }
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--quiet); font-size: .84rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 850px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-art { width: min(300px, 75%); margin-inline: auto; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .note-grid { grid-template-columns: 1fr 1fr; }
  .cta .wrap { align-items: start; flex-direction: column; }
  .club-hero-grid, .note-layout { grid-template-columns: 1fr; }
  .note-sidebar { position: static; }
}
@media (max-width: 620px) {
  .wrap { width: min(calc(100% - 2rem), var(--max)); }
  .site-header .wrap { align-items: start; flex-direction: column; padding-block: .9rem; gap: .4rem; }
  .site-nav { gap: 0 .9rem; }
  .site-nav a { font-size: .87rem; }
  .hero { padding: 4rem 0; }
  .hero-art { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .note-grid { grid-template-columns: 1fr; }
  .note-table { display: block; overflow-x: auto; }
  .note-table th, .note-table td { min-width: 120px; }
  .diagram { grid-template-columns: 1fr; }
  .diagram-join { transform: rotate(90deg); justify-self: center; }
  .diagram-output { grid-column: 1; }
  .comparison { display: block; overflow-x: auto; }
  .comparison th, .comparison td { min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
