/* Titan Data Atlas. Pro-style tokens (Clash Grotesk + Sentient), one route blue,
   and a muted haze amber used only for the wordmark and map accents. */
:root {
  --font-head: 'Clash Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Sentient', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;

  --ink: #16181d;   --muted: #5b616e;  --paper: #f6f4ef;
  --card: #ffffff;  --line: #e3e0d8;   --accent: #1f47c9;  --on-accent: #ffffff;
  --haze: #b0681f;  --soft: #edeae2;   --accent-soft: #e4e9f8;
  --ok: #1d6b45;    --warn: #8a5300;

  --radius-panel: 14px; --radius-card: 10px; --radius-btn: 8px; --radius-tag: 4px;
  --space: 8px;
  --measure: 64ch;
  --wide: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ecebe7; --muted: #a3a8b3; --paper: #121418;
    --card: #1b1e24; --line: #2b2f37; --accent: #7f9bff; --on-accent: #0d1020;
    --haze: #e0a35e; --soft: #20242b; --accent-soft: #1e2640; --ok: #7fd3a4; --warn: #f0c46a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ecebe7; --muted: #a3a8b3; --paper: #121418;
  --card: #1b1e24; --line: #2b2f37; --accent: #7f9bff; --on-accent: #0d1020;
  --haze: #e0a35e; --soft: #20242b; --accent-soft: #1e2640; --ok: #7fd3a4; --warn: #f0c46a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
code { font: 600 0.86em var(--font-mono); background: var(--soft); padding: 0.1em 0.35em; border-radius: var(--radius-tag); overflow-wrap: anywhere; }
h1, h2, h3, .h3 { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.05; letter-spacing: -0.02em; max-width: 15ch; margin: 8px 0 16px; }
h1.h1-long { max-width: 22ch; font-size: clamp(32px, 5vw, 46px); }
h2 { font-size: clamp(24px, 3.5vw, 30px); line-height: 1.15; letter-spacing: -0.01em; margin: 56px 0 16px; }
h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.005em; margin: 24px 0 8px; }
p, li, dd, dt, th, td, h1, h2, h3, figcaption, summary { max-width: var(--measure); overflow-wrap: anywhere; }
main, .prod-main, .prod-side, .panel, .sample, section { min-width: 0; }
.eyebrow { font: 600 13px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin: 0 0 8px; }
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.caption { font-size: 14px; line-height: 1.45; color: var(--muted); }
.caption .i { width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; color: var(--muted); margin: 48px 0 0; font-size: 15px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 16px; background: var(--card); padding: 8px 12px; z-index: 1000; border-radius: var(--radius-btn); }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
[hidden] { display: none !important; }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--line); }
.head-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; max-width: var(--wide); margin: 0 auto; padding: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 600 19px/1 var(--font-head); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.wordmark .mark { width: 30px; height: 30px; color: var(--ink); }
.site-head nav { display: flex; flex-wrap: wrap; gap: 4px 22px; flex: 1; }
.site-head nav a { font: 500 15px/1 var(--font-head); color: var(--ink); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.site-head nav a:hover, .site-head nav a[aria-current] { border-bottom-color: var(--accent); }
.theme { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--ink); }
.theme:hover { border-color: var(--accent); color: var(--accent); }
.theme .i { width: 20px; height: 20px; }
.theme .i-sun { display: none; }
:root[data-theme="dark"] .theme .i-sun { display: block; }
:root[data-theme="dark"] .theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme .i-moon { display: none; }
}
@media (max-width: 640px) {
  .head-in { gap: 4px 16px; }
  .site-head nav { order: 3; flex-basis: 100%; gap: 0 18px; }
  .theme { margin-left: auto; }
}
main { max-width: var(--wide); margin: 0 auto; padding: 32px 16px 80px; }
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.foot-in { max-width: var(--wide); margin: 0 auto; padding: 24px 16px 48px; }
.foot-in p { margin: 6px 0; }
.disclaimer { color: var(--ink); }

