/* IGRM Atlas map workspace. No remote tiles or third-party runtime. */
body[data-page="maps.html"] .page-frame { padding-top: 14px; }
body[data-page="maps.html"] .page-content { padding-top: 0; }
body[data-page="maps.html"] .page-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
body[data-page="maps.html"] .page-heading .page-meta { display: none; }

.map-studio {
  --map-ink: #e7edf3;
  --map-muted: #8e9ba8;
  --map-panel: #0b1118;
  --map-panel-2: #101923;
  --map-rule: rgba(255, 255, 255, 0.11);
  width: min(1480px, calc(100vw - 32px));
  margin: 0 50%;
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rule) 78%, transparent);
  border-radius: 18px;
  background: #070c12;
  color: var(--map-ink);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.22);
}

.map-studio button,
.map-studio input { font: inherit; }
.map-studio button { color: inherit; }
.map-studio .eyebrow {
  margin: 0 0 5px;
  color: #67c6b4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-commandbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--map-rule);
  background:
    radial-gradient(circle at 15% 0%, rgba(40, 169, 145, 0.12), transparent 36rem),
    #091018;
}
.map-command-title h2 {
  margin: 0;
  color: #f5f8fa;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  font-weight: 450;
  letter-spacing: -0.025em;
}
.map-command-title > p:last-child {
  max-width: 68ch;
  margin: 7px 0 0;
  color: var(--map-muted);
  font-size: 0.82rem;
}
.map-command-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
}
.map-segmented,
.map-pills {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--map-rule);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}
.map-segmented button,
.map-pills button,
.map-share,
.map-zoom button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--map-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.map-segmented button[aria-selected="true"],
.map-pills button[aria-pressed="true"] {
  background: rgba(103, 198, 180, 0.15);
  color: #dffaf4;
  box-shadow: inset 0 0 0 1px rgba(103, 198, 180, 0.28);
}
.map-segmented button:focus-visible,
.map-pills button:focus-visible,
.map-share:focus-visible,
.map-zoom button:focus-visible,
.map-ranking button:focus-visible { outline-color: #67c6b4; }
.map-search {
  display: grid;
  gap: 4px;
  color: var(--map-muted);
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.map-search input {
  width: 190px;
  min-height: 38px;
  border: 1px solid var(--map-rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #f5f8fa;
  font-size: 0.78rem;
  text-transform: none;
}
.map-search input::placeholder { color: #71808e; }
.map-share {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--map-rule);
  background: rgba(255, 255, 255, 0.045);
}
.map-status-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: #8e9ba8;
  font-size: 0.7rem;
  white-space: nowrap;
}
.map-status-link:hover { color: #dffaf4; }
.map-share:hover,
.map-zoom button:hover { border-color: rgba(103, 198, 180, 0.5); color: #dffaf4; }

.map-controlrail {
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--map-rule);
  background: #0a1119;
}
.map-control-group { display: flex; gap: 9px; align-items: center; }
.map-overlay-control { justify-self: end; }
.map-control-label {
  color: #72808e;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.map-pills button { min-height: 28px; padding: 0 9px; }
.map-pills button[hidden] { display: none; }
[data-current-context][hidden] { display: none; }
.map-legend {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  gap: 8px;
  align-items: center;
  justify-self: stretch;
  color: var(--map-muted);
  font-size: 0.65rem;
}
.map-legend-ramp {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1c3440, #d7a43b, #e05d52);
  box-shadow: 0 0 16px rgba(224, 93, 82, 0.18);
}
.map-legend small {
  grid-column: 1 / -1;
  justify-self: end;
  color: #71808e;
}

.map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  height: 820px;
  min-height: 0;
}
.map-stage {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--map-rule);
  background: #070c12;
}
.map-stage-head {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  padding: 0 3px 12px;
}
.map-stage-head h3 {
  margin: 1px 0 0;
  color: #f4f7f9;
  font-size: 1rem;
  font-weight: 650;
}
.map-stage-kicker,
.map-stage-status {
  margin: 0;
  color: #748392;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
}
.map-stage-status {
  display: flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--map-rule);
  border-radius: 999px;
}
.map-stage-status.ready { border-color: rgba(103, 198, 180, 0.3); color: #8ed9ca; }
.map-stage-status.error { border-color: rgba(224, 93, 82, 0.45); color: #f19b92; }
.map-canvas-shell {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border: 1px solid var(--map-rule);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 45%, rgba(31, 74, 89, 0.22), transparent 44%),
    linear-gradient(155deg, #0a131c, #05090e 72%);
}
#atlas-map {
  display: block;
  width: 100%;
  height: 590px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
#atlas-map.is-dragging { cursor: grabbing; }
.map-grid-line { fill: none; stroke: rgba(255, 255, 255, 0.035); stroke-width: 0.5; }
.map-grid-fill { pointer-events: none; }
.map-feature {
  vector-effect: non-scaling-stroke;
  stroke: rgba(190, 211, 222, 0.2);
  stroke-width: 0.65;
  cursor: pointer;
  transition: fill 180ms ease, stroke 120ms ease, opacity 120ms ease;
}
.map-feature:hover,
.map-feature:focus { stroke: rgba(230, 247, 250, 0.8); stroke-width: 1.2; outline: none; }
.map-feature.is-selected {
  stroke: #f6d98c;
  stroke-width: 2;
  filter: url(#map-selected-glow);
}
#map-feature-layer.is-replay-base .map-feature {
  fill: #17222b !important;
  stroke: rgba(190, 211, 222, 0.18);
  opacity: 0.72;
  pointer-events: none;
  filter: none;
}
.map-national-outline {
  pointer-events: none;
  fill: none;
  stroke: rgba(236, 242, 245, 0.82);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}
.map-tooltip {
  position: absolute;
  z-index: 4;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid rgba(103, 198, 180, 0.28);
  border-radius: 7px;
  background: rgba(7, 12, 18, 0.94);
  color: #eaf2f4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-size: 0.7rem;
  line-height: 1.4;
  pointer-events: none;
}
.map-tooltip strong { display: block; margin-bottom: 2px; color: #fff; }
.map-zoom {
  position: absolute;
  right: 12px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--map-rule);
  border-radius: 8px;
  background: rgba(7, 12, 18, 0.88);
}
.map-zoom button {
  min-width: 34px;
  border-radius: 0;
  border-right: 1px solid var(--map-rule);
}
.map-zoom button:last-child { border-right: 0; padding-inline: 10px; }
.map-canvas-help {
  position: absolute;
  left: 12px;
  bottom: 8px;
  margin: 0;
  color: #667582;
  font-size: 0.61rem;
}

.map-chokepoint {
  cursor: pointer;
  outline: none;
}
.map-chokepoint-halo {
  fill: rgba(103, 198, 180, 0.12);
  stroke: rgba(103, 198, 180, 0.34);
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}
.map-chokepoint-core {
  fill: #8ed9ca;
  stroke: #071018;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.map-chokepoint:hover .map-chokepoint-halo,
.map-chokepoint:focus .map-chokepoint-halo,
.map-chokepoint.is-selected .map-chokepoint-halo {
  fill: rgba(246, 217, 140, 0.18);
  stroke: #f6d98c;
}
.map-chokepoint.is-selected .map-chokepoint-core { fill: #f6d98c; }
.map-chokepoint.is-gap .map-chokepoint-halo { fill: transparent; stroke-dasharray: 2.4 2.4; }
.map-chokepoint.is-gap .map-chokepoint-core { fill: #53626e; }

.map-replay-anchor { cursor: pointer; outline: none; }
.map-replay-halo,
.map-replay-core { vector-effect: non-scaling-stroke; }
.map-replay-halo {
  fill: rgba(103, 198, 180, 0.1);
  stroke: rgba(103, 198, 180, 0.46);
  stroke-width: 1;
}
.map-replay-core {
  fill: rgba(18, 103, 91, 0.92);
  stroke: #b7eee4;
  stroke-width: 1.2;
}
.map-replay-glyph {
  fill: #f5fbfa;
  font: 700 6px ui-monospace, SFMono-Regular, Menlo, monospace;
  pointer-events: none;
}
.map-replay-anchor:hover .map-replay-halo,
.map-replay-anchor:focus .map-replay-halo { stroke: #fff2c7; stroke-width: 1.8; }
.map-replay-anchor.is-selected .map-replay-halo {
  fill: transparent;
  stroke: #f6d98c;
  stroke-dasharray: 2.8 1.5;
  stroke-width: 2.2;
}
.map-replay-anchor.is-selected .map-replay-core { fill: #263f49; stroke: #f6d98c; stroke-width: 2; }
.map-replay-anchor.is-gap .map-replay-halo { fill: transparent; stroke-dasharray: 2 2; }
.map-replay-anchor.is-gap .map-replay-core { fill: #26313a; stroke: #7b8a95; }

.map-timebar {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 12px 9px;
  border: 1px solid var(--map-rule);
  border-radius: 10px;
  background: #091018;
}
.map-timebar[hidden] { display: none; }
.map-timebar-head,
.map-timebar-scale {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.map-timebar-head > div { display: grid; gap: 2px; }
.map-timebar-head strong,
.map-timebar-scale {
  color: #8d9aa5;
  font: 0.62rem ui-monospace, SFMono-Regular, Menlo, monospace;
}
.map-timebar-head strong { color: #dce5e8; }
.map-timebar-head button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(103, 198, 180, 0.28);
  border-radius: 6px;
  background: rgba(103, 198, 180, 0.07);
  color: #a9ded4;
  font-size: 0.64rem;
  font-weight: 700;
}
.map-timebar-head button[aria-pressed="true"] { background: rgba(246, 217, 140, 0.1); color: #f6d98c; }
.map-timebar-head button:disabled { border-color: var(--map-rule); color: #52616d; }
.map-timebar label { display: block; }
.map-timebar input[type="range"] { width: 100%; accent-color: #67c6b4; }
.map-timebar-scale span:nth-child(2) { color: #5f6f7b; text-align: center; }

.map-inspector {
  padding: 21px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: linear-gradient(180deg, #0d151e, #091018);
}
.map-inspector-state {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #7f8d99;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.map-inspector h3 {
  margin: 22px 0 7px;
  color: #f7f8f9;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 450;
  line-height: 1.05;
}
.map-inspector-summary { margin: 0; color: var(--map-muted); font-size: 0.78rem; line-height: 1.55; }
.map-facts { display: grid; gap: 0; margin: 24px 0; }
.map-facts div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--map-rule);
}
.map-facts div:last-child { border-bottom: 1px solid var(--map-rule); }
.map-facts dt { color: #7f8d99; font-size: 0.68rem; }
.map-facts dd {
  max-width: 170px;
  margin: 0;
  overflow-wrap: anywhere;
  color: #f3f6f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  text-align: right;
}
.map-evidence-card {
  padding: 14px;
  border: 1px solid rgba(103, 198, 180, 0.18);
  border-radius: 9px;
  background: rgba(103, 198, 180, 0.045);
}
.map-evidence-card p:not(.eyebrow) { margin: 0; color: #98a7b2; font-size: 0.72rem; line-height: 1.55; }
.map-evidence-card a { display: inline-block; margin-top: 10px; color: #8ed9ca; font-size: 0.7rem; }

.map-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  border-top: 1px solid var(--map-rule);
}
.map-ranking,
.map-layer-ledger { min-width: 0; padding: 20px 22px; background: #0a1119; }
.map-ranking { border-right: 1px solid var(--map-rule); }
.map-section-head { display: flex; gap: 24px; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.map-section-head h3,
.map-layer-ledger h3 { margin: 0; color: #f2f5f7; font-size: 0.95rem; }
.map-section-head > p { max-width: 40ch; margin: 0; color: #71808e; font-size: 0.67rem; text-align: right; }
.map-ranking table { width: 100%; margin: 0; color: #dbe3e7; font-size: 0.72rem; }
.map-ranking th { color: #758390; font-size: 0.61rem; letter-spacing: 0.07em; text-transform: uppercase; }
.map-ranking td,
.map-ranking th { border-color: var(--map-rule); }
.map-ranking button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #dfe8ec;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(103, 198, 180, 0.35);
  text-underline-offset: 3px;
}
.map-layer-ledger ul { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.map-layer-ledger li {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 4px 10px;
  padding: 10px 0;
  border-top: 1px solid var(--map-rule);
}
.map-layer-ledger strong { color: #e8edef; font-size: 0.74rem; }
.map-layer-ledger small { grid-column: 2; color: #7f8d99; font-size: 0.66rem; line-height: 1.45; }
.layer-state {
  align-self: start;
  justify-self: start;
  padding: 2px 6px;
  border: 1px solid var(--map-rule);
  border-radius: 999px;
  color: #82909d;
  font-size: 0.55rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.layer-state.live { border-color: rgba(103, 198, 180, 0.28); color: #8ed9ca; }
.layer-state.pending { border-color: rgba(215, 164, 59, 0.35); color: #e1bd70; }
.map-provenance {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--map-rule);
  background: #070c12;
}
.map-provenance[hidden] { display: none; }
.map-provenance p { max-width: 72ch; margin: 0; color: #6e7d89; font-size: 0.62rem; line-height: 1.5; }

.map-room-label {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 12px;
  color: #f5f8fa;
}
.map-room-label > span:last-child { display: grid; gap: 1px; }
.map-room-label b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.map-room-label small { color: #748392; font-size: 0.63rem; }
.map-room-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(103, 198, 180, 0.38);
  border-radius: 7px;
  background: rgba(103, 198, 180, 0.1);
  color: #9ae2d4;
  font: 700 0.78rem ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: 0 0 20px rgba(103, 198, 180, 0.08);
}
.map-command-open {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--map-rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #bdc8ce;
  font-size: 0.7rem;
  font-weight: 650;
}
.map-command-open span {
  margin-right: 6px;
  color: #8ed9ca;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.map-command-open:hover { border-color: rgba(103, 198, 180, 0.5); color: #eef8f6; }

.map-missionbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 9px 18px;
  border-bottom: 1px solid var(--map-rule);
  background: #070c12;
}
.map-missions { display: flex; gap: 5px; min-width: 0; }
.map-missions button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #7f8d99;
  font-size: 0.67rem;
  font-weight: 650;
  white-space: nowrap;
}
.map-missions button span {
  color: #52616d;
  font: 600 0.57rem ui-monospace, SFMono-Regular, Menlo, monospace;
}
.map-missions button[aria-pressed="true"] {
  border-color: rgba(103, 198, 180, 0.24);
  background: rgba(103, 198, 180, 0.08);
  color: #dff8f3;
}
.map-missions button[aria-pressed="true"] span { color: #78cdbd; }
.map-publication-clock {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #91a0ab;
  white-space: nowrap;
}
.map-publication-clock > span:last-child { display: grid; gap: 1px; }
.map-publication-clock b { color: #b8c4ca; font-size: 0.62rem; }
.map-publication-clock small { color: #64737f; font-size: 0.58rem; }

.map-pulsebar {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 2.3fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--map-rule);
  background: linear-gradient(90deg, #0b141d, #091018);
}
.map-pulse-heading { display: grid; gap: 1px; }
.map-pulse-heading span {
  color: #d6e1e5;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.map-pulse-heading small { color: #64737f; font-size: 0.58rem; }
.map-pulse-channels {
  display: grid;
  grid-template-columns: repeat(5, minmax(94px, 1fr));
  gap: 5px;
  min-width: 0;
}
.map-pulse-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  min-width: 0;
  padding: 6px 8px;
  border-left: 2px solid #67c6b4;
  background: rgba(255, 255, 255, 0.025);
}
.map-pulse-chip span {
  overflow: hidden;
  color: #8e9ba8;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-pulse-chip strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #eef5f5;
  font: 650 0.82rem ui-monospace, SFMono-Regular, Menlo, monospace;
}
.map-pulse-chip small { color: #586976; font-size: 0.53rem; }
.map-pulsebar > a { color: #7dcfbe; font-size: 0.61rem; white-space: nowrap; }
.map-loading-line { color: #6f7e89; font-size: 0.66rem; }

.map-inspector-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 3px;
  margin: -9px -8px 20px;
  padding: 3px;
  border: 1px solid var(--map-rule);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}
.map-inspector-tabs button {
  min-height: 31px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #72818d;
  font-size: 0.64rem;
  font-weight: 700;
}
.map-inspector-tabs button[aria-selected="true"] { background: rgba(103, 198, 180, 0.1); color: #dff8f3; }
[data-inspector-panel][hidden] { display: none; }
.map-panel-heading h3 { margin: 8px 0 7px; font-size: 1.35rem; }
.map-panel-heading > p:last-child { margin: 0 0 18px; color: #82919c; font-size: 0.72rem; line-height: 1.5; }
.map-episode-tape,
.map-lane-health { display: grid; gap: 0; margin: 0 0 16px; padding: 0; list-style: none; }
.map-episode-tape li,
.map-lane-health li { padding: 10px 0; border-top: 1px solid var(--map-rule); }
.map-episode-tape a { display: grid; gap: 3px; color: #dbe4e7; }
.map-episode-tape b { font-size: 0.69rem; }
.map-episode-tape span { color: #71818d; font-size: 0.6rem; }
.map-lane-health li { display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; align-items: center; }
.map-health-light { width: 6px; height: 6px; border-radius: 50%; background: #67c6b4; box-shadow: 0 0 9px rgba(103, 198, 180, 0.4); }
.map-lane-health b { color: #cdd7dc; font-size: 0.65rem; }
.map-lane-health span:last-child { color: #697984; font: 0.56rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.map-alignment-note {
  margin: 12px 0 18px;
  padding: 11px;
  border: 1px solid rgba(215, 164, 59, 0.24);
  border-radius: 8px;
  background: rgba(215, 164, 59, 0.06);
  color: #b9a77f;
  font-size: 0.66rem;
  line-height: 1.5;
}
.map-alignment-note.aligned { border-color: rgba(103, 198, 180, 0.24); background: rgba(103, 198, 180, 0.05); color: #91cbbf; }
.map-panel-link { color: #8ed9ca; font-size: 0.68rem; }

.map-replay-facts { margin-bottom: 12px; }
.map-replay-isolation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid rgba(246, 217, 140, 0.32);
  border-radius: 8px;
  background: rgba(246, 217, 140, 0.06);
  color: #c7b786;
  font-size: 0.61rem;
  line-height: 1.45;
}
.map-replay-isolation[hidden] { display: none; }
.map-replay-isolation strong { color: #f6d98c; text-transform: uppercase; letter-spacing: 0.08em; }
.map-replay-boundary {
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid rgba(215, 164, 59, 0.26);
  border-radius: 8px;
  background: rgba(215, 164, 59, 0.055);
  color: #c5b68e;
  font-size: 0.64rem;
  line-height: 1.5;
}
.map-replay-channel-list,
.map-replay-episode-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.map-replay-channel-list { margin-bottom: 18px; }
.map-replay-channel-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--map-rule);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: #d5dfe2;
  text-align: left;
}
.map-replay-channel-list button.is-selected {
  border: 2px solid #f6d98c;
  background: rgba(246, 217, 140, 0.07);
}
.map-replay-channel-list b { overflow: hidden; font-size: 0.66rem; text-overflow: ellipsis; white-space: nowrap; }
.map-replay-channel-list span { color: #71818d; font-size: 0.57rem; }
.map-replay-channel-list .is-gap { color: #b9a77f; }
.map-replay-selected-label {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: #f6d98c;
  font: 650 0.54rem ui-monospace, SFMono-Regular, Menlo, monospace;
}
.map-replay-section { margin: 0 0 18px; }
.map-replay-section > .eyebrow { margin-bottom: 7px; }
.map-replay-episode-list li { border-top: 1px solid var(--map-rule); }
.map-replay-episode-list a { display: grid; gap: 2px; padding: 9px 0; color: #dbe4e7; }
.map-replay-episode-list b { font-size: 0.65rem; }
.map-replay-episode-list span { color: #83919b; font-size: 0.58rem; }
.map-replay-episode-list small { color: #b9a77f; font-size: 0.54rem; }
.map-replay-empty { padding: 10px 0; color: #778691; font-size: 0.62rem; line-height: 1.45; }

.map-maritime-facts { margin-bottom: 16px; }
.map-maritime-spark {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 7px;
  overflow: visible;
  border-block: 1px solid var(--map-rule);
  background: linear-gradient(to bottom, transparent 49.5%, rgba(255, 255, 255, 0.045) 50%, transparent 50.5%);
}
.map-maritime-line {
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-maritime-line.salience { stroke: #e1bd70; }
.map-maritime-line.transits { stroke: #67c6b4; }
.map-maritime-cursor { stroke: rgba(242, 246, 247, 0.38); stroke-width: 0.8; stroke-dasharray: 2 2; }
.map-maritime-key {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  color: #7e8d98;
  font-size: 0.59rem;
}
.map-maritime-key span::before {
  display: inline-block;
  width: 12px;
  height: 2px;
  margin: 0 5px 2px 0;
  content: "";
  background: #67c6b4;
}
.map-maritime-key .salience::before { background: #e1bd70; }
.map-chokepoint-list { display: grid; gap: 3px; margin: 0 0 17px; padding: 0; list-style: none; }
.map-chokepoint-list button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
  color: #cad4d8;
  text-align: left;
}
.map-chokepoint-list button:hover,
.map-chokepoint-list button:focus-visible,
.map-chokepoint-list button.is-selected {
  border-color: rgba(103, 198, 180, 0.24);
  background: rgba(103, 198, 180, 0.06);
}
.map-chokepoint-list b { font-size: 0.66rem; }
.map-chokepoint-list span { color: #6f7f8b; font: 0.57rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.map-chokepoint-list .is-gap { color: #9a7e70; }
.map-maritime-ledger { display: grid; gap: 0; margin: 0 0 16px; border-block: 1px solid var(--map-rule); }
.map-maritime-ledger p {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--map-rule);
}
.map-maritime-ledger p:last-child { border-bottom: 0; }
.map-maritime-ledger span { color: #667681; font-size: 0.58rem; }
.map-maritime-ledger strong { overflow-wrap: anywhere; color: #aebbc1; font: 0.57rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.map-command-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(660px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(103, 198, 180, 0.32);
  border-radius: 13px;
  background: #0a1119;
  color: #e7edf3;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.65);
}
.map-command-dialog::backdrop { background: rgba(2, 6, 9, 0.76); backdrop-filter: blur(5px); }
.map-command-shell { margin: 0; }
.map-command-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--map-rule);
}
.map-command-dialog-head h3 { margin: 3px 0 0; color: #f4f7f8; font-size: 1rem; }
.map-command-dialog-head button { border: 0; background: transparent; color: #788793; font-size: 1.25rem; }
.map-command-query { display: block; padding: 13px; border-bottom: 1px solid var(--map-rule); }
.map-command-query input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(103, 198, 180, 0.23);
  border-radius: 8px;
  background: #070c12;
  color: #eff5f6;
  font: 0.8rem ui-monospace, SFMono-Regular, Menlo, monospace;
}
.map-command-results { max-height: 380px; overflow-y: auto; padding: 7px; }
.map-command-result {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 49px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #d8e1e5;
  text-align: left;
}
.map-command-result:hover,
.map-command-result.is-active { border-color: rgba(103, 198, 180, 0.22); background: rgba(103, 198, 180, 0.07); }
.map-command-result > span:first-child { color: #66c5b3; font: 0.61rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.map-command-result b { display: block; font-size: 0.7rem; }
.map-command-result small { color: #667681; font-size: 0.58rem; }
.map-command-result > span:last-child { color: #52616d; font-size: 0.57rem; }
.map-command-empty { padding: 20px; color: #71818d; font-size: 0.7rem; text-align: center; }
.map-command-help { margin: 0; padding: 10px 16px; border-top: 1px solid var(--map-rule); color: #53626e; font-size: 0.57rem; }

@media (max-width: 1040px) {
  .map-commandbar { grid-template-columns: 1fr; align-items: start; }
  .map-command-actions { justify-content: flex-start; flex-wrap: wrap; }
  .map-missionbar { grid-template-columns: auto minmax(0, 1fr); }
  .map-missions { overflow-x: auto; }
  .map-publication-clock { grid-column: 1 / -1; }
  .map-controlrail { grid-template-columns: 1fr 1fr; }
  .map-legend { grid-column: 1 / -1; }
  .map-overlay-control { justify-self: start; }
  .map-workspace { grid-template-columns: minmax(0, 1fr) 285px; }
  .map-pulsebar { grid-template-columns: 1fr; }
  .map-pulsebar > a { display: none; }
  .map-pulse-channels { overflow-x: auto; }
  .map-pulse-chip { min-width: 116px; }
}

@media (max-width: 760px) {
  .map-studio { width: 100vw; border-inline: 0; border-radius: 0; }
  .map-commandbar { gap: 12px; padding: 13px 16px 11px; }
  .map-command-title > p:last-child { display: none; }
  .map-command-actions { display: grid; grid-template-columns: 1fr auto; align-items: end; }
  .map-segmented { grid-column: 1 / -1; justify-self: start; }
  .map-search input { width: 100%; }
  .map-status-link { display: none; }
  .map-command-open { grid-column: 1; }
  .map-missionbar { grid-template-columns: auto minmax(0, 1fr); padding: 7px 12px; }
  .map-missions { overflow-x: auto; }
  .map-publication-clock { grid-column: 1 / -1; }
  .map-pulsebar { gap: 7px; padding: 7px 12px; }
  .map-pulse-channels { display: flex; max-width: 100%; overflow-x: auto; }
  .map-pulse-chip { flex: 0 0 126px; }
  .map-controlrail { grid-template-columns: 1fr; gap: 6px; padding: 8px 12px; }
  .map-control-group { align-items: flex-start; flex-direction: column; gap: 4px; }
  .map-pills { max-width: 100%; overflow-x: auto; }
  .map-legend { grid-column: auto; }
  .map-overlay-control { align-items: flex-start; justify-self: stretch; }
  .map-workspace { display: block; height: auto; min-height: 0; }
  .map-stage { padding: 10px; border-right: 0; }
  .map-stage-head { align-items: start; }
  .map-stage-status { max-width: 52%; white-space: nowrap; text-align: right; }
  .map-canvas-shell { min-height: 58vh; }
  #atlas-map { height: 58vh; min-height: 430px; }
  .map-canvas-help { display: none; }
  .map-inspector { overflow: visible; border-top: 1px solid var(--map-rule); }
  .map-inspector-tabs { margin-inline: 0; overflow-x: auto; }
  .map-inspector-tabs { display: flex; max-width: 100%; }
  .map-inspector-tabs button { flex: 0 0 78px; min-width: 78px; }
  .map-replay-channel-list button { max-width: 100%; }
  .map-replay-isolation { grid-template-columns: 1fr; }
  .map-inspector h3 { font-size: 1.45rem; }
  .map-lower-grid { display: block; }
  .map-ranking { border-right: 0; border-bottom: 1px solid var(--map-rule); }
  .map-section-head { align-items: start; flex-direction: column; gap: 5px; }
  .map-section-head > p { text-align: left; }
  .map-layer-ledger li { grid-template-columns: 86px 1fr; }
  .map-provenance { flex-direction: column; gap: 6px; }
  .map-timebar-scale span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .map-feature,
  .map-replay-anchor { transition: none; }
}
