:root {
  --nodes-map-line: rgba(255, 255, 255, 0.08);
  --nodes-map-land: rgba(255, 255, 255, 0.07);
  --nodes-map-label: rgba(11, 18, 32, 0.82);
  --nodes-map-node: rgba(18, 196, 222, 0.22);
  --nodes-route-muted: rgba(18, 196, 222, 0.46);
  --nodes-route-glow: rgba(224, 24, 111, 0.28);
  --nodes-section-line: rgba(228, 231, 236, 0.74);
  --nodes-tile-hover: rgba(18, 196, 222, 0.06);
}

.nodes-hero {
  padding-top: 14px;
}

.nodes-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  min-height: 590px;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  overflow: hidden;
  padding-top: clamp(42px, 6vw, 74px);
  padding-bottom: clamp(42px, 6vw, 74px);
  border-radius: var(--radius-card);
  background:
    radial-gradient(560px 310px at 80% 20%, var(--color-cyan-glow), var(--color-transparent)),
    radial-gradient(480px 300px at 75% 88%, var(--color-pink-glow), var(--color-transparent)),
    var(--color-deep);
}

.nodes-hero__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.nodes-hero h1 {
  max-width: 620px;
  margin-top: 22px;
  margin-bottom: 22px;
  color: var(--color-hero-text);
  font-size: clamp(52px, 5vw, 68px);
}

.nodes-hero h1 .no-break:last-child {
  background: linear-gradient(96deg, var(--color-accent), var(--color-accent-end));
  background-clip: text;
  color: var(--color-transparent);
  -webkit-background-clip: text;
}

.nodes-hero__lead {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--color-hero-muted);
  font-size: 17px;
  line-height: 1.8;
}

.nodes-hero__lead strong {
  color: var(--color-cyan);
}

.nodes-hero__actions {
  margin-top: 28px;
}

.nodes-hero__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 30px 0 0;
  padding: 1px;
  border: 1px solid var(--color-hero-line);
  border-radius: var(--radius-md);
  background: var(--color-hero-line);
  list-style: none;
}

.nodes-hero__facts li {
  min-width: 0;
  padding: 13px 15px;
  background: var(--color-deep);
}

.nodes-hero__facts li:first-child {
  border-top-left-radius: var(--radius-sm);
}

.nodes-hero__facts li:nth-child(2) {
  border-top-right-radius: var(--radius-sm);
}

.nodes-hero__facts li:nth-last-child(2) {
  border-bottom-left-radius: var(--radius-sm);
}

.nodes-hero__facts li:last-child {
  border-bottom-right-radius: var(--radius-sm);
}

.nodes-hero__facts span,
.nodes-hero__facts strong {
  display: block;
  overflow-wrap: anywhere;
}

