/* =========================================================================
   THE IDIOCRACY INDEX — "Civilizational Stupidity Monitor"
   A satirical broadcast / HUD aesthetic. Built for impact + motion.
   ========================================================================= */

:root {
  /* surfaces */
  --bg:        #07070b;
  --bg-1:      #0d0d15;
  --bg-2:      #14141f;
  --bg-3:      #1c1c2b;
  --line:      #262638;
  --line-soft: #1c1c2a;

  /* ink */
  --ink:      #f4f4fb;
  --ink-dim:  #a6a6c2;
  --ink-mute: #6c6c86;

  /* brand / signal */
  --hazard:   #ffd60a;  /* yellow — brand, "warning" */
  --alarm:    #ff2e63;  /* hot pink — alarm */
  --acid:     #c6f135;  /* acid green accent */
  --cyan:     #3dd7ff;  /* hud cyan */

  /* score zones */
  --z-safe:   #34e5a0;
  --z-warn:   #ffb02e;
  --z-high:   #ff4d4d;
  --z-extreme:#ff2e63;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body:    'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'Space Mono', ui-monospace, 'Cascadia Mono', monospace;

  --maxw: 1180px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(70% 50% at 12% -5%, rgba(255,46,99,0.16), transparent 60%),
    radial-gradient(60% 50% at 92% 0%, rgba(255,214,10,0.12), transparent 55%),
    radial-gradient(80% 60% at 50% 110%, rgba(61,215,255,0.07), transparent 60%);
  background-attachment: fixed;
}

/* film grain + scanlines overlays (broadcast feel) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0,0,0,0.22) 3px, transparent 4px);
}

a { color: var(--hazard); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------- HAZARD TAPE SATIRE BAR ---------- */
.satire-bar {
  position: relative; z-index: 5;
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; text-align: center;
  color: var(--hazard); padding: 11px 14px 9px;
  background: #0a0a0f; border-bottom: 1px solid var(--line);
}
.satire-bar::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(45deg, var(--hazard) 0 14px, #0a0a0f 14px 28px);
}
.satire-bar span.tape-txt {
  background: var(--hazard); padding: 2px 9px; border-radius: 3px; color: #0a0a0f;
}
.satire-bar a { color: var(--hazard); text-decoration: underline; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(7,7,11,0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { font-size: 1.7rem; filter: drop-shadow(0 0 10px rgba(255,46,99,0.55)); }
.brand-text {
  font-family: var(--font-mono); font-size: 0.62rem; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-dim);
}
.brand-text strong {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: 1.35rem; letter-spacing: 0.04em; color: var(--ink);
}
.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--alarm); text-transform: uppercase;
  margin-left: 6px;
}
.live-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--alarm); box-shadow: 0 0 10px var(--alarm);
  animation: pulse 1.6s var(--ease) infinite;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-dim); padding: 8px 14px; border-radius: 999px;
  border: 1px solid transparent; transition: all 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); border-color: var(--line); background: var(--bg-1); text-decoration: none; }
.nav a.active { color: #0a0a0f; background: var(--hazard); }
.lang-switch {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ink-dim); background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 10px; cursor: pointer; margin-left: 4px;
}
.lang-switch:hover { color: var(--ink); border-color: var(--hazard); }
.lang-switch:focus { outline: 2px solid var(--hazard); }

