:root {
  color-scheme: light;
  --bg: #f3f5f6;
  --surface: #ffffff;
  --surface-2: #edf1f3;
  --ink: #172026;
  --muted: #64717a;
  --line: #d5dde1;
  --line-strong: #aab6bd;
  --shadow: 0 12px 34px rgba(23, 32, 38, 0.13);
  --f1: #bd3150;
  --f2: #13856f;
  --f3: #2d63a7;
  --f4: #c66a12;
  --f5: #7450a8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(45, 99, 167, 0.35); outline-offset: 2px; }
a { color: inherit; }

.sr-only { 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; z-index: 1000; top: 10px; left: 10px; padding: 9px 12px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.app-header {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) minmax(390px, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 22px 48px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand-block h1 { margin: 4px 0 5px; font-size: 36px; line-height: 1.05; letter-spacing: 0; font-weight: 730; }
.brand-block p, .site-footer p { margin: 0; color: var(--muted); line-height: 1.45; }
.eyebrow, .section-kicker { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.2; font-weight: 780; text-transform: uppercase; letter-spacing: 0.08em; }
.header-stats { display: grid; grid-template-columns: repeat(4, minmax(76px, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.stat-block { min-height: 60px; padding: 10px 11px; background: var(--surface); }
.stat-block strong { display: block; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-block span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.15; }
.header-actions { display: flex; gap: 7px; }
.icon-command, .text-command { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; font-size: 12px; font-weight: 730; }
.icon-command:hover, .text-command:hover { border-color: var(--ink); background: var(--surface-2); }
.icon-command svg, .text-command svg, .view-tab svg, .search-field svg, .icon-button svg { width: 17px; height: 17px; stroke-width: 1.8; }

.view-tabs { display: flex; gap: 2px; padding: 8px 48px 0; background: var(--surface); }
.view-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 15px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 730; }
.view-tab:hover { color: var(--ink); background: var(--surface-2); }
.view-tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.filter-bar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(250px, auto) minmax(150px, 0.62fr) minmax(128px, 0.5fr) minmax(170px, 0.68fr) minmax(160px, 0.58fr) 38px;
  gap: 8px;
  align-items: end;
  padding: 10px 48px;
  background: rgba(243, 245, 246, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.search-field { position: relative; display: flex; align-items: center; }
.search-field svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-field input, .select-field select { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); }
.search-field input { padding: 0 12px 0 39px; }
.select-field { display: grid; gap: 3px; }
.collection-field { min-width: 220px; }
.select-field span { color: var(--muted); font-size: 10px; font-weight: 740; text-transform: uppercase; letter-spacing: 0.04em; }
.select-field select { padding: 0 28px 0 9px; font-size: 12px; }
.family-filter { display: grid; grid-template-columns: repeat(6, minmax(38px, auto)); height: 38px; border: 1px solid var(--line-strong); background: var(--surface); }
.family-filter button { min-width: 39px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 800; }
.family-filter button:last-child { border-right: 0; }
.family-filter button:hover, .family-filter button.is-active { background: var(--family-color, var(--ink)); color: white; }
.icon-button { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-button:hover { background: var(--ink); color: white; }

.view-panel { display: none; }
.view-panel.is-active { display: block; }
.graph-view { padding: 0 0 28px; }
.graph-heading { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(260px, 0.7fr) auto; gap: 24px; align-items: center; padding: 17px 48px 14px; }
.graph-heading h2, .section-heading h2 { margin: 3px 0 0; font-size: 22px; line-height: 1.2; letter-spacing: 0; }
.graph-summary { margin: 0; color: var(--muted); text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.graph-toolbar { display: flex; gap: 6px; }

.graph-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: min(780px, calc(100vh - 276px)); min-height: 650px; margin: 0 28px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow); }
.graph-canvas { position: relative; min-width: 0; overflow: hidden; background-color: #f8fafb; background-image: linear-gradient(#e6ebee 1px, transparent 1px), linear-gradient(90deg, #e6ebee 1px, transparent 1px); background-size: 24px 24px; }
#taxonomy-graph { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#taxonomy-graph:active { cursor: grabbing; }
.arrowhead-path { fill: #87929a; }
.graph-edge { fill: none; stroke-width: 1.45; stroke-opacity: 0.42; transition: opacity 120ms, stroke-width 120ms; }
.graph-edge.is-highlighted { stroke-width: 3; stroke-opacity: 0.95; }
.graph-edge.is-dimmed { opacity: 0.045; }
.graph-node { overflow: visible; cursor: pointer; transition: opacity 120ms; }
.graph-node > div { width: 100%; height: 100%; }
.graph-node.is-dimmed { opacity: 0.12; }
.graph-node.is-highlighted { filter: drop-shadow(0 5px 7px rgba(23, 32, 38, 0.16)); }

.taxonomy-node { display: flex; height: 100%; flex-direction: column; justify-content: center; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); box-shadow: 0 5px 16px rgba(23, 32, 38, 0.09); }
.taxonomy-node span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.taxonomy-node strong { display: block; margin: 4px 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.15; }
.taxonomy-node small { color: var(--muted); font-size: 9px; line-height: 1.2; }
.root-node { background: var(--ink); color: white; border-color: var(--ink); }
.root-node span, .root-node small { color: #cbd3d8; }
.family-node, .subtype-node { border-left: 7px solid var(--family-color); }
.subtype-node { border-left-width: 3px; }
.membership-group-node { border: 2px solid #64737b; border-style: dashed; background: #f1f5f6; }
.membership-group-node span { color: #526169; }
.membership-group-node strong { font-size: 12px; }

.model-graph-node { display: grid; height: 100%; grid-template-rows: 94px 1fr; overflow: hidden; border: 1px solid #aab5bb; border-top: 4px solid var(--family-color); border-radius: 5px; background: var(--surface); box-shadow: 0 5px 16px rgba(23, 32, 38, 0.1); }
.model-graph-node:hover { border-color: var(--ink); }
.model-graph-node.is-multi-family { border-bottom: 3px solid var(--f3); }
.model-node-media { display: grid; grid-template-columns: 98px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.node-evidence, .node-example { min-width: 0; padding: 5px; }
.node-evidence { display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); background: #f8fafb; }
.node-evidence > span, .node-example > span, .architecture-card-media > div > span, .card-example > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.node-example { display: flex; flex-direction: column; justify-content: center; background: #eef4f1; }
.node-example code { display: -webkit-box; overflow: hidden; color: #12352e; font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; line-height: 1.35; overflow-wrap: anywhere; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.model-node-footer { min-width: 0; padding: 5px 8px; }
.model-node-footer strong { display: block; overflow: hidden; font-size: 10px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.model-node-footer span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }

.paper-crop { position: relative; overflow: hidden; border: 1px solid #bac4c9; background: white; }
.paper-crop img { position: absolute; display: block; max-width: none; height: auto; }
.paper-crop-detail { width: 100%; max-height: 360px; }
.paper-crop-card { width: 100%; height: 160px !important; aspect-ratio: auto !important; }
.paper-crop-card img { min-height: 100%; }
.paper-crop-tiny { width: 38px; height: 30px !important; aspect-ratio: auto !important; }
.no-figure { display: flex; min-height: 140px; align-items: center; justify-content: center; gap: 8px; padding: 18px; border: 1px dashed var(--line-strong); background: var(--surface-2); color: var(--muted); text-align: center; font-size: 12px; }
.no-figure svg { width: 20px; height: 20px; }
.no-figure.is-compact { min-height: 52px; padding: 5px; gap: 3px; font-size: 7px; }
.no-figure.is-compact svg { width: 13px; height: 13px; }
.no-figure-tiny { width: 38px; min-height: 30px !important; padding: 2px !important; }
.no-figure-tiny span { display: none; }

.graph-key { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 11px; padding: 7px 9px; border: 1px solid var(--line); background: rgba(255,255,255,0.94); color: var(--muted); font-size: 9px; pointer-events: none; }
.graph-key span { display: inline-flex; align-items: center; gap: 5px; }
.graph-key b { display: inline-block; width: 13px; height: 8px; }
.key-evidence { border: 1px solid #9aa6ad; background: white; }
.key-example { background: #dcece5; }
.key-group { border: 2px dashed #64737b; background: #f1f5f6; }
.key-multi { border-top: 2px solid var(--f3); border-bottom: 2px solid var(--f4); }

.graph-inspector { min-width: 0; overflow: hidden; border-left: 1px solid var(--line-strong); background: var(--surface); }
.inspector-scroll { height: 100%; overflow-y: auto; padding: 20px; }
.inspector-title h3, .root-inspector h3, .family-inspector h3, .subtype-inspector h3, .membership-group-inspector h3 { margin: 5px 0 7px; font-size: 22px; line-height: 1.15; letter-spacing: 0; overflow-wrap: anywhere; }
.inspector-title > p:last-child, .root-inspector > p, .family-inspector > p, .subtype-inspector > p, .membership-group-inspector > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 16px; }
.family-chip { padding: 4px 6px; border-left: 4px solid var(--family-color); background: var(--surface-2); font-size: 9px; font-weight: 750; }
.model-path-summary { margin: 0 0 16px; padding: 10px; border: 1px solid var(--line); background: #f8fafb; }
.model-path-heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.model-path-heading strong { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.model-path-heading span, .model-path-summary > p { color: var(--muted); font-size: 8px; }
.model-path-summary > p { margin: 4px 0 8px; }
.subtype-path-list { display: grid; gap: 4px; }
.subtype-path-chip { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 7px; align-items: center; min-width: 0; padding: 5px 6px; border-left: 4px solid var(--family-color); background: white; }
.subtype-path-chip b { font-size: 8px; }
.subtype-path-chip span { min-width: 0; font-size: 8px; line-height: 1.3; overflow-wrap: anywhere; }
.subtype-path-chip em { color: var(--muted); font-size: 8px; font-style: normal; white-space: nowrap; }
.inspector-evidence { margin: 0 -20px; padding: 15px 20px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8fafb; }
.evidence-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.evidence-heading span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.evidence-heading em { color: var(--muted); font-size: 9px; font-style: normal; }
.crop-readout, .figure-caption { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.figure-caption { color: var(--ink); font-size: 10px; }
.provenance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 12px 0 0; }
.provenance-grid div { min-width: 0; }
.provenance-grid .wide { grid-column: 1 / -1; }
.provenance-grid dt { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.provenance-grid dd { margin: 2px 0 0; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.provenance-grid code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.evidence-absence { display: flex; gap: 12px; margin: 0 -20px; padding: 18px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f2f0ed; }
.evidence-absence svg { flex: 0 0 24px; color: #866335; }
.evidence-absence strong { font-size: 12px; }
.evidence-absence p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.inspector-section { margin: 0 -20px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.inspector-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.inspector-section-title h4 { margin: 0; font-size: 13px; }
.inspector-section-title span { color: var(--muted); font-size: 9px; }

.input-example { margin-bottom: 8px; padding: 10px 0 11px 11px; border-left: 4px solid var(--family-color); background: #eef4f1; }
.input-example:last-child { margin-bottom: 0; }
.example-label { display: flex; justify-content: space-between; gap: 10px; padding-right: 10px; }
.example-label span { font-size: 9px; font-weight: 780; }
.example-label em { color: #5c6f68; font-size: 8px; font-style: normal; }
.example-flow { display: grid; grid-template-columns: minmax(0,1fr) 14px minmax(0,1fr) 14px minmax(0,1fr); gap: 4px; align-items: center; margin-top: 8px; padding-right: 8px; }
.example-flow code, .example-flow strong { overflow-wrap: anywhere; font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; line-height: 1.35; }
.example-flow svg { width: 12px; height: 12px; color: var(--muted); }
.input-example details { margin-top: 8px; padding-right: 9px; font-size: 9px; }
.input-example summary { color: #40534c; cursor: pointer; }
.input-example details p { margin: 6px 0 0; color: #40534c; line-height: 1.4; }
.standalone-example { margin-top: 16px; }

.route-record { margin-bottom: 10px; padding: 10px; border-left: 4px solid var(--family-color); background: var(--surface-2); }
.route-record-head { display: flex; justify-content: space-between; gap: 10px; }
.route-record-head strong { font-size: 10px; }
.route-record-head span { color: var(--muted); font-size: 8px; }
.route-flow { display: grid; grid-template-columns: 1fr 13px 1fr 13px 1fr; gap: 4px; align-items: center; margin-top: 9px; }
.route-flow div { min-width: 0; }
.route-flow span { color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.route-flow p { margin: 3px 0 0; font-size: 8px; line-height: 1.35; overflow-wrap: anywhere; }
.route-flow svg { width: 11px; height: 11px; color: var(--muted); }
.route-record blockquote { margin: 9px 0 0; padding-left: 8px; border-left: 2px solid var(--line-strong); color: #3e4b52; font-size: 8px; line-height: 1.4; }
.route-provenance { margin: 7px 0 0; color: var(--muted); font-size: 7px; line-height: 1.35; }
.paper-link-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding-top: 14px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.paper-link-row a { display: inline-flex; gap: 5px; align-items: center; color: var(--ink); font-weight: 700; }
.paper-link-row svg { width: 13px; height: 13px; }

.reading-sequence { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 17px 0; padding: 10px; background: var(--surface-2); }
.reading-sequence span { padding: 5px; border: 1px solid var(--line); background: white; font-size: 9px; font-weight: 740; }
.reading-sequence svg { width: 12px; height: 12px; color: var(--muted); }
.inspector-family-list, .inspector-subtypes, .inspector-model-list { display: grid; gap: 5px; }
.inspector-family-list button, .inspector-subtypes button, .inspector-model-list button { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 8px; align-items: center; min-height: 44px; padding: 7px 8px; border: 1px solid var(--line); border-left: 4px solid var(--family-color, var(--line-strong)); background: white; color: var(--ink); text-align: left; cursor: pointer; }
.inspector-family-list button:hover, .inspector-subtypes button:hover, .inspector-model-list button:hover { border-color: var(--ink); }
.inspector-family-list b, .inspector-subtypes b { font-size: 9px; }
.inspector-family-list span, .inspector-subtypes span, .inspector-model-list b { min-width: 0; font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
.inspector-family-list em, .inspector-subtypes em, .inspector-model-list em { color: var(--muted); font-size: 8px; font-style: normal; }
.method-note { display: flex; gap: 10px; margin-top: 16px; padding: 11px; border-left: 4px solid var(--f2); background: #eef4f1; }
.method-note svg { flex: 0 0 18px; }
.method-note p { margin: 0; font-size: 9px; line-height: 1.45; }
.family-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 16px 0; background: var(--line); border: 1px solid var(--line); }
.family-metrics div { padding: 9px; background: white; }
.family-metrics dt { color: var(--muted); font-size: 8px; }
.family-metrics dd { margin: 3px 0 0; font-size: 18px; font-weight: 760; }
.model-list-title { margin: 17px 0 8px; font-size: 12px; }
.inspector-model-list button { grid-template-columns: 42px minmax(0,1fr) auto; }
.membership-path-list { display: grid; gap: 5px; margin-top: 16px; }
.membership-path-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 8px; align-items: center; min-height: 38px; padding: 6px 8px; border-left: 4px solid var(--family-color); background: var(--surface-2); }
.membership-path-row b, .membership-path-row span, .membership-path-row em { font-size: 9px; line-height: 1.3; }
.membership-path-row span { overflow-wrap: anywhere; }
.membership-path-row em { color: var(--muted); font-style: normal; }

.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; padding: 26px 48px 16px; }
.result-count { margin: 0; color: var(--muted); font-size: 12px; }
.architecture-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; padding: 0 48px 36px; }
.architecture-card { display: grid; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-top: 5px solid var(--family-color); border-radius: 5px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.architecture-card:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.architecture-card-media { display: grid; grid-template-columns: 1fr 1fr; min-height: 170px; border-bottom: 1px solid var(--line); }
.architecture-card-media > div { min-width: 0; padding: 8px; }
.architecture-card-media > div:first-child { border-right: 1px solid var(--line); background: #f8fafb; }
.card-example { background: #eef4f1; }
.card-example code { display: block; margin-top: 18px; color: #143b32; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.card-example small { display: block; margin-top: 10px; color: #557067; font-size: 9px; line-height: 1.4; }
.architecture-card-body { padding: 12px; }
.architecture-card-body h3 { margin: 0; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.architecture-card-body p { display: -webkit-box; margin: 5px 0 12px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.architecture-card-body > div { display: flex; flex-wrap: wrap; gap: 5px; }
.architecture-card-body span { padding: 4px 6px; background: var(--surface-2); color: var(--muted); font-size: 8px; }
.architecture-card-body .collection-tag, .collection-chip { display: inline-flex; align-items: center; gap: 4px; background: #e8f0f5; color: #294b60; font-weight: 740; }
.architecture-card-body .collection-tag svg, .collection-chip svg { width: 11px; height: 11px; }
.collection-chip { padding: 5px 7px; font-size: 9px; }
.empty-state { margin: 0 48px 36px; padding: 60px 20px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }
.empty-state svg { width: 26px; height: 26px; }

.table-shell { margin: 0 48px 18px; overflow: auto; border: 1px solid var(--line-strong); background: var(--surface); }
.evidence-table { width: 100%; min-width: 1030px; border-collapse: collapse; table-layout: fixed; }
.evidence-table th { padding: 9px 10px; background: var(--surface-2); color: var(--muted); text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; }
.evidence-table th:nth-child(1) { width: 18%; }
.evidence-table th:nth-child(2) { width: 29%; }
.evidence-table th:nth-child(3) { width: 15%; }
.evidence-table th:nth-child(4) { width: 38%; }
.evidence-table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: top; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.evidence-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.evidence-table td:nth-child(2) svg { width: 12px; height: 12px; margin: 0 5px; vertical-align: middle; }
.evidence-table blockquote { margin: 0; font-size: 9px; }
.table-model-link { padding: 0; border: 0; background: none; color: var(--ink); text-align: left; text-decoration: underline; cursor: pointer; font-size: 10px; font-weight: 760; }
.table-family { display: inline-block; padding: 3px 5px; border-left: 4px solid var(--family-color); background: var(--surface-2); font-size: 9px; font-weight: 800; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 0 48px 36px; color: var(--muted); font-size: 10px; }
.pagination button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid var(--line-strong); background: white; cursor: pointer; font-size: 10px; }
.pagination button:disabled { opacity: 0.4; cursor: default; }
.pagination svg { width: 13px; height: 13px; }

.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 20px 48px 30px; border-top: 1px solid var(--line); font-size: 10px; }
.site-footer p { max-width: 640px; }
.loading-screen { position: fixed; z-index: 1000; inset: 0; display: grid; place-content: center; gap: 12px; background: var(--surface); text-align: center; transition: opacity 180ms, visibility 180ms; }
.loading-screen.is-hidden { opacity: 0; visibility: hidden; }
.loading-screen p { margin: 0; color: var(--muted); }
.loading-mark { width: 44px; height: 18px; margin: auto; border-top: 4px solid var(--f1); border-right: 4px solid var(--f3); border-bottom: 4px solid var(--f2); border-left: 4px solid var(--f4); animation: loading 0.9s linear infinite; }
@keyframes loading { to { transform: rotate(360deg); } }

@media (max-width: 1200px) {
  .app-header { grid-template-columns: 1fr auto; padding: 20px 28px 16px; }
  .header-stats { grid-column: 1 / -1; grid-row: 2; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .view-tabs, .filter-bar { padding-left: 28px; padding-right: 28px; }
  .filter-bar { grid-template-columns: minmax(220px,1fr) minmax(250px,auto) repeat(3,minmax(140px,.6fr)) 38px; }
  .modality-field { grid-column: 1 / 3; }
  .graph-heading { padding-left: 28px; padding-right: 28px; }
  .graph-workspace { grid-template-columns: minmax(0,1fr) 360px; margin: 0 18px; }
  .architecture-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding-left: 28px; padding-right: 28px; }
  .section-heading { padding-left: 28px; padding-right: 28px; }
  .table-shell { margin-left: 28px; margin-right: 28px; }
}

@media (max-width: 820px) {
  .app-header { grid-template-columns: 1fr; gap: 14px; padding: 17px 16px 14px; }
  .brand-block h1 { font-size: 28px; }
  .brand-block p { font-size: 12px; }
  .header-actions { grid-column: 1; grid-row: 2; }
  .header-stats { grid-column: 1; grid-row: 3; grid-template-columns: repeat(2,1fr); }
  .view-tabs { padding: 6px 10px 0; overflow-x: auto; }
  .view-tab { flex: 0 0 auto; padding: 8px 10px; font-size: 11px; }
  .filter-bar { position: static; grid-template-columns: 1fr 38px; padding: 9px 10px; }
  .search-field { grid-column: 1; }
  .family-filter, .select-field { grid-column: 1 / -1; }
  .family-filter { grid-row: auto; }
  #clear-filters { grid-column: 2; grid-row: 1; }
  .graph-heading { grid-template-columns: 1fr auto; gap: 9px; padding: 14px 12px 10px; }
  .graph-heading h2 { font-size: 17px; }
  .graph-summary { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .graph-toolbar { grid-column: 2; grid-row: 1; }
  .graph-toolbar .text-command span { display: none; }
  .graph-toolbar .text-command { width: 38px; padding: 0; justify-content: center; }
  .graph-workspace { display: block; height: auto; min-height: 0; margin: 0 8px; box-shadow: none; }
  .graph-canvas { height: 540px; border-bottom: 1px solid var(--line-strong); }
  .graph-inspector { height: auto; max-height: none; border-left: 0; }
  .inspector-scroll { max-height: none; padding: 16px; }
  .inspector-evidence, .inspector-section, .evidence-absence { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .paper-crop-detail { max-height: none; }
  .example-flow, .route-flow { grid-template-columns: 1fr; gap: 6px; }
  .example-flow svg, .route-flow svg { transform: rotate(90deg); justify-self: center; }
  .architecture-grid { grid-template-columns: 1fr; gap: 10px; padding: 0 10px 28px; }
  .section-heading { padding: 20px 12px 12px; }
  .section-heading h2 { font-size: 18px; }
  .architecture-card-media { min-height: 150px; }
  .table-shell { margin: 0 10px 16px; }
  .pagination { padding: 0 10px 28px; }
  .site-footer { display: grid; padding: 17px 14px 25px; }
}

@media (max-width: 450px) {
  .header-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-block { min-height: 52px; }
  .stat-block strong { font-size: 19px; }
  .graph-canvas { height: 490px; }
  .graph-key { right: 8px; left: 8px; justify-content: center; }
  .architecture-card-media { grid-template-columns: 44% 56%; }
  .paper-crop-card { height: 140px !important; }
  .card-example code { margin-top: 10px; font-size: 9px; }
  .provenance-grid { grid-template-columns: 1fr; }
  .provenance-grid .wide { grid-column: 1; }
  .paper-link-row { align-items: flex-start; flex-direction: column; }
}
