/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
:root {
  --timeline-height: 72px;
  --timeline-tab-height: 22px;
  --top-chrome-height: 52px;
  --left-panels-rail-width: 12px;
  --panel-transition-duration: 0.22s;
  --panel-transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --bg: #e9f1f5;
  --surface: rgba(255, 255, 255, 0.58);
  --surface-solid: rgba(255, 255, 255, 0.92);
  --border: rgba(22, 42, 68, 0.1);
  --border-subtle: rgba(22, 42, 68, 0.06);
  --text: #0f1c2e;
  --text-muted: #5a6d82;
  --text-heading: #081524;
  --accent: #0a8fad;
  --accent-soft: rgba(10, 143, 173, 0.12);
  --accent-gold: #9a7344;
  --shadow: 0 4px 24px rgba(15, 35, 60, 0.08), 0 1px 3px rgba(15, 35, 60, 0.04);
  --radius: 10px;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-hud: "JetBrains Mono", "Courier New", monospace;
  --glass-blur: blur(18px) saturate(1.25);
  --map-ctrl-bg: rgba(255, 255, 255, 0.65);
  --map-ctrl-border: rgba(22, 42, 68, 0.12);
  --map-ctrl-icon-filter: none;
  --map-ctrl-hover-bg: rgba(10, 143, 173, 0.14);
  --news-source-fg: #084e5f;
  --news-source-bg: #d4f0f6;
  --news-source-border: rgba(10, 143, 173, 0.32);
  --news-link-fg: #eab308;
  --news-link-bg: rgba(250, 204, 21, 0.2);
  --news-link-border: rgba(202, 138, 4, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button {
  font: inherit;
  cursor: pointer;
}

.glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass-panel {
    background: var(--surface-solid);
  }
}

.map-globe-wrap {
  overflow: hidden;
}

/* Cinematic starfield — visible in globe letterbox around the sphere. */
.map-globe-wrap[data-projection="globe"]::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
  mix-blend-mode: screen;
  background-color: transparent;
  background-image:
    radial-gradient(1.2px 1.2px at 8% 14%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 22% 68%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.4px 1.4px at 35% 28%, rgba(200, 220, 255, 0.85), transparent),
    radial-gradient(1px 1px at 48% 82%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.2px 1.2px at 61% 12%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 74% 44%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.3px 1.3px at 86% 72%, rgba(220, 235, 255, 0.8), transparent),
    radial-gradient(1px 1px at 92% 22%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 15% 42%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.2px 1.2px at 55% 55%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(0.8px 0.8px at 68% 88%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 4% 78%, rgba(255, 255, 255, 0.5), transparent);
  background-size: 100% 100%;
  -webkit-mask-image: radial-gradient(
    ellipse 54% 50% at 50% 50%,
    transparent 0%,
    transparent 56%,
    rgba(0, 0, 0, 0.35) 68%,
    black 82%
  );
  mask-image: radial-gradient(
    ellipse 54% 50% at 50% 50%,
    transparent 0%,
    transparent 56%,
    rgba(0, 0, 0, 0.35) 68%,
    black 82%
  );
  animation: globe-stars-drift 120s linear infinite;
}

[data-theme="light"] .map-globe-wrap[data-projection="globe"]::before {
  display: none;
}

.map-globe-wrap[data-projection="globe"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(
      ellipse 95% 88% at 50% 46%,
      transparent 38%,
      rgba(4, 8, 20, 0.12) 72%,
      rgba(2, 4, 12, 0.35) 100%
    ),
    radial-gradient(
      ellipse 130% 115% at 50% 50%,
      transparent 52%,
      rgba(10, 143, 173, 0.04) 100%
    );
}

@keyframes globe-stars-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-1.5%, -0.8%, 0);
  }
}

/* Flat map vignette (globe overrides above). */
.map-globe-wrap:not([data-projection="globe"])::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse 100% 92% at 50% 48%,
    transparent 50%,
    rgba(15, 35, 60, 0.06) 100%
  );
}

[data-theme="dark"] .map-globe-wrap[data-globe-backdrop="space"]::before {
  opacity: 0.72;
}

[data-theme="dark"] .map-globe-wrap[data-globe-backdrop="space"] > :first-child {
  filter: brightness(0.78) saturate(0.85);
}

.maplibregl-ctrl-attrib {
  font-size: 9px !important;
  font-family: var(--font-hud) !important;
  opacity: 0.55;
  color: var(--text-muted) !important;
  background: var(--map-ctrl-bg) !important;
}

/* MapLibre +/- and compass — match glass HUD theme */
.map-globe-wrap .maplibregl-ctrl-top-right {
  top: 10px;
  right: 10px;
}

.map-globe-wrap .maplibregl-ctrl-group {
  background: var(--map-ctrl-bg) !important;
  border: 1px solid var(--map-ctrl-border) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

.map-globe-wrap .maplibregl-ctrl-group button {
  width: 30px !important;
  height: 30px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--map-ctrl-border) !important;
}

.map-globe-wrap .maplibregl-ctrl-group button:last-child {
  border-bottom: none !important;
}

.map-globe-wrap .maplibregl-ctrl-group button:hover {
  background-color: var(--map-ctrl-hover-bg) !important;
}

.map-globe-wrap .maplibregl-ctrl-group button:focus {
  outline: none;
}

.map-globe-wrap .maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: var(--map-ctrl-icon-filter);
}

.map-globe-wrap .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230f1c2e' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") !important;
}

.map-globe-wrap .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230f1c2e' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") !important;
}

.map-globe-wrap .maplibregl-ctrl-group button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a7344' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m12 3 2 7h7l-5.5 4 2 7L12 17l-5.5 4 2-7L3 10h7z'/%3E%3C/svg%3E") !important;
}

.shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

.loading-shell,
.error-shell,
.auth-shell {
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  font-family: var(--font-hud);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.auth-shell-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: min(320px, 100%);
}

.auth-shell-lead {
  margin: 0;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.auth-shell-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.auth-shell-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
}

.auth-shell-input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: var(--font-hud);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.auth-shell-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.auth-shell-error {
  margin: 0;
  font-size: 0.62rem;
  color: #dc2626;
  text-align: left;
}

.auth-shell-btn {
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-shell-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-shell-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
}