/* ---------- BREAKING TICKER ---------- */
.ticker {
  position: relative; z-index: 4;
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #120308, #0a0a0f);
  overflow: hidden;
}
.ticker-label {
  flex: none; display: flex; align-items: center; gap: 8px;
  background: var(--alarm); color: #fff;
  font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.06em;
  padding: 0 16px; text-transform: uppercase; white-space: nowrap;
}
.ticker-track-wrap { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-track {
  display: inline-flex; gap: 0; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-dim);
  padding: 9px 0; animation: marquee 210s linear infinite; will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { padding: 0 28px; position: relative; }
.ticker-item::before { content: "▰"; color: var(--hazard); margin-right: 12px; font-size: 0.6rem; vertical-align: middle; }
.ticker-item b { color: var(--ink); }

/* ---------- AD SLOTS ---------- */
.ad-slot {
  margin: 20px auto; max-width: var(--maxw);
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(135deg, #0c0c14 0 11px, #0a0a11 11px 22px);
  border: 1px dashed var(--line); border-radius: 12px;
  color: #3c3c52; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.ad-leaderboard { height: 90px; }
.ad-rectangle { width: 300px; height: 250px; }

main { display: block; }

/* ---------- SECTION LABELS ---------- */
.sec-label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute);
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.sec-label::before { content: "//"; color: var(--hazard); }
.sec-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- HERO ---------- */
.hero { padding: clamp(30px, 6vw, 64px) 0 28px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(24px, 5vw, 56px); align-items: center;
}
.hero-kicker {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 10px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 0.92;
  letter-spacing: 0.01em; text-transform: uppercase;
}
.hero-title .hl { color: var(--hazard); }
.hero-headline {
  font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--ink-dim);
  margin: 18px 0 22px; max-width: 46ch; min-height: 3em;
}
.hero-headline b { color: var(--ink); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.chip {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--ink-dim); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; background: var(--bg-1);
}
.chip b { color: var(--hazard); }

/* ---------- GAUGE ---------- */
.gauge-wrap { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 380px; margin: 0 auto; width: 100%; }
.gauge { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.gauge-track { fill: none; stroke: var(--bg-3); stroke-width: 14; }
.gauge-zone { fill: none; stroke-width: 4; opacity: 0.55; }
.gauge-fill {
  fill: none; stroke-width: 16; stroke-linecap: round;
  transition: stroke-dashoffset 1.6s var(--ease), stroke 0.6s ease;
  filter: drop-shadow(0 0 14px currentColor);
}
.gauge-tick { stroke: var(--ink); stroke-width: 3; opacity: 0.8; }
.gauge-center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.gauge-num {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3.6rem, 11vw, 6.4rem); line-height: 0.85;
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.gauge-out { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-mute); letter-spacing: 0.1em; margin-top: 4px; }
.gauge-trend { font-family: var(--font-mono); font-weight: 700; font-size: 0.95rem; margin-top: 8px; }
.gauge-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-dim); max-width: 18ch; margin: 6px auto 0; line-height: 1.4; }

/* trend colors */
.trend-up { color: var(--z-high); }
.trend-down { color: var(--z-safe); }
.trend-flat { color: var(--ink-mute); }

/* ---------- SPOTLIGHT ---------- */
section.block { padding: clamp(28px, 5vw, 48px) 0; }
.spotlight-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(16px, 3vw, 30px);
  align-items: center;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}
.spotlight-card::before {
  content: "DUMBEST"; position: absolute; right: -10px; top: -28px;
  font-family: var(--font-display); font-size: 7rem; color: var(--ink);
  opacity: 0.03; letter-spacing: 0.05em; pointer-events: none;
}
.spotlight-flag { font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1; }
.spotlight-country { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--alarm); }
.spotlight-headline { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.25rem, 2.6vw, 1.9rem); line-height: 1.05; text-transform: uppercase; margin: 6px 0 8px; }
.spotlight-why { color: var(--ink-dim); font-size: 0.95rem; max-width: 60ch; }
.spotlight-score { font-family: var(--font-display); font-size: clamp(3rem, 8vw, 4.6rem); line-height: 0.8; font-variant-numeric: tabular-nums; text-align: center; }
.spotlight-score small { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-mute); letter-spacing: 0.1em; }

/* ---------- CONTINENTS ---------- */
.continent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.continent-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.continent-card:hover { transform: translateY(-4px); border-color: var(--hazard); box-shadow: 0 12px 32px -16px rgba(255,214,10,0.4); }
.continent-name { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; color: var(--ink-dim); }
.continent-score { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; margin: 8px 0 2px; }
.bar { height: 7px; border-radius: 6px; background: var(--bg-3); overflow: hidden; position: relative; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 1.1s var(--ease); }
.bar.has69::after { content: ""; position: absolute; left: 69%; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: 0.5; }
.continent-trend { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-mute); margin-top: 8px; }

/* ---------- RANKING ---------- */
.ranking-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ranking-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.ranking-controls input, .ranking-controls select {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--bg-1); border: 1px solid var(--line); color: var(--ink);
  padding: 10px 14px; border-radius: 999px;
}
.ranking-controls input:focus, .ranking-controls select:focus { outline: 2px solid var(--hazard); outline-offset: 1px; }

