:root {
  color-scheme: dark;
  --font-sans: Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --bg: #05070b;
  --bg-2: #090d13;
  --panel: rgba(16, 22, 31, 0.78);
  --panel-strong: rgba(21, 29, 41, 0.94);
  --line: rgba(183, 198, 219, 0.16);
  --line-strong: rgba(183, 198, 219, 0.28);
  --text: #f7fbff;
  --muted: #99a7ba;
  --soft: #c8d4e3;
  --cyan: #41d9ff;
  --blue: #2563eb;
  --amber: #f6b749;
  --red: #ff5c6c;
  --green: #54d990;
  --violet: #a78bfa;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: #000;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background: #000;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(180px, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 52px);
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.34));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(65, 217, 255, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 64% 31%, rgba(255, 255, 255, 0.82) 0 1.5px, transparent 3px),
    radial-gradient(circle at 48% 54%, rgba(65, 217, 255, 0.34), transparent 56%),
    linear-gradient(145deg, rgba(15, 28, 42, 0.98), rgba(2, 7, 14, 0.95));
  box-shadow:
    0 0 24px rgba(65, 217, 255, 0.13),
    inset 0 0 18px rgba(65, 217, 255, 0.14);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.brand-mark::before {
  inset: 7px;
  border: 1px solid rgba(205, 252, 226, 0.38);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48%, rgba(205, 252, 226, 0.34) 49%, rgba(205, 252, 226, 0.34) 51%, transparent 52%),
    linear-gradient(transparent 48%, rgba(65, 217, 255, 0.28) 49%, rgba(65, 217, 255, 0.28) 51%, transparent 52%);
  opacity: 0.92;
  transform: rotate(-17deg);
}

.brand-mark::after {
  top: 10px;
  left: -5px;
  width: 48px;
  height: 18px;
  border-top: 1px solid rgba(84, 217, 144, 0.62);
  border-bottom: 1px solid rgba(84, 217, 144, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle at 83% 50%, var(--amber) 0 2.5px, transparent 3.3px);
  filter: drop-shadow(0 0 7px rgba(84, 217, 144, 0.34));
  transform: rotate(-24deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.nav-links {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.nav-links a {
  padding: 8px 13px;
  border-radius: 4px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}

.status-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 13px;
  border: 1px solid rgba(84, 217, 144, 0.3);
  border-radius: 6px;
  color: #cdfce2;
  background:
    linear-gradient(180deg, rgba(84, 217, 144, 0.12), rgba(84, 217, 144, 0.05));
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(84, 217, 144, 0.9);
}

main {
  padding: 0;
}

.hero {
  display: grid;
  position: relative;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(720px, 100vh);
  gap: 0;
  align-items: stretch;
  min-height: 100vh;
  overflow: hidden;
}

.control-panel,
.globe-stage,
.detail-panel,
.timeline-section,
.source-section,
.about-section {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.control-panel,
.detail-panel {
  border-radius: 8px;
  padding: 20px;
}

.control-panel {
  position: absolute;
  z-index: 8;
  grid-column: 1;
  grid-row: 1;
  top: 94px;
  left: 24px;
  display: flex;
  width: min(326px, calc(100vw - 48px));
  max-height: calc(100vh - 136px);
  min-height: auto;
  align-self: start;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  overflow: auto;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(2, 7, 14, 0.7), rgba(0, 0, 0, 0.56));
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.control-panel::-webkit-scrollbar,
.detail-panel::-webkit-scrollbar,
.timeline-track::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.control-panel::-webkit-scrollbar-thumb,
.detail-panel::-webkit-scrollbar-thumb,
.timeline-track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(183, 198, 219, 0.24);
}

.panel-heading {
  padding-bottom: 4px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 18ch;
  margin-bottom: 12px;
  font-size: clamp(1.72rem, 2.1vw, 2.42rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: 0;
}

.panel-heading p:last-child,
.about-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.quality-row {
  display: none;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.quality-row span {
  padding: 7px 9px;
  border: 1px solid rgba(84, 217, 144, 0.24);
  border-radius: 4px;
  color: #cdfce2;
  background: rgba(84, 217, 144, 0.075);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
}

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

.summary-card {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.032));
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.62rem;
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1;
}

.summary-card small {
  display: block;
  margin-top: 9px;
  color: var(--soft);
  font-size: 0.78rem;
}

.status-card {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(246, 183, 73, 0.24);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(246, 183, 73, 0.105), rgba(246, 183, 73, 0.035));
}

.status-card div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.status-card span {
  color: #ffe0a3;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-card strong {
  color: var(--text);
  font-size: 0.95rem;
}

.status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.status-card .status-meta {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
}

.status-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-link {
  color: #ffe0a3;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.source-link:hover,
.source-link:focus-visible {
  color: var(--text);
  outline: none;
}

.tool-block {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.tool-block.compact {
  margin-top: auto;
}

.tool-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.small-button {
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.small-button:hover,
.small-button:focus-visible {
  border-color: rgba(65, 217, 255, 0.48);
  color: var(--text);
  outline: none;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(65, 217, 255, 0.54);
  box-shadow: 0 0 0 3px rgba(65, 217, 255, 0.12);
}

.search-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(65, 217, 255, 0.22);
  border-radius: 5px;
  color: var(--soft);
  background:
    linear-gradient(180deg, rgba(65, 217, 255, 0.075), rgba(255, 255, 255, 0.028));
}

.search-result strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 650;
  line-height: 1;
}

.search-result span {
  min-width: 0;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.search-result.is-empty {
  display: block;
  min-height: auto;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
}

.search-result.is-zero {
  border-color: rgba(246, 183, 73, 0.24);
  background:
    linear-gradient(180deg, rgba(246, 183, 73, 0.075), rgba(255, 255, 255, 0.028));
}

.search-result.is-zero strong {
  color: var(--amber);
}

.filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.filter-button::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--filter-color);
  box-shadow: 0 0 12px var(--filter-color);
  content: "";
}

.filter-button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--filter-color), white 12%);
  color: var(--text);
  background: color-mix(in srgb, var(--filter-color), transparent 86%);
}