.loading-shell-title {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.loading-shell-msg {
  margin: 0;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.loading-shell-bar {
  width: 200px;
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.loading-shell-bar-fill {
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: loading-shell-pulse 1.2s ease-in-out infinite;
}

@keyframes loading-shell-pulse {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

.error-msg {
  color: #dc2626;
  font-weight: 600;
}

.error-shell pre {
  background: rgba(255, 255, 255, 0.6);
  padding: 1rem;
  border-radius: 8px;
  max-width: 560px;
  overflow: auto;
  text-align: left;
  font-family: var(--font-hud);
  font-size: 0.7rem;
}

.map-wrap {
  position: relative;
  flex: 1 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.map-hover-preview {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  max-width: min(280px, calc(100vw - 32px));
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.map-hover-preview-accent {
  height: 3px;
  width: 100%;
}

.map-hover-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}

.map-hover-preview-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px 8px;
  font-family: var(--font-hud);
  font-size: 0.65rem;
  line-height: 1.3;
}

.map-hover-preview-type {
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-hover-preview-name {
  color: var(--text);
  font-weight: 600;
  word-break: break-all;
}

.layer-overlay-heading {
  margin: 14px 0 6px;
  font-family: var(--font-hud);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.camera-viewer {
  position: fixed;
  z-index: 25;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 260px;
  min-height: 200px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
}

.camera-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: -webkit-grab;
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.camera-viewer-head:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

.camera-viewer-head-text {
  min-width: 0;
  flex: 1 1;
}

.camera-viewer-close {
  flex-shrink: 0;
  cursor: pointer;
}

.camera-viewer-live {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(57, 255, 20, 0.15);
  color: #39ff14;
  font-family: var(--font-hud);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.camera-viewer-title {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
}

.camera-viewer-meta {
  margin: 2px 0 0;
  font-size: 0.62rem;
  color: var(--text-muted);
}

.camera-viewer-body {
  flex: 1 1;
  min-height: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.camera-viewer-img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.camera-viewer-iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.camera-viewer-video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.camera-viewer-fallback,
.camera-viewer-error {
  padding: 12px 14px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.camera-viewer-error {
  color: #f87171;
}

.camera-viewer-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.camera-viewer-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 2;
}

.camera-viewer-resize::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(57, 255, 20, 0.55);
  border-bottom: 2px solid rgba(57, 255, 20, 0.55);
}

.camera-viewer-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font-hud);
  font-size: 0.62rem;
  cursor: pointer;
}

.camera-viewer-btn:hover {
  border-color: #39ff14;
  color: #39ff14;
}

.camera-viewer-btn-link {
  text-decoration: none;
}

.powerplant-panel-body {
  flex: 1 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 14px 12px;
}

.powerplant-panel-facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 4px 12px;
  gap: 4px 12px;
  font-size: 0.68rem;
  color: var(--text);
}

.powerplant-panel-facts dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.powerplant-panel-facts dd {
  margin: 0;
}

.powerplant-panel-credit {
  margin: 10px 0 0;
  font-size: 0.58rem;
  color: var(--text-muted);
}

.powerplant-panel-credit a {
  color: #ffe082;
}

.vibration-nearby-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  max-height: 140px;
  overflow: auto;
}

.vibration-nearby-list li {
  margin: 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.vibration-nearby-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 3px 0;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
  opacity: 0.92;
}

.vibration-nearby-item:hover {
  opacity: 1;
  color: var(--text);
}

.vibration-nearby-mag {
  flex: 0 0 auto;
  font-weight: 600;
  color: #ce93d8;
}

.vibration-nearby-meta {
  min-width: 0;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— Urban alerts panel —— */
.alert-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.alert-scan-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
}

.alert-scan-btn:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.alert-scan-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.alert-scan-btn .is-spin {
  animation: alert-spin 0.8s linear infinite;
}

@keyframes alert-spin {
  to {
    transform: rotate(360deg);
  }
}

.alert-scan-status {
  margin: 0;
  font-size: 0.55rem;
  line-height: 1.3;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 0;
}

.alert-filter-select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-hud);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 4px;
  cursor: pointer;
}

.alert-filter-select:focus {
  outline: none;
  border-color: rgba(129, 199, 132, 0.45);
}

.alert-panel-resize {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  cursor: ns-resize;
  touch-action: none;
  z-index: 2;
}

.alert-panel-resize::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 28px;
  height: 2px;
  margin-left: -14px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--text-muted) 55%, transparent);
}

.alert-panel-resize:hover::after,
.alert-panel.is-resizing .alert-panel-resize::after {
  background: var(--text-muted);
}

.alert-panel .news-feed-list {
  flex: 1 1 auto;
  min-height: 0;
}

/* Same shell as .news-feed-item — no heavy gray fill */
.insight-alert-card {
  flex: 0 0 auto;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.insight-alert-card.is-selected {
  border-color: rgba(129, 199, 132, 0.4);
}

.insight-alert-card__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
}

.insight-alert-card__head:hover {
  background: rgba(255, 255, 255, 0.04);
}

.insight-alert-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  font-size: 0.62rem;
  color: var(--text-muted);
}

.insight-alert-card__kind {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid;
  font-family: var(--font-hud);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-alert-card__score {
  margin-left: auto;
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 600;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 1.4rem;
  text-align: right;
}

.insight-alert-card__title {
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
  word-break: break-word;
}

.insight-alert-card__blurb {
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alert-sev {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.12);
}

.alert-sev-high,
.alert-sev-critical {
  background: rgba(239, 83, 80, 0.14);
  color: #ef9a9a;
}

.alert-sev-moderate {
  background: rgba(255, 183, 77, 0.14);
  color: #ffcc80;
}

.alert-explain-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
}

.alert-explain-btn:hover:not(:disabled) {
  color: var(--text);
}

.alert-explain-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.alert-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
}

.alert-method-chip {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
}

.alert-fly-btn {
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
}

/* Floating alert detail (same shell as AQ / vibration panels) */
.alert-detail-panel .powerplant-panel-facts {
  font-size: 0.78rem;
  gap: 6px 14px;
}

.alert-detail-panel .powerplant-panel-credit {
  font-size: 0.68rem;
}

.alert-detail-body {
  overflow: auto;
}

.alert-detail-summary {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
}