/* Buttons and small marks */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 500 15px/1 var(--font-head); background: var(--accent); color: var(--on-accent); text-decoration: none; padding: 12px 18px; border-radius: var(--radius-btn); border: 1px solid var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.more { display: inline-flex; align-items: center; gap: 6px; font: 500 15px var(--font-head); text-decoration: none; }
.more:hover { text-decoration: underline; }
.tag { display: inline-block; font: 600 11px/1.4 var(--font-mono); color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-tag); padding: 1px 6px; margin: 0 4px 4px 0; white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.lvl, .aud, .approx, .lic { display: inline-flex; align-items: center; gap: 5px; font: 500 13px/1.3 var(--font-head); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.lic { white-space: normal; max-width: 100%; border-radius: 12px; }
.lvl { background: var(--accent-soft); color: var(--accent); }
.lvl-raw { background: var(--soft); color: var(--ink); }
.aud { background: var(--soft); color: var(--muted); }
.approx { background: transparent; border: 1px solid var(--warn); color: var(--warn); }
.approx .i { width: 14px; height: 14px; }
.lic { border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.lic:hover { border-color: var(--accent); color: var(--accent); }
.lic-none { color: var(--warn); border-style: dashed; border-color: var(--warn); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }

/* Opens-in marks: filled dot = opens, half = after a conversion, ring = not confirmed. */
.open { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.3 var(--font-head); color: var(--ink); white-space: nowrap; }
.open .dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--accent); flex: none; }
.open-yes .dot { background: var(--accent); }
.open-with-conversion .dot { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.open-unknown { color: var(--muted); }
.open-unknown .dot { border-color: var(--muted); border-style: dashed; }
.opens { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.opens-label { font: 600 11px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.open-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.open-legend li { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }

/* Copy blocks */
.copyable { margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; background: var(--soft); min-width: 0; }
.copyable figcaption { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: var(--card); border-bottom: 1px solid var(--line); font: 500 14px var(--font-head); }
.copyable figcaption > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.copy { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 500 13px var(--font-head); background: none; color: var(--accent); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 5px 10px; cursor: pointer; flex: none; }
.copy:hover { border-color: var(--accent); }
.copy .i { width: 15px; height: 15px; }
.copyable pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.copyable pre code { background: none; padding: 0; font: 600 13px/1.6 var(--font-mono); white-space: pre; overflow-wrap: normal; }
.copyable.cite pre code { font: 400 15px/1.55 var(--font-body); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding: 24px 0 8px; }
.hero h1 { font-size: clamp(36px, 5.6vw, 58px); max-width: 13ch; }
.hero-fig { margin: 0; min-width: 0; }
.hero-map { position: relative; display: block; border-radius: var(--radius-panel); overflow: hidden; background: var(--soft); border: 1px solid var(--line); aspect-ratio: 2 / 1; }
.hero-map img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.grat { position: absolute; inset: 0; width: 100%; height: 100%; }
.grat line { stroke: #ffffff; stroke-opacity: 0.28; stroke-width: 0.6; vector-effect: non-scaling-stroke; stroke-dasharray: 2 3; }
.ticks { position: relative; height: 22px; margin: 4px 8px 0; font: 600 11px var(--font-mono); color: var(--muted); }
.ticks span { position: absolute; transform: translateX(-50%); top: 2px; }
.ticks span:first-child { transform: none; }
.ticks span:last-child { transform: translateX(-100%); }
@media (max-width: 560px) { .ticks span:nth-child(2):not(:last-child), .ticks span:nth-child(6):not(:last-child) { display: none; } }
.hero-fig figcaption { font-size: 14px; line-height: 1.45; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 24px; } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 56px 0 0; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { display: flex; flex-direction: column; gap: 6px; }
.stat { font: 600 34px/1 var(--font-head); letter-spacing: -0.02em; }
.stat-l { font-size: 15px; line-height: 1.4; color: var(--muted); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.doors { margin-top: 56px; }
.doors h2 { margin-top: 0; }
.door-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.door { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px 24px 56px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); color: var(--ink); text-decoration: none; }
.door:hover { border-color: var(--accent); }
.door-i { width: 32px; height: 32px; color: var(--accent); margin-bottom: 8px; }
.door-h { font: 600 22px/1.2 var(--font-head); letter-spacing: -0.01em; }
.door-p { color: var(--muted); font-size: 16px; line-height: 1.55; }
.door-go { position: absolute; left: 24px; bottom: 20px; color: var(--accent); }
.door-go .i { width: 22px; height: 22px; }
@media (max-width: 860px) { .door-grid { grid-template-columns: 1fr; } .door { padding-bottom: 24px; } .door-go { position: static; } }

/* The diagram */
.atlas h2 { margin-top: 0; }
.atlas { margin-top: 72px; }
.atlas-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 16px 8px; margin-top: 24px; }
.atlas-svg { width: 100%; height: auto; display: block; font: 500 15px var(--font-head); }
.atlas-svg text { fill: var(--ink); }
.atlas-svg circle { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
.atlas-svg .links path { fill: none; stroke: var(--accent); stroke-opacity: 0.28; stroke-width: 1.4; }
.atlas-svg a { cursor: pointer; }
.atlas-svg a:focus { outline: none; }
.atlas-svg a:focus-visible text { text-decoration: underline; text-decoration-thickness: 2px; }
.atlas-svg a:focus-visible circle { stroke-width: 4; }
.atlas-svg.lit .links path { stroke-opacity: 0.07; }
.atlas-svg.lit .links path.on { stroke-opacity: 1; stroke-width: 2.6; }
.atlas-svg.lit a.on circle { fill: var(--accent); }
.atlas-svg.lit a:not(.on) text { fill: var(--muted); opacity: 0.6; }
.as-list { margin-top: 12px; }
.as-list summary { cursor: pointer; font: 500 15px var(--font-head); color: var(--accent); padding: 4px 0; }
.task-list { padding-left: 0; list-style: none; }
.task-list > li { padding: 10px 0; border-top: 1px solid var(--line); max-width: none; }
.task-list .task { font: 500 16px var(--font-head); }
.task-list ul { margin: 4px 0 0; padding-left: 20px; }
@media (max-width: 720px) { .atlas-wrap { display: none; } .as-list summary { display: none; } }

.strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 72px; }
.strip-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 28px; min-width: 0; }
.strip-card h2 { font-size: 24px; margin: 12px 0 8px; }
.strip-card p { margin: 8px 0; }
.strip-i { width: 30px; height: 30px; color: var(--haze); }
@media (max-width: 860px) { .strip { grid-template-columns: 1fr; } .strip-card { padding: 20px; } }

/* Products */
.legends { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px 40px; margin: 24px 0; padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); }
.lvl-legend { margin: 0; display: grid; gap: 8px; }
.lvl-legend div { display: flex; gap: 12px; align-items: baseline; }
.lvl-legend dt { flex: none; width: 96px; }
.lvl-legend dd { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .legends { grid-template-columns: 1fr; padding: 16px; } .lvl-legend div { flex-direction: column; gap: 2px; } }
.filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; margin: 24px 0 8px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font: 500 14px var(--font-head); }
select { font: 400 16px var(--font-body); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 9px 12px; min-width: 180px; max-width: 100%; }
.count { color: var(--muted); min-height: 1.6em; font-size: 15px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; min-width: 0; }
.pcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.size { font: 600 13px var(--font-mono); color: var(--muted); }
.pcard-h { font-size: 21px; line-height: 1.2; margin: 14px 0 6px; }
.pcard-h a { color: var(--ink); text-decoration: none; }
.pcard-h a:hover { color: var(--accent); text-decoration: underline; }
.pcard p { margin: 4px 0 10px; font-size: 16px; line-height: 1.55; }
.pcard .formats { margin: 0 0 12px; }
.pcard-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* Product page */
.crumb { margin: 0 0 16px; font: 500 15px var(--font-head); }
.crumb a { text-decoration: none; }
.crumb a::before { content: "\2190\00a0"; }
.prod-head { padding-bottom: 8px; }
.prod { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; margin-top: 16px; }
.prod-main > section:first-child h2 { margin-top: 8px; }
.prod-side { display: grid; gap: 16px; }
@media (max-width: 920px) {
  .prod { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .prod-side { display: contents; }
  .prod-side > .panel:first-child { order: -1; }
  .prod-side > .panel:last-child { order: 1; }
}
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 20px 22px; min-width: 0; }
.panel h3:first-child, .panel h2:first-child { margin-top: 0; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.facts dt { font: 600 11px/1.6 var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; }
.facts .opens { flex-direction: column; align-items: flex-start; gap: 4px; }
.side-actions { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 0; }
.side-actions .btn { justify-content: center; }
.side-h { font: 600 11px/1.6 var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 18px 0 4px; }
.panel .side-h:first-child { margin-top: 0; }
.dois { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.dois a { font: 600 13px var(--font-mono); }

.tabs { margin-top: 16px; }
.tablist { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tablist [role="tab"] { display: inline-flex; align-items: center; gap: 8px; font: 500 15px var(--font-head); color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; cursor: pointer; margin-bottom: -1px; white-space: nowrap; }
.tablist [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tablist [role="tab"]:hover { color: var(--ink); }
.tabpanel { padding: 8px 0 0; }
.tabs.js .panel-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.openstate { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 15px; }
.steps { padding-left: 1.4em; }
.steps li { margin: 8px 0; padding-left: 4px; }
.steps li::marker { font: 600 15px var(--font-head); color: var(--accent); }
.caveats { display: flex; gap: 12px; padding: 14px 16px; background: var(--soft); border-radius: var(--radius-card); font-size: 15px; }
.caveats .i { color: var(--warn); width: 20px; height: 20px; margin-top: 2px; }
.caveats ul { margin: 0; padding-left: 0; list-style: none; }
.caveats li + li { margin-top: 6px; }
.crs-note { display: flex; gap: 10px; font-size: 15px; color: var(--muted); margin-top: 20px; }
.crs-note .i { width: 20px; height: 20px; color: var(--haze); margin-top: 3px; }

/* Samples */
.sample { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 20px 22px; margin: 16px 0; min-width: 0; }
.sample-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sample-head h2, .sample-head h3 { margin: 0; font-size: 20px; }
.sample-head .tag { margin: 0; }
.kv { display: grid; gap: 6px; margin: 14px 0; font-size: 15px; }
.kv div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv div { grid-template-columns: 1fr; gap: 0; } }
.files { list-style: none; padding: 0; margin: 12px 0; border-top: 1px solid var(--line); }
.files li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); max-width: none; font-size: 15px; }
.files a { display: inline-flex; align-items: center; gap: 8px; font: 500 15px var(--font-head); text-decoration: none; }
.files a:hover span { text-decoration: underline; }
.file-meta { color: var(--muted); }
.file-for { display: inline-flex; gap: 4px; margin-left: auto; }
.file-for span { font: 600 11px var(--font-mono); color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-tag); padding: 1px 6px; }
.checks { list-style: none; padding: 0; margin: 12px 0; font-size: 15px; }
.checks li { display: flex; gap: 8px; margin: 4px 0; }
.checks .i { color: var(--ok); margin-top: 3px; }
.wkt summary { cursor: pointer; font: 500 14px var(--font-head); color: var(--accent); }
.copyable.small pre code { font-size: 12px; }
.wkt .copyable pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.sample-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.sample-grid .sample { margin: 0; }

