:root {
  color-scheme: light;
  --bg: #fbfcfd;
  --ink: #141519;
  --ink-2: #2b2e36;
  --muted: #6a6f7c;
  --rule: #d9dce3;
  --chip: #eceef2;
  --accent: #2446c9;
  --gutter: clamp(16px, 2vw, 28px);
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --pixel: "DotGothic16", "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 8% -10%, #eef4f1 0%, rgba(238,244,241,0) 60%),
    radial-gradient(900px 700px at 100% 110%, #f4eff4 0%, rgba(244,239,244,0) 60%),
    var(--bg);
  background-attachment: fixed;
  font-family: var(--sans);
  font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: #dfe6ff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page { position: relative; z-index: 1; padding: 12px var(--gutter) 0; }

/* ---------- mono chips, labels ---------- */
.mono, .chip, .label, .bar { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.02em; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-size: 12px; line-height: 1; padding: 7px 9px;
  background: var(--chip); color: var(--ink-2); text-decoration: none;
  border-radius: 2px; white-space: nowrap;
}
a.chip:hover { background: var(--ink); color: #fff; }
.chip .k { color: var(--muted); }
a.chip:hover .k { color: #aab0c0; }
.chip[aria-current="page"] { background: var(--ink); color: #fff; }
.chip[aria-current="page"] .k { color: #aab0c0; }
.tag { font-family: var(--mono); text-transform: uppercase; font-size: 11.5px; padding: 4px 7px; border: 1px solid var(--rule); background: rgba(255,255,255,.6); color: var(--ink-2); border-radius: 2px; }

/* ---------- top bar ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.mark { width: 30px; justify-content: center; padding: 7px 0; }
.mark svg { display: block; }

/* ---------- hero with registration marks ---------- */
.hero { position: relative; padding: 56px 0 44px; margin-top: 12px; }
.fig { margin: 0; border: 1.5px solid var(--ink-2); background: rgba(255,255,255,.7); display: flex; flex-direction: column; max-width: 100%; }
.fig .fig-bar { display: flex; justify-content: space-between; align-items: center; padding: 5px 7px; border-bottom: 1.5px solid var(--ink-2); font-family: var(--mono); font-size: 10px; text-transform: uppercase; color: var(--ink-2); }
.fig .fig-bar .ico { width: 11px; height: 9px; border: 1px solid var(--ink-2); }
.fig .fig-bar span:last-child { width: 11px; }
.fig .fig-media { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; background: #f6f6f4; }
.fig > a { display: block; }
.reg { position: absolute; font-family: var(--mono); font-size: 14px; line-height: 1; color: var(--ink-2); transform: translate(-50%, -50%); user-select: none; }
.hero h1 {
  margin: 0; font-weight: 600; font-size: clamp(56px, 11.2vw, 172px);
  line-height: 0.88; letter-spacing: -0.058em; text-wrap: balance;
}
.hero h1 .px {
  font-family: var(--pixel); font-weight: 400; letter-spacing: -0.015em;
  font-size: 0.74em; display: inline-block; margin-left: -0.04em; transform: translateY(-0.04em);
}
.hero h1 .px .ch { display: inline-block; transition: color 0.25s ease; }
.hero h1 .px .ch.live { color: #c9ccd4; }
.hero .thesis {
  margin: 0.55em 0 0; max-width: 21em;
  font-size: clamp(24px, 3.1vw, 46px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 500;
  text-wrap: balance;
}
.hero .lede { margin: 1.6em 0 0; max-width: 40em; font-size: 16px; color: var(--ink-2); }
.coords { position: absolute; right: 0; top: 38px; display: flex; gap: 6px; }
.badge {
  width: 52px; height: 52px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--mono); font-size: 12px; background: rgba(255,255,255,.5);
}

/* ---------- section label ---------- */
.label { font-size: 12px; color: var(--ink-2); padding: 20px 0 8px; border-bottom: 1px solid var(--ink-2); margin: 0; font-weight: 400; }
.label::before { content: "/ "; }

/* ---------- latest essay (feature) ---------- */
.byline { margin: 1.1em 0 0; font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.num { margin: 0 0 10px; font-family: var(--pixel); font-size: 28px; line-height: 1; color: var(--ink); }
.feature { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 40px; padding: 28px 0 56px; align-items: start; }
.feature .body { display: flex; flex-direction: column; min-width: 0; max-width: 36rem; }
.feature h3 { margin: 0; font-size: clamp(30px, 3.6vw, 54px); line-height: 1; letter-spacing: -0.045em; font-weight: 500; text-wrap: balance; }
.feature h3 a { text-decoration: none; }
.feature h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.1em; }
.arrow { display: inline-block; font-weight: 400; }
.feature .dek { margin: 0 0 16px; padding-top: 20px; font-size: 19px; line-height: 1.35; letter-spacing: -0.012em; color: var(--ink-2); }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.status { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; color: var(--accent); margin: 12px 0 0; }

/* ---------- contents (roman-numeral series list) ---------- */
.toc { list-style: none; margin: 0 0 56px; padding: 0; }
.toc li { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.toc .n { font-family: var(--pixel); font-size: 22px; line-height: 1; }
.toc .t { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.03em; line-height: 1.15; font-weight: 500; }
.toc .t a { text-decoration: none; }
.toc .t a:hover { text-decoration: underline; text-underline-offset: 0.12em; }
.toc small { display: block; max-width: 44rem; margin-top: 6px; font-size: 15px; letter-spacing: -0.005em; line-height: 1.4; font-weight: 400; color: var(--muted); }
.toc small a { text-decoration: underline; }
.toc .s { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.toc .pending .n, .toc .pending .t { color: var(--muted); }

/* ---------- statistics ticker ---------- */
.bar { border-top: 1px solid var(--ink-2); margin-top: 8px; overflow: hidden; font-size: 12px; color: var(--ink-2); }
.bar .track { display: flex; width: max-content; animation: tick 60s linear infinite; }
.bar:hover .track { animation-play-state: paused; }
.stat { display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 0; margin-right: 16px; border-right: 1px solid var(--rule); white-space: nowrap; }
.stat b { font-weight: 400; border: 1px solid var(--rule); background: rgba(255,255,255,.7); padding: 3px 6px; color: var(--ink); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- footer ---------- */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 28px; border-top: 1px solid var(--rule); margin-top: 0; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; color: var(--muted); }
.foot a { color: var(--muted); }

/* ---------- reading pages (essay, about) ---------- */
.doc-head { position: relative; padding: 56px 0 36px; }
.doc-head .num { font-size: 36px; margin-bottom: 18px; }
.doc-head h1 { margin: 0; max-width: 15em; font-size: clamp(40px, 6.4vw, 96px); line-height: 0.95; letter-spacing: -0.05em; font-weight: 600; text-wrap: balance; }
.doc-head .meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 26px; }
.doc { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 40rem) minmax(0, 1fr); gap: 32px; padding: 32px 0 56px; }
.doc aside { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; color: var(--muted); line-height: 1.7; }
.doc aside dt { color: var(--ink-2); }
.doc aside dd { margin: 0 0 12px; }
.prose { font-size: 18px; line-height: 1.6; color: var(--ink-2); letter-spacing: -0.005em; }
.prose p { margin: 0 0 1.1em; }
.prose .lede { font-size: 23px; line-height: 1.35; letter-spacing: -0.02em; color: var(--ink); }
.prose h2 { font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; font-weight: 500; color: var(--ink); margin: 1.8em 0 0.5em; }
.prose a { color: var(--accent); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
.prose .note { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 2em; }
.prose .note a { color: var(--ink-2); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .feature { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc aside { display: flex; gap: 20px; flex-wrap: wrap; }
  .doc aside dd { margin-bottom: 0; }
  .doc .spacer { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 40px 0 32px; }
  .coords { display: none; }
  .feature { grid-template-columns: 1fr; }
  .toc li { grid-template-columns: 44px minmax(0, 1fr); }
  .toc .s { grid-column: 2; }
  .reg.r-mid { display: none; }
  .prose { font-size: 17px; }
  .prose .lede { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .bar .track { animation: none; }
}

/* ---------- phones: let the title own the first screen ---------- */
@media (max-width: 640px) {
  .chip { font-size: 11px; padding: 6px 8px; }
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 22.5vw; line-height: 0.9; }
  .hero .thesis { font-size: 22px; line-height: 1.12; margin-top: 0.9em; max-width: 16em; }
  .byline { font-size: 11px; margin-top: 12px; }
  .hero .lede { font-size: 15px; line-height: 1.5; margin-top: 28px; color: var(--muted); }
}

/* ---------- optical left alignment: pull large type in so its ink lines up with the body text ---------- */
.hero h1 { margin-left: -0.08em; }
.hero h1 .px { margin-left: -0.09em; }
.hero .thesis { margin-left: -0.07em; }
@media (max-width: 640px) { .hero h1 { margin-left: -0.06em; } .hero .thesis { margin-left: 0; } }
/* thesis: shorter line on phones */
.hero .thesis .t-short { display: none; }
@media (max-width: 640px) {
  .hero .thesis .t-full { display: none; }
  .hero .thesis .t-short { display: inline; white-space: nowrap; }
}
@media (max-width: 640px) { .hero .thesis { font-size: min(24px, calc((100vw - 34px) * 0.057)); } }
