:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6b76;
  --paper: #f8f3ea;
  --paper-strong: #fffaf1;
  --line: #d7cdbd;
  --teal: #12776d;
  --teal-dark: #0b4e49;
  --amber: #df9b1f;
  --red: #c83d2c;
  --blue: #305fa7;
  --green: #467d33;
  --night: #17202a;
  --shadow: 0 24px 80px rgba(23, 32, 42, .18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 20px;
  background: #fff4df;
  border-bottom: 1px solid #e6c98d;
  color: #6b4d12;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.portfolio-demo-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 20px;
}

.portfolio-demo-list {
  display: grid;
  gap: 12px;
}

.portfolio-demo-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
  padding: 16px;
  cursor: pointer;
}

.portfolio-demo-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(18, 119, 109, 0.15);
}

.portfolio-demo-card h4 {
  margin: 0 0 6px;
}

.portfolio-demo-card small {
  color: var(--muted);
}

.portfolio-demo-detail {
  min-height: 320px;
}

.portfolio-demo-detail h3 {
  margin-top: 0;
}

.portfolio-demo-detail dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 16px;
}

.portfolio-demo-detail dt {
  color: var(--muted);
}

@media (max-width: 900px) {
  .portfolio-demo-layout {
    grid-template-columns: 1fr;
  }
}

a {
  color: inherit;
}

.hero {
  position: relative;
  min-height: clamp(650px, 92vh, 920px);
  overflow: hidden;
  isolation: isolate;
  background: #111a22;
  color: #fffaf0;
  display: grid;
  align-items: center;
  padding: clamp(28px, 5vw, 72px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 26, 34, .95) 0%, rgba(17, 26, 34, .74) 42%, rgba(17, 26, 34, .18) 100%),
    linear-gradient(0deg, rgba(17, 26, 34, .82) 0%, rgba(17, 26, 34, 0) 44%);
}

.hero-map {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform: scale(1.04);
}

.hero-map svg {
  width: 100%;
  height: 100%;
  min-height: 720px;
  object-fit: cover;
}

.route {
  fill: none;
  stroke-width: 19;
  stroke-linecap: round;
  opacity: .82;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.24));
}

.route-teal { stroke: var(--teal); }
.route-amber { stroke: var(--amber); }
.route-blue { stroke: var(--blue); }
.route-red { stroke: var(--red); }

.blocks rect {
  fill: rgba(255, 250, 241, .14);
  stroke: rgba(255, 250, 241, .22);
  stroke-width: 2;
}

.train {
  fill: #fffaf0;
  stroke: var(--night);
  stroke-width: 4;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.3));
}

.train-one {
  offset-path: path("M82 580 C180 440 270 400 370 430 S560 570 700 480 900 230 1090 250");
  animation: ride 14s linear infinite;
}

.train-two {
  offset-path: path("M130 205 C280 220 330 285 420 325 S590 410 740 332 900 120 1095 138");
  animation: ride 18s linear infinite reverse;
}

.train-three {
  offset-path: path("M160 695 C260 640 355 630 455 565 S640 330 810 410 930 565 1070 535");
  animation: ride 20s linear infinite;
}

@keyframes ride {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}

.hero-copy {
  width: min(100%, 760px);
  max-width: 760px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: #f0bd56;
  font-weight: 850;
  text-transform: uppercase;
  font-size: .78rem;
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: 6.2rem;
  line-height: .94;
  font-weight: 920;
  overflow-wrap: break-word;
}

.hero-lede {
  max-width: 690px;
  margin: 28px 0 0;
  color: rgba(255, 250, 241, .82);
  font-size: 1.3rem;
  line-height: 1.45;
}

.hero-actions,
.close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
  text-decoration: none;
  border: 1px solid transparent;
}

.button.primary {
  background: #fffaf0;
  color: #122027;
}

.button.secondary {
  background: rgba(255, 250, 241, .12);
  color: #fffaf0;
  border-color: rgba(255, 250, 241, .35);
  backdrop-filter: blur(8px);
}

.button-icon {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 4px solid currentColor;
  display: inline-block;
}

.button-icon.square {
  border-radius: 4px;
  border-width: 3px;
}

.metric-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  z-index: 1;
  width: min(100%, 1180px);
  margin-top: clamp(36px, 6vh, 70px);
}