/* Audience pages */
.start-head { display: flex; gap: 24px; align-items: flex-start; }
.start-i { width: 56px; height: 56px; color: var(--accent); margin-top: 22px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--card); }
.start-head h1 { max-width: 18ch; }
@media (max-width: 640px) { .start-head { flex-direction: column; gap: 8px; } .start-i { margin-top: 0; width: 48px; height: 48px; } }
.qlist { list-style: none; padding: 0; margin: 0; }
.qlist li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 4px 24px; padding: 14px 0; border-top: 1px solid var(--line); max-width: none; }
.qlist .q { font: 500 17px var(--font-head); }
.qlist .qa { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 640px) { .qlist li { grid-template-columns: 1fr; } }
.tipgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 56px; }
.tip { display: flex; gap: 16px; margin-top: 48px; }
.tip > .i { width: 26px; height: 26px; color: var(--accent); margin-top: 2px; }
.tip h3 { margin: 0 0 6px; }
.tip p { margin: 6px 0; }
.bigcard { display: flex; align-items: center; gap: 20px; padding: 24px 28px; margin: 32px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); text-decoration: none; color: var(--ink); }
.bigcard:hover { border-color: var(--accent); }
.bigcard > .i:last-child { color: var(--accent); width: 24px; height: 24px; }
.big-i { width: 36px; height: 36px; color: var(--haze); }
.bigcard > span { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.big-h { font: 600 22px var(--font-head); }
.big-p { color: var(--muted); }
.explain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.explain { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; }
.explain h3 { margin: 0 0 8px; }
.explain h3 a { color: var(--ink); text-decoration: none; }
.explain h3 a:hover { color: var(--accent); text-decoration: underline; }
.explain p { margin: 0; font-size: 16px; }
.other-doors { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.other-doors a { display: inline-flex; align-items: center; gap: 6px; font: 500 16px var(--font-head); text-decoration: none; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card); }
.ref { border-collapse: collapse; width: 100%; font-size: 15px; }
.ref th, .ref td { text-align: left; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--line); }
.ref thead th { border-top: 0; font: 600 11px/1.4 var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); background: var(--soft); }
.ref tbody th { font: 500 15px/1.35 var(--font-head); }
.ref .num { font: 600 13px var(--font-mono); white-space: nowrap; }
.ref a .i { width: 14px; height: 14px; }
@media (max-width: 720px) {
  .ref thead { display: none; }
  .ref tr { display: block; padding: 12px 14px; border-top: 1px solid var(--line); }
  .ref tbody tr:first-child { border-top: 0; }
  .ref th, .ref td { display: block; border: 0; padding: 2px 0; }
  .ref .num { white-space: normal; }
}

