/* ==========================================================================
   Vatnik Prize — design system
   Dark by default; [data-theme="light"] overrides for opt-in light mode.
   ========================================================================== */

:root {
  --bg: #0a0c0f;
  --bg-elevated: #12151b;
  --bg-card: #161a21;
  --bg-hover: #1c212a;
  --border: #262c36;
  --border-strong: #343c49;
  --text: #e7e9ec;
  --text-dim: #9aa4b2;
  --text-faint: #6b7684;
  --accent: #2dd4e8;
  --accent-strong: #67e8f9;
  --accent-text: #04262b;
  --danger: #f0555a;
  --warning: #f0a94e;
  --success: #4ade80;
  --conf-verified: #4ade80;
  --conf-high: #f0a94e;
  --conf-medium: #e8d24e;
  --conf-suspected: #8a94a3;
  --kremlin: #f0555a;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 10px;
  --radius-sm: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, monospace;
  --max-width: 1180px;
}

:root[data-theme="light"] {
  --bg: #f6f7f8;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #eef0f2;
  --border: #e1e4e9;
  --border-strong: #cbd0d8;
  --text: #14171c;
  --text-dim: #4b5563;
  --text-faint: #6b7280;
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-text: #ffffff;
  --danger: #dc2626;
  --warning: #c2740a;
  --success: #16a34a;
  --conf-verified: #16a34a;
  --conf-high: #c2740a;
  --conf-medium: #a16207;
  --conf-suspected: #64748b;
  --kremlin: #dc2626;
  --shadow: 0 4px 16px rgba(20, 23, 28, 0.08);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
:root[data-theme="light"] html,
html:has([data-theme="light"]) { color-scheme: light; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 8px 16px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { font-weight: 600; line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; color: var(--text-dim); }
.muted { color: var(--text-faint); font-size: 0.85rem; }
code, .mono { font-family: var(--font-mono); }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
}
.brand {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--accent); }
.nav-menu {
  display: flex;
  gap: 4px;
  margin-left: 12px;
  flex: 1;
  /* The tab row must never push the header actions (login, language, theme) off
     screen. It gives way first: it may shrink below its content width and then
     scrolls horizontally, with the scrollbar hidden. */
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-menu::-webkit-scrollbar { display: none; }
.nav-menu a {
  color: var(--text-dim);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--text); background: var(--bg-hover); text-decoration: none; }
.nav-menu a.active { color: var(--text); background: var(--bg-hover); }
.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; margin-left: auto; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
a.icon-btn:hover { text-decoration: none; }
.btn-login svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

.lang-select {
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  height: 36px;
}

/* Nine tabs plus the header actions need roughly 1100px. Below that the tabs
   collapse into the hamburger menu; the actions stay in the bar at every width. */
@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { white-space: normal; }
}
/* Phones: the bar has no room for a fifth control, so the login entry moves
   from the bar into the hamburger menu. */
