.vmm-hero,
.vmm-map,
.vmm-primer,
.vmm-lab,
.vmm-handle-lab,
.vmm-sequence,
.vmm-matrix,
.vmm-timeline,
.vmm-callout {
  margin: 2rem 0;
}

.article-title {
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.vmm-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 2.2rem);
  border: 1px solid rgba(92, 225, 230, 0.28);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 88% 18%, rgba(246, 183, 60, 0.15), transparent 28%),
    radial-gradient(circle at 14% 86%, rgba(92, 225, 230, 0.12), transparent 32%),
    rgba(7, 17, 31, 0.82);
}

.vmm-kicker {
  margin: 0 0 0.65rem;
  color: #5ce1e6;
  font: 500 0.78rem "IBM Plex Mono", monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.vmm-hero h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  line-height: 1.08;
}

.vmm-hero__lede {
  max-width: 820px;
  margin: 1rem 0 0;
  color: #b7c7dc;
  font-size: 1.02rem;
}

.vmm-hero__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.vmm-hero__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(124, 154, 214, 0.25);
  border-radius: 999px;
  color: #d8e4f5;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.84rem;
}

.vmm-hero__legend i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.2rem;
  background: #5ce1e6;
}

.vmm-hero__legend span:nth-child(2) i { background: #f6b73c; }
.vmm-hero__legend span:nth-child(3) i { background: #69e7a4; }

.vmm-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.vmm-map a {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid rgba(124, 154, 214, 0.22);
  border-radius: 1rem;
  color: #dce7f7;
  background: rgba(7, 17, 31, 0.72);
}

.vmm-map a:hover,
.vmm-map a:focus-visible {
  border-color: #5ce1e6;
  outline: none;
}

.vmm-map strong,
.vmm-map span { display: block; }
.vmm-map strong { color: #5ce1e6; font-family: "IBM Plex Mono", monospace; }
.vmm-map span { margin-top: 0.2rem; color: #aebed3; font-size: 0.86rem; }

.vmm-primer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.vmm-primer > section {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(124, 154, 214, 0.22);
  border-radius: 1rem;
  background: rgba(7, 17, 31, 0.72);
}

.vmm-primer strong { display: block; color: #f3f7ff; }
.vmm-primer p { margin: 0.4rem 0 0; color: #afbed2; font-size: 0.92rem; }
.vmm-primer code { overflow-wrap: anywhere; white-space: normal; }

.vmm-callout {
  padding: 1rem 1.1rem;
  border-left: 4px solid #5ce1e6;
  border-radius: 0 1rem 1rem 0;
  color: #c5d3e5;
  background: rgba(92, 225, 230, 0.075);
}

.vmm-callout--gold {
  border-left-color: #f6b73c;
  background: rgba(246, 183, 60, 0.075);
}

.vmm-callout p { margin: 0; }
.vmm-callout strong { color: #f7f9ff; }

.vmm-lab,
.vmm-handle-lab {
  overflow: hidden;
  border: 1px solid rgba(92, 225, 230, 0.3);
  border-radius: 1.25rem;
  background: linear-gradient(155deg, rgba(12, 25, 45, 0.96), rgba(6, 13, 25, 0.91));
}

.vmm-lab__header,
.vmm-handle-lab__header,
.vmm-lab__copy,
.vmm-lab__controls,
.vmm-handle-lab__controls,
.vmm-handle-lab__result {
  padding-inline: clamp(1rem, 3vw, 1.5rem);
}

.vmm-lab__header,
.vmm-handle-lab__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-top: 1.2rem;
}

.vmm-lab__header h3,
.vmm-handle-lab__header h3 { margin: 0; }

.vmm-lab__counter {
  flex: 0 0 auto;
  color: #5ce1e6;
  font: 500 0.8rem "IBM Plex Mono", monospace;
}

.vmm-lab__copy {
  min-height: 6.5rem;
  margin: 0;
  padding-block: 0.75rem 1rem;
  color: #b8c7da;
}

.vmm-lab__copy strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #f4f8ff;
}

.vmm-lab__viewport,
.vmm-handle-lab__viewport {
  width: 100%;
  overflow-x: auto;
  border-block: 1px solid rgba(124, 154, 214, 0.16);
  background: radial-gradient(circle at center, rgba(92, 225, 230, 0.07), transparent 65%);
  scrollbar-color: #5ce1e6 rgba(255,255,255,0.04);
}

.vmm-lab svg,
.vmm-handle-lab svg {
  display: block;
  width: max(100%, 760px);
  height: auto;
}

.vmm-va-slot { fill: rgba(92, 225, 230, 0.08); stroke: rgba(92, 225, 230, 0.65); }
.vmm-physical { fill: rgba(246, 183, 60, 0.16); stroke: rgba(246, 183, 60, 0.7); }
.vmm-map-line { fill: none; stroke: #69e7a4; stroke-width: 2.5; stroke-linecap: round; opacity: 0; }
.vmm-label { fill: #eef5ff; font: 600 14px "IBM Plex Sans", sans-serif; }
.vmm-sub { fill: #aebed3; font: 12px "IBM Plex Mono", monospace; }
.vmm-export { fill: rgba(105, 231, 164, 0.14); stroke: #69e7a4; opacity: 0; }
.vmm-export-text { fill: #a8f5c8; font: 600 13px "IBM Plex Mono", monospace; opacity: 0; }
.vmm-lab[data-stage="1"] .vmm-physical,
.vmm-lab[data-stage="2"] .vmm-physical,
.vmm-lab[data-stage="3"] .vmm-physical { filter: drop-shadow(0 0 6px rgba(246,183,60,.35)); }
.vmm-lab[data-stage="2"] .vmm-map-line,
.vmm-lab[data-stage="3"] .vmm-map-line { opacity: 1; }
.vmm-lab[data-stage="3"] .vmm-export,
.vmm-lab[data-stage="3"] .vmm-export-text { opacity: 1; }

.vmm-lab__controls,
.vmm-handle-lab__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-block: 1rem 1.15rem;
}

.vmm-lab button,
.vmm-handle-lab button {
  min-height: 2.5rem;
  padding: 0.55rem 0.82rem;
  border: 1px solid rgba(124, 154, 214, 0.3);
  border-radius: 999px;
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.vmm-lab button:hover,
.vmm-lab button:focus-visible,
.vmm-lab button.is-active,
.vmm-handle-lab button:hover,
.vmm-handle-lab button:focus-visible,
.vmm-handle-lab button[aria-pressed="true"] {
  border-color: #5ce1e6;
  color: #06121d;
  background: #5ce1e6;
  outline: none;
}

.vmm-control-group {
  display: grid;
  gap: 0.35rem;
  min-width: min(100%, 14rem);
}

.vmm-control-group > span {
  color: #aebed3;
  font-size: 0.76rem;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vmm-control-group > div { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.vmm-handle-lab__result {
  padding-block: 1rem 1.2rem;
  color: #b8c7da;
}

.vmm-handle-lab__result strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #69e7a4;
  font-size: 1.05rem;
}

.vmm-handle-lab.is-error .vmm-handle-lab__result strong { color: #ff8e82; }
.vmm-handle-lab__result p { margin: 0; }

.vmm-route-node { fill: rgba(255,255,255,.04); stroke: rgba(124,154,214,.4); }
.vmm-route-line { fill: none; stroke: #5ce1e6; stroke-width: 3; stroke-linecap: round; }
.vmm-route-line.is-muted { stroke: rgba(124,154,214,.25); stroke-dasharray: 8 7; }
.vmm-route-label { fill: #edf4ff; font: 600 14px "IBM Plex Sans", sans-serif; }
.vmm-route-sub { fill: #aebed3; font: 12px "IBM Plex Mono", monospace; }
.vmm-route-badge { fill: rgba(105,231,164,.12); stroke: #69e7a4; }
.vmm-route-badge.is-error { fill: rgba(255,142,130,.12); stroke: #ff8e82; }
.vmm-route-badge-text { fill: #a8f5c8; font: 600 12px "IBM Plex Mono", monospace; }
.vmm-route-badge-text.is-error { fill: #ffb3ac; }

.vmm-route-mobile { display: none; }

.vmm-sequence {
  display: grid;
  gap: 0;
  padding-left: 1.45rem;
  border-left: 1px solid rgba(92, 225, 230, 0.42);
}

.vmm-sequence > section {
  position: relative;
  padding: 0 0 1.35rem 0.45rem;
}

.vmm-sequence > section::before {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 0.35rem;
  width: 0.72rem;
  height: 0.72rem;
  border: 3px solid #07111f;
  border-radius: 50%;
  background: #5ce1e6;
  box-shadow: 0 0 0 1px #5ce1e6;
}

.vmm-sequence strong { display: block; color: #f4f8ff; }
.vmm-sequence p { margin: 0.25rem 0 0; color: #aebed3; }

.vmm-matrix {
  width: 100%;
  overflow-x: auto;
}

.vmm-matrix table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.vmm-matrix th,
.vmm-matrix td {
  padding: 0.8rem;
  border-bottom: 1px solid rgba(124,154,214,.2);
  text-align: left;
  vertical-align: top;
}

.vmm-matrix th { color: #edf4ff; }
.vmm-matrix td { color: #aebed3; }
.vmm-matrix code { white-space: nowrap; }

.vmm-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.vmm-timeline > section {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(124,154,214,.22);
  border-radius: 1rem;
  background: rgba(7,17,31,.72);
}

.vmm-timeline time {
  color: #5ce1e6;
  font: 500 0.78rem "IBM Plex Mono", monospace;
}

.vmm-timeline strong { display: block; margin-top: 0.35rem; color: #f4f8ff; }
.vmm-timeline p { margin: 0.35rem 0 0; color: #aebed3; font-size: 0.9rem; }

@media (max-width: 860px) {
  .vmm-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vmm-primer,
  .vmm-timeline { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .vmm-map { grid-template-columns: 1fr; }
  .vmm-lab__header,
  .vmm-handle-lab__header { display: block; }
  .vmm-lab__counter { display: block; margin-top: 0.45rem; }
  .vmm-lab__copy { min-height: 10rem; }
  .vmm-lab button { flex: 1 1 calc(50% - 0.55rem); }
  .vmm-control-group { width: 100%; }
  .vmm-handle-lab__viewport { overflow: hidden; }
  .vmm-handle-lab__viewport > svg { display: none; }
  .vmm-route-mobile {
    display: grid;
    gap: 0;
    justify-items: stretch;
    padding: 1.25rem 1rem;
  }
  .vmm-route-mobile__node {
    display: grid;
    gap: 0.35rem;
    padding: 1.1rem;
    border: 1px solid rgba(124,154,214,.4);
    border-radius: 1rem;
    background: rgba(255,255,255,.04);
    text-align: center;
  }
  .vmm-route-mobile__node strong { color: #edf4ff; }
  .vmm-route-mobile__node span,
  .vmm-route-mobile__channel span,
  .vmm-route-mobile__channel small {
    color: #aebed3;
    font: 0.75rem "IBM Plex Mono", monospace;
  }
  .vmm-route-mobile__channel {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0;
    text-align: center;
  }
  .vmm-route-mobile__channel i {
    width: 2px;
    height: 1.5rem;
    background: #5ce1e6;
  }
  .vmm-route-mobile__channel strong {
    min-width: 7.5rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid #69e7a4;
    border-radius: 999px;
    color: #a8f5c8;
    background: rgba(105,231,164,.12);
    font: 600 0.76rem "IBM Plex Mono", monospace;
  }
  .vmm-route-mobile__channel strong.is-error {
    border-color: #ff8e82;
    color: #ffb3ac;
    background: rgba(255,142,130,.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vmm-map-line,
  .vmm-export,
  .vmm-export-text { transition: none !important; }
}