/* Map viewer */
.mapcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); overflow: hidden; margin-top: 24px; }
.map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.layer-toggles { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.layer-toggles label { display: inline-flex; align-items: center; gap: 8px; font: 500 15px var(--font-head); cursor: pointer; }
.layer-toggles input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.readout { margin: 0; font: 600 13px var(--font-mono); color: var(--muted); min-width: 0; }
.map { height: clamp(300px, 52vw, 540px); background: var(--soft); }
.map:focus-visible { outline-offset: -3px; }
.leaflet-container { font: 400 13px var(--font-body); background: var(--soft); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--accent); }
.leaflet-bar a { background: var(--card); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: var(--soft); }
.leaflet-image-layer { image-rendering: auto; }
.pipeline { margin-top: 72px; }
.pipeline h2 { margin-top: 0; }
.pipe-steps { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.pipe-steps li { position: relative; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); max-width: none; }
.pipe-steps li:not(:last-child)::after { content: ""; position: absolute; right: -13px; top: 34px; width: 10px; height: 10px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg); }
.pipe-n { font: 600 34px/1 var(--font-head); color: var(--accent); letter-spacing: -0.02em; }
.pipe-steps h3 { margin: 10px 0 6px; font-size: 17px; }
.pipe-steps p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
@media (max-width: 860px) { .pipe-steps { grid-template-columns: 1fr 1fr; } .pipe-steps li::after { display: none; } }
@media (max-width: 520px) { .pipe-steps { grid-template-columns: 1fr; } }
.twocol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0 40px; }
@media (max-width: 760px) { .twocol { grid-template-columns: 1fr; } }
.interop { margin-top: 24px; border-left: 4px solid var(--haze); }
.interop-list { list-style: none; padding: 0; margin: 12px 0; }
.interop-list li { display: flex; gap: 10px; margin: 10px 0; font-size: 16px; }
.interop-list .i { width: 20px; height: 20px; margin-top: 3px; }
.interop-list .yes .i { color: var(--ok); }
.interop-list .no .i { color: var(--warn); }

