:root {
  color-scheme: dark;
  font-family: "Manrope", sans-serif;
  color: #e8edf5;
  background: #090d14;
  font-synthesis: none;
  --ink: #e8edf5;
  --muted: #9aa7b8;
  --line: #283242;
  --panel: #111823;
  --panel-raised: #151e2b;
  --green: #4fd1a1;
  --blue: #63a4ff;
  --amber: #e5ad52;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #090d14; }
button, a { font: inherit; }
a { color: inherit; }
code { font-family: "DM Mono", monospace; overflow-wrap: anywhere; }
.page-shell { width: min(1500px, calc(100% - 32px)); margin: 0 auto; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 54px; border-bottom: 1px solid var(--line); background: rgba(9, 13, 20, 0.94); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; text-decoration: none; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #477265; border-radius: 7px; color: var(--green); font-family: "DM Mono", monospace; font-size: 10px; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { padding: 8px 10px; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.topbar nav a:hover { color: var(--ink); background: var(--panel); }
.intro { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 48px; padding: 58px 24px 42px; border-bottom: 1px solid var(--line); align-items: end; }
.eyebrow, .diagram-kicker, .section-number { color: var(--green); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 13px 0 0; font-size: clamp(38px, 6vw, 72px); line-height: 1; letter-spacing: -0.05em; }
h2 { margin: 7px 0 0; font-size: clamp(28px, 3.5vw, 44px); line-height: 1.1; letter-spacing: -0.035em; }
h3 { margin-bottom: 12px; font-size: 17px; }
p { color: var(--muted); line-height: 1.65; }
.scope-note { padding: 20px 22px; border-left: 2px solid var(--green); background: var(--panel); }
.scope-note strong { color: var(--green); font-size: 12px; text-transform: uppercase; }
.scope-note p { margin: 9px 0 0; font-size: 14px; }
.snapshot, .content-section { padding: 56px 24px; border-bottom: 1px solid var(--line); }
.snapshot-heading, .section-heading { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 44px; align-items: end; margin-bottom: 28px; }
.snapshot-heading > p, .section-heading > p { margin: 0; font-size: 14px; }
.snapshot-heading code { font-size: 11px; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.metrics article { min-height: 126px; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.metrics strong { display: block; margin-bottom: 19px; color: var(--ink); font-size: clamp(23px, 2.5vw, 34px); letter-spacing: -0.04em; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.metrics small { margin-top: 4px; color: #718096; }
.method { margin: 15px 0 0; color: #7f8b9c; font-size: 12px; }
.diagram-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.diagram-card.featured { border-color: #355a50; }
.diagram-card.spaced { margin-top: 20px; }
.diagram-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.diagram-header h3 { margin: 4px 0 0; }
.expand-button, .dialog-bar button { padding: 8px 11px; border: 1px solid #3b495d; border-radius: 6px; color: var(--ink); background: #182231; cursor: pointer; font-size: 11px; font-weight: 700; }
.diagram-wrap { overflow: auto; min-height: 420px; padding: 18px; background: #0d131d; }
.diagram-wrap.wide { min-height: 780px; }
.diagram-wrap svg { display: block; min-width: 1080px; max-width: none !important; height: auto; margin: auto; }
.fact-grid, .inventory-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
.fact-grid article, .inventory-grid article, .subsection { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.fact-grid p, .inventory-grid p, .subsection p { margin-bottom: 8px; font-size: 14px; }
.fact-grid strong { color: var(--ink); }
.subsection { margin-top: 20px; }
.family-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.family-grid span { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.family-grid strong { display: block; margin-bottom: 4px; color: var(--green); font-family: "DM Mono", monospace; font-size: 18px; }
.family-grid small { display: block; margin-top: 5px; color: #718096; }
.record-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.record-grid p { margin: 0; padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.record-grid strong, .record-grid span { display: block; }
.record-grid strong { margin-bottom: 7px; color: var(--amber); font-family: "DM Mono", monospace; font-size: 11px; }
.record-grid span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.inventory-grid { grid-template-columns: 1.2fr 0.8fr 0.8fr; margin: 0; }
.inventory-grid ol { margin: 0; padding-left: 20px; }
.inventory-grid li { margin: 10px 0; color: var(--muted); font-size: 13px; }
.inventory-grid li span { display: block; margin-top: 3px; color: #718096; }
.inventory-grid dl { margin: 0; }
.inventory-grid dl div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.inventory-grid dt { color: var(--muted); }
.inventory-grid dd { margin: 0; color: var(--green); font-family: "DM Mono", monospace; }
dialog { width: min(97vw, 1900px); height: 94vh; padding: 0; border: 1px solid #3a4658; border-radius: 10px; color: var(--ink); background: #0d131d; }
dialog::backdrop { background: rgba(0, 0, 0, 0.86); }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; }
#dialog-content { overflow: auto; height: calc(94vh - 55px); padding: 22px; }
#dialog-content svg { display: block; min-width: 1500px; max-width: none !important; height: auto; margin: auto; }
@media (max-width: 980px) { .metrics { grid-template-columns: repeat(3, 1fr); } .family-grid { grid-template-columns: repeat(2, 1fr); } .inventory-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .page-shell { width: min(100% - 20px, 1500px); } .topbar nav { display: none; } .intro, .snapshot-heading, .section-heading { grid-template-columns: 1fr; gap: 22px; } .intro, .snapshot, .content-section { padding: 38px 10px; } .metrics { grid-template-columns: repeat(2, 1fr); } .fact-grid, .family-grid, .record-grid { grid-template-columns: 1fr; } .diagram-header { align-items: flex-start; flex-direction: column; } }
