/* -------------------------- Dossier Modal & Sources -------------------------- */
.dossier-sources {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.dossier-sources h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dossier-sources ul {
  margin: 0 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dossier-sources li {
  color: var(--text-hi);
  font-size: 0.925rem;
  line-height: 1.5;
}

.source-link {
  color: var(--crimson-soft);
  text-decoration: underline;
  font-size: 0.85rem;
  font-weight: 600;
}

.source-citation {
  color: var(--text-mid);
  font-style: italic;
  display: inline-block;
  margin-top: 0.25rem;
}

/* -------------------------- Locality Selector & Customization -------------------------- */
.locality-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.locality-select {
  background: var(--surface-strong);
  color: var(--text-hi);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s var(--ease);
}

.locality-select:hover, .locality-select:focus {
  border-color: var(--crimson-soft);
  background: var(--surface);
  box-shadow: 0 0 10px rgba(239, 31, 77, 0.25);
}

.local-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(232, 179, 74, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(232, 179, 74, 0.3);
  margin-right: 0.5rem;
}

.local-legal-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.local-legal-header h4 {
  font-size: 1.25rem;
  color: var(--text-hi);
  margin: 0.4rem 0 0.75rem;
}

.legal-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-summary {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.legal-points {
  margin: 0.5rem 0 0.75rem 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-points li {
  font-size: 0.9rem;
  color: var(--text-hi);
  line-height: 1.45;
}

.legal-disclaimer {
  color: var(--text-faint);
  margin-top: 0.5rem;
}

/* -------------------------- Self-Defense & Safety -------------------------- */
.safety-principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.principle-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.principle-card:hover {
  transform: translateY(-3px);
  border-color: var(--crimson-soft);
  box-shadow: var(--shadow-lift);
}

.principle-icon {
  font-size: 2rem;
  line-height: 1;
}

.principle-card h3 {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-hi);
  margin: 0;
}

.principle-card p {
  font-size: 0.925rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin: 0;
}

.sd-guide-card {
  background: var(--surface-strong);
  border-left: 4px solid var(--crimson);
}

.sd-guide-desc {
  font-size: 1rem;
  color: var(--text-mid);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.sd-program-card {
  border-left: 4px solid var(--violet);
}

.action-steps ol {
  margin: 0.75rem 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.action-steps ol li {
  color: var(--text-hi);
  font-size: 0.95rem;
  line-height: 1.5;
}

.target-zones-container {
  margin-top: 1.5rem;
}

.target-zone-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.target-intro {
  font-size: 1.05rem;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
}

.target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.target-item {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.target-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.target-item h4 {
  font-size: 1.1rem;
  color: var(--text-hi);
  margin: 0;
}

.target-item p {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.5;
}

.badge--safety {
  background: rgba(239, 31, 77, 0.15);
  color: var(--crimson-soft);
  border: 1px solid rgba(239, 31, 77, 0.35);
}

.badge--training {
  background: rgba(143, 107, 240, 0.15);
  color: var(--violet-soft);
  border: 1px solid rgba(143, 107, 240, 0.35);
}

/* ==========================================================================
   Women's Rights & Research Platform — Design System
   Sections: Tokens · Reset · Type · Layout · Nav · Ticker · Hero ·
   Wake-Up Archive · Tiles/Cards · Filters · Buttons · Timeline · Tabs ·
   Matrix · Emergency/Solutions · News · Stats/Charts · Modal · Toast ·
   Footer · Motion · Responsive · A11y
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,500&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ---------------------------------- Tokens ---------------------------------- */
:root {
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  /* dark editorial base */
  --bg-0: #07070c;
  --bg-1: #0c0c15;
  --bg-2: #12121e;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --border-soft: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-hi: #f6f4ef;
  --text-mid: #c7c5d6;
  --text-low: #8c8aa0;
  --text-faint: #605e73;

  --crimson: #ef1f4d;
  --crimson-soft: #ff5c7d;
  --gold: #e8b34a;
  --gold-soft: #f6cf7d;
  --violet: #8f6bf0;
  --violet-soft: #b39bff;

  --grad-ambient: radial-gradient(60rem 34rem at 12% -8%, rgba(239, 31, 77, 0.22), transparent 60%),
    radial-gradient(50rem 30rem at 88% 4%, rgba(143, 107, 240, 0.20), transparent 55%),
    radial-gradient(40rem 26rem at 50% 110%, rgba(232, 179, 74, 0.12), transparent 60%);

  --sev-1: #5eead4;
  --sev-2: #eab308;
  --sev-3: #f97316;
  --sev-4: #ef4444;
  --sev-5: #ef1f4d;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-lift: 0 18px 40px -20px rgba(0, 0, 0, 0.65);
  --shadow-glow-crimson: 0 0 0 1px rgba(239, 31, 77, 0.25), 0 14px 34px -16px rgba(239, 31, 77, 0.45);
  --shadow-glow-violet: 0 0 0 1px rgba(143, 107, 240, 0.25), 0 14px 34px -16px rgba(143, 107, 240, 0.45);
  --shadow-glow-gold: 0 0 0 1px rgba(232, 179, 74, 0.25), 0 14px 34px -16px rgba(232, 179, 74, 0.4);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-h: 68px;
  --ticker-h: 38px;
  --max-w: 1240px;

  color-scheme: dark;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg-0: #faf7f2;
  --bg-1: #f3efe7;
  --bg-2: #ece6da;
  --surface: rgba(20, 16, 10, 0.035);
  --surface-strong: rgba(20, 16, 10, 0.065);
  --border-soft: rgba(20, 16, 10, 0.10);
  --border-strong: rgba(20, 16, 10, 0.18);

  --text-hi: #1a1620;
  --text-mid: #4a4658;
  --text-low: #6f6b80;
  --text-faint: #928ea3;

  --grad-ambient: radial-gradient(60rem 34rem at 12% -8%, rgba(239, 31, 77, 0.10), transparent 60%),
    radial-gradient(50rem 30rem at 88% 4%, rgba(143, 107, 240, 0.10), transparent 55%),
    radial-gradient(40rem 26rem at 50% 110%, rgba(232, 179, 74, 0.10), transparent 60%);

  --shadow-lift: 0 18px 40px -22px rgba(30, 20, 10, 0.35);
}

/* ---------------------------------- Reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--bg-0);
  color: var(--text-mid);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image: var(--grad-ambient);
  background-attachment: fixed;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

body.modal-open { overflow: hidden; }

::selection { background: var(--crimson); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--violet-soft); }

/* ---------------------------------- Type ---------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--text-hi); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.18; }
h3 { font-size: 1.18rem; line-height: 1.3; }
p { max-width: 68ch; }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--crimson); color: #fff; padding: 0.8rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip-link a:focus { outline: 2px solid #fff; }
.skip-link:focus-within { left: 0; }

/* ---------------------------------- Layout ---------------------------------- */
.section-pad { max-width: var(--max-w); margin: 0 auto; padding: 3.2rem 1.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.section-heading { text-align: center; margin-bottom: 2rem; }
.view { display: none; animation: viewIn 0.5s var(--ease); }
.view.is-active { display: block; }
main#main { padding-top: calc(var(--topbar-h) + var(--ticker-h)); min-height: 60vh; }

@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.view-header { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem 1.4rem; }
.view-header h1 { margin-bottom: 0.6rem; }
.view-sub { color: var(--text-low); max-width: 62ch; }

/* ---------------------------------- Topbar ---------------------------------- */
.topbar {
  position: fixed; top: var(--ticker-h); left: 0; right: 0; z-index: 60;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg-0) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
  transition: top 0.25s var(--ease), background-color 0.3s var(--ease);
}
.topbar-inner {
  max-width: var(--max-w); margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--crimson), var(--violet));
  color: #fff; font-size: 1.05rem; box-shadow: var(--shadow-glow-crimson);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-family: var(--font-serif); font-weight: 600; color: var(--text-hi); font-size: 1.02rem; }
.brand-sub { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-faint); }

.mainnav { display: flex; align-items: center; gap: 0.3rem; }
.mainnav a {
  position: relative; padding: 0.55rem 0.85rem; font-size: 0.9rem; font-weight: 500; color: var(--text-low);
  border-radius: var(--radius-pill); transition: color 0.2s, background-color 0.2s;
}
.mainnav a:hover { color: var(--text-hi); background: var(--surface); }
.mainnav a.is-active { color: var(--text-hi); background: var(--surface-strong); }
.mainnav a.is-active::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--crimson); transform: translateX(-50%); box-shadow: 0 0 8px 1px var(--crimson);
}

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-mid);
  transition: transform 0.35s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold); transform: rotate(18deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.icon-sun { display: none; }
html[data-theme='light'] .icon-moon { display: none; }
html[data-theme='light'] .icon-sun { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-soft); align-items: center; justify-content: center; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text-mid); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------- News Ticker ---------------------------------- */
.news-ticker {
  position: fixed; top: 0; left: 0; right: 0; z-index: 61; height: var(--ticker-h);
  background: linear-gradient(90deg, #1a0810, #170a1e 55%, #150a12);
  border-bottom: 1px solid rgba(239, 31, 77, 0.25);
  display: flex; align-items: center; overflow: hidden;
}
html[data-theme='light'] .news-ticker { background: linear-gradient(90deg, #2a0f18, #241226 55%, #23101c); }
.ticker-tag {
  flex: 0 0 auto; display: flex; align-items: center; gap: 0.4rem; height: 100%; padding: 0 0.9rem;
  background: var(--crimson); color: #fff; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; z-index: 2; box-shadow: 6px 0 14px -6px rgba(239, 31, 77, 0.7);
}
.ticker-tag .pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.7); animation: pulse 1.8s infinite; }
.ticker-viewport { flex: 1 1 auto; overflow: hidden; height: 100%; position: relative; }
.ticker-track { display: flex; align-items: center; gap: 2.6rem; height: 100%; white-space: nowrap; width: max-content; animation: tickerScroll 42s linear infinite; padding-left: 1.5rem; }
.news-ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.79rem; color: var(--text-mid); }
.ticker-item .ticker-cat { font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-soft); }
.ticker-item a { color: var(--text-hi); }
.ticker-item a:hover { color: var(--crimson-soft); }
.ticker-sep { color: var(--text-faint); }

