@font-face {
  font-family: "Source Sans Local";
  src: url("assets/source-sans-pro.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #090b0b;
  --surface: rgba(18, 23, 21, 0.54);
  --surface-raised: rgba(25, 31, 28, 0.78);
  --glass: rgba(18, 24, 21, 0.58);
  --glass-heavy: rgba(12, 17, 15, 0.84);
  --text: #f1f3ec;
  --muted: #909a91;
  --line: rgba(178, 204, 184, 0.18);
  --line-strong: rgba(196, 226, 196, 0.36);
  --acid: #b8f34a;
  --signal: #ff6846;
  --code: #dbe9cf;
  --pixel: rgba(184, 243, 74, 0.13);
  --header-height: 72px;
  --page: min(1240px, calc(100vw - 64px));
  font-family: "Source Sans Local", Inter, ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #dfe5dc;
  --surface: rgba(239, 244, 237, 0.52);
  --surface-raised: rgba(250, 252, 248, 0.78);
  --glass: rgba(235, 242, 233, 0.62);
  --glass-heavy: rgba(244, 248, 242, 0.86);
  --text: #121512;
  --muted: #626c63;
  --line: rgba(29, 47, 32, 0.18);
  --line-strong: rgba(29, 47, 32, 0.38);
  --acid: #4f7600;
  --signal: #c53d20;
  --code: #263220;
  --pixel: rgba(79, 118, 0, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 12% 6%, rgba(101, 139, 57, 0.12), transparent 32%),
    radial-gradient(ellipse at 86% 32%, rgba(56, 112, 101, 0.10), transparent 30%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-width: 320px;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image: radial-gradient(rgba(220, 235, 220, .32) .55px, transparent .75px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--acid); color: #0b0d0a; }

.ambient-grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  image-rendering: pixelated;
}

.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  width: var(--page);
  margin: 14px auto 0;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  position: relative;
  z-index: 20;
  background: var(--glass-heavy);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .16), inset 0 1px rgba(255, 255, 255, .08);
}

.site-header::after, .featured-copy::after, .article-content::after {
  content: "";
  position: absolute;
  pointer-events: none;
  width: 12px;
  height: 12px;
  right: -1px;
  top: -1px;
  border-top: 2px solid var(--acid);
  border-right: 2px solid var(--acid);
  opacity: .72;
}

.brand { display: flex; align-items: center; gap: 13px; min-width: 248px; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #0b0d0a;
  background: var(--acid);
  font: 800 14px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font: 700 15px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.brand-copy small { color: var(--muted); font: 500 9px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; margin-top: 5px; }

.desktop-nav { display: flex; height: 100%; margin-left: auto; }
.desktop-nav a {
  min-width: 88px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  border-left: 1px solid var(--line);
  position: relative;
}
.desktop-nav a:last-child { border-right: 1px solid var(--line); }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--text); }
.desktop-nav a.active::after {
  content: "";
  position: absolute;
  height: 3px;
  left: 18px;
  right: 18px;
  bottom: -1px;
  background: var(--acid);
}
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 18px; }
.lab-status { color: var(--muted); font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.lab-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 9px color-mix(in srgb, var(--acid), transparent 30%); animation: status-pulse 2.4s ease-in-out infinite; }
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 2px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.icon-button:hover { border-color: var(--acid); color: var(--acid); }
.icon-button svg { width: 16px; height: 16px; }
.menu-toggle { display: none; }

.mobile-menu {
  position: absolute;
  top: calc(var(--header-height) + 18px);
  right: max(16px, calc((100vw - var(--page)) / 2));
  left: max(16px, calc((100vw - var(--page)) / 2));
  z-index: 30;
  background: var(--glass-heavy);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), inset 0 1px rgba(255,255,255,.08);
}
.mobile-menu a { display: block; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }

main:not(.article-layout) { width: var(--page); margin: 0 auto; }
.intro { min-height: 430px; padding: 78px 22px 55px; position: relative; border: 1px solid var(--line); border-top: 0; background: linear-gradient(115deg, var(--glass), rgba(255,255,255,.018)); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); }
.intro::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .26; background-image: linear-gradient(90deg, transparent 49.7%, var(--line) 50%, transparent 50.3%), linear-gradient(transparent 49.7%, var(--line) 50%, transparent 50.3%); background-size: 96px 96px; mask-image: linear-gradient(90deg, black, transparent 75%); }
.intro::after {
  content: "TRACE / ANALYZE / DOCUMENT";
  position: absolute;
  right: 0;
  top: 84px;
  writing-mode: vertical-rl;
  color: var(--line-strong);
  font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.intro-kicker, .section-label, .article-classification {
  display: flex;
  justify-content: space-between;
  color: var(--acid);
  font: 600 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.intro-kicker { width: min(680px, calc(100% - 72px)); padding-bottom: 18px; border-bottom: 1px solid var(--line-strong); }
.intro h1, .article-hero h1 {
  margin: 26px 0 22px;
  max-width: 900px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 1.02;
  font-weight: 620;
  letter-spacing: 0;
}
.intro h1 em, .article-hero h1 em { color: var(--muted); font-style: normal; font-weight: 400; }
.intro > p { max-width: 620px; color: var(--muted); font-size: 18px; margin: 0; }
.intro-meta { display: flex; gap: 38px; margin-top: 46px; color: var(--muted); font: 500 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.intro-meta span { display: flex; gap: 9px; align-items: center; }
.intro-meta b { color: var(--text); font-weight: 600; }

.featured { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr); min-height: 520px; margin-top: 24px; border: 1px solid var(--line-strong); background: var(--glass); backdrop-filter: blur(20px) saturate(1.28); -webkit-backdrop-filter: blur(20px) saturate(1.28); box-shadow: 0 22px 70px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.07); }
.featured-media { position: relative; overflow: hidden; border-right: 1px solid var(--line); min-height: 430px; background: #030504; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0.68; filter: grayscale(1) contrast(1.15) blur(.35px); image-rendering: pixelated; transition: transform .5s ease, filter .5s ease, opacity .5s ease; }
.featured-media::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .26; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.35) 4px); }
.featured-media::after { content: ""; position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--acid), transparent 82%); pointer-events: none; z-index: 2; }
.featured-media:hover img { transform: scale(1.025); filter: grayscale(0.15) contrast(1.08); opacity: .9; }
.image-index { position: absolute; left: 18px; bottom: 18px; padding: 7px 9px; color: #eef4e8; background: rgba(8,10,9,.82); border: 1px solid rgba(255,255,255,.2); font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.featured-copy { position: relative; padding: 48px 28px 38px 40px; display: flex; flex-direction: column; }
.featured-copy::after { top: auto; bottom: -1px; transform: rotate(180deg); }
.section-label { color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-label span:first-child { color: var(--signal); }
.tags { display: flex; gap: 7px; margin: 36px 0 20px; }
.tags span, .archive-tags span { color: var(--acid); border: 1px solid color-mix(in srgb, var(--acid), transparent 58%); padding: 5px 7px; font: 600 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.featured h2 { font-size: clamp(31px, 3.1vw, 48px); line-height: 1.09; margin: 0 0 21px; font-weight: 600; }
.featured h2 a:hover { color: var(--acid); }
.featured-copy > p { margin: 0; color: var(--muted); font-size: 16px; max-width: 480px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--code); font-size: .88em; }
.article-footer { margin-top: auto; padding-top: 36px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font: 500 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.read-link { color: var(--text); display: flex; align-items: center; gap: 8px; }
.read-link:hover { color: var(--acid); }
.read-link svg { width: 15px; }

.research-index, .archive-section { padding: 92px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 42px; }
.section-heading h2 { margin: 7px 0 0; font-size: 44px; line-height: 1; font-weight: 600; }
.section-heading > p { color: var(--muted); max-width: 460px; margin: 0 0 4px auto; font-size: 16px; }
.eyebrow, .entry-count { color: var(--signal); font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.topic-grid { border-top: 1px solid var(--line-strong); }
.topic { min-height: 104px; display: grid; grid-template-columns: 84px 1fr 36px; align-items: center; border: 1px solid transparent; border-bottom-color: var(--line); background: linear-gradient(100deg, var(--glass), transparent 78%); backdrop-filter: blur(11px); -webkit-backdrop-filter: blur(11px); transition: background .2s ease, padding .2s ease; }
.topic:hover { background: var(--surface); padding: 0 16px; }
.topic-number { color: var(--acid); font: 600 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.topic h3 { margin: 0 0 5px; font-size: 22px; font-weight: 600; }
.topic p { margin: 0; color: var(--muted); }
.topic > svg { width: 18px; color: var(--muted); }
.topic:hover > svg { color: var(--acid); }

.section-heading.compact { display: flex; justify-content: space-between; align-items: end; }
.archive-row { display: grid; grid-template-columns: 130px 1fr 180px 40px; gap: 24px; align-items: center; padding: 28px 18px; border: 1px solid transparent; border-top-color: var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.archive-row:last-child { border-bottom: 1px solid var(--line); }
.archive-row > time { color: var(--muted); font: 500 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.archive-row h3 { margin: 0 0 7px; font-size: 20px; font-weight: 600; }
.archive-row h3 a:hover { color: var(--acid); }
.archive-row p { color: var(--muted); margin: 0; font-size: 14px; }
.archive-tags { display: flex; gap: 6px; }
.row-action { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); }
.row-action:hover { color: var(--acid); border-color: var(--acid); }
.row-action svg { width: 16px; }

.about-strip { min-height: 220px; display: grid; grid-template-columns: .8fr 1.5fr auto; align-items: center; gap: 60px; padding: 24px; margin-top: 30px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.about-strip h2 { font: 700 25px/1 ui-monospace, SFMono-Regular, Consolas, monospace; margin: 10px 0 0; }
.about-strip p { color: var(--muted); max-width: 550px; }
.about-strip > a { display: flex; align-items: center; gap: 9px; color: var(--acid); font: 600 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.about-strip svg { width: 15px; }
.site-footer { width: var(--page); min-height: 95px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 500 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.site-footer a:hover { color: var(--acid); }

.search-dialog { width: min(720px, calc(100vw - 32px)); border: 1px solid var(--line-strong); padding: 0; color: var(--text); background: var(--glass-heavy); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); box-shadow: 0 26px 90px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.1); border-radius: 4px; }
.search-dialog::backdrop { background: rgba(5,7,6,.78); backdrop-filter: blur(3px); }
.search-input-wrap { height: 68px; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line-strong); }
.search-input-wrap svg { width: 18px; color: var(--acid); }
.search-input-wrap input { min-width: 0; width: 100%; border: 0; outline: 0; background: none; color: var(--text); font-size: 17px; }
.search-input-wrap button { border: 1px solid var(--line-strong); color: var(--muted); background: var(--surface); padding: 5px 7px; font: 600 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; cursor: pointer; }
.search-results { padding: 18px; }
.search-hint { display: block; color: var(--muted); margin-bottom: 10px; font: 500 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.search-results a { display: grid; grid-template-columns: 90px 1fr 24px; gap: 12px; align-items: center; padding: 15px 12px; border: 1px solid transparent; }
.search-results a:hover { border-color: var(--acid); background: var(--surface); }
.search-results a span { color: var(--muted); font: 500 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.search-results a strong { font-weight: 600; }
.search-results a svg { width: 16px; }
.empty-result { color: var(--muted); padding: 18px 12px; margin: 0; }

/* Article */
.article-layout { width: var(--page); margin: 0 auto; display: grid; grid-template-columns: 190px minmax(0, 760px) 1fr; column-gap: 60px; }
.article-hero { grid-column: 1 / -1; padding: 62px 0 68px; border-bottom: 1px solid var(--line-strong); }
.back-link { color: var(--muted); display: inline-flex; align-items: center; gap: 9px; font-size: 13px; margin-bottom: 60px; }
.back-link:hover { color: var(--acid); }
.back-link svg { width: 16px; }
.article-classification { max-width: 760px; color: var(--signal); }
.article-hero h1 { max-width: 990px; font-size: clamp(44px, 5.6vw, 76px); margin-top: 24px; }
.article-deck { color: var(--muted); max-width: 720px; font-size: 19px; margin: 0 0 42px; }
.article-byline { display: flex; gap: 28px; color: var(--muted); font: 500 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-byline span:first-child { color: var(--text); }
.article-toc { grid-column: 1; align-self: start; position: sticky; top: 22px; padding: 64px 0; display: flex; flex-direction: column; gap: 16px; }
.article-toc > span { color: var(--signal); font: 600 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; margin-bottom: 7px; }
.article-toc a { color: var(--muted); font-size: 12px; }
.article-toc a:hover, .article-toc a.active { color: var(--text); }
.toc-progress { width: 100%; height: 2px; background: var(--line); margin-top: 8px; }
.toc-progress i { display: block; width: 20%; height: 100%; background: var(--acid); }
.article-content { position: relative; grid-column: 2; border: 1px solid var(--line); border-top: 0; padding: 72px 58px 0; background: var(--glass); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.article-content::after { position: absolute; top: 0; right: 0; }
.article-content section { scroll-margin-top: 30px; margin: 80px 0; }
.article-content h2 { font-size: 32px; line-height: 1.15; margin: 8px 0 28px; font-weight: 600; }
.article-content p { color: color-mix(in srgb, var(--text), var(--muted) 23%); line-height: 1.9; font-size: 17px; }
.article-content p code { padding: 2px 5px; background: var(--surface-raised); border: 1px solid var(--line); white-space: normal; }
.section-index { color: var(--acid); font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-lead { display: grid; grid-template-columns: 48px 1fr; gap: 12px; }
.article-lead h2 { margin-top: -8px; }
.article-lead p { font-size: 20px; line-height: 1.75; margin-top: 0; }
.research-figure { margin: 68px -59px; background: #060807; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.research-figure img { width: 100%; max-height: 540px; object-fit: contain; image-rendering: pixelated; filter: saturate(.76) contrast(1.08); }
.research-figure figcaption { color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); padding: 13px 18px; font-size: 12px; }
.research-figure figcaption span { color: var(--signal); margin-right: 18px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.call-chain { margin: 36px 0; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); }
.call-chain span { color: var(--acid); font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.call-chain svg { width: 14px; color: var(--muted); }
pre { margin: 36px 0; overflow: auto; background: #080a09; color: #d8e2d1; border: 1px solid var(--line-strong); border-radius: 3px; }
.code-head { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: #899185; border-bottom: 1px solid #30352f; font: 600 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.copy-code { color: #b8f34a; background: transparent; border: 0; cursor: pointer; display: flex; align-items: center; gap: 6px; font: inherit; }
.copy-code svg { width: 13px; }
pre code { color: inherit; display: block; padding: 20px; font-size: 13px; line-height: 1.75; }
.condition-list { padding: 0; margin: 35px 0 0; list-style: none; border-top: 1px solid var(--line-strong); }
.condition-list li { display: grid; grid-template-columns: 50px 1fr; gap: 15px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.condition-list li > span { color: var(--acid); font: 600 10px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace; }
.condition-list p { margin: 0; font-size: 15px; }
.article-note { display: grid; grid-template-columns: 70px 1fr; gap: 20px; border-left: 3px solid var(--signal); background: var(--surface); padding: 22px; margin: 70px 0; }
.article-note span { color: var(--signal); font: 600 10px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-note p { margin: 0; font-size: 14px; }
.article-end { margin: 100px -58px 0; padding: 28px 36px; border-top: 1px solid var(--line-strong); display: flex; justify-content: space-between; color: var(--muted); font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-end a { color: var(--acid); display: flex; align-items: center; gap: 8px; }
.article-end svg { width: 14px; }

@keyframes status-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1000px) {
  :root { --page: min(100% - 40px, 900px); }
  .lab-status { display: none; }
  .desktop-nav a { min-width: 72px; }
  .featured { grid-template-columns: 1fr; }
  .featured-media { border-right: 0; border-bottom: 1px solid var(--line); max-height: 480px; }
  .featured-copy { padding: 40px 0; min-height: 440px; }
  .article-layout { grid-template-columns: 150px minmax(0, 1fr); column-gap: 30px; }
  .article-content { grid-column: 2; }
  .article-toc { grid-column: 1; }
  .about-strip { grid-template-columns: .7fr 1.5fr; }
  .about-strip > a { grid-column: 2; margin-top: -65px; }
}

@media (max-width: 760px) {
  :root { --header-height: 64px; --page: calc(100% - 32px); }
  .site-header { width: calc(100% - 32px); margin-top: 8px; }
  .mobile-menu { top: calc(var(--header-height) + 10px); right: 16px; left: 16px; }
  .brand { min-width: 0; margin-right: auto; }
  .brand-copy small { display: none; }
  .desktop-nav, .theme-toggle { display: none; }
  .menu-toggle { display: grid; }
  .header-actions { margin-left: 8px; }
  .intro { min-height: auto; padding: 62px 0 45px; }
  .intro::after { display: none; }
  .intro h1, .article-hero h1 { font-size: 44px; }
  .intro > p { font-size: 16px; }
  .intro-meta { flex-wrap: wrap; gap: 16px 24px; margin-top: 36px; }
  .featured { min-height: auto; }
  .featured-media { min-height: 280px; }
  .featured-copy { min-height: 430px; }
  .featured h2 { font-size: 34px; }
  .research-index, .archive-section { padding: 68px 0; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; }
  .section-heading > p { margin-left: 0; }
  .section-heading h2 { font-size: 38px; }
  .topic { grid-template-columns: 48px 1fr 28px; }
  .topic p { font-size: 13px; }
  .archive-row { grid-template-columns: 1fr 36px; gap: 15px; }
  .archive-row > time, .archive-tags { grid-column: 1; }
  .archive-row > div:nth-child(2) { grid-column: 1; }
  .row-action { grid-column: 2; grid-row: 1 / 4; align-self: center; }
  .about-strip { grid-template-columns: 1fr; gap: 20px; padding: 46px 0; }
  .about-strip > a { grid-column: 1; margin-top: 0; }
  .site-footer { min-height: 120px; flex-wrap: wrap; gap: 18px; align-content: center; }
  .site-footer span:nth-child(2) { display: none; }
  .article-layout { display: block; }
  .article-hero { padding: 44px 0 50px; }
  .back-link { margin-bottom: 44px; }
  .article-classification { gap: 15px; }
  .article-deck { font-size: 17px; }
  .article-byline { flex-wrap: wrap; gap: 13px 22px; }
  .article-toc { display: none; }
  .article-content { padding: 56px 16px 0; border: 1px solid var(--line); border-top: 0; }
  .article-lead { grid-template-columns: 38px 1fr; }
  .article-lead p { font-size: 18px; }
  .research-figure { margin: 55px -16px; }
  .article-content section { margin: 68px 0; }
  .call-chain { flex-wrap: wrap; }
  .call-chain svg { transform: rotate(90deg); }
  .article-end { margin: 80px -16px 0; padding: 24px 16px; gap: 20px; }
}

@font-face {
  font-family: "Source Sans Local";
  src: url("assets/source-sans-pro.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Pixel HUD";
  src: url("assets/press-start-2p.ttf") format("truetype");
  font-display: swap;
}

:root {
  --pixel-font: "Pixel HUD", ui-monospace, monospace;
  --body-font: "Source Sans Local", Inter, ui-sans-serif, system-ui, sans-serif;
}

/* Pixel HUD pass: content stays open and readable over a blurred game-scene backdrop. */
body {
  font-family: var(--body-font);
  position: relative;
  isolation: isolate;
  background: #111423;
}
body::after {
  content: "";
  position: fixed;
  inset: -24px;
  z-index: -1;
  pointer-events: none;
  background: rgba(14, 18, 35, .28);
  backdrop-filter: blur(8px) saturate(.76);
  -webkit-backdrop-filter: blur(8px) saturate(.76);
}
body::before {
  opacity: .18;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.055) 0 1px, transparent 1px 4px);
  background-size: auto;
  mix-blend-mode: screen;
}
.ambient-grid {
  z-index: -2;
  opacity: .92;
  filter: blur(11px) saturate(.82) contrast(.88);
  transform: scale(1.05);
  image-rendering: auto;
}
.site-header {
  margin-top: 18px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(9, 12, 25, .76);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 4px 4px 0 rgba(3, 5, 12, .55), inset 0 0 0 1px rgba(255,255,255,.04);
  clip-path: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px));
}
.site-header::after, .featured-copy::after, .article-content::after { display: none; }
.brand-mark, .icon-button, .row-action {
  border-radius: 0;
  box-shadow: 3px 3px 0 rgba(0,0,0,.34);
}
.brand-mark, .brand-copy strong, .brand-copy small, .lab-status, .desktop-nav a, .intro-kicker, .section-label, .article-classification, .eyebrow, .entry-count, .tags span, .archive-tags span, .image-index, .article-byline, .article-toc, .code-head, .copy-code, .article-end, .site-footer {
  font-family: var(--pixel-font);
}
.brand-mark { font-size: 11px; }
.brand-copy strong { font-size: 12px; }
.brand-copy small { font-size: 7px; }
.desktop-nav a { font-size: 9px; }
.desktop-nav a.active::after { height: 4px; left: 12px; right: 12px; }
.icon-button { background: #181b31; border-color: var(--line-strong); backdrop-filter: none; -webkit-backdrop-filter: none; }
.mobile-menu {
  top: calc(var(--header-height) + 18px);
  background: rgba(13, 17, 34, .95);
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 4px 4px 0 rgba(3, 5, 12, .55);
  clip-path: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px));
}
.mobile-menu a { font-family: var(--pixel-font); font-size: 9px; }
.intro { padding-left: 0; padding-right: 0; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.intro::before { display: none; }
.intro::after { font-family: var(--pixel-font); font-size: 8px; }
.intro-kicker, .section-label, .article-classification { font-size: 9px; }
.intro h1, .article-hero h1, .section-heading h2, .featured h2, .topic h3, .archive-row h3, .article-content h2, .about-strip h2 { font-family: var(--pixel-font), var(--body-font); text-shadow: 3px 3px 0 rgba(0,0,0,.25); }
.intro h1, .article-hero h1 { line-height: 1.35; }
.intro h1 em, .article-hero h1 em { font-family: var(--pixel-font), var(--body-font); }
.featured { margin-top: 24px; border: 1px solid var(--line-strong); border-radius: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; clip-path: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px)); }
.featured-media img { filter: none; image-rendering: auto; }
.featured-media::before { display: none; }
.featured-copy { padding-left: 40px; background: transparent; }
.tags span, .archive-tags span { font-size: 8px; border-radius: 0; padding: 7px 8px; }
.featured h2 { line-height: 1.55; }
.article-footer { font-family: var(--pixel-font); font-size: 8px; }
.research-index, .archive-section { border-bottom: 1px dashed var(--line-strong); }
.section-heading h2 { font-size: 31px; line-height: 1.5; }
.topic { border: 0; border-bottom: 1px dashed var(--line-strong); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.topic:hover { background: rgba(14, 19, 37, .52); padding: 0 16px; }
.topic-number { font-family: var(--pixel-font); font-size: 9px; }
.topic h3 { font-size: 16px; line-height: 1.5; }
.archive-row { padding-left: 14px; padding-right: 14px; border: 0; border-top: 1px dashed var(--line-strong); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.archive-row h3 { font-size: 14px; line-height: 1.7; }
.archive-row > time, .archive-row p { font-family: var(--body-font); }
.about-strip { padding: 24px; border: 1px solid var(--line-strong); border-radius: 0; margin-top: 30px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.about-strip h2 { font-size: 17px; }
.about-strip > a { font-family: var(--pixel-font); font-size: 8px; }
.site-footer { font-size: 7px; }
.search-dialog { border-radius: 0; background: rgba(13, 17, 34, .98); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 5px 5px 0 rgba(3, 5, 12, .68); clip-path: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px)); }
.search-input-wrap input { font-family: var(--body-font); }
.search-input-wrap button, .search-hint, .search-results a span { font-family: var(--pixel-font); font-size: 8px; }
.article-hero { border-bottom: 1px dashed var(--line-strong); }
.article-content { border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.article-content h2 { font-size: 22px; line-height: 1.65; }
.article-toc { font-family: var(--pixel-font); font-size: 8px; }
.article-toc > span { font-size: 8px; }
.article-toc a { font-size: 8px; line-height: 1.8; }
.research-figure { margin-left: -59px; margin-right: -59px; border: 1px solid var(--line-strong); }
pre { border-radius: 0; box-shadow: 4px 4px 0 rgba(3, 5, 12, .45); }
.code-head, .copy-code { font-size: 8px; }
.article-note { background: rgba(13, 17, 34, .38); border-radius: 0; }
.article-end { border-top: 1px dashed var(--line-strong); }

@media (max-width: 760px) {
  .site-header { margin-top: 8px; }
  .brand-copy strong { font-size: 10px; }
  .intro h1, .article-hero h1 { line-height: 1.45; }
  .featured-copy { padding-left: 22px; padding-right: 22px; background: transparent; }
  .article-content { border: 0; background: transparent; }
}

@media (prefers-reduced-transparency: reduce) {
  .ambient-grid { filter: none; }
  body::before { display: none; }
}

:root[data-theme="light"] body { background: #b8c9c5; }
:root[data-theme="light"] .site-header { background: rgba(235, 242, 233, .84); box-shadow: 4px 4px 0 rgba(44, 62, 49, .22), inset 0 0 0 1px rgba(255,255,255,.45); }
:root[data-theme="light"] .icon-button { background: rgba(229, 237, 226, .9); }
:root[data-theme="light"] .featured-copy, :root[data-theme="light"] .about-strip { background: transparent; }
:root[data-theme="light"] .archive-row { background: transparent; }
:root[data-theme="light"] .topic:hover { background: rgba(235, 242, 233, .55); }
:root[data-theme="light"] .search-dialog, :root[data-theme="light"] .mobile-menu { background: rgba(244, 248, 242, .97); box-shadow: 5px 5px 0 rgba(44, 62, 49, .2); }

@media (max-width: 430px) {
  .intro h1, .article-hero h1 { font-size: 37px; }
  .featured h2 { font-size: 28px; }
  .featured-copy { min-height: 460px; }
  .topic h3 { font-size: 14px; }
  .topic p { padding-right: 8px; }
  .entry-count { display: none; }
  .search-results a { grid-template-columns: 1fr 20px; }
  .search-results a span { grid-column: 1; }
  .condition-list li { grid-template-columns: 35px 1fr; }
  .article-end { align-items: flex-start; flex-direction: column; }
}