.range {
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  accent-color: var(--amber);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.range:focus {
  outline: none;
}

.range:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 4px rgba(246, 183, 73, 0.18),
    0 0 18px rgba(246, 183, 73, 0.55);
}

.range:focus-visible::-moz-range-thumb {
  box-shadow:
    0 0 0 4px rgba(246, 183, 73, 0.18),
    0 0 18px rgba(246, 183, 73, 0.55);
}

.range::-webkit-slider-runnable-track {
  height: 7px;
  border: 1px solid rgba(183, 198, 219, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(246, 183, 73, 0.96) 0 var(--range-progress, 100%), rgba(255, 255, 255, 0.14) var(--range-progress, 100%) 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(246, 183, 73, 0.12);
}

.range::-webkit-slider-thumb {
  width: 19px;
  height: 19px;
  margin-top: -7px;
  border: 2px solid rgba(7, 12, 18, 0.95);
  border-radius: 50%;
  background: #f7fbff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.24),
    0 3px 12px rgba(0, 0, 0, 0.42);
  appearance: none;
  -webkit-appearance: none;
}

.range::-moz-range-track {
  height: 7px;
  border: 1px solid rgba(183, 198, 219, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(65, 217, 255, 0.11);
}

.range::-moz-range-progress {
  height: 7px;
  border-radius: 999px;
  background: rgba(246, 183, 73, 0.96);
}

.range::-moz-range-thumb {
  width: 19px;
  height: 19px;
  border: 2px solid rgba(7, 12, 18, 0.95);
  border-radius: 50%;
  background: #f7fbff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.24),
    0 3px 12px rgba(0, 0, 0, 0.42);
}

.range::-moz-focus-outer {
  border: 0;
}

.globe-stage {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(20, 75, 130, 0.18), transparent 42%),
    #000;
  box-shadow: none;
  backdrop-filter: none;
}

.globe-stage::before,
.globe-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.globe-stage::before {
  background:
    radial-gradient(circle at center, transparent 0 45%, rgba(0, 0, 0, 0.1) 66%, rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.36));
  opacity: 0.72;
}

.globe-stage::after {
  border: 0;
  border-radius: 0;
  box-shadow:
    inset 0 110px 150px rgba(0, 0, 0, 0.46),
    inset 0 -130px 160px rgba(0, 0, 0, 0.5);
}

.globe-toolbar {
  position: absolute;
  top: 92px;
  right: 24px;
  z-index: 5;
  display: flex;
  width: min(460px, calc(100vw - 398px));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(4, 9, 16, 0.72), rgba(0, 0, 0, 0.5));
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.globe-toolbar p,
.globe-toolbar strong {
  display: block;
  margin: 0;
}

.globe-toolbar p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.globe-toolbar strong {
  margin-top: 4px;
  font-size: 0.98rem;
  font-weight: 600;
}

