:root {
  color-scheme: dark;
  --bg: #111617;
  --panel: #192122;
  --line: #354447;
  --text: #f5f4e9;
  --muted: #b6c5c5;
  --accent: #ccf574;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
.shell { width: min(1320px, 100% - clamp(36px, 10vw, 144px)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: 8px; z-index: 10; padding: 10px; background: var(--bg); transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-header { background: #151a1b; border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; font-weight: 950; font-size: 25px; line-height: 1; letter-spacing: -.04em; }
.brand img { object-fit: contain; margin-right: 9px; height: 32px; width: 20px; }
.brand span, .nav-action span { color: var(--accent); }
nav, .site-footer div { display: flex; align-items: center; gap: clamp(12px, 3vw, 40px); }
nav a, .nav-action, .site-footer div a { color: var(--muted); font-size: .88rem; font-weight: 650; }
nav a:hover, .nav-action:hover, .site-footer a:hover, .back:hover { color: var(--accent); }
.nav-action { border: 1px solid var(--line); padding: 8px 13px; white-space: nowrap; }
.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(570px, 76svh, 800px); }
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-image { object-fit: cover; object-position: 62% 54%; }
.hero-shade { background: linear-gradient(90deg, #101617fa, #101617db 26%, #10161765 57%, #10161708 100%), linear-gradient(0deg, #111617, transparent 30%); }
.hero-inner { padding-block: 72px 92px; }
.hero-label, .eyebrow { display: flex; align-items: center; gap: 11px; color: var(--accent); font: 700 .75rem/1.4 ui-monospace, Menlo, monospace; letter-spacing: .13em; }
.hero-label span { height: 1px; width: 18px; background: var(--line); }
.hero-label i, .chain-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 { font: 950 clamp(6.2rem, 17vw, 15.4rem)/.86 -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: -.065em; margin: 22px 0; width: fit-content; padding-right: .1em; }
.hero h1 span { color: var(--accent); }
.hero-lead { font-size: clamp(1.4rem, 3vw, 2.45rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.06; }
.hero-copy { margin-top: 16px; color: var(--muted); max-width: 40ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.button { display: inline-flex; gap: 18px; justify-content: space-between; align-items: center; padding: 12px 17px; background: var(--accent); color: #151d12; font-weight: 780; font-size: .88rem; border: 1px solid var(--accent); }
.button:hover { background: #e0ff9e; }
.button.secondary { background: #152020ba; color: var(--text); border-color: #637371; }
.button.secondary:hover { color: var(--accent); border-color: var(--accent); }
.hero-caption { position: absolute; right: max(18px, calc((100vw - 1320px) / 2), 5vw); bottom: 31px; display: flex; align-items: center; gap: 11px; background: #111617de; border: 1px solid var(--line); padding: 9px 12px; }
.hero-caption span { color: var(--muted); font: .68rem ui-monospace, Menlo, monospace; }
.hero-caption b, .map-card b, .mode-grid a { color: var(--accent); }
.map-section { padding-block: 62px 84px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.section-head h2, .document h1 { font-size: clamp(2.3rem, 6vw, 5rem); font-weight: 900; letter-spacing: -.05em; line-height: 1.04; margin-top: 8px; }
.section-head > p { max-width: 38ch; color: var(--muted); }
.map-grid, .mode-grid, .system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.map-card { position: relative; min-width: 0; display: grid; align-items: end; aspect-ratio: 1.56; overflow: hidden; border: 1px solid var(--line); isolation: isolate; }
.map-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.map-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #101617f5, transparent 77%); }
.map-card:hover { border-color: var(--accent); }
.map-card:hover img { transform: scale(1.045); }
.card-content { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding: 17px; }
.card-content strong { display: block; font-size: clamp(1.04rem, 2vw, 1.65rem); line-height: 1.1; }
.card-content small { color: #d0dbd9; }
.mode-section { padding-block: 63px 76px; background: #161e1f; border-block: 1px solid var(--line); }
.mode-grid article, .system-grid article { padding: clamp(17px, 3vw, 27px); border: 1px solid var(--line); background: var(--panel); }
.mode-grid article { display: flex; flex-direction: column; gap: 9px; }
.mode-grid h3 { font-size: 1.65rem; letter-spacing: -.04em; }
.mode-grid article p:not(.eyebrow), .system-grid p, .document > p:not(.eyebrow), .map-detail section p { color: var(--muted); }
.mode-grid a { margin-top: auto; padding-top: 11px; font-weight: 700; font-size: .87rem; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding-block: 27px; color: var(--muted); }
.site-footer .brand { color: var(--text); }
.site-footer p { font-size: .85rem; }
.document { padding-block: 40px 78px; min-height: 75vh; }
.document h1 { margin-bottom: 17px; overflow-wrap: anywhere; }
.document > h2, .map-detail section h2 { font-size: clamp(1.42rem, 3vw, 2rem); letter-spacing: -.04em; margin: 27px 0 10px; }
.back { display: inline-block; margin-bottom: 27px; color: var(--muted); }
.intro { font-size: clamp(1rem, 2vw, 1.23rem); max-width: 65ch; }
.system-grid, .ledger, .map-facts { margin-top: 25px; }
.system-grid h2 { font-size: 1.22rem; margin-bottom: 7px; }
.routes { margin: 0 0 17px; }
.routes > div { display: grid; grid-template-columns: minmax(250px, .9fr) 1.5fr; gap: 14px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.routes dt { font-weight: 700; overflow-wrap: anywhere; }
.routes a { color: var(--accent); }
.routes dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.ledger { max-width: 950px; border: 1px solid var(--line); padding: 16px; margin-bottom: 17px; }
.chain-status { display: flex; align-items: center; gap: 9px; color: var(--accent); font-weight: 700; }
.document > .button { margin-top: 17px; }
.map-facts { display: flex; flex-wrap: wrap; gap: 12px; }
.map-facts > div { min-width: 140px; border: 1px solid var(--line); padding: 9px 15px; }
.map-facts dt { color: var(--muted); font-size: .82rem; }
.map-facts dd { margin: 0; color: var(--accent); font-weight: 850; font-size: 1.45rem; }
.gallery { margin-top: 17px; border: 1px solid var(--line); background: var(--panel); padding: clamp(12px, 2vw, 22px); }
.gallery h3 { margin-bottom: 10px; font-size: 1.2rem; }
.gallery figure img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; background: #0d1213; }
.gallery figcaption { color: var(--muted); padding-block: 7px; }
.frames { display: flex; flex-wrap: wrap; gap: 7px; }
.frame { border: 1px solid var(--line); padding: 6px 10px; font-size: .85rem; }
.frame:hover, .frame[aria-current] { color: var(--accent); border-color: var(--accent); }
@media (max-width: 800px) {
  .map-grid, .mode-grid, .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-action { display: none; }
  .routes > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
@media (max-width: 540px) {
  .nav-row { min-height: 57px; gap: 10px; }
  nav a { font-size: .76rem; }
  .brand { font-size: 19px; }
  .brand img { margin-right: 5px; width: 15px; height: 24px; }
  .hero { min-height: 575px; }
  .hero-image { object-position: 56% 50%; }
  .hero-shade { background: linear-gradient(90deg, #101617df, #10161778), linear-gradient(0deg, #111617, transparent 70%); }
  .hero h1 { font-size: clamp(4.7rem, 20vw, 8rem); }
  .section-head { align-items: start; flex-direction: column; gap: 9px; }
  .map-grid, .mode-grid, .system-grid { grid-template-columns: 1fr; }
  .map-section, .mode-section { padding-block: 38px; }
  .site-footer { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map-card img { transition: none; }
}
.gallery-image { position: relative; }
.gallery figure img { aspect-ratio: 1080/684; }
.gallery canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.legend:not([hidden]) { display: flex; flex-wrap: wrap; gap: 7px 16px; padding-top: 7px; }
.legend span { font-size: .86rem; }
.legend span::before { display: inline-block; content: ""; margin-right: 6px; width: .6em; height: .6em; border-radius: 50%; background: currentColor; }
.legend .network { color: #75e3fa; }
.legend .solo { color: #ccf574; }
.legend .mission { color: #ffc888; }