.country-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.country-row {
  display: grid; grid-template-columns: 42px 42px minmax(0,1fr) 150px auto auto; align-items: center; gap: 14px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 18px; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.country-row:hover { border-color: var(--hazard); background: var(--bg-2); transform: translateX(4px); }
.country-rank { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.country-row.top1 .country-rank { color: var(--hazard); }
.country-row.top2 .country-rank, .country-row.top3 .country-rank { color: var(--ink-dim); }
.country-flag { font-size: 1.7rem; }
.country-name { font-weight: 700; font-size: 1.02rem; }
.country-headline { color: var(--ink-mute); font-size: 0.82rem; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.country-bar { width: 150px; }
.country-trend { font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.country-score { font-family: var(--font-display); font-size: 1.9rem; min-width: 54px; text-align: right; font-variant-numeric: tabular-nums; }

/* score color helpers */
.s-safe { color: var(--z-safe); }
.s-warn { color: var(--z-warn); }
.s-high { color: var(--z-high); }
.s-extreme { color: var(--z-extreme); text-shadow: 0 0 18px rgba(255,46,99,0.55); }

/* ---------- EXPANDABLE COUNTRY / ARTICLES ---------- */
.country-row-wrap { list-style: none; background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color 0.2s; }
.country-row-wrap.open { border-color: var(--hazard); }
.country-row-wrap .country-row { border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.country-row-wrap .country-row:hover { background: var(--bg-2); transform: none; }
.country-row-wrap.open .country-row { background: var(--bg-2); }
.country-chevron { font-size: 0.7em; color: var(--ink-mute); display: inline-block; transition: transform 0.25s var(--ease), color 0.25s; vertical-align: middle; }
.country-row-wrap.open .country-chevron { transform: rotate(180deg); color: var(--hazard); }

.country-articles { overflow: hidden; max-height: 0; transition: max-height 0.4s var(--ease); }
.country-row-wrap.open .country-articles { max-height: 900px; }
.articles-inner { overflow: hidden; }
.articles-pad { padding: 6px 14px 16px; display: flex; flex-direction: column; gap: 7px; }
.articles-legend { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute); padding: 4px 2px 6px; }
.articles-legend .up { color: var(--z-high); }
.articles-legend .down { color: var(--z-safe); }
.no-articles { color: var(--ink-mute); font-family: var(--font-mono); font-size: 0.82rem; padding: 6px 2px; }

.article { display: grid; grid-template-columns: 54px 1fr 18px; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line-soft); transition: border-color 0.18s, background 0.18s, transform 0.18s var(--ease); }
.article:hover { border-color: var(--hazard); background: var(--bg-3); text-decoration: none; transform: translateX(3px); }
.article .impact { font-family: var(--font-display); font-size: 1.25rem; text-align: center; font-variant-numeric: tabular-nums; }
.article .impact.up { color: var(--z-high); }
.article .impact.down { color: var(--z-safe); }
.article-title { color: var(--ink); font-weight: 600; font-size: 0.92rem; line-height: 1.4; display: block; }
.article-axis { display: inline-block; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.03em; color: var(--ink-dim); background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; vertical-align: middle; white-space: nowrap; }
.article-meta { color: var(--ink-mute); font-family: var(--font-mono); font-size: 0.72rem; display: block; margin-top: 2px; }
.article-go { color: var(--ink-mute); font-size: 0.9rem; }
.article:hover .article-go { color: var(--hazard); }
.country-row-wrap.top1 .country-rank { color: var(--hazard); }
.country-row-wrap.top2 .country-rank, .country-row-wrap.top3 .country-rank { color: var(--ink-dim); }

@media (max-width: 560px) {
  .article { grid-template-columns: 44px 1fr; }
  .article-go { display: none; }
}

/* ---------- FOOTER ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; background: #05050a; padding: 44px 0 32px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.footer-cols h3 { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; color: var(--ink); }
.footer-cols p { color: var(--ink-dim); font-size: 0.9rem; }
.footer-cols a { display: block; color: var(--ink-dim); font-size: 0.9rem; padding: 3px 0; }
.footer-cols a:hover { color: var(--hazard); }
.footer-quote { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.15; color: var(--ink); text-transform: uppercase; }
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-mute); font-size: 0.78rem; font-family: var(--font-mono); text-align: center; }

/* ---------- STATIC PAGES ---------- */
.page { max-width: 780px; margin: 0 auto; padding: 30px clamp(16px,4vw,40px) 64px; }
.page h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3rem); text-transform: uppercase; letter-spacing: 0.02em; margin: 10px 0 14px; }
.page h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; text-transform: uppercase; color: var(--hazard); margin: 36px 0 12px; }
.page p, .page li { color: #d4d4e4; margin-bottom: 12px; }
.page ul, .page ol { padding-left: 22px; }
.page .callout { background: var(--bg-1); border: 1px solid var(--line); border-left: 4px solid var(--alarm); border-radius: 12px; padding: 16px 20px; margin: 20px 0; }
.page table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.9rem; }
.page th, .page td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.page th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hazard); }

