:root {
  color-scheme: dark;
  --page: #080912;
  --panel: #0e101d;
  --lift: #151829;
  --line: #252941;
  --text: #f2f3ff;
  --muted: #a7acc5;
  --mint: #8cffe8;
  --purple: #ae9aff;
  --amber: #f9c784;
  --display: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Avenir Next", system-ui, "PingFang SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--page); color: var(--text); font-family: var(--body); line-height: 1.65; }
body::before {
  content: ""; z-index: -1; position: absolute; inset: 0 0 auto; height: 830px; pointer-events: none;
  background: radial-gradient(ellipse at 72% 36%, #231a4c 0, #13142b 28%, transparent 63%);
}
[hidden] { display: none !important; }
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .22em; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
button:disabled { opacity: .33; cursor: default; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.14; }
::selection { background: #6b52cc; color: white; }
.wrap { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); background: var(--panel); padding: 10px 18px; z-index: 20; }
.skip:focus { transform: none; }
.topbar { position: sticky; top: 0; z-index: 8; background: #080912e7; backdrop-filter: blur(18px); border-bottom: 1px solid #24263c; }
.nav { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; font: 600 13px var(--mono); letter-spacing: .11em; }
.wordmark b { color: var(--purple); font-weight: 600; }
.brand-icon { display: grid; place-items: center; width: 29px; height: 29px; margin-right: 4px; line-height: 1; border: 1px solid #63549a; background: #2f2453; color: #e3d8ff; border-radius: 8px; font: 22px Georgia, serif; }
.nav nav { display: flex; gap: clamp(15px, 4vw, 46px); }
.nav nav a { color: var(--muted); font-size: 13px; font-weight: 600; }
.nav nav a:hover { color: var(--mint); }
.locale { padding: 6px 12px; border: 1px solid var(--line); background: var(--panel); border-radius: 7px; font: 600 12px var(--mono); }
.locale span { color: var(--purple); }
.hero-shell { isolation: isolate; overflow: hidden; position: relative; }
.hero-art {
  z-index: -1; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 76% 46%, #542fe45b, #151a3c50 38%, transparent 70%);
}
.hero-art::before {
  content: ""; position: absolute; inset: 0;
  background: url("./critical-spectrum.webp") right 47% / 67% auto no-repeat;
}
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #080912 5%, #080912e8 28%, #08091244 65%, #08091255), linear-gradient(0deg, #080912, transparent 25%);
}
.hero { min-height: 522px; display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: 22px; padding-block: 43px 40px; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--purple); font: 600 11px/1.5 var(--mono); letter-spacing: .15em; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; }
.signal, .plot-meta i { background: var(--mint); border-radius: 50%; width: 7px; height: 7px; display: inline-block; box-shadow: 0 0 15px var(--mint); }
h1 { font-size: clamp(65px, 7.5vw, 118px); font-weight: 750; letter-spacing: -.07em; line-height: .98; }
h1 span, h1 em { display: block; }
h1 em { font-style: normal; background: linear-gradient(104deg, #e0d9ff 0, #a38bff 48%, #74e8e0 100%); background-clip: text; color: transparent; padding-bottom: .08em; }
html[lang="en"] h1 { font-size: clamp(59px, 7.5vw, 109px); }
.lead { max-width: 510px; color: #c1c3da; font-size: clamp(16px, 1.65vw, 19px); margin-block: 24px 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.button:hover { text-decoration: none; filter: brightness(1.18); }
.primary { color: #110e20; background: linear-gradient(110deg, #b49dff, #aef8e9); box-shadow: 0 0 25px #9c80ff38; }
.secondary { color: var(--text); border: 1px solid #3c3b57; background: #141525; }
.credit { color: var(--muted); font-size: 12px; margin-top: 18px; }
.hero-figure { position: relative; min-width: 0; aspect-ratio: 1.38; border: 1px solid #8a7cc75e; border-radius: 18px; overflow: hidden; background: #0a0a1850; box-shadow: 0 22px 85px #05050f88, inset 0 1px #b2a3ff30; }
.hero-figure canvas { display: block; width: 100%; height: calc(100% - 64px); margin-top: 22px; cursor: crosshair; }
.plot-meta { position: absolute; display: flex; align-items: center; justify-content: space-between; inset: 15px 17px auto; color: #d4d0ee; gap: 10px; font: 12px/1 var(--mono); }
.plot-meta i { width: 6px; height: 6px; margin-right: 4px; }
.plot-meta b { color: var(--mint); font-weight: 500; }
.zero-control { position: absolute; left: 15px; bottom: 10px; display: flex; align-items: center; gap: 6px; color: #d4fff4; border: 1px solid #6a79a85c; border-radius: 7px; background: #0b1223d9; }
.zero-control button { min-width: 30px; height: 28px; border-radius: 5px; background: transparent; color: #adbfe9; font: 17px var(--mono); }
.zero-control button:hover:not(:disabled) { color: #fff; background: #2a3256; }
.zero-control output { font: 11px var(--mono); min-width: 111px; color: #e1fff9; text-align: center; }
figcaption { position: absolute; bottom: 16px; right: 16px; color: #d5cbed; font: 10px/1.4 var(--mono); }
figcaption a { color: inherit; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: #111323cc; border-radius: 13px; overflow: hidden; }
.metrics > div { min-width: 0; min-height: 94px; padding: 13px 24px; display: flex; flex-direction: column; justify-content: center; }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics strong { font: 600 clamp(22px, 3vw, 38px)/1.1 var(--mono); letter-spacing: -.06em; }
.metrics span { color: var(--muted); font-size: 12px; }
.metrics .engine { background: linear-gradient(115deg, #16152d, #111725); }
.engine a { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.engine a span { color: var(--purple); white-space: nowrap; font: 9px var(--mono); letter-spacing: .1em; }
.engine img { width: 72px; height: 29px; object-fit: contain; }
.section { padding-top: 88px; }
.section-head { display: grid; grid-template-columns: 1fr minmax(230px, 408px); align-items: end; gap: 18px; margin-bottom: 24px; }
.section-head > p { color: var(--muted); font-size: 14px; }
h2 { margin-top: 8px; font-size: clamp(35px, 4.3vw, 60px); letter-spacing: -.055em; }
.chapters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 13px; }
.chapter {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 12px;
  min-height: 109px; background: linear-gradient(135deg, #18192a, #10111d);
  border: 1px solid #31324b; border-radius: 11px; color: var(--text);
}
.chapter b { font: 650 15px/1.2 var(--display); }
.chapter small { color: #b5b8d0; font: 11px/1.45 var(--body); }
.chapter-glyph { display: grid; place-items: center; min-width: 30px; height: 24px; padding: 0 5px; border-radius: 5px; margin-bottom: 3px; color: var(--chapter); background: color-mix(in srgb, var(--chapter), transparent 85%); font: 600 13px var(--mono); }
.chapter:is(:hover,[aria-pressed="true"]) {
  border-color: color-mix(in srgb, var(--chapter), transparent 52%); background: linear-gradient(135deg, color-mix(in srgb, var(--chapter) 17%, #141522), #121422);
  box-shadow: inset 0 2px color-mix(in srgb, var(--chapter), transparent 40%);
}
.workbench, .index-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.workbar { min-height: 58px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 8px 15px; gap: 12px; }
.segmented, .step-controls { display: flex; gap: 6px; align-items: center; }
.segmented button, .step-controls button { border-radius: 6px; padding: 7px 11px; background: transparent; color: var(--muted); font-size: 13px; }
.segmented button[aria-pressed="true"], .step-controls button:not(:disabled):hover { color: var(--text); background: #24223b; }
.step-controls output { color: var(--purple); font: 12px var(--mono); white-space: nowrap; }
.progress { height: 2px; background: #26263d; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--mint)); transition: width .25s ease; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1fr); }
.work-grid[data-view="list"] { grid-template-columns: minmax(230px, .57fr) minmax(0, 1.43fr); }
.graph-area { background: #0b0d18; min-width: 0; }
.work-grid[data-view="list"] .legend, .work-grid[data-view="sources"] .legend { display: none; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; padding: 14px 16px; min-height: 48px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; color: #bfc3dc; font-size: 11px; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lane); }
.legend small { flex-basis: 100%; color: var(--muted); font-size: 10px; }
.graph-scroll { overflow: auto; min-height: 390px; scrollbar-color: #4c436d #0b0d18; }
.graph-inner {
  min-width: 900px; height: 422px; position: relative;
  background: radial-gradient(#51487266 1px, transparent 1px) 0 0 / 18px 18px, radial-gradient(ellipse at 42% 42%, #1f1933aa, #0b0d18 74%);
}
.graph-inner svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.graph-inner .edge { stroke: #646282; stroke-width: 1.4; opacity: .52; fill: none; }
.graph-inner .edge.active { stroke: #9cffe6; opacity: 1; stroke-width: 2; filter: drop-shadow(0 0 4px #5eeedc); }
.graph-node { position: absolute; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 9px; background: #121426; color: var(--lane); border: 1px solid color-mix(in srgb, var(--lane), transparent 40%); font: 600 11px var(--mono); transition: box-shadow .16s, background .16s; }
.graph-node:hover, .graph-node[aria-pressed="true"] { background: var(--lane); color: #0d1020; box-shadow: 0 0 21px color-mix(in srgb, var(--lane), transparent 37%); z-index: 2; }
.graph-node.related { box-shadow: 0 0 9px color-mix(in srgb, var(--lane), transparent 55%); }
.graph-node .node-label { position: absolute; top: 35px; left: 50%; width: max-content; max-width: 118px; transform: translateX(-50%); color: var(--text); background: #17182a; border: 1px solid #4d4268; border-radius: 5px; padding: 4px 6px; font: 600 10px/1.3 var(--body); white-space: normal; box-shadow: 0 8px 16px #070811aa; pointer-events: none; opacity: 0; }
.graph-node:is(:hover, :focus-visible, [aria-pressed="true"]) .node-label { opacity: 1; }
.sequence { padding: 19px 12px 16px; }
.sequence h3 { padding: 3px 11px 11px; color: var(--muted); font: 600 12px var(--mono); letter-spacing: .04em; }
.sequence button { width: 100%; display: grid; grid-template-columns: 23px 1fr auto; align-items: baseline; gap: 7px; text-align: left; color: var(--text); background: transparent; border-radius: 6px; padding: 11px 9px; font-size: 13px; }
.sequence button:hover, .sequence button[aria-pressed="true"] { background: #24223b; }
.sequence b { font: 12px var(--mono); color: var(--lane); }
.sequence small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.source-map { min-height: 405px; padding: 15px 16px 22px; background: radial-gradient(#51487255 1px, transparent 1px) 0 0 / 18px 18px; }
.source-root { width: fit-content; max-width: 92%; padding: 8px 13px; border-radius: 8px; border: 1px solid #6d5aa8; background: #241c3d; color: #e4dbff; font-size: 13px; font-weight: 700; }
.source-branches { margin: 0 0 0 12px; padding-left: 17px; border-left: 1px solid #62588a; display: grid; gap: 14px; }
.source-branch { position: relative; padding: 14px 0 0; min-width: 0; }
.source-branch::before { content: ""; position: absolute; left: -17px; top: 25px; width: 13px; height: 1px; background: #62588a; }
.source-branch h4 { color: var(--branch, var(--muted)); margin: 0; font-size: 12px; }
.source-branch .chips { margin-block: 7px 0; }
.source-branch .chip { border-color: color-mix(in srgb, var(--branch), transparent 64%); }
.source-branch .more-citations { margin-top: 7px; font-size: 11px; display: inline-block; background: transparent; color: var(--mint); }
.proof-lines { margin: 8px 0 0; padding-left: 19px; font-size: 13px; line-height: 1.7; color: #d4d8ec; }
.proof-lines li + li { margin-top: 7px; }
.reader-next { display: flex; justify-content: flex-end; padding-top: 17px; }
.reader-next button { text-align: left; min-height: 36px; }
.scaling { margin-block: 13px; padding: 12px; background: #182234; border: 1px solid #2c425c; border-radius: 8px; font-size: 13px; }
.scaling p { color: #b6c4db; font-size: 12px; }
.scaling input { width: min(100%, 480px); accent-color: var(--mint); }
.scale-bars { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 5px 8px; align-items: center; margin-bottom: 7px; font: 11px var(--mono); }
.scale-bars div { height: 6px; background: #2a354d; border-radius: 4px; overflow: hidden; }
.scale-bars i { display: block; height: 100%; border-radius: inherit; background: var(--purple); }
.scale-bars div:last-child i { background: var(--mint); }
.scaling output { display: block; font: 12px var(--mono); color: #d4fff4; overflow-wrap: anywhere; }
.detail { min-width: 0; border-left: 1px solid var(--line); padding: 24px clamp(18px, 3vw, 40px); }
.step-code { color: var(--lane, var(--purple)); display: flex; gap: 10px; flex-wrap: wrap; font: 11px var(--mono); margin-bottom: 11px; }
.detail h3, .audit-card h3 { font-size: clamp(23px, 2.85vw, 37px); letter-spacing: -.035em; }
.detail dl { margin-block: 16px; }
.detail dt { font-size: 11px; font-weight: 750; letter-spacing: .06em; color: var(--muted); }
.detail dd { margin: 2px 0 13px; font-size: 15px; }
.formula { padding: 10px 12px; background: #111d2c; border-left: 2px solid var(--mint); color: #d7fff8; font: 13px/1.6 var(--mono); overflow-wrap: anywhere; }
.detail-links, .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 14px; }
.chip { font: 11px/1.5 var(--mono); color: #d0c6ff; border: 1px solid #3b3458; border-radius: 6px; background: #1b1830; padding: 4px 7px; overflow-wrap: anywhere; text-align: left; max-width: 100%; }
.chip:hover { background: #2a2346; text-decoration: none; }
.source-accordion { border-top: 1px solid var(--line); padding: 9px 0; font-size: 13px; }
summary { cursor: pointer; color: var(--text); }
.source-accordion summary { font-weight: 650; }
.source-accordion p { color: var(--muted); margin-block: 7px 0; }
.citations { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 13px; }
.citations li { color: var(--muted); overflow-wrap: anywhere; }
.citations small { display: block; color: var(--purple); }
.callout { background: #241d28; border-left: 2px solid var(--amber); margin-top: 12px; padding: 9px 11px; color: #edcfaa; font-size: 13px; }
.index-panel { padding: 17px 20px; }
.index-controls { display: grid; grid-template-columns: 1fr minmax(140px, 224px); gap: 12px; }
.search, select { border: 1px solid #3a3c59; border-radius: 8px; background: #121525; }
.search { display: flex; align-items: center; gap: 8px; padding-inline: 12px; }
.search span { color: var(--purple); font-size: 24px; line-height: 1; }
.search:focus-within { border-color: var(--mint); }
.search input { flex: 1; min-width: 0; padding: 10px 0; outline: none; background: transparent; border: none; font-size: 14px; }
.search input::placeholder { color: var(--muted); }
select { padding: 7px 10px; font-size: 13px; max-width: 100%; }
#result-count { color: var(--muted); font-size: 12px; margin-block: 13px 6px; }
.results { display: grid; }
.result { border-top: 1px solid var(--line); padding: 12px 0; min-width: 0; }
.result summary { list-style: none; display: grid; grid-template-columns: 102px 1fr 16px; align-items: baseline; gap: 10px; font-size: 14px; }
.result summary::-webkit-details-marker { display: none; }
.result summary::after { content: "+"; color: var(--muted); text-align: right; }
.result[open] summary::after { content: "−"; }
.result summary strong { color: var(--purple); font: 600 11px/1.4 var(--mono); }
.result summary span { overflow-wrap: anywhere; }
.result-body { padding: 9px 25px 2px 112px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.result-body h4 { color: var(--text); margin: 11px 0 3px; font-size: 12px; }
.result-body p + p { margin-top: 5px; }
#more { margin-top: 12px; }
.audit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.audit-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: var(--panel); }
.audit-card h3 { font-size: 22px; margin-bottom: 9px; }
.audit-card p, .audit-card ul { font-size: 14px; color: var(--muted); }
.audit-card ul { padding-left: 20px; margin-block: 8px; }
.audit-card li { margin-bottom: 6px; overflow-wrap: anywhere; }
.audit-card p + p { margin-top: 8px; }
.audit-card .chips { margin-bottom: 0; }
.footer { display: flex; justify-content: space-between; gap: 14px; align-items: center; border-top: 1px solid var(--line); margin-top: 65px; padding-block: 21px; color: var(--muted); font-size: 12px; }
@media (max-width: 1020px) {
  .wrap { width: calc(100% - 48px); }
  .hero { min-height: 0; }
  .work-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .95fr); }
  .chapters { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 750px) {
  .wrap { width: calc(100% - 32px); }
  .nav { height: 58px; gap: 12px; }
  .nav nav { gap: 11px; }
  .nav nav a { font-size: 11px; }
  .wordmark { font-size: 10px; gap: 4px; }
  .brand-icon { width: 24px; height: 24px; font-size: 17px; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 25px; }
  .hero-art::before {
    inset: auto 0 0; height: clamp(350px, 115vw, 540px);
    background-position: 76% bottom; background-size: 155% auto;
    mask-image: linear-gradient(to top, #000 50%, transparent);
  }
  .hero-art::after { background: linear-gradient(180deg, #080912f2, #08091292 53%, #08091272 74%, #080912 100%); }
  h1, html[lang="en"] h1 { font-size: clamp(59px, 12vw, 95px); }
  .hero-figure { aspect-ratio: 1.39; }
  .section { padding-top: 59px; }
  .section-head, .work-grid, .work-grid[data-view="list"] { grid-template-columns: 1fr; }
  .section-head { gap: 9px; }
  .detail { border-left: 0; border-top: 1px solid var(--line); }
  .metrics > div { padding: 10px 13px; min-height: 78px; }
  .graph-inner { height: 375px; min-width: 900px; }
  .graph-scroll { min-height: 0; }
  .audit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .nav nav a:last-child { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics > div:nth-child(3) { border-left: 0; }
  .metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .index-panel { padding-inline: 13px; }
  .index-controls { grid-template-columns: minmax(0, 1fr) 119px; gap: 6px; }
  .result summary { grid-template-columns: 67px 1fr 10px; gap: 6px; }
  .result-body { padding-left: 0; }
  .footer { flex-wrap: wrap; }
  .workbar { gap: 4px; padding-inline: 6px; }
  .segmented, .step-controls { gap: 1px; }
  .segmented button, .step-controls button { padding-inline: 6px; font-size: 11px; }
  .chapters { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .chapter { min-height: 78px; padding: 7px; }
  .chapter b { font-size: 12px; }
  .chapter small { display: none; }
  .zero-control { left: 8px; }
  .zero-control button { min-width: 23px; }
  .zero-control output { min-width: 83px; font-size: 9px; }
  figcaption { right: 8px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

#reader-start{white-space:nowrap;font-size:12px}
