.nodes-hero {
  position: relative;
  overflow-x: clip;
  border-bottom: 1px solid var(--color-border);
}

.nodes-hero::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 46%;
  height: 100%;
  background: var(--gradient-backdrop);
  content: "";
}

.nodes-hero-grid {
  position: relative;
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(520px, 1.16fr);
  align-items: center;
  gap: 56px;
  padding-top: 70px;
  padding-bottom: 70px;
}

.nodes-hero-copy {
  position: relative;
  z-index: 2;
}

.nodes-hero-copy h1 {
  margin-top: 20px;
  margin-bottom: 22px;
}

.nodes-hero-copy .button-row {
  margin-top: 28px;
}

.nodes-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.nodes-trust span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nodes-trust span::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  box-shadow: 0 0 0 4px var(--color-success-soft);
  content: "";
}

.route-atlas {
  position: relative;
  z-index: 1;
  min-height: 500px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  box-shadow: var(--shadow-card);
}

.route-atlas::before {
  position: absolute;
  top: -82px;
  right: -64px;
  width: 230px;
  height: 230px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  content: "";
  opacity: .16;
}

.atlas-head,
.atlas-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.atlas-head {
  min-height: 34px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-subtle);
}

.atlas-map {
  width: 100%;
  height: 390px;
}

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

.atlas-route {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 11 14;
  filter: drop-shadow(0 0 7px var(--color-bus-glow));
  animation: atlas-flow 5s linear infinite;
}

.route-primary {
  stroke: var(--color-accent);
}

.route-secondary {
  stroke: var(--color-success);
  animation-direction: reverse;
}

.route-tertiary {
  stroke: var(--color-warn);
  animation-duration: 6s;
}

.atlas-node {
  fill: var(--color-panel);
  stroke: var(--color-accent-dark);
  stroke-width: 4;
}

.atlas-node.node-current {
  fill: var(--color-warn);
  stroke: var(--color-error);
}

.atlas-label {
  fill: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
}

.atlas-foot {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
}

.atlas-foot span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.atlas-key {
  width: 10px;
  height: 10px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
}

.key-special {
  background: var(--color-accent);
}

.key-relay {
  background: var(--color-success);
}

.key-direct {
  background: var(--color-warn);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(320px, .58fr);
  align-items: end;
  gap: 42px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-top: 18px;
  margin-bottom: 0;
}

.section-heading > p {
  margin-bottom: 5px;
}

.route-directory {
  box-shadow: var(--shadow-panel);
}

.route-directory .route-table {
  min-width: 780px;
}

.route-directory td {
  color: var(--color-muted);
}

.country-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.country-cell > span {
  font-size: 20px;
  line-height: 1;
}

.route-chip,
.media-state {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding-inline: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.route-chip-special {
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
}

.route-chip-relay {
  background: var(--color-success-soft);
  color: var(--color-text);
}

.route-chip-direct {
  background: var(--color-warn-soft);
  color: var(--color-text);
}

.media-state::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-right: 7px;
  border-radius: var(--radius-pill);
  content: "";
}

.media-supported {
  background: var(--color-success-soft);
  color: var(--color-text);
}

.media-supported::before {
  background: var(--color-success);
}

.media-limited {
  background: var(--color-panel-soft);
  color: var(--color-muted);
}

.media-limited::before {
  background: var(--color-subtle);
}

.route-types {
  background: var(--color-panel-soft);
}