.alert-detail-sources {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.alert-detail-sources li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.alert-detail-source-role {
  flex: 0 0 5.5rem;
  font-family: var(--font-hud);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 2px;
}

.alert-detail-source-main {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alert-detail-source-label {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text);
}

.alert-detail-source-meta {
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.alert-detail-explain-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.alert-detail-explain {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
}

.alert-detail-muted {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.alert-detail-actions {
  margin: 4px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.alert-detail-actions-row {
  margin-top: 14px;
}

.alert-vision-block {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.alert-vision-facts {
  margin-top: 8px;
}

.alert-vision-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  grid-gap: 6px;
  gap: 6px;
  margin-top: 10px;
}

.alert-vision-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .insight-alert-card__head:hover {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .alert-scan-btn:hover:not(:disabled),
[data-theme="light"] .alert-filter-select {
  background: rgba(0, 0, 0, 0.03);
}

.top-chrome {
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 440px) minmax(0, 1fr);
  align-items: start;
  grid-gap: 10px;
  gap: 10px;
  pointer-events: none;
}

.top-chrome > * {
  pointer-events: auto;
}

.top-chrome-hud {
  justify-self: start;
  min-width: 0;
}

.map-hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.semantic-search {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  font-family: var(--font-body);
}

.semantic-search-disabled {
  opacity: 0.55;
}

.semantic-search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.semantic-search-input {
  flex: 1 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
}

.semantic-search-input::placeholder {
  color: var(--text-muted);
}

.semantic-search-input::-webkit-search-cancel-button {
  display: none;
}

.semantic-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.semantic-search-clear:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.semantic-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: min(320px, 40vh);
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
}

.semantic-search-hint {
  padding: 10px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.semantic-search-error {
  color: #c62828;
}

.semantic-search-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
}

.semantic-search-hit:hover,
.semantic-search-hit.is-active {
  background: var(--accent-soft);
}

.semantic-search-hit-label {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.semantic-search-hit-meta {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-hud);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.semantic-search-hit-score {
  color: var(--accent);
}

[data-theme="dark"] .semantic-search-dropdown {
  background: rgba(12, 14, 26, 0.92);
}

/* Floating chat panel */
.chat-panel {
  position: absolute;
  z-index: 7;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.chat-panel-disabled {
  opacity: 0.55;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 12px;
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  cursor: -webkit-grab;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.chat-panel-header:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

.chat-panel-title {
  flex: 1 1;
  color: var(--text);
  font-weight: 600;
}

.chat-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.chat-panel-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.chat-panel-header-btn:hover:not(:disabled) {
  color: var(--text);
  background: var(--accent-soft);
}

.chat-panel-header-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.chat-panel-messages {
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-panel-empty {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.chat-panel-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 95%;
}

.chat-panel-msg-user {
  align-self: flex-end;
}

.chat-panel-msg-assistant {
  align-self: flex-start;
}

.chat-panel-msg-body {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-word;
}

.chat-panel-msg-user .chat-panel-msg-body {
  background: rgba(10, 143, 173, 0.82);
  color: #fff;
  border-bottom-right-radius: 3px;
  white-space: pre-wrap;
}

.chat-panel-msg-assistant .chat-panel-msg-body {
  background: rgba(10, 143, 173, 0.07);
  color: var(--text);
  border-bottom-left-radius: 3px;
  border: 1px solid var(--border-subtle);
}

.chat-panel-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 0;
}

.chat-panel-spinner {
  animation: chat-panel-spin 0.8s linear infinite;
}

@keyframes chat-panel-spin {
  to {
    transform: rotate(360deg);
  }
}

.chat-panel-error {
  margin: 0;
  font-size: 0.75rem;
  color: #c62828;
}

.chat-panel-input-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--border-subtle);
  background: transparent;
}

.chat-panel-input {
  flex: 1 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-family: var(--font-body);
  outline: none;
  resize: none;
  line-height: 1.35;
  max-height: 80px;
}

.chat-panel-input::placeholder {
  color: var(--text-muted);
}

.chat-panel-clear,
.chat-panel-send {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.chat-panel-clear:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.chat-panel-send {
  color: var(--accent);
}

.chat-panel-send:hover:not(:disabled) {
  background: var(--accent-soft);
}

.chat-panel-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-steps-trace {
  margin-top: 2px;
}

.chat-steps-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-steps-toggle:hover {
  color: var(--accent);
}

.chat-steps-chevron {
  transition: transform 0.15s ease;
}

.chat-steps-chevron.is-open {
  transform: rotate(180deg);
}

.chat-steps-list {
  margin: 4px 0 0;
  padding: 0 0 0 14px;
  list-style: decimal;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chat-step {
  margin-bottom: 4px;
}

.chat-step-label {
  font-family: var(--font-hud);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 6px;
}

.chat-step-content {
  line-height: 1.35;
}

.chat-step-detail {
  margin: 4px 0 0;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.65rem;
  overflow-x: auto;
  max-height: 80px;
}

.chat-steps-trace-live .chat-steps-toggle {
  color: var(--accent);
  cursor: default;
}

.chat-step-latest .chat-step-content {
  color: var(--text);
}

.chat-panel-live {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-panel-loading-inline {
  margin: 0;
  padding: 0;
}

.chat-panel-stream-body {
  position: relative;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
}

.chat-stream-cursor {
  display: inline-block;
  margin-left: 1px;
  color: var(--accent);
  font-weight: 700;
  animation: chat-cursor-blink 0.9s step-end infinite;
}

@keyframes chat-cursor-blink {
  50% {
    opacity: 0;
  }
}

[data-theme="dark"] .chat-panel {
  background: rgba(8, 10, 20, 0.34);
}

[data-theme="light"] .chat-panel {
  background: rgba(255, 255, 255, 0.32);
}

[data-theme="dark"] .chat-panel-msg-assistant .chat-panel-msg-body {
  background: rgba(0, 229, 255, 0.05);
}

[data-theme="dark"] .chat-panel-msg-user .chat-panel-msg-body {
  background: rgba(0, 229, 255, 0.72);
  color: #04040a;
}

/* Chat markdown — matches entity-detail / sidebar typography */
.chat-markdown {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
}

.chat-markdown > :first-child {
  margin-top: 0;
}

.chat-markdown > :last-child {
  margin-bottom: 0;
}

.chat-markdown h1,
.chat-markdown h2,
.chat-markdown h3,
.chat-markdown h4 {
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.25;
  margin: 0.65em 0 0.3em;
}

.chat-markdown h1 {
  font-size: 0.95rem;
}

.chat-markdown h2 {
  font-size: 0.88rem;
}

.chat-markdown h3,
.chat-markdown h4 {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-markdown p {
  margin: 0.4em 0;
}

.chat-markdown ul,
.chat-markdown ol {
  margin: 0.4em 0;
  padding-left: 1.2em;
}

.chat-markdown li {
  margin: 0.18em 0;
}

.chat-markdown li > p {
  margin: 0.15em 0;
}

.chat-markdown strong {
  font-weight: 600;
  color: var(--text-heading);
}

.chat-markdown em {
  color: var(--text-muted);
}

.chat-markdown code {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  padding: 0.08em 0.32em;
  border-radius: 3px;
  background: rgba(15, 28, 46, 0.08);
}

.chat-markdown pre {
  margin: 0.45em 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 28, 46, 0.06);
  overflow-x: auto;
}

.chat-markdown pre code {
  padding: 0;
  background: transparent;
  font-size: 0.68rem;
}

.chat-markdown a {
  color: var(--accent);
  text-decoration: none;
}

.chat-markdown a:hover {
  text-decoration: underline;
}

.chat-markdown blockquote {
  margin: 0.45em 0;
  padding: 0 0 0 10px;
  border-left: 2px solid var(--accent);
  color: var(--text-muted);
}

.chat-markdown hr {
  margin: 0.6em 0;
  border: none;
  border-top: 1px solid var(--border-subtle);
}

.chat-markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin: 0.45em 0;
}

.chat-markdown th,
.chat-markdown td {
  border: 1px solid var(--border-subtle);
  padding: 4px 6px;
  text-align: left;
}

.chat-markdown th {
  font-family: var(--font-hud);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

[data-theme="dark"] .chat-markdown code {
  background: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .chat-markdown pre {
  background: rgba(0, 0, 0, 0.22);
}

.map-hud-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--text);
  font-family: var(--font-hud);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-hud-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.map-hud-btn-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.map-hud-sep {
  width: 1px;
  height: 14px;
  background: var(--border-subtle);
}

.map-hud-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-hud-stat {
  color: var(--text-muted);
  white-space: nowrap;
}

.map-hud-stat-campaign {
  color: #c9a227;
}

[data-theme="light"] .map-hud-stat-campaign {
  color: #b8860b;
}

.left-panels-column {
  position: absolute;
  top: var(--top-chrome-height, 52px);
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: calc(var(--left-panels-width, 228px) + var(--left-panels-rail-width, 12px));
  max-height: calc(100% - var(--timeline-height) - var(--top-chrome-height, 52px) - 8px);
  min-width: 0;
  overscroll-behavior-y: contain;
  transition:
    width 0.2s ease,
    top var(--panel-transition-duration) var(--panel-transition-ease),
    max-height var(--panel-transition-duration) var(--panel-transition-ease);
}

.left-panels-rail {
  flex: 0 0 var(--left-panels-rail-width, 12px);
  width: var(--left-panels-rail-width, 12px);
  position: relative;
  touch-action: none;
  cursor: default;
}

.left-panels-rail-track {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  border-radius: 999px;
  background: var(--border-subtle);
}

.left-panels-rail.has-scroll .left-panels-rail-track {
  cursor: pointer;
}

.left-panels-rail-thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  min-height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 72%, transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 28%, transparent);
  opacity: 0.55;
  cursor: -webkit-grab;
  cursor: grab;
  transition: opacity 0.15s ease;
}

.left-panels-column:hover .left-panels-rail-thumb,
.left-panels-rail.is-dragging .left-panels-rail-thumb {
  opacity: 0.9;
}

.left-panels-rail.is-dragging .left-panels-rail-thumb {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

.left-panels {
  position: relative;
  flex: 1 1;
  min-width: 0;
  min-height: 0;
  width: auto;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-right: 4px;
  scrollbar-width: none;
}

.left-panels-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.left-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.left-panel-header h2 {
  margin: 0;
}

.left-panel-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--text-muted);
  cursor: pointer;
}

.left-panel-collapse-btn svg {
  width: 10px;
  height: 10px;
}

.left-panel-collapse-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.left-panel-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.left-panel-animated {
  display: grid;
  width: 100%;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--panel-transition-duration)
    var(--panel-transition-ease);
}

.left-panel-slot.is-open .left-panel-animated {
  grid-template-rows: 1fr;
}

.left-panel-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-14px);
  transition:
    opacity var(--panel-transition-duration) var(--panel-transition-ease),
    transform var(--panel-transition-duration) var(--panel-transition-ease);
}

.left-panel-slot.is-open .left-panel-inner {
  opacity: 1;
  transform: translateX(0);
}

.left-panel-slot > .left-panel-tab {
  display: grid;
  grid-template-rows: 0fr;
  width: 22px;
  max-width: 22px;
  flex-shrink: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
  transition:
    grid-template-rows var(--panel-transition-duration) var(--panel-transition-ease),
    opacity var(--panel-transition-duration) var(--panel-transition-ease),
    transform var(--panel-transition-duration) var(--panel-transition-ease);
}

.left-panel-slot:not(.is-open) > .left-panel-tab {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.left-panel-slot:not(.is-open) > .left-panel-tab .left-panel-tab-content {
  min-height: 1px;
}

.left-panel-tab-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
  padding: 4px 1px;
}

.left-panel-tab-content svg {
  width: 10px;
  height: 10px;
}

.left-panel-tab {
  width: 22px;
  max-width: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-hud);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.left-panel-tab.glass-panel {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.left-panel-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.left-panel-tab-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.left-panels::-webkit-scrollbar,
.news-feed-list::-webkit-scrollbar,
.news-feed-body::-webkit-scrollbar,
.news-feed-summary::-webkit-scrollbar,
.source-panel ul::-webkit-scrollbar {
  display: none;
}

.layer-panel,
.source-panel,
.news-panel,
.alert-panel {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  flex-shrink: 0;
  overflow-x: hidden;
}

.news-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(420px, 42vh);
}

.alert-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* Height set inline (resizable); keep a sensible default floor. */
  min-height: 160px;
  max-height: min(78vh, 720px);
  padding-bottom: 16px;
  overflow: hidden;
}

