/* site.css: the AI-OWLS / QuanTAS design system, "Instrument" (2026-11).
 * One file per site, identical except the SITE block (accent colors). Edit the source at
 * ~/Claude-Code/Websites/design/site.css, then run ~/Claude-Code/Websites/build/sync_design.sh.
 * Layers: fonts; tokens (--ds-* = the light reading surface used by every post; --in-* = the dark
 * instrument frame); chrome (bar + footer, also inside every post); site pages (home with the live
 * field, the research log with List and Map views, publications, people); new-post template
 * (body.post-v2); older posts (body.post-legacy); shared fixes. Every selector is scoped. */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300..900&family=Geist+Mono:wght@400..600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300..800;1,8..60,300..800&display=swap");

:root {
  /* SITE */
  --ds-accent: #C2410C;
  --ds-accent-ink: #9A3412;
  --ds-accent-soft: #FDF1E9;
  --in-acc: #FF6A1A;
  --in-acc2: #FFB27A;
  /* /SITE */
  --ds-paper: #FBFAF7;
  --ds-surface: #FFFFFF;
  --ds-surface-2: #F3F1EC;
  --ds-ink: #0F1724;
  --ds-ink-2: #2A3342;
  --ds-muted: #5B6472;
  --ds-faint: #7A808A;
  --ds-line: #E7E3DB;
  --ds-line-strong: #CEC8BC;
  --ds-font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --ds-font-serif: "Source Serif 4", "Source Serif Pro", Georgia, Cambria, "Times New Roman", serif;
  --ds-font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ds-radius: 14px;
  --ds-radius-sm: 8px;
  --ds-page: 1160px;
  --ds-measure: 700px;
  --ds-shadow: 0 1px 2px rgba(15, 23, 36, .04), 0 12px 32px -16px rgba(15, 23, 36, .18);
  --in-bg: #0A0B0D;
  --in-bg2: #101216;
  --in-bg3: #15181D;
  --in-line: #1C2027;
  --in-line2: #2A3039;
  --in-ink: #ECEAE4;
  --in-ink2: #A9ADB4;
  --in-mute: #80868F;
  --in-wide: 1320px;
}

/* ------------------------------------------------------------------ chrome
 * The bar and footer are inserted into every post too. ID selectors keep the per-post
 * legacy rules (element and class selectors) from reaching them. */
#site-bar {
  position: relative; z-index: 40; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--in-line);
  background: rgba(10, 11, 13, .9); -webkit-backdrop-filter: saturate(1.3) blur(10px); backdrop-filter: saturate(1.3) blur(10px);
  color: var(--in-ink); font-family: var(--ds-font-sans); text-align: left; box-shadow: none;
}
body.site #site-bar { position: sticky; top: 0; }
#site-bar .site-bar__in {
  max-width: var(--in-wide); margin: 0 auto; padding: 0 28px; height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
#site-bar .site-brand, #site-foot .site-brand {
  display: inline-flex; align-items: center; gap: 10px; padding: 0; margin: 0;
  color: var(--in-ink); text-decoration: none; border: 0; background: none;
  font: 650 16px/1 var(--ds-font-sans); letter-spacing: -0.01em; text-transform: none;
}
#site-bar .site-mark, #site-foot .site-mark {
  display: block; width: 27px; height: 27px; flex: none;
  background: url("../img/brand/mark.png") center / contain no-repeat; filter: invert(1) brightness(1.7);
}
#site-bar .site-name, #site-foot .site-name { font: inherit; color: inherit; }
#site-bar .site-nav { display: flex; gap: 2px; align-items: center; margin: 0; padding: 0; }
#site-bar .site-nav a, #site-bar .site-nav button {
  font: 500 12.5px/1 var(--ds-font-mono); letter-spacing: .07em; text-transform: uppercase;
  color: var(--in-ink2); text-decoration: none; border: 0; background: none; cursor: pointer;
  padding: 9px 11px; border-radius: 999px; margin: 0;
}
#site-bar .site-nav a:hover, #site-bar .site-nav button:hover, #site-bar .site-nav a[aria-current="page"] { color: var(--in-ink); background: rgba(255, 255, 255, .07); }
#site-bar .kbd, body.site .kbd {
  font: 500 11px/1 var(--ds-font-mono); letter-spacing: 0; border: 1px solid var(--in-line2); border-radius: 5px; padding: 3px 6px; color: var(--in-ink2);
}