.metric-pill {
  min-height: 106px;
  border: 1px solid rgba(255, 250, 241, .22);
  background: rgba(17, 26, 34, .58);
  backdrop-filter: blur(12px);
  padding: 18px;
  border-radius: 8px;
}

.metric-pill span,
.metric-pill small,
.panel-head span,
.watch-meta,
.memory-list span,
.coverage-bars span,
.source-note {
  color: var(--muted);
}

.metric-pill span {
  color: rgba(255, 250, 241, .68);
  display: block;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-pill strong {
  display: block;
  margin-top: 8px;
  font-size: 2.5rem;
  line-height: 1;
}

.metric-pill small {
  color: rgba(255, 250, 241, .66);
  display: block;
  margin-top: 8px;
}

.section {
  padding: clamp(56px, 7vw, 104px) clamp(20px, 5vw, 72px);
}

.section h2 {
  margin: 0;
  max-width: 900px;
  font-size: 4rem;
  line-height: 1;
  font-weight: 920;
}

.intro-band {
  background: var(--paper);
}

.impact-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.impact-card,
.panel {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 32, 42, .08);
}

.impact-card {
  padding: 22px;
}

.impact-card strong {
  display: block;
  color: var(--teal-dark);
  font-size: 2.7rem;
  line-height: 1;
}

.impact-card h3 {
  margin: 18px 0 8px;
  font-size: 1.06rem;
}

.impact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.command-section {
  background: #edf2ea;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-top: clamp(46px, 5vw, 72px);
}

.command-section .section-head {
  align-items: start;
  margin-bottom: 24px;
}

.command-section h2 {
  max-width: 760px;
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  line-height: .96;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.chart-panel {
  min-height: 292px;
  overflow: hidden;
}

.chart-panel.span-2 {
  grid-column: span 2;
}

.column-chart {
  min-height: 206px;
  display: grid;
  grid-template-columns: repeat(9, minmax(28px, 1fr));
  gap: 10px;
  align-items: end;
  padding-top: 14px;
}

.column {
  display: grid;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.column-track {
  height: 138px;
  display: flex;
  align-items: end;
  border-radius: 8px;
  background: #e1d8c9;
  overflow: hidden;
}

.column-fill {
  width: 100%;
  min-height: 4px;
  background: var(--teal);
  border-radius: 8px 8px 0 0;
}

.column strong,
.stack-row strong,
.bar-row strong,
.route-item strong {
  color: var(--ink);
  font-size: .9rem;
}

.column span,
.stack-row span,
.bar-row span,
.route-item span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.stack-chart,
.flow-chart,
.bar-chart,
.progress-chart,
.route-chart {
  display: grid;
  gap: 12px;
}

.stack-row,
.bar-row {
  display: grid;
  gap: 7px;
}

.stack-row .stack-label,
.bar-row .bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.stack-track,
.bar-track {
  height: 14px;
  background: #e1d8c9;
  border-radius: 999px;
  overflow: hidden;
}

.stack-fill,
.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.progress-row {
  display: grid;
  gap: 7px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.progress-label strong {
  color: var(--ink);
  font-size: .92rem;
}

.progress-label span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 850;
  white-space: nowrap;
}

.progress-label b {
  color: var(--ink);
  font-size: 1.2rem;
}

.progress-track {
  height: 16px;
  border-radius: 999px;
  background: #e1d8c9;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.progress-row small {
  color: var(--muted);
  font-weight: 780;
}

.notification-chart {
  display: grid;
  gap: 18px;
}

.notification-total {
  min-height: 94px;
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 8px;
  background: var(--night);
  color: #fffaf0;
}

.notification-total strong,
.notification-total span {
  display: block;
}

.notification-total strong {
  font-size: 3rem;
  line-height: .9;
}

.notification-total span {
  margin-top: 8px;
  color: rgba(255, 250, 241, .68);
  font-weight: 850;
}

.notification-bars {
  display: grid;
  gap: 12px;
}

.notification-row {
  display: grid;
  gap: 7px;
}

.notification-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.notification-label span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.notification-label i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.notification-track {
  height: 15px;
  border-radius: 999px;
  background: #e1d8c9;
  overflow: hidden;
}

.notification-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.flow-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.flow-step:last-child {
  border-bottom: 0;
}

.flow-step strong {
  display: block;
}

.flow-step span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

.flow-badge {
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--night);
  color: #fffaf0;
  font-weight: 920;
}

.route-item {
  min-height: 62px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 7px solid var(--blue);
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-item em {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #f2eee5;
  color: var(--muted);
  font-style: normal;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.health-gauge {
  display: grid;
  gap: 14px;
}

.gauge-wrap {
  position: relative;
  min-height: 166px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2eee5;
  border: 1px solid var(--line);
}

.gauge-wrap svg {
  width: 100%;
  max-width: 236px;
  height: 148px;
}

.gauge-base,
.gauge-fill {
  fill: none;
  stroke-linecap: round;
  stroke-width: 18;
}

.gauge-base {
  stroke: #ded4c3;
}

.gauge-fill {
  stroke: var(--green);
}

.gauge-wrap.amber .gauge-fill {
  stroke: var(--amber);
}

.gauge-wrap.red .gauge-fill {
  stroke: var(--red);
}

.gauge-needle {
  stroke: var(--night);
  stroke-width: 5;
  stroke-linecap: round;
}

.gauge-pin {
  fill: var(--night);
  stroke: #fffaf0;
  stroke-width: 4;
}

.gauge-score {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  text-align: center;
}

.gauge-score strong,
.gauge-score span {
  display: block;
}

.gauge-score strong {
  font-size: 2rem;
  line-height: .9;
}

.gauge-score span {
  margin-top: 5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.health-factors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.health-factors span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-align: center;
}

.chart-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  padding: 18px;
}

.journey-section {
  background: #fffaf0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.journey-layout {
  display: grid;
  grid-template-columns: minmax(260px, .34fr) minmax(0, .66fr);
  gap: 18px;
  align-items: stretch;
}

.journey-rail,
.journey-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: 0 10px 30px rgba(23, 32, 42, .08);
}

.journey-rail {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.journey-summary {
  padding: 16px;
  border-radius: 8px;
  background: var(--night);
  color: #fffaf0;
}

.journey-summary strong {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
}

.journey-summary span,
.journey-summary small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 250, 241, .7);
  font-weight: 800;
}

