:root {
  --bg: #07131b;
  --panel: rgba(11, 27, 38, 0.88);
  --panel-strong: rgba(9, 22, 31, 0.96);
  --text: #e8f4f2;
  --muted: #9eb7b4;
  --accent: #83f7c5;
  --accent-2: #f3b56a;
  --line: rgba(131, 247, 197, 0.18);
  --danger: #ff9f7a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(105, 226, 166, 0.22), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(243, 181, 106, 0.18), transparent 28%),
    linear-gradient(180deg, #061018 0%, #091a24 48%, #03080d 100%);
  min-height: 100vh;
}

.shell {
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

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

.brand {
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.navlinks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.navlinks a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.navlinks a[aria-current="page"] {
  color: var(--text);
  border-color: rgba(131, 247, 197, 0.5);
}

.hero {
  padding: 20px 0 28px;
}

.hero-compact h1 {
  max-width: 12ch;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 5.8rem);
  line-height: 0.96;
  max-width: 9ch;
}

.lede {
  max-width: 65ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.meta-strip,
.stats,
.card {
  backdrop-filter: blur(16px);
}

.meta-strip {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta-pill,
.tag,
.score {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}

.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
}

.stat span {
  color: var(--muted);
}

.panels {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.briefing-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.2fr;
  gap: 16px;
  margin-bottom: 16px;
}

.takeaways {
  margin-bottom: 16px;
}

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

.takeaway {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.takeaway strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
}

.takeaway p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.spotlight {
  margin-bottom: 16px;
}

.map-panel {
  margin-bottom: 16px;
}

.compare-panel {
  margin-bottom: 16px;
}

.briefing-card {
  min-height: 280px;
}

.signal-board,
.featured-cases,
.timeline-chart,
.quick-filters,
.top-cases-list {
  display: grid;
  gap: 10px;
}

.map-zoom-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.map-zoom-controls button {
  width: auto;
  min-height: 42px;
  padding: 10px 14px;
}

.map-zoom-controls .active-map {
  border-color: rgba(131, 247, 197, 0.55);
  color: var(--text);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 320px;
  gap: 16px;
}

.map-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.map-record-badge,
.map-active-filter {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.map-record-badge {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-active-filter {
  color: var(--muted);
}

.world-map {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 62% 46%, rgba(131, 247, 197, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(7, 19, 20, 0.96), rgba(6, 16, 17, 0.98));
  position: relative;
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  min-width: 180px;
  max-width: 240px;
  padding: 12px 14px;
  border: 1px solid rgba(131, 247, 197, 0.24);
  border-radius: 14px;
  background: rgba(6, 16, 22, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.map-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.map-tooltip strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.map-tooltip span {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.world-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-graticule {
  fill: none;
  stroke: rgba(164, 203, 191, 0.12);
  stroke-width: 0.8;
}

.map-sphere {
  fill: rgba(5, 16, 19, 0.65);
}

.map-country {
  fill: rgba(58, 78, 46, 0.78);
  stroke: rgba(137, 164, 121, 0.18);
  stroke-width: 0.65;
}

.map-label {
  fill: rgba(244, 248, 242, 0.92);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(7, 19, 27, 0.92);
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-dot {
  fill: var(--accent-2);
  stroke: rgba(7, 19, 27, 0.9);
  stroke-width: 2;
  cursor: pointer;
  transition: fill 120ms ease, stroke 120ms ease;
}

.map-dot-ring {
  fill: none;
  stroke: rgba(243, 181, 106, 0.28);
  stroke-width: 1.4;
  opacity: 0.9;
  transform-origin: center;
  animation: mapPulse 2.6s ease-out infinite;
}

.map-dot-ring.active {
  stroke: rgba(255, 231, 163, 0.62);
}

.map-dot:hover,
.map-dot.active {
  fill: #ffd78a;
  stroke: rgba(255, 250, 230, 0.95);
  stroke-width: 3;
}

.map-cluster {
  fill: rgba(131, 247, 197, 0.92);
}

.map-line {
  stroke: rgba(131, 247, 197, 0.12);
  stroke-width: 1;
}

.legend-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.legend-button:hover,
.legend-button.active {
  border-color: rgba(131, 247, 197, 0.42);
  background: rgba(131, 247, 197, 0.06);
}

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

.map-dossier-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  min-height: 0;
  cursor: pointer;
}

.map-dossier-card:hover {
  border-color: rgba(243, 181, 106, 0.45);
  background: rgba(243, 181, 106, 0.05);
  transform: translateY(-1px);
}

.map-dossier-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.18rem;
}

.map-dossier-meta {
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-dossier-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.signal-pill,
.featured-case {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.signal-pill {
  padding: 14px;
  cursor: pointer;
}

.signal-pill:hover {
  border-color: rgba(131, 247, 197, 0.5);
}

.signal-pill strong,
.featured-case strong {
  display: block;
  color: var(--accent);
}

.signal-pill span,
.featured-case p,
.timeline-row span {
  color: var(--muted);
}

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

.featured-case {
  padding: 16px;
  cursor: pointer;
}

.featured-case:hover {
  border-color: rgba(243, 181, 106, 0.45);
}

.top-case-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
}

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

.compare-controls,
.compare-summary {
  grid-column: 1 / -1;
}

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

.compare-controls label span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.compare-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  overflow-wrap: anywhere;
}

.compare-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  pointer-events: none;
}

.compare-bar-group span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.compare-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.compare-bar-track + .compare-bar-track {
  margin-top: 8px;
}

.compare-bar-fill {
  height: 100%;
  border-radius: inherit;
}

.compare-a {
  background: linear-gradient(90deg, var(--accent), rgba(131, 247, 197, 0.55));
}

.compare-b {
  background: linear-gradient(90deg, var(--accent-2), rgba(243, 181, 106, 0.55));
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.compare-table td {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
  color: var(--muted);
}

.compare-table td:first-child {
  width: 34%;
  color: var(--text);
}

.top-case-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(243, 181, 106, 0.16);
  color: var(--accent-2);
  font-weight: 700;
}

.timeline-row {
  display: grid;
  grid-template-columns: 52px 1fr 38px;
  gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
}

.timeline-row:hover,
.active-timeline {
  border-color: rgba(131, 247, 197, 0.42);
  background: rgba(131, 247, 197, 0.06);
}

.timeline-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.timeline-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.filters {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: auto;
  scrollbar-width: thin;
}

.filters label {
  display: block;
  margin-top: 14px;
}

.filters span {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
}

input,
select,
button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  min-height: 48px;
  -webkit-appearance: none;
}

button {
  cursor: pointer;
}

button:hover {
  border-color: rgba(131, 247, 197, 0.5);
}

.button-row {
  margin-top: 16px;
}

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

.quick-filter {
  width: 100%;
  text-align: left;
  font-size: 0.92rem;
}

.hotspot-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.hotspot-button:hover,
.active-hotspot {
  border-color: rgba(131, 247, 197, 0.42);
  background: rgba(131, 247, 197, 0.06);
}

.active-compare {
  border-color: rgba(243, 181, 106, 0.58);
  background: rgba(243, 181, 106, 0.1);
}

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

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.incident-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.incident-card:hover,
.incident-card.active {
  transform: translateY(-1px);
  border-color: rgba(131, 247, 197, 0.5);
  background: rgba(131, 247, 197, 0.06);
}

.incident-card h3 {
  font-size: 1.06rem;
  line-height: 1.35;
}

.incident-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.incident-topline,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incident-topline {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tag {
  font-size: 0.75rem;
}

.score {
  color: var(--accent-2);
}

.detail-content h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.detail-content p {
  color: var(--muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

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

.detail-metric {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.detail-metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.detail-metric strong {
  color: var(--text);
  font-size: 1.05rem;
}

.detail {
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.related-grid {
  display: grid;
  gap: 10px;
}

.related-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  cursor: pointer;
}

.related-card:hover {
  border-color: rgba(131, 247, 197, 0.4);
}

.detail-block + .detail-block {
  margin-top: 18px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.list li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.compact li {
  font-size: 0.92rem;
}

a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

@keyframes mapPulse {
  0% {
    opacity: 0.75;
    transform: scale(0.92);
  }
  70% {
    opacity: 0;
    transform: scale(1.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

@media (max-width: 1180px) {
  .takeaway-grid,
  .briefing-grid,
  .panels,
  .map-dossier {
    grid-template-columns: 1fr;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

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

  .compare-bars {
    grid-template-columns: 1fr;
  }

  .filters,
  .detail {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .featured-cases {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100vw - 24px, 1440px);
    padding: 18px 0 28px;
  }

  .card,
  .stat {
    border-radius: 18px;
    padding: 15px;
  }

  .hero {
    padding: 10px 0 18px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.2rem, 11vw, 4.2rem);
  }

  .lede {
    font-size: 1rem;
  }

  .map-layout {
    gap: 12px;
  }

  .map-headline {
    flex-direction: column;
    align-items: flex-start;
  }

  .world-map {
    min-height: 280px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .compare-selectors {
    grid-template-columns: 1fr;
  }

  .top-case-card {
    padding: 15px;
  }

  .detail-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topnav {
    flex-direction: column;
    align-items: flex-start;
  }

  .navlinks {
    width: 100%;
  }

  .navlinks a {
    flex: 1 1 auto;
    text-align: center;
  }

  .incident-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-filters {
    grid-template-columns: 1fr;
  }

  .map-record-badge,
  .map-active-filter {
    width: 100%;
  }

  .featured-case,
  .signal-pill,
  .related-card,
  .incident-card {
    padding: 14px;
  }

  .world-map {
    min-height: 240px;
  }

  .map-label {
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  .stats,
  .takeaway-grid {
    grid-template-columns: 1fr;
  }

  .meta-strip {
    gap: 8px;
  }

  .meta-pill,
  .tag,
  .score {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .timeline-row {
    grid-template-columns: 42px 1fr 30px;
    gap: 8px;
  }

  .world-map {
    min-height: 220px;
  }

  .map-label {
    display: none;
  }

  .detail-content h3 {
    font-size: 1.14rem;
  }

  .top-case-rank {
    width: 34px;
    height: 34px;
  }
}
