:root {
  color-scheme: light dark;
  --bg: #181e28;
  --panel: rgba(33, 38, 46, 0.88);
  --panel-raised: rgba(39, 45, 55, 0.96);
  --panel-active: rgba(42, 181, 111, 0.18);
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.09);
  --text: #ecf1f7;
  --muted: #a6afbc;
  --quiet: #6d7b90;
  --accent: #2ab56f;
  --accent-strong: #168954;
  --violet: #69d7f7;
  --warning: #f2a86d;
  --max-width: 1240px;
  font-family: "Avenir Next", "Avenir", "SF Pro Display", "Helvetica Neue", Helvetica, sans-serif;
}

body[data-theme="light"] {
  --bg: #edf0f5;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-raised: rgba(255, 255, 255, 0.94);
  --panel-active: rgba(31, 157, 98, 0.16);
  --line: rgba(24, 32, 45, 0.1);
  --line-soft: rgba(24, 32, 45, 0.1);
  --text: #18202d;
  --muted: #5b6575;
  --quiet: #778398;
  --accent: #1f9d62;
  --accent-strong: #168954;
  --violet: #0f7d95;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 5;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #08110f;
  font-weight: 700;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 16px;
}

.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-block,
.about-nav,
.section-heading,
.scenario-meta {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 14px;
}

.brand {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-subtitle {
  margin: 0;
  color: var(--quiet);
  font-size: 0.85rem;
}

.about-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.about-nav a {
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.about-nav a:hover,
.about-nav a:focus-visible,
.about-nav a.active {
  background: var(--panel-raised);
  color: var(--text);
}

.about-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 76px 28px 110px;
}

.hero {
  max-width: 860px;
  margin-bottom: 54px;
}

.eyebrow,
.panel-label,
.zone-label,
.node-kicker {
  color: var(--accent);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.045em;
}

.hero-copy {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-note,
.projection-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--quiet);
  font-size: 0.82rem;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(42, 181, 111, 0.12);
}

.model-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 42px;
}

.model-card,
.scenario-tab {
  border: 1px solid var(--line-soft);
  background: var(--panel);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.model-card {
  min-height: 140px;
  padding: 18px;
  border-radius: 14px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.model-card:hover,
.model-card:focus-visible,
.model-card.is-selected {
  border-color: rgba(42, 181, 111, 0.6);
  background: #15231f;
  color: var(--text);
  outline: none;
  transform: translateY(-2px);
}

.model-index,
.scenario-tab span,
.boundary-mark {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.model-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.05rem;
}

.model-card > span:last-child {
  display: block;
  font-size: 0.86rem;
}

.explorer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
  align-items: stretch;
}

.diagram-panel,
.detail-panel,
.scenarios,
.boundaries {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--panel);
}

.diagram-panel {
  min-width: 0;
  padding: 24px;
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading .eyebrow {
  margin-bottom: 7px;
}

.diagram-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
  border-radius: 14px;
  scrollbar-color: var(--line) transparent;
}

.architecture {
  display: block;
  min-width: 890px;
  width: 100%;
  height: auto;
}

.zone {
  fill: rgba(18, 22, 31, 0.42);
  stroke: var(--line-soft);
  stroke-width: 1;
}

.zone-service {
  fill: rgba(25, 31, 43, 0.72);
}

.zone-label {
  fill: var(--quiet);
}

.edge {
  color: var(--line);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-dasharray: 5 7;
  transition: color 180ms ease, stroke-width 180ms ease, opacity 180ms ease;
}

.edge.is-route,
.edge.edge-active {
  color: var(--accent-strong);
  stroke-width: 3;
  stroke-dasharray: none;
}

.edge:not(.is-route) {
  opacity: 0.45;
}

.about-node {
  cursor: pointer;
  outline: none;
}

.about-node rect {
  fill: var(--panel-raised);
  stroke: var(--line);
  stroke-width: 1.5;
  transition: fill 160ms ease, stroke 160ms ease, filter 160ms ease;
}

.about-node:hover rect,
.about-node:focus-visible rect,
.about-node.is-active rect,
.about-node.is-route rect {
  fill: var(--panel-active);
  stroke: rgba(42, 181, 111, 0.72);
  filter: drop-shadow(0 8px 18px rgba(42, 181, 111, 0.1));
}

.node-kicker {
  fill: var(--accent);
  font-size: 10px;
}

.node-title {
  fill: var(--text);
  font-size: 16px;
  font-weight: 750;
}

.node-copy {
  fill: var(--muted);
  font-size: 12px;
}

.diagram-caption {
  margin: 14px 0 0;
  color: var(--quiet);
  font-size: 0.8rem;
}

.detail-panel {
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.panel-label {
  margin-bottom: 28px;
  color: var(--violet);
}

.detail-panel h2 {
  margin-bottom: 13px;
}

.detail-copy {
  min-height: 106px;
  color: var(--muted);
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
}

.detail-list dt {
  margin-bottom: 4px;
  color: var(--quiet);
  font-size: 0.75rem;
}

.detail-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
}

.panel-rule {
  flex: 1;
  min-height: 40px;
}

.panel-footnote {
  margin: 0;
  color: var(--quiet);
  font-size: 0.76rem;
}

.scenarios,
.boundaries {
  margin-top: 42px;
  padding: 28px;
}

.section-hint {
  margin: 0;
  color: var(--quiet);
  font-size: 0.8rem;
}

.scenario-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  margin-top: 26px;
}

.scenario-tabs {
  display: grid;
  align-content: start;
  gap: 7px;
}

.scenario-tab {
  border-radius: 10px;
  padding: 13px 15px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.scenario-tab span {
  display: inline;
  margin: 0 10px 0 0;
  color: var(--quiet);
}

.scenario-tab:hover,
.scenario-tab:focus-visible,
.scenario-tab.is-selected {
  border-color: rgba(182, 166, 255, 0.65);
  background: #211d32;
  color: var(--text);
  outline: none;
}

.scenario-tab.is-selected span {
  color: var(--violet);
}

.scenario-result {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-raised);
}

.scenario-meta {
  gap: 12px;
  margin-bottom: 23px;
  color: var(--quiet);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.scenario-number {
  color: var(--violet);
  font-weight: 800;
}

.scenario-result h3 {
  margin-bottom: 9px;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.scenario-result p {
  max-width: 720px;
  margin-bottom: 24px;
  color: var(--muted);
}

.scenario-route {
  overflow-x: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.77rem;
  white-space: nowrap;
}

.boundaries {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr;
  gap: 46px;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.boundary-grid article {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.boundary-mark {
  margin-bottom: 22px;
  color: var(--warning);
}

.boundary-grid h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.boundary-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .about-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-nav {
    justify-content: flex-start;
  }

  .explorer,
  .boundaries {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    min-height: 0;
  }

  .panel-rule {
    display: none;
  }

  .detail-copy {
    min-height: 0;
  }

  .boundary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 650px) {
  .about-page {
    padding: 54px 16px 80px;
  }

  .about-header {
    padding: 20px 16px;
  }

  .brand-block {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  h1 {
    font-size: clamp(2.5rem, 15vw, 4.5rem);
  }

  .model-strip,
  .boundary-grid,
  .scenario-layout {
    grid-template-columns: 1fr;
  }

  .model-card {
    min-height: 0;
  }

  .diagram-panel,
  .scenarios,
  .boundaries {
    padding: 18px;
    border-radius: 15px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .scenario-layout {
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