.news-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.news-panel-head-text {
  min-width: 0;
}

.news-panel-head h2 {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.news-panel-hint {
  margin: 2px 0 0;
  font-size: 0.55rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.news-panel-status,
.news-panel-error {
  margin: 0;
  font-size: 0.6rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.news-panel-error {
  color: #f87171;
}

.news-feed-list {
  list-style: none;
  margin: 0;
  padding: 2px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1;
  scrollbar-width: none;
}

.news-feed-item {
  flex: 0 0 auto;
  width: 100%;
  max-height: 108px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-feed-item.is-open {
  border-color: rgba(57, 255, 20, 0.22);
  max-height: 200px;
}

.news-feed-item-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
}

.news-feed-item-head:hover {
  background: rgba(255, 255, 255, 0.04);
}

.news-feed-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  font-size: 0.55rem;
  color: var(--text-muted);
}

.news-feed-source {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--news-source-fg);
  background: var(--news-source-bg);
  border: 1px solid var(--news-source-border);
}

.news-feed-time {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.news-feed-format {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.15);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-feed-title {
  font-size: 0.65rem;
  line-height: 1.35;
  font-weight: 500;
  word-break: break-word;
}

.news-feed-body {
  padding: 0 9px 8px;
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
}

.news-feed-summary {
  margin: 6px 0 0;
  font-size: 0.58rem;
  line-height: 1.4;
  color: var(--text);
  max-height: 72px;
  overflow-y: auto;
  scrollbar-width: none;
}

.news-feed-preview-muted {
  margin: 8px 0 0;
  font-size: 0.58rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.news-feed-actions {
  margin-top: 8px;
}

.news-feed-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.58rem;
  color: var(--news-link-fg);
  background: var(--news-link-bg);
  border: 1px solid var(--news-link-border);
  text-decoration: none;
}

.news-feed-link:hover {
  text-decoration: underline;
}

.source-panel .left-panel-header h2,
.source-panel h2 {
  font-family: var(--font-hud);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.source-panel-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.source-hint {
  margin: 0;
  flex: 1 1;
  min-width: 0;
  font-size: 0.6rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.source-panel-select-all {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-hud);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}

.source-panel-select-all:hover {
  text-decoration: underline;
}

.source-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.source-panel li {
  margin-bottom: 3px;
}

.source-row {
  font-size: 0.6rem;
  letter-spacing: 0.02em;
}

.source-name {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-count {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.layer-panel .left-panel-header h2,
.layer-panel h2 {
  font-family: var(--font-hud);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.layer-summary {
  margin: 0 0 6px;
  font-family: var(--font-hud);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.layer-hint {
  margin: 0 0 10px;
  font-size: 0.62rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.layer-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.layer-panel li {
  margin-bottom: 4px;
}

.layer-row {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.layer-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.layer-name {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-count {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* HUD pill toggles (layers + sources) */
.filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-hud);
  cursor: pointer;
  padding: 2px 4px;
  margin: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  transition:
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.filter-row:hover {
  background: var(--accent-soft);
  border-color: var(--border-subtle);
}

.filter-row-off {
  opacity: 0.5;
}

.filter-row-off .layer-swatch,
.filter-row-off .source-name {
  filter: grayscale(0.35);
}

.filter-row-on .layer-swatch {
  box-shadow: 0 0 8px color-mix(in srgb, var(--toggle-accent) 55%, transparent);
}

.filter-toggle {
  --toggle-accent: var(--accent);
  --track-w: 26px;
  --track-h: 13px;
  --thumb-size: 9px;
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: var(--track-w);
  height: var(--track-h);
}

.filter-toggle-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.filter-toggle-track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(100, 116, 139, 0.28);
  position: relative;
  overflow: hidden;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.filter-toggle-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--toggle-accent) 25%, transparent) 50%,
    transparent 100%
  );
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.filter-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 1px;
  width: var(--thumb-size);
  height: var(--thumb-size);
  transform: translateY(-50%);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 0%, #e2e8f0 100%);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform 0.26s cubic-bezier(0.34, 1.25, 0.64, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-toggle-led {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.45);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.filter-toggle-input:checked + .filter-toggle-track {
  background: color-mix(in srgb, var(--toggle-accent) 32%, rgba(15, 23, 42, 0.06));
  border-color: color-mix(in srgb, var(--toggle-accent) 55%, transparent);
  box-shadow:
    0 0 14px color-mix(in srgb, var(--toggle-accent) 35%, transparent),
    inset 0 0 10px color-mix(in srgb, var(--toggle-accent) 12%, transparent);
}

.filter-toggle-input:checked + .filter-toggle-track .filter-toggle-glow {
  opacity: 1;
}

.filter-toggle-input:checked + .filter-toggle-track .filter-toggle-thumb {
  transform: translateY(-50%)
    translateX(calc(var(--track-w) - var(--thumb-size) - 3px));
  border-color: color-mix(in srgb, var(--toggle-accent) 40%, transparent);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--toggle-accent) 45%, transparent),
    0 1px 3px rgba(15, 23, 42, 0.15);
}

.filter-toggle-input:checked + .filter-toggle-track .filter-toggle-led {
  background: var(--toggle-accent);
  box-shadow: 0 0 6px var(--toggle-accent);
}

.filter-toggle-input:focus-visible + .filter-toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.timeline-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  pointer-events: auto;
  height: var(--timeline-height);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  overscroll-behavior-x: contain;
  transition: height var(--panel-transition-duration) var(--panel-transition-ease);
}

.timeline-dock-body {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--panel-transition-duration)
    var(--panel-transition-ease);
}

.timeline-dock.is-open .timeline-dock-body {
  grid-template-rows: 1fr;
}

.timeline-dock-inner {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior-x: contain;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--panel-transition-duration) var(--panel-transition-ease),
    transform var(--panel-transition-duration) var(--panel-transition-ease);
}

.timeline-dock.is-open .timeline-dock-inner {
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
  min-width: 0;
}

.timeline-dock > .timeline-tab {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  flex-shrink: 0;
  transition:
    grid-template-rows var(--panel-transition-duration) var(--panel-transition-ease),
    opacity var(--panel-transition-duration) var(--panel-transition-ease),
    transform var(--panel-transition-duration) var(--panel-transition-ease);
}

.timeline-dock:not(.is-open) > .timeline-tab {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  margin-top: auto;
}

.timeline-tab-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}