@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); } 70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

/* ---------------------------------- Hero ---------------------------------- */
.hero { position: relative; padding: 5.4rem 1.5rem 3.6rem; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -10% -10% auto -10%; height: 130%;
  background: var(--grad-ambient); pointer-events: none; z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 840px; margin: 0 auto; text-align: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 1.1rem;
  padding: 0.4rem 0.9rem; border: 1px solid var(--border-soft); border-radius: var(--radius-pill); background: var(--surface);
}
.hero h1 { margin-bottom: 1.2rem; }
.hero h1::after { content: ''; display: block; }
.hero-lede { margin: 0 auto 2rem; color: var(--text-low); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------- Buttons ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius-pill); font-weight: 600; font-size: 0.92rem;
  border: 1px solid transparent; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--crimson), #c81344); color: #fff; box-shadow: var(--shadow-glow-crimson); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgba(239, 31, 77, 0.55); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text-hi); }
.btn-ghost:hover { background: var(--surface-strong); border-color: var(--violet-soft); color: var(--violet-soft); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text-mid); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-icon { display: inline-flex; }

/* ---------------------------------- Wake-Up Archive ---------------------------------- */
.wakeup-archive { position: relative; padding: 1rem 1.5rem 4rem; }
.wakeup-archive-inner { max-width: var(--max-w); margin: 0 auto; }
.wakeup-archive-head { max-width: 74ch; margin-bottom: 1.8rem; }
.wakeup-kicker {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--crimson-soft); margin-bottom: 0.6rem;
}
.wakeup-lede { color: var(--text-low); }