.view-actions {
  display: inline-flex;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.icon-button span {
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(65, 217, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(65, 217, 255, 0.12);
  outline: none;
}

.canvas-wrap {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 0;
  place-items: center;
  padding: 0;
}

.canvas-wrap::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 52%, transparent 0 43%, rgba(65, 217, 255, 0.045) 68%, transparent 82%);
  background-size: auto;
  content: "";
  opacity: 0.44;
  pointer-events: none;
}

#globeViewport {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

#globeViewport .esri-view,
#globeViewport .esri-view-root,
#globeViewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

#globeViewport:focus-visible {
  outline: 1px solid rgba(65, 217, 255, 0.26);
  outline-offset: -1px;
}

#globeViewport canvas {
  cursor: grab;
  touch-action: none;
}

#globeViewport canvas:active,
#globeViewport.is-pointing canvas {
  cursor: grabbing;
}

#globeViewport .esri-view-surface,
#globeViewport .esri-view-root {
  background: #000;
}

#globeViewport .esri-ui-corner {
  margin: 12px;
}

#globeViewport .esri-attribution {
  color: rgba(230, 241, 255, 0.66);
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.map-fallback {
  position: absolute;
  z-index: 4;
  display: none;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid rgba(246, 183, 73, 0.32);
  border-radius: 8px;
  color: #ffe0a3;
  background: rgba(5, 7, 11, 0.88);
  text-align: center;
}

.map-fallback.is-visible {
  display: block;
}

.globe-callout {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 92px;
  display: grid;
  gap: 2px;
  min-width: min(300px, calc(100% - 48px));
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.52);
  font-size: 0.78rem;
  text-align: center;
  backdrop-filter: blur(12px);
}

.globe-callout span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.globe-callout strong {
  color: var(--text);
  font-size: 0.86rem;
}

.marker-tooltip {
  position: absolute;
  z-index: 10;
  display: none;
  max-width: 220px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: rgba(5, 7, 11, 0.92);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.36);
  pointer-events: none;
}

.marker-tooltip strong,
.marker-tooltip small {
  display: block;
}

.marker-tooltip small {
  margin-top: 4px;
  color: var(--muted);
}

.legend {
  position: absolute;
  right: 24px;
  bottom: 26px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  max-width: 390px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(0, 0, 0, 0.52);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  backdrop-filter: blur(12px);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-key {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.legend-key.confirmed {
  color: var(--cyan);
}

.legend-key.suspected {
  color: var(--amber);
}

.legend-key.death {
  color: var(--red);
}

.legend-key.exposure {
  color: var(--violet);
}

.legend-line {
  position: relative;
  width: 22px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(65, 217, 255, 0.18), rgba(185, 244, 230, 0.86), rgba(65, 217, 255, 0.34));
  box-shadow:
    0 0 6px rgba(65, 217, 255, 0.42),
    0 0 10px rgba(84, 217, 144, 0.18);
}

.legend-line::after {
  position: absolute;
  inset: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  content: "";
  animation: routeLegendPulse 1.4s linear infinite;
}

@keyframes routeLegendPulse {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(220%);
  }
}

.detail-panel {
  position: absolute;
  z-index: 8;
  top: 94px;
  right: 24px;
  grid-column: 1;
  grid-row: 1;
  width: min(350px, calc(100vw - 52px));
  max-height: calc(100vh - 136px);
  min-height: auto;
  align-self: start;
  justify-self: end;
  margin: 0;
  overflow: auto;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(2, 7, 14, 0.72), rgba(0, 0, 0, 0.58));
}

.detail-panel.is-empty {
  display: none;
}

.detail-panel.is-empty .empty-state {
  min-height: auto;
}

.detail-panel.is-empty .empty-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
}

.detail-panel.is-empty h2 {
  font-size: 1.1rem;
}

.detail-panel.is-empty p {
  font-size: 0.88rem;
}

.detail-panel.has-report {
  min-height: 520px;
}

.empty-state {
  display: grid;
  height: 100%;
  min-height: 420px;
  align-content: center;
  justify-items: start;
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border: 1px solid rgba(65, 217, 255, 0.36);
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(65, 217, 255, 0.28) 47%, rgba(65, 217, 255, 0.28) 53%, transparent 54%),
    linear-gradient(transparent 46%, rgba(84, 217, 144, 0.28) 47%, rgba(84, 217, 144, 0.28) 53%, transparent 54%);
}