.nav-menu .nav-login { display: none; }
@media (max-width: 600px) {
  .btn-login { display: none; }
  .nav-menu.open .nav-login {
    display: block;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    border-radius: 0;
  }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 24px 0 40px;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.support-link { white-space: nowrap; }
.support-icon { font-style: normal; }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.btn:hover { background: var(--bg-hover); }
.btn-ghost { background: transparent; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-strong); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

input[type="search"], input[type="text"], input[type="email"], input[type="url"],
input[type="number"], input[type="date"], select, textarea {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
}
textarea { width: 100%; resize: vertical; line-height: 1.5; }
input[type="search"]:focus, input[type="text"]:focus, input[type="email"]:focus,
input[type="url"]:focus, input[type="number"]:focus, input[type="date"]:focus,
select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
label { font-size: 0.75rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-role {
  background: var(--bg-hover);
  color: var(--text-dim);
  border-color: var(--border-strong);
  font-weight: 500;
  text-transform: capitalize;
}
.conf-verified { background: rgba(74, 222, 128, 0.12); color: var(--conf-verified); border-color: rgba(74, 222, 128, 0.35); }
.conf-high { background: rgba(240, 169, 78, 0.12); color: var(--conf-high); border-color: rgba(240, 169, 78, 0.35); }
.conf-medium { background: rgba(232, 210, 78, 0.12); color: var(--conf-medium); border-color: rgba(232, 210, 78, 0.35); }
.conf-suspected { background: rgba(138, 148, 163, 0.15); color: var(--conf-suspected); border-color: rgba(138, 148, 163, 0.35); }
.badge-kremlin { background: rgba(240, 85, 90, 0.12); color: var(--kremlin); border-color: rgba(240, 85, 90, 0.35); }

/* ---------- stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-tile .value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-mono); }
.stat-tile .label { font-size: 0.75rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; }

/* ---------- search / filters ---------- */
.search-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.search-panel input[type="search"] { width: 100%; margin-bottom: 12px; }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 0.75rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.filter-checks { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-checks label {
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: none;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
}
.filter-actions { flex-direction: row; gap: 8px; margin-left: auto; }

.results-meta { color: var(--text-faint); font-size: 0.85rem; margin: 8px 0 16px; }

/* ---------- profile grid / cards ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}
.profile-card:hover { border-color: var(--border-strong); }
.card-top { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1px solid var(--border-strong);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-faint);
}
.card-name { font-weight: 600; font-size: 1rem; color: var(--text); }
.card-name a { color: inherit; }
.card-name a:hover { color: var(--accent); }
/* Given names are lighter so the surname — which drives the sort order —
   stands out while the name still reads in natural order. */
.card-name .name-given { font-weight: 400; }
.flag-inline { margin-left: 5px; vertical-align: baseline; position: relative; top: 1px; border-radius: 2px; }
.card-aliases { font-size: 0.78rem; color: var(--text-faint); }
.card-bio { font-size: 0.85rem; color: var(--text-dim); flex: 1; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 150px; border-radius: var(--radius); }

.empty-state, .error-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}
.error-state { color: var(--danger); border-color: rgba(240, 85, 90, 0.35); }

.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0; }
.pagination button.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* ---------- profile page ---------- */
.back-link { display: inline-block; margin: 20px 0; font-size: 0.85rem; color: var(--text-dim); }
.profile-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1px solid var(--border-strong);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-faint);
  flex-shrink: 0;
}
.profile-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.fact-label { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; }
.fact-value { font-size: 0.9rem; color: var(--text); }

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.panel-wide { grid-column: 1 / -1; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
table.data-table th, table.data-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
table.data-table th { color: var(--text-faint); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }

.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text);
}

.narrative-item, .source-item, .activity-item {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.narrative-item:last-child, .source-item:last-child, .activity-item:last-child { border-bottom: none; }
.item-title { font-weight: 600; font-size: 0.92rem; }
.item-meta { font-size: 0.75rem; color: var(--text-faint); margin: 2px 0 6px; }
.item-quote {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.connections-list { display: flex; flex-direction: column; gap: 8px; }
.connection-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ---------- network page ---------- */
.network-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.network-canvas {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 85vh;
  min-height: 420px;
  position: relative;
  overflow: hidden;
}
.network-canvas svg { width: 100%; height: 100%; cursor: grab; }
.network-canvas svg:active { cursor: grabbing; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-dim); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.network-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.network-panel.hidden { display: none; }
.network-panel h3 { margin-bottom: 4px; }
.network-panel .close-panel { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 1rem; }
.node-label { font-size: 10px; fill: var(--text-dim); pointer-events: none; }
.node-tooltip { font-size: 0.75rem; }
.network-select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.85rem;
}
.network-focusbar {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: calc(100% - 320px);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
}
.network-focusbar.hidden { display: none; }
#network-focus-label { font-weight: 600; }
.network-filters {
  margin: 0 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
}
.network-filters summary { cursor: pointer; color: var(--text-dim); font-size: 0.9rem; }
.network-filters-body { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 12px; }
.network-filter-group { border: none; padding: 0; margin: 0; min-width: 180px; }
.network-filter-group legend {
  font-size: 0.8rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  padding: 0;
}
.filter-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.filter-checks label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 0.88rem; }
.network-hubs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 0.88rem; }
#network-hubs-list { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.network-hubs.hidden { display: none; }
.hub-chip {
  display: inline-block;
  padding: 4px 10px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}
.hub-chip:hover { border-color: var(--accent); color: var(--accent); }
.network-unconnected {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.network-unconnected.hidden { display: none; }
.network-unconnected summary { cursor: pointer; color: var(--text-dim); font-size: 0.9rem; }
.unconnected-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.unconnected-chip {
  display: inline-block;
  padding: 4px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
}

/* ---------- consent banner ---------- */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.consent-banner.hidden { display: none; }
.consent-banner p { margin: 0; font-size: 0.85rem; color: var(--text-dim); max-width: 640px; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- stats page ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0 28px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 0.85rem; }
.bar-row .bar-label { width: 130px; flex-shrink: 0; color: var(--text-dim); }
.bar-track { flex: 1; background: var(--bg-hover); border-radius: 4px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--accent); }
.conf-verified-fill { background: var(--conf-verified); }
.conf-high-fill { background: var(--conf-high); }
.conf-medium-fill { background: var(--conf-medium); }
.conf-suspected-fill { background: var(--conf-suspected); }
.bar-row .bar-count { width: 40px; text-align: right; color: var(--text-faint); font-family: var(--font-mono); font-size: 0.8rem; }

