@scope (.visual-paper) {
:scope {
  color-scheme: light;
  --page: #ffffff;
  --surface: #ffffff;
  --wash: #f6f6f4;
  --map: #f6f6f4;
  --map-dot: #e3e2de;
  --ink: #1b1b1b;
  --muted: #62625e;
  --faint: #767670;
  --line: #e3e2de;
  --line-strong: #c8c8c2;
  --teal: #1f4f8f;
  --teal-dark: #173c70;
  --teal-wash: #e9eef6;
  --teal-line: #a9bedb;
  --amber: #8b541c;
  --amber-wash: #faf0dc;
  --amber-line: #dac398;
  --badge-green: #285d44;
  --badge-green-wash: #e5efe5;
  --edge: #a5b5c8;
  --edge-active: #1f4f8f;
  --outside: #f0f2f5;
  --white: #ffffff;
  --shadow: 0 16px 55px #202c2524;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, sans-serif;
  --mono: 'Source Code Pro', monospace;
  --page-gutter: clamp(22px, 3.6vw, 64px);
}
.badge.source-changed, .badge.unresolved { color: var(--amber); background: var(--amber-wash); border-color: var(--amber-line); }
:scope[data-theme="dark"] {
  color-scheme: dark;
  --page: #141414;
  --surface: #1c1c1b;
  --wash: #252524;
  --map: #181818;
  --map-dot: #343432;
  --ink: #e7e6e2;
  --muted: #a3a29c;
  --faint: #999892;
  --line: #2e2e2c;
  --line-strong: #555550;
  --teal: #8fb4ea;
  --teal-dark: #b6d0f4;
  --teal-wash: #1c2533;
  --teal-line: #536f98;
  --amber: #ebba78;
  --amber-wash: #382f21;
  --amber-line: #795d35;
  --badge-green: #b9dfbf;
  --badge-green-wash: #2b4235;
  --edge: #64778e;
  --edge-active: #8fb4ea;
  --outside: #252a31;
  --white: #141414;
  --shadow: 0 16px 55px #05090680;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: var(--page); color: var(--ink); font: 14px/1.45 var(--sans); }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .38; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
a { color: var(--teal); text-decoration-color: var(--teal-line); text-underline-offset: .22em; }
a:hover { color: var(--teal-dark); text-decoration-color: currentColor; }
[hidden] { display: none !important; }
.sr-only, .svg-definitions { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 20; padding: 10px 14px; background: var(--surface); }
.skip-link:focus { top: 10px; }
.icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); width: 32px; height: 32px; border-radius: 5px; padding: 0; flex: none; }
.icon-button:hover:not(:disabled), .icon-button[aria-pressed="true"] { background: var(--teal-wash); color: var(--teal-dark); }