.wakeup-pills { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.4rem 0 1rem; }
.wakeup-pill {
  padding: 0.5rem 1rem; border-radius: var(--radius-pill); background: var(--surface);
  border: 1px solid var(--border-soft); color: var(--text-low); font-size: 0.82rem; font-weight: 500;
  transition: all 0.2s var(--ease);
}
.wakeup-pill:hover { border-color: var(--violet-soft); color: var(--text-hi); }
.wakeup-pill.is-active { background: linear-gradient(135deg, rgba(239,31,77,0.25), rgba(143,107,240,0.25)); border-color: var(--crimson-soft); color: var(--text-hi); box-shadow: var(--shadow-glow-crimson); }

.results-meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); margin: 0.4rem 0 1.1rem; letter-spacing: 0.02em; }

.wakeup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.wakeup-card {
  position: relative; text-align: left; padding: 1.4rem; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0.01));
  border: 1px solid var(--border-soft); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 0.7rem; cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  overflow: hidden;
}
.wakeup-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; z-index: -1;
  background: radial-gradient(24rem 12rem at 0% 0%, rgba(239, 31, 77, 0.18), transparent 60%);
  transition: opacity 0.3s var(--ease);
}
.wakeup-card:hover, .wakeup-card:focus-visible {
  transform: translateY(-4px); border-color: rgba(239, 31, 77, 0.4); box-shadow: var(--shadow-lift);
}
.wakeup-card:hover::before { opacity: 1; }
.wakeup-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.wakeup-theme-tag {
  font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.3rem 0.6rem; border-radius: var(--radius-pill); color: var(--violet-soft);
  background: rgba(143, 107, 240, 0.14); border: 1px solid rgba(143, 107, 240, 0.3);
}
.severity-dots { display: inline-flex; gap: 3px; }
.dot-cell { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.dot-cell--on { background: var(--crimson); box-shadow: 0 0 6px 0 rgba(239, 31, 77, 0.8); }
.wakeup-card-title { font-size: 1.12rem; line-height: 1.3; }
.wakeup-card-summary { color: var(--text-low); font-size: 0.9rem; flex: 1; }
.wakeup-card-meta { display: flex; justify-content: space-between; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
.wakeup-card-cta { font-size: 0.82rem; font-weight: 600; color: var(--crimson-soft); }
.wakeup-card:hover .wakeup-card-cta { color: var(--gold-soft); }

/* pull-quote used inside spotlight/modal content */
.pull-quote {
  font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--text-hi);
  border-left: 3px solid var(--crimson); padding: 0.2rem 0 0.2rem 1.1rem; margin: 1rem 0;
}

/* ---------------------------------- Stat tiles ---------------------------------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat-tile {
  padding: 1.5rem; border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid var(--border-soft); position: relative; overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.stat-tile:hover { transform: translateY(-3px); border-color: var(--gold); }
.stat-tile::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 179, 74, 0.22), transparent 70%);
}
.stat-value { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 700; color: var(--text-hi); letter-spacing: -0.02em; display: block; }
.stat-value .stat-unit { font-size: 1rem; color: var(--gold-soft); margin-left: 0.15rem; }
.stat-label { font-size: 0.85rem; color: var(--text-low); margin-top: 0.35rem; display: block; }
.stat-source { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-faint); margin-top: 0.6rem; display: block; }

/* ---------------------------------- Quick grid ---------------------------------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }
.quick-card {
  display: block; padding: 1.5rem; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border-soft); transition: all 0.25s var(--ease);
}
.quick-card:hover { border-color: var(--violet-soft); transform: translateY(-4px); box-shadow: var(--shadow-glow-violet); }
.quick-card .quick-icon { font-size: 1.6rem; margin-bottom: 0.8rem; display: block; }
.quick-card h3 { margin-bottom: 0.4rem; }
.quick-card p { color: var(--text-low); font-size: 0.88rem; }

/* ---------------------------------- Panels / card lists ---------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 1.5rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.panel-note { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); }
.link-more { font-size: 0.85rem; font-weight: 600; color: var(--crimson-soft); white-space: nowrap; }
.link-more:hover { color: var(--gold-soft); }

.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.card-list--compact { display: flex; flex-direction: column; gap: 0.7rem; }

.record-card, .paper-card, .convention-card, .solution-card, .news-card, .hotline-card {
  position: relative; padding: 1.3rem; border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.22s;
}
.card-list--compact .record-card,
.card-list--compact .news-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }

.record-card:hover, .paper-card:hover, .convention-card:hover, .solution-card:hover, .news-card:hover {
  transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lift);
}
.record-card { cursor: pointer; }

.card-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge {
  font-family: var(--font-mono); font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.28rem 0.55rem; border-radius: var(--radius-pill); border: 1px solid var(--border-soft);
  color: var(--text-low); background: var(--bg-1);
}
.badge--category { color: var(--violet-soft); border-color: rgba(143,107,240,0.3); background: rgba(143,107,240,0.1); }
.badge--type { color: var(--gold-soft); border-color: rgba(232,179,74,0.3); background: rgba(232,179,74,0.1); }
.badge--status-ongoing { color: var(--crimson-soft); border-color: rgba(239,31,77,0.35); background: rgba(239,31,77,0.1); }
.badge--status-resolved { color: #5eead4; border-color: rgba(94,234,212,0.35); background: rgba(94,234,212,0.1); }
.badge--status-historical { color: var(--text-low); }
.badge--sev-1 { color: var(--sev-1); border-color: color-mix(in srgb, var(--sev-1) 45%, transparent); }
.badge--sev-2 { color: var(--sev-2); border-color: color-mix(in srgb, var(--sev-2) 45%, transparent); }
.badge--sev-3 { color: var(--sev-3); border-color: color-mix(in srgb, var(--sev-3) 45%, transparent); }
.badge--sev-4 { color: var(--sev-4); border-color: color-mix(in srgb, var(--sev-4) 45%, transparent); }
.badge--sev-5 { color: #fff; background: var(--crimson); border-color: var(--crimson); box-shadow: 0 0 10px 0 rgba(239,31,77,0.6); animation: glowPulse 2.4s ease-in-out infinite; }

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 6px 0 rgba(239,31,77,0.5); }
  50% { box-shadow: 0 0 14px 2px rgba(239,31,77,0.8); }
}

.card-title { font-size: 1.05rem; color: var(--text-hi); line-height: 1.3; }
.card-summary { color: var(--text-low); font-size: 0.88rem; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); margin-top: 0.2rem; }
.card-foot strong { color: var(--text-mid); font-weight: 600; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--text-faint); font-family: var(--font-mono); font-size: 0.85rem; }
.loading-state { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--text-low); }
.loading-state .spinner { margin: 0 auto 0.8rem; }

.spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border-soft);
  border-top-color: var(--crimson); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------- Filter bar ---------------------------------- */
.filter-bar { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.4rem; }
.filter-search input[type='search'] {
  width: 100%; padding: 0.9rem 1.15rem; border-radius: var(--radius-pill); border: 1px solid var(--border-soft);
  background: var(--surface); color: var(--text-hi); font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-search input[type='search']:focus-visible { outline: none; border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(239,31,77,0.2); }
.filter-search input::placeholder { color: var(--text-faint); }

.filter-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.filter-row select {
  padding: 0.62rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--border-soft);
  background: var(--bg-1); color: var(--text-mid); font-size: 0.84rem; min-width: 140px;
  transition: border-color 0.2s;
}
.filter-row select:focus-visible { outline: none; border-color: var(--violet-soft); }
.filter-inline { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-low); }
.filter-toggle input { width: 16px; height: 16px; accent-color: var(--crimson); }