.journey-summary small {
  font-size: .78rem;
}

.journey-step {
  width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 7px solid var(--green);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
  padding: 12px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.journey-step.amber {
  border-left-color: var(--amber);
}

.journey-step.red {
  border-left-color: var(--red);
}

.journey-step:hover,
.journey-step.active {
  transform: translateX(4px);
  background: #f7efe2;
  box-shadow: 0 10px 22px rgba(23, 32, 42, .1);
}

.journey-step.active {
  border-color: var(--teal);
}

.journey-step-number {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e6ddce;
  color: var(--ink);
  font-weight: 920;
}

.journey-step.active .journey-step-number {
  background: var(--teal);
  color: #fffaf0;
}

.journey-step-copy {
  min-width: 0;
}

.journey-step-copy strong,
.journey-step-copy em {
  display: block;
}

.journey-step-copy strong {
  font-weight: 920;
}

.journey-step-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: .84rem;
  line-height: 1.35;
}

.journey-step-progress {
  font-weight: 920;
  color: var(--teal-dark);
}

.journey-stage {
  padding: 24px;
}

.journey-stage-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  gap: 18px;
  align-items: start;
}

.journey-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(70, 125, 51, .12);
  color: var(--green);
  font-size: .72rem;
  font-weight: 920;
  text-transform: uppercase;
}

.journey-badge.amber {
  background: rgba(223, 155, 31, .14);
  color: #a76600;
}

.journey-badge.red {
  background: rgba(200, 61, 44, .12);
  color: var(--red);
}

.journey-stage h3 {
  margin: 14px 0 0;
  font-size: 2.3rem;
  line-height: 1.05;
}

.journey-stage p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.journey-meter {
  padding: 14px;
  border-radius: 8px;
  background: #f2eee5;
  border: 1px solid var(--line);
}

.journey-meter strong,
.journey-meter span {
  display: block;
}

.journey-meter strong {
  color: var(--teal-dark);
  font-size: 2rem;
  line-height: 1;
}

.journey-meter span {
  margin-top: 7px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.journey-meter i {
  display: block;
  height: 12px;
  margin-top: 14px;
  border-radius: 999px;
  background: #ded4c3;
  overflow: hidden;
}

.journey-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.journey-flow {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, .33fr) minmax(160px, .34fr) minmax(0, .33fr);
  gap: 14px;
  align-items: center;
}