.type-browser {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.type-index {
  position: relative;
  min-width: 0;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
}

.type-index::after {
  position: absolute;
  right: -30px;
  bottom: -44px;
  width: 130px;
  height: 130px;
  border-radius: var(--radius-pill);
  content: "";
  opacity: .7;
}

.type-index-special::after {
  background: var(--color-accent-soft);
}

.type-index-relay::after {
  background: var(--color-success-soft);
}

.type-index-direct::after {
  background: var(--color-warn-soft);
}

.type-index-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.type-code {
  color: var(--color-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
}

.type-signal {
  width: 46px;
  height: 8px;
  border-radius: var(--radius-pill);
}

.type-index-special .type-signal {
  background: var(--color-accent);
}

.type-index-relay .type-signal {
  background: var(--color-success);
}

.type-index-direct .type-signal {
  background: var(--color-warn);
}

.type-index h3,
.type-index p,
.type-index dl {
  position: relative;
  z-index: 1;
}

.type-index p {
  min-height: 166px;
}

.type-index dl {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
}

.type-index dl div {
  padding-block: 14px;
  border-top: 1px solid var(--color-border);
}

.type-index dt {
  margin-bottom: 4px;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.type-index dd {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.route-principle {
  display: grid;
  grid-template-columns: minmax(220px, .62fr) minmax(0, 1.38fr);
  gap: 42px;
  margin-top: 20px;
}

.principle-label {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--gradient-current);
  color: var(--color-panel);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 850;
}

.route-principle h3 {
  margin-bottom: 0;
}

.principle-copy p:last-child {
  margin-bottom: 0;
}

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

.usage-row {
  display: grid;
  grid-template-columns: minmax(160px, .48fr) minmax(0, 1.52fr) minmax(190px, .58fr);
  gap: 34px;
  padding-block: 34px;
  border-bottom: 1px solid var(--color-border);
}

.usage-name {
  align-self: start;
}

.usage-mark,
.step-tag,
.principle-label,
.closing-code {
  font-family: var(--font-mono);
  letter-spacing: .06em;
}

.usage-mark {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--color-accent-dark);
  font-size: 10px;
  font-weight: 850;
}

.usage-name h3 {
  margin-bottom: 0;
}

.usage-detail p:last-child {
  margin-bottom: 0;
}

.usage-choice {
  align-self: start;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--color-panel-soft);
}

.usage-choice span,
.usage-choice strong {
  display: block;
}

.usage-choice span {
  margin-bottom: 7px;
  color: var(--color-subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
}

.usage-choice strong {
  font-size: 14px;
  line-height: 1.5;
}

.selection-process {
  background: var(--color-text);
}

.selection-grid {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: 72px;
}

.selection-process h2,
.selection-process h3 {
  color: var(--color-panel);
}

.selection-process .lead,
.selection-process p {
  color: var(--color-subtle);
}

.selection-intro .eyebrow {
  border-color: var(--color-muted);
  background: transparent;
  color: var(--color-accent);
}

.selection-intro h2 {
  margin-top: 20px;
}

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

.selection-steps article {
  padding: 24px;
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-lg);
  background: var(--color-text);
}

.selection-steps article:nth-child(2),
.selection-steps article:nth-child(3) {
  background: var(--color-panel-soft);
}

.selection-steps article:nth-child(2) h3,
.selection-steps article:nth-child(3) h3 {
  color: var(--color-text);
}

.selection-steps article:nth-child(2) p,
.selection-steps article:nth-child(3) p {
  color: var(--color-muted);
}

.step-tag {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--color-accent);
  font-size: 9px;
  font-weight: 850;
}

.selection-steps article:nth-child(2) .step-tag,
.selection-steps article:nth-child(3) .step-tag {
  color: var(--color-accent-dark);
}

.selection-steps h3 {
  font-size: 22px;
}

.selection-steps p {
  margin-bottom: 0;
  font-size: 14px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 42px;
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
}

.note-block {
  min-width: 0;
  padding: clamp(24px, 4vw, 40px);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel);
}

.note-block:nth-child(2),
.note-block:nth-child(3) {
  background: var(--color-panel-soft);
}

.note-block p:last-child {
  margin-bottom: 0;
}

.nodes-closing {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 44px;
  padding: clamp(28px, 5vw, 52px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--gradient-brand);
}

.nodes-closing::after {
  position: absolute;
  right: 20%;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border: 1px solid var(--color-white-soft);
  border-radius: var(--radius-pill);
  content: "";
  opacity: .35;
}

.nodes-closing > * {
  position: relative;
  z-index: 1;
}

.closing-code {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--color-panel);
  font-size: 10px;
  font-weight: 850;
}

.nodes-closing h2 {
  margin-bottom: 14px;
  color: var(--color-panel);
}

.nodes-closing p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--color-panel);
}

.nodes-closing .button-accent {
  background: var(--color-text);
}

.closing-secondary {
  background: var(--color-panel);
}

@keyframes atlas-flow {
  to {
    stroke-dashoffset: -50;
  }
}

@media (max-width: 1050px) {
  .nodes-hero-grid {
    grid-template-columns: minmax(340px, .75fr) minmax(450px, 1.25fr);
    gap: 28px;
  }

  .route-atlas {
    min-height: 450px;
  }

  .atlas-map {
    height: 340px;
  }

  .type-index p {
    min-height: 218px;
  }

  .usage-row {
    grid-template-columns: minmax(140px, .4fr) minmax(0, 1.2fr);
  }

  .usage-choice {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .nodes-hero::before {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 44%;
  }

  .nodes-hero-grid {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 60px;
    padding-bottom: 74px;
  }

  .route-atlas {
    width: 100%;
  }

  .section-heading,
  .route-principle,
  .selection-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    gap: 18px;
  }

  .type-browser {
    grid-template-columns: 1fr;
  }

  .type-index p {
    min-height: 0;
  }

  .selection-grid {
    gap: 42px;
  }

  .nodes-closing {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .route-atlas {
    min-height: 360px;
    padding: 16px;
  }

  .atlas-map {
    height: 270px;
  }

  .atlas-label {
    display: none;
  }

  .atlas-foot {
    gap: 10px 16px;
  }

  .usage-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .usage-choice {
    grid-column: auto;
  }

  .selection-steps,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .notes-grid {
    border-left: 0;
  }

  .note-block {
    border-left: 1px solid var(--color-border);
  }

  .nodes-closing .button-row {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .nodes-hero-grid {
    padding-top: 46px;
  }

  .nodes-trust {
    display: grid;
  }

  .route-atlas {
    min-height: 310px;
  }

  .atlas-head span:last-child {
    display: none;
  }

  .atlas-map {
    height: 230px;
  }

  .atlas-foot {
    font-size: 8px;
  }

  .type-index {
    padding: 22px;
  }

  .selection-steps article {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-route {
    animation: none;
  }
}