:root {
  --ink: #12202b;
  --muted: #5f6d73;
  --paper: #f4f0e8;
  --surface: #fffdf8;
  --surface-2: #e9e5dc;
  --line: rgba(18, 32, 43, .16);
  --navy: #0b2430;
  --teal: #0b8079;
  --teal-2: #36b9a8;
  --amber: #dc8b3c;
  --coral: #d85d4f;
  --shadow: 0 24px 70px rgba(9, 31, 41, .12);
  --sans: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: Georgia, "Noto Serif SC", "Source Han Serif SC", serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #eef4f2;
  --muted: #aebdbd;
  --paper: #081a22;
  --surface: #0d2731;
  --surface-2: #13343e;
  --line: rgba(226, 243, 239, .16);
  --navy: #06141a;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.72; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
::selection { background: rgba(54, 185, 168, .28); }

.site-nav, .paper-top {
  position: sticky; top: 0; z-index: 30; height: 72px; padding: 0 clamp(22px, 5vw, 76px);
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .12em; font-size: 12px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--teal); color: white; border-radius: 50%; letter-spacing: -.03em; }
.site-nav nav, .paper-top nav { display: flex; gap: 26px; font-size: 14px; font-weight: 650; }
.site-nav nav a:hover, .paper-top nav a:hover { color: var(--teal); }
.icon-button { border: 1px solid var(--line); background: var(--surface); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; }