/* ---------------------------------- Timeline strip ---------------------------------- */
.timeline-wrap { max-width: var(--max-w); margin: 0 auto 1.6rem; padding: 0 1.5rem; }
.timeline-strip {
  display: flex; align-items: flex-end; gap: 3px; height: 84px; padding: 1rem 1rem 0.6rem;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  overflow-x: auto;
}
.timeline-bar-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex: 0 0 auto; min-width: 10px; }
.timeline-bar {
  width: 10px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--violet-soft), var(--crimson));
  cursor: pointer; transition: transform 0.15s var(--ease), opacity 0.15s;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
.timeline-bar:hover, .timeline-bar.is-active { transform: scaleY(1.08) scaleX(1.4); opacity: 1; box-shadow: 0 0 10px rgba(239,31,77,0.6); }
.timeline-bar-wrap.is-dim .timeline-bar { opacity: 0.28; }
.timeline-label { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-faint); white-space: nowrap; }
.timeline-hint { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-faint); text-align: right; margin-top: 0.4rem; }

/* ---------------------------------- Pagination ---------------------------------- */
.pagination { max-width: var(--max-w); margin: 1.6rem auto 0; padding: 0 1.5rem; display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 0.7rem; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--border-soft); color: var(--text-low); font-family: var(--font-mono); font-size: 0.8rem;
  transition: all 0.2s;
}
.page-btn:hover:not([disabled]) { border-color: var(--violet-soft); color: var(--text-hi); }
.page-btn.is-active { background: linear-gradient(135deg, var(--crimson), var(--violet)); color: #fff; border-color: transparent; }
.page-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.page-ellipsis { display: grid; place-items: center; color: var(--text-faint); padding: 0 0.3rem; }

/* ---------------------------------- Tabs ---------------------------------- */
.tabs { max-width: var(--max-w); margin: 0 auto 1.6rem; padding: 0 1.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--border-soft); }
.tab-btn {
  padding: 0.85rem 1.1rem; background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-low); font-weight: 600; font-size: 0.92rem; transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover { color: var(--text-hi); }
