:root {
  --bg: #08080a;
  --bg-elevated: #101014;
  --panel: #121016;
  --panel-border: #2a181c;
  --text: #e8eaed;
  --silver: #b8c2cc;
  --muted: #7a8494;
  --red: #c41e1e;
  --red-bright: #e83535;
  --red-dark: #5c0a0e;
  --red-glow: rgba(196, 30, 30, 0.45);
  --radar: rgba(196, 30, 30, 0.12);
  --safe: #3d4a3d;
  --font: "Rajdhani", "IBM Plex Sans", system-ui, sans-serif;
  --display: "Oswald", "Rajdhani", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
}

/* Tactical backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(196, 30, 30, 0.14), transparent 55%),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.55) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(196, 30, 30, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 30, 30, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 20%, transparent 75%);
}

.site-header,
.layout,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #141018 0%, var(--bg) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 1px 0 var(--red-glow);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.site-logo {
  flex: 0 0 auto;
  width: clamp(80px, 13vw, 128px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 18px var(--red-glow)) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.7));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 0.2rem;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-bright);
  font-weight: 600;
}

.subtitle {
  margin: 0;
  color: var(--silver);
  max-width: 38rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ca-box {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(18, 12, 16, 0.85);
  max-width: min(100%, 22rem);
}

.ca-text {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--silver);
  word-break: break-all;
  line-height: 1.3;
}

.ca-text::first-line {
  color: var(--red-bright);
}

.legend {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(18, 12, 16, 0.85);
}

.legend-bar {
  width: 140px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    #2d8f4a 0%,
    #8a9a35 18%,
    #c9a227 45%,
    #e84a1a 78%,
    #8b0000 100%
  );
  border: 1px solid rgba(120, 120, 130, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.layout-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
  min-width: 0;
}

.map-panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  overflow: hidden;
  min-height: 480px;
  box-shadow:
    0 0 0 1px rgba(196, 30, 30, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 60px rgba(196, 30, 30, 0.04);
}

.map-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.03) 3px,
    rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.5;
}

.map-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 35%, rgba(8, 8, 10, 0.65) 100%);
}

.map-radar {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.2;
  background:
    radial-gradient(circle at 50% 48%, transparent 8%, var(--radar) 9%, transparent 10%),
    radial-gradient(circle at 50% 48%, transparent 28%, rgba(196, 30, 30, 0.08) 29%, transparent 30%),
    radial-gradient(circle at 50% 48%, transparent 48%, rgba(196, 30, 30, 0.06) 49%, transparent 50%);
  animation: radar-pulse 4s ease-in-out infinite;
}

@keyframes radar-pulse {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.28;
    transform: scale(1.02);
  }
}

#europeMap {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  height: auto;
  cursor: grab;
  touch-action: none;
}

#europeMap:active {
  cursor: grabbing;
}

.country {
  stroke: #1a1214;
  stroke-width: 0.55px;
  transition: filter 0.15s ease, stroke 0.15s ease;
}

.country.has-data {
  cursor: pointer;
}

.country.has-data:hover,
.country.selected {
  filter: brightness(1.2) saturate(1.15);
  stroke: var(--red-bright);
  stroke-width: 1.1px;
}

.country.selected {
  filter: brightness(1.25) saturate(1.2) drop-shadow(0 0 6px var(--red-glow));
}

.country.no-data {
  fill: #1a1418;
  cursor: default;
}

.faces-layer {
  pointer-events: none;
}

.countries-layer {
  pointer-events: all;
}

.map-face image {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.countdown-banner {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  box-shadow:
    0 0 0 1px rgba(196, 30, 30, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.45);
}

.countdown-banner-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
  min-height: 3.25rem;
}

.countdown-banner-copy {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.countdown-headline {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(0.78rem, 1.8vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--text);
}

.countdown-headline .countdown-country-name {
  color: var(--red-bright);
  text-shadow: 0 0 12px var(--red-glow);
}

.countdown-digits {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem 0.35rem;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.countdown-digits.is-hidden {
  display: none;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.75rem;
}

.countdown-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2.5vw, 1.65rem);
  font-weight: 600;
  line-height: 1;
  color: var(--red-bright);
  text-shadow: 0 0 12px var(--red-glow);
  font-variant-numeric: tabular-nums;
  transform-origin: center bottom;
}

@keyframes countdown-tick-glow {
  0% {
    color: #fff;
    text-shadow:
      0 0 6px #fff,
      0 0 18px var(--red-bright),
      0 0 36px var(--red-glow);
    transform: scale(1.14);
  }
  55% {
    color: var(--red-bright);
    text-shadow: 0 0 22px var(--red-glow), 0 0 8px var(--red-bright);
    transform: scale(1.04);
  }
  100% {
    color: var(--red-bright);
    text-shadow: 0 0 12px var(--red-glow);
    transform: scale(1);
  }
}

.countdown-num.is-ticking {
  animation: countdown-tick-glow 0.5s ease-out;
}

.countdown-unit:has(.countdown-num.is-ticking) .countdown-lbl {
  color: var(--red-bright);
  transition: color 0.15s ease;
}

.countdown-sep.is-ticking {
  animation: countdown-sep-flash 0.5s ease-out;
}

@keyframes countdown-sep-flash {
  0%,
  40% {
    color: var(--red-bright);
    text-shadow: 0 0 14px var(--red-glow);
    opacity: 1;
  }
  100% {
    color: rgba(196, 30, 30, 0.55);
    text-shadow: none;
    opacity: 1;
  }
}

.countdown-lbl {
  margin-top: 0.15rem;
  font-family: var(--display);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown-sep {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(196, 30, 30, 0.55);
  padding-bottom: 0.65rem;
  line-height: 1;
}

.countdown-status {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.map-hint {
  position: relative;
  z-index: 4;
  margin: 0;
  padding: 0.5rem 0.85rem 0.75rem;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--panel-border);
  background: rgba(8, 8, 10, 0.75);
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  padding: 0.5rem 0.7rem;
  background: rgba(12, 8, 10, 0.94);
  border: 1px solid rgba(196, 30, 30, 0.5);
  border-radius: 4px;
  font-size: 0.8rem;
  line-height: 1.4;
  max-width: 220px;
  box-shadow: 0 0 20px var(--red-glow), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.map-tooltip strong {
  color: var(--silver);
  font-family: var(--display);
  letter-spacing: 0.04em;
}

.detail-panel {
  background: linear-gradient(165deg, #161018 0%, var(--panel) 45%, #0e0c10 100%);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  min-height: 480px;
  box-shadow:
    0 0 24px rgba(196, 30, 30, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.45);
}

.detail-empty h2,
.detail-country {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--silver);
  text-shadow: 0 0 20px var(--red-glow);
}

.detail-empty p,
.detail-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.detail-stat-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding: 0.65rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(196, 30, 30, 0.12);
}

.detail-stat-row:last-of-type {
  border-color: rgba(196, 30, 30, 0.28);
  box-shadow: inset 0 0 24px rgba(196, 30, 30, 0.06);
}

.detail-meme {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--red-glow));
}

.detail-meme-float {
  animation: detail-bob 2.4s ease-in-out infinite;
}

.detail-meme-knife {
  animation-delay: 0.4s;
}

@keyframes detail-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.detail-stat-copy {
  flex: 1;
  min-width: 0;
}

.detail-label {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--silver);
  line-height: 1.35;
}

.detail-value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
  line-height: 1.15;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.detail-value-sm {
  font-size: 1.5rem;
  margin-bottom: 0.45rem;
  color: var(--red-bright);
}

.detail-deadly {
  margin: 0;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--silver);
  text-transform: uppercase;
}

.detail-deadly .deadly-num {
  display: inline-block;
  margin: 0 0.12em;
  padding: 0.05em 0.35em;
  font-family: var(--mono);
  font-size: 1.35em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, #ff5555 0%, #c41e1e 100%);
  border-radius: 4px;
  border: 1px solid rgba(255, 120, 120, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow:
    0 0 18px var(--red-glow),
    0 0 32px rgba(255, 50, 50, 0.35);
  animation: deadly-num-pulse 2s ease-in-out infinite;
}

@keyframes deadly-num-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 18px var(--red-glow), 0 0 32px rgba(255, 50, 50, 0.35);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 28px rgba(255, 60, 60, 0.65), 0 0 48px rgba(255, 50, 50, 0.45);
  }
}

.detail-case-box {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(196, 30, 30, 0.35);
  box-shadow: inset 0 0 28px rgba(196, 30, 30, 0.07);
}

.detail-label-case {
  margin-bottom: 0.65rem;
  color: var(--red-bright);
}

.case-loading,
.case-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.case-empty a {
  color: var(--red-bright);
}

.case-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  background: #0a0a0c;
}

.case-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--silver);
  letter-spacing: 0.02em;
}

.case-meta {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.case-snippet {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
}

.case-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-bright);
  text-decoration: none;
}

.case-link:hover {
  text-decoration: underline;
}

.detail-note {
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--panel-border);
}

.site-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  border-top: 1px solid var(--panel-border);
  padding-top: 1rem;
}

.sources {
  margin-top: 0.5rem;
  opacity: 0.85;
}

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

  .countdown-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .detail-panel {
    min-height: auto;
  }
}

/* Intro: knife man + speech bubble */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
}