.ranked-list { list-style: none; margin: 0; padding: 0; }
.ranked-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.ranked-list li:last-child { border-bottom: none; }
.ranked-list .rank { color: var(--text-faint); font-family: var(--font-mono); margin-right: 8px; }
.ranked-list .count { color: var(--text-faint); font-family: var(--font-mono); }

@media (max-width: 640px) {
  h1 { font-size: 1.35rem; }
  .profile-header { padding: 16px; }
  .filter-actions { margin-left: 0; }
}

/* ---------- organizations page ---------- */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.org-card { cursor: pointer; }
.org-card:hover { border-color: var(--accent); }
.org-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.org-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.org-detail-overlay.hidden { display: none; }
.org-detail-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}
.org-detail-panel .close-panel {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 1.1rem;
}
.org-detail-panel .close-panel:hover { color: var(--text); }

/* ---------- award page ---------- */
.award-hero { position: relative; }
.award-trophy { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.award-year-label {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.award-timeline { display: flex; flex-direction: column; gap: 0; }
.award-timeline-entry {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.award-timeline-entry:last-child { border-bottom: none; }
.award-timeline-year {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  min-width: 56px;
  padding-top: 2px;
}
.award-timeline-card { flex: 1; }

/* Award badge on profile page */
.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(45, 212, 232, 0.10);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 232, 0.30);
}
:root[data-theme="light"] .award-badge {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.25);
}

/* ---------- nomination form ---------- */
.hidden { display: none; }