.empty-state h2 {
  margin-bottom: 10px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.case-detail {
  display: grid;
  gap: 17px;
}

.detail-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-badge {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--case-color), white 10%);
  border-radius: 4px;
  color: var(--text);
  background: color-mix(in srgb, var(--case-color), transparent 84%);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.close-detail {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.case-detail h2 {
  margin-bottom: 6px;
  font-size: 1.75rem;
  line-height: 1.08;
}

.case-detail .subtle {
  color: var(--muted);
}

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

.mini-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
}

.mini-metric span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mini-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.detail-list {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
}

.detail-list div {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 12px;
}

.detail-list dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--soft);
}

.confidence-meter {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
}

.confidence-meter div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.confidence-meter span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.confidence-meter strong {
  color: var(--text);
  font-size: 0.82rem;
}

.confidence-meter i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  box-shadow: 0 0 16px rgba(65, 217, 255, 0.22);
}

.source-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(65, 217, 255, 0.4);
  border-radius: 5px;
  color: var(--text);
  background: rgba(65, 217, 255, 0.1);
  font-family: var(--font-mono);
  font-weight: 800;
}

.source-button:hover,
.source-button:focus-visible {
  border-color: rgba(65, 217, 255, 0.68);
  background: rgba(65, 217, 255, 0.16);
  outline: none;
}

.timeline-section,
.source-section,
.about-section {
  margin: 16px;
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
}

.section-heading {
  display: grid;
  max-width: 820px;
  gap: 8px;
  margin-bottom: 24px;
}

.section-heading h2,
.about-copy h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  font-weight: 500;
  line-height: 1.05;
}

.timeline-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.timeline-card {
  position: relative;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.03));
}

.timeline-card::before {
  display: block;
  width: 10px;
  height: 10px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--case-color);
  box-shadow: 0 0 16px var(--case-color);
  content: "";
}

.timeline-card time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline-card h3 {
  margin: 10px 0 8px;
  font-size: 1.03rem;
  line-height: 1.2;
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.source-grid article {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.03));
}

.source-grid strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.04rem;
  font-weight: 600;
}