.masthead { height: 63px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 var(--page-gutter); }
.wordmark { color: var(--ink); display: inline-flex; align-items: center; gap: 10px; justify-self: start; text-decoration: none; font: 600 21px/1 var(--serif); white-space: nowrap; letter-spacing: -.035em; }
.wordmark-icon { width: 30px; height: 30px; }
.wordmark-icon rect { fill: var(--teal); }
.wordmark-icon path { fill: none; stroke: var(--white); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.primary-nav { display: flex; align-items: stretch; height: 100%; gap: clamp(14px, 2.1vw, 34px); }
.primary-nav a, .primary-nav button { position: relative; display: flex; align-items: center; background: transparent; border: 0; padding: 0 2px; text-decoration: none; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 570; }
.primary-nav [aria-current="page"] { color: var(--teal-dark); font-weight: 700; }
.primary-nav [aria-current="page"]::after { content: ''; height: 2px; left: 1px; right: 1px; position: absolute; bottom: -1px; background: var(--teal); }
.primary-nav a:hover, .primary-nav button:hover { color: var(--teal); }
.header-tools { display: flex; align-items: center; justify-self: end; gap: 9px; }
.search-trigger, .subtle-button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.search-trigger:hover, .subtle-button:hover, .subtle-button[aria-pressed="true"] { color: var(--teal-dark); border-color: var(--teal-line); background: var(--teal-wash); }
.search-trigger .icon { width: 15px; }
kbd { border: 1px solid var(--line); padding: 1px 5px; border-radius: 3px; font: 11px var(--mono); color: var(--faint); background: var(--page); }

#main { height: calc(100% - 63px); min-height: 0; display: flex; flex-direction: column; padding: 0 var(--page-gutter); }
.hero { display: grid; grid-template-columns: minmax(0, 2.8fr) minmax(215px, 1fr); gap: 32px; align-items: end; padding: clamp(23px, 3.6vh, 47px) 0 clamp(22px, 3.2vh, 38px); flex: none; }
.overline { color: var(--teal); display: flex; align-items: center; gap: 9px; font-size: 10px; font-weight: 780; letter-spacing: .19em; }
.status-dot { width: 6px; height: 6px; display: inline-block; background: var(--teal); border-radius: 50%; flex: none; }
.hero-preview { margin-left: 3px; color: var(--faint); border-left: 1px solid var(--line-strong); padding-left: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { font: 500 clamp(34px, 4.2vw, 66px)/1.005 var(--serif); letter-spacing: -.057em; margin: 10px 0 14px; max-width: 17em; text-wrap: balance; }
.authors { margin: 0; color: var(--muted); font-size: clamp(12px, 1.15vw, 15px); letter-spacing: .005em; }
.authors .author-year { margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line-strong); color: var(--faint); }
.hero-aside { border-left: 1px solid var(--line-strong); padding: 3px 0 2px 17px; margin-bottom: 1px; align-self: end; }
.hero-aside p { max-width: 33ch; color: var(--muted); margin-bottom: 13px; font-size: clamp(12px, 1.04vw, 14px); }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hero-links a, .source-link { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 650; text-decoration: none; }
.hero-links a:hover, .source-link:hover { text-decoration: underline; }
.hero-links .icon, .source-link .icon { width: 13px; height: 13px; }

.workspace { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.workspace-head { border-top: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; min-height: 56px; flex: none; }
.workspace-title, .workspace-tools { display: flex; align-items: center; gap: 12px; }
.workspace-index { color: var(--teal); font: 11px/1 var(--mono); font-weight: 700; border: 1px solid var(--teal-line); padding: 5px; border-radius: 4px; }
.workspace-title h2 { font: 500 25px/1 var(--serif); letter-spacing: -.035em; margin: 0; white-space: nowrap; }
.map-stats { border-left: 1px solid var(--line); padding-left: 12px; color: var(--faint); font-size: 11px; font-weight: 600; white-space: nowrap; }
.workspace-tools { gap: 8px; }
.section-filter { position: relative; }
.section-filter select { max-width: min(32vw, 220px); height: 34px; appearance: none; padding: 0 28px 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.section-filter .icon { width: 13px; height: 13px; position: absolute; right: 8px; top: 10px; pointer-events: none; }
.workspace-panes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, var(--split, 54fr)) 9px minmax(0, var(--reader-split, 46fr)); }
.map-pane, .reader-pane { min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.graph-toolbar, .reader-toolbar { display: flex; flex: none; align-items: center; justify-content: space-between; min-height: 47px; padding: 5px 11px; gap: 9px; border-bottom: 1px solid var(--line); }
.graph-toolbar { justify-content: flex-start; }
.segmented { display: inline-flex; gap: 2px; background: var(--wash); padding: 3px; border-radius: 6px; flex: none; }
.segmented button, .mobile-tabs button { border: 1px solid transparent; border-radius: 4px; padding: 4px 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 650; }
.segmented button:hover { color: var(--teal-dark); }
.segmented button[aria-pressed="true"], .mobile-tabs button[aria-pressed="true"] { color: var(--teal-dark); border-color: var(--line); background: var(--surface); }
.graph-scope { color: var(--faint); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.text-button { border: 0; padding: 4px; background: transparent; color: var(--teal); text-underline-offset: .2em; font-size: 12px; font-weight: 650; }
.text-button:hover { text-decoration: underline; }
.graph-body { flex: 1; position: relative; min-height: 0; background-color: var(--map); background-image: radial-gradient(circle, var(--map-dot) .7px, transparent .8px); background-size: 17px 17px; overflow: hidden; }
#graph { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#graph:active { cursor: grabbing; }
.graph-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--muted); pointer-events: none; }
.graph-controls { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px #1b241812; }
.graph-controls button { display: grid; place-items: center; color: var(--muted); padding: 0; width: 31px; height: 30px; background: transparent; border: 0; }
.graph-controls button + button { border-top: 1px solid var(--line); }
.graph-controls button:hover { background: var(--teal-wash); color: var(--teal-dark); }
.graph-controls button:focus-visible { outline-offset: -3px; }
.graph-controls .icon { width: 15px; height: 15px; }
.graph-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; padding: 7px 12px; min-height: 33px; flex: none; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.graph-legend > span, .external-control { display: inline-flex; align-items: center; gap: 6px; }
.legend-edge svg { width: 22px; height: 11px; fill: none; stroke: var(--teal); stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.legend-formalized .icon { width: 12px; height: 12px; stroke: var(--badge-green); stroke-width: 2.5; }
.legend-partial > span { color: var(--amber); line-height: 1; }
.correction-dot { height: 7px; width: 7px; border-radius: 50%; background: var(--amber); display: inline-block; }
.external-control { margin-left: auto; cursor: pointer; }
.external-control input { accent-color: var(--teal); margin: 0; }
.splitter { background: transparent; cursor: col-resize; touch-action: none; align-self: stretch; display: grid; place-items: center; }
.splitter::before { content: ''; width: 2px; height: 27px; border-radius: 4px; background: var(--line-strong); opacity: .65; }
.splitter:hover::before, .splitter:focus-visible::before { opacity: 1; background: var(--teal); }
.dragging { cursor: col-resize; user-select: none; }
.workspace-panes.is-reading, .workspace-panes.is-expanded { grid-template-columns: minmax(0, 1fr); }
.workspace-panes.is-reading .map-pane, .workspace-panes.is-reading .splitter,
.workspace-panes.is-expanded .reader-pane, .workspace-panes.is-expanded .splitter { display: none; }

.proof-outline { display: none; position: absolute; inset: 0; overflow: auto; padding: 12px 15px; background: var(--surface); }
.is-outline .proof-outline { display: block; }
.is-outline #graph, .is-outline .graph-controls, .is-outline .graph-empty { visibility: hidden; }
.outline-group { border-bottom: 1px solid var(--line); padding: 7px 0; }
.outline-group > summary { color: var(--teal); font-weight: 700; cursor: pointer; }
.outline-list { list-style: none; padding: 0; margin: 0; }
.outline-group .outline-list { margin: 6px 0 0 12px; }
.outline-list li + li { margin-top: 2px; }
.outline-result { display: flex; gap: 9px; justify-content: space-between; text-align: left; align-items: baseline; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 5px; background: transparent; }
.outline-result:hover, .outline-result[aria-current="true"] { border-color: var(--teal-line); background: var(--teal-wash); }
.outline-result strong { display: block; font: 500 15px var(--serif); }
.outline-result span { color: var(--muted); font: 10px var(--mono); white-space: nowrap; }

.reader-toolbar { padding-left: 10px; }
.reader-back, .reader-size { display: flex; gap: 2px; align-items: center; min-width: 0; }
.reader-back .icon-button { width: 26px; }
#reader-section { border-left: 1px solid var(--line); padding-left: 9px; margin-left: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--faint); font-size: 11px; font-weight: 600; }
.reader-size button { border: 0; border-radius: 4px; background: transparent; color: var(--muted); padding: 4px 6px; font-size: 12px; font-weight: 650; }
.reader-size button:hover:not(:disabled) { color: var(--teal); background: var(--teal-wash); }
.reader-pane { --reading-size: 16px; }
.reader-content { flex: 1; min-height: 0; overflow: auto; padding: 22px clamp(18px, 2.2vw, 38px) 33px; font: var(--reading-size)/1.58 var(--serif); scroll-behavior: smooth; scrollbar-color: var(--line-strong) transparent; }
.result-inner { max-width: 72ch; margin: 0 auto; }
.result-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.result-type { color: var(--teal); font: 760 10px/1.1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.result-heading { font: 500 1.92em/1.08 var(--serif); letter-spacing: -.046em; margin: 0 0 13px; overflow-wrap: anywhere; }
.result-heading:focus:not(:focus-visible) { outline: none; }
.result-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 15px; }
.badge { display: inline-flex; gap: 5px; align-items: center; padding: 4px 7px; border-radius: 4px; border: 1px solid var(--line); background: var(--wash); color: var(--muted); font: 650 10px/1.2 var(--sans); text-decoration: none; }
.badge .icon { width: 12px; height: 12px; }
.badge.formalized { color: var(--badge-green); border-color: var(--teal-line); background: var(--badge-green-wash); }
.badge.reduction-only, .badge.correction-badge { color: var(--amber); border-color: var(--amber-line); background: var(--amber-wash); }
.badge:hover:is(a) { text-decoration: underline; }
.result-summary { margin: 0 0 17px; color: var(--ink); }
.claim + .claim { margin-top: .55em; }
.claim-source { display: inline-flex; vertical-align: super; color: var(--teal); margin-left: .35em; padding: 1px; border-radius: 3px; }
.claim-source .icon { width: 10px; height: 10px; }
.claim-source:hover { background: var(--teal-wash); color: var(--teal-dark); }
.claim > :first-child, .source-math > :first-child { margin-top: 0; }
.claim > :last-child, .source-math > :last-child { margin-bottom: 0; }
.reading-section { margin: 19px 0 0; }
.reading-section + .reading-section { margin-top: 24px; }
.reading-label { font: 760 10px/1.4 var(--sans); letter-spacing: .13em; color: var(--teal); text-transform: uppercase; margin: 0 0 8px; }
.statement-box { padding: 12px 15px; border-left: 2px solid var(--teal-line); background: var(--teal-wash); overflow: auto; }
.statement-box .reading-label { margin-bottom: 6px; }
.source-math { min-width: 0; overflow-wrap: break-word; }
.source-math p { margin-bottom: .7em; }
.source-math ol, .source-math ul { padding-left: 1.6em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: .14em 0; }
[data-notation], [data-symbol], .notation-ref { cursor: help; color: inherit; text-decoration: underline dotted var(--teal-line); text-underline-offset: .2em; }
.result-correction { padding: 11px 13px; border: 1px solid var(--amber-line); border-left: 3px solid var(--amber-line); background: var(--amber-wash); border-radius: 4px; margin-top: 14px; }
.result-correction .reading-label, .correction-card .reading-label { color: var(--amber); }
.result-correction .source-link { color: var(--amber); margin-top: 7px; }
.correction-parts { display: grid; gap: 7px; }
.correction-parts h4 { margin: 0 0 3px; color: var(--amber); font: 700 10px var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.proof-steps { list-style: none; padding: 0; margin: 0; counter-reset: proof-step; }
.proof-steps > li { counter-increment: proof-step; border-top: 1px solid var(--line); }
.proof-steps > li:last-child { border-bottom: 1px solid var(--line); }
.proof-steps summary, .source-details summary { cursor: pointer; list-style: none; padding: 9px 0; display: flex; align-items: baseline; gap: 9px; }
.proof-steps summary::-webkit-details-marker, .source-details summary::-webkit-details-marker { display: none; }
.proof-steps summary::before { content: counter(proof-step, decimal-leading-zero); font: 650 11px var(--mono); color: var(--teal); flex: none; }
.proof-steps summary::after, .source-details summary::after { content: '+'; font: 650 15px var(--sans); color: var(--teal); margin-left: auto; padding-right: 3px; }
.proof-steps details[open] summary::after, .source-details[open] summary::after { content: '−'; }
.proof-steps .source-math { padding: 2px 0 14px 26px; }
.source-details { margin: 12px 0; }
.source-details summary { border-bottom: 1px solid var(--line); font: 650 12px/1.45 var(--sans); color: var(--teal); }
.source-details .source-math { margin-top: 10px; }
.raw-source pre { overflow: auto; max-height: 380px; margin: 9px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--wash); font: 11px/1.5 var(--mono); }
.relation-group { padding-top: 11px; border-top: 1px solid var(--line); margin-top: 14px; }
.relation-list { list-style: none; padding: 0; margin: 0; }
.relation-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.relation-list li a { text-decoration: none; }
.relation-list li a:hover { text-decoration: underline; }
.relation-list .claim { color: var(--muted); font-size: .9em; }
.relation-id { margin-right: 6px; font: 650 10px var(--mono); color: var(--teal); text-transform: uppercase; }
.result-footer { padding-top: 13px; margin-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; }
.result-lean-code { font: 11px/1.5 var(--mono); overflow-wrap: anywhere; color: var(--muted); }
.result-figure { margin: 12px 0 0; }
.result-figure img { max-width: 100%; height: auto; }
.result-figure iframe { display: block; width: 100%; min-height: 260px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.result-figure figcaption { color: var(--muted); margin-top: 6px; font: 12px/1.5 var(--sans); }

.mobile-tabs { display: none; }
.site-footer { min-height: 32px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex: none; color: var(--faint); font-size: 10px; }
.footer-right { display: flex; flex-wrap: wrap; gap: 4px 15px; justify-content: flex-end; }
.site-footer a { color: var(--faint); }

.alternate-view { flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--line-strong); padding: 22px 0 32px; }
.alternate-heading { font: 500 clamp(29px, 3vw, 41px)/1.12 var(--serif); letter-spacing: -.045em; margin: 0 0 8px; }
.alternate-intro { color: var(--muted); max-width: 73ch; margin-bottom: 19px; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr); gap: 22px 38px; align-items: start; }
.overview-layout h3 { font: 500 23px/1.2 var(--serif); letter-spacing: -.025em; margin-bottom: 9px; }
.overview-layout p { max-width: 70ch; }
.overview-layout .outline-list { border-top: 1px solid var(--line); padding-top: 7px; }
.overview-notes { border-left: 1px solid var(--line-strong); padding-left: 20px; }
.overview-citation { font: 15px/1.55 var(--serif); }
.correction-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px; max-width: 1150px; }
.correction-card { padding: 14px 17px; border: 1px solid var(--line); border-top: 2px solid var(--amber-line); border-radius: 5px; background: var(--surface); }
.correction-card h3 { font: 500 22px/1.15 var(--serif); letter-spacing: -.025em; margin: 0 0 10px; }
.correction-card .claim { font: 16px/1.5 var(--serif); }
.correction-links { display: flex; flex-wrap: wrap; gap: 7px 12px; margin: 12px 0 0; font-size: 12px; }

.dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); width: min(calc(100% - 32px), 610px); max-height: min(77vh, 650px); padding: 18px 20px; }
.dialog::backdrop { background: #141d18a0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 10px; }
.dialog-head h2 { font: 500 27px/1.1 var(--serif); letter-spacing: -.04em; margin: 0; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); background: var(--page); }
.search-field:focus-within { outline: 2px solid var(--teal); outline-offset: 1px; }
.search-field input { width: 100%; min-height: 40px; background: transparent; border: 0; padding: 0; color: var(--ink); }
.search-field input:focus-visible { outline: 0; }
.search-count { color: var(--faint); font-size: 11px; margin: 9px 0 6px; }
.search-results { padding: 0; list-style: none; margin: 0; }
.search-results li { border-top: 1px solid var(--line); }
.search-results .outline-result { padding: 9px 8px; }
.notation-content { display: grid; gap: 9px; }
.notation-entry { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.notation-entry.is-highlighted { border: 1px solid var(--teal-line); border-radius: 5px; background: var(--teal-wash); }
.notation-entry h3 { margin: 0 0 4px; color: var(--teal); font: 500 20px var(--serif); }
.notation-entry .claim { font: 16px/1.5 var(--serif); }

@media (min-width: 1350px) {
  .hero { grid-template-columns: minmax(0, 2.7fr) minmax(215px, 1fr); }
  .hero h1 { max-width: 18em; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr); gap: 18px; }
  .map-stats { display: none; }
  .hero h1 { font-size: clamp(32px, 5.6vw, 50px); }
}
@media (max-width: 700px) {
  :scope { --page-gutter: 15px; }
  html, body { min-height: 100%; height: auto; overflow: visible; }
  .masthead { height: auto; min-height: 56px; grid-template-columns: 1fr auto; gap: 0 10px; padding-top: 9px; }
  .wordmark { font-size: 19px; }
  .wordmark-icon { width: 26px; height: 26px; }
  .primary-nav { order: 2; grid-column: 1 / -1; margin-top: 4px; justify-content: space-between; height: 40px; gap: 8px; }
  .primary-nav a, .primary-nav button { font-size: 12px; }
  .header-tools { grid-column: 2; grid-row: 1; }
  .search-trigger { width: 32px; height: 30px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .theme-button { width: 29px; }
  #main { height: auto; min-height: calc(100vh - 84px); }
  .hero { display: block; padding: 19px 0 16px; }
  .hero h1 { font-size: clamp(30px, 7.9vw, 52px); margin: 8px 0 10px; max-width: 16em; }
  .hero-aside { border: 0; padding: 0; margin-top: 10px; }
  .hero-aside p { display: none; }
  .hero-links { gap: 6px 12px; }
  .workspace-head { min-height: 48px; padding: 8px 0; }
  .workspace-title, .workspace-tools { gap: 7px; }
  .workspace-title h2 { font-size: 21px; }
  .workspace-index { padding: 4px; font-size: 9px; }
  #toggle-reading { display: none; }
  .section-filter select { max-width: 45vw; height: 31px; }
  .section-filter .icon { top: 9px; }
  .mobile-tabs { display: flex; gap: 3px; padding: 3px; margin-bottom: 8px; width: fit-content; border-radius: 6px; background: var(--wash); }
  .mobile-tabs button { padding: 5px 10px; }
  .workspace-panes, .workspace-panes.is-reading, .workspace-panes.is-expanded { display: block; }
  .workspace-panes .splitter, .workspace-panes .graph-toolbar, .workspace-panes .graph-controls, .workspace-panes #graph, .workspace-panes .graph-empty { display: none; }
  .workspace-panes .proof-outline { display: block; position: relative; max-height: 70vh; }
  .workspace-panes[data-mobile="reading"] .map-pane, .workspace-panes[data-mobile="map"] .reader-pane { display: none; }
  .workspace-panes[data-mobile="map"] .map-pane, .workspace-panes[data-mobile="reading"] .reader-pane { display: flex; }
  .reader-content { overflow: visible; }
  .reader-toolbar { min-height: 39px; }
  .result-heading { font-size: 1.68em; }
  .overview-layout { display: block; }
  .overview-notes { margin-top: 23px; }
  .site-footer { padding: 6px 0; }
}
@media (min-width: 701px) and (max-height: 610px) {
  .masthead { height: 45px; }
  #main { height: calc(100% - 45px); }
  .hero { padding-top: 11px; padding-bottom: 10px; }
  .hero h1 { font-size: clamp(25px, 3.2vw, 42px); margin: 5px 0 6px; }
  .workspace-head { min-height: 43px; padding: 4px 0; }
  .graph-toolbar, .reader-toolbar { min-height: 38px; padding-block: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.figure-title { font: 500 1.15em/1.3 var(--serif); margin: 0 0 6px; }
.figure-formula { margin: 0 0 7px; }

.result-correction-entry + .result-correction-entry { border-top: 1px solid var(--amber-line); padding-top: 8px; margin-top: 8px; }
.result-correction-entry > h4 { margin: 0 0 3px; color: var(--amber); font: 700 11px/1.35 var(--sans); }
.quantitative-figure { padding: 9px 12px 11px; background: var(--map); border: 1px solid var(--line); border-radius: 6px; }
.quantitative-figure svg { width: 100%; display: block; font-family: var(--sans); }
.figure-controls { display: flex; flex-wrap: wrap; gap: 7px 13px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; }
.figure-slider-label { display: flex; gap: 7px; align-items: center; flex: 1 0 118px; font: 650 12px var(--sans); color: var(--teal); }
.figure-slider-label input { min-width: 75px; width: 100%; accent-color: var(--teal); cursor: pointer; }
.figure-values { font: 11px/1.4 var(--mono); color: var(--ink); }
.figure-meta { display: block; color: var(--faint); font: 10px/1.5 var(--sans); margin: 5px 0 0; }
.figure-popout { width: min(900px, 95vw); max-height: 91vh; padding: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); }
.figure-popout::backdrop { background: #141d18a0; }
.figure-popout > .text-button { display: block; margin: 0 0 5px auto; }

/* A quiet, document-like companion to samuelvaiter.com. */
html, body { height: auto; min-height: 100%; overflow: visible; }
body { font-size: 15px; }
.masthead { height: auto; display: block; padding: 0; }
.masthead-inner { max-width: 63rem; margin: auto; padding: .85rem 1.5rem; display: flex; align-items: baseline; gap: .5rem 2rem; flex-wrap: wrap; }
.wordmark { font: 600 17.5px/1.4 var(--sans); letter-spacing: .005em; margin-right: auto; }
.site-navigation { display: flex; gap: .2rem 1.25rem; flex-wrap: wrap; font: 16px var(--sans); }
.site-navigation a { color: var(--muted); text-decoration: none; }
.site-navigation a:hover { color: var(--ink); }
.theme-button { width: 25px; height: 25px; }
#main { display: block; height: auto; min-height: 0; max-width: 45rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
.paper-navigation { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.primary-nav { height: auto; gap: 1.2rem; flex-wrap: wrap; }
.primary-nav a, .primary-nav button { min-height: 45px; font-size: 14px; font-weight: 400; }
.primary-nav [aria-current="page"] { font-weight: 600; }
.search-trigger { border: 0; padding: 0; }
.search-trigger kbd { display: none; }
.hero, .hero-intro { display: block; }
.hero { padding: 3rem 0 2rem; }
.hero h1 { font: 600 2.2rem/1.15 var(--serif); letter-spacing: -.01em; max-width: none; margin: .4rem 0 .7rem; }
.overline { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.status-dot { display: none; }
.authors { font-size: 15px; }
.hero-aside { border: 0; padding: 0; margin-top: 1rem; }
.hero-aside p { max-width: none; font: 16px/1.55 var(--serif); margin-bottom: .6rem; }
.hero-links a { font-size: 14px; font-weight: 400; }
.workspace { display: block; }
.workspace-head { border-top: 1px solid var(--line); padding: .9rem 0; }
.workspace-index, .map-stats { display: none; }
.workspace-title h2 { font: 600 1.35rem/1.25 var(--serif); letter-spacing: 0; }
.workspace-panes { display: block; }
.map-pane { height: 420px; margin-bottom: 1.5rem; }
.splitter { display: none; }
.reader-pane { border: 0; border-radius: 0; overflow: visible; }
.reader-toolbar { padding: 0; border-bottom: 1px solid var(--line); }
.reader-content { padding: 1.5rem 0 2rem; overflow: visible; font-size: max(var(--reading-size), 17px); line-height: 1.6; }
.result-heading { letter-spacing: -.01em; }
.graph-body { background-image: none; }
.alternate-view { overflow: visible; padding: 1.5rem 0 2rem; }
.overview-layout { display: block; }
.overview-notes { margin-top: 2rem; }
.site-footer { border-top: 1px solid var(--line); padding-top: 1rem; }
@media (max-width: 700px) {
  .masthead { padding: 0; }
  .masthead-inner { gap: .5rem 1rem; }
  .site-navigation { order: 2; width: 100%; font-size: 14px; }
  .paper-navigation { flex-wrap: nowrap; }
  .primary-nav { margin: 0; justify-content: flex-start; gap: .8rem; }
  .primary-nav a, .primary-nav button { font-size: 13px; }
  .header-tools { display: flex; }
  .search-trigger { width: 30px; }
  .hero { padding: 2rem 0 1.5rem; }
  .hero h1 { font-size: 1.9rem; max-width: none; }
  .hero-aside p { display: block; }
  #toggle-reading { display: none; }
  .mobile-tabs { margin: .5rem 0; }
  .map-pane { height: auto; }
  .workspace-panes.is-reading[data-mobile="map"] .map-pane { display: flex; }
  .workspace-panes.is-reading[data-mobile="map"] .reader-pane { display: none; }
}

}
.content .visual-paper #main { max-width: none; margin: 0; padding: 0; }
.content .visual-paper .hero h1 { display: none; }
.content .visual-paper .hero { padding: 1rem 0; }
.content .visual-paper .reader-content { padding: 1rem 0; }
.content .visual-paper h3.reading-label { font: 600 10px/1.4 var(--sans); letter-spacing: .13em; text-transform: uppercase; margin: 0 0 8px; padding: 0; border: 0; }
.content .visual-paper .statement-box h3.reading-label { margin-bottom: 6px; }
.content .visual-paper .result-correction-entry > h4 { margin: 0 0 3px; }
.content .visual-paper .statement-box p:last-child, .content .visual-paper .result-correction p:last-child { margin-bottom: 0; }
