.nodes-hero {
  position: relative;
  overflow-x: clip;
  padding-top: clamp(64px, 9vw, 124px);
  padding-bottom: clamp(72px, 9vw, 126px);
  border-bottom: 1px solid var(--color-border-soft);
}

.nodes-hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 76% 44%, color-mix(in srgb, var(--color-accent) 11%, transparent), transparent 24%),
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-paper) 3%, transparent), transparent);
}

.nodes-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
}

.nodes-hero-copy {
  min-width: 0;
}

.nodes-hero-copy h1 {
  max-width: 700px;
  margin-top: 20px;
}

.nodes-hero-copy .lead {
  max-width: 680px;
}

.nodes-hero-actions {
  margin-top: 30px;
}

.nodes-fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.route-plate {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, color-mix(in srgb, var(--color-paper-ink) 4%, transparent) 8px),
    var(--color-paper);
  transform: rotate(.4deg);
}

.route-plate::before {
  position: absolute;
  inset: 9px;
  pointer-events: none;
  border: 1px dashed color-mix(in srgb, var(--color-paper-ink) 22%, transparent);
  border-radius: var(--radius-medium);
  content: "";
}

.route-plate-head,
.route-plate-foot {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--color-paper-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
}

.route-plate-head {
  padding: 4px 8px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-paper-ink) 18%, transparent);
}

.route-plate-foot {
  justify-content: flex-start;
  padding: 10px 8px 4px;
  border-top: 1px solid color-mix(in srgb, var(--color-paper-ink) 18%, transparent);
}

.route-plate-foot span + span::before {
  margin-right: 16px;
  color: var(--color-accent-dark);
  content: "·";
}

.route-diagram {
  position: relative;
  z-index: 1;
  width: 100%;
  color: var(--color-paper-ink);
}

.route-grid-line,
.route-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.route-grid-line {
  opacity: .12;
  stroke-dasharray: 4 8;
}

.route-path {
  opacity: .42;
  stroke-dasharray: 7 9;
}

.route-path-primary {
  color: var(--color-accent-dark);
  opacity: 1;
  stroke-width: 2;
}

.route-node {
  fill: var(--color-paper);
  stroke: var(--color-paper-ink);
  stroke-width: 2;
}

.route-node-main {
  fill: var(--color-accent);
  stroke: var(--color-accent-dark);
}

.nodes-toc-wrap {
  position: relative;
  z-index: 8;
  padding-top: 20px;
}

.nodes-section-heading {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, .7fr);
  align-items: end;
  gap: clamp(32px, 7vw, 96px);
  margin-bottom: clamp(36px, 6vw, 72px);
}

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

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

.route-kind {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 3px 9px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-accent);
  background: var(--color-bg-panel-2);
  font-family: var(--font-mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nodes-type-section {
  border-top: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  background: color-mix(in srgb, var(--color-bg-panel) 42%, transparent);
}

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

.route-entry {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(190px, .34fr);
  gap: clamp(24px, 5vw, 68px);
  padding-top: clamp(30px, 5vw, 56px);
  padding-bottom: clamp(30px, 5vw, 56px);
  border-bottom: 1px solid var(--color-border);
}

.route-entry-index {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
}

.route-entry-copy {
  min-width: 0;
}

.route-entry-copy h3 {
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 440;
}

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

.route-entry-note {
  align-self: start;
  padding: 17px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-bg-panel);
}

.route-entry-note span {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
}

.route-entry-note strong {
  display: block;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.65;
}

.usage-board {
  display: grid;
  grid-template-columns: minmax(180px, .28fr) minmax(0, 1fr);
  gap: clamp(30px, 7vw, 96px);
  align-items: start;
}

.usage-index {
  position: sticky;
  top: var(--toc-offset);
  display: grid;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-bg-panel);
}

.usage-index .mono-label {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-soft);
}

