.nodes-main {
  min-width: 0;
}

.nodes-hero {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(390px, 0.82fr) minmax(540px, 1.18fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
}

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

.nodes-hero-copy .kicker {
  margin-bottom: 24px;
}

.nodes-hero-copy h1 {
  margin-bottom: 26px;
}

.nodes-hero-copy .lead {
  max-width: 38rem;
  margin-bottom: 0;
}

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

.nodes-fact-row {
  margin: 28px 0 0;
  padding: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  border-top: 1px solid var(--color-border);
  list-style: none;
}

.nodes-fact-row li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.nodes-route-loom {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
  position: relative;
}

.nodes-route-loom::before {
  position: absolute;
  inset: 0 8% 8% 0;
  z-index: -1;
  content: "";
  border: 1px solid var(--color-border);
  background:
    repeating-linear-gradient(90deg, transparent 0 27px, var(--color-border-faint) 27px 28px),
    repeating-linear-gradient(0deg, transparent 0 27px, var(--color-border-faint) 27px 28px),
    var(--color-panel-secondary);
  transform: rotate(-1.2deg);
}

.nodes-route-paper {
  min-width: 0;
  padding: 18px;
  position: relative;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(145deg, var(--color-paper-glow), transparent),
    var(--color-panel);
  box-shadow: var(--shadow-device);
  transform: rotate(0.6deg);
}

.nodes-route-paper::after {
  position: absolute;
  inset: 10px -10px -10px 10px;
  z-index: -1;
  content: "";
  border: 1px solid var(--color-border);
  background: var(--color-panel-secondary);
}

.nodes-route-caption {
  min-height: 58px;
  padding: 0 6px 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--color-border);
}