.journey-flow-box {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 16px;
  color: #fffaf0;
}

.journey-flow-box.pull {
  background: var(--blue);
}

.journey-flow-box.push {
  background: var(--teal);
}

.journey-flow-box span {
  color: rgba(255, 250, 241, .72);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.journey-flow-box strong {
  font-size: 1.15rem;
  line-height: 1.2;
}

.journey-flow-line {
  position: relative;
  height: 108px;
  display: grid;
  place-items: center;
  color: var(--night);
  font-weight: 920;
  text-align: center;
}

.journey-flow-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, var(--amber) 0 16px, transparent 16px 28px),
    #ded4c3;
  background-size: 44px 100%, 100% 100%;
  animation: journeyFlow 1.4s linear infinite;
}

.journey-flow-line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #fffaf0;
  border: 7px solid var(--amber);
  box-shadow: 0 0 0 10px rgba(223, 155, 31, .16);
}

.journey-flow-line span {
  position: relative;
  z-index: 1;
  max-width: 130px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 250, 241, .9);
  font-size: .78rem;
  line-height: 1.25;
}

.journey-rom-callout {
  margin-top: 22px;
  padding: 18px;
  border-radius: 8px;
  background: #17202a;
  color: #fffaf0;
}

.journey-rom-callout span {
  display: block;
  color: #f0bd56;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.journey-rom-callout strong {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
  line-height: 1.45;
}

.journey-info-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.journey-info-grid section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.journey-info-grid section.wide {
  grid-column: 1 / -1;
}

.journey-info-grid h4 {
  margin: 0 0 10px;
  font-size: .92rem;
  text-transform: uppercase;
  color: var(--teal-dark);
}

.journey-info-grid ul {
  margin: 0;
  padding-left: 18px;
  color: #40505c;
  line-height: 1.48;
}

.journey-info-grid li + li {
  margin-top: 8px;
}

.journey-engagement {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.journey-engagement-row {
  padding: 13px;
  border-radius: 8px;
  background: #f2eee5;
  border: 1px solid var(--line);
}

.journey-engagement-row strong,
.journey-engagement-row span {
  display: block;
}

.journey-engagement-row strong {
  color: var(--ink);
}

.journey-engagement-row span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

@keyframes journeyFlow {
  to {
    background-position: 44px 0, 0 0;
  }
}

.map-section {
  background: #fffaf0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 32px;
}

.section-head p {
  margin: 0;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.5;
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 22px;
  align-items: stretch;
}

.ops-map {
  min-height: 560px;
  background: #e9e2d4;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ops-map svg {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
}

.station-route {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.station-route.shadow {
  stroke: rgba(23, 32, 42, .12);
  stroke-width: 24;
}

.station-node {
  cursor: pointer;
}

.station-node circle {
  fill: #fffaf0;
  stroke: var(--ink);
  stroke-width: 4;
  transition: transform .2s ease, fill .2s ease;
}

.station-node text {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 850;
  pointer-events: none;
}

.station-node.active circle,
.station-node:hover circle {
  fill: #f0bd56;
  transform: scale(1.08);
}

.city-building {
  fill: rgba(255, 250, 241, .74);
  stroke: rgba(23, 32, 42, .15);
  stroke-width: 2;
}

.station-detail {
  background: var(--night);
  color: #fffaf0;
  border-radius: 8px;
  padding: 26px;
  min-height: 560px;
  box-shadow: var(--shadow);
}

.station-detail h3 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.05;
}

.station-detail p {
  margin: 16px 0 0;
  color: rgba(255, 250, 241, .75);
  line-height: 1.55;
}

.station-proof {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.proof-row {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 250, 241, .1);
  border: 1px solid rgba(255, 250, 241, .14);
}

.proof-row strong {
  display: block;
  color: #f0bd56;
  font-size: 1.5rem;
}

.dashboard-section {
  background: var(--paper);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
  margin-top: 30px;
}

.panel {
  padding: 22px;
}

.panel.wide {
  min-height: 430px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.chart-panel .panel-head {
  min-height: 30px;
  margin-bottom: 14px;
}

.panel h3,
.panel-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.watchlist {
  display: grid;
  gap: 12px;
}

.watch-item {
  position: relative;
  border: 1px solid var(--line);
  border-left: 8px solid var(--red);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.watch-item.medium {
  border-left-color: var(--amber);
}

.watch-item.low {
  border-left-color: var(--green);
}

.watch-item h4 {
  margin: 0;
  font-size: 1.1rem;
}

.watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: .86rem;
  font-weight: 750;
}

.watch-actions {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.5;
}

.feed-note {
  margin-top: 12px;
  padding: 12px;
  background: #f2eee5;
  border-radius: 8px;
  color: #40505c;
  line-height: 1.45;
}

.feed-note strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.feed-note ul {
  margin: 0;
  padding-left: 18px;
}

.feed-note li + li {
  margin-top: 5px;
}

.coverage-bars {
  display: grid;
  gap: 16px;
}

.coverage-row {
  display: grid;
  gap: 7px;
}

.coverage-row div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-weight: 820;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: #e4d9c8;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.memory-section {
  background: #19232b;
  color: #fffaf0;
}

.memory-section .section-kicker,
.close-section .section-kicker {
  color: #f0bd56;
}

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

.memory-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 250, 241, .08);
  border: 1px solid rgba(255, 250, 241, .16);
}