.nominate-window {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.field { margin-bottom: 22px; }
.field > label { display: block; margin-bottom: 6px; }
.field > input[type="text"],
.field > input[type="email"] { width: 100%; }

.field-help {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 6px;
  line-height: 1.45;
}

.field-state { font-size: 0.78rem; margin-top: 6px; }
.field-state:empty { margin-top: 0; }
.field-state-matched { color: var(--success); }
.field-state-new { color: var(--text-dim); }

/* Autocomplete suggestions sit in flow rather than absolutely positioned — the form is
   narrow and single-column, so there is nothing below worth overlapping. */
.autocomplete-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.autocomplete-results:empty { display: none; }
.autocomplete-item {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
}
.autocomplete-item:hover { background: var(--bg-hover); border-color: var(--border-strong); }

.evidence-row { display: flex; gap: 8px; margin-bottom: 8px; }
.evidence-row .evidence-input { flex: 1; min-width: 0; }
.evidence-remove { padding: 8px 12px; color: var(--text-faint); }

.form-error {
  color: var(--danger);
  border: 1px solid rgba(240, 85, 90, 0.35);
  background: rgba(240, 85, 90, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* Honeypot. Kept off-screen rather than display:none — some bots skip hidden inputs. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .skip-link { left: auto; right: -9999px; }
[dir="rtl"] .skip-link:focus { right: 0; }
[dir="rtl"] .nav-menu { margin-left: 0; margin-right: 12px; }
[dir="rtl"] .filter-actions { margin-left: 0; margin-right: auto; }
[dir="rtl"] .item-quote { border-left: none; border-right: 2px solid var(--accent); padding-left: 0; padding-right: 12px; }
[dir="rtl"] .legend-dot { margin-right: 0; margin-left: 5px; }
[dir="rtl"] .network-panel { right: auto; left: 16px; }
[dir="rtl"] .network-panel .close-panel { right: auto; left: 10px; }
[dir="rtl"] .network-focusbar { left: auto; right: 16px; }
[dir="rtl"] .bar-row .bar-count { text-align: left; }
[dir="rtl"] .ranked-list .rank { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .autocomplete-item { text-align: right; }
[dir="rtl"] .hp-field { left: auto; right: -9999px; }

@media (max-width: 640px) {
  [dir="rtl"] .filter-actions { margin-right: 0; }
}

/* ---------- Spectrum Page ---------- */
.spectrum-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-group {
  border: none;
  padding: 0;
  margin: 0;
}

.filter-group legend {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.filter-group input[type="checkbox"],
.filter-group input[type="date"],
.filter-group input[type="text"] {
  margin-right: 6px;
}

.spectrum-stats {
  text-align: center;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.spectrum-stats p {
  margin: 0;
}

.spectrum-stats strong {
  color: var(--accent-strong);
}

.spectrum-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
}

#spectrum-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.spectrum-point {
  transition: all 0.2s ease;
}

.spectrum-point:hover circle {
  filter: brightness(1.3);
}

.spectrum-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 40px 0;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.legend-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.legend-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.legend-axis {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.spectrum-quadrants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
}

.quadrant {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.quadrant h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

.quad-tl {
  border-left: 3px solid var(--accent);
  border-top: 3px solid var(--accent);
}

.quad-tr {
  border-right: 3px solid var(--accent);
  border-top: 3px solid var(--accent);
}

.quad-bl {
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
}

.quad-br {
  border-right: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .spectrum-legend {
    grid-template-columns: 1fr;
  }

  .spectrum-controls {
    gap: 16px;
  }

  .filter-group input[type="text"],
  .filter-group input[type="date"] {
    max-width: 200px;
  }
}

/* About page */
.about-page {
  line-height: 1.7;
}

.about-section {
  margin-bottom: 3em;
}

.about-section h2 {
  color: var(--text);
  margin-top: 1.5em;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5em;
}

.about-section h3 {
  color: var(--text);
  font-size: 1rem;
  margin-top: 1.2em;
  margin-bottom: 0.75em;
}

.about-section ul {
  margin: 0 0 1em 1.5em;
  padding: 0;
  list-style-position: outside;
}

.about-section li {
  margin-bottom: 0.75em;
  color: var(--text-dim);
}

.about-section strong {
  color: var(--text);
  font-weight: 600;
}

.about-section a {
  color: var(--accent);
}

.about-section a:hover {
  text-decoration: underline;
}

/* ---------- narratives (debunks) ---------- */
.verdict-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 20px;
  margin: 0 0 20px;
  font-size: 0.85rem;
}
.verdict-legend > div { display: flex; align-items: baseline; gap: 8px; }
.verdict-legend .badge { flex-shrink: 0; }
.badge.verdict-false { background: rgba(240, 85, 90, 0.12); color: var(--danger); border-color: rgba(240, 85, 90, 0.35); }
.badge.verdict-misleading { background: rgba(240, 169, 78, 0.12); color: var(--warning); border-color: rgba(240, 169, 78, 0.35); }
.badge.verdict-unsupported { background: rgba(232, 210, 78, 0.12); color: var(--conf-medium); border-color: rgba(232, 210, 78, 0.35); }
.badge.verdict-contested { background: rgba(138, 148, 163, 0.12); color: var(--conf-suspected); border-color: rgba(138, 148, 163, 0.4); }

.narrative-groups { display: flex; flex-direction: column; gap: 28px; }
.narrative-group-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.narrative-group-title .muted { font-family: var(--font-mono); font-weight: 400; margin-left: 6px; }
.narrative-card h3.card-name { margin: 0; font-size: 1rem; line-height: 1.3; }
.narrative-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  margin-top: auto;
}

/* narrative.php */
.narrative-main { max-width: 860px; }
.narrative-header { margin-bottom: 20px; }
.narrative-header .crumb { font-size: 0.8rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.narrative-header h1 { margin: 8px 0 10px; font-size: 1.55rem; }
.narrative-header .card-badges { align-items: center; }
.debunk-claim {
  border-left: 3px solid var(--kremlin);
  padding: 4px 0 4px 16px;
  color: var(--text-dim);
  font-size: 1rem;
}
.debunk-body p { color: var(--text); font-size: 0.97rem; line-height: 1.65; }
.debunk-body p:last-child { margin-bottom: 0; }
.source-list { margin: 0; padding-left: 22px; }
.source-list li { margin-bottom: 10px; font-size: 0.9rem; }
.source-list .source-note { display: block; color: var(--text-faint); font-size: 0.82rem; }
.pusher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.pusher-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.pusher-card .card-name { font-size: 0.95rem; }
.pusher-card .item-meta { margin: 4px 0 0; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.related-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.narrative-item .item-title a { color: inherit; }
.narrative-item .item-title a:hover { color: var(--accent); }
.narrative-item .item-title .badge { margin-left: 8px; vertical-align: middle; }