.tab-btn.is-active { color: var(--text-hi); border-color: var(--crimson); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: viewIn 0.35s var(--ease); }

/* ---------------------------------- Treaty matrix ---------------------------------- */
.matrix-toggle-row { max-width: var(--max-w); margin: 0 auto 1.2rem; padding: 0 1.5rem; display: flex; justify-content: flex-end; }
.matrix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.matrix-card { padding: 1.3rem; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-soft); }
.matrix-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.5rem; }
.matrix-short { font-family: var(--font-mono); font-weight: 700; color: var(--gold-soft); font-size: 0.95rem; }
.matrix-years { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); }
.matrix-ratify-bar { height: 8px; border-radius: var(--radius-pill); background: var(--bg-1); overflow: hidden; margin: 0.7rem 0 0.35rem; border: 1px solid var(--border-soft); }
.matrix-ratify-fill { height: 100%; background: linear-gradient(90deg, var(--violet), var(--crimson)); border-radius: var(--radius-pill); transition: width 0.6s var(--ease); }
.matrix-ratify-label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-faint); }

/* ---------------------------------- Emergency banner & solutions ---------------------------------- */
.emergency-banner {
  max-width: var(--max-w); margin: 0 auto 2rem; padding: 1.4rem 1.6rem; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(239, 31, 77, 0.16), rgba(232, 179, 74, 0.08));
  border: 1px solid rgba(239, 31, 77, 0.35); box-shadow: var(--shadow-glow-crimson);
}
.emergency-banner { margin-left: 1.5rem; margin-right: 1.5rem; }
@media (min-width: 1272px) { .emergency-banner { margin-left: auto; margin-right: auto; } }
.emergency-head { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 1rem; }
.emergency-head strong { color: var(--text-hi); font-size: 1.05rem; }
.emergency-head span { color: var(--text-low); font-size: 0.86rem; }
.hotline-card { background: rgba(255,255,255,0.03); border-color: rgba(239, 31, 77, 0.25); }
.hotline-card .card-title { display: flex; align-items: center; gap: 0.5rem; }
.hotline-card .card-title::before { content: '☎'; color: var(--crimson-soft); }