#site-foot {
  margin: 0; padding: 0; border: 0; border-top: 1px solid var(--in-line);
  background: var(--in-bg); color: var(--in-ink2); font-family: var(--ds-font-sans); clear: both; text-align: left;
}
#site-foot .site-foot__in {
  max-width: var(--in-wide); margin: 0 auto; padding: 36px 28px 52px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; align-items: flex-start;
}
#site-foot p { margin: 12px 0 0; padding: 0; font: 400 13px/1.55 var(--ds-font-mono); color: var(--in-mute); max-width: 460px; }
#site-foot .site-foot__links { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 6px; }
#site-foot .site-foot__links a {
  font: 500 12.5px/1.4 var(--ds-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--in-ink2); text-decoration: none;
  border: 0; background: none; padding: 0;
}
#site-foot .site-foot__links a:hover { color: var(--in-acc); }

@media (max-width: 600px) {
  #site-bar .site-bar__in { height: 52px; padding: 0 14px; gap: 6px; }
  #site-bar .site-brand { font-size: 15px; gap: 8px; }
  #site-bar .site-mark { width: 24px; height: 24px; }
  #site-bar .site-nav a, #site-bar .site-nav button { padding: 8px 7px; font-size: 11.5px; letter-spacing: .04em; }
  #site-bar .site-nav .kbd-btn { display: none; }
  #site-foot .site-foot__in { padding: 30px 18px 44px; }
}

/* ------------------------------------------------------------------ site pages (dark instrument) */
body.site {
  margin: 0; background: var(--in-bg); color: var(--in-ink); font: 400 16px/1.55 var(--ds-font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
body.site *, body.site *::before, body.site *::after { box-sizing: border-box; }
body.site img { max-width: 100%; }
body.site a { color: inherit; text-decoration: none; }
body.site .wrap { max-width: var(--in-wide); margin: 0 auto; padding: 0 28px; }
body.site .kick {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font: 500 12px/1 var(--ds-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--in-acc2);
}
body.site .kick::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--in-acc); box-shadow: 0 0 12px var(--in-acc); flex: none; }