/* MoonKAM */
.figs { align-items: start; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin: 24px 0; }
.fig { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 12px; }
.fig img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 6px; background: #000; }
.fig figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.inprogress { display: flex; gap: 16px; margin-top: 32px; }
.inprogress > .i { width: 28px; height: 28px; color: var(--haze); margin-top: 4px; }
.inprogress h2 { margin-top: 0; font-size: 22px; }
.plain { padding-left: 1.2em; }

/* Router (/find/) */
.credit { font-size: 14px; color: var(--muted); font-style: italic; }
.router { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 140px minmax(0, 0.85fr); gap: 0; margin-top: 32px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); }
.router-q { grid-column: 1; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.body-pick { display: flex; flex-direction: column; gap: 6px; font: 500 15px var(--font-head); }
.qgroup { border: 0; margin: 0; padding: 0; width: 100%; }
.qgroup legend { font: 600 16px var(--font-head); padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.chip { font: 500 14px/1.3 var(--font-head); text-align: left; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.reset { font: 500 14px var(--font-head); background: none; border: 0; color: var(--accent); cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 0.18em; }
.router-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.router-lines path { fill: none; stroke: var(--accent); stroke-opacity: 0.16; stroke-width: 1.2; }
.router-lines path.on { stroke-opacity: 0.95; stroke-width: 2.2; }
.router-lines path.peek { stroke-opacity: 0.55; stroke-width: 1.8; }
.router-s { grid-column: 3; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; justify-content: space-around; gap: 4px; }
.router-s li { display: flex; align-items: center; gap: 10px; font: 500 14px/1.3 var(--font-head); padding: 5px 0; color: var(--ink); max-width: none; }
.router-s .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); background: var(--card); flex: none; }
.router-s li.on .dot { background: var(--accent); }
.router-s li.off { opacity: 0.35; }
.router.has-choice .router-s li:not(.on) { color: var(--muted); }
@media (max-width: 860px) {
  .router { grid-template-columns: 1fr; padding: 16px; }
  .router-lines, .router-s { display: none; }
  .chips { flex-direction: row; flex-wrap: wrap; }
}
.shortlist h2 { margin-top: 48px; }
.ranked { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: rank; }
.ranked li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px 20px 18px 64px; max-width: none; counter-increment: rank; }
.ranked li::before { content: counter(rank); position: absolute; left: 20px; top: 16px; font: 600 28px/1 var(--font-head); color: var(--accent); }
.ranked h3 { margin: 0 0 6px; font-size: 19px; }
.ranked .badges { margin: 6px 0 8px; }
.ranked p { margin: 4px 0; font-size: 15px; }
.ranked .lbl { font: 600 11px var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-right: 6px; }
.nov { display: inline-flex; font: 500 13px/1.3 var(--font-head); padding: 3px 9px; border-radius: 999px; }
.nov-friendly { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.nov-moderate { background: var(--accent-soft); color: var(--accent); }
.nov-expert { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.matchn { font: 600 12px var(--font-mono); color: var(--muted); }

/* Connect, about */
.connect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 40px; }
.tools { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.tools div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tools dt code { font-size: 14px; }
.tools dd { margin: 0; }
@media (max-width: 640px) { .tools div { grid-template-columns: 1fr; } }
.doc { max-width: 780px; }
.doc h2 { margin-top: 40px; }

@media (prefers-reduced-motion: no-preference) {
  .atlas-svg .links path, .router-lines path { transition: stroke-opacity 0.18s ease, stroke-width 0.18s ease; }
  .atlas-svg circle, .router-s .dot, .chip, .door, .pcard, .btn { transition: background-color 0.18s ease, border-color 0.18s ease, fill 0.18s ease; }
  .tabpanel:not([hidden]) { animation: rise 0.2s ease; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