.intro-overlay.is-done {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.intro-stage {
  position: absolute;
  inset: 0;
}

.intro-character {
  position: fixed;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  transform: translate(-115%, 75%) rotate(-8deg);
  opacity: 0;
  will-change: transform, opacity;
}

.intro-overlay.is-man-in .intro-character {
  opacity: 1;
  transform: translate(2%, 14%) rotate(-6deg);
  transition:
    transform 1s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease-out;
}

.intro-overlay.is-hiding .intro-character {
  opacity: 0;
  transform: translate(-30%, 40%) rotate(-12deg) scale(0.92);
  transition:
    transform 0.55s ease-in,
    opacity 0.45s ease-in;
}

.intro-knife-man {
  display: block;
  width: clamp(200px, 32vw, 340px);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.75));
}

.intro-speech-bubble {
  position: absolute;
  left: 52%;
  bottom: 72%;
  width: clamp(200px, 34vw, 360px);
  height: auto;
  transform: scale(0.15) translateY(28px);
  transform-origin: 42% 88%;
  opacity: 0;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55));
}

.intro-overlay.is-bubble-in .intro-speech-bubble {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition:
    transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.25s ease-out;
}

.intro-overlay.is-hiding .intro-speech-bubble {
  opacity: 0;
  transform: scale(0.85) translateY(12px);
  transition:
    transform 0.4s ease-in,
    opacity 0.35s ease-in;
}

@media (max-width: 600px) {
  .intro-speech-bubble {
    left: 38%;
    bottom: 78%;
    width: min(72vw, 280px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-radar,
  .detail-meme-float,
  .detail-deadly .deadly-num,
  .countdown-num.is-ticking,
  .countdown-sep.is-ticking {
    animation: none;
  }

  .intro-overlay {
    display: none;
  }
}