.nodes-hero__facts span {
  margin-bottom: 3px;
  color: var(--color-hero-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.nodes-hero__facts strong {
  color: var(--color-hero-text);
  font-size: 13px;
  line-height: 1.5;
}

.nodes-map {
  position: relative;
  min-width: 0;
}

.nodes-map::before {
  position: absolute;
  inset: 18% 12%;
  border-radius: var(--radius-pill);
  background: var(--nodes-route-glow);
  content: "";
  filter: blur(64px);
  opacity: 0.52;
}

.nodes-map svg {
  position: relative;
  width: 100%;
  height: auto;
}

.map-frame {
  fill: var(--color-deep-raised);
  stroke: var(--color-deep-line);
  stroke-width: 2;
}

.map-grid {
  fill: none;
  stroke: var(--nodes-map-line);
  stroke-width: 1;
}

.map-continent {
  fill: var(--nodes-map-land);
  stroke: var(--color-deep-line);
  stroke-width: 1.5;
}

.map-route,
.map-route-glow,
.map-route--secondary {
  fill: none;
  stroke-linecap: round;
}

.map-route {
  stroke: url("#nodeRouteGradient");
  stroke-width: 5;
}

.map-route-glow {
  stroke: url("#nodeRouteGradient");
  stroke-width: 16;
  filter: url("#nodeRouteGlow");
  opacity: 0.38;
}

.map-route--secondary {
  stroke: var(--nodes-route-muted);
  stroke-width: 2;
  stroke-dasharray: 7 8;
}

.route-stop-start {
  stop-color: var(--color-accent);
}

.route-stop-end {
  stop-color: var(--color-accent-end);
}

.map-node circle:first-child {
  fill: var(--nodes-map-node);
  stroke: var(--color-cyan);
  stroke-width: 1.5;
}

.map-node circle:last-child {
  fill: var(--color-cyan);
}

.map-node--accent circle:first-child {
  fill: var(--color-accent-tint);
  stroke: var(--color-accent);
}

.map-node--accent circle:last-child {
  fill: var(--color-accent);
}

.map-label rect {
  fill: var(--nodes-map-label);
  stroke: var(--color-deep-line);
  stroke-width: 1;
}

.map-label text {
  fill: var(--color-hero-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.route-summary {
  position: relative;
}

.region-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.region-tile {
  min-width: 0;
  padding: 26px 22px;
  border-right: 1px solid var(--color-border);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.region-tile:last-child {
  border-right: 0;
}

.region-tile:hover {
  background: var(--nodes-tile-hover);
  transform: translateY(-2px);
}

.region-tile__code {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.region-tile h3 {
  font-size: 21px;
}

.region-tile p {
  color: var(--color-text-muted);
}

.nodes-table-section {
  border-top: 1px solid var(--nodes-section-line);
  border-bottom: 1px solid var(--nodes-section-line);
  background: var(--color-panel);
}

.nodes-table-section .table-scroll {
  background: var(--color-page);
}

.route-kind {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 9px;
  overflow: hidden;
  border: 1px solid var(--color-cyan);
  border-radius: var(--radius-pill);
  background: var(--color-cyan-tint);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-note {
  margin: 14px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
}

.route-ledger {
  border-top: 1px solid var(--color-border);
}

.route-ledger .ledger-row {
  grid-template-columns: 116px minmax(0, 1fr) auto;
  padding-top: 30px;
  padding-bottom: 30px;
}

.route-ledger .ledger-copy p {
  line-height: 1.85;
}

.use-cases {
  background:
    linear-gradient(var(--preview-grid-line) 1px, var(--color-transparent) 1px),
    linear-gradient(90deg, var(--preview-grid-line) 1px, var(--color-transparent) 1px),
    var(--color-panel);
  background-size: 34px 34px;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.use-case {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-page);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.use-case:last-child {
  grid-column: 1 / -1;
}

.use-case:hover {
  border-color: var(--color-cyan);
  transform: translateY(-2px);
}

.use-case__head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.use-case__head h3 {
  margin-bottom: 0;
}

.use-case__mark {
  display: inline-flex;
  min-width: 58px;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  background: var(--color-deep);
  color: var(--color-cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.use-case p {
  margin-bottom: 0;
  color: var(--color-text-muted);
  line-height: 1.82;
}

.selection-flow {
  border-bottom: 1px solid var(--color-border);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-border);
}

.flow-step {
  min-width: 0;
  padding: 24px;
  background: var(--color-page);
}

.flow-step__code {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.flow-step h3 {
  font-size: 18px;
}

.flow-step p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.selection-flow .callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
  margin-top: 28px;
  margin-bottom: 0;
}

.selection-flow .callout strong,
.selection-flow .callout p {
  grid-column: 1;
}

.selection-flow .callout .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.route-notes {
  background: var(--color-page);
}

.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  align-items: start;
  gap: 28px;
}

.notes-prose {
  min-width: 0;
}

.notes-prose h3 {
  margin-top: 30px;
  font-size: 21px;
}

.notes-prose h3:first-child {
  margin-top: 0;
}

.notes-prose p {
  color: var(--color-text-muted);
  line-height: 1.85;
}

.notes-index {
  position: sticky;
  top: calc(var(--header-height) + 18px);
}

.notes-index ul {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.notes-index li {
  display: grid;
  gap: 3px;
  padding: 15px 0;
  border-bottom: 1px solid var(--color-border);
}

.notes-index li:last-child {
  border-bottom: 0;
}

.notes-index span {
  color: var(--color-text-muted);
  font-size: 13px;
}

.notes-index a {
  margin-top: 5px;
  color: var(--color-accent-dark);
  font-size: 13px;
  font-weight: 750;
}

@media (max-width: 1080px) {
  .nodes-hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .nodes-map {
    max-width: 760px;
    margin-inline: auto;
  }

  .region-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .region-tile:nth-child(2) {
    border-right: 0;
  }

  .region-tile:nth-child(-n + 2) {
    border-bottom: 1px solid var(--color-border);
  }

  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .notes-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .notes-index {
    position: static;
  }

  .route-ledger .ledger-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .use-case-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .use-case:last-child {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .nodes-hero {
    padding-top: 10px;
  }

  .nodes-hero__inner {
    min-height: auto;
    padding-top: 30px;
    padding-bottom: 24px;
    border-radius: var(--radius-lg);
  }

  .nodes-hero h1 {
    font-size: clamp(32px, 10vw, 40px);
  }

  .nodes-hero__lead {
    font-size: 15px;
  }

  .nodes-hero__facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .nodes-hero__facts li,
  .nodes-hero__facts li:first-child,
  .nodes-hero__facts li:nth-child(2),
  .nodes-hero__facts li:nth-last-child(2),
  .nodes-hero__facts li:last-child {
    border-radius: 0;
  }

  .nodes-hero__facts li:first-child {
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
  }

  .nodes-hero__facts li:last-child {
    border-bottom-right-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
  }

  .nodes-map {
    margin-top: 2px;
  }

  .map-label {
    display: none;
  }

  .region-wall {
    grid-template-columns: minmax(0, 1fr);
  }

  .region-tile,
  .region-tile:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .region-tile:last-child {
    border-bottom: 0;
  }

  .flow-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .selection-flow .callout {
    grid-template-columns: minmax(0, 1fr);
  }

  .selection-flow .callout strong,
  .selection-flow .callout p,
  .selection-flow .callout .btn {
    grid-column: 1;
    grid-row: auto;
  }

  .selection-flow .callout .btn {
    width: 100%;
    margin-top: 8px;
  }

  .use-case,
  .flow-step {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .region-tile,
  .use-case {
    transform: none;
  }
}