.mode-toggle button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: rgba(255, 250, 241, .72);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.mode-toggle button.active {
  background: #fffaf0;
  color: var(--night);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.status-card {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 250, 241, .16);
  background: rgba(255, 250, 241, .08);
  padding: 16px;
}

.status-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--green);
}

.status-card.rag-amber::before {
  background: var(--amber);
}

.status-card.rag-red::before {
  background: var(--red);
}

.status-card h3 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.status-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.status-value strong {
  font-size: 2rem;
  line-height: 1;
}

.status-value span,
.status-card p {
  color: rgba(255, 250, 241, .68);
}

.status-card p {
  margin: 13px 0 0;
  line-height: 1.4;
}

.rag-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  margin-top: 14px;
  font-size: .72rem;
  font-weight: 920;
  text-transform: uppercase;
  background: rgba(70, 125, 51, .18);
  color: #9fd082;
}

.rag-amber .rag-pill {
  background: rgba(223, 155, 31, .18);
  color: #f0bd56;
}

.rag-red .rag-pill {
  background: rgba(200, 61, 44, .18);
  color: #ff9a8d;
}

.memory-section .panel {
  background: rgba(255, 250, 241, .08);
  border-color: rgba(255, 250, 241, .16);
  box-shadow: none;
}

.memory-list,
.skill-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.memory-item,
.skill-item {
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 250, 241, .08);
  border: 1px solid rgba(255, 250, 241, .1);
}

.memory-item strong,
.skill-item strong {
  display: block;
  color: #fffaf0;
}

.memory-item span,
.skill-item span {
  color: rgba(255, 250, 241, .68);
  display: block;
  margin-top: 5px;
  font-size: .9rem;
}

.skill-panel {
  max-height: 520px;
  overflow: auto;
}

.graph-view {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 18px;
}

.graph-view[hidden] {
  display: none;
}

.graph-stage,
.graph-detail {
  border-radius: 8px;
  border: 1px solid rgba(255, 250, 241, .16);
  background: rgba(255, 250, 241, .08);
}