.source-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.about-section {
  margin-bottom: 16px;
  background:
    linear-gradient(90deg, rgba(65, 217, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.about-copy {
  max-width: 840px;
}

@media (max-width: 1280px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .control-panel {
    width: min(320px, calc(100vw - 52px));
  }

  .detail-panel {
    grid-column: 1;
    width: min(320px, calc(100vw - 52px));
  }

  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .empty-state {
    min-height: 180px;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(760px, 100vh);
    gap: 0;
    min-height: 100vh;
  }

  .control-panel,
  .globe-stage,
  .detail-panel {
    grid-column: 1;
  }

  .control-panel {
    top: 88px;
    left: 16px;
    width: min(310px, calc(100vw - 32px));
    max-height: calc(100vh - 116px);
    gap: 11px;
    padding: 18px;
  }

  h1 {
    margin-bottom: 10px;
    font-size: 1.62rem;
  }

  .panel-heading p:last-child {
    font-size: 0.92rem;
    line-height: 1.42;
  }

  .summary-card {
    min-height: 70px;
    padding: 10px;
  }

  .summary-card strong {
    margin-top: 6px;
    font-size: 1.46rem;
  }

  .summary-card small {
    margin-top: 7px;
    font-size: 0.74rem;
  }

  .status-card {
    gap: 8px;
    padding: 12px;
  }

  .status-card p {
    font-size: 0.8rem;
    line-height: 1.42;
  }

  .status-card .status-meta {
    font-size: 0.66rem;
  }

  .globe-stage {
    min-height: 100vh;
  }

  .globe-toolbar {
    display: none;
  }

  .detail-panel {
    top: 88px;
    right: 16px;
    width: min(310px, calc(100vw - 32px));
    max-height: calc(100vh - 116px);
  }

  .detail-panel.is-empty {
    display: none;
  }

  .legend {
    right: 16px;
    bottom: 16px;
    left: calc(16px + min(310px, calc(100vw - 32px)) + 16px);
    max-width: none;
    justify-content: flex-start;
  }

  .globe-callout {
    display: none;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .metric-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  html,
  body {
    overflow-x: hidden;
  }

  main {
    padding: 0;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 64px;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }

  .brand-mark::before {
    inset: 6px;
  }

  .brand-mark::after {
    top: 8px;
    left: -4px;
    width: 41px;
    height: 16px;
  }

  .brand strong {
    overflow: hidden;
    font-size: 0.78rem;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small,
  .nav-links {
    display: none;
  }

  .status-pill {
    gap: 6px;
    padding: 7px 9px;
    font-size: 0;
  }

  .status-pill::after {
    content: "LIVE";
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.08em;
  }

  .hero {
    display: flex;
    min-height: auto;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    padding-top: 64px;
  }

  .globe-stage {
    order: 1;
    height: clamp(360px, 58svh, 540px);
    min-height: 0;
    flex: 0 0 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  }

  .globe-stage::before {
    background:
      radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(0, 0, 0, 0.22) 69%, rgba(0, 0, 0, 0.74) 100%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 32%, rgba(0, 0, 0, 0.3));
  }

  .globe-stage::after {
    box-shadow:
      inset 0 72px 110px rgba(0, 0, 0, 0.52),
      inset 0 -82px 120px rgba(0, 0, 0, 0.62);
  }

  .canvas-wrap,
  #globeViewport {
    height: 100%;
    min-height: 0;
  }

  .globe-toolbar,
  .globe-callout {
    display: none;
  }

  .legend {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
    justify-content: flex-start;
    gap: 9px;
    overflow-x: auto;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.66rem;
    scrollbar-width: none;
  }

  .legend::-webkit-scrollbar {
    display: none;
  }

  .legend span {
    flex: 0 0 auto;
  }

  .control-panel {
    position: relative;
    order: 2;
    top: auto;
    left: auto;
    width: auto;
    max-height: none;
    margin: 12px;
    padding: 14px;
    overflow: visible;
    gap: 12px;
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(8, 13, 21, 0.95), rgba(0, 0, 0, 0.9));
  }

  .panel-heading {
    padding-bottom: 0;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
  }

  h1 {
    max-width: none;
    margin-bottom: 10px;
    font-size: 1.42rem;
    line-height: 1.08;
  }

  .panel-heading p:last-child {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-card {
    min-height: 68px;
    padding: 10px;
  }

  .summary-card span {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .summary-card strong {
    margin-top: 6px;
    font-size: 1.38rem;
  }

  .summary-card small {
    margin-top: 6px;
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .status-card {
    gap: 8px;
    padding: 12px;
  }

  .status-card div {
    align-items: start;
  }

  .status-card span {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }

  .status-card strong {
    max-width: 12ch;
    font-size: 0.86rem;
    line-height: 1.15;
    text-align: right;
  }

  .status-card p {
    font-size: 0.78rem;
    line-height: 1.42;
  }

  .status-card .status-meta {
    overflow-wrap: anywhere;
    font-size: 0.62rem;
    line-height: 1.45;
  }

  .status-actions {
    align-items: stretch;
  }

  .small-button,
  .source-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }

  .tool-block {
    padding: 12px;
  }

  .search-box input {
    min-height: 42px;
  }

  .search-result {
    min-height: 50px;
    margin-top: 9px;
    padding: 9px 10px;
  }

  .search-result strong {
    font-size: 1.42rem;
  }

  .search-result span {
    font-size: 0.78rem;
  }

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

  .filter-button {
    width: 100%;
    min-height: 38px;
    justify-content: flex-start;
    font-size: 0.84rem;
  }

  .detail-panel {
    position: relative;
    order: 3;
    top: auto;
    right: auto;
    width: auto;
    max-height: none;
    margin: 0 12px 12px;
    padding: 14px;
    overflow: visible;
  }

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

  .detail-panel.is-empty {
    display: none;
  }

  .case-detail h2 {
    font-size: 1.35rem;
  }

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

  .mini-metric {
    padding: 10px;
  }

  .mini-metric span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .mini-metric strong {
    font-size: 1.2rem;
  }

  .detail-list div {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-section,
  .source-section,
  .about-section {
    margin: 12px;
    padding: 16px;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .section-heading h2,
  .about-copy h2 {
    font-size: 1.45rem;
  }

  .timeline-track {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 82vw);
  }

  .timeline-card {
    min-height: 160px;
    padding: 14px;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .source-grid article {
    min-height: auto;
    padding: 14px;
  }
}

@media (max-width: 390px) {
  .topbar {
    padding: 10px;
  }

  .brand {
    gap: 7px;
  }

  .brand strong {
    font-size: 0.7rem;
  }

  .status-pill::after {
    content: "ON";
  }

  .globe-stage {
    height: clamp(330px, 55svh, 500px);
  }
}