/* ---------- SHOP ---------- */
.merch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 24px; }
.merch-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.merch-card:hover { transform: translateY(-6px); border-color: var(--hazard); box-shadow: 0 18px 40px -20px rgba(255,214,10,0.45); }
.merch-visual { aspect-ratio: 1 / 1; display: block; background: #0d0d15; overflow: hidden; }
.merch-visual img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s var(--ease); }
.merch-card:hover .merch-visual img { transform: scale(1.04); }
.merch-visual svg { width: 100%; height: 100%; display: block; }
.merch-info { padding: 14px 16px 18px; }
.merch-info h3 { font-family: var(--font-mono); font-size: 0.92rem; font-weight: 700; }
.merch-info .price { font-family: var(--font-display); font-size: 1.5rem; color: var(--hazard); margin-top: 2px; }
.btn { display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; background: var(--hazard); color: #0a0a0f; padding: 11px 22px; border-radius: 999px; margin-top: 12px; transition: filter 0.2s, transform 0.2s var(--ease); }
.btn:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-2px); }

/* ---------- ENTRANCE ANIMATIONS ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.4; } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .gauge-wrap { max-width: 300px; order: -1; }
  .country-row { grid-template-columns: 34px 38px minmax(0,1fr) auto; }
  .country-bar, .country-trend { display: none; }
}
@media (max-width: 560px) {
  .spotlight-card { grid-template-columns: 1fr; text-align: center; }
  .spotlight-card .spotlight-score { text-align: center; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- SHARE (scoreboard + per-country pages) ---------- */
.share-hero {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--alarm);
  background: rgba(255, 46, 99, 0.10); color: var(--ink); cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.share-hero:hover { transform: translateY(-2px); background: rgba(255, 46, 99, 0.20); }

.country-share {
  align-self: flex-start; margin-top: 4px;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--alarm);
  background: rgba(255, 46, 99, 0.10); color: var(--ink); cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.country-share:hover { transform: translateY(-2px); background: rgba(255, 46, 99, 0.20); }

/* per-country share page */
.country-card-img {
  width: 100%; max-width: 760px; height: auto; border-radius: 16px; border: 1px solid var(--line);
  margin: 18px auto 6px; display: block; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.share-label { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-dim); margin: 22px 0 10px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btn {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.03em;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-1); color: var(--ink); cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}
.share-btn:hover { transform: translateY(-2px); text-decoration: none; border-color: var(--hazard); background: var(--bg-2); }
.share-btn.x:hover { border-color: #fff; }
.share-btn.fb:hover { border-color: #1877f2; }
.share-btn.wa:hover { border-color: #25d366; }
.share-btn.rd:hover { border-color: #ff4500; }

/* country flag picker (hero "share your country") */
.cp-backdrop { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(4,4,8,0.72); backdrop-filter: blur(4px); }
.cp-backdrop.open { display: flex; }
.cp-panel { position: relative; width: min(560px, 96vw); max-height: 86vh; overflow: auto; background: var(--bg-1); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 26px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.cp-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.4rem; color: var(--ink); margin-bottom: 16px; padding-right: 30px; }
.cp-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: var(--ink-dim); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.cp-close:hover { color: var(--ink); }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cp-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); cursor: pointer; text-align: left; transition: border-color 0.15s, transform 0.15s var(--ease), background 0.15s; }
.cp-item:hover { border-color: var(--hazard); transform: translateY(-2px); background: var(--bg-3); }
.cp-flag { font-size: 1.5rem; line-height: 1; }
.cp-name { flex: 1; min-width: 0; font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-score { font-family: var(--font-display); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