.copy-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.42rem 0.75rem; border-radius: var(--radius-pill); border: 1px dashed var(--border-strong);
  background: transparent; color: var(--text-low); transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--gold); color: var(--gold-soft); border-style: solid; }
.copy-btn.is-copied { border-color: #5eead4; color: #5eead4; border-style: solid; }

/* ---------------------------------- News ---------------------------------- */
.news-toolbar { max-width: var(--max-w); margin: 0 auto 1rem; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.refresh-status { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-low); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dot--good { background: #5eead4; box-shadow: 0 0 8px 1px rgba(94,234,212,0.7); animation: pulse 1.8s infinite; }
.dot--busy { background: var(--gold); box-shadow: 0 0 8px 1px rgba(232,179,74,0.7); animation: spin 1s linear infinite; }
.dot--bad { background: var(--crimson); }

.sources-panel { max-width: var(--max-w); margin: 0 auto 1.4rem; padding: 0 1.5rem; }
.sources-panel summary { cursor: pointer; font-weight: 600; color: var(--text-mid); font-size: 0.88rem; padding: 0.6rem 0; }
.sources-panel summary:hover { color: var(--text-hi); }
.source-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; padding: 0.6rem 0 1rem; }
.source-item { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border-soft); font-size: 0.8rem; }
.source-item .source-name { color: var(--text-mid); font-weight: 500; }
.source-item .source-status { font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; }
.source-status--ok { color: #5eead4; }
.source-status--pending { color: var(--gold); }
.source-status--error { color: var(--crimson-soft); }

.news-card { border-left: 3px solid var(--border-soft); }
.news-card .card-foot a { color: var(--violet-soft); font-weight: 600; }
.news-card .card-foot a:hover { color: var(--crimson-soft); }
.news-time { color: var(--text-faint); }

/* ---------------------------------- Stats bar charts ---------------------------------- */
.barchart { display: flex; flex-direction: column; gap: 0.7rem; }
.barchart-row { display: grid; grid-template-columns: 130px 1fr 46px; align-items: center; gap: 0.7rem; }
.barchart-label { font-size: 0.8rem; color: var(--text-low); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barchart-track { height: 10px; border-radius: var(--radius-pill); background: var(--bg-1); border: 1px solid var(--border-soft); overflow: hidden; }
.barchart-fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--violet), var(--crimson)); transition: width 0.7s var(--ease); }
.barchart-value { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-mid); text-align: right; }