.timeline-tab-content svg {
  width: 10px;
  height: 10px;
}

.timeline-tab {
  padding: 2px 10px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--font-hud);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.timeline-tab.glass-panel {
  box-shadow: none;
}

.timeline-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.timeline-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--text-muted);
  cursor: pointer;
}

.timeline-collapse-btn svg {
  width: 10px;
  height: 10px;
}

.timeline-collapse-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.timeline-dock.is-open .timeline-dock-body {
  flex: 1 1;
  min-height: 0;
}

.timeline-dock .timeline-strip {
  box-sizing: border-box;
  height: 100%;
  min-height: var(--timeline-height);
}

.timeline-dock:not(.is-open) .timeline-strip {
  min-height: 0;
}

.timeline-strip {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  padding: 5px 8px 2px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  contain: inline-size;
  overscroll-behavior-x: contain;
}

.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-shrink: 0;
  min-height: 22px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-top: 1px;
}

.timeline-presets {
  display: flex;
  gap: 4px;
}

.timeline-preset-btn {
  font-family: var(--font-hud);
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.timeline-preset-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.timeline-preset-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.timeline-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.timeline-zoom-label {
  font-family: var(--font-hud);
  font-size: 0.48rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.timeline-zoom-slider {
  width: 72px;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

.timeline-zoom-current {
  font-family: var(--font-hud);
  font-size: 0.48rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  min-width: 2.5rem;
}

.timeline-range-label {
  font-family: var(--font-hud);
  font-size: 0.5rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 9rem;
}

.timeline-loading {
  position: absolute;
  top: 3px;
  right: 8px;
  z-index: 2;
  font-family: var(--font-hud);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  pointer-events: none;
}

.timeline-scroll {
  flex: 1 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.timeline-scroll::-webkit-scrollbar {
  display: none;
}

/* Custom density brush (replaces Plotly) */
.timeline-track {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  touch-action: pan-x pinch-zoom;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.timeline-brush {
  position: relative;
  min-height: 24px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.04);
}

.timeline-axis {
  position: relative;
  height: 11px;
  flex-shrink: 0;
  pointer-events: none;
}

.timeline-tick {
  position: absolute;
  top: 0;
  transform: translateX(0);
  font-family: var(--font-hud);
  font-size: 0.46rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-density {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
  pointer-events: none;
}

.timeline-bar {
  flex: 0 0 auto;
  height: 100%;
  border-radius: 1px;
}

.timeline-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: rgba(14, 165, 233, 0.1);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.25);
  min-width: 28px;
  touch-action: none;
  cursor: -webkit-grab;
  cursor: grab;
}

.timeline-selection-body {
  flex: 1 1;
  cursor: -webkit-grab;
  cursor: grab;
  min-width: 4px;
}

.timeline-selection-body:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

.timeline-handle {
  flex-shrink: 0;
  width: 8px;
  margin: 0 -1px;
  cursor: ew-resize;
  background: var(--accent);
  opacity: 0.95;
  border-radius: 2px;
  touch-action: none;
  z-index: 1;
}

.timeline-handle-start {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.timeline-handle-end {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

[data-theme="dark"] .timeline-brush {
  background: rgba(4, 4, 10, 0.45);
  border-color: rgba(212, 175, 55, 0.2);
}

[data-theme="dark"] .timeline-bar {
  border-right-color: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .timeline-selection {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.2);
}

[data-theme="dark"] .timeline-handle {
  background: var(--accent);
}

[data-theme="dark"] .timeline-preset-btn {
  background: rgba(8, 10, 20, 0.08);
  border-color: rgba(212, 175, 55, 0.14);
  color: var(--text-muted);
}

[data-theme="dark"] .timeline-preset-active {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.45);
  color: var(--accent);
}

.right-sidebar {
  position: absolute;
  top: 8px;
  right: 12px;
  bottom: var(--timeline-height);
  width: 272px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-section {
  padding: 10px 12px;
  overflow-y: auto;
  flex: 1 1;
  min-height: 0;
}

.sidebar-section-graph,
.sidebar-section-semantic {
  flex: 0 0 auto;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border-subtle);
  background: transparent;
}

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

.sidebar-section h2 {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-clear {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0 4px;
}

.sidebar-clear:hover {
  color: var(--text);
}

.sidebar-placeholder {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.entity-detail {
  line-height: 1.4;
}

.entity-head {
  margin-bottom: 4px;
}

.entity-title {
  font-weight: 700;
  font-size: 0.82rem;
  word-break: break-word;
  line-height: 1.25;
}

.entity-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.entity-type-badge {
  font-family: var(--font-hud);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid;
}

.entity-id {
  font-family: var(--font-hud);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.entity-blurb {
  margin: 6px 0 0;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.entity-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  grid-gap: 8px;
  gap: 8px;
  margin-top: 6px;
}

.entity-media-card {
  margin: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.04);
}

.entity-media-card img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  background: #0f172a;
}

.entity-media-card figcaption {
  padding: 4px 6px;
  font-size: 0.55rem;
  color: var(--text-muted);
  font-family: var(--font-hud);
  line-height: 1.2;
}

.entity-media-card--audio audio,
.entity-media-card--video video {
  display: block;
  width: 100%;
  max-height: 120px;
}

.entity-media-card--audio,
.entity-media-card--video {
  grid-column: 1 / -1;
}

.detail-sensor-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-hud);
  font-size: 0.62rem;
}

.detail-sensor-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-sensor-k {
  color: var(--text-muted);
}

.detail-sensor-v {
  color: var(--text-primary);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.detail-loading {
  margin: 6px 0 0;
  font-size: 0.62rem;
  color: var(--accent);
  font-family: var(--font-hud);
}

.detail-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.detail-section:first-of-type {
  margin-top: 8px;
}

.detail-section-title {
  margin: 0 0 4px;
  font-family: var(--font-hud);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-row {
  margin: 3px 0 0;
  font-size: 0.64rem;
  display: grid;
  grid-template-columns: 68px 1fr;
  grid-gap: 4px 6px;
  gap: 4px 6px;
}

.detail-tags {
  margin: 2px 0 0;
  font-size: 0.62rem;
  line-height: 1.35;
  word-break: break-word;
}

.detail-rel-summary {
  margin: 2px 0 6px;
  font-size: 0.58rem;
  color: var(--text-muted);
}

.detail-rel-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-rel-row {
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid var(--border-subtle);
}

.detail-rel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.detail-rel-type {
  text-transform: capitalize;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text);
}

.detail-rel-n {
  font-family: var(--font-hud);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.detail-rel-meta {
  margin: 3px 0 0;
  font-size: 0.56rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.detail-rel-neighbors {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.detail-rel-neighbors li {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.56rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(100, 116, 139, 0.14);
  border: 1px solid var(--border-subtle);
}

.detail-rel-neighbor-type {
  color: var(--text-muted);
}

.detail-rel-neighbor-n {
  font-family: var(--font-hud);
  font-weight: 600;
  color: var(--text);
}

.detail-events {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.detail-events li {
  margin-top: 4px;
  font-size: 0.62rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.detail-ev-type {
  font-weight: 500;
}

.detail-ev-meta {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-family: var(--font-hud);
}

.detail-collocated-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.detail-collocated-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  grid-gap: 6px;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.1);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.detail-collocated-item:hover:not(.detail-collocated-item--active) {
  background: rgba(100, 116, 139, 0.16);
  border-color: var(--border);
}

.detail-collocated-item--active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.detail-collocated-type {
  flex-shrink: 0;
  font-family: var(--font-hud);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--member-color, var(--border-subtle));
  color: var(--member-color, var(--text-muted));
  background: rgba(100, 116, 139, 0.08);
}

.detail-collocated-name {
  min-width: 0;
  font-size: 0.64rem;
  line-height: 1.3;
  color: var(--text);
  word-break: break-word;
}

.detail-collocated-item--active .detail-collocated-name {
  font-weight: 600;
  color: var(--text-heading);
}

.detail-k {
  font-family: var(--font-hud);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-v {
  word-break: break-word;
}

.detail-vuln-list {
  line-height: 1.55;
}

.detail-vuln-item {
  white-space: nowrap;
}

.detail-vuln-name {
  word-break: break-word;
  white-space: normal;
}

.detail-vuln-sev {
  display: inline-block;
  margin-left: 0.3em;
  padding: 0.05em 0.35em;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 2px;
  font-family: var(--font-hud);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  vertical-align: 0.05em;
}

.detail-vuln-sev--critical {
  border-color: rgba(248, 113, 113, 0.7);
  color: rgb(252, 165, 165);
  background: rgba(239, 68, 68, 0.12);
}

.detail-vuln-sev--high {
  border-color: rgba(251, 146, 60, 0.7);
  color: rgb(253, 186, 116);
  background: rgba(249, 115, 22, 0.12);
}

.detail-vuln-sev--medium {
  border-color: rgba(250, 204, 21, 0.55);
  color: rgb(253, 224, 71);
  background: rgba(234, 179, 8, 0.1);
}

.detail-vuln-sev--low {
  border-color: rgba(148, 163, 184, 0.5);
  color: rgb(203, 213, 225);
  background: rgba(148, 163, 184, 0.08);
}

.detail-vuln-more {
  color: var(--text-muted);
}

.graph-stats-inline {
  font-family: var(--font-hud);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.graph-space-label {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.graph-hop-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.graph-semantic-row .semantic-btn-active {
  background: rgba(163, 230, 53, 0.16);
  border-color: rgba(163, 230, 53, 0.65);
  color: rgb(190, 242, 100);
}

.hop-btn {
  flex: 1 1;
  min-width: 0;
  padding: 4px 0;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  font-weight: 600;
}

.hop-btn-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.graph-status {
  margin: 8px 0 0;
  font-family: var(--font-hud);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.graph-hint {
  margin: 8px 0 0;
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--text-muted);
}

[data-theme="light"] .glass-panel {
  box-shadow: var(--shadow);
}

[data-theme="light"] .glass-panel:hover {
  border-color: rgba(10, 143, 173, 0.22);
}

[data-theme="light"] .layer-panel h2,
[data-theme="light"] .source-panel h2,
[data-theme="light"] .sidebar-section h2 {
  color: var(--accent-gold);
  letter-spacing: 0.08em;
}

[data-theme="light"] .filter-row:hover {
  background: rgba(10, 143, 173, 0.07);
  border-color: rgba(22, 42, 68, 0.1);
}

[data-theme="light"] .filter-toggle-track {
  background: rgba(242, 246, 250, 0.9);
  border-color: rgba(22, 42, 68, 0.1);
}

[data-theme="light"] .filter-toggle-thumb {
  background: linear-gradient(145deg, #ffffff 0%, #e8edf2 100%);
  border-color: rgba(22, 42, 68, 0.12);
  box-shadow:
    0 1px 3px rgba(15, 35, 60, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .map-hud-btn {
  background: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .semantic-search-dropdown {
  background: rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .timeline-brush {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(22, 42, 68, 0.1);
}

[data-theme="light"] .timeline-preset-btn {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(22, 42, 68, 0.1);
}

[data-theme="light"] .timeline-preset-active {
  background: var(--accent-soft);
  border-color: rgba(10, 143, 173, 0.35);
  color: var(--accent);
}

[data-theme="light"] .timeline-selection {
  border-color: var(--accent);
  background: rgba(10, 143, 173, 0.1);
  box-shadow: 0 0 12px rgba(10, 143, 173, 0.18);
}

[data-theme="light"] .timeline-handle {
  background: var(--accent);
}

[data-theme="light"] .entity-title {
  color: var(--text-heading);
}

[data-theme="light"] .detail-collocated-item {
  background: rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .detail-collocated-item:hover:not(.detail-collocated-item--active) {
  background: rgba(10, 143, 173, 0.06);
  border-color: rgba(22, 42, 68, 0.12);
}

[data-theme="light"] .detail-collocated-item--active {
  background: rgba(10, 143, 173, 0.1);
  border-color: rgba(10, 143, 173, 0.35);
}

[data-theme="light"] .news-feed-item {
  background: rgba(22, 42, 68, 0.04);
}

[data-theme="light"] .news-feed-item.is-open {
  border-color: rgba(10, 143, 173, 0.35);
}

[data-theme="light"] .news-feed-item-head:hover {
  background: rgba(10, 143, 173, 0.06);
}

[data-theme="light"] {
  --news-source-fg: #084e5f;
  --news-source-bg: #d4f0f6;
  --news-source-border: rgba(10, 143, 173, 0.32);
}

[data-theme="light"] .map-globe-wrap:not([data-projection="globe"])::after {
  background: radial-gradient(
    ellipse 100% 92% at 50% 48%,
    transparent 50%,
    rgba(15, 35, 60, 0.06) 100%
  );
}

[data-theme="light"] .map-globe-wrap[data-projection="globe"]::after {
  background: radial-gradient(
    ellipse 100% 92% at 50% 48%,
    transparent 52%,
    rgba(15, 35, 60, 0.05) 100%
  );
}

[data-theme="dark"] {
  --bg: #04040a;
  --surface: rgba(8, 10, 20, 0.06);
  --surface-solid: rgba(8, 10, 20, 0.42);
  --border: rgba(212, 175, 55, 0.12);
  --border-subtle: rgba(212, 175, 55, 0.06);
  --text: #e8e6e0;
  --text-muted: #5c5a54;
  --text-heading: #f5f0e0;
  --accent: #00e5ff;
  --accent-soft: rgba(0, 229, 255, 0.1);
  --accent-gold: #d4af37;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
  --glass-blur: blur(26px) saturate(1.15);
  --map-ctrl-bg: rgba(8, 10, 20, 0.08);
  --map-ctrl-border: rgba(212, 175, 55, 0.18);
  --map-ctrl-icon-filter: none;
  --map-ctrl-hover-bg: rgba(0, 229, 255, 0.12);
  --news-source-fg: #7dd3fc;
  --news-source-bg: rgba(125, 211, 252, 0.1);
  --news-source-border: rgba(125, 211, 252, 0.22);
  --news-link-fg: #ffe082;
  --news-link-bg: rgba(255, 224, 130, 0.08);
  --news-link-border: rgba(255, 224, 130, 0.18);
}

[data-theme="dark"] .map-globe-wrap .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e8e6e0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") !important;
}

[data-theme="dark"] .map-globe-wrap .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e8e6e0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") !important;
}

[data-theme="dark"] .map-globe-wrap .maplibregl-ctrl-group button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m12 3 2 7h7l-5.5 4 2 7L12 17l-5.5 4 2-7L3 10h7z'/%3E%3C/svg%3E") !important;
}

[data-theme="dark"] .maplibregl-ctrl-attrib {
  color: var(--text-muted) !important;
  background: rgba(8, 10, 20, 0.1) !important;
}

[data-theme="dark"] .glass-panel {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  [data-theme="dark"] .glass-panel {
    background: var(--surface-solid);
  }
}

[data-theme="dark"] .map-globe-wrap:not([data-projection="globe"])::after {
  background: radial-gradient(
    ellipse 100% 92% at 50% 48%,
    transparent 48%,
    rgba(4, 4, 10, 0.2) 100%
  );
}

[data-theme="dark"] .map-globe-wrap[data-projection="globe"]::after {
  background:
    radial-gradient(
      ellipse 100% 92% at 50% 46%,
      transparent 36%,
      rgba(4, 4, 10, 0.2) 66%,
      rgba(0, 0, 0, 0.55) 100%
    ),
    radial-gradient(
      ellipse 140% 120% at 50% 50%,
      transparent 50%,
      rgba(0, 229, 255, 0.04) 100%
    );
}

[data-theme="dark"] .glass-panel:hover {
  border-color: rgba(212, 175, 55, 0.22);
}

[data-theme="dark"] .layer-panel h2,
[data-theme="dark"] .source-panel h2,
[data-theme="dark"] .sidebar-section h2 {
  color: var(--accent-gold);
}

[data-theme="dark"] .filter-row:hover {
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(212, 175, 55, 0.18);
}

[data-theme="dark"] .filter-toggle-track {
  background: rgba(4, 4, 10, 0.42);
  border-color: rgba(212, 175, 55, 0.16);
}

[data-theme="dark"] .filter-toggle-thumb {
  background: linear-gradient(145deg, #2a2d3a 0%, #12141c 100%);
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .filter-toggle-input:checked + .filter-toggle-track {
  background: color-mix(in srgb, var(--toggle-accent) 28%, rgba(4, 4, 10, 0.8));
  border-color: color-mix(in srgb, var(--toggle-accent) 50%, rgba(212, 175, 55, 0.35));
  box-shadow:
    0 0 16px color-mix(in srgb, var(--toggle-accent) 40%, transparent),
    inset 0 0 12px color-mix(in srgb, var(--toggle-accent) 15%, transparent);
}

[data-theme="dark"] .filter-row-on .layer-swatch {
  box-shadow: 0 0 10px color-mix(in srgb, var(--toggle-accent) 60%, transparent);
}

[data-theme="dark"] .map-hud-btn {
  background: rgba(8, 10, 20, 0.06);
  border-color: var(--border-subtle);
  color: var(--text);
}

[data-theme="dark"] .map-hud-btn-active,
[data-theme="dark"] .hop-btn-active {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--accent);
}

[data-theme="dark"] .semantic-btn-active {
  background: rgba(163, 230, 53, 0.12);
  border-color: rgba(190, 242, 100, 0.42);
  color: rgb(217, 249, 157);
}

[data-theme="dark"] .hop-btn {
  background: rgba(8, 10, 20, 0.06);
  color: var(--text);
}

[data-theme="dark"] .sidebar-section-graph {
  background: transparent;
}

[data-theme="dark"] .entity-title {
  color: var(--text-heading);
}

[data-theme="dark"] .detail-collocated-item {
  background: rgba(8, 10, 20, 0.35);
}

[data-theme="dark"] .detail-collocated-item:hover:not(.detail-collocated-item--active) {
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(212, 175, 55, 0.18);
}

[data-theme="dark"] .detail-collocated-item--active {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.4);
}

[data-theme="dark"] .detail-collocated-type {
  background: rgba(8, 10, 20, 0.5);
}

[data-theme="dark"] .detail-collocated-item--active .detail-collocated-name {
  color: var(--accent);
}

[data-theme="dark"] .timeline-loading {
  color: var(--accent);
}

[data-theme="dark"] .left-panels-rail-track {
  background: rgba(212, 175, 55, 0.12);
}

[data-theme="dark"] .left-panels-rail-thumb {
  background: color-mix(in srgb, var(--accent) 85%, #fff 15%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent);
}

[data-theme="dark"] .error-shell pre {
  background: rgba(12, 14, 26, 0.85);
  color: var(--text);
}

@media (max-width: 720px) {
  .top-chrome {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .semantic-search {
    grid-column: 1;
    max-width: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .map-globe-wrap[data-projection="globe"]::before {
    animation: none;
  }

  .left-panels-column,
  .left-panels,
  .map-hud,
  .top-chrome,
  .left-panel-animated,
  .left-panel-inner,
  .left-panel-slot > .left-panel-tab,
  .timeline-dock,
  .timeline-dock-body,
  .timeline-dock-inner,
  .timeline-dock > .timeline-tab {
    transition-duration: 0.01ms !important;
  }
}