.nodes-route-caption span {
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nodes-route-caption strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.nodes-route-svg {
  width: 100%;
  aspect-ratio: 1.18;
  margin-top: 8px;
  overflow: visible;
}

.nodes-grid-path {
  fill: none;
  stroke: var(--color-border-faint);
  stroke-width: 1;
}

.nodes-route-base {
  fill: none;
  stroke: var(--color-panel-secondary);
  stroke-width: 13;
  stroke-linecap: round;
}

.nodes-route-accent,
.nodes-route-warning,
.nodes-route-success {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 10 8;
  animation: nodes-route-drift 9s linear infinite;
}

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

.nodes-route-warning {
  stroke: var(--color-warning);
  animation-direction: reverse;
}

.nodes-route-success {
  stroke: var(--color-success);
}

.nodes-node {
  stroke: var(--color-panel);
  stroke-width: 5;
}

.nodes-node-accent {
  fill: var(--color-accent);
}

.nodes-node-warning {
  fill: var(--color-warning);
}

.nodes-node-success {
  fill: var(--color-success);
}

.nodes-map-label {
  fill: var(--color-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.nodes-route-key {
  padding: 13px 4px 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  border-top: 1px solid var(--color-border);
}

.nodes-route-key span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.nodes-route-key i {
  width: 18px;
  height: 4px;
  display: block;
  border-radius: var(--radius-pill);
}

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

.route-key-warning {
  background: var(--color-warning);
}

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

.nodes-toc {
  width: min(calc(100% - (var(--gutter) * 2)), var(--page-width));
  margin-inline: auto;
}

.nodes-section-heading {
  margin-bottom: clamp(34px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(340px, 1.2fr);
  align-items: end;
  gap: clamp(28px, 6vw, 90px);
}

.nodes-section-heading .tag {
  margin-bottom: 16px;
}

.nodes-section-heading h2 {
  max-width: 13em;
  margin-bottom: 0;
}

.nodes-section-heading > p {
  max-width: 48rem;
  margin-bottom: 5px;
  color: var(--color-text-muted);
}

.nodes-type-section,
.nodes-use-section {
  border-top: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  background:
    repeating-linear-gradient(0deg, transparent 0 47px, var(--color-border-faint) 47px 48px),
    var(--color-paper-soft);
}

.nodes-type-weave {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.nodes-type-card {
  min-width: 0;
  padding: clamp(25px, 3.2vw, 42px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  box-shadow: 7px 7px 0 var(--color-panel-secondary);
}

.nodes-type-card:nth-child(3) {
  background:
    linear-gradient(140deg, var(--color-success-soft), transparent),
    var(--color-panel);
}

.nodes-type-wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(94px, 0.22fr) minmax(0, 1fr);
  background:
    linear-gradient(135deg, var(--color-accent-soft), transparent 58%),
    var(--color-panel);
}

.nodes-type-marker {
  width: max-content;
  max-width: 100%;
  height: max-content;
  padding: 7px 10px;
  overflow: hidden;
  color: var(--color-panel);
  border-radius: var(--radius-xs);
  background: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.nodes-type-card:nth-child(2) .nodes-type-marker {
  color: var(--color-text);
  background: var(--color-warning);
}

.nodes-type-card:nth-child(3) .nodes-type-marker {
  background: var(--color-success);
}

.nodes-type-card h3 {
  max-width: 25em;
}

.nodes-type-card p {
  color: var(--color-text-muted);
}

.nodes-type-card p:last-child {
  margin-bottom: 0;
}

.nodes-reading-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}

.nodes-reading-intro {
  position: sticky;
  top: calc(var(--toc-offset) + var(--toc-height) + 32px);
}

.nodes-reading-intro .tag {
  margin-bottom: 16px;
}

.nodes-reading-intro .lead {
  font-size: 1.08rem;
}

.nodes-reading-strips {
  border-top: 1px solid var(--color-border);
}

.nodes-reading-strips article {
  padding: 31px 4px;
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 28px;
  border-bottom: 1px solid var(--color-border);
}

.nodes-reading-strips h3 {
  margin-bottom: 0;
  font-size: clamp(21px, 2.1vw, 27px);
}

.nodes-reading-strips p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.nodes-use-matrix {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.nodes-use-card {
  min-width: 0;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  box-shadow: 6px 6px 0 var(--color-panel-secondary);
}

.nodes-use-card-emphasis {
  border-top: 5px solid var(--color-warning);
  background:
    linear-gradient(145deg, var(--color-warning-soft), transparent),
    var(--color-panel);
}

.nodes-use-card-wide {
  grid-column: 1 / -1;
  border-left: 5px solid var(--color-success);
}

.nodes-use-label {
  margin-bottom: 22px;
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.nodes-use-card h3 {
  max-width: 20em;
}

.nodes-use-card p {
  color: var(--color-text-muted);
}

.nodes-use-card p:last-child {
  margin-bottom: 0;
}

.nodes-switch-flow {
  counter-reset: switch-step;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
}

.nodes-switch-flow article {
  min-width: 0;
  padding: clamp(25px, 3vw, 38px);
  position: relative;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel);
}

.nodes-switch-flow article::before {
  counter-increment: switch-step;
  width: 34px;
  height: 34px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  content: counter(switch-step);
  color: var(--color-panel);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--color-warning-soft);
}

.nodes-switch-flow article:nth-child(even)::before {
  background: var(--color-success);
}

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

.nodes-coverage-section {
  border-top: 5px solid var(--color-accent);
  background:
    linear-gradient(116deg, var(--color-text) 0 51%, var(--color-accent-dark) 51% 51.3%, var(--color-panel-secondary) 51.3%);
}

.nodes-coverage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: clamp(38px, 8vw, 110px);
  align-items: center;
}

.nodes-coverage-copy {
  color: var(--color-border);
}

.nodes-coverage-copy .tag {
  margin-bottom: 18px;
}

.nodes-coverage-copy h2 {
  color: var(--color-panel);
}

.nodes-coverage-copy p {
  max-width: 48rem;
}

.nodes-coverage-copy .button-row {
  margin-top: 30px;
}

.nodes-region-board {
  min-width: 0;
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  box-shadow: 10px 10px 0 var(--color-warning-soft);
}

.nodes-region-title {
  padding: 20px 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel-secondary);
}

.nodes-region-title span {
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.nodes-region-title strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.nodes-region-row {
  padding: 19px 22px;
  display: grid;
  grid-template-columns: minmax(70px, 0.28fr) minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--color-border);
}

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

.nodes-region-row > span {
  color: var(--color-accent-dark);
  font-family: var(--font-display);
  font-weight: 700;
}

.nodes-region-row p {
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

@keyframes nodes-route-drift {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -72;
  }
}

@media (max-width: 1080px) {
  .nodes-hero {
    min-height: auto;
    grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  }

  .nodes-route-loom {
    padding-inline: 0;
  }

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

@media (max-width: 860px) {
  .nodes-hero {
    grid-template-columns: 1fr;
  }

  .nodes-hero-copy {
    max-width: 48rem;
  }

  .nodes-route-loom {
    width: min(100%, 680px);
    margin-inline: auto;
  }

  .nodes-section-heading,
  .nodes-reading-layout,
  .nodes-coverage-layout {
    grid-template-columns: 1fr;
  }

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

  .nodes-reading-intro {
    position: static;
  }

  .nodes-coverage-section {
    background:
      linear-gradient(180deg, var(--color-text) 0 56%, var(--color-panel-secondary) 56%);
  }
}

@media (max-width: 768px) {
  .nodes-hero {
    padding-top: 72px;
    padding-bottom: 82px;
  }

  .nodes-route-paper {
    transform: none;
  }

  .nodes-route-loom::before {
    transform: none;
  }

  .nodes-type-weave,
  .nodes-use-matrix,
  .nodes-switch-flow {
    grid-template-columns: 1fr;
  }

  .nodes-type-wide,
  .nodes-use-card-wide {
    grid-column: auto;
  }

  .nodes-reading-strips article {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .nodes-hero {
    gap: 48px;
  }

  .nodes-fact-row {
    gap: 10px 16px;
  }

  .nodes-route-loom {
    padding: 0;
  }

  .nodes-route-paper {
    padding: 10px;
  }

  .nodes-route-paper::after,
  .nodes-route-loom::before {
    display: none;
  }

  .nodes-route-caption {
    min-height: 48px;
  }

  .nodes-route-caption span,
  .nodes-route-key {
    font-size: 0.6rem;
  }

  .nodes-map-label {
    font-size: 11px;
  }

  .nodes-type-card,
  .nodes-type-wide {
    grid-template-columns: 1fr;
  }

  .nodes-type-marker {
    writing-mode: horizontal-tb;
  }

  .nodes-region-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .nodes-coverage-section {
    background:
      linear-gradient(180deg, var(--color-text) 0 61%, var(--color-panel-secondary) 61%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nodes-route-accent,
  .nodes-route-warning,
  .nodes-route-success {
    animation: none;
  }
}