:root {
  --ink: #06100e;
  --ink-deep: #030a08;
  --panel: rgba(9, 24, 20, .94);
  --panel-soft: rgba(13, 31, 26, .83);
  --panel-raised: #10251f;
  --text: #f1f6ed;
  --muted: #aec1b7;
  --faint: #7f978c;
  --line: rgba(185, 218, 196, .14);
  --line-strong: rgba(197, 226, 205, .25);
  --acid: #dbea68;
  --mint: #52e3b2;
  --cyan: #58c6db;
  --electric: #75f4ff;
  --red: #ff5a4f;
  --amber: #ffba57;
  --violet: #d99bff;
  --state-color: var(--mint);
  --shadow: 0 18px 46px rgba(0, 0, 0, .22);
  --radius: 2px;
  --text-micro: clamp(12px, .82vw, 13px);
  --text-small: clamp(13px, .92vw, 15px);
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif;
  font-synthesis: none;
}

*, *::before, *::after {
  box-sizing: border-box;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif !important;
}

html {
  min-width: 320px;
  color-scheme: dark;
  background: var(--ink-deep);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(ellipse at 13% -8%, rgba(53, 153, 113, .17), transparent 37%),
    radial-gradient(ellipse at 100% 45%, rgba(219, 234, 104, .055), transparent 30%),
    linear-gradient(180deg, #07120f 0, #06100e 48%, #040b09 100%);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

body[data-severity="warning"], body[data-severity="degraded"] { --state-color: var(--amber); }
body[data-severity="critical"] { --state-color: var(--red); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(207, 231, 214, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(207, 231, 214, .028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

button { font: inherit; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--acid);
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .36;
  background-image: repeating-linear-gradient(106deg, transparent 0 9px, rgba(255, 255, 255, .011) 10px, transparent 11px 20px);
  mix-blend-mode: screen;
}

.ambient-orb {
  position: fixed;
  z-index: -1;
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: .08;
  animation: orbDrift 18s ease-in-out infinite alternate;
}
.orb-a { left: -18vw; top: 20vh; background: var(--mint); }
.orb-b { right: -23vw; top: 48vh; background: var(--electric); animation-delay: -8s; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 88px;
  display: grid;
  grid-template-columns: minmax(410px, 1.35fr) minmax(320px, .9fr) minmax(210px, .5fr);
  align-items: stretch;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(4, 13, 10, .91);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .17);
  backdrop-filter: blur(18px) saturate(1.1);
}

.brand-block, .header-center, .clock-block {
  min-width: 0;
  padding: 12px 24px;
  overflow: hidden;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 17px;
  border-right: 1px solid var(--line);
}

.brand-index {
  width: 48px;
  height: 50px;
  flex: 0 0 48px;
  display: grid;
  grid-template-columns: 1fr 17px;
  align-items: center;
  color: var(--acid);
  border-right: 1px solid rgba(219, 234, 104, .32);
}
.brand-index b {
  font: 700 25px/1 "Microsoft YaHei", sans-serif;
  letter-spacing: .03em;
}
.brand-index small {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--faint);
  font: 600 10px/1 "Microsoft YaHei", sans-serif;
  letter-spacing: .12em;
}

.brand-copy { min-width: 0; }
.brand-copy p {
  margin: 0 0 3px;
  color: var(--faint);
  font: 600 var(--text-micro)/1.2 "Microsoft YaHei", sans-serif;
  letter-spacing: .26em;
}
.brand-copy h1 {
  margin: 0;
  overflow: hidden;
  color: #f5f8f1;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(21px, 1.85vw, 28px);
  font-weight: 700;
  letter-spacing: .075em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 13px;
  border-right: 1px solid var(--line);
}
.header-center .signal-bars { margin-left: auto; display: flex; align-items: end; gap: 2px; height: 17px; }
.signal-bars i { width: 3px; border-radius: 2px 2px 0 0; background: var(--mint); box-shadow: 0 0 7px rgba(82, 227, 178, .38); animation: signalDance 1.2s ease-in-out infinite alternate; }
.signal-bars i:nth-child(1) { height: 5px; animation-delay: -.6s; }
.signal-bars i:nth-child(2) { height: 8px; animation-delay: -.3s; }
.signal-bars i:nth-child(3) { height: 12px; animation-delay: -.9s; }
.signal-bars i:nth-child(4) { height: 16px; }
.header-center > div { min-width: 0; display: grid; gap: 4px; }
.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 6px rgba(219, 234, 104, .07), 0 0 22px rgba(219, 234, 104, .55);
  animation: statusBreath 2.6s ease-in-out infinite;
}
.data-status {
  overflow: hidden;
  color: var(--acid);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .045em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.header-center small, .clock-block small { color: var(--muted); font-size: var(--text-small); }

.clock-block {
  display: grid;
  align-content: center;
  text-align: right;
}
.clock-block span { color: var(--faint); font: 600 var(--text-micro) "Microsoft YaHei", sans-serif; letter-spacing: .18em; }
.clock-block strong { font: 600 25px/1.15 "Microsoft YaHei", sans-serif; letter-spacing: .05em; }
.clock-line { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
#motion-toggle {
  min-width: 72px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(117, 244, 255, .22);
  color: var(--cyan);
  background: rgba(117, 244, 255, .025);
  font: 600 var(--text-micro) "Microsoft YaHei", sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
}
#motion-toggle:hover { border-color: rgba(117, 244, 255, .55); color: var(--electric); }

.shell {
  width: min(1780px, 100%);
  margin: 0 auto;
  padding: 18px 22px 34px;
}

.scenario-strip {
  position: relative;
  min-height: 108px;
  display: grid;
  grid-template-columns: 145px minmax(490px, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(100deg, rgba(28, 59, 47, .76), rgba(10, 25, 21, .80) 52%, rgba(8, 20, 17, .94)),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.scenario-strip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--state-color);
  box-shadow: 0 0 20px color-mix(in srgb, var(--state-color) 55%, transparent);
  transition: background .25s ease;
}
.scenario-strip::after {
  content: "07";
  position: absolute;
  right: 26%;
  top: -25px;
  color: rgba(231, 243, 231, .025);
  font: 700 104px/1 "Microsoft YaHei", sans-serif;
  pointer-events: none;
}

.telemetry-rail {
  position: relative;
  min-height: 78px;
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(5, minmax(105px, .72fr)) minmax(280px, 1.6fr);
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(7, 22, 18, .96), rgba(10, 31, 26, .78), rgba(6, 19, 16, .96));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .13);
  overflow: hidden;
}
.telemetry-rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -20%;
  width: 18%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(117, 244, 255, .055), transparent);
  animation: railScan 7s linear infinite;
}
.telemetry-rail > div {
  position: relative;
  min-width: 0;
  padding: 12px 13px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  column-gap: 5px;
  border-right: 1px solid var(--line);
}
.telemetry-rail span { grid-column: 1 / -1; color: var(--faint); font: 600 var(--text-micro) "Microsoft YaHei", sans-serif; letter-spacing: .14em; }
.telemetry-rail strong { color: var(--electric); font: 600 20px "Microsoft YaHei", sans-serif; }
.telemetry-rail strong.negative { color: var(--mint); }
.telemetry-rail em { color: var(--muted); font-size: var(--text-micro); font-style: normal; }
.telemetry-pulse {
  position: absolute;
  right: 10px;
  bottom: 13px;
  width: 24px;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 20'%3E%3Cpath d='M0 12h9l4-8 6 15 5-9 4 2h20' fill='none' stroke='%2352e3b2' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 0 4px rgba(82,227,178,.6));
}
.confidence-orbit { position: absolute; right: 11px; bottom: 12px; width: 18px; height: 18px; border: 1px dashed rgba(117, 244, 255, .38); border-radius: 50%; animation: orbitSpin 5s linear infinite; }
.confidence-orbit::after { content: ""; position: absolute; width: 4px; height: 4px; top: -2px; left: 6px; border-radius: 50%; background: var(--electric); box-shadow: 0 0 7px var(--electric); }
.telemetry-rail .telemetry-marquee { display: flex; align-items: center; gap: 11px; overflow: hidden; }
.telemetry-marquee span { grid-column: auto; flex: 0 0 auto; color: var(--acid); }
.telemetry-marquee p { min-width: 0; margin: 0; overflow: hidden; color: var(--muted); font-size: var(--text-small); white-space: nowrap; text-overflow: ellipsis; }
.scenario-title {
  padding-left: 20px;
  display: grid;
  gap: 4px;
}
.scenario-title span, .eyebrow {
  color: var(--acid);
  font: 600 var(--text-micro)/1.1 "Microsoft YaHei", sans-serif;
  letter-spacing: .18em;
}
.scenario-title strong { font-size: 19px; font-weight: 700; letter-spacing: .04em; }
.scenario-center { min-width: 0; padding: 10px 18px 9px 6px; }
.scenario-buttons { display: flex; align-items: center; gap: 5px; }
.scenario-center p {
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.horizon-control {
  align-self: stretch;
  min-width: 256px;
  padding: 11px 14px;
  display: grid;
  align-content: center;
  gap: 7px;
  border-left: 1px solid var(--line);
}
.horizon-control > span { color: var(--faint); font: 600 var(--text-micro) "Microsoft YaHei", sans-serif; letter-spacing: .14em; text-align: right; }
.horizon-control > div { display: flex; justify-content: flex-end; gap: 5px; }

.scenario-buttons button, .horizon-control button, .view-tabs button {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, .018);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.scenario-buttons button:hover, .horizon-control button:hover, .view-tabs button:hover {
  color: var(--text);
  border-color: rgba(219, 234, 104, .45);
  transform: translateY(-1px);
}
.scenario-buttons button:focus-visible, .horizon-control button:focus-visible, .view-tabs button:focus-visible,
.station-node:focus-visible, .risk-item:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.scenario-buttons button.active, .horizon-control button.active, .view-tabs button.active {
  color: #0a120e;
  border-color: var(--acid);
  background: var(--acid);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18), 0 0 18px rgba(219, 234, 104, .10);
}
.scenario-buttons button { font-size: 14px; }
.horizon-control button { min-width: 74px; font: 600 13px "Microsoft YaHei", sans-serif; }