.usage-index a {
  min-height: 43px;
  display: flex;
  align-items: center;
  border-bottom: 1px dashed var(--color-border-soft);
  color: var(--color-text-muted);
  font-size: 13px;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.usage-index a:hover {
  padding-left: 5px;
  color: var(--color-accent);
}

.usage-index a:last-child {
  border-bottom: 0;
}

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

.usage-note {
  position: relative;
  padding-bottom: clamp(42px, 7vw, 76px);
  scroll-margin-top: var(--toc-offset);
}

.usage-note + .usage-note {
  padding-top: clamp(42px, 7vw, 76px);
  border-top: 1px dashed var(--color-border);
}

.usage-note:last-child {
  padding-bottom: 0;
}

.usage-note::before {
  position: absolute;
  top: 9px;
  bottom: 0;
  left: -34px;
  width: 1px;
  content: "";
  background: linear-gradient(var(--color-accent), var(--color-border-soft), transparent);
}

.usage-note::after {
  position: absolute;
  top: 6px;
  left: -38px;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  content: "";
  background: var(--color-accent);
}

.usage-note + .usage-note::before {
  top: calc(clamp(42px, 7vw, 76px) + 9px);
}

.usage-note + .usage-note::after {
  top: calc(clamp(42px, 7vw, 76px) + 6px);
}

.usage-code {
  display: block;
  margin-bottom: 12px;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
}

.usage-note h3 {
  font-size: clamp(25px, 3vw, 35px);
  font-weight: 460;
}

.usage-note p {
  max-width: 850px;
}

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

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

.region-slip {
  min-width: 0;
  padding: clamp(26px, 4vw, 46px);
  border: 1px solid color-mix(in srgb, var(--color-paper-ink) 24%, transparent);
  border-radius: var(--radius-large);
}

.region-slip:nth-child(even) {
  transform: translateY(18px) rotate(.25deg);
}

.region-slip:nth-child(odd) {
  transform: rotate(-.25deg);
}

.region-slip h3 {
  margin-top: 24px;
  color: var(--color-paper-ink);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 430;
}

.region-slip p {
  margin-bottom: 0;
  color: var(--color-paper-muted);
}

.region-mark {
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .15em;
}

.nodes-procedure {
  margin-top: 32px;
}

.nodes-procedure h3 {
  margin-top: 46px;
}

.nodes-closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

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

  .route-plate {
    width: min(100%, 720px);
    margin-inline: auto;
  }

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

  .route-entry {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .route-entry-note {
    grid-column: 2;
  }
}

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

  .route-plate {
    transform: none;
  }

  .route-plate-head,
  .route-plate-foot {
    font-size: 8px;
  }

  .usage-board {
    grid-template-columns: 1fr;
  }

  .usage-index {
    position: static;
    grid-template-columns: repeat(5, max-content);
    max-width: 100%;
    overflow-x: auto;
    padding: 7px;
    border-radius: var(--radius-pill);
    -webkit-overflow-scrolling: touch;
  }

  .usage-index .mono-label {
    display: none;
  }

  .usage-index a {
    min-height: 40px;
    padding: 0 14px;
    border-right: 1px solid var(--color-border-soft);
    border-bottom: 0;
    border-radius: var(--radius-pill);
    white-space: nowrap;
  }

  .usage-index a:last-child {
    border-right: 0;
  }

  .usage-note::before,
  .usage-note::after {
    display: none;
  }

  .region-register {
    grid-template-columns: 1fr;
  }

  .region-slip:nth-child(even),
  .region-slip:nth-child(odd) {
    transform: none;
  }
}

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

  .nodes-fact-row .badge {
    flex: 1 1 120px;
    justify-content: center;
  }

  .route-plate {
    padding: 11px;
  }

  .route-plate-head {
    gap: 8px;
    letter-spacing: .08em;
  }

  .route-plate-foot {
    gap: 7px;
  }

  .route-plate-foot span + span::before {
    margin-right: 7px;
  }

  .route-entry {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .route-entry-note {
    grid-column: auto;
  }

  .nodes-closing-actions {
    width: 100%;
  }

  .nodes-closing-actions .button {
    flex: 1 1 140px;
  }
}

@media (max-width: 390px) {
  .route-plate-head span:last-child {
    display: none;
  }

  .route-plate-foot {
    font-size: 7px;
  }
}