/* hero: the live field */
body.site .hero { position: relative; height: 84vh; min-height: 540px; max-height: 1000px; overflow: hidden; border-bottom: 1px solid var(--in-line); background: var(--in-bg); }
body.site .hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
body.site .hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 62%; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 11, 13, .92) 0%, rgba(10, 11, 13, .55) 45%, rgba(10, 11, 13, 0) 100%); }
body.site .hero-over { z-index: 1;
  position: absolute; left: 0; right: 0; bottom: 32px; padding: 0 28px; margin: 0 auto; max-width: var(--in-wide);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; pointer-events: none;
}
body.site .hero-title { margin: 14px 0 0; font: 800 clamp(64px, 13vw, 210px)/.82 var(--ds-font-sans); letter-spacing: -.065em; color: var(--in-ink); }
body.site .hero-dek { margin: 18px 0 0; max-width: 700px; font: 400 clamp(17px, 1.6vw, 21px)/1.45 var(--ds-font-serif); color: var(--in-ink2); }
body.site .readout {
  font: 400 12px/1.7 var(--ds-font-mono); color: var(--in-ink2); text-align: right; min-width: 250px;
  background: rgba(10, 11, 13, .6); border: 1px solid var(--in-line); border-radius: 10px; padding: 12px 14px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
body.site .readout b { color: var(--in-ink); font-weight: 500; }
body.site .readout .hint { color: var(--in-mute); }

/* the research log: list and map views */
body.site .log { max-width: var(--in-wide); margin: 0 auto; padding: 56px 28px 48px; }
body.site .loghead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 20px; border-bottom: 1px solid var(--in-line2); padding-bottom: 14px; }
body.site .loghead h2 { margin: 0; font: 600 13px/1 var(--ds-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--in-ink); }
body.site .hints { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font: 400 12px/1 var(--ds-font-mono); color: var(--in-mute); }
body.site .views { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--in-line2); border-radius: 999px; background: var(--in-bg2); }
body.site .views button {
  font: 500 12px/1 var(--ds-font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--in-ink2);
  background: none; border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
body.site .views button[aria-selected="true"] { background: var(--in-ink); color: var(--in-bg); }
body.site .cols, body.site .row { display: grid; grid-template-columns: 64px 112px minmax(0, 1fr) 300px 64px; gap: 20px; align-items: baseline; }
body.site .cols { padding: 14px 16px 10px; font: 500 11px/1 var(--ds-font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--in-mute); }
body.site .row { position: relative; padding: 18px 16px; border-top: 1px solid var(--in-line); transition: background .15s; }
body.site .row .n, body.site .row .d, body.site .row .a, body.site .row .m { font: 400 12.5px/1.45 var(--ds-font-mono); color: var(--in-mute); }
body.site .row .a { color: var(--in-ink2); }
body.site .row .t { font: 500 clamp(18px, 1.65vw, 23px)/1.25 var(--ds-font-sans); letter-spacing: -.012em; color: var(--in-ink); }
body.site .row .ser { display: block; margin-top: 6px; font: 500 11px/1 var(--ds-font-mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--in-acc2); }
body.site .row::before { content: ""; position: absolute; left: 0; top: -1px; bottom: 0; width: 2px; background: var(--in-acc); transform: scaleY(0); transform-origin: top; transition: transform .2s; }
body.site .row.sel, body.site .row:hover { background: var(--in-bg2); }
body.site .row.sel::before, body.site .row:hover::before { transform: scaleY(1); }
body.site .row.sel .t, body.site .row:hover .t { color: #fff; }
body.site .row.sel .n, body.site .row:hover .n { color: var(--in-acc); }
body.site .peek {
  position: fixed; z-index: 45; width: 340px; pointer-events: none; opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .15s, transform .15s;
  background: #111419; border: 1px solid var(--in-line2); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
}
body.site .peek.on { opacity: 1; transform: none; }
body.site .peek .img, body.site .mapcard .img { background: #fff; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; padding: 12px; }
body.site .peek img, body.site .mapcard img { max-width: 100%; max-height: 100%; object-fit: contain; }
body.site .peek p { margin: 0; padding: 14px 16px 16px; font: 400 15px/1.5 var(--ds-font-serif); color: var(--in-ink2); }

body.site .mapstage {
  position: relative; margin-top: 18px; height: min(78vh, 860px); min-height: 520px; overflow: hidden; cursor: grab;
  border: 1px solid var(--in-line); border-radius: 16px; background-color: var(--in-bg);
  background-image: radial-gradient(circle, rgba(236, 234, 228, .09) 1px, transparent 1.3px); background-size: 26px 26px;
}
body.site .mapstage.drag { cursor: grabbing; }
body.site .mapstage svg { width: 100%; height: 100%; display: block; touch-action: none; }
body.site .mapstage .node { cursor: pointer; }
body.site .mapstage .node rect.f { fill: #111419; stroke: var(--in-line2); stroke-width: 1.2; transition: stroke .15s; }
body.site .mapstage .node rect.im { fill: #fff; }
body.site .mapstage .node text { font-family: var(--ds-font-sans); font-size: 15px; font-weight: 560; fill: var(--in-ink); letter-spacing: -.01em; paint-order: stroke; stroke: var(--in-bg); stroke-width: 4px; stroke-linejoin: round; }
body.site .mapstage .node text.no { font: 500 11px var(--ds-font-mono); fill: var(--in-mute); letter-spacing: .06em; }
body.site .mapstage .node:hover rect.f, body.site .mapstage .node.hi rect.f { stroke: var(--in-acc); stroke-width: 2.4; }
body.site .mapstage .edge { fill: none; stroke: #4A525E; stroke-width: 1.4; stroke-dasharray: 5 6; }
body.site .mapstage .edge.hi { stroke: var(--in-acc); stroke-width: 2.2; stroke-dasharray: none; }
body.site .mapstage .elab { font: 500 11px var(--ds-font-mono); fill: var(--in-ink); letter-spacing: .05em; text-transform: uppercase; paint-order: stroke; stroke: var(--in-bg); stroke-width: 6px; stroke-linejoin: round; opacity: 0; transition: opacity .15s; pointer-events: none; }
body.site .mapstage .eg.hi .elab { opacity: 1; }
body.site .mapstage .axis { font: 600 12px var(--ds-font-mono); fill: var(--in-mute); letter-spacing: .14em; }
body.site .mapstage .dim .node:not(.hi) { opacity: .26; }
body.site .mapstage .dim .edge:not(.hi) { opacity: .2; }
body.site .maphint { position: absolute; left: 16px; bottom: 14px; margin: 0; font: 400 11.5px/1 var(--ds-font-mono); color: var(--in-mute); letter-spacing: .04em; pointer-events: none; }
body.site .mapzoom { position: absolute; right: 14px; top: 14px; display: flex; gap: 6px; }
body.site .mapzoom button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--in-line2); background: var(--in-bg2); color: var(--in-ink); font: 500 16px/1 var(--ds-font-mono); cursor: pointer; }
body.site .mapcard {
  position: absolute; right: 16px; bottom: 16px; width: 360px; background: #111419; border: 1px solid var(--in-line2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8); opacity: 0; transform: translateY(10px); transition: opacity .18s, transform .18s; pointer-events: none;
}
body.site .mapcard.on { opacity: 1; transform: none; }
body.site .mapcard.tl { top: 16px; left: 16px; right: auto; bottom: auto; }
body.site .mapcard.tr { top: 62px; right: 16px; left: auto; bottom: auto; }
body.site .mapcard.bl { bottom: 16px; left: 16px; right: auto; top: auto; }
body.site .mapcard.br { bottom: 16px; right: 16px; left: auto; top: auto; }
body.site .mapcard .lk { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--in-line2); font: 400 12px/1.5 var(--ds-font-mono); color: var(--in-acc2); }
body.site .keys-toggle { font: 500 11px/1 var(--ds-font-mono); color: var(--in-ink2); background: none; border: 1px dashed var(--in-line2); border-radius: 5px; padding: 3px 7px; cursor: pointer; }
body.site .keys-toggle[aria-pressed="false"] { color: var(--in-mute); }
body.site .mapcard .bd { padding: 14px 16px 16px; }
body.site .mapcard .mt { font: 500 11.5px/1.3 var(--ds-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--in-mute); }
body.site .mapcard h3 { margin: 8px 0 6px; font: 600 19px/1.2 var(--ds-font-sans); letter-spacing: -.015em; color: var(--in-ink); }
body.site .mapcard p { margin: 0; font: 400 14.5px/1.5 var(--ds-font-serif); color: var(--in-ink2); }
body.site .mapcard .by { margin-top: 10px; font: 400 12px/1.45 var(--ds-font-mono); color: var(--in-mute); }

body.site .pal { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; background: rgba(5, 6, 8, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
body.site .pal.on { display: flex; }
body.site .pal .box { width: min(640px, 92vw); background: #0F1115; border: 1px solid var(--in-line2); border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px -20px #000; }
body.site .pal input { width: 100%; padding: 18px 20px; background: transparent; border: 0; border-bottom: 1px solid var(--in-line); color: var(--in-ink); font: 400 18px var(--ds-font-sans); outline: none; }
body.site .pal ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
body.site .pal li { padding: 11px 14px; border-radius: 10px; display: flex; justify-content: space-between; gap: 14px; cursor: pointer; color: var(--in-ink); }
body.site .pal li span { font: 400 12px var(--ds-font-mono); color: var(--in-mute); white-space: nowrap; }
body.site .pal li.sel { background: #1A1E25; }

html:not(.js) body.site .js-only { display: none !important; }

/* page heads, about, people */
body.site .page-head { max-width: var(--in-wide); margin: 0 auto; padding: 72px 28px 8px; }
body.site .page-title { margin: 16px 0 0; font: 780 clamp(48px, 8vw, 120px)/.86 var(--ds-font-sans); letter-spacing: -.055em; color: var(--in-ink); }
body.site .page-dek { margin: 18px 0 0; max-width: 680px; font: 400 19px/1.5 var(--ds-font-serif); color: var(--in-ink2); }
body.site .split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px 48px; border-top: 1px solid var(--in-line2); padding-top: 16px; }
body.site .about, body.site .people { max-width: var(--in-wide); margin: 0 auto; padding: 48px 28px 8px; }
body.site .people { padding-bottom: 80px; }
body.site .section-title { margin: 0; font: 600 13px/1.2 var(--ds-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--in-ink); }
body.site .about-body { max-width: var(--ds-measure); }
body.site .about-body p { margin: 0 0 1.05em; font: 400 18px/1.7 var(--ds-font-serif); color: var(--in-ink2); }
body.site .people h3 { margin: 0 0 10px; font: 600 12px/1.2 var(--ds-font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--in-mute); }
body.site .people-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
body.site .people-list li { margin: 0; }
body.site .people-list a, body.site .people-list span {
  display: inline-flex; align-items: baseline; gap: 7px; padding: 9px 14px; border: 1px solid var(--in-line2); border-radius: 999px;
  background: var(--in-bg2); font: 500 14.5px/1.2 var(--ds-font-sans); color: var(--in-ink);
}
body.site .people-list a:hover { border-color: var(--in-acc); }
body.site .people-list small { font: 400 11.5px/1 var(--ds-font-mono); color: var(--in-mute); letter-spacing: .03em; }
body.site .people-list.pis a, body.site .people-list.pis span { padding: 12px 17px; font-size: 16px; }

/* publications (kramdown output; entries unchanged) */
body.site .page { max-width: var(--in-wide); margin: 0 auto; padding: 0 28px 90px; }
body.site .pubs { max-width: 920px; }
body.site .pubs > h3:first-child { margin: 16px 0 0; font: 780 clamp(40px, 6vw, 84px)/.92 var(--ds-font-sans); letter-spacing: -.05em; color: var(--in-ink); }
body.site .pubs > p { font: 400 18px/1.6 var(--ds-font-serif); color: var(--in-ink2); max-width: 760px; }
body.site .pubs h4 { margin: 46px 0 4px; padding-top: 14px; border-top: 1px solid var(--in-line2); font: 600 13px/1.2 var(--ds-font-mono); letter-spacing: .12em; color: var(--in-acc2); }
body.site .pubs ul { list-style: none; margin: 0; padding: 0; }
body.site .pubs li { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--in-line); font: 400 13.5px/1.6 var(--ds-font-mono); color: var(--in-mute); }
body.site .pubs li:last-child { border-bottom: 0; }
body.site .pubs li strong { display: block; margin-bottom: 4px; font: 600 18px/1.35 var(--ds-font-sans); letter-spacing: -.01em; color: var(--in-ink); }
body.site .pubs li em { display: block; margin-bottom: 6px; font: italic 400 16px/1.5 var(--ds-font-serif); color: var(--in-ink2); }
body.site .pubs li a { color: var(--in-acc2); font-weight: 500; }
body.site .pubs li a:hover { color: #fff; }
body.site .pubs hr { border: 0; border-top: 1px solid var(--in-line2); margin: 40px 0 20px; }
body.site .pubs > p:last-child { font-size: 16px; color: var(--in-mute); }
body.site .pubs a { color: var(--in-acc2); }

@media (max-width: 900px) {
  body.site .cols { display: none; }
  body.site .row { grid-template-columns: 1fr; gap: 4px; padding: 16px 8px; }
  body.site .row .m { display: none; }
  body.site .readout { display: none; }
  body.site .hero-over { grid-template-columns: 1fr; padding: 0 18px; }
  body.site .hero { height: 72vh; min-height: 460px; }
  body.site .hints { display: none; }
  body.site .split { grid-template-columns: 1fr; }
  body.site .log, body.site .about, body.site .people, body.site .page-head, body.site .page { padding-left: 18px; padding-right: 18px; }
  body.site .mapcard { left: 12px; right: 12px; width: auto; }
  body.site .views { display: none; }
  body.site .peek { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.site .row, body.site .peek, body.site .mapcard, body.site .row::before { transition: none; }
}

/* ------------------------------------------------------------------ new posts (body.post-v2)
 * The template is ~/Claude-Code/templates/blogpost/post_template_v2.html. */
body.post-v2 {
  margin: 0; background: var(--ds-paper); color: var(--ds-ink);
  font: 400 19px/1.68 var(--ds-font-serif);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
body.post-v2 *, body.post-v2 *::before, body.post-v2 *::after { box-sizing: border-box; }
body.post-v2 .eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font: 500 12px/1 var(--ds-font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ds-muted);
}
body.post-v2 .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ds-accent); flex: none; }

body.post-v2 .post-head { max-width: calc(var(--ds-measure) + 48px); margin: 0 auto; padding: 64px 24px 8px; }
body.post-v2 .post-title { margin: 18px 0 0; font: 680 clamp(34px, 5.2vw, 54px)/1.04 var(--ds-font-sans); letter-spacing: -0.035em; color: var(--ds-ink); }
body.post-v2 .post-dek { margin: 18px 0 0; font: 400 22px/1.45 var(--ds-font-serif); color: var(--ds-ink-2); }
body.post-v2 .post-meta { margin: 26px 0 0; padding: 14px 0; border-top: 1px solid var(--ds-line); border-bottom: 1px solid var(--ds-line);
  display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 14px/1.5 var(--ds-font-sans); color: var(--ds-muted); }
body.post-v2 .post-meta strong { color: var(--ds-ink); font-weight: 600; }
body.post-v2 .post-links { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
body.post-v2 .post-links a {
  font: 500 12px/1 var(--ds-font-mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--ds-ink); background: var(--ds-surface); border: 1px solid var(--ds-line-strong); padding: 9px 12px; border-radius: 999px;
}
body.post-v2 .post-links a:hover { border-color: var(--ds-accent); color: var(--ds-accent-ink); }
body.post-v2 .tldr { margin: 32px 0 0; padding: 22px 26px; background: var(--ds-ink); color: #F4F2EE; border-radius: var(--ds-radius); }
body.post-v2 .tldr .label { color: #F6B98F; }
body.post-v2 .tldr p { margin: 8px 0 0; font: 400 19px/1.55 var(--ds-font-serif); }

body.post-v2 .prose { max-width: calc(var(--ds-measure) + 48px); margin: 0 auto; padding: 8px 24px 88px; }
body.post-v2 .prose > p, body.post-v2 .prose li { color: var(--ds-ink); }
body.post-v2 .prose p { margin: 0 0 1.1em; }
body.post-v2 .prose h2 { margin: 2.4em 0 .5em; font: 650 29px/1.18 var(--ds-font-sans); letter-spacing: -0.022em; color: var(--ds-ink); }
body.post-v2 .prose h3 { margin: 1.8em 0 .4em; font: 620 21px/1.3 var(--ds-font-sans); letter-spacing: -0.012em; color: var(--ds-ink); }
body.post-v2 .prose a { color: var(--ds-accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(154, 52, 18, .35); }
body.post-v2 .prose a:hover { text-decoration-color: currentColor; }
body.post-v2 .prose ul, body.post-v2 .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
body.post-v2 .prose li { margin: .35em 0; }
body.post-v2 .prose strong { font-weight: 650; }
body.post-v2 .prose hr { border: 0; border-top: 1px solid var(--ds-line); margin: 3em 0; }
body.post-v2 .prose blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 2px solid var(--ds-accent); color: var(--ds-ink-2); font-style: italic; }
body.post-v2 .prose figure { margin: 2.2em 0; }
body.post-v2 .prose figure.wide { width: min(1040px, calc(100vw - 48px)); margin-left: 50%; transform: translateX(-50%); }
body.post-v2 .prose figure img, body.post-v2 .prose figure svg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--ds-line); border-radius: 10px; }
body.post-v2 .prose figcaption { margin-top: 12px; font: 400 14.5px/1.55 var(--ds-font-sans); color: var(--ds-muted); }
body.post-v2 .prose figcaption b, body.post-v2 .prose figcaption strong { color: var(--ds-ink); font-weight: 600; }
body.post-v2 .label {
  display: block; margin: 0 0 6px; font: 600 11.5px/1.2 var(--ds-font-mono); letter-spacing: .09em;
  text-transform: uppercase; color: var(--ds-accent-ink);
}
body.post-v2 .prose .callout, body.post-v2 .prose .theorem, body.post-v2 .prose .toolbox {
  margin: 1.8em 0; padding: 20px 24px; background: var(--ds-surface);
  border: 1px solid var(--ds-line); border-radius: 12px;
}
body.post-v2 .prose .callout { border-left: 3px solid var(--ds-accent); }
body.post-v2 .prose .callout p:last-child, body.post-v2 .prose .theorem p:last-child, body.post-v2 .prose .toolbox p:last-child { margin-bottom: 0; }
body.post-v2 .prose .theorem { background: var(--ds-surface); box-shadow: inset 0 3px 0 var(--ds-ink); }
body.post-v2 .prose .caveat { border-left-color: #B45309; }
body.post-v2 .prose .toolbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 1.6em 0; }
body.post-v2 .prose .toolbox-grid .toolbox { margin: 0; }
body.post-v2 .prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font: 400 15px/1.45 var(--ds-font-sans); font-variant-numeric: tabular-nums; }
body.post-v2 .prose th { text-align: left; font: 600 11.5px/1.3 var(--ds-font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ds-muted); border-bottom: 1px solid var(--ds-ink); padding: 10px 12px; }
body.post-v2 .prose td { border-bottom: 1px solid var(--ds-line); padding: 10px 12px; }
body.post-v2 .prose caption { caption-side: bottom; text-align: left; padding-top: 10px; font: 400 14px/1.5 var(--ds-font-sans); color: var(--ds-muted); }
body.post-v2 .prose code { font-family: var(--ds-font-mono); font-size: .84em; background: var(--ds-surface-2); padding: .12em .38em; border-radius: 5px; }
body.post-v2 .prose pre { margin: 1.6em 0; padding: 18px 20px; overflow-x: auto; background: var(--ds-ink); color: #E9E7E2; border-radius: 12px; font: 400 13.5px/1.6 var(--ds-font-mono); }
body.post-v2 .prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
@media (max-width: 640px) {
  body.post-v2 { font-size: 18px; }
  body.post-v2 .post-head { padding: 40px 18px 4px; }
  body.post-v2 .prose { padding: 4px 18px 64px; }
  body.post-v2 .post-dek { font-size: 19.5px; }
  body.post-v2 .prose h2 { font-size: 25px; }
}

/* ------------------------------------------------------------------ older posts (body.post-legacy)
 * Their own layouts live in post-legacy.css. Here: fonts named inside SVG/D3 markup map to the
 * design-system families (the per-post font links are gone), and the chrome never runs wider
 * than the window inside a fixed-width post body. */
body.post-legacy #site-bar, body.post-legacy #site-foot { width: min(100%, 100vw); box-sizing: border-box; }
body.post-legacy [font-family*="Source Sans" i], body.post-legacy [font-family*="Inter" i],
body.post-legacy [font-family*="IBM Plex Sans" i], body.post-legacy [font-family*="Archivo" i],
body.post-legacy [font-family*="Space Grotesk" i], body.post-legacy [font-family*="Helvetica" i],
body.post-legacy [font-family*="sans-serif" i] { font-family: var(--ds-font-sans); }
body.post-legacy [font-family*="Source Serif" i], body.post-legacy [font-family*="Playfair" i],
body.post-legacy [font-family*="IM Fell" i], body.post-legacy [font-family*="Bodoni" i],
body.post-legacy [font-family*="Libre Caslon" i], body.post-legacy [font-family*="Spectral" i],
body.post-legacy [font-family*="Lora" i], body.post-legacy [font-family*="Newsreader" i],
body.post-legacy [font-family*="Cormorant" i], body.post-legacy [font-family="serif" i],
body.post-legacy [font-family*="Georgia" i] { font-family: var(--ds-font-serif); }
body.post-legacy [font-family*="Mono" i], body.post-legacy [font-family*="monospace" i],
body.post-legacy [font-family*="Menlo" i], body.post-legacy [font-family*="Courier" i] { font-family: var(--ds-font-mono); }

/* ------------------------------------------------------------------ shared fixes */
@media (max-width: 760px) {
  mjx-container[jax="CHTML"][display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
}