/* ---------------------------------- Modal ---------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.5rem;
  background: rgba(4, 3, 8, 0.72); backdrop-filter: blur(6px);
  animation: fadeIn 0.25s var(--ease);
}
.modal-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 2.2rem; box-shadow: 0 30px 70px -20px rgba(0,0,0,0.75);
  animation: modalIn 0.32s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 1.1rem; right: 1.1rem; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-mid); font-size: 0.9rem;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--crimson); color: #fff; border-color: var(--crimson); transform: rotate(90deg); }
.modal h2 { margin: 0.6rem 0 0.9rem; padding-right: 2rem; }
.modal h3 { margin: 1.3rem 0 0.5rem; font-size: 1rem; color: var(--gold-soft); }
.modal-scale, .modal-perpetrators { font-size: 0.9rem; color: var(--text-mid); margin: 0.4rem 0; }
.modal-details { color: var(--text-low); margin: 0.8rem 0; white-space: pre-line; }
.modal-loading { text-align: center; padding: 2rem 0; color: var(--text-low); }
.modal-sources { display: flex; flex-direction: column; gap: 0.5rem; }
.modal-sources a { color: var(--violet-soft); font-size: 0.88rem; text-decoration: underline; text-underline-offset: 3px; }
.modal-sources a:hover { color: var(--crimson-soft); }
.modal-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border-soft); }
.modal-list { color: var(--text-low); font-size: 0.9rem; padding-left: 1.1rem; list-style: disc; display: flex; flex-direction: column; gap: 0.4rem; }

/* ---------------------------------- Toast ---------------------------------- */
.toast {
  position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 300;
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text-hi);
  padding: 0.8rem 1.3rem; border-radius: var(--radius-pill); font-size: 0.86rem; box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  display: flex; align-items: center; gap: 0.5rem;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[hidden] { display: none; }

/* ---------------------------------- Footer ---------------------------------- */
.site-footer {
  max-width: var(--max-w); margin: 3rem auto 0; padding: 2.4rem 1.5rem 3rem; border-top: 1px solid var(--border-soft);
  color: var(--text-faint); font-size: 0.82rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.site-footer .muted { color: var(--text-faint); }
.site-footer span#footerRefreshedAt { color: var(--text-low); font-family: var(--font-mono); }

/* ---------------------------------- Responsive ---------------------------------- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .mainnav { position: fixed; top: calc(var(--topbar-h) + var(--ticker-h)); left: 0; right: 0; bottom: 0;
    background: var(--bg-0); flex-direction: column; align-items: stretch; padding: 1.2rem; gap: 0.3rem;
    transform: translateX(100%); transition: transform 0.3s var(--ease); overflow-y: auto; }
  .mainnav.is-open { transform: translateX(0); }
  .mainnav a { padding: 1rem; font-size: 1.05rem; border-radius: var(--radius-md); }
  .nav-toggle { display: flex; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 0 1rem; }
  .brand-sub { display: none; }
  .card-list--compact .record-card, .card-list--compact .news-card { flex-direction: column; align-items: flex-start; }
  .barchart-row { grid-template-columns: 90px 1fr 40px; }
}

/* ---------------------------------- Accessibility / Motion ---------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
@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; }
}