.graph-stage {
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.graph-stage::after {
  content: "Click a node to reveal its live data flow";
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: 300px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 241, .1);
  border: 1px solid rgba(255, 250, 241, .18);
  color: rgba(255, 250, 241, .72);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .01em;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.graph-stage.has-selection::after {
  opacity: 0;
  transform: translateY(8px);
}

.graph-stage svg {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
}

.graph-edge {
  opacity: 0;
  stroke: rgba(255, 250, 241, .3);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 9 12;
  pointer-events: none;
  transition: opacity .18s ease, stroke .18s ease, stroke-width .18s ease;
}

.graph-edge.active {
  opacity: .95;
  stroke-width: 3.4;
  animation: graphFlow 1.35s linear infinite;
}

.graph-edge.outgoing {
  stroke: rgba(18, 119, 109, .95);
}

.graph-edge.incoming {
  stroke: rgba(240, 189, 86, .95);
}

.graph-edge-label {
  fill: rgba(255, 250, 241, .58);
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.graph-edge-label.active {
  opacity: 1;
}

.graph-node {
  cursor: pointer;
  transition: opacity .18s ease;
}

.graph-node rect {
  rx: 8;
  fill: rgba(255, 250, 241, .1);
  stroke: rgba(255, 250, 241, .3);
  stroke-width: 2;
  transition: fill .2s ease, stroke .2s ease, stroke-width .2s ease;
}

.graph-node circle {
  fill: var(--node-color, var(--green));
}

.graph-node text {
  fill: #fffaf0;
  font-size: 13px;
  font-weight: 850;
  pointer-events: none;
}

.graph-node.active rect,
.graph-node:hover rect {
  fill: rgba(240, 189, 86, .18);
  stroke: #f0bd56;
  stroke-width: 3;
}

.graph-node.connected rect {
  fill: rgba(18, 119, 109, .18);
  stroke: rgba(18, 119, 109, .9);
}

.graph-node.muted {
  opacity: .28;
}

@keyframes graphFlow {
  to {
    stroke-dashoffset: -42;
  }
}

@media (prefers-reduced-motion: reduce) {
  .graph-edge.active {
    animation: none;
    stroke-dasharray: none;
  }
}

.graph-detail {
  min-height: 560px;
  padding: 22px;
}

.graph-detail h3 {
  margin: 0;
  font-size: 1.65rem;
}

.graph-detail p {
  margin: 12px 0 0;
  color: rgba(255, 250, 241, .72);
  line-height: 1.5;
}

.graph-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.graph-detail-list div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 250, 241, .08);
  border: 1px solid rgba(255, 250, 241, .1);
}

.graph-detail-list strong {
  display: block;
  color: #f0bd56;
  margin-bottom: 4px;
}

.text-link {
  color: #f0bd56;
  font-weight: 850;
  text-decoration: none;
}

.close-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  background: #fffaf0;
}

.close-copy p {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.55;
}

.close-section .button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.close-section .button.primary {
  background: var(--teal);
  color: #fffaf0;
}

.source-note {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: .86rem;
}

.source-note a {
  color: var(--teal-dark);
  font-weight: 850;
}

@media (max-width: 1060px) {
  .metric-strip,
  .impact-grid,
  .command-grid,
  .journey-layout,
  .journey-info-grid,
  .journey-engagement,
  .dashboard-grid,
  .memory-layout,
  .status-grid,
  .graph-view,
  .ops-layout,
  .close-section {
    grid-template-columns: 1fr;
  }

  .chart-panel.span-2 {
    grid-column: auto;
  }

  .metric-strip {
    margin-top: 44px;
  }

  .hero {
    align-items: start;
    padding-top: 70px;
  }

  .station-detail,
  .ops-map,
  .ops-map svg {
    min-height: 430px;
  }
}

@media (max-width: 920px) {
  .hero h1 {
    font-size: 4.6rem;
  }

  .section h2 {
    font-size: 3.2rem;
  }
}

@media (max-width: 720px) {
  .section-head,
  .panel-head,
  .journey-stage-head,
  .journey-flow {
    align-items: start;
    flex-direction: column;
  }

  .journey-stage-head,
  .journey-flow {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.3rem;
    line-height: 1.02;
    max-width: 330px;
  }

  .hero-lede {
    font-size: 1rem;
    max-width: 330px;
  }

  .section h2 {
    font-size: 2rem;
    max-width: 330px;
    overflow-wrap: break-word;
  }

  .impact-grid,
  .command-grid,
  .journey-layout,
  .dashboard-grid,
  .memory-layout,
  .status-grid,
  .graph-view {
    width: min(100%, 330px);
  }

  .metric-pill strong,
  .impact-card strong {
    font-size: 2rem;
  }

  .station-detail h3 {
    font-size: 1.85rem;
  }

  .metric-strip {
    gap: 8px;
  }

  .metric-pill {
    min-height: auto;
  }

  .ops-map,
  .ops-map svg {
    min-height: 360px;
  }

  .station-node text {
    font-size: 14px;
  }

  .column-chart {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-chart,
  .health-factors,
  .journey-engagement {
    grid-template-columns: 1fr;
  }

  .journey-stage h3 {
    font-size: 1.8rem;
  }

  .journey-flow-line {
    height: 76px;
  }
}

@media (max-width: 430px) {
  .hero {
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero h1 {
    font-size: 2.2rem;
    line-height: 1.02;
  }

  .button {
    width: 100%;
    justify-content: center;
  }
}
