:root {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: #aab3c3;
  --subtle: #748096;
  --canvas: #080b10;
  --surface: #10151d;
  --surface-strong: #151c26;
  --line: #273140;
  --line-strong: #3c4a5f;
  --accent: #8db7f4;
  --available: #7bd7a7;
  --development: #8db7f4;
  --planned: #d3ad78;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 88% 5%, rgb(60 100 155 / 22%), transparent 34rem),
    radial-gradient(circle at 8% 35%, rgb(35 88 92 / 12%), transparent 26rem),
    var(--canvas);
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #0b1018;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header,
main,
footer {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}
.site-header {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid rgb(255 255 255 / 9%);
}
.brand {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .28em;
  text-decoration: none;
}
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 180ms ease;
}
.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-header nav a[aria-current="page"] { color: var(--ink); }
.site-header .hub-link {
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.hero { padding: clamp(76px, 12vw, 154px) 0 64px; }
.eyebrow,
.section-index {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 1020px;
  margin: 0;
  font-size: clamp(48px, 8.7vw, 112px);
  font-weight: 720;
  letter-spacing: -.065em;
  line-height: .9;
}
.hero h1 span { color: #78859a; }
.hero > p {
  max-width: 670px;
  margin: 38px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.55;
}
.hero-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  margin-top: 46px;
  color: var(--subtle);
  font-size: 13px;
}
.hero-summary span { display: flex; align-items: baseline; gap: 8px; }
.hero-summary strong { color: var(--ink); font-size: 20px; }

.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
}
.legend-title { margin-right: auto; color: var(--subtle); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status > span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-available { color: var(--available); }
.status-development { color: var(--development); }
.status-planned { color: var(--planned); }

.osmograph-shell {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgb(20 27 37 / 96%), rgb(11 15 22 / 96%));
  box-shadow: 0 34px 90px rgb(0 0 0 / 28%);
}
.map-heading { display: flex; justify-content: space-between; gap: 28px; align-items: end; }
.map-heading h2,
.detail-panel h2,
.principles h2 { margin: 0; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.045em; line-height: 1.05; }
.map-heading > p { max-width: 400px; margin: 0; color: var(--subtle); font-size: 13px; line-height: 1.6; text-align: right; }
.osmograph-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; margin-top: 30px; }
.map-scroll {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px),
    #0a0e14;
  background-size: 42px 42px;
  scrollbar-color: var(--line-strong) transparent;
}
.map-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.map-canvas { position: relative; min-width: 760px; height: 560px; }
.relationship-layer,
.node-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.relationship-layer line { stroke: #304054; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.relationship-layer line.is-active { stroke: var(--accent); stroke-width: 2.5; }

.osmograph-node {
  --node-color: var(--development);
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 146px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgb(16 22 31 / 96%);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transform: translate(-50%, -50%);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.osmograph-node::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin-bottom: 9px;
  border-radius: 50%;
  background: var(--node-color);
}
.osmograph-node[data-status="Available"] { --node-color: var(--available); }
.osmograph-node[data-status="Planned"] { --node-color: var(--planned); }
.osmograph-node:hover { border-color: var(--node-color); background: #151d28; }
.osmograph-node:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.osmograph-node[aria-pressed="true"] {
  border-color: var(--node-color);
  background: #192331;
  box-shadow: 0 0 0 1px var(--node-color), 0 16px 35px rgb(0 0 0 / 35%);
}
.osmograph-node.is-central {
  width: 160px;
  min-height: 96px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  border-color: var(--accent);
  background: radial-gradient(circle at 35% 25%, #29446d, #111927 68%);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: .18em;
  text-align: center;
}
.osmograph-node.is-central::before { display: none; }
.node-title { display: block; font-size: 13px; font-weight: 740; line-height: 1.25; }
.node-status { display: block; margin-top: 5px; color: var(--subtle); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }

.detail-panel {
  min-height: 560px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-strong);
}
.detail-status { display: inline-flex; align-items: center; margin: 3px 0 22px; color: var(--accent); font-size: 12px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.detail-panel h2 { font-size: 32px; }
.detail-description { margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.related-title { margin: 38px 0 12px; color: var(--subtle); font-size: 11px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10161f;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
}
.related-button:hover { border-color: var(--accent); color: var(--ink); }
.related-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.map-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; padding: 30px; color: var(--muted); text-align: center; }
.map-empty[hidden] { display: none; }
.map-empty strong { color: var(--ink); font-size: 24px; }
.map-notice { margin: 18px 0 0; color: var(--planned); font-size: 13px; }

.principles { display: grid; grid-template-columns: .78fr 1.22fr; gap: 70px; padding: clamp(90px, 13vw, 160px) 0; }
.principles h2 { font-size: clamp(40px, 6vw, 72px); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.principle-grid article { padding: 24px; background: var(--canvas); }
.principle-grid span { color: var(--accent); font-size: 12px; }
.principle-grid h3 { margin: 50px 0 12px; font-size: 17px; }
.principle-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.noscript-map { margin: 0 0 80px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; }
.noscript-map li { margin: 10px 0; color: var(--muted); }

footer { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 34px 0 50px; border-top: 1px solid var(--line); }
footer p, footer small { margin: 0; color: var(--subtle); font-size: 12px; }
footer small { text-align: right; }

@media (max-width: 980px) {
  .osmograph-layout { grid-template-columns: 1fr; }
  .detail-panel { min-height: auto; }
  .related-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 680px) {
  .site-header, main, footer { width: min(100% - 24px, 1240px); }
  .site-header { min-height: 68px; }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: 12px; }
  .site-header nav a:first-child { display: none; }
  .site-header .hub-link { padding: 8px 10px; }
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: clamp(44px, 15vw, 70px); line-height: .93; }
  .hero > p { font-size: 17px; }
  .legend-title { width: 100%; margin: 0; }
  .osmograph-shell { padding: 18px 12px; border-radius: 22px; }
  .map-heading { display: block; padding-inline: 6px; }
  .map-heading > p { margin-top: 14px; text-align: left; }
  .map-scroll { border-radius: 16px; }
  .map-canvas { min-width: 700px; height: 520px; }
  .osmograph-node { width: 134px; min-height: 72px; }
  .osmograph-node.is-central { width: 146px; min-height: 88px; }
  .detail-panel { padding: 20px; border-radius: 16px; }
  .related-list { grid-template-columns: 1fr; }
  .principles { padding: 90px 0; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { padding: 22px 4px 28px; }
  .principle-grid h3 { margin-top: 24px; }
  footer { grid-template-columns: 1fr; gap: 14px; }
  footer small { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