.metric-grid {
  display: grid;
  grid-template-columns: 1.16fr .92fr 1.08fr .88fr 1.25fr;
  gap: 9px;
  margin: 9px 0 10px;
}
.metric-card {
  position: relative;
  min-width: 0;
  min-height: 158px;
  padding: 17px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(16, 37, 31, .95), rgba(7, 19, 16, .95));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}
.metric-card:hover { border-color: rgba(197, 226, 205, .28); transform: translateY(-1px); transition: transform .2s ease, border-color .2s ease; }
.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  border-left: 1px solid rgba(255, 255, 255, .055);
  transform: translate(25px, -25px) rotate(45deg);
}
.metric-primary {
  border-color: rgba(219, 234, 104, .34);
  background:
    radial-gradient(circle at 0 100%, rgba(219, 234, 104, .12), transparent 47%),
    linear-gradient(145deg, rgba(40, 58, 26, .96), rgba(10, 28, 21, .96));
}
.metric-label {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .1em;
}
.metric-label span { color: var(--acid); font: 700 12px "Microsoft YaHei", sans-serif; }
.metric-main { display: flex; align-items: baseline; gap: 7px; margin-top: 15px; }
.metric-main strong {
  font: 600 clamp(31px, 3vw, 42px)/.95 "Microsoft YaHei", sans-serif;
  letter-spacing: -.02em;
}
.metric-main em, .quality-pair em, .station-detail small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
}
.load-card .metric-label,
.load-card .metric-main,
.load-card .metric-foot,
.load-card .load-track { position: relative; z-index: 2; }
.load-card .metric-foot { max-width: 66%; }
.load-card .load-track { width: 58%; }
.load-gauge {
  position: absolute;
  top: 26px;
  right: 3px;
  z-index: 1;
  width: 112px;
  height: 112px;
  opacity: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(82, 227, 178, .08));
}
.metric-foot { margin-top: 14px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-chip {
  position: absolute;
  right: 11px;
  bottom: 10px;
  max-width: 55%;
  overflow: hidden;
  color: var(--acid);
  font: 600 var(--text-micro) "Microsoft YaHei", sans-serif;
  letter-spacing: .08em;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: .72;
}
.risk-card { transition: border-color .25s ease, background .25s ease; }
.risk-card[data-severity="critical"] { border-color: rgba(255, 90, 79, .4); background: linear-gradient(145deg, rgba(67, 24, 21, .65), rgba(14, 24, 20, .96)); }
.risk-card[data-severity="warning"], .risk-card[data-severity="degraded"] { border-color: rgba(255, 186, 87, .38); background: linear-gradient(145deg, rgba(67, 49, 21, .52), rgba(14, 24, 20, .96)); }
.risk-main strong { color: var(--state-color); font-family: "Microsoft YaHei", sans-serif; font-size: clamp(23px, 2.2vw, 31px); font-weight: 700; letter-spacing: .06em; }
.load-track { height: 4px; margin-top: 15px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.load-track i { display: block; width: 0; height: 100%; background: var(--state-color); box-shadow: 0 0 13px var(--state-color); transition: width .4s ease, background .25s ease; }
.quality-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 17px; }
.quality-pair > div { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 6px; }
.quality-pair small { grid-column: 1 / -1; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.quality-pair strong { font: 600 clamp(21px, 2vw, 28px) "Microsoft YaHei", sans-serif; }

.operations-grid { display: grid; grid-template-columns: minmax(0, 1fr) 335px; gap: 10px; }
.panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-top: 1px solid rgba(117, 244, 255, .42); border-left: 1px solid rgba(117, 244, 255, .42); }
.panel::after { right: -1px; bottom: -1px; border-right: 1px solid rgba(219, 234, 104, .32); border-bottom: 1px solid rgba(219, 234, 104, .32); }
.panel-head {
  min-height: 82px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(18, 41, 34, .33), transparent);
}
.panel-head h2 { margin: 4px 0 0; font-size: 23px; font-weight: 700; letter-spacing: .04em; }
.panel-head-tools { display: flex; align-items: center; gap: 12px; }
.panel-stat { color: var(--muted); font-size: 12px; letter-spacing: .03em; white-space: nowrap; }
.panel-stat b { color: var(--state-color); font: 700 14px "Microsoft YaHei", sans-serif; }
.view-tabs { display: flex; gap: 4px; }
.view-tabs button { min-height: 38px; padding: 7px 12px; font-size: 13px; }
.photo-overlay-toggle {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid rgba(117, 244, 255, .28);
  color: var(--cyan);
  background: rgba(5, 21, 18, .76);
  font-size: 12px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.photo-overlay-toggle:hover { color: var(--electric); border-color: rgba(117, 244, 255, .62); }
.photo-overlay-toggle[aria-pressed="true"] { color: #06100e; border-color: var(--acid); background: var(--acid); }

.map-stage {
  position: relative;
  aspect-ratio: 1666 / 937;
  min-height: 500px;
  overflow: hidden;
  background: #0b1714;
}
.amap-container { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, transparent 24%, rgba(2, 11, 8, .08) 74%, rgba(2, 9, 7, .28));
}
.map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(69, 224, 172, .027) 28px);
}
.map-scan {
  position: absolute;
  inset: -30% -15%;
  z-index: 3;
  pointer-events: none;
  opacity: .18;
  background: linear-gradient(180deg, transparent 45%, rgba(117, 244, 255, .09) 49.5%, rgba(117, 244, 255, .32) 50%, rgba(117, 244, 255, .08) 50.5%, transparent 55%);
  animation: mapScan 7.5s ease-in-out infinite;
}
.map-hud {
  position: absolute;
  left: 13px;
  top: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(197, 230, 211, .58);
  font: 600 var(--text-micro) "Microsoft YaHei", sans-serif;
  letter-spacing: .14em;
}
.map-hud i { width: 28px; height: 1px; background: rgba(117, 244, 255, .35); box-shadow: 0 0 6px rgba(117, 244, 255, .35); }
.map-load-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  padding: 9px 12px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: rgba(4, 14, 11, .9);
  font-size: 13px;
  pointer-events: none;
}
.map-load-status.ready { opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.map-load-status.error { color: var(--red); border-color: rgba(255, 90, 79, .45); }
.amap-station-marker {
  position: relative;
  width: 35px;
  height: 35px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--mint);
  background: rgba(3, 16, 12, .94);
  box-shadow: 0 0 0 3px rgba(69, 224, 172, .09), 0 0 16px rgba(69, 224, 172, .24);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease, opacity .18s ease;
}
.amap-station-marker span { position: relative; z-index: 2; font: 700 13px "Microsoft YaHei", sans-serif; }
.amap-station-marker.sewage:not(.watch, .warning, .critical) { color: var(--cyan); }
.amap-station-marker.interceptor:not(.watch, .warning, .critical) { color: var(--amber); }
.amap-station-marker.cobuilt:not(.watch, .warning, .critical) { color: var(--violet); }
.amap-station-marker:hover, .amap-station-marker.selected {
  transform: scale(1.28);
  color: var(--acid);
  box-shadow: 0 0 0 6px rgba(219, 234, 104, .11), 0 0 25px rgba(219, 234, 104, .48);
}
.amap-station-marker.selected::before,
.amap-station-marker.selected::after {
  content: "";
  position: absolute;
  inset: -11px;
  z-index: 0;
  border: 1px solid rgba(219, 234, 104, .38);
  border-radius: 50%;
  animation: markerRadar 2.2s ease-out infinite;
}
.amap-station-marker.selected::after { animation-delay: -1.1s; }
.amap-station-marker.watch { color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 186, 87, .12), 0 0 17px rgba(255, 186, 87, .38); }
.amap-station-marker.warning, .amap-station-marker.critical { color: var(--red); animation: alarmPulse 1.35s ease-in-out infinite; }
.amap-station-marker.offline { color: #aab8b1; border-style: dashed; opacity: .72; animation: offlineBlink 2s steps(2, end) infinite; }
.map-coordinate-note {
  position: absolute;
  left: 12px;
  bottom: 42px;
  z-index: 5;
  max-width: min(520px, calc(100% - 24px));
  margin: 0;
  padding: 7px 9px;
  border-left: 2px solid var(--cyan);
  color: #c7d8cf;
  background: rgba(4, 14, 11, .82);
  font-size: 12px;
  backdrop-filter: blur(6px);
}
.amap-scalecontrol { color: #d7e8df !important; }
.amap-toolbar { border-color: rgba(197, 226, 205, .24) !important; background: rgba(4, 14, 11, .88) !important; }
.map-legend {
  position: absolute;
  right: 12px;
  bottom: 11px;
  z-index: 5;
  padding: 7px 9px;
  display: flex;
  gap: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(4, 14, 11, .89);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
  font-size: 12px;
  backdrop-filter: blur(7px);
}
.map-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.legend-dot.sewage { background: var(--cyan); }
.legend-dot.combined { background: var(--mint); }
.legend-dot.interceptor { background: var(--amber); }
.legend-dot.cobuilt { background: var(--violet); }
.topology-stage {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 54%, rgba(117, 244, 255, .08), transparent 30%),
    radial-gradient(circle at 18% 70%, rgba(69, 224, 172, .05), transparent 28%),
    linear-gradient(rgba(69, 224, 172, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 224, 172, .028) 1px, transparent 1px),
    #07130f;
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
}
.topology-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .42);
}
.topology-hud {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(197, 230, 211, .62);
  font: 700 13px "Microsoft YaHei", sans-serif;
  letter-spacing: .12em;
}
.topology-hud i { width: 26px; height: 1px; background: rgba(117, 244, 255, .35); }
.topology-modebar {
  position: absolute;
  top: 42px;
  right: 14px;
  left: 14px;
  z-index: 5;
  min-height: 52px;
  padding: 8px 10px 8px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(117, 244, 255, .22);
  background: linear-gradient(90deg, rgba(10, 35, 28, .96), rgba(5, 19, 16, .9));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22), inset 3px 0 0 var(--cyan);
}
.topology-mode-copy { min-width: 0; display: grid; grid-template-columns: auto auto minmax(120px, 1fr); align-items: baseline; column-gap: 10px; }
.topology-mode-copy > span { grid-column: 1 / -1; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.topology-mode-copy strong { color: #effff8; font-size: 18px; letter-spacing: .04em; }
.topology-mode-copy small { overflow: hidden; color: #9ec6b6; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.topology-mode-status { padding: 3px 7px; border: 1px solid currentColor; font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.topology-mode-status.normal { color: var(--mint); background: rgba(82, 227, 178, .07); }
.topology-mode-status.dispatch { color: var(--amber); background: rgba(255, 186, 87, .08); }
.topology-mode-switch { display: flex; align-self: stretch; gap: 6px; }
.topology-mode-switch button {
  min-width: 122px;
  padding: 7px 12px;
  border: 1px solid rgba(197, 230, 211, .18);
  color: #b9d2c7;
  background: rgba(3, 14, 11, .72);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.topology-mode-switch button span { margin-right: 7px; color: rgba(117, 244, 255, .58); font: 800 11px Consolas, monospace; }
.topology-mode-switch button:hover { border-color: rgba(117, 244, 255, .52); color: #fff; }
.topology-mode-switch button.active { border-color: var(--acid); color: #08110e; background: var(--acid); box-shadow: 0 0 18px rgba(219, 234, 104, .2); }
.topology-mode-switch button.active span { color: rgba(8, 17, 14, .62); }
.topology-capacity-strip {
  position: absolute;
  top: 108px;
  right: 14px;
  left: 14px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(197, 230, 211, .12);
  background: rgba(3, 15, 12, .82);
  backdrop-filter: blur(8px);
}
.topology-capacity-strip > div { min-width: 0; padding: 7px 12px 8px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 10px; border-right: 1px solid rgba(197, 230, 211, .1); }
.topology-capacity-strip > div:last-child { border-right: 0; }
.topology-capacity-strip span { grid-column: 1 / -1; color: #7fa495; font-size: 12px; }
.topology-capacity-strip strong { color: #e8fff5; font: 700 17px "Microsoft YaHei", sans-serif; white-space: nowrap; }
.topology-capacity-strip small { color: #82c7bc; font-size: 12px; white-space: nowrap; }
.topology-capacity-strip .capacity-match { box-shadow: inset 0 -2px 0 rgba(219, 234, 104, .52); }
.topology-capacity-strip .capacity-match strong { color: var(--acid); }
#topology-svg { position: absolute; inset: 172px 8px 62px; z-index: 2; width: calc(100% - 16px); height: calc(100% - 234px); }
.topology-edge { color: rgba(69, 224, 172, .58); transition: opacity .18s ease; }
.topology-edge path { fill: none; stroke: currentColor; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.topology-edge.public { color: rgba(117, 244, 255, .82); }
.topology-edge.inferred { color: rgba(255, 186, 87, .7); }
.topology-edge.inferred path { stroke-dasharray: 3 7; }
.topology-edge.route-dispatch { color: rgba(255, 186, 87, .96); }
.topology-edge.route-dispatch path { stroke-width: 2.7; stroke-dasharray: 9 7; animation: topology-flow 1.4s linear infinite; }
.topology-edge.standby { opacity: .24; }
.topology-edge.active { color: var(--acid); }
.topology-edge.active path { stroke-width: 3.5; filter: drop-shadow(0 0 5px rgba(219, 234, 104, .55)); }
.topology-edge.dimmed, .topology-node.dimmed { opacity: .15; }
#topology-arrow path { fill: currentColor; stroke: none; }
.topology-node { color: var(--mint); cursor: pointer; transition: opacity .18s ease; }
.topology-node rect { fill: rgba(4, 18, 14, .96); stroke: currentColor; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.topology-node text { fill: #edf9f2; font: 800 23px "Microsoft YaHei", sans-serif; pointer-events: none; }
.topology-node.sewage { color: var(--cyan); }
.topology-node.interceptor { color: var(--amber); }
.topology-node.cobuilt { color: var(--violet); }
.topology-node.junction { color: rgba(197, 230, 211, .6); }
.topology-node.junction text { font-size: 20px; font-weight: 700; }
.topology-node.key-node { color: var(--acid); }
.topology-node.key-node text, .topology-node.outlet text, .topology-node.plant-normal text, .topology-node.transfer text, .topology-node.plant-target text { font-size: 20px; }
.topology-node.outlet, .topology-node.plant-normal { color: var(--cyan); }
.topology-node.transfer { color: var(--amber); }
.topology-node.plant-target { color: var(--red); }
.topology-node:hover rect, .topology-node:focus-visible rect, .topology-node.active rect {
  fill: rgba(32, 50, 24, .96);
  stroke-width: 3;
  filter: drop-shadow(0 0 7px currentColor);
}
.topology-node:focus-visible { outline: none; }
.topology-legend {
  position: absolute;
  right: 12px;
  bottom: 11px;
  z-index: 4;
  padding: 7px 10px;
  display: flex;
  gap: 13px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(4, 14, 11, .9);
  font-size: 13px;
}
.topology-legend span { display: flex; align-items: center; gap: 6px; }
.topology-legend i { width: 21px; height: 0; border-top: 2px solid var(--mint); }
.topology-legend i.edge-public { border-top-color: var(--cyan); }
.topology-legend i.edge-dispatch { border-top-color: var(--amber); border-top-style: dashed; }
.topology-legend b { color: var(--acid); font-size: 17px; }
.topology-note {
  position: absolute;
  left: 12px;
  bottom: 11px;
  z-index: 4;
  max-width: calc(100% - 500px);
  margin: 0;
  padding: 7px 9px;
  border-left: 2px solid var(--acid);
  color: #c7d8cf;
  background: rgba(4, 14, 11, .88);
  font-size: 13px;
  line-height: 1.5;
}
@keyframes topology-flow { to { stroke-dashoffset: -32; } }
.schematic-stage {
  position: relative;
  aspect-ratio: 1666 / 880;
  min-height: 420px;
  padding: 18px 20px 37px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f3f4ed;
}
.schematic-stage img { width: 100%; max-height: 100%; object-fit: contain; }
.schematic-stage p { position: absolute; right: 18px; bottom: 8px; left: 18px; margin: 0; color: #283a32; font-size: 13px; text-align: center; }
.hidden { display: none !important; }

.station-detail {
  min-height: 106px;
  padding: 12px 15px;
  display: grid;
  grid-template-columns: 80px minmax(180px, 1.65fr) repeat(7, minmax(75px, .62fr));
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(18, 42, 34, .42), rgba(7, 19, 16, .4));
}
.station-detail > div { min-width: 0; display: grid; gap: 3px; }
.station-detail span { color: var(--faint); font: 600 var(--text-micro) "Microsoft YaHei", sans-serif; letter-spacing: .08em; }
.station-detail strong { overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.station-detail .station-badge { color: var(--acid); font: 700 28px/.95 "Microsoft YaHei", sans-serif; }
.station-detail .scope { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }

.alarm-panel { min-height: 628px; }
.alarm-count {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--state-color) 52%, transparent);
  border-radius: 50%;
  color: var(--state-color);
  font: 700 14px "Microsoft YaHei", sans-serif;
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--state-color) 8%, transparent);
}
.plant-forecast-alert {
  min-height: 76px;
  margin: 10px 10px 2px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 12px;
  border: 1px solid rgba(82, 227, 178, .3);
  border-left-width: 3px;
  background: linear-gradient(105deg, rgba(82, 227, 178, .09), rgba(7, 24, 19, .82) 67%);
  box-shadow: inset 0 0 28px rgba(82, 227, 178, .025);
}
.plant-forecast-alert > span { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plant-forecast-alert > span b { color: #9cc7b6; font: 800 11px "Microsoft YaHei", sans-serif; letter-spacing: .12em; }
.plant-forecast-alert > span em { color: var(--muted); font: 700 11px "Microsoft YaHei", sans-serif; font-style: normal; }
.plant-forecast-alert > div { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.plant-forecast-alert > div strong { color: var(--mint); font-size: 16px; white-space: nowrap; }
.plant-forecast-alert > div p { overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.plant-forecast-alert > i { color: var(--mint); font: 800 23px "Microsoft YaHei", sans-serif; font-style: normal; }
.plant-forecast-alert.warning { border-color: rgba(255, 186, 87, .48); background: linear-gradient(105deg, rgba(255, 186, 87, .11), rgba(27, 21, 12, .83) 67%); }
.plant-forecast-alert.warning > div strong, .plant-forecast-alert.warning > i { color: var(--amber); }
.plant-forecast-alert.critical { border-color: rgba(255, 90, 79, .58); background: linear-gradient(105deg, rgba(255, 90, 79, .13), rgba(32, 14, 12, .86) 67%); box-shadow: inset 0 0 32px rgba(255, 90, 79, .04), 0 0 18px rgba(255, 90, 79, .04); }
.plant-forecast-alert.critical > div strong, .plant-forecast-alert.critical > i { color: var(--red); }
.risk-list { padding: 2px 10px 114px; }
.head-note { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.risk-item {
  width: 100%;
  min-height: 72px;
  padding: 10px 6px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, padding-left .18s ease;
}
.risk-item:hover, .risk-item.selected { padding-left: 9px; background: linear-gradient(90deg, rgba(219, 234, 104, .055), transparent); }
.risk-rank { color: var(--faint); font: 600 12px "Microsoft YaHei", sans-serif; }
.risk-copy { min-width: 0; display: grid; gap: 4px; }
.risk-copy strong { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.risk-copy small { overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.risk-chip { padding: 6px 8px; border: 1px solid currentColor; color: var(--amber); font-size: 12px; }
.risk-item.warning .risk-chip, .risk-item.critical .risk-chip { color: var(--red); }
.risk-item.normal .risk-chip { color: var(--mint); }
.confidence-note {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}
.confidence-note > span { color: var(--muted); font-size: 12px; }
.confidence-note strong { color: var(--acid); font: 700 17px "Microsoft YaHei", sans-serif; }
.confidence-note i { grid-column: 1 / -1; height: 3px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.confidence-note i span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--mint), var(--acid)); transition: width .55s ease; }
.confidence-note small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; line-height: 1.55; }

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, .75fr);
  gap: 10px;
  margin-top: 10px;
}
.chart-panel, .action-panel { min-height: 440px; }
.chart-side { display: grid; justify-items: end; gap: 8px; }
.chart-legend { display: flex; gap: 13px; color: var(--muted); font-size: 12px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend b { font-weight: 400; }
.actual-line, .forecast-line { width: 17px; height: 2px; display: inline-block; background: #eaf2eb; }
.forecast-line { background: var(--acid); box-shadow: 0 0 8px rgba(219, 234, 104, .35); }
.band-swatch { width: 17px; height: 7px; display: inline-block; border: 1px solid rgba(219, 234, 104, .28); background: rgba(219, 234, 104, .12); }
.forecast-chart { height: 320px; padding: 4px 8px 0; }
.forecast-chart canvas { filter: drop-shadow(0 7px 18px rgba(0, 0, 0, .14)); }
.forecast-chart svg { width: 100%; height: 100%; overflow: visible; }
.grid-line { stroke: rgba(197, 227, 205, .085); stroke-width: 1; }
.axis-label { fill: #9eb2a8; font: 12px "Microsoft YaHei", sans-serif; }
.axis-current { fill: var(--acid); }
.capacity-line { stroke: rgba(255, 90, 79, .72); stroke-width: 1; stroke-dasharray: 4 5; }
.warning-line { stroke: rgba(255, 186, 87, .66); stroke-width: 1; stroke-dasharray: 7 6; }
.capacity-label { fill: #ffaaa3; font: 12px "Microsoft YaHei", sans-serif; }
.warning-label { fill: #ffd08b; font: 12px "Microsoft YaHei", sans-serif; }
.actual-path { fill: none; stroke: #e7efea; stroke-width: 1.5; opacity: .77; vector-effect: non-scaling-stroke; }
.forecast-path { fill: none; stroke: var(--acid); stroke-width: 2.3; vector-effect: non-scaling-stroke; }
.forecast-path { stroke-dasharray: 1500; stroke-dashoffset: 1500; animation: drawPath 1.15s cubic-bezier(.2,.7,.25,1) forwards; }
.actual-path { stroke-dasharray: 1500; stroke-dashoffset: 1500; animation: drawPath .9s .1s cubic-bezier(.2,.7,.25,1) forwards; }
.current-line { stroke: rgba(219, 234, 104, .28); stroke-width: 1; stroke-dasharray: 2 5; }
.current-point { fill: var(--acid); stroke: #07110e; stroke-width: 2; }
.current-point { animation: currentPointPulse 1.9s ease-in-out infinite; }
.rain-bar { fill: rgba(88, 198, 219, .48); }
.chart-footer { min-height: 54px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.rain-swatch { width: 5px; height: 9px; margin-right: 5px; display: inline-block; vertical-align: -1px; background: rgba(88, 198, 219, .55); }

.approval-badge { padding: 7px 9px; border: 1px solid rgba(255, 186, 87, .38); color: var(--amber); font-size: 12px; }
.action-summary { margin: 13px 14px 0; padding: 11px 12px; border-left: 2px solid var(--state-color); color: var(--text); background: rgba(255, 255, 255, .025); font-size: 13px; line-height: 1.5; }
.action-list { margin: 0; padding: 5px 14px; list-style: none; }
.action-list li { min-height: 82px; padding: 13px 0; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; border-bottom: 1px solid var(--line); }
.priority { width: 34px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); font: 600 12px "Microsoft YaHei", sans-serif; }
.priority.p0 { color: var(--red); border-color: rgba(255, 90, 79, .4); }
.priority.p1 { color: var(--amber); border-color: rgba(255, 186, 87, .4); }
.priority.p2 { color: var(--mint); border-color: rgba(82, 227, 178, .35); }
.action-list strong { font-size: 15px; }
.action-list p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.guardrail { margin: 10px 14px 14px; padding: 10px 11px; border-left: 3px solid var(--amber); background: rgba(255, 186, 87, .055); }
.guardrail strong { color: var(--amber); font-size: 13px; }
.guardrail p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.evidence-panel { grid-column: 1 / -1; min-height: 285px; }
.evidence-body { padding: 13px 14px 3px; display: grid; grid-template-columns: minmax(400px, .85fr) minmax(480px, 1.15fr); gap: 24px; }
.model-score { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.model-score > div { min-width: 0; min-height: 98px; padding: 13px 11px; display: grid; align-content: center; gap: 5px; background: var(--panel-raised); }
.model-score span { color: var(--muted); font-size: 12px; }
.model-score strong { font: 600 22px "Microsoft YaHei", sans-serif; }
.model-score small { color: var(--faint); font-size: 12px; }
.feature-list { display: grid; gap: 8px; align-content: center; }
.feature-chart { width: 100%; height: 190px; min-height: 190px; }
.feature-row { display: grid; grid-template-columns: 26px 165px 1fr 48px; gap: 10px; align-items: center; font-size: 12px; }
.feature-rank { color: var(--faint); font: 500 12px "Microsoft YaHei", sans-serif; }
.feature-row > span:nth-child(2) { overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.feature-bar { height: 5px; overflow: hidden; background: rgba(255, 255, 255, .055); }
.feature-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--acid)); box-shadow: 0 0 10px rgba(219, 234, 104, .17); }
.feature-row em { color: var(--faint); font-style: normal; text-align: right; }
.synthetic-warning { margin: 13px 14px 14px; padding: 11px 13px; border: 1px solid rgba(255, 90, 79, .24); color: #f3aa9a; background: rgba(255, 90, 79, .045); font-size: 12px; line-height: 1.6; }

.footer-bar {
  min-height: 37px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  background: #030a08;
  font: 500 var(--text-micro) "Microsoft YaHei", sans-serif;
  letter-spacing: .12em;
}
.load-error { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; padding: 30px; text-align: center; background: rgba(4, 11, 9, .97); }
.load-error strong { color: var(--red); font: 700 27px "Microsoft YaHei", sans-serif; }
.load-error p { color: var(--muted); }

.reveal { animation: riseIn .55s both cubic-bezier(.2, .72, .25, 1); }
.reveal-1 { animation-delay: .03s; }
.reveal-2 { animation-delay: .10s; }
.reveal-3 { animation-delay: .17s; }
.reveal-4 { animation-delay: .24s; }
.reveal-5 { animation-delay: .31s; }

.scenario-shift .metric-card, .scenario-shift .telemetry-rail, .scenario-shift .panel-head {
  animation: scenarioFlash .5s ease both;
}
.motion-off *, .motion-off *::before, .motion-off *::after { animation-play-state: paused !important; }
.motion-off .reveal {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.motion-off.scenario-shift .metric-card,
.motion-off.scenario-shift .telemetry-rail,
.motion-off.scenario-shift .panel-head {
  animation: none !important;
  filter: none !important;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes statusBreath {
  0%, 100% { opacity: .75; transform: scale(.88); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes alarmPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 90, 79, .13), 0 0 12px rgba(255, 90, 79, .35); }
  50% { box-shadow: 0 0 0 9px rgba(255, 90, 79, 0), 0 0 25px rgba(255, 90, 79, .65); }
}
@keyframes offlineBlink { 0%, 45% { opacity: .75; } 46%, 100% { opacity: .4; } }
@keyframes orbDrift { from { transform: translate3d(-2vw, -3vh, 0) scale(.92); } to { transform: translate3d(7vw, 5vh, 0) scale(1.08); } }
@keyframes signalDance { from { opacity: .35; transform: scaleY(.55); } to { opacity: 1; transform: scaleY(1); } }
@keyframes railScan { from { transform: translateX(0); } to { transform: translateX(700%); } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes mapScan { 0%, 12% { transform: translateY(-35%); opacity: 0; } 24% { opacity: .34; } 76% { opacity: .24; } 88%, 100% { transform: translateY(35%); opacity: 0; } }
@keyframes radarRipple { 0% { inset: 50%; opacity: .9; } 100% { inset: 0; opacity: 0; } }
@keyframes radarSweep { to { transform: rotate(360deg); } }
@keyframes markerRadar { 0% { opacity: .85; transform: scale(.65); } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes drawPath { to { stroke-dashoffset: 0; } }
@keyframes currentPointPulse { 0%, 100% { opacity: .75; r: 4; } 50% { opacity: 1; r: 6; } }
@keyframes scenarioFlash { 0% { filter: brightness(1); } 35% { filter: brightness(1.28); } 100% { filter: brightness(1); } }

@media (max-width: 1240px) {
  .masthead { grid-template-columns: minmax(360px, 1.25fr) minmax(300px, .85fr) 210px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .quality-card { grid-column: span 2; }
  .telemetry-rail { grid-template-columns: repeat(5, minmax(100px, 1fr)); }
  .telemetry-marquee { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .operations-grid { grid-template-columns: minmax(0, 1fr) 305px; }
  .station-detail { grid-template-columns: 72px minmax(170px, 1.5fr) repeat(3, minmax(75px, .7fr)); }
  .station-detail > div:nth-child(n+6) { display: none; }
  .evidence-body { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .masthead { position: relative; height: auto; grid-template-columns: 1fr 230px; }
  .header-center { grid-column: 1 / -1; grid-row: 2; padding-block: 9px; border-top: 1px solid var(--line); border-right: 0; }
  .clock-block { grid-column: 2; grid-row: 1; }
  .scenario-strip { grid-template-columns: 125px 1fr; }
  .horizon-control { grid-column: 1 / -1; min-width: 0; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); border-left: 0; }
  .horizon-control > span { text-align: left; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .telemetry-rail { grid-template-columns: repeat(3, 1fr); }
  .telemetry-rail > div:nth-child(3) { border-right: 0; }
  .quality-card { grid-column: auto; }
  .operations-grid, .analytics-grid { grid-template-columns: 1fr; }
  .alarm-panel { min-height: auto; }
  .risk-list { padding-bottom: 8px; }
  .confidence-note { position: static; margin: 12px 14px 14px; }
  .evidence-panel { grid-column: auto; }
}

@media (max-width: 660px) {
  .masthead { display: block; }
  .brand-block { padding: 11px 14px; border-right: 0; }
  .brand-index { width: 42px; flex-basis: 42px; }
  .brand-copy h1 { font-size: 22px; }
  .header-center { padding-inline: 14px; }
  .clock-block { display: none; }
  .shell { padding: 10px 10px 24px; }
  .scenario-strip { display: block; }
  .scenario-title { padding: 13px 15px 3px; }
  .scenario-center { padding: 8px 14px 11px; }
  .scenario-buttons { display: grid; grid-template-columns: repeat(2, 1fr); }
  .scenario-center p { white-space: normal; line-height: 1.5; }
  .horizon-control { padding-inline: 14px; display: grid; }
  .horizon-control > div { justify-content: stretch; }
  .horizon-control button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr; }
  .telemetry-rail { grid-template-columns: repeat(2, 1fr); }
  .telemetry-rail > div:nth-child(3) { border-right: 1px solid var(--line); }
  .telemetry-rail > div:nth-child(even) { border-right: 0; }
  .telemetry-marquee { grid-column: 1 / -1; }
  .metric-card { min-height: 148px; }
  .panel-head { align-items: flex-start; }
  .map-panel .panel-head { flex-direction: column; }
  .map-panel .panel-head-tools { width: 100%; justify-content: space-between; }
  .panel-head-tools, .chart-side { align-items: flex-end; }
  .panel-stat { display: none; }
  .map-stage, .schematic-stage { width: 100%; height: 430px; min-height: 0; aspect-ratio: auto; }
  .topology-stage { width: 100%; height: 760px; min-height: 0; aspect-ratio: auto; }
  .topology-stage { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
  .topology-hud { max-width: calc(100% - 24px); flex-wrap: wrap; row-gap: 4px; font-size: 12px; }
  .topology-modebar { top: 55px; right: 8px; left: 8px; min-width: 0; align-items: stretch; flex-direction: column; gap: 7px; }
  .topology-mode-copy { width: 100%; }
  .topology-mode-copy small { max-width: 190px; }
  .topology-mode-switch { width: 100%; }
  .topology-mode-switch button { min-width: 0; flex: 1; font-size: 13px; }
  .topology-capacity-strip { top: 159px; right: auto; left: 8px; width: 750px; }
  .topology-capacity-strip span, .topology-capacity-strip small { font-size: 12px; }
  #topology-svg { inset: 226px auto 100px 0; width: 1120px; max-width: none; height: calc(100% - 326px); }
  .topology-note { right: auto; bottom: 53px; left: 8px; width: min(720px, calc(100vw - 36px)); max-width: none; font-size: 12px; }
  .topology-legend { right: auto; bottom: 8px; left: 8px; width: max-content; max-width: calc(100vw - 36px); justify-content: flex-start; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; }
  .photo-overlay-toggle { min-height: 36px; padding-inline: 9px; }
  .map-hud { max-width: calc(100% - 24px); flex-wrap: wrap; row-gap: 4px; }
  .map-coordinate-note { right: 8px; bottom: 48px; left: 8px; font-size: 11px; }
  .map-legend { right: 7px; left: 7px; justify-content: center; gap: 8px; }
  .station-detail { grid-template-columns: 65px 1fr 1fr; }
  .station-detail > div:nth-child(n+4) { display: none; }
  .chart-legend { gap: 7px; }
  .forecast-chart { height: 265px; padding-inline: 7px; }
  .chart-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
  .evidence-body { padding-inline: 10px; }
  .model-score { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 20px 110px 1fr 36px; }
  .feature-chart { height: 220px; min-height: 220px; }
  .load-gauge { right: 8px; width: 122px; height: 122px; }
  .footer-bar { padding: 9px 12px; align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
