/* Site Watch public threat view. Load after /home.css. */

.threats-page {
  --threat-ink: #e7ecf6;
  --threat-muted: #9aa6bc;
  --threat-line: rgba(231, 236, 246, 0.12);
  --threat-panel: #101826;
  --threat-accent: #c47820;
  --threat-ok: #3d9a6a;
}

.threats-hero {
  background:
    radial-gradient(ellipse 70% 55% at 12% 20%, rgba(196, 120, 32, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 88% 10%, rgba(61, 154, 106, 0.12), transparent 50%),
    linear-gradient(180deg, #070b12 0%, #0c1320 70%, var(--paper) 100%);
  color: var(--threat-ink);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.threats-hero-inner {
  max-width: 46rem;
}

.threats-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--threat-accent);
  margin-bottom: 0.75rem;
}

.threats-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.threats-lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--threat-muted);
  max-width: 42ch;
  margin: 0 0 1rem;
}

.threats-meta {
  font-size: 0.85rem;
  color: rgba(231, 236, 246, 0.55);
  margin: 0;
}

.threats-section {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
}

.threats-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: -2.5rem;
}

.threats-counter {
  background: var(--threat-panel);
  color: var(--threat-ink);
  border: 1px solid var(--threat-line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 18px 40px rgba(7, 11, 18, 0.28);
  animation: threats-rise 0.7s ease both;
}

.threats-counter:nth-child(2) { animation-delay: 0.08s; }
.threats-counter:nth-child(3) { animation-delay: 0.16s; }

.threats-counter-label {
  font-size: 0.8rem;
  color: var(--threat-muted);
  margin: 0 0 0.4rem;
}

.threats-counter-value {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  margin: 0;
}

.threats-panel {
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.threats-panel-head h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin: 0 0 0.35rem;
}

.threats-panel-head p {
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 52ch;
}

.threats-map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #0b1220 0%, #121c2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.threats-country {
  cursor: default;
  transition: fill 0.25s ease, stroke 0.25s ease;
}

.threats-country.is-active {
  cursor: pointer;
}

.threats-country.is-active:hover,
.threats-country.is-active:focus {
  stroke: #f0c27a;
  stroke-width: 1.1;
}

.threats-pulse-core {
  fill: #f0c27a;
  stroke: #0b1220;
  stroke-width: 0.8;
  pointer-events: none;
}

.threats-pulse-ring {
  fill: none;
  stroke: rgba(240, 194, 122, 0.55);
  stroke-width: 1.2;
  pointer-events: none;
  transform-origin: center;
  animation: threats-pulse 2.4s ease-out infinite;
}

.threats-map-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 7rem;
  max-width: 14rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(10, 16, 28, 0.94);
  border: 1px solid rgba(240, 194, 122, 0.35);
  color: #f7f0e4;
  font-size: 0.8rem;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.threats-map-tooltip strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.threats-map-tooltip span {
  color: #c9d2e3;
}

.threats-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.threats-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.threats-bar {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) 1fr 3rem;
  gap: 0.65rem;
  align-items: center;
}

.threats-bar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.threats-bar-track {
  height: 0.7rem;
  background: #e2e7ef;
  border-radius: 999px;
  overflow: hidden;
  min-width: 3rem;
}

.threats-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  min-width: 0;
  background: linear-gradient(90deg, #8a4f12, var(--threat-accent));
  border-radius: inherit;
  transition: width 0.8s ease;
}

.threats-bar-n {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.threats-series {
  width: 100%;
  height: 200px;
}

.threats-series svg {
  width: 100%;
  height: 100%;
  display: block;
}

.threats-series-bar {
  fill: #c47820;
}

.threats-series-grid {
  stroke: rgba(16, 24, 38, 0.1);
  stroke-width: 1;
}

.threats-series-baseline {
  stroke: rgba(16, 24, 38, 0.35);
  stroke-width: 1.25;
}

.threats-series-tick {
  fill: #6b7280;
  font-size: 13px;
  font-family: Sora, sans-serif;
  font-weight: 600;
}

.threats-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 28rem;
  overflow: auto;
}

.threats-feed-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  animation: threats-fade 0.45s ease both;
}

.threats-feed-time {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.threats-feed-main {
  font-size: 0.92rem;
}

.threats-feed-main strong {
  font-weight: 600;
}

.threats-feed-kind {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b3a0c;
  background: rgba(196, 120, 32, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.threats-empty {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
}

.threats-explain-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.threats-explain h2 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  margin: 0 0 0.75rem;
}

.threats-explain p {
  color: var(--muted);
  margin: 0 0 0.85rem;
  max-width: 52ch;
}

.threats-offer {
  background: var(--threat-panel);
  color: var(--threat-ink);
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid var(--threat-line);
}

.threats-offer h2 {
  color: var(--threat-ink);
  margin-bottom: 1rem;
}

.threats-offer ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.threats-offer li {
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid var(--threat-line);
}

.threats-offer-note {
  color: var(--threat-muted) !important;
  font-size: 0.88rem;
  margin-bottom: 1.1rem !important;
}

.threats-offer .fs-btn-ghost {
  color: var(--threat-ink);
  border-color: rgba(231, 236, 246, 0.25);
}

.threats-attr {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.threats-attr a {
  color: var(--accent);
}

@keyframes threats-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes threats-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .threats-counters,
  .threats-charts,
  .threats-explain-grid {
    grid-template-columns: 1fr;
  }

  .threats-counters {
    margin-top: -1.5rem;
  }

  .threats-feed-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .threats-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }

  .threats-bar-label {
    white-space: normal;
    line-height: 1.25;
  }

  .threats-bar-track {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }

  .threats-bar-n {
    justify-self: start;
  }

  .threats-map-wrap {
    aspect-ratio: 1.55 / 1;
  }

  .threats-series {
    height: 220px;
  }

  .threats-series-tick {
    font-size: 15px;
  }
}

@keyframes threats-pulse {
  0% { opacity: 0.7; transform: scale(0.65); }
  70% { opacity: 0; transform: scale(1.55); }
  100% { opacity: 0; transform: scale(1.55); }
}