.hero {
  min-height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .6fr);
  gap: clamp(40px, 8vw, 130px); align-items: center; padding: clamp(70px, 10vw, 145px) clamp(24px, 7vw, 110px);
  background: radial-gradient(circle at 74% 22%, rgba(54,185,168,.16), transparent 28%), radial-gradient(circle at 17% 82%, rgba(220,139,60,.13), transparent 24%);
}
.eyebrow, .section-kicker, .section-heading span, .key-question > span, .closing > span { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.hero h1 { max-width: 880px; margin: 20px 0 28px; font-family: var(--serif); font-weight: 500; letter-spacing: -.055em; line-height: .98; font-size: clamp(56px, 8vw, 118px); }
.hero h1 em { color: var(--teal); font-style: italic; font-weight: 500; }
.hero-copy > p { max-width: 760px; margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 22px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-actions a, .primary { padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 750; transition: .2s ease; }
.hero-actions a:hover { transform: translateY(-2px); border-color: var(--teal); }
.hero-actions .primary, .primary { color: white; border-color: var(--teal); background: var(--teal); }
.hero-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-metrics > div { min-height: 150px; padding: 26px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; }
.hero-metrics strong { color: var(--teal); font-family: var(--serif); font-size: 52px; font-weight: 500; line-height: 1; }
.hero-metrics span { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.hero-metrics p { grid-column: 1 / -1; margin: 0; padding: 16px 18px; background: var(--navy); color: #c6d7d5; font-size: 12px; }

.thesis { padding: clamp(70px, 10vw, 140px) clamp(24px, 8vw, 130px); color: #eaf5f2; background: var(--navy); display: grid; grid-template-columns: 1fr 1fr; gap: 10vw; }
.thesis span { color: var(--teal-2); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.thesis h2 { margin: 18px 0 0; font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 5vw, 72px); line-height: 1.04; letter-spacing: -.04em; }
.thesis p { align-self: end; max-width: 700px; color: #b8cbc9; font-size: clamp(16px, 1.8vw, 21px); }

.library, .timeline-section, .roadmap-section, .taxonomy, .datasets-section, .relations-section, .comparison { padding: clamp(80px, 10vw, 150px) clamp(20px, 6vw, 96px); }
.timeline-section, .datasets-section, .comparison { background: var(--surface); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 42px; }
.section-heading h2 { margin: 8px 0 0; font-family: var(--serif); font-size: clamp(40px, 5vw, 68px); font-weight: 500; letter-spacing: -.04em; line-height: 1.05; }
.section-heading > p { color: var(--muted); font-size: 13px; }
.search-panel { position: sticky; top: 72px; z-index: 20; padding: 18px 0; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(15px); }
.search-panel label { display: block; }
.search-panel label span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .09em; }
.search-panel input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0 15px; outline: 0; background: transparent; color: var(--ink); font-family: var(--serif); font-size: clamp(24px, 3vw, 39px); }
.search-panel input:focus { border-color: var(--teal); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.list-controls { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.list-controls .filters, .list-controls .recall-filters { flex: 1; }
.view-sort-controls { display: flex; align-items: flex-end; gap: 9px; }
.view-toggle { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.view-toggle button { border: 0; padding: 7px 9px; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; white-space: nowrap; }
.view-toggle button.active { color: white; background: var(--navy); }
.sort-control { min-width: 215px; margin-top: 14px; display: flex !important; flex-direction: column; gap: 5px; }
.sort-control > span { margin: 0 !important; color: var(--muted); font-size: 9px !important; font-weight: 800; letter-spacing: .08em; }
.sort-control select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 34px 8px 10px; color: var(--ink); background: var(--surface); cursor: pointer; outline: 0; font-size: 11px; }
.sort-control select:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(11,128,121,.1); }
.filter-chip { border: 1px solid var(--line); padding: 7px 11px; background: var(--surface); border-radius: 999px; cursor: pointer; font-size: 12px; }
.filter-chip span { color: var(--muted); margin-left: 4px; }
.filter-chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.paper-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.paper-card { min-height: 340px; padding: 25px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.paper-card:hover { z-index: 2; transform: translateY(-4px); box-shadow: var(--shadow); }
.paper-card[hidden] { display: none; }
.card-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .12em; }
.paper-card h3 { margin: 36px 0 14px; font-family: var(--serif); font-size: 29px; font-weight: 500; line-height: 1.08; letter-spacing: -.025em; }
.paper-card > p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.mini-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 24px; }
.mini-tags span { color: var(--teal); background: rgba(11,128,121,.09); padding: 4px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.paper-card footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 750; }
.paper-card footer a:hover { color: var(--teal); }
.paper-grid.list-view { grid-template-columns: 1fr; }
.paper-grid.list-view .paper-card { min-height: 0; display: grid; grid-template-columns: 90px minmax(180px, .55fr) minmax(260px, 1.2fr) 165px; grid-template-rows: auto auto; gap: 12px 22px; align-items: center; padding: 20px 22px; }
.paper-grid.list-view .card-top { grid-column: 1; grid-row: 1 / 3; align-self: stretch; flex-direction: column; justify-content: center; gap: 5px; }
.paper-grid.list-view .paper-card h3 { grid-column: 2; grid-row: 1; margin: 0; font-size: 24px; }
.paper-grid.list-view .paper-card > p { grid-column: 3; grid-row: 1; margin: 0; }
.paper-grid.list-view .mini-tags { grid-column: 2 / 4; grid-row: 2; margin: 0; padding: 0; }
.paper-grid.list-view .paper-card footer { grid-column: 4; grid-row: 1 / 3; margin: 0; padding: 0 0 0 14px; flex-direction: column; align-items: flex-start; justify-content: center; border-top: 0; border-left: 1px solid var(--line); }
.empty-state { color: var(--muted); text-align: center; padding: 80px 0; }

.timeline { display: grid; grid-template-columns: repeat(12, minmax(75px, 1fr)); overflow-x: auto; padding-bottom: 25px; }
.year-column { position: relative; min-width: 76px; padding: 18px 15px 40px; border-left: 1px solid var(--line); }
.year-column > strong { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.year-column > span { display: block; color: var(--muted); font-size: 10px; }
.year-column > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.year-column a { width: 13px; height: 13px; border: 2px solid var(--teal); border-radius: 50%; transition: .2s; }
.year-column a:hover { background: var(--teal); transform: scale(1.35); }
.era-grid, .comparison-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 42px; background: var(--line); border: 1px solid var(--line); }
.era-grid article, .comparison-grid article { padding: 24px; background: var(--paper); }
.era-grid span, .comparison-grid span { color: var(--teal); font-size: 11px; font-weight: 800; }
.era-grid h3, .comparison-grid h3 { margin: 18px 0 8px; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.era-grid p, .comparison-grid p { margin: 0; color: var(--muted); font-size: 13px; }

.taxonomy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.taxonomy-card { min-height: 240px; padding: 23px; border: 1px solid var(--line); background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 84%, var(--teal))); transition: .2s ease; }
.taxonomy-card:hover { transform: translateY(-4px); border-color: var(--teal); box-shadow: var(--shadow); }
.taxonomy-grid span { color: var(--amber); font-family: var(--serif); font-size: 33px; }
.taxonomy-grid h3 { margin: 28px 0 8px; font-size: 18px; }
.taxonomy-grid p { margin: 0; color: var(--muted); font-size: 13px; }
.taxonomy-grid .taxonomy-card > strong { display: block; margin-top: 18px; color: var(--teal); font-size: 11px; }

.roadmap-section { overflow: hidden; color: #eaf5f2; background: var(--navy); }
.roadmap-section .section-heading span { color: var(--teal-2); }
.roadmap-section .section-heading > p { color: #9fb8b5; }
.roadmap-track { position: relative; max-width: 1180px; margin: 0 auto; }
.roadmap-track::before { content: ""; position: absolute; left: 34px; top: 34px; bottom: 34px; width: 1px; background: linear-gradient(var(--teal-2), var(--amber)); }
.roadmap-stop { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 28px; padding: 0 0 44px; }
.roadmap-number { position: relative; z-index: 1; width: 70px; height: 70px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: white; background: var(--navy); font-family: var(--serif); font-size: 22px; }
.roadmap-copy { padding: 4px 0 20px; border-bottom: 1px solid rgba(255,255,255,.13); }
.roadmap-copy > span { color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.roadmap-copy h3 { margin: 7px 0 7px; font-family: var(--serif); font-size: clamp(27px, 3vw, 39px); font-weight: 500; }
.roadmap-copy p { max-width: 800px; margin: 0; color: #aec4c1; }
.roadmap-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.roadmap-links a { padding: 6px 9px; border: 1px solid rgba(54,185,168,.45); border-radius: 4px; color: #c6ebe5; font-size: 10px; }
.roadmap-links a:hover { color: white; border-color: var(--teal-2); }

.table-note { margin-bottom: 18px; padding: 13px 16px; border-left: 3px solid var(--amber); background: color-mix(in srgb, var(--amber) 8%, transparent); color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 1050px; background: var(--surface); font-size: 13px; }
th { position: sticky; top: 0; padding: 13px 15px; text-align: left; background: var(--navy); color: #edf6f4; font-size: 10px; letter-spacing: .08em; }
td { padding: 15px; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--muted); }
td strong { color: var(--ink); }
tbody tr:hover { background: color-mix(in srgb, var(--teal) 6%, transparent); }
.dataset-filter { display: flex; flex-direction: column; gap: 4px; }
.dataset-filter span { color: var(--teal); font-size: 10px; font-weight: 750; }

.graph-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.graph-tabs button { border: 1px solid var(--line); padding: 9px 14px; border-radius: 999px; background: var(--surface); cursor: pointer; }
.graph-tabs button.active { background: var(--navy); color: white; }
.graph-wrap { position: relative; height: min(68vh, 680px); min-height: 480px; border: 1px solid var(--line); overflow: hidden; background: radial-gradient(circle at center, rgba(54,185,168,.1), transparent 46%), var(--navy); }
#relationGraph { display: block; width: 100%; height: 100%; }
.graph-tooltip { position: absolute; display: none; pointer-events: none; max-width: 260px; padding: 8px 10px; color: #fff; background: rgba(5,18,24,.94); border: 1px solid rgba(255,255,255,.2); border-radius: 7px; font-size: 11px; }
.network-reading { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.network-reading a { padding: 18px; border-top: 2px solid var(--teal); transition: .2s ease; }
.network-reading a:hover { background: color-mix(in srgb, var(--teal) 7%, transparent); transform: translateY(-2px); }
.network-reading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.network-reading span { color: var(--teal); font-size: 10px; font-weight: 750; }

.closing { padding: clamp(90px, 12vw, 180px) clamp(24px, 8vw, 130px); color: white; text-align: center; background: var(--navy); }
.closing h2 { max-width: 900px; margin: 22px auto 42px; font-family: var(--serif); font-size: clamp(42px, 6vw, 78px); line-height: 1.05; font-weight: 500; letter-spacing: -.04em; }
.site-footer { padding: 28px clamp(24px, 6vw, 96px); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); background: var(--surface); font-size: 11px; letter-spacing: .08em; }

/* Paper detail */
.reading-progress { position: fixed; left: 0; top: 0; z-index: 60; height: 3px; width: 0; background: var(--teal-2); }
.paper-top { position: fixed; left: 0; right: 0; }
.paper-page { --reader-scale: 1.12; }
.paper-top nav { margin-left: auto; }
.reader-tools { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.reader-tools > span { margin: 0 5px 0 7px; color: var(--muted); font-size: 13px; font-weight: 750; }
.reader-tools button { min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-size: 14px; font-weight: 800; }
.reader-tools button:hover { color: var(--teal); }
.reader-tools button.active { color: white; background: var(--teal); }
.paper-shell { --paper-sidebar-width: 185px; width: 100%; margin: 0; padding: 72px clamp(24px, 3vw, 72px) 0; display: grid; grid-template-columns: var(--paper-sidebar-width) 14px minmax(0, 1280px); column-gap: clamp(12px, 1.25vw, 20px); justify-content: start; }
.paper-aside { position: sticky; top: 82px; height: calc(100vh - 94px); min-height: 0; padding-top: 22px; display: flex; flex-direction: column; overflow: hidden; }
.paper-column-resizer { position: sticky; top: 82px; align-self: start; height: calc(100vh - 94px); cursor: col-resize; touch-action: none; outline: none; }
.paper-column-resizer::before { content: ""; position: absolute; left: 50%; top: 24px; bottom: 24px; width: 2px; border-radius: 2px; background: var(--line); transform: translateX(-50%); transition: .18s ease; }
.paper-column-resizer::after { content: "↔"; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 13px; transform: translate(-50%, -50%); transition: .18s ease; }
.paper-column-resizer:hover::before, .paper-column-resizer:focus::before, .resizing-paper-columns .paper-column-resizer::before { background: var(--teal); }
.paper-column-resizer:hover::after, .paper-column-resizer:focus::after, .resizing-paper-columns .paper-column-resizer::after { color: white; border-color: var(--teal); background: var(--teal); box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 15%, transparent); }
.resizing-paper-columns { cursor: col-resize; user-select: none; }
.aside-id { font-family: var(--serif); font-size: 70px; line-height: .9; color: var(--teal); }
.paper-aside > p { margin: 10px 0 28px; color: var(--muted); font-size: 12px; }
.paper-aside ol { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0 7px 0 0; list-style: none; border-top: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.paper-aside ol::-webkit-scrollbar { width: 5px; }
.paper-aside ol::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--line); }
.paper-aside li { border-bottom: 1px solid var(--line); }
.paper-aside li a { display: block; padding: 10px 0; color: var(--muted); font-size: 12px; }
.paper-aside li a:hover { color: var(--teal); }
.pdf-button { display: block; margin-top: 22px; padding: 11px 15px; text-align: center; color: white; background: var(--teal); border-radius: 999px; font-size: 12px; font-weight: 750; }
.paper-aside > .pdf-button { flex: 0 0 auto; margin-top: 12px; box-shadow: 0 -10px 24px var(--paper); }
.paper-article { width: 100%; max-width: 1280px; min-width: 0; }
.paper-article > section { padding: clamp(70px, 8vw, 115px) 0; border-bottom: 1px solid var(--line); }
.paper-hero { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.paper-hero h1 { margin: 20px 0 25px; font-family: var(--serif); font-size: clamp(46px, 6vw, 78px); font-weight: 500; letter-spacing: -.045em; line-height: 1.03; }
.authors { margin: 0; font-size: 16px; font-weight: 650; }
.institutions { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.tag { padding: 5px 9px; border-radius: 999px; color: var(--teal); background: rgba(11,128,121,.09); font-size: 11px; font-weight: 700; }
.tag.muted { color: var(--muted); background: var(--surface-2); }
.publication-panel {
  position: relative; margin: 18px 0 70px; padding: 22px 26px !important;
  color: #e9e7f3; background: #172231; border-top: 3px solid #efb91f !important;
  border-bottom: 3px solid #efb91f !important; box-shadow: 0 26px 70px rgba(5, 14, 23, .2);
}
.publication-panel::before { content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 2px; background: #efb91f; }
.meta-panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.meta-panel-toolbar > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.meta-panel-toolbar strong { color: white; font-size: 13px; letter-spacing: .08em; }
.meta-panel-toolbar span { color: #91a7b4; font-size: 10px; }
.meta-panel-actions { display: flex; gap: 7px; }
.meta-panel-actions button, .meta-editor-actions button { padding: 6px 10px; border: 1px solid rgba(239,185,31,.48); border-radius: 4px; color: #f6ca4a; background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.meta-panel-actions button:hover, .meta-editor-actions button:hover { color: #172231; background: #efb91f; }
.meta-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: start; padding: 5px 0; line-height: 1.62; }
.meta-row > strong { color: #e9e7f3; font-size: 14px; letter-spacing: .015em; }
.meta-row > div { min-width: 0; color: #d9d9e9; font-size: 14px; }
.meta-row small { display: block; margin-top: 2px; color: #8f9cab; font-size: 10px; }
.meta-chip-list, .code-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.meta-chip, .venue-chip, .status-chip {
  display: inline-flex; align-items: center; max-width: 100%; padding: 3px 10px; border-radius: 999px;
  color: #e8e5f0; background: #554b30; font-size: 12px; overflow-wrap: anywhere; transition: .18s ease;
}
.meta-chip:hover { color: white; background: #706039; transform: translateY(-1px); }
.institution-chip { background: #2c4850; }
.venue-chip { margin-right: 7px; background: #51482e; }
.status-chip.open { color: #b6f4e9; background: #16534d; }
.status-chip.closed { color: #bac6ce; background: #33404c; }
.code-link { color: #f1ba18; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.code-link:hover { color: #ffd35b; }
.meta-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; padding: 18px; border: 1px solid rgba(239,185,31,.36); background: rgba(4,12,20,.34); }
.meta-editor[hidden] { display: none; }
.meta-editor label { display: flex; flex-direction: column; gap: 5px; color: #9fb0ba; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.meta-editor label.wide { grid-column: 1 / -1; }
.meta-editor input, .meta-editor textarea { width: 100%; border: 1px solid rgba(255,255,255,.18); border-radius: 4px; padding: 9px 10px; color: white; background: #0d1925; outline: none; resize: vertical; font-size: 12px; }
.meta-editor input:focus, .meta-editor textarea:focus { border-color: #efb91f; box-shadow: 0 0 0 2px rgba(239,185,31,.12); }
.meta-editor-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.meta-editor-actions button[type="submit"] { color: #172231; background: #efb91f; }
.quick-recall { margin: 0 0 20px; padding: 38px !important; border: 1px solid var(--line) !important; background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 88%, var(--amber))); box-shadow: var(--shadow); }
.recall-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 25px; }
.recall-heading span { color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.recall-heading h2 { margin: 7px 0 0 !important; font-size: clamp(30px, 4vw, 45px) !important; }
.recall-heading > p { max-width: 280px; margin: 0; color: var(--muted); text-align: right; font-size: 11px; }
.recall-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.recall-item { min-height: 150px; padding: 19px; background: var(--surface); }
.recall-item > span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.recall-item > p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.memory-code { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 15px; align-items: center; margin-top: 12px; padding: 15px 18px; color: #dceae7; background: var(--navy); }
.memory-code span { color: var(--teal-2); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.memory-code strong { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.five-question-section { background: linear-gradient(150deg, transparent, color-mix(in srgb, var(--teal) 6%, transparent)); }
.five-question-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 30px; }
.five-question-grid article { min-height: 245px; padding: 22px; border: 1px solid var(--line); background: var(--surface); }
.five-question-grid span, .five-question-wide span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.five-question-grid h3 { margin: 18px 0 10px; font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.45; }
.five-question-grid p { margin: 0; color: var(--muted); font-size: 12px; }
.five-question-wide { margin-top: 10px; padding: 23px; border-left: 4px solid var(--amber); background: var(--surface); }
.five-question-wide ol { margin: 12px 0 0; padding-left: 22px; color: var(--muted); }
.five-question-wide li { padding: 5px 0 5px 7px; }
.useful-info-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; }
.useful-info-grid article { padding: 17px; border-top: 2px solid var(--teal); background: var(--surface); }
.useful-info-grid strong { font-family: var(--serif); font-size: 16px; font-weight: 500; }
.useful-info-grid p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.key-question { padding-left: clamp(18px, 4vw, 52px) !important; border-left: 4px solid var(--amber); }
.key-question h2 { margin: 18px 0 26px; font-family: var(--serif); font-size: clamp(32px, 4vw, 52px); font-weight: 500; line-height: 1.15; letter-spacing: -.03em; }
.key-question p { color: var(--muted); font-size: 16px; }
.paper-article section > h2 { margin: 12px 0 20px; font-family: var(--serif); font-size: clamp(34px, 4vw, 53px); font-weight: 500; letter-spacing: -.035em; }
.section-lead { max-width: 800px; color: var(--muted); }
.beginner-section { background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, var(--teal)), transparent); }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 30px; }
.story-grid article { min-height: 170px; padding: 22px; border: 1px solid var(--line); background: var(--surface); }
.story-grid span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.story-grid p { margin: 14px 0 0; color: var(--muted); }
.beginner-scenario { display: grid; grid-template-columns: .8fr 1.2fr; gap: 35px; margin-top: 28px; padding: 28px; color: #dceae7; background: var(--navy); }
.beginner-scenario span { color: var(--teal-2); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.beginner-scenario h3 { margin: 10px 0 0; color: white; font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.25; }
.beginner-scenario ol { margin: 0; padding-left: 22px; color: #afc4c1; }
.beginner-scenario li { padding: 5px 0 5px 7px; }
.glossary-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.glossary-grid article { padding: 18px; border-left: 3px solid var(--amber); background: var(--surface); }
.glossary-grid strong { font-family: var(--serif); font-size: 18px; }
.glossary-grid p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.learning-objectives { margin-top: 24px; padding: 22px; border: 1px dashed var(--teal); }
.learning-objectives ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.learning-objectives li { padding: 3px 0; }
.layer-stack { display: grid; gap: 8px; }
.layer-stack article { display: grid; grid-template-columns: 95px 210px minmax(0,1fr); gap: 20px; align-items: baseline; padding: 17px 20px; border: 1px solid var(--line); background: var(--surface); }
.layer-stack span { color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.layer-stack h3 { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 500; }
.layer-stack p { margin: 0; color: var(--muted); font-size: 12px; }
.model-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 9px; margin: 36px 0 26px; }
.flow-step { min-width: 0; min-height: 165px; padding: 15px; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); }
.flow-index { color: var(--teal); font-size: 10px; font-weight: 800; }
.flow-step strong { margin-top: auto; font-size: 14px; line-height: 1.35; }
.flow-step code { margin-top: 9px; color: var(--muted); white-space: normal; word-break: break-word; font-size: 11px; }
.flow-arrow { align-self: center; color: var(--amber); font-size: 19px; }
.dimension-table { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.dimension-table > div { padding: 17px; border-right: 1px solid var(--line); }
.dimension-table > div:last-child { border: 0; }
.dimension-table span, .contract-grid span, .evidence-card > span { display: block; margin-bottom: 8px; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.dimension-table strong { font-size: 12px; }
.interpretation { margin-top: 26px; padding: 26px; color: #d8e8e5; background: var(--navy); }
.interpretation h3 { margin: 0 0 12px; color: white; font-family: var(--serif); font-size: 26px; font-weight: 500; }
.interpretation p { margin: 8px 0; color: #b8cbc9; }
.deep-block { margin-top: 48px; }
.subheading { display: flex; align-items: baseline; gap: 14px; margin: 44px 0 18px; }
.subheading > span { color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.subheading h3 { margin: 0; font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -.02em; }
.detail-copy { color: var(--muted); }
.compact-table table { min-width: 760px; }
.compact-table td:first-child { color: var(--teal); font-weight: 800; }
.compact-table code { white-space: normal; color: var(--ink); font-size: 11px; }
.analysis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 18px; border: 1px solid var(--line); background: var(--line); }
.analysis-grid article { padding: 20px; background: var(--surface); }
.analysis-grid span, .validity-grid span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.analysis-grid p, .validity-grid p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.concept-columns { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.concept-columns article { padding: 17px; border-top: 2px solid var(--teal); background: var(--surface); }
.concept-columns strong { font-family: var(--serif); font-size: 17px; }
.concept-columns p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.worked-example { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 24px; margin-top: 16px; padding: 22px; border: 1px solid var(--line); }
.worked-example > span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.worked-example ol { margin: 0; padding-left: 20px; color: var(--muted); }
.worked-example li { padding: 5px 0; }
.dimension-warning { margin-top: 15px; padding: 18px 20px; border-left: 3px solid var(--amber); background: rgba(220,139,60,.08); }
.dimension-warning p { margin: 5px 0 0; color: var(--muted); }
.coordinate-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.coordinate-grid article { padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.coordinate-grid strong { font-family: var(--serif); font-size: 18px; }
.coordinate-grid p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.toy-pose { margin-top: 13px; padding: 19px 22px; border-left: 4px solid var(--teal); background: color-mix(in srgb, var(--teal) 8%, transparent); }
.toy-pose span { color: var(--teal); font-size: 10px; font-weight: 800; }
.toy-pose p { margin: 7px 0 0; color: var(--muted); }
.loss-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; padding: 0; list-style: none; }
.loss-list li { padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.loss-list strong { display: block; font-size: 13px; }
.loss-list span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.inference-trace { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--teal); }
.inference-trace li { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 15px; padding: 12px 0 12px 22px; }
.inference-trace li > span { color: var(--amber); font-family: var(--serif); font-size: 20px; }
.inference-trace strong { font-size: 13px; }
.inference-trace p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.cost-ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 22px; border: 1px solid var(--line); background: var(--line); }
.cost-ledger > div { min-height: 120px; padding: 18px; background: var(--surface); }
.cost-ledger span { display: block; margin-bottom: 9px; color: var(--teal); font-size: 10px; font-weight: 800; }
.cost-ledger strong { font-size: 13px; }
.lesson-steps { margin: 0; padding: 0; list-style: none; }
.lesson-steps li { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.lesson-steps li > span { color: var(--amber); font-family: var(--serif); font-size: 23px; }
.lesson-steps strong { font-size: 14px; }
.lesson-steps p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.debug-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 20px; }
.debug-grid article { padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.debug-grid p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.math-lessons { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.math-lessons article { padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.math-lessons span { color: var(--teal); font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.equation-scope { max-width: 950px; margin: 0 0 18px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.math-lessons .paper-specific-equation { grid-column: 1 / -1; padding: 24px; border-top: 3px solid var(--amber); background: linear-gradient(135deg, rgba(220,139,60,.10), var(--surface) 58%); }
.paper-specific-equation h4 { margin: 9px 0 0; color: var(--ink); font-family: var(--serif); font-size: 20px; }
.math-lessons .paper-specific-equation code { overflow-wrap: anywhere; color: var(--amber-dark); font-size: clamp(18px, 1.4vw, 24px); line-height: 1.55; }
.math-lessons code { display: block; margin: 12px 0; color: var(--ink); font-family: Georgia, serif; font-size: 18px; white-space: normal; }
.math-display { width: 100%; max-width: 100%; min-width: 0; margin: 12px 0; overflow: visible; }
.math-display .katex-display { width: 100%; min-width: 0; margin: 0; padding: 6px 2px; text-align: center; white-space: normal; }
.math-display .katex-display > .katex { max-width: 100%; }
.math-display .katex { color: inherit; font-size: 1.18em; line-height: 1.4; }
.math-display.math-multiline .katex-display { padding-top: 10px; padding-bottom: 10px; }
.math-fallback { display: block; padding: 12px; overflow-wrap: anywhere; white-space: normal; font-family: Consolas, monospace; font-size: 16px; }
.math-render-error { border: 1px solid #b94b48; color: #9f312e; }
.math-lessons .math-display { min-height: 74px; padding: 17px 14px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 64%, transparent); }
.math-lessons .paper-specific-equation .math-display { min-height: 94px; color: var(--amber-dark); background: color-mix(in srgb, var(--amber) 7%, var(--paper)); }
.math-lessons p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.paper-loss-contract { margin-top: 12px; padding: 17px 20px; border: 1px solid var(--line); background: var(--paper); }
.paper-loss-contract strong { color: var(--teal); font-size: 14px; letter-spacing: .05em; }
.paper-loss-contract p { margin: 6px 0 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.gradient-story { margin-top: 14px; padding: 20px; border-left: 3px solid var(--amber); background: rgba(220,139,60,.08); }
.gradient-story p { margin: 6px 0 0; color: var(--muted); }
.contract-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 30px; border: 1px solid var(--line); background: var(--line); }
.contract-grid > div { min-height: 130px; padding: 20px; background: var(--surface); }
.contract-grid strong { font-size: 14px; }
.callout { margin-top: 20px; padding: 20px; border-left: 3px solid var(--amber); background: rgba(220,139,60,.08); }
.callout p { margin: 6px 0 0; color: var(--muted); }
.dataset-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.dataset-pill { padding: 7px 11px; border: 1px solid var(--teal); color: var(--teal); border-radius: 4px; font-size: 11px; font-weight: 750; }
.dataset-pill:hover { color: white; background: var(--teal); }
.dataset-audit-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.dataset-audit-card { padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.dataset-audit-card > a { color: var(--teal); font-family: var(--serif); font-size: 20px; font-weight: 650; }
.dataset-audit-card dl { margin: 15px 0 0; }
.dataset-audit-card dl > div { display: grid; grid-template-columns: 78px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.dataset-audit-card dt { color: var(--muted); font-size: 10px; font-weight: 800; }
.dataset-audit-card dd { margin: 0; font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.metric-grid article { min-height: 190px; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.metric-grid span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.metric-grid strong { display: block; margin: 14px 0 8px; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.metric-grid p { margin: 0; color: var(--muted); font-size: 11px; }
.result-reading { margin-top: 18px; padding: 24px; color: #d8e8e5; background: var(--navy); }
.result-reading > span { color: var(--teal-2); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.result-reading h3 { margin: 8px 0; color: white; font-family: var(--serif); font-size: 25px; font-weight: 500; }
.result-reading p { margin: 0; color: #b8cbc9; }
.comparison-checklist { margin-top: 16px; padding: 20px; border: 1px solid var(--line); }
.comparison-checklist ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.experiment-questions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.experiment-questions article { min-height: 170px; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.experiment-questions span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .07em; }
.experiment-questions p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.hypothesis-box { margin-top: 14px; padding: 21px; color: #d8e8e5; background: var(--navy); }
.hypothesis-box p { margin: 6px 0 0; color: #b8cbc9; }
.evidence-card { padding: 28px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.evidence-card h3 { margin: 8px 0 12px; font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.25; }
.evidence-card p { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 34px; }
.two-col h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.two-col p { color: var(--muted); }
.quote-block { padding: 24px 28px; border-left: 4px solid var(--teal); background: var(--surface); }
.quote-block span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.quote-block p { margin: 10px 0 0; font-family: var(--serif); font-size: 20px; line-height: 1.6; }
.question-list { padding: 0; margin: 28px 0 0; list-style: none; counter-reset: q; }
.question-list li { position: relative; padding: 16px 0 16px 45px; border-bottom: 1px solid var(--line); color: var(--muted); }
.question-list li::before { counter-increment: q; content: "0" counter(q); position: absolute; left: 0; color: var(--amber); font-weight: 800; }
.validity-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.validity-grid article { padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.deep-block h4 { margin: 30px 0 12px; font-family: var(--serif); font-size: 23px; font-weight: 500; }
.ablation-list { margin: 0; padding-left: 22px; color: var(--muted); }
.ablation-list li { padding: 6px 0 6px 6px; }
.faq-list details { margin-top: 8px; }
.faq-list summary { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.faq-list p { margin: 12px 0 0; color: var(--muted); }
.failure-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.failure-grid article { padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.failure-grid strong { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.failure-grid p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 25px 0; }
.check-grid label { padding: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; }
.check-grid input { accent-color: var(--teal); }
.repro-notes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.repro-notes article { padding: 18px; border-top: 2px solid var(--teal); background: var(--surface); }
.repro-notes p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.path-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.path-grid article { padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.path-grid span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.path-grid h4 { margin: 8px 0; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.path-grid p { margin: 0; color: var(--muted); font-size: 12px; }
.takeaway { margin-top: 18px; padding: 25px; border: 2px solid var(--teal); }
.takeaway span { display: block; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.takeaway strong { display: block; margin-top: 5px; font-family: var(--serif); font-size: 31px; }
.takeaway p { margin: 7px 0 0; color: var(--muted); }
.deployment-table { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.deployment-table > div { padding: 18px; background: var(--surface); }
.deployment-table span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.deployment-table p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.exercise-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.exercise-list article { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.exercise-list article > span { color: var(--amber); font-family: var(--serif); font-size: 22px; }
.exercise-list p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.related-comparison a { color: var(--teal); }
details { margin-top: 24px; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
summary { cursor: pointer; font-weight: 700; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-card { min-height: 145px; padding: 17px; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); transition: .2s; }
.related-card:hover { transform: translateY(-3px); border-color: var(--teal); }
.related-card span, .related-card small { color: var(--muted); font-size: 10px; }
.related-card strong { margin: auto 0; font-family: var(--serif); font-size: 19px; }
.prev-next { display: flex; justify-content: space-between; gap: 20px; padding: 32px 0 80px; font-size: 12px; font-weight: 750; }
.prev-next a:hover { color: var(--teal); }

.source-paper-figure { margin: 20px 0 30px; padding: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.source-paper-figure > a { display: block; padding: 12px; text-align: center; background: white; overflow: auto; }
.source-paper-figure img { display: block; width: auto; max-width: 100%; max-height: 760px; margin: 0 auto; object-fit: contain; }
.source-paper-figure figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 16px 2px 10px; border-bottom: 1px solid var(--line); }
.source-paper-figure figcaption div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.source-paper-figure figcaption strong { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.source-paper-figure figcaption span { color: var(--muted); overflow-wrap: anywhere; }
.source-paper-figure figcaption a { flex: none; color: var(--teal); font-weight: 750; }
.source-paper-figure > p { margin: 12px 2px 0; color: var(--muted); }
.formula-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.formula-grid article { min-width: 0; padding: 22px; border-top: 3px solid var(--teal); background: var(--surface); }
.formula-grid article > span { color: var(--amber); font-weight: 800; letter-spacing: .1em; }
.formula-grid h4 { margin: 12px 0 10px; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.formula-grid code { display: block; min-height: 76px; padding: 17px 13px; color: #e4f1ee; background: var(--navy); white-space: normal; overflow-wrap: anywhere; font-family: Cambria, Georgia, serif; font-size: 17px; line-height: 1.55; }
.formula-grid .math-display { min-height: 112px; padding: 20px 18px; display: flex; align-items: center; justify-content: center; color: #e4f1ee; background: var(--navy); }
.formula-grid p { margin: 13px 0 0; color: var(--muted); }
.formula-symbols { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; padding: 17px; border: 1px dashed var(--teal); }
.formula-symbols strong { width: 100%; font-family: var(--serif); font-size: 18px; }
.formula-symbols span { padding: 4px 8px; border-radius: 4px; color: var(--muted); background: color-mix(in srgb, var(--teal) 8%, transparent); }

/* Reader-size controls keep explanatory text comfortably legible. */
.paper-page .paper-article p,
.paper-page .paper-article li,
.paper-page .paper-article dd,
.paper-page .paper-article td { font-size: calc(17px * var(--reader-scale)); line-height: 1.78; }
.paper-page .paper-article article > span,
.paper-page .paper-article .section-kicker,
.paper-page .paper-article .subheading > span,
.paper-page .paper-article .dimension-table span,
.paper-page .paper-article .contract-grid span,
.paper-page .paper-article .evidence-card > span { font-size: calc(13px * var(--reader-scale)); }
.paper-page .paper-article code { font-size: calc(15px * var(--reader-scale)); }
.paper-page .paper-article .formula-grid code { font-size: calc(18px * var(--reader-scale)); }
.paper-page .paper-article .math-lessons code { font-size: calc(19px * var(--reader-scale)); }
.paper-page .paper-article .math-lessons .paper-specific-equation code { font-size: calc(22px * var(--reader-scale)); }
.paper-page .paper-article .paper-specific-equation h4 { font-size: calc(22px * var(--reader-scale)); }
.paper-page .paper-article .formula-grid .math-display .katex { font-size: calc(1.48em * var(--reader-scale)); }
.paper-page .paper-article .math-lessons .math-display .katex { font-size: calc(1.55em * var(--reader-scale)); }
.paper-page .paper-article .paper-specific-equation .math-display .katex { font-size: calc(1.72em * var(--reader-scale)); }
.paper-page .paper-article .dimension-table strong,
.paper-page .paper-article .contract-grid strong,
.paper-page .paper-article .loss-list strong,
.paper-page .paper-article .inference-trace strong,
.paper-page .paper-article .cost-ledger strong { font-size: calc(16px * var(--reader-scale)); }
.paper-page .paper-article .loss-list span,
.paper-page .paper-article .cost-ledger span,
.paper-page .paper-article .dataset-audit-card dt,
.paper-page .paper-article .result-reading > span,
.paper-page .paper-article .quote-block span,
.paper-page .paper-article .takeaway span,
.paper-page .paper-article .deployment-table span,
.paper-page .paper-article .memory-code span,
.paper-page .paper-article .related-card span,
.paper-page .paper-article .related-card small { font-size: calc(13px * var(--reader-scale)); }
.paper-page .paper-article .check-grid label { font-size: calc(16px * var(--reader-scale)); line-height: 1.65; }
.paper-page .paper-article .tag { font-size: calc(13px * var(--reader-scale)); }
.paper-page .paper-article .hero-actions a { font-size: calc(14px * var(--reader-scale)); }
.paper-page .paper-article .flow-step strong,
.paper-page .paper-article .glossary-grid strong,
.paper-page .paper-article .coordinate-grid strong,
.paper-page .paper-article .useful-info-grid strong,
.paper-page .paper-article .memory-code strong,
.paper-page .paper-article .failure-grid strong,
.paper-page .paper-article .related-card strong { font-size: calc(18px * var(--reader-scale)); }
.paper-page .paper-article .formula-grid h4 { font-size: calc(20px * var(--reader-scale)); }
.paper-page .meta-row > strong,
.paper-page .meta-row > div { font-size: calc(15px * var(--reader-scale)); }
.paper-page .meta-chip,
.paper-page .venue-chip,
.paper-page .status-chip { font-size: calc(13px * var(--reader-scale)); }
.paper-page .meta-row small,
.paper-page .meta-panel-toolbar span,
.paper-page .meta-editor label { font-size: calc(12px * var(--reader-scale)); }
.paper-page .meta-panel-toolbar strong { font-size: calc(14px * var(--reader-scale)); }
.paper-page .meta-panel-actions button,
.paper-page .meta-editor-actions button { font-size: calc(12px * var(--reader-scale)); }
.paper-page .meta-editor input,
.paper-page .meta-editor textarea { font-size: calc(14px * var(--reader-scale)); }
.paper-page .paper-aside > p,
.paper-page .paper-aside li a,
.paper-page .paper-aside .pdf-button { font-size: calc(14px * var(--reader-scale)); }

/* 47-paper one-page recall index */
.recall-page-hero { min-height: 68vh; padding: clamp(90px, 12vw, 170px) clamp(24px, 8vw, 125px); display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 75% 25%, rgba(54,185,168,.16), transparent 30%), radial-gradient(circle at 20% 82%, rgba(220,139,60,.13), transparent 26%); }
.recall-page-hero h1 { margin: 18px 0 25px; font-family: var(--serif); font-size: clamp(56px, 8vw, 105px); font-weight: 500; line-height: .98; letter-spacing: -.05em; }
.recall-page-hero h1 em { color: var(--teal); font-style: italic; }
.recall-page-hero > p { max-width: 800px; margin: 0; color: var(--muted); font-size: 18px; }
.all-recalls { padding: clamp(75px, 9vw, 135px) clamp(20px, 5vw, 78px); }
.recall-search-panel { position: sticky; top: 72px; z-index: 20; padding: 18px 0; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(15px); }
.recall-search-panel label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.recall-search-panel input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0 13px; outline: 0; color: var(--ink); background: transparent; font-family: var(--serif); font-size: clamp(24px, 3vw, 37px); }
.recall-search-panel input:focus { border-color: var(--teal); }
.recall-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.recall-filter { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); cursor: pointer; font-size: 11px; }
.recall-filter span { color: var(--muted); margin-left: 4px; }
.recall-filter.active { color: white; border-color: var(--navy); background: var(--navy); }
.recall-index-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; margin-top: 25px; }
.recall-index-card { padding: 25px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 12px 35px rgba(9,31,41,.06); }
.recall-index-card[hidden] { display: none; }
.recall-index-card > header { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .07em; }
.recall-index-card > header > div { display: flex; flex-direction: column; }
.recall-index-card > header strong { color: var(--teal); font-size: 10px; }
.recall-index-card h2 { margin: 26px 0 4px; font-family: var(--serif); font-size: 36px; font-weight: 500; letter-spacing: -.03em; }
.recall-full-title { min-height: 48px; margin: 0; color: var(--muted); font-size: 12px; }
.recall-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 15px 0; }
.recall-tags span { padding: 3px 7px; border-radius: 4px; color: var(--teal); background: rgba(11,128,121,.09); font-size: 9px; font-weight: 750; }
.recall-summary-line { margin: 17px 0; padding: 18px; color: #d7e7e4; background: var(--navy); }
.recall-summary-line span { color: var(--teal-2); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.recall-summary-line p { margin: 7px 0 0; font-family: var(--serif); font-size: 16px; }
.recall-index-card dl { margin: 0; }
.recall-index-card dl > div { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.recall-index-card dt { color: var(--teal); font-size: 9px; font-weight: 800; }
.recall-index-card dd { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.recall-index-card footer { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.recall-index-card footer a { font-size: 11px; font-weight: 750; }
.recall-index-card footer .primary { padding: 8px 13px; }

/* Long-form survey */
.survey-shell { max-width: 1540px; margin: 0 auto; padding: 72px 40px 100px; display: grid; grid-template-columns: 280px minmax(0, 980px); gap: clamp(45px, 7vw, 110px); }
.survey-toc { position: sticky; top: 104px; height: calc(100vh - 125px); padding: 42px 12px 20px 0; overflow: auto; }
.survey-toc > div { display: flex; flex-direction: column; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.survey-toc > div span { color: var(--teal); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.survey-toc > div strong { font-family: var(--serif); font-size: 27px; font-weight: 500; }
.survey-toc ul { margin: 12px 0; padding: 0; list-style: none; }
.survey-toc ul ul { margin: 2px 0 7px 12px; }
.survey-toc a { display: block; padding: 4px 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.survey-toc a:hover { color: var(--teal); }
.survey-toc .pdf-button { color: white; }
.survey-hero { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 70px 0; border-bottom: 1px solid var(--line); }
.survey-hero h1 { margin: 18px 0 24px; font-family: var(--serif); font-size: clamp(46px, 6vw, 76px); font-weight: 500; letter-spacing: -.045em; line-height: 1.02; }
.survey-hero h1 em { display: block; color: var(--teal); font-style: italic; }
.survey-hero p { max-width: 730px; color: var(--muted); font-size: 17px; }
.survey-body { padding-top: 30px; }
.survey-body > h1 { margin: 80px 0 24px; padding-top: 22px; border-top: 3px solid var(--navy); font-family: var(--serif); font-size: clamp(38px, 5vw, 58px); font-weight: 500; letter-spacing: -.035em; }
.survey-body > h1:first-child { margin-top: 30px; }
.survey-body h2 { margin: 52px 0 16px; font-family: var(--serif); font-size: 31px; font-weight: 500; }
.survey-body h3 { margin: 35px 0 12px; font-family: var(--serif); font-size: 23px; font-weight: 500; }
.survey-body p, .survey-body li { color: var(--muted); }
.survey-body blockquote { margin: 22px 0; padding: 18px 24px; border-left: 4px solid var(--amber); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.survey-body blockquote p { margin: 0; }
.survey-body table { min-width: 760px; }
.survey-body pre, .survey-body code { white-space: pre-wrap; overflow-wrap: anywhere; }
.survey-body pre { padding: 18px; color: #d9ece8; background: var(--navy); }
.survey-body a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.survey-pagebreak { margin: 80px 0; border: 0; border-top: 1px dashed var(--line); }
.survey-paper-index { margin-top: 90px; padding-top: 35px; border-top: 3px solid var(--teal); }
.survey-paper-index > span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.survey-paper-index h2 { margin: 6px 0 25px; font-family: var(--serif); font-size: 42px; font-weight: 500; }
.survey-paper-index > div { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.survey-paper-index a { min-height: 95px; padding: 13px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); background: var(--surface); }
.survey-paper-index a:hover { border-color: var(--teal); }
.survey-paper-index span { color: var(--muted); font-size: 9px; }
.survey-paper-index strong { font-family: var(--serif); font-size: 16px; }

@media (min-width: 1051px) and (max-height: 820px) {
  .paper-aside { top: 76px; height: calc(100vh - 82px); padding-top: 10px; }
  .aside-id { font-size: 48px; }
  .paper-aside > p { margin: 5px 0 12px; }
  .paper-page .paper-aside li a { padding: 6px 0; font-size: calc(13px * var(--reader-scale)); }
  .paper-aside > .pdf-button { margin-top: 8px; padding-block: 8px; }
  .paper-column-resizer { top: 76px; height: calc(100vh - 82px); }
}

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; }
  .hero-metrics { max-width: 650px; }
  .paper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taxonomy-grid, .network-reading { grid-template-columns: repeat(2, 1fr); }
  .era-grid, .comparison-grid { grid-template-columns: 1fr 1fr; }
  .concept-columns, .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .experiment-questions { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .useful-info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .paper-grid.list-view .paper-card { grid-template-columns: 72px minmax(140px,.45fr) minmax(220px,1fr) 125px; gap: 10px 15px; }
  .paper-shell { grid-template-columns: 1fr; padding-inline: 28px; }
  .paper-aside, .paper-column-resizer { display: none; }
  .survey-shell { grid-template-columns: 1fr; padding-inline: 28px; }
  .survey-toc { display: none; }
}

@media (max-width: 720px) {
  .site-nav nav, .paper-top nav { display: none; }
  .hero { padding-inline: 20px; }
  .hero h1 { font-size: 53px; }
  .thesis { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .paper-grid, .taxonomy-grid, .network-reading, .era-grid, .comparison-grid, .two-col, .check-grid, .related-grid, .analysis-grid, .loss-list, .cost-ledger, .dataset-audit-grid, .validity-grid, .repro-notes, .survey-paper-index > div, .story-grid, .glossary-grid, .concept-columns, .debug-grid, .metric-grid, .path-grid, .coordinate-grid, .math-lessons, .formula-grid, .experiment-questions, .failure-grid, .deployment-table, .exercise-list, .five-question-grid, .useful-info-grid, .recall-index-grid { grid-template-columns: 1fr; }
  .paper-card { min-height: 290px; }
  .model-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
  .dimension-table, .contract-grid { grid-template-columns: 1fr; }
  .dimension-table > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .paper-shell { padding-inline: 20px; }
  .paper-hero h1 { font-size: 43px; }
  .publication-panel { padding-inline: 18px !important; }
  .source-paper-figure { padding: 10px; }
  .source-paper-figure figcaption { flex-direction: column; gap: 8px; }
  .meta-row { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; }
  .meta-panel-toolbar { align-items: flex-start; flex-direction: column; }
  .meta-panel-toolbar > div:first-child { align-items: flex-start; flex-direction: column; gap: 2px; }
  .meta-editor { grid-template-columns: 1fr; }
  .meta-editor label.wide, .meta-editor-actions { grid-column: 1; }
  .list-controls { flex-direction: column; gap: 4px; }
  .view-sort-controls { width: 100%; align-items: stretch; flex-direction: column; }
  .view-toggle { align-self: flex-start; }
  .sort-control { width: 100%; min-width: 0; }
  .quick-recall { padding: 24px !important; }
  .recall-heading { align-items: flex-start; flex-direction: column; }
  .recall-heading > p { text-align: left; }
  .recall-grid, .memory-code { grid-template-columns: 1fr; }
  .paper-grid.list-view .paper-card { min-height: 290px; display: flex; gap: 0; padding: 25px; }
  .paper-grid.list-view .card-top, .paper-grid.list-view .paper-card h3, .paper-grid.list-view .paper-card > p, .paper-grid.list-view .mini-tags, .paper-grid.list-view .paper-card footer { grid-column: auto; grid-row: auto; }
  .paper-grid.list-view .card-top { align-self: auto; flex-direction: row; justify-content: space-between; }
  .paper-grid.list-view .paper-card h3 { margin: 36px 0 14px; font-size: 29px; }
  .paper-grid.list-view .mini-tags { margin-top: auto; padding-top: 24px; }
  .paper-grid.list-view .paper-card footer { margin-top: 17px; padding: 14px 0 0; flex-direction: row; align-items: center; justify-content: space-between; border-left: 0; border-top: 1px solid var(--line); }
  .beginner-scenario, .worked-example { grid-template-columns: 1fr; }
  .layer-stack article { grid-template-columns: 1fr; gap: 5px; }
  .roadmap-stop { grid-template-columns: 52px minmax(0,1fr); gap: 17px; }
  .roadmap-number { width: 52px; height: 52px; font-size: 17px; }
  .roadmap-track::before { left: 25px; }
  .survey-shell { padding-inline: 20px; }
  .site-footer { flex-direction: column; }
}

@media print {
  .site-nav, .paper-top, .paper-aside, .paper-column-resizer, .hero-actions, .reading-progress, .graph-tabs, .meta-panel-toolbar, .meta-editor, .survey-toc { display: none !important; }
  body { background: white; color: #111; }
  .paper-shell { display: block; padding: 0; }
  .paper-article > section { break-inside: avoid; }
  .interpretation { color: #111; background: #eee; }
}
