/* atmina.lv — Politiskā atmiņa — Design System */

/* ── Custom scrollbars ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent-brand) 25%, transparent);
  border-radius: 4px;
  border: 1px solid transparent;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent-brand) 45%, transparent);
}
::-webkit-scrollbar-corner {
  background: var(--bg);
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent-brand) 25%, transparent) var(--bg);
}

/* ── Media-query lūzumpunktu skala ──
   Kanoniskā skala jaunam kodam: 600 / 768 / 900 (max-width).
   Vēsturiskie 480 / 560 / 640 / 700 paliek, kur tie apkalpo konkrētu
   komponenti; jaunām atsaucēm izmanto kanonisko skalu. Pieraksts:
   "max-width: XXXpx" (ar atstarpi). */
:root {
  color-scheme: dark;
  --bg: #0d1014;
  --surface: #161a22;
  --surface2: #242838;
  --text: #e2e4e9;
  --text-muted: #8b8fa3;
  --accent: #90A4AE;
  --accent-brand: #37474F;
  --accent-highlight: #B71C1C;
  --logo-ring: #90A4AE;
  --logo-dot: #EF5350;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #e25b5b;
  --orange: #f97316;
  --border: #2d3148;
  --radius: 8px;
  --transition: 0.2s ease;

  /* Text + surface tiers */
  --border-soft: #1f2432;
  --text-soft: #c8ccd8;
  --text-dim: #5e6478;
  --surface-deep: #131721;
  --surface-lift: rgba(255,255,255,0.02);
  --surface-hover: #1d2230;
  --border-strong: #454c66;

  /* Status + brand hues */
  --red-bright: #ef4444;
  --red-soft: #f87171;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --purple-pill: #a855f7;
  --gold-weekly: #e9a820;
  --accent-brand-hover: #455A64;
  --accent-highlight-hover: #d32f2f;

  /* Statistika domain accents */
  --domain-economy: #90A4AE;
  --domain-social: #B388C7;
  --domain-prices: var(--orange);
  --domain-state: var(--green);

  /* Elevation + overlays */
  --shadow-overlay: rgba(0,0,0,0.4);
  --shadow-overlay-strong: rgba(0,0,0,0.45);
  --shadow-card-hover: rgba(0, 0, 0, 0.55);
  --shadow-scroll-fade: rgba(0, 0, 0, 0.6);
  --hover-glow: rgba(255,255,255,0.15);
  --overlay-hover: rgba(255,255,255,0.04);
  --media-backdrop: #0f1218;
  --hover-brighten: brightness(1.2);
  --hover-brighten-soft: brightness(1.1);

  /* Charts + D3 graph */
  --chart-grid: rgba(255,255,255,0.03);
  --chart-axis: rgba(255,255,255,0.05);
  --tooltip-bg: rgba(22,26,34,0.95);
  --tooltip-border: rgba(255,255,255,0.1);
  --graph-legend-bg: rgba(15,15,26,0.85);
  --graph-label: rgba(255,255,255,0.6);
  --graph-node-stroke: rgba(255,255,255,0.15);
  --graph-node-stroke-hover: #ffffff;
  --graph-link-default: rgba(255,255,255,0.08);
  --stat-hero-grad-start: #ffffff;
  --stat-hero-grad-end: #a0a5b8;

  /* Theme switch (skeuomorphic) */
  --switch-plate: #1b202b;
  --switch-outline: #e8e2d2;
  --switch-lever: #f4efe4;
  --switch-lever-detail: #0d1014;
  --switch-screw: #242838;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3e8;
  --surface: #f4efe4;
  --surface2: #e9e1cc;
  --text: #1f1b14;
  --text-muted: #5d5747;
  --accent: #2c4270;
  --accent-brand: #1f2d4d;
  --accent-highlight: #B71C1C;
  --logo-ring: #1f2d4d;
  --logo-dot: #B71C1C;
  --green: #1a7a3a;
  --yellow: #8a6500;
  --red: #b42318;
  --orange: #b8400c;
  --border: #d3c9af;

  --border-soft: #e5dccb;
  --text-soft: #3b3526;
  --text-dim: #6e654f;
  --surface-deep: #f1ebdb;
  --surface-lift: rgba(31,27,20,0.03);
  --surface-hover: #ede5d2;
  --border-strong: #948659;

  --red-bright: #b42318;
  --red-soft: #b42318;
  --blue: #1d4ed8;
  --purple: #6d28d9;
  --purple-pill: #7e22ce;
  --gold-weekly: #8a6500;
  --accent-brand-hover: #16213a;
  --accent-highlight-hover: #911616;

  --domain-economy: #46656f;
  --domain-social: #7d4d96;

  --shadow-overlay: rgba(63,54,38,0.18);
  --shadow-overlay-strong: rgba(63,54,38,0.22);
  --shadow-card-hover: rgba(63,54,38,0.25);
  --shadow-scroll-fade: rgba(63,54,38,0.28);
  --hover-glow: rgba(31,27,20,0.12);
  --overlay-hover: rgba(31,27,20,0.05);
  --media-backdrop: #efe8d6;
  --hover-brighten: brightness(0.93);
  --hover-brighten-soft: brightness(0.96);

  --chart-grid: rgba(31,27,20,0.06);
  --chart-axis: rgba(31,27,20,0.10);
  --tooltip-bg: rgba(244,239,228,0.97);
  --tooltip-border: rgba(31,27,20,0.15);
  --graph-legend-bg: rgba(244,239,228,0.9);
  --graph-label: rgba(31,27,20,0.65);
  --graph-node-stroke: rgba(31,27,20,0.2);
  --graph-node-stroke-hover: #1f1b14;
  --graph-link-default: rgba(31,27,20,0.1);
  --stat-hero-grad-start: #1f1b14;
  --stat-hero-grad-end: #5d5747;

  --switch-plate: #efe8d6;
  --switch-outline: #1f1b14;
  --switch-lever: #1f1b14;
  --switch-lever-detail: #f4efe4;
  --switch-screw: #e6dec8;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-highlight); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; }
h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.75rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

/* Pieejamība: vizuāli slēpts saturs, ko ekrānlasītāji joprojām nolasa. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* "Pāriet uz saturu" — slēpts, līdz saņem fokusu ar tastatūru. */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 0.5rem;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Tastatūras fokusa aploce nolaižamo filtru daļām (:focus-visible —
   peles klikšķus neietekmē). Pāris ms-a11y.js tastatūras navigācijai. */
.multi-select-trigger:focus-visible,
.multi-select-option:focus-visible,
.multi-select-clear:focus-visible,
.xv1-select-trigger:focus-visible,
.xv1-select-option:focus-visible,
.xv1-select-clear:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 3rem 0; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2rem; }
.section-header h2,
.section-header h1 {
  margin-bottom: 0.25rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.section-header .count { color: var(--text-muted); font-size: 0.95rem; }
.section-header-link { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.section-header-link:hover { color: var(--accent); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 16, 20, 0.92);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.nav .container { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--accent); }
.nav-logo-icon {
  height: 28px;
  width: auto;
  transition: opacity 0.2s ease;
}
.nav-logo:hover .nav-logo-icon {
  opacity: 0.8;
}
.nav-links { display: flex; gap: 0; flex-wrap: wrap; align-items: stretch; }
.nav-links a {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); border-bottom-color: var(--accent-highlight); }

/* Nav search (sgv1) — kompaktais meklētājs pa labi no saitēm, pa kreisi no
   tēmas slēdža. Augstums fiksēts, lai nav josla paliktu 57px (sk. nav-theme). */
.nav-search {
  position: relative;
  display: flex; align-items: center; gap: 0.4rem;
  flex: 0 0 auto; width: 178px; height: 30px; margin-block: -1px;
  padding: 0 0.7rem; box-sizing: border-box;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--border); border-radius: 999px;
  transition: border-color var(--transition), background var(--transition);
}
.nav-search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
}
.nav-search-icon { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.nav-search-input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: none; outline: none; color: var(--text);
  font-size: 0.8rem; padding: 0;
}
.nav-search-input::placeholder { color: var(--text-muted); }
/* Ieteikumu panelis nostiprināts zem nav ievades, labajā malā, lai neizplūstu
   pāri skata loga labajai malai; z-index virs satura (nav = z-100 kontekstā). */
.nav-search .sgv1-drop { left: auto; right: 0; width: min(360px, 88vw); z-index: 120; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--accent-highlight); }

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.stat-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--accent-highlight); color: #fff; border-color: var(--accent-highlight); }

/* Multi-select Dropdown */
.multi-select {
  position: relative;
  display: inline-block;
  min-width: 220px;
}
.multi-select-trigger {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: inherit;
  transition: all var(--transition);
  user-select: none;
}
.multi-select-trigger:hover { border-color: var(--accent); color: var(--text); }
.multi-select-trigger.has-selection { color: var(--text); border-color: var(--accent); background: rgba(59,130,246,0.08); }
.multi-select-trigger .arrow { font-size: 0.65rem; transition: transform var(--transition); }
.multi-select.open .arrow { transform: rotate(180deg); }
.multi-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px var(--shadow-overlay);
  z-index: 50;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.35rem;
}
.multi-select.open .multi-select-dropdown { display: block; }
.multi-select-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.multi-select-option:hover { background: var(--surface2); color: var(--text); }
.multi-select-option.selected { color: var(--text); }
.multi-select-option .checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.multi-select-option.selected .checkbox {
  background: var(--accent);
  border-color: var(--accent);
}
.multi-select-option.selected .checkbox::after {
  content: "✓";
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
.multi-select-clear {
  display: block;
  text-align: center;
  padding: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}
.multi-select-clear:hover { color: var(--accent); }
.multi-select-search {
  width: 100%;
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.multi-select-search:focus { border-color: var(--accent); }
.multi-select-search::placeholder { color: var(--text-muted); }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface);
}
.data-table tr:hover td { background: var(--surface); }
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(0,0,0,0)),
    linear-gradient(to right, rgba(0,0,0,0), var(--surface) 70%) 0 100%,
    radial-gradient(farthest-side at 0 50%, rgba(59,130,246,0.25), rgba(0,0,0,0)),
    radial-gradient(farthest-side at 100% 50%, rgba(59,130,246,0.25), rgba(0,0,0,0)) 0 100%;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
  scrollbar-width: thin;
}
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Badge */
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}
.badge-red { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge-orange { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-yellow { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }
.badge-green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent); }
.badge-muted { background: var(--surface2); color: var(--text-muted); }

/* Pretrunas V2 — FT/Bloomberg dense editorial split-screen.
   Party bar on top (4px), 3-cell header band, summary, Iepriekš/Pašlaik panes
   separated by 1px gutter with severity disc, footer with anchor ID + share row.
   Mobile collapse at ≤768px (see @media block at the end). */
.prv2-explainer {
  padding: 0.75rem 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}
.prv2-explainer em { font-style: italic; }

.prv2-card {
  --prv2-serif: Georgia, 'Times New Roman', serif;
  --prv2-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ed-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --prv2-border-soft: var(--border-soft);
  --prv2-sev: var(--yellow);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--prv2-border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease;
}
.prv2-card:hover { border-color: var(--border); }
.prv2-card.sev-direct_contradiction { --prv2-sev: #dc2626; }
.prv2-card.sev-reversal             { --prv2-sev: var(--orange); }
.prv2-card.sev-minor_shift          { --prv2-sev: var(--yellow); }

.prv2-partybar {
  height: 4px;
  width: 100%;
  background: var(--prv2-border-soft);
}

.prv2-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 18px 28px;
  min-height: 76px;
  background: var(--surface2);
  border-bottom: 1px solid var(--prv2-border-soft);
}

.prv2-persona { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.prv2-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--pc, var(--prv2-border-soft));
  color: var(--text);
  font-family: var(--ed-sans);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
}
img.prv2-avatar.prv2-avatar-photo {
  object-fit: cover;
  border-width: 2px;
  background: var(--surface2);
}
.prv2-persona-text { min-width: 0; }
.prv2-name {
  font-family: var(--ed-sans);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prv2-name:hover { color: var(--accent); }
.prv2-role {
  margin-top: 0.15rem;
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prv2-meta-mid { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }
.prv2-sevbadge {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid var(--prv2-sev);
  color: var(--prv2-sev);
  white-space: nowrap;
}
.prv2-topic {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px;
  border: 1px solid var(--prv2-border-soft);
  border-radius: 3px;
  white-space: nowrap;
}

.prv2-meta-right { display: flex; align-items: center; }
.prv2-datacell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  border-left: 1px solid var(--prv2-border-soft);
  padding-left: 0.85rem;
  line-height: 1.1;
}
.prv2-datacell-l {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.prv2-datacell-v {
  font-family: var(--ed-sans);
  font-size: 16px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.prv2-summary {
  padding: 16px 28px 4px;
}
.prv2-summary p {
  margin-top: 0.35rem;
  font-family: var(--prv2-serif);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-soft);
  white-space: pre-line;
}

.prv2-context {
  margin: 10px 28px 4px;
  padding: 10px 14px;
  border-left: 3px solid var(--border-soft);
  background: var(--surface-lift);
  font-family: var(--ed-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}
.prv2-context-kicker {
  display: block;
  font-family: var(--ed-sans);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: 4px;
}

.prv2-kicker {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.prv2-kicker-sev { color: var(--prv2-sev); }

.prv2-split {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  padding: 20px 0;
}
.prv2-pane {
  padding: 4px 28px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.prv2-pane-new {
  background: color-mix(in srgb, var(--prv2-sev) 3%, transparent);
}
.prv2-pane-meta {
  font-family: var(--ed-sans);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.prv2-pane-meta time { font-variant-numeric: tabular-nums; }
.prv2-pane-meta a { color: var(--text-muted); }
.prv2-pane-meta a:hover { color: var(--text); }

.prv2-stance {
  font-family: var(--prv2-serif);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-soft);
  white-space: pre-line;
}

.prv2-quote {
  font-family: var(--prv2-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  padding: 0.4rem 0 0.4rem 0.85rem;
  border-left: 2px solid var(--prv2-sev);
  margin: 0;
}
.prv2-quote-fallback {
  font-family: var(--ed-sans);
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  padding-left: 0.85rem;
  border-left: 2px dashed var(--prv2-border-soft);
}

/* Landing "Jaunākās pretrunas" cards — citātu duelis priekšplānā.
   Scoped to .prv2-landing so pretrunas/pretruna-detail/politician pages,
   which share the .prv2-* classes, keep their existing sizing. */
.prv2-landing .prv2-avatar {
  width: 56px;
  height: 56px;
}
.prv2-summary p.contra-summary-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-muted);
}
.prv2-landing .prv2-quote {
  font-size: 16px;
}

.prv2-gutter {
  position: relative;
  background: var(--prv2-border-soft);
}
.prv2-gutter-disc {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--prv2-sev);
  color: var(--prv2-sev);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ed-sans);
  font-size: 13px;
}

.prv2-vote {
  margin-top: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: rgba(127, 127, 127, 0.05);
  border-left: 2px solid var(--prv2-border-soft);
  font-family: var(--ed-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.prv2-vote-kicker {
  display: block;
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--prv2-sev);
  margin-bottom: 0.25rem;
}

.prv2-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 14px 28px;
  background: var(--surface2);
  border-top: 1px solid var(--prv2-border-soft);
}
.prv2-foot-meta {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.prv2-foot-id {
  color: var(--text-muted);
  border-bottom: 1px dotted currentColor;
}
.prv2-foot-id:hover { color: var(--text); }

.prv2-share-x {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--prv2-border-soft);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.prv2-share-x:hover {
  color: var(--text);
  border-color: var(--border);
}

.prv2-card-pulse {
  box-shadow: 0 0 0 3px var(--prv2-sev);
  transition: box-shadow 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .prv2-card-pulse {
    outline: 2px solid var(--prv2-sev);
    box-shadow: none;
    transition: none;
  }
}

.prv2-detail-back {
  margin-bottom: 16px;
}
.prv2-detail-back a {
  font-family: var(--ed-sans);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.prv2-detail-back a:hover { color: var(--text); }

.prv2-detail-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.prv2-detail-related {
  margin-top: 48px;
}
.prv2-detail-related h2 {
  font-family: var(--ed-sans);
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 500;
}
.prv2-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.prv2-related-card {
  --prv2-sev: var(--yellow);
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--prv2-border-soft);
  border-left: 3px solid var(--prv2-sev);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease;
}
.prv2-related-card:hover { border-color: var(--border); }
.prv2-related-card.sev-direct_contradiction { --prv2-sev: #dc2626; }
.prv2-related-card.sev-reversal             { --prv2-sev: var(--orange); }
.prv2-related-card.sev-minor_shift          { --prv2-sev: var(--yellow); }

.prv2-related-glyph {
  font-family: var(--ed-sans);
  font-size: 22px;
  color: var(--prv2-sev);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.prv2-related-body { min-width: 0; }
.prv2-related-sev {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--prv2-sev);
  margin-bottom: 2px;
}
.prv2-related-topic {
  font-family: var(--ed-sans);
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}
.prv2-related-summary {
  font-family: var(--prv2-serif);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .prv2-explainer { font-size: 13px; padding: 0.6rem 0; }

  .prv2-head {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 14px 18px;
    min-height: 0;
  }
  .prv2-meta-mid { order: 2; flex-wrap: wrap; }
  .prv2-meta-right { order: 3; align-self: flex-start; }
  .prv2-meta-right .prv2-datacell {
    border-left: 0;
    padding-left: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 0.4rem;
  }

  .prv2-summary { padding: 14px 18px 2px; }
  .prv2-context { margin: 8px 18px 2px; padding: 8px 12px; font-size: 12px; }

  .prv2-split {
    display: block;
    padding: 16px 0;
  }
  .prv2-pane { padding: 14px 18px; }

  .prv2-gutter {
    height: 1px;
    width: 100%;
    background: var(--prv2-border-soft);
    margin: 6px 0;
  }
  .prv2-gutter-disc {
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
  }

  .prv2-foot {
    padding: 12px 18px;
    flex-wrap: wrap;
  }
  .prv2-foot-meta { font-size: 10px; }
  .prv2-share-x { font-size: 10px; padding: 5px 10px; }

  .prv2-detail-wrap { max-width: 100%; }
  .prv2-related-grid { grid-template-columns: 1fr; }
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  position: relative;
}
.hero-inner {
  max-width: 600px;
  margin: 0 auto;
}
.hero-logo {
  height: 64px;
  width: auto;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
  color: var(--text);
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}
.hero-stats {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}
.hero-countdown {
  margin: 1rem 0 0.25rem;
}
.hero-countdown .countdown-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero-countdown .countdown-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-stats-inline {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.hero-stats-inline a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.hero-stats-inline a:hover { color: var(--accent); }
.hero-stats-inline .stat-num {
  font-weight: 600;
  color: var(--text);
}
.hero-stats-inline .sep {
  opacity: 0.4;
}
.hero-activity {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Daily Brief Card */
.brief-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.brief-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.brief-card-title {
  font-weight: 600;
  font-size: 0.9rem;
}
.brief-card-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.brief-card-preview {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.brief-card-link {
  font-size: 0.82rem;
  color: var(--accent);
}
.brief-card-link:hover { text-decoration: underline; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 2rem;
  align-items: start;
  width: 100%;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-grid > div:last-child { text-align: center; }
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }
.footer-x-link,
.footer-fb-link,
.footer-gh-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.footer-x-link:hover,
.footer-fb-link:hover,
.footer-gh-link:hover { opacity: 1; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.footer-logo-icon {
  height: 20px;
  width: auto;
  opacity: 0.5;
}
.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 1.25rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Tendences → Konteksts cards */
.ctx-grid { align-items: start; }          /* variable-height cards size to content, no stretch gaps */
.ctx-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.ctx-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}
.ctx-date { font-size: 0.78rem; color: var(--text-muted); }
.ctx-body { font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; }
.ctx-body > :first-child { margin-top: 0; }
.ctx-body > :last-child { margin-bottom: 0; }
.ctx-body p { margin: 0 0 0.6rem; }
.ctx-body strong { color: var(--text); }

/* Vote card */
.vote-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  /* Browser skips layout/paint for off-screen cards — initial-paint win
     on balsojumi.html where each card carries a fat <details> deputy table.
     contain-intrinsic-size reserves approximate row height so the
     scrollbar doesn't jump as cards hydrate. */
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.vote-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--red);
  transition: background 0.2s ease;
}
.vote-card[data-result="Pieņemts"]::before { background: var(--green); }
.vote-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -14px var(--shadow-card-hover);
}
.vote-card .vote-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.vote-card .vote-motif {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
  flex: 1;
  letter-spacing: -0.005em;
}
.vote-card .vote-meta {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.vote-card .vote-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.85rem 0; }

.votes-empty-state {
  display: none;
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
  font-size: 0.9rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.votes-empty-state .empty-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}
.votes-empty-state p { margin: 0; }
.vote-card .tracked-votes { margin-top: 0.75rem; }
.vote-card .tracked-votes table { width: 100%; }
.vote-card .tracked-votes td { padding: 0.35rem 0.5rem; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.vote-card details { margin-top: 0.75rem; }
.vote-card summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.25rem 0;
}
.vote-card summary:hover { color: var(--accent); }

/* Balsojuma kartītes cilpā atkārtotie elementi — agrāk inline, tagad klases
   (design-system parāds 3A). Aprēķinātie stili identiski iepriekšējiem inline. */
.vote-desc {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.vote-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}
/* Specifiskāks par `.vote-card details` (0.75rem), lai saglabātu 0.5rem. */
.vote-card details.vote-tracked { margin-top: 0.5rem; }
/* Ietinējs dod mobilo horizontālo ritināšanu (audits F9); tabula paliek
   width:100% uz darbvirsmas, tāpēc izkārtojums nemainās. */
.vote-tracked-scroll { overflow-x: auto; }
.vote-tracked-table { margin-top: 0.5rem; width: 100%; }
.vote-tracked-table td { padding: 0.2rem 0.5rem; }
.vote-tracked-faction { color: var(--text-muted); font-size: 0.85rem; }

/* Faction breakdown strip — compact always-visible per-party vote summary
   displayed between the vote badges and the bill summary. Shows coalition
   factions first, then opposition. Split factions (< 80% discipline) get a
   yellow inset shadow so dalīti balsojumi stand out. */
.faction-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
}
.faction-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
}
.faction-chip strong {
  color: var(--text);
  font-weight: 600;
  font-size: 0.78rem;
}
.faction-chip.is-coalition { border-left: 2px solid var(--accent); }
.faction-chip.is-opposition { border-left: 2px solid var(--accent-highlight); }
.faction-chip.is-split { box-shadow: inset 0 -2px 0 var(--yellow); }
.faction-chip .chip-par { color: var(--green); }
.faction-chip .chip-pret { color: var(--red); }
.faction-chip .chip-atturas { color: var(--yellow); }
.faction-chip .chip-nebalso { color: var(--text-muted); }

/* Politiķa profila cilpā atkārtotie inline stili → klases (design-system parāds
   3A). Scopēti zem vecāka klases, lai pārspētu `.card` (identisks aprēķins). */
.related-syntheses .synthesis-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
  align-items: center;
}
.related-syntheses .synthesis-card-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.related-syntheses .synthesis-card-text { min-width: 0; }
.related-syntheses .synthesis-card-title { font-weight: 600; line-height: 1.3; }
.related-syntheses .synthesis-card-desc { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }

/* X ierakstu + Ziņu plūsmas kartītes profila Pozīciju cilnē. */
.profile-tab .profile-feed-card { margin-bottom: 0.5rem; }
.profile-feed-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.profile-feed-body { font-size: 0.9rem; }
.profile-feed-body-x { white-space: pre-wrap; }
.profile-feed-link { font-size: 0.8rem; }

/* News card */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
  /* Skip layout/paint for off-screen news cards — paint win on zinas.html
     long feed. */
  content-visibility: auto;
  contain-intrinsic-size: auto 120px;
}
.news-card:hover { border-color: var(--accent); }
.news-card .news-title { color: var(--text); text-decoration: none; }
.news-card .news-title:hover { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.news-card .news-title .ext-arrow { opacity: 0.55; margin-left: 0.25rem; font-size: 0.82em; }
.news-card .news-title:hover .ext-arrow { opacity: 1; }
.news-card .news-source-link { color: var(--text-muted); text-decoration: none; border-bottom: 1px dotted var(--text-muted); transition: color 0.15s, border-color 0.15s; }
.news-card .news-source-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ── X / Twitter feed ── */
.x-feed { display: flex; flex-direction: column; gap: 0; }
.x-card {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.x-card:hover { background: var(--surface2); }
.x-card:first-child { border-top: 1px solid var(--border); }
.x-card-body { display: flex; gap: 0.75rem; }
.x-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
  text-transform: uppercase;
}
.card-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.card-avatar-placeholder {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
  text-transform: uppercase;
  border: 1.5px solid var(--border);
}
/* Politician card internal structure — bāzes definīcijas apvienotas ar
   "Card redesign" bloku zemāk (nav dublikātu). */
.activity-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  color: var(--text-muted);
  text-decoration: none;
}
a.activity-label:hover { color: var(--accent); }
.activity-source {
  color: var(--text-muted);
  flex-shrink: 0;
  text-decoration: none;
  font-size: 0.7rem;
  opacity: 0.6;
  transition: opacity var(--transition), color var(--transition);
}
.activity-source:hover { opacity: 1; color: var(--accent); }

.x-avatar-mention { background: var(--surface2); color: var(--accent); border: 1px solid var(--border); font-size: 0.85rem; }
.x-content { flex: 1; min-width: 0; }
.x-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.25rem; }
.x-name { font-weight: 700; font-size: 0.9rem; color: var(--text); text-decoration: none; }
.x-name:hover { text-decoration: underline; }
.x-party { color: var(--text-muted); font-size: 0.8rem; }
.x-dot { color: var(--text-muted); font-size: 0.8rem; }
.x-date { color: var(--text-muted); font-size: 0.8rem; }
.x-text { font-size: 0.92rem; line-height: 1.55; color: var(--text); word-break: break-word; }
.x-actions { display: flex; gap: 1.25rem; margin-top: 0.5rem; }
.x-action { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.x-action:hover { color: var(--accent); }
.x-rt { background: var(--surface); }
.x-rt-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.35rem; padding-left: 3.25rem; }
.x-mention .x-mention-label { font-size: 0.75rem; color: var(--accent); font-weight: 500; margin-right: 0.2rem; }

/* ── Daily brief cards ── */
.daily-feed { display: flex; flex-direction: column; gap: 0; }
.daily-card {
  --daily-mono: 'JetBrains Mono', ui-monospace, monospace;
  --daily-serif: Georgia, 'Times New Roman', serif;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background 0.12s;
}
.daily-card:first-child { border-top: 1px solid var(--border); }
.daily-card:hover { background: var(--surface2); }
.daily-date-block {
  flex-shrink: 0; width: 86px;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.2rem;
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}
.daily-date-day {
  font-family: var(--daily-serif);
  font-size: 2.4rem; font-weight: 500; line-height: 0.9;
  color: var(--text);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.daily-date-month {
  font-family: var(--daily-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.daily-type {
  font-family: var(--daily-mono);
  font-size: 0.58rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-muted);
  margin-top: 0.25rem; padding: 0; background: none; border: 0;
}
.daily-type-week { color: var(--gold-weekly); }
.daily-body { flex: 1; min-width: 0; }
.daily-title {
  font-family: var(--daily-serif);
  margin: 0 0 0.4rem; font-size: 1.25rem; font-weight: 500;
  color: var(--text); line-height: 1.25;
  letter-spacing: -0.3px;
}
.daily-preview {
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.55;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.daily-arrow {
  flex-shrink: 0; font-size: 1.2rem; color: var(--text-muted);
  opacity: 0; transition: opacity 0.15s, transform 0.15s;
}
.daily-card:hover .daily-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Chart containers */
/* Grid children must be allowed to shrink below their content's min-content
   size: Chart.js writes explicit width/height attrs on the canvas, and those
   become the 1fr track's min-content, pushing the whole PAGE into horizontal
   scroll on narrow viewports (minmax(auto, 1fr) trap). */
.grid-2 > *, .grid-3 > * { min-width: 0; }
.chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.chart-container h3 {
  margin-bottom: 1rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.chart-container canvas { max-height: 400px; max-width: 100%; }

/* Analysis card (legacy, kept for backwards-compat) */
.analysis-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.analysis-card:hover { border-color: var(--accent); }
.analysis-card .date { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.analysis-card h3 {
  margin-bottom: 0.5rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.analysis-card .description { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.analysis-card .tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ====================================================================
   Analysis feat — editorial featured card for thematic analyses.
   Single-card solo layout (horizontal, image-left) when .is-solo;
   otherwise stacks in a responsive grid with vertical cards.
   ==================================================================== */
.analysis-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.analysis-feed.is-solo { grid-template-columns: 1fr; }
.analysis-feed.is-duo { grid-template-columns: repeat(2, 1fr); }

.analysis-feat {
  --af-mono:  'JetBrains Mono', ui-monospace, monospace;
  --af-serif: Georgia, 'Times New Roman', serif;
  --af-muted: var(--text-muted);
  --af-border: var(--border-soft);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--af-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.analysis-feat:hover {
  border-color: var(--accent-highlight);
  transform: translateY(-2px);
}
.analysis-feat-media {
  width: 100%;
  overflow: hidden;
  background: var(--media-backdrop);
  display: block;
}
.analysis-feat-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.analysis-feat:hover .analysis-feat-media img { transform: scale(1.02); }

.analysis-feat-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.analysis-feat-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--af-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--af-muted);
}
.analysis-feat-kicker {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
.analysis-feat-kicker:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.analysis-feat-sep { opacity: 0.5; }
.analysis-feat-date { font-variant-numeric: tabular-nums; }

.analysis-feat-title {
  font-family: var(--af-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.3px;
  line-height: 1.25;
  margin: 0;
  color: var(--text);
}
.analysis-feat-title a {
  color: inherit;
  text-decoration: none;
}
.analysis-feat-title a:hover {
  color: var(--accent-highlight);
}
.analysis-feat-desc {
  color: var(--af-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.analysis-feat-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.25rem;
}
.analysis-feat-tag {
  font-family: var(--af-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--af-muted);
  padding: 3px 8px;
  border: 1px solid var(--af-border);
  border-radius: 3px;
}
.analysis-feat-cta {
  font-family: var(--af-mono);
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.5rem;
  text-decoration: none;
  align-self: flex-start;
}
.analysis-feat-cta:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Solo layout: image left, content right, larger title */
.analysis-feed.is-solo .analysis-feat.has-image {
  flex-direction: row;
  align-items: stretch;
}
.analysis-feed.is-solo .analysis-feat.has-image .analysis-feat-media {
  flex: 0 0 48%;
  max-width: 48%;
}
.analysis-feed.is-solo .analysis-feat.has-image .analysis-feat-media img {
  height: 100%;
  aspect-ratio: auto;
  min-height: 320px;
}
.analysis-feed.is-solo .analysis-feat-body {
  padding: 2rem 2.25rem;
  justify-content: center;
  gap: 0.9rem;
}
.analysis-feed.is-solo .analysis-feat-title {
  font-size: 32px;
  letter-spacing: -0.5px;
  line-height: 1.18;
}
.analysis-feed.is-solo .analysis-feat-desc { font-size: 1rem; }

@media (max-width: 900px) {
  .analysis-feed { grid-template-columns: repeat(2, 1fr); }
  .analysis-feed.is-solo .analysis-feat.has-image {
    flex-direction: column;
  }
  .analysis-feed.is-solo .analysis-feat.has-image .analysis-feat-media {
    flex: none;
    max-width: 100%;
  }
  .analysis-feed.is-solo .analysis-feat.has-image .analysis-feat-media img {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
  .analysis-feed.is-solo .analysis-feat-body { padding: 1.5rem; }
  .analysis-feed.is-solo .analysis-feat-title { font-size: 26px; }
}
@media (max-width: 600px) {
  .analysis-feed,
  .analysis-feed.is-duo { grid-template-columns: 1fr; }
}

/* Blog post */
.blog-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color var(--transition);
}
.blog-entry:hover { border-color: var(--accent); }
.blog-entry .meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.5rem; }
.blog-entry .meta .date { color: var(--text-muted); font-size: 0.85rem; }
.blog-entry h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.blog-entry .preview { color: var(--text-muted); font-size: 0.9rem; }

/* Blog post content.
   Body headings (h2/h3) stay in the default sans-serif system stack
   on purpose — the editorial pagehead carries the serif title at the
   top, and sans-serif body subheads keep long-form articles readable
   without visual collision. Do NOT add a Georgia override here. */
.post-content { line-height: 1.8; }
.post-content h1, .post-content h2, .post-content h3 { margin: 1.5rem 0 0.75rem; }
.post-content p { margin-bottom: 1rem; }
.post-content ul, .post-content ol { margin: 0.5rem 0 1rem 1.5rem; }
.post-content li { margin-bottom: 0.25rem; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.post-content th, .post-content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.post-content th { background: var(--surface2); font-weight: 600; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
}
.post-content code {
  background: var(--surface2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}
.post-content pre { background: var(--surface2); padding: 1rem; border-radius: var(--radius); overflow-x: auto; margin: 1rem 0; }
.post-content pre code { background: none; padding: 0; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.post-content strong { color: var(--text); }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--accent); }

/* Politician profile card */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}
.profile-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--party-color, var(--accent));
}
.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.profile-avatar-placeholder {
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}
.profile-identity {
  flex: 1;
  min-width: 0;
}
.profile-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.profile-name-row h1 {
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.3;
}
.profile-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.profile-link-icon {
  width: 16px;
  height: 16px;
  fill: var(--text-muted);
  transition: fill var(--transition);
}
.profile-links a:hover .profile-link-icon {
  fill: var(--accent);
}
.profile-link-icon-wrap {
  display: inline-flex;
  align-items: center;
}
.party-header-split {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.party-header-split .profile-identity {
  flex: 0 1 auto;
  min-width: 0;
}
.party-last-activity {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 0;
  min-width: 200px;
  padding-left: 1.5rem;
  border-left: 1px solid var(--surface2);
}
@media (max-width: 768px) {
  .party-header-split {
    flex-direction: column;
    gap: 0.75rem;
  }
  .party-last-activity {
    max-width: 100%;
    min-width: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 0.6rem;
    border-top: 1px solid var(--surface2);
  }
}
.party-activity-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  opacity: 0.6;
}
.party-activity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  min-width: 0;
}
.party-activity-item:hover {
  color: var(--accent);
}
.party-activity-item:hover svg {
  fill: var(--accent);
}
.party-activity-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.party-activity-date {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}
.profile-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.1rem;
  flex-wrap: wrap;
}
.profile-role {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.profile-party-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}
a.profile-party-tag:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Role chip — color-coded by profile_kind. Replaces the old plain
   .profile-role span in the politician profile header. Each kind gets
   a distinct hue so a journalist/analyst/organization profile reads
   differently from an active deputy at a glance. */
.role-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.2px;
}
.role-chip-deputy       { background: #2563eb; }
.role-chip-minister     { background: #16a34a; }
.role-chip-mep          { background: #7c3aed; }
.role-chip-regional     { background: #ca8a04; }
.role-chip-politician   { background: #64748b; }
.role-chip-journalist   { background: #475569; }
.role-chip-analyst      { background: #059669; }
.role-chip-organization { background: #be185d; }
.role-chip-former       { background: #f97316; }
.role-chip-inactive     { background: #94a3b8; }

/* Saites tab — mini-graf SVG + 3 type-color sections. The link/marker
   colors mirror the existing badge palette so a red line in the graph
   reads the same as a "uzbrukums" badge in the section below. */
.mini-saites-graph {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto 1rem;
}
.saites-link-uzbrukums { stroke: var(--red-bright); }
.saites-link-spriedze  { stroke: var(--yellow); }
.saites-link-atbalsts  { stroke: var(--green); }
.saites-link-vote      { stroke: rgba(139, 92, 246, 0.5); stroke-dasharray: 3 2; }
.saites-section { margin-top: 1rem; }
.saites-section h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}
.saites-section-uzbrukumi h4::before { content: "■"; color: var(--red-bright); }
.saites-section-spriedzes h4::before { content: "■"; color: var(--yellow); }
.saites-section-atbalsts h4::before  { content: "■"; color: var(--green); }
.saites-section-commentary h4::before { content: "“"; color: var(--text-muted); }
.saites-section-alignment h4::before { content: "★"; color: #7c3aed; }
.alignment-list { list-style: none; padding: 0; margin: 0; }
.alignment-list li { padding: 0.25rem 0; border-bottom: 1px solid var(--border); }
.alignment-list li:last-child { border-bottom: none; }

/* Saites tab — B-lite anchor highlight + node labels (spec 2026-05-02) */
.saites-card-anchor:target {
  animation: saites-card-flash 2s ease-out;
  scroll-margin-top: 80px; /* under sticky .nav (assets/style.css:82) */
}

@keyframes saites-card-flash {
  0%   { background-color: rgba(255, 215, 0, 0.18); box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.35); }
  100% { background-color: transparent;            box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .saites-card-anchor:target {
    animation: none;
    background-color: rgba(255, 215, 0, 0.10);
  }
}

.saites-node-label { pointer-events: none; user-select: none; }
.mini-saites-graph a { cursor: pointer; }
.mini-saites-graph a:hover circle { stroke-width: 2.5; }
.mini-saites-graph a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.saites-card-profile-btn {
  color: var(--accent);
  font-weight: 500;
}
.saites-card-profile-btn:hover { color: var(--accent); text-decoration: underline; }

.see-full-graph-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.see-full-graph-link:hover { color: var(--text); }
.muted-tag {
  background: var(--surface2);
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
}

.profile-stats-bar {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--bg);
  /* 7 tabs pārplūst 375px kartē, kuras overflow:hidden tās nogrieztu */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* value-span neobligāts (Pārskats cilnei skaitļa nav) — bez tā label
     centrejas vertikāli, lai cilņu joslas augstums paliek vienāds */
  justify-content: center;
  gap: 0.1rem;
  padding: 0.6rem 0.25rem;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.profile-stat:hover {
  color: var(--text);
  background: var(--surface);
}
.profile-stat.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--surface);
}
.profile-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.profile-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wiki-profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* Timeline */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-event {
  position: relative;
  padding-bottom: 1.25rem;
  padding-left: 1rem;
}
.timeline-event::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
}
.timeline-claim::before { border-color: var(--accent); }
.timeline-vote::before { border-color: var(--green); }
.timeline-detail {
  font-size: 0.9rem;
  margin-top: 0.25rem;
  line-height: 1.5;
}
.timeline-source {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 0.4rem;
}
.profile-tab { min-height: 200px; }

/* Agents page */
.agents-hero {
  padding: 5rem 0 3rem;
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.agents-hero h1 { font-size: 2.75rem; margin-bottom: 1rem; }
.agents-hero .subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 2rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

.pricing-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.pricing-card.featured { border-color: var(--accent); }
.pricing-card .price { font-size: 2.25rem; font-weight: 700; color: var(--accent); margin: 1rem 0; }
.pricing-card .price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.pricing-card ul { list-style: none; text-align: left; margin: 1.5rem 0; }
.pricing-card li { padding: 0.4rem 0; font-size: 0.9rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }

.audience-section { margin: 3rem 0; }
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.audience-card {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.audience-card h4 { margin-bottom: 0.25rem; }
.audience-card p { color: var(--text-muted); font-size: 0.85rem; }

.proof-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
}
.proof-section h3 { margin-bottom: 1rem; }

.contact-cta {
  text-align: center;
  padding: 3rem 0;
}
.contact-cta h2 { margin-bottom: 0.75rem; }
.contact-cta p { color: var(--text-muted); margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .grid-2, .grid-3, .features-grid, .pricing-table, .audience-grid {
    grid-template-columns: 1fr;
  }
  .ctx-card { padding: 1rem; }
  .ctx-body { font-size: 0.88rem; }
  /* Subtab bar (shared .pagehead-tabs): on narrow screens the 4 tabs exceed
     the viewport and pushed the whole PAGE into horizontal scroll. Contain it
     to an internal single-row scroll strip — no desktop change, no hidden-tab
     surprise (partial tab edge is the scroll affordance). */
  .pagehead-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .pagehead-tabs::-webkit-scrollbar { display: none; }
  .pagehead-tab { flex: 0 0 auto; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .profile-card-top { padding: 1rem; gap: 0.75rem; }
  .profile-avatar { width: 48px; height: 48px; }
  .profile-name-row h1 { font-size: 1.15rem; }
  .profile-stat-label { font-size: 0.6rem; }
  .profile-stat { padding: 0.5rem 0.15rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  .nav .container { gap: 1rem; }
  .nav-links { gap: 0.75rem; row-gap: 0.25rem; }
  .nav-links a {
    font-size: 0.8rem;
    padding: 0.6rem 0.15rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .nav-logo { min-height: 44px; padding: 0.35rem 0; }
  .nav-logo-icon { height: 32px; }
  .nav-logo-text { display: none; }
  .hero { padding: 2rem 1rem 1.5rem; }
  .hero-title { font-size: 2rem; }
  .hero-countdown .countdown-number { font-size: 2.5rem; }
  .brief-card { padding: 1rem; }
  .agents-hero { padding: 3rem 0 2rem; }
  .agents-hero h1 { font-size: 2rem; }
  .section { padding: 2rem 0; }
  .data-table th, .data-table td { padding: 0.5rem; font-size: 0.8rem; }
  .container { padding: 0 1rem; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* Politician cards (horizontal — partija, politiki pages) */
.politicians-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.politician-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.15s;
  display: flex;
  flex-direction: column;
}
.politician-card:hover { border-color: var(--accent); }
.politician-card-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.politician-card-name:hover { color: var(--accent); }
.politician-card-stats {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.politician-card-stats a { color: var(--text-muted); text-decoration: none; }
.politician-card-stats a:hover { color: var(--accent); text-decoration: underline; }
.politician-card .party-tag {
  display: inline-block;
  background: var(--surface2);
  color: var(--text-muted);
  padding: 0.1rem 0.5rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 500;
}
.politicians-section { margin-bottom: 2.5rem; }
.politicians-section h3 { margin-bottom: 1rem; }
.faction-group { margin-bottom: 1.5rem; }
.faction-group h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.politicians-search {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.politicians-search:focus { border-color: var(--accent); }
.politicians-search::placeholder { color: var(--text-muted); }
.x-icon { width: 14px; height: 14px; fill: var(--text-muted); transition: fill 0.15s; }
.x-icon-link { display: inline-flex; align-items: center; line-height: 1; }
.x-icon-link:hover .x-icon { fill: var(--text); }

/* Party cards */
.parties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
  gap: 1.25rem;
}
.party-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  color: inherit;
  text-decoration: none;
}
.party-card:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(59,130,246,0.1); transform: translateY(-2px); }
.party-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; gap: 0.75rem; }
.party-card-header h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
  text-transform: none;
}
.party-card-ideology { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.party-card-stats { display: flex; gap: 1.25rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.party-card-stats .cover-dot { display: inline-block; margin-right: 0.4rem; vertical-align: middle; }
.party-card-social { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.party-card-social a { color: var(--text-muted); transition: color var(--transition); }
.party-card-social a:hover { color: var(--accent); }

/* ── Link filter buttons (Saites page) ── */
.link-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.link-filter-btn .filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: opacity 0.15s;
}
.link-filter-btn .filter-count {
  font-weight: 600;
}
.link-filter-btn.active {
  border-color: var(--filter-color, var(--border));
  color: var(--text);
  background: var(--surface2);
}
.link-filter-btn:not(.active) .filter-dot {
  opacity: 0.3;
}
.link-filter-btn:hover {
  border-color: var(--filter-color, var(--text-muted));
}

/* ── Graph + detail split layout (Saites page) ── */
.graph-split {
  display: flex;
  gap: 0;
  height: 70vh;
  min-height: 450px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--surface);
}
.graph-split .graph-pane {
  flex: 1 1 65%;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.graph-split .detail-pane {
  flex: 0 0 340px;
  border-left: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.detail-pane-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  gap: 0.75rem;
  padding: 2rem;
}
.detail-pane-empty .hint-icon {
  font-size: 2.5rem;
  opacity: 0.3;
}
.detail-pane-empty p {
  font-size: 0.85rem;
  line-height: 1.5;
}
.detail-pane h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.15rem;
}
.detail-pane .detail-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.detail-pane .detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.detail-pane .detail-stat,
.detail-pane .detail-stat-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
.detail-pane .detail-stat strong,
.detail-pane .detail-stat-btn strong {
  color: var(--accent);
}
.detail-pane .detail-stat-btn {
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.detail-pane .detail-stat-btn:hover {
  background: var(--surface2);
  color: var(--text);
}
.detail-pane .detail-stat-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface2);
}
.detail-pane .detail-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0;
}
.detail-pane .detail-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}
/* Link detail card in the detail pane */
.detail-link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.detail-link-card .link-parties {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.detail-link-card .link-arrow {
  color: var(--text-muted);
}
.detail-link-card .link-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.detail-link-card .link-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}
@media (max-width: 900px) {
  .graph-split {
    flex-direction: column;
    height: auto;
  }
  .graph-split .graph-pane {
    height: 50vh;
    min-height: 300px;
  }
  .graph-split .detail-pane {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 40vh;
  }
}
.panel-tabs {
  display: flex;
  gap: 0;
  margin: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.panel-tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.15s, border-color 0.15s;
}
.panel-tab:hover {
  color: var(--text);
}
.panel-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.panel-info-section p {
  margin: 0.5rem 0;
}
.panel-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 500;
}
.panel-tensions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.panel-tension-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}
.panel-tension-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.panel-tension-header .badge,
.panel-tension-header .topic-tag {
  white-space: nowrap;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
}
.panel-tension-direction {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.panel-tension-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}
.panel-tension-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* ── Subtab bar (Balsojumi page tabs) ── */
.subtab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}
.subtab-btn {
  padding: 0.6rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}
.subtab-btn:hover { color: var(--text); }
.subtab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Card redesign ── */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.card-info {
  flex: 1;
  min-width: 0;
}
.card-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.card-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 0.1rem;
}
.card-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
.stat-dot {
  color: var(--border);
  font-size: 0.75rem;
}
.card-last-activity {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--surface2);
  color: var(--text-muted);
}
.activity-date {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.activity-topic {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  flex: 1;
  min-width: 0;
}
.activity-link {
  color: var(--accent);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Vote Matrix ── */
.matrix-split {
  display: flex;
  gap: 0;
  height: 75vh;
  min-height: 500px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--surface);
}
.matrix-split .matrix-pane {
  flex: 1 1 70%;
  min-width: 0;
  overflow: auto;
  position: relative;
}
.matrix-split .matrix-detail-pane {
  flex: 0 0 340px;
  border-left: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

/* Matrix filter bar */
.matrix-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.matrix-filter-bar .link-filter-btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
}
.matrix-select {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.matrix-select:hover, .matrix-select:focus {
  border-color: var(--accent);
  color: var(--text);
  outline: none;
}
.matrix-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  transition: all 0.15s;
  margin-left: auto;
}
.matrix-toggle.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(59,130,246,0.1);
}

/* Matrix range selector — segmented pill group ("Šī sēde / 7d / … / Visa vēsture") */
.matrix-range-bar {
  gap: 0.4rem !important;
}
.matrix-range-btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.matrix-range-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface2);
}
.matrix-range-btn:active {
  transform: translateY(1px);
}
.matrix-range-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 30%, transparent);
}
.matrix-range-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* "Visa vēsture" is the load-everything action — set apart with a dashed
   outline until active, hinting it expands beyond the default window. */
.matrix-range-btn[data-range="all"] {
  border-style: dashed;
}
.matrix-range-btn[data-range="all"].active {
  border-style: solid;
}

/* Matrix table */
.matrix-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
  white-space: nowrap;
}
.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  vertical-align: bottom;
  font-weight: 500;
}
.matrix-table thead th.matrix-corner {
  z-index: 5;
  left: 0;
}
.matrix-table thead th.matrix-corner-faction {
  z-index: 5;
}
.matrix-table thead th.matrix-vote-header {
  cursor: pointer;
  transition: background 0.1s;
  min-width: 28px;
  width: 28px;
}
.matrix-table thead th.matrix-vote-header:hover {
  background: var(--surface2);
}
.matrix-table thead th.matrix-vote-header.active {
  background: rgba(59,130,246,0.15);
}
.matrix-vote-label {
  display: block;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  padding: 0.5rem 0.25rem;
  max-height: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 400;
}

/* Sticky columns */
.matrix-table .matrix-col-name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s;
}
.matrix-table .matrix-col-name:hover {
  background: var(--surface2);
  color: var(--accent);
}
.matrix-table .matrix-col-faction {
  position: sticky;
  left: 160px;
  z-index: 2;
  background: var(--surface);
  padding: 0.25rem 0.4rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  border-right: 1px solid var(--border);
}

/* Faction separator row */
.matrix-table .matrix-faction-row td {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.matrix-table .matrix-faction-row td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg);
  border-left: 3px solid var(--faction-color, var(--border));
}

/* Matrix cells */
.matrix-table td.matrix-cell {
  text-align: center;
  padding: 0.2rem;
  min-width: 28px;
  width: 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--border) 20%, transparent);
  cursor: pointer;
  transition: background 0.1s;
  font-weight: 600;
  font-size: 0.8rem;
}
.matrix-table td.matrix-cell:hover {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.matrix-cell.vote-par {
  background: rgba(34,197,94,0.15);
  color: var(--green);
}
.matrix-cell.vote-pret {
  background: rgba(239,68,68,0.15);
  color: var(--red-bright);
}
.matrix-cell.vote-atturas {
  background: rgba(234,179,8,0.15);
  color: var(--yellow);
}
.matrix-cell.vote-nebalso {
  background: rgba(75,85,99,0.15);
  color: #6b7280;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.matrix-cell.vote-absent {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    rgba(75,85,99,0.06) 3px,
    rgba(75,85,99,0.06) 4px
  );
}

/* Row hover */
.matrix-table tbody tr:hover td {
  background: var(--surface2);
}
.matrix-table tbody tr:hover .matrix-cell.vote-par {
  background: rgba(34,197,94,0.25);
}
.matrix-table tbody tr:hover .matrix-cell.vote-pret {
  background: rgba(239,68,68,0.25);
}
.matrix-table tbody tr:hover .matrix-cell.vote-atturas {
  background: rgba(234,179,8,0.25);
}
.matrix-table tbody tr.matrix-row-active td {
  background: rgba(59,130,246,0.08);
}
.matrix-table tbody tr.matrix-row-dimmed {
  opacity: 0.15;
}
.matrix-table tbody tr.matrix-row-highlighted td {
  background: rgba(59,130,246,0.06);
}
.matrix-table tbody tr.matrix-row-highlighted td.matrix-col-name {
  color: var(--accent);
}
.vote-filter-btn {
  transition: transform 0.1s, box-shadow 0.1s;
}
.vote-filter-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 8px var(--hover-glow);
}

/* Detail panel: faction breakdown bars */
.faction-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}
.faction-bar-label {
  width: 50px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-weight: 500;
}
.faction-bar-track {
  flex: 1;
  height: 14px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}
.faction-bar-seg {
  height: 100%;
  transition: width 0.2s;
}
.faction-bar-counts {
  width: 70px;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
}

/* Politician detail: attendance bar */
.attendance-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.attendance-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Stridgie list */
.stridgie-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
.stridgie-item .stridgie-motif {
  color: var(--text);
  margin-bottom: 0.2rem;
}
.stridgie-item .stridgie-meta {
  color: var(--text-muted);
  font-size: 0.7rem;
}

@media (max-width: 900px) {
  .matrix-split {
    flex-direction: column;
    height: auto;
  }
  .matrix-split .matrix-pane {
    height: 55vh;
    min-height: 300px;
  }
  .matrix-split .matrix-detail-pane {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 45vh;
  }
  .matrix-table .matrix-col-name {
    max-width: 120px;
  }
  .matrix-table .matrix-col-faction {
    left: 120px;
  }
}

/* ==========================================================================
   Hero v2 — test layout (/index-v2.html)
   ========================================================================== */

.hero-v2 {
  position: relative;
  margin: 1.5rem 0 3rem;
  padding: 2.75rem 2rem 1.75rem;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 105%, color-mix(in srgb, var(--accent) 5%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-deep) 100%);
  border: 1px solid var(--border);
  overflow: hidden;
}
.hero-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--surface-lift) 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 100%);
}
.hero-v2 > * { position: relative; }

/* Viena rinda, kas atkārto meklētāja pill valodu (fons/borderis/radiuss no
   .hero-search) un aizpilda visu labās kolonnas platumu — malas sakrīt ar
   meklētāju. Visi trīs bērni dala vienu bāzes līniju. */
.hero-election {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  flex-wrap: wrap;
  padding: 0.6rem 1.1rem 0.6rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.hero-election-days {
  font-size: 1.45rem;
  /* 500, ne 700 — Google Fonts ielādē tikai 400/500; 700 būtu faux bold. */
  font-weight: 500;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hero-election-label { font-size: 0.78rem; line-height: 1.4; color: var(--text-muted); }
.hero-election-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-left: auto;
  white-space: nowrap;
}

.hero-v2-thesis { max-width: 720px; }
.hero-v2-title {
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 0 0 0.85rem;
}
.hero-v2-title-line {
  display: block;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.hero-v2-title-line-muted { opacity: 0.28; }
.hero-v2:hover .hero-v2-title-line-muted { opacity: 1; }
.hero-v2-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.hero-v2-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.25rem 0 1.25rem;
}
.hero-v2-metric {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.15rem 0.95rem;
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.hero-v2-metric:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.hero-v2-metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.hero-v2-metric-num {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hero-v2-metric-delta {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}
.hero-v2-metric-spark {
  line-height: 0;
}
.hero-v2-metric-spark svg {
  display: block;
  width: 100%;
  height: 28px;
}
.hero-v2-metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.hero-v2-ticker {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.hero-v2-ticker-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.hero-v2-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-highlight);
  animation: heroV2Pulse 2s ease-in-out infinite;
}
@keyframes heroV2Pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-highlight) 55%, transparent); }
  50% { box-shadow: 0 0 0 7px rgba(183,28,28,0); }
}
.hero-v2-ticker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 1.75rem;
  position: relative;
  overflow: hidden;
}
.hero-v2-ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.hero-v2-ticker-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.hero-v2-ticker-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}
.hero-v2-ticker-row:hover { color: var(--accent); }
.hero-v2-ticker-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg) 70%, transparent);
}
.hero-v2-ticker-name { font-weight: 600; }
.hero-v2-ticker-sep { color: var(--border); }
.hero-v2-ticker-topic { color: var(--accent); }
.hero-v2-ticker-stance {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.hero-v2-ticker-time {
  margin-left: auto;
  color: var(--accent-highlight);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  flex-shrink: 0;
  padding-left: 0.75rem;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .hero-v2 {
    padding: 1.75rem 1.15rem 1.25rem;
    border-radius: 12px;
  }
  /* Mobilajā labā kolonna stiepjas pilnā platumā zem virsraksta. */
  .hero-top-right { align-items: stretch; max-width: none; }
  /* Divrindu wrap mobilajā — pill radiuss uz augsta bloka izskatās dīvaini. */
  .hero-election { border-radius: 18px; }
  .hero-election-days { font-size: 1.3rem; }
  .hero-v2-thesis { margin-top: 1.5rem; }
  .hero-v2-metrics {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin: 1.75rem 0 1rem;
  }
  .hero-v2-metric-num { font-size: 2rem; }

  /* Mobile ticker: convert cross-fade rotation into a horizontal marquee so
     long stance text scrolls across the screen instead of being clipped. */
  .hero-v2-ticker {
    overflow: hidden;
  }
  .hero-v2-ticker-label { padding: 0 0.1rem; }
  .hero-v2-ticker-list {
    height: auto;
    display: flex;
    gap: 2.5rem;
    width: max-content;
    animation: heroV2Marquee 90s linear infinite;
  }
  .hero-v2-ticker-item {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    flex: 0 0 auto;
  }
  .hero-v2-ticker-row {
    font-size: 0.78rem;
    gap: 0.45rem;
    overflow: visible;
    white-space: nowrap;
  }
  .hero-v2-ticker-stance {
    display: inline-flex;
    flex: 0 0 auto;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
  }
  .hero-v2-ticker-time { padding-left: 0.45rem; }
  .hero-v2-ticker:hover .hero-v2-ticker-list,
  .hero-v2-ticker:active .hero-v2-ticker-list {
    animation-play-state: paused;
  }
  @keyframes heroV2Marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }
}

/* ===== Featured images ===== */

/* Blog post full-bleed hero */
.brief-hero {
  margin: 0 0 2rem 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  max-width: none;
  background: var(--surface2);
}
.brief-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brief-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Editorial pagehead inside brief/analysis detail */
.brief-back {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.5rem;
  transition: color 0.15s;
}
.brief-back:hover { color: var(--accent); }

.brief-pagehead {
  padding: 0 0 1.25rem;
  margin: 0 0 2rem;
  border-bottom: 1px solid var(--border-soft);
}
.brief-pagehead-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.brief-pagehead-kicker { color: var(--accent); }
.brief-pagehead-sep { opacity: 0.5; }
.brief-pagehead-date { font-variant-numeric: tabular-nums; }
.brief-pagehead-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}
@media (max-width: 700px) {
  .brief-pagehead-title { font-size: 30px; letter-spacing: -0.5px; }
}

.brief-footer-sep {
  margin: 2.5rem 0 1rem;
  border: none;
  border-top: 1px solid var(--border);
}

.brief-footer {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 2rem;
}

.brief-footer strong {
  color: var(--text);
  font-weight: 600;
}

.brief-footnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}
.brief-footnav-link {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.brief-footnav-link:hover { color: var(--accent); }
.brief-footnav-center { text-align: center; }

/* Homepage featured briefs — 3-column grid */
.brief-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.brief-featured-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--transition), transform 0.15s ease;
}
.brief-featured-card:hover {
  border-color: var(--accent-highlight);
  transform: translateY(-2px);
}
.brief-featured-card img {
  width: 100%;
  height: auto;           /* override HTML height attr so aspect-ratio wins */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.brief-featured-body {
  padding: 0.9rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.brief-featured-meta {
  display: flex;
  gap: 0.6rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.brief-featured-type { font-weight: 700; color: var(--accent); }
.brief-featured-type.is-weekly { color: var(--orange); }
.brief-featured-headline {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .brief-featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .brief-featured-grid { grid-template-columns: 1fr; }
}

/* Analizes daily-card thumbnail */
.daily-card.has-image {
  padding: 0 1rem 0 0;
  gap: 1rem;
  align-items: center;
}
.daily-card-thumb {
  width: 160px;
  height: auto;           /* override HTML height attr so aspect-ratio wins */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: var(--surface2);
}

@media (max-width: 768px) {
  .daily-card.has-image { padding: 0 0.75rem 0 0; gap: 0.75rem; }
  .daily-card-thumb { width: 96px; }
  .brief-featured-headline { font-size: 1.05rem; }
}

/* =========================================================
   X V1 — redesign of the X / Twitter tab
   Spec: docs/superpowers/specs/2026-04-18-x-tab-v1-design.md
   ========================================================= */

.xv1-section,
.pzv1-section {
  --xv1-border-soft: var(--border-soft);
  --xv1-border:      var(--border);
  --xv1-surface:     var(--surface);
  --xv1-surface-hi:  var(--surface2);
  --xv1-text:        var(--text);
  --xv1-text-muted:  var(--text-muted);
  --xv1-text-dim:    var(--text-dim);
  --xv1-brand-red:   var(--accent-highlight);
  --xv1-green:       var(--green);
  --xv1-red-trend:   var(--red);
  --xv1-mono:        'JetBrains Mono', ui-monospace, monospace;
  /* Serif is Georgia, never Newsreader: Newsreader misrenders Latvian
     diacritics (ā č ē ģ ī ķ ļ ņ š ū ž). Newsreader was dropped in 53a347a
     (2026-04-18) and the Google Fonts preload is mono-only — do not re-add
     family=Newsreader in base.html.j2 or override this serif elsewhere. */
  --xv1-serif:       Georgia, 'Times New Roman', serif;
  --ed-sans:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  font-family: var(--ed-sans);
  color: var(--xv1-text);
  border-top: 1px solid var(--xv1-border-soft);
}

/* ---- Header ---- */
.xv1-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--xv1-border-soft);
}
.xv1-kicker {
  font-family: var(--ed-sans);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  margin-bottom: 10px;
}
.xv1-h1 {
  font-family: var(--xv1-serif);
  font-size: 40px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.8px;
  line-height: 1;
}
.xv1-metrics { display: flex; gap: 32px; }
.xv1-metric { display: flex; flex-direction: column; gap: 4px; }
.xv1-metric-label {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
}
.xv1-metric-value {
  font-family: var(--ed-sans);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.4px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---- Two-column grid ---- */
.xv1-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
}
.xv1-aside {
  padding: 26px 24px 40px;
  border-right: 1px solid var(--xv1-border-soft);
}

/* ---- Aside sections ---- */
.xv1-aside-section { margin-bottom: 28px; }
.xv1-aside-section summary { list-style: none; cursor: pointer; }
.xv1-aside-section summary::-webkit-details-marker { display: none; }
.xv1-rail-title {
  font-family: var(--ed-sans);
  font-size: 10px;
  color: var(--xv1-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--xv1-border-soft);
  display: block;
}

/* ---- Mention leaderboard rows ---- */
.xv1-mention-row {
  display: grid;
  grid-template-columns: 22px 1fr 40px 38px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--xv1-border-soft);
  cursor: pointer;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}
.xv1-mention-row:hover { background: var(--xv1-surface); }
.xv1-rank {
  font-family: var(--ed-sans);
  font-size: 11px;
  color: var(--xv1-text-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
}
.xv1-mention-name { display: flex; flex-direction: column; min-width: 0; }
.xv1-mention-author {
  font-family: var(--ed-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.15px;
  color: var(--xv1-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xv1-mention-handle {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 2px;
  color: var(--party-color, var(--text-muted));
}
.xv1-mention-count {
  font-family: var(--ed-sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.xv1-mention-trend {
  font-family: var(--ed-sans);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.xv1-trend-up   { color: var(--xv1-green); }
.xv1-trend-down { color: var(--xv1-red-trend); }
.xv1-trend-flat { color: var(--xv1-text-dim); }

/* ---- Topic rows ---- */
.xv1-topic-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--xv1-border-soft);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.xv1-topic-row:hover { background: var(--xv1-surface); }
.xv1-topic-mix { display: flex; gap: 3px; margin-bottom: 5px; }
.xv1-topic-dot { width: 6px; height: 6px; display: inline-block; }
.xv1-topic-name {
  font-family: var(--ed-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.15px;
  margin-bottom: 3px;
  display: block;
}
.xv1-topic-meta {
  font-family: var(--ed-sans);
  font-size: 11px;
  color: var(--xv1-text-muted);
  letter-spacing: 0.4px;
  display: block;
}

/* ---- Ticker bar (tabs + filters) ---- */
.xv1-ticker-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--xv1-border-soft);
  font-family: var(--ed-sans);
  font-size: 10px;
  color: var(--xv1-text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.xv1-tabs { display: flex; gap: 18px; }
.xv1-tab {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.xv1-tab.active {
  color: var(--xv1-text);
  border-bottom-color: var(--xv1-brand-red);
}
.xv1-filters { margin-left: auto; display: flex; gap: 12px; align-items: center; }

/* Topic chip in ticker bar */
.xv1-topic-chip-holder:empty { display: none; }
.xv1-topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--xv1-border);
  color: var(--xv1-text);
  background: var(--xv1-surface-hi);
  border-radius: 2px;
  font-family: var(--ed-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.xv1-topic-chip button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}

/* Dropdown filters */
.xv1-select { position: relative; }
.xv1-select-trigger {
  background: transparent;
  border: 1px solid var(--xv1-border-soft);
  color: var(--xv1-text-muted);
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 2px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.xv1-select-trigger:hover { color: var(--xv1-text); border-color: var(--xv1-border); }
.xv1-select.has-selection .xv1-select-trigger { color: var(--xv1-text); border-color: var(--xv1-border); }
.xv1-select-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--xv1-surface);
  border: 1px solid var(--xv1-border);
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 20;
  padding: 6px 0 0;
  border-radius: 2px;
}
.xv1-select.open .xv1-select-dropdown { display: block; }
.xv1-select-search {
  width: calc(100% - 16px);
  margin: 4px 8px 8px;
  padding: 6px 8px;
  background: var(--xv1-surface-hi);
  border: 1px solid var(--xv1-border);
  color: var(--xv1-text);
  font-family: var(--ed-sans);
  font-size: 11px;
}
.xv1-select-option {
  padding: 6px 12px;
  cursor: pointer;
  color: var(--xv1-text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--ed-sans);
  font-size: 11px;
  letter-spacing: 0.4px;
}
.xv1-select-option:hover { background: var(--xv1-surface-hi); color: var(--xv1-text); }
.xv1-select-checkbox {
  width: 10px;
  height: 10px;
  border: 1px solid var(--xv1-border);
  display: inline-block;
  border-radius: 1px;
}
.xv1-select-option.selected .xv1-select-checkbox {
  background: var(--xv1-brand-red);
  border-color: var(--xv1-brand-red);
}
.xv1-select-clear {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--xv1-text-muted);
  background: var(--xv1-surface);
  border-top: 1px solid var(--xv1-border);
  box-shadow: 0 -6px 12px -6px var(--shadow-scroll-fade);
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-align: center;
}
.xv1-select-clear:hover { color: var(--xv1-text); background: var(--xv1-surface-hi); }

/* ---- Ticker items ---- */
.xv1-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 22px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--xv1-border-soft);
  border-left: 3px solid transparent;
  /* Browser skips layout/paint for off-screen items until needed — huge
     initial-paint win for long feeds. contain-intrinsic-size reserves
     approximate row height so the scrollbar doesn't jump as items hydrate. */
  content-visibility: auto;
  contain-intrinsic-size: auto 140px;
}
.xv1-item:hover {
  border-left-color: var(--xv1-brand-red);
  background: var(--xv1-surface);
  margin-left: -3px;
}
.xv1-item-ts {
  font-family: var(--ed-sans);
  font-size: 11px;
  color: var(--xv1-text-muted);
  letter-spacing: 0.4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xv1-item-kind {
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 10px;
  color: var(--xv1-text-muted);
}
.xv1-item-kind.is-post { color: var(--xv1-brand-red); }
.xv1-item-when {
  color: var(--xv1-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.xv1-item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.xv1-item-author {
  font-family: var(--ed-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.15px;
}
.xv1-item-handle {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.xv1-item-at,
.xv1-item-party {
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--party-color, var(--text-muted));
  cursor: pointer;
}
.xv1-item-at:hover,
.xv1-item-party:hover { text-decoration: underline; filter: var(--hover-brighten); }
.xv1-item-handle-sep {
  font-family: var(--ed-sans);
  font-size: 10px;
  color: var(--xv1-text-dim);
}
.xv1-item-mentionedby {
  font-family: var(--ed-sans);
  font-size: 12px;
  color: var(--xv1-text-muted);
  font-style: italic;
}
.xv1-item-text {
  font-family: var(--xv1-serif);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 10px;
  letter-spacing: -0.05px;
  font-weight: 400;
  white-space: pre-wrap;
}
.xv1-item-foot {
  font-family: var(--ed-sans);
  font-size: 11px;
  color: var(--xv1-text-muted);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  letter-spacing: 0.4px;
}

.xv1-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--xv1-border-soft);
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  background: transparent;
}
.xv1-chip-topic { color: var(--xv1-text); border-color: var(--xv1-border); }
.xv1-item-topic {
  font-family: inherit;
  cursor: pointer;
}
.xv1-item-topic:hover {
  background: var(--xv1-surface-hi);
  filter: var(--hover-brighten-soft);
}

.xv1-engagement { display: inline-flex; gap: 10px; }
.xv1-item-link {
  margin-left: auto;
  color: var(--xv1-text-muted);
  text-decoration: none;
}
.xv1-item:hover .xv1-item-link { color: var(--xv1-text); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .xv1-grid { grid-template-columns: 1fr; }
  .xv1-aside {
    border-right: none;
    border-bottom: 1px solid var(--xv1-border-soft);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .xv1-aside-section { margin-bottom: 0; }
}
@media (max-width: 600px) {
  .xv1-header { grid-template-columns: 1fr; gap: 20px; }
  .xv1-metrics { gap: 20px; flex-wrap: wrap; }
  .xv1-h1 { font-size: 32px; }
  .xv1-aside { grid-template-columns: 1fr; gap: 20px; }
  .xv1-ticker-bar { flex-wrap: wrap; row-gap: 12px; padding: 12px 16px; }
  .xv1-filters { margin-left: 0; width: 100%; }
  .xv1-item { padding: 14px 16px; grid-template-columns: 64px 1fr; gap: 14px; }
}

/* ====================================================================
   Pozīcijas V2 — dense editorial table with sticky filter rail.
   Reuses --xv1-* tokens (shared with X tab). Scope: .pzv1-*
   ==================================================================== */

/* ---- Header ---- */
.pzv1-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--xv1-border-soft);
}
.pzv1-kicker {
  font-family: var(--xv1-mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  margin-bottom: 10px;
}
.pzv1-h1 {
  font-family: var(--xv1-serif);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1;
  margin: 0;
}
.pzv1-metrics { display: flex; gap: 32px; }
.pzv1-metric { display: flex; flex-direction: column; gap: 4px; }
.pzv1-metric-label {
  font-family: var(--xv1-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
}
.pzv1-metric-value {
  font-family: var(--xv1-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.4px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ====================================================================
   PAGEHEAD — shared editorial header used across non-pzv1/xv1 tabs
   (Balsojumi, Pretrunas, Personas, Partijas, Ziņas, Saites).
   Scopes --xv1-* tokens locally so only the header adopts pzv1/xv1
   typography — the content below keeps its legacy styling.
   ==================================================================== */
.pagehead-section { padding: 0 0 3rem; }
.pagehead-header {
  --xv1-border-soft: var(--border-soft);
  --xv1-text-muted:  var(--text-muted);
  --xv1-mono:        'JetBrains Mono', ui-monospace, monospace;
  --xv1-serif:       Georgia, 'Times New Roman', serif;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  padding: 36px 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--xv1-border-soft);
}
.pagehead-kicker {
  font-family: var(--xv1-mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  margin-bottom: 10px;
}
.pagehead-h1 {
  font-family: var(--xv1-serif);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1;
  margin: 0;
}
.pagehead-metrics { display: flex; gap: 32px; }
.pagehead-metric { display: flex; flex-direction: column; gap: 4px; }
.pagehead-metric-label {
  font-family: var(--xv1-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
}
.pagehead-metric-value {
  font-family: var(--xv1-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.4px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .pagehead-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pagehead-h1 { font-size: 32px; }
  .pagehead-metrics {
    flex-wrap: wrap;
    gap: 18px;
  }
}

/* ---- Section head (editorial in-page section headers) ----
   Scaled-down sibling of .pagehead-* for section headings on the
   homepage (and other long pages) — smaller serif h2, mono kicker
   and "see all" link, subtle bottom rule. Keeps .section-header
   available for pages that haven't adopted the editorial style. */
.section-head {
  --xv1-border-soft: var(--border-soft);
  --xv1-text-muted:  var(--text-muted);
  --xv1-mono:        'JetBrains Mono', ui-monospace, monospace;
  --xv1-serif:       Georgia, 'Times New Roman', serif;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 0 0 14px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--xv1-border-soft);
}
.section-head-kicker {
  font-family: var(--xv1-mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  margin-bottom: 8px;
}
.section-head-title {
  font-family: var(--xv1-serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1;
  margin: 0;
  color: var(--text);
}
.section-head-link {
  font-family: var(--xv1-mono);
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  white-space: nowrap;
  transition: color 0.15s;
}
.section-head-link:hover { color: var(--accent); }
@media (max-width: 600px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .section-head-title { font-size: 24px; }
  .section-head-link { justify-self: start; }
}

/* ---- Pagehead tabs (editorial underline) ---- */
.pagehead-tabs {
  --pt-mono: 'JetBrains Mono', ui-monospace, monospace;
  --pt-muted: var(--text-muted);
  --pt-accent: var(--accent-highlight);
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1.75rem;
  padding: 0;
}
.pagehead-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 18px 12px;
  margin-bottom: -1px;
  cursor: pointer;
  color: var(--pt-muted);
  font-family: var(--pt-mono);
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  transition: color 0.15s, border-color 0.15s;
}
.pagehead-tab:hover { color: var(--text); }
.pagehead-tab.active {
  color: var(--text);
  border-bottom-color: var(--pt-accent);
}
.pagehead-tab-count {
  font-family: var(--pt-mono);
  font-size: 11px;
  color: var(--pt-muted);
  font-variant-numeric: tabular-nums;
}
.pagehead-tab.active .pagehead-tab-count { color: var(--pt-accent); }

/* ---- Grid ---- */
.pzv1-grid,
.pnv1-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: start;
}

/* ---- Aside (sticky filter rail) ---- */
.pzv1-aside,
.pnv1-aside {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  padding: 22px 20px 40px 0;
  border-right: 1px solid var(--xv1-border-soft);
  scrollbar-width: thin;
}

.pzv1-rail-group,
.pnv1-rail-group {
  margin-bottom: 22px;
}
.pzv1-rail-title,
.pnv1-rail-title {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  padding-bottom: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--xv1-border-soft);
  cursor: default;
}
.pzv1-rail-rows,
.pnv1-rail-rows { display: flex; flex-direction: column; }

.pzv1-rail-row,
.pnv1-rail-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 0;
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  margin-left: -10px;
  padding-left: 8px;
  text-align: left;
  font-family: var(--ed-sans);
  font-size: 13px;
  color: var(--xv1-text-muted);
  cursor: pointer;
  transition: color 80ms ease, background 80ms ease;
}
.pzv1-rail-row:hover,
.pnv1-rail-row:hover {
  color: var(--xv1-text);
  background: var(--xv1-surface);
}
.pzv1-rail-row.is-active,
.pnv1-rail-row.is-active {
  color: var(--xv1-text);
  font-weight: 500;
  border-left-color: var(--xv1-brand-red);
}
.pnv1-rail-sublink {
  display:none; padding:0.3rem 0.75rem 0.3rem 1.5rem;
  font-size:0.78rem; color:var(--text-muted); text-decoration:none;
}
.pnv1-rail-sublink:hover { color:var(--accent-brand); }
.pnv1-rail-row.is-active + .pnv1-rail-sublink { display:block; }
.pzv1-rail-dot,
.pnv1-rail-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
}
.pzv1-rail-checkbox {
  width: 10px;
  height: 10px;
  border: 1px solid var(--xv1-text-dim);
  display: inline-block;
  flex-shrink: 0;
}
.pzv1-rail-row.is-active .pzv1-rail-checkbox {
  background: var(--xv1-text);
  border-color: var(--xv1-text);
}
.pzv1-rail-label,
.pnv1-rail-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.pzv1-rail-count,
.pnv1-rail-count {
  font-family: var(--ed-sans);
  font-size: 11px;
  color: var(--xv1-text-dim);
  font-variant-numeric: tabular-nums;
}
.pzv1-rail-more {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--xv1-text-dim);
  padding: 6px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}
.pzv1-rail-more:hover { color: var(--xv1-text-muted); }

/* Persons details group */
.pzv1-rail-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pzv1-rail-details > summary::-webkit-details-marker { display: none; }
.pzv1-rail-caret {
  margin-left: auto;
  font-size: 10px;
  color: var(--xv1-text-dim);
}
.pzv1-rail-details[open] .pzv1-rail-caret { transform: rotate(180deg); }
.pzv1-rail-search {
  padding: 6px 0 8px;
}
.pzv1-rail-search-input {
  width: 100%;
  background: var(--xv1-surface);
  border: 1px solid var(--xv1-border-soft);
  color: var(--xv1-text);
  font-family: var(--ed-sans);
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
}
.pzv1-rail-search-input:focus {
  border-color: var(--xv1-border);
}
.pzv1-rail-search-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.pzv1-rail-rows-scroll {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.pzv1-rail-person.is-hidden { display: none; }

/* ---- Main (search + sort + table) ---- */
.pzv1-main,
.pnv1-main { min-width: 0; }

.pzv1-searchbar,
.pnv1-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--xv1-border-soft);
}
.pzv1-search-icon,
.pnv1-search-icon {
  width: 14px;
  height: 14px;
  color: var(--xv1-text-dim);
  flex-shrink: 0;
}
.pzv1-search-input,
.pnv1-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--xv1-text);
  font-family: var(--ed-sans);
  font-size: 15px;
  font-style: italic;
  padding: 4px 0;
  outline: none;
  letter-spacing: -0.1px;
}
.pzv1-search-input:not(:placeholder-shown),
.pnv1-search-input:not(:placeholder-shown) { font-style: normal; }
.pzv1-clear-chip,
.pnv1-clear-chip {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.pzv1-clear-chip:hover,
.pnv1-clear-chip:hover { color: var(--xv1-text); }

.pzv1-sortbar,
.pnv1-sortbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--xv1-border-soft);
  font-family: var(--ed-sans);
  font-size: 10px;
  color: var(--xv1-text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.pzv1-showing,
.pnv1-showing { font-variant-numeric: tabular-nums; }
.pzv1-showing #pzv1-shown, .pzv1-showing #pzv1-total,
.pnv1-showing #pnv1-shown, .pnv1-showing #pnv1-total { color: var(--xv1-text); }
.pzv1-sortbar-spacer,
.pnv1-sortbar-spacer { flex: 1; }
.pzv1-sortbar-label,
.pnv1-sortbar-label { letter-spacing: 0.8px; }
.pzv1-sortbtn,
.pnv1-sortbtn {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 0 0 2px;
  cursor: pointer;
}
.pzv1-sortbtn:hover,
.pnv1-sortbtn:hover { color: var(--xv1-text); }
.pzv1-sortbtn.is-active,
.pnv1-sortbtn.is-active {
  color: var(--xv1-text);
  border-bottom-color: var(--xv1-brand-red);
}

/* ---- Table head + rows ---- */
.pzv1-thead,
.pzv1-row {
  display: grid;
  grid-template-columns: 160px 120px 1fr 80px 130px;
  gap: 14px;
  padding: 10px 22px 9px;
}
.pzv1-thead {
  font-family: var(--ed-sans);
  font-size: 10px;
  color: var(--xv1-text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--xv1-border);
}
.pzv1-thead-right { text-align: right; white-space: nowrap; }

.pzv1-row {
  padding: 12px 22px;
  align-items: flex-start;
  border-bottom: 1px solid var(--xv1-border-soft);
  border-left: 2px solid transparent;
  margin-left: 0;
  cursor: pointer;
}
.pzv1-row:hover {
  background: var(--xv1-surface);
}

.pzv1-row-persona-name {
  font-family: var(--ed-sans);
  font-size: 13px;
  font-weight: 500;
}
.pzv1-row-persona-name a { color: inherit; text-decoration: none; }
.pzv1-row-persona-name a:hover { text-decoration: underline; text-underline-offset: 2px; }
.pzv1-row-party {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 3px;
  color: var(--party-color, var(--text-muted));
}
.pzv1-row-topic-chip {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 6px;
  display: inline-block;
  border: 1px solid;
  cursor: pointer;
  color: var(--topic-color, var(--text-muted));
  border-color: color-mix(in srgb, var(--topic-color, var(--text-muted)) 33%, transparent);
  background: color-mix(in srgb, var(--topic-color, var(--text-muted)) 7%, transparent);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.pzv1-row-topic-chip:hover {
  background: var(--topic-color, var(--text-muted));
  border-color: var(--topic-color, var(--text-muted));
  color: #0b0d14;
  transform: translateY(-1px);
}
.pzv1-row-stance-tag {
  font-family: var(--ed-sans);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--xv1-text-dim);
  margin-bottom: 4px;
}
.pzv1-row-text {
  font-family: var(--xv1-serif);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  letter-spacing: -0.05px;
  text-wrap: pretty;
}
.pzv1-row-date {
  font-family: var(--ed-sans);
  font-size: 11px;
  color: var(--xv1-text-muted);
  text-align: right;
  letter-spacing: 0.4px;
}
.pzv1-row-confidence {
  font-family: var(--ed-sans);
  font-size: 10px;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}
.pzv1-conf-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pzv1-conf-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.pzv1-conf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--xv1-text-dim);
  box-sizing: border-box;
}
.pzv1-conf-dot.is-on {
  background: var(--xv1-text);
  border-color: var(--xv1-text);
}
.pzv1-conf-label {
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
}
.pzv1-row-source {
  color: var(--xv1-text-muted);
  text-decoration: none;
}
.pzv1-row-source:hover {
  color: var(--xv1-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pzv1-empty {
  padding: 60px 22px;
  text-align: center;
  font-family: var(--ed-sans);
  font-style: italic;
  font-size: 17px;
  color: var(--xv1-text-muted);
}

/* ---- Pagination ---- */
.pzv1-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--xv1-surface);
  font-family: var(--ed-sans);
  font-size: 10px;
  color: var(--xv1-text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.pzv1-pagination button {
  font: inherit;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 2px 4px;
  letter-spacing: inherit;
  text-transform: inherit;
}
.pzv1-pagination button:hover { color: var(--xv1-text); }
.pzv1-pagination button.is-active {
  color: var(--xv1-text);
  border-bottom: 1px solid var(--xv1-brand-red);
}
.pzv1-pagination button:disabled {
  color: var(--xv1-text-dim);
  cursor: default;
}
.pzv1-pagination-pages {
  display: flex;
  gap: 4px;
  align-items: center;
}
.pzv1-pagination-ellipsis {
  color: var(--xv1-text-dim);
  padding: 0 2px;
}

/* ───────── Personas V1 — cards ───────── */
.pnv1-section { padding-bottom: 3rem; }

.pnv1-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; padding: 1.25rem 0 1rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.pnv1-header-title { min-width: 0; }
.pnv1-kicker {
  font-family: var(--xv1-mono); font-size: 0.68rem;
  color: var(--text-muted); letter-spacing: 1.4px;
  text-transform: uppercase; margin-bottom: 0.5rem;
}
.pnv1-h1 {
  font-family: var(--xv1-serif); font-size: 2.25rem; font-weight: 500;
  letter-spacing: -0.8px; line-height: 1; margin: 0;
}
.pnv1-metrics { display: flex; gap: 1.75rem; }
.pnv1-metric { display: flex; flex-direction: column; align-items: flex-start; }
.pnv1-metric-label {
  font-family: var(--xv1-mono); font-size: 0.62rem;
  color: var(--text-muted); letter-spacing: 0.8px;
  text-transform: uppercase; margin-bottom: 0.2rem;
}
.pnv1-metric-value {
  font-family: var(--xv1-serif); font-size: 1.55rem; font-weight: 500;
  letter-spacing: -0.4px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pnv1-metric-accent { color: var(--orange); }

.pnv1-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.6rem;
}

.pnv1-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--spine, var(--border));
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
  /* Skip render+layout for off-screen cards. Drops paint cost ~10x on
     a 153-card grid; combined with loading=lazy on avatars, initial
     personas.html paint goes from ~6 MB / many seconds to ~500 KB. */
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}
.pnv1-card:hover {
  border-color: var(--accent);
  border-left-color: var(--spine); /* override — keep party spine on hover */
  transform: translateY(-1px);
}

.pnv1-card-link {
  display: block; padding: 0.7rem 0.8rem 0.5rem;
  text-decoration: none; color: inherit;
}
.pnv1-card-top { display: flex; gap: 0.7rem; align-items: flex-start; }
.pnv1-card-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
}
.pnv1-card-avatar-ph {
  background: var(--surface2);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--xv1-serif); font-weight: 500; font-size: 1rem;
  text-transform: uppercase;
}
.pnv1-card-ident { min-width: 0; flex: 1; }
.pnv1-card-eyebrow {
  font-family: var(--xv1-mono); font-size: 0.58rem;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.2rem;
}
.pnv1-card-name {
  font-family: var(--xv1-serif); font-size: 0.98rem; font-weight: 500;
  letter-spacing: -0.2px; line-height: 1.2;
}
.pnv1-card-link:hover .pnv1-card-name { color: var(--accent); }
.pnv1-card-role {
  font-family: var(--xv1-serif); font-style: italic;
  font-size: 0.78rem; color: var(--text-muted);
  line-height: 1.3; margin-top: 0.15rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.pnv1-card-stats {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 0.25rem; padding: 0.5rem 0.8rem 0.4rem;
  border-top: 1px solid var(--border);
  font-family: var(--xv1-mono);
  font-variant-numeric: tabular-nums;
}
.pnv1-card-stat { display: flex; flex-direction: column; gap: 0.1rem; }
a.pnv1-card-stat { text-decoration: none; color: inherit; transition: color 0.15s; }
a.pnv1-card-stat:hover .pnv1-card-stat-n { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a.pnv1-card-stat.is-red:hover .pnv1-card-stat-n { color: var(--red); }
.pnv1-card-stat-n {
  font-size: 0.9rem; font-weight: 500; color: var(--text);
  line-height: 1;
}
.pnv1-card-stat-l {
  font-size: 0.55rem; color: var(--text-muted);
  letter-spacing: 0.6px; text-transform: uppercase;
}
.pnv1-card-stat.is-red .pnv1-card-stat-n { color: var(--red); }
/* Nulles stati nav saites — vizuāli nobālēti, lai nelasās kā klikšķināmi
   (tomēr paliek redzami: "0 pretr." ir informācija, ne tukšums). */
.pnv1-card-stat.is-zero { opacity: 0.38; }

.pnv1-card-foot {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.8rem 0.45rem;
  border-top: 1px solid var(--border);
  font-family: var(--xv1-mono); font-size: 0.65rem;
  color: var(--text-muted); letter-spacing: 0.3px;
}
.pnv1-card-x {
  color: var(--text-muted); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pnv1-card-x:hover { color: var(--accent); border-bottom-color: var(--accent); }
.pnv1-card-x-empty { opacity: 0.35; border-bottom: 0; }
.pnv1-card-activity {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--text-muted); text-decoration: none;
}
.pnv1-card-activity:hover { color: var(--text); }
.pnv1-card-activity-date { font-variant-numeric: tabular-nums; }
.pnv1-card-source {
  color: var(--text-muted); text-decoration: none; padding-left: 0.2rem;
}
.pnv1-card-source:hover { color: var(--accent); }

.pnv1-empty {
  padding: 3rem 0; text-align: center;
  font-family: var(--xv1-serif); font-style: italic;
  color: var(--text-muted); font-size: 0.95rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .pzv1-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pzv1-h1 { font-size: 32px; }
  .pzv1-metrics {
    flex-wrap: wrap;
    gap: 18px;
  }
  .pzv1-grid,
  .pnv1-grid { grid-template-columns: 1fr; }
  .pnv1-cards { grid-template-columns: 1fr; }
  .pzv1-aside,
  .pnv1-aside {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--xv1-border-soft);
    padding: 22px 0 30px;
  }
  .pzv1-thead { display: none; }
  .pzv1-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "persona date"
      "topic   confidence"
      "text    text";
    gap: 8px;
  }
  .pzv1-row > :nth-child(1) { grid-area: persona; }
  .pzv1-row > :nth-child(2) { grid-area: topic; }
  .pzv1-row > :nth-child(3) { grid-area: text; }
  .pzv1-row > :nth-child(4) { grid-area: date; text-align: right; }
  .pzv1-row > :nth-child(5) { grid-area: confidence; }
}

/* ---- Mobile filter panel (Pozīcijas + Personas + X) ---- */
.pzv1-mobile-filterbar,
.pnv1-mobile-filterbar,
.xv1-mobile-filterbar {
  display: none;
}

@media (max-width: 900px) {
  .pzv1-mobile-filterbar,
  .pnv1-mobile-filterbar,
  .xv1-mobile-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 16px 0 12px;
  }
  .pzv1-mobile-chips,
  .pnv1-mobile-chips,
  .xv1-mobile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .pzv1-grid[data-mobile-filter-open="false"] .pzv1-aside,
  .pnv1-grid[data-mobile-filter-open="false"] .pnv1-aside { display: none; }
  .xv1-aside { display: none; }
  .pzv1-mobile-toggle,
  .pnv1-mobile-toggle,
  .xv1-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-family: var(--ed-sans);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--xv1-text);
    background: var(--xv1-surface);
    border: 1px solid var(--xv1-border);
    border-radius: 2px;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
  }
  .pzv1-mobile-toggle:hover,
  .pnv1-mobile-toggle:hover,
  .xv1-mobile-toggle:hover {
    background: var(--xv1-surface-hi);
    border-color: var(--xv1-text-muted);
  }
  .pzv1-mobile-toggle[aria-expanded="true"],
  .pnv1-mobile-toggle[aria-expanded="true"],
  .xv1-mobile-toggle[aria-expanded="true"] {
    background: var(--xv1-surface-hi);
    border-color: var(--xv1-brand-red);
  }
  .pzv1-mobile-count,
  .pnv1-mobile-count,
  .xv1-mobile-count {
    color: var(--xv1-text-dim);
    font-weight: inherit;
  }
  .pzv1-chip,
  .pnv1-mobile-chip,
  .xv1-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-family: var(--ed-sans);
    font-size: 10px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--xv1-text-muted);
    background: var(--xv1-surface);
    border: 1px solid var(--xv1-border-soft);
    border-radius: 2px;
    cursor: pointer;
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
  }
  .pzv1-chip:hover,
  .pnv1-mobile-chip:hover,
  .xv1-chip:hover {
    color: var(--xv1-text);
    background: var(--xv1-surface-hi);
    border-color: var(--xv1-border);
  }
  .pzv1-chip-x,
  .xv1-chip-x {
    color: var(--xv1-text-dim);
    font-size: 10px;
  }
  .pzv1-chip:hover .pzv1-chip-x,
  .xv1-chip:hover .xv1-chip-x {
    color: var(--xv1-brand-red);
  }
  .pzv1-mobile-clearall,
  .pnv1-mobile-clearall,
  .xv1-mobile-clearall {
    background: transparent;
    border: none;
    padding: 4px 6px;
    font-family: var(--ed-sans);
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--xv1-text-muted);
    cursor: pointer;
  }
  .pzv1-mobile-clearall:hover,
  .pnv1-mobile-clearall:hover,
  .xv1-mobile-clearall:hover {
    color: var(--xv1-text);
  }
}

/* -------- Komentāri (Par viņu saka) -------- */
.komentari-section {
  margin: 2.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.komentari-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.komentari-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.komentari-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.komentari-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-brand);
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.komentari-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}
.komentari-speaker a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.komentari-speaker a:hover { text-decoration: underline; }
.komentari-date { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.komentari-topic {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.komentari-stance {
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
}
.komentari-quote {
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  margin: 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}
.komentari-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}
.komentari-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
}
.komentari-source:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 640px) {
  .komentari-grid { grid-template-columns: 1fr; }
}

/* ═══ Bills (Phase 1B-i) ═══ */

.bill-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.bill-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.bill-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.bill-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.bill-card-body h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0 0 0.4rem;
}

.bill-card-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bill-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: auto;
  padding-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bill-pill-lp14 { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.bill-pill-lm14 { background: rgba(168, 85, 247, 0.15); color: var(--purple-pill); }
.bill-pill-p14  { background: rgba(34, 197, 94, 0.15);  color: var(--green); }

.bill-card-submitter {
  font-style: italic;
}

/* Detail page */

.bill-detail-summary {
  font-family: Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 1.5rem 0;
  color: var(--text);
}

.bill-detail-timeline-section {
  margin-top: 1.5rem;
}

.bill-detail-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--border);
}

.bill-detail-timeline-item {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.92rem;
}

.bill-detail-timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.85rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  font-family: var(--font-mono, monospace);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.timeline-stage {
  font-weight: 600;
}

.timeline-counts {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.timeline-vote-link {
  font-size: 0.82rem;
}

.bill-detail-submitters,
.bill-detail-links {
  margin-top: 1.5rem;
}

.bill-detail-submitters ul {
  list-style: none;
  padding: 0;
}

.bill-detail-submitters li {
  padding: 0.3rem 0;
}

.empty-state {
  font-style: italic;
  color: var(--text-muted);
}

/* Bills list filter bar (specific to balsojumi.html#bills-list) */

.bill-status-filter,
.bill-type-filter {
  display: flex;
  gap: 0.3rem;
}

.bill-search-input {
  flex: 1 1 200px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface2);
  color: inherit;
}

@media (max-width: 768px) {
  .bill-card-grid {
    grid-template-columns: 1fr;
  }
}

/* === VAD declarations panel === */
.vad-year-tab {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.vad-year-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.vad-section { border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 0.75rem; }
.vad-delta-marker {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 3px;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
}
.vad-delta-marker-new { background: #dcfce7; color: #166534; }
.vad-delta-marker-modified { background: #fef3c7; color: #92400e; }
.vad-delta-marker-removed { background: #fee2e2; color: #991b1b; }
tr.vad-delta-removed td { color: var(--text-muted); text-decoration: line-through; }
tr.vad-delta-modified { background: rgba(254, 243, 199, 0.15); }
tr.vad-delta-new { background: rgba(220, 252, 231, 0.15); }

/* ---- Weekly brief (ink-navy chrome, mobile-first) ---- */
.weekly-post { max-width: 820px; margin: 0 auto; }
.weekly-cover { position: relative; margin: 1rem 0 1.5rem 0; }
.weekly-hero { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 6px; display: block; }
.weekly-badge {
  display: inline-block; margin-top: 1rem; padding: 0.25rem 0.7rem;
  background: #1f2d4d; color: #f4efe4; font-size: 0.85rem; letter-spacing: 0.03em;
  border-radius: 3px; text-transform: uppercase;
}
.weekly-cover h1 { margin: 0.6rem 0 0 0; }
.weekly-stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.weekly-stat-card {
  flex: 1 1 140px; min-width: 140px; padding: 0.9rem 1rem;
  background: #f4efe4; border-left: 4px solid #1f2d4d; border-radius: 4px;
  display: flex; flex-direction: column;
}
.weekly-stat-card b { font-size: 1.25rem; color: #1f2d4d; }
.weekly-stat-card span { font-size: 0.8rem; color: #555; }
.weekly-body h3 { border-left: 4px solid #1f2d4d; padding-left: 0.6rem; }
.weekly-body img { width: 100%; height: auto; border-radius: 4px; margin: 1rem 0; }
.weekly-body blockquote {
  border-left: 3px solid #1f2d4d; padding-left: 1rem; font-style: italic; color: #333;
}
.weekly-nav { display: flex; justify-content: space-between; margin-top: 2rem; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 768px) {
  .weekly-stats { gap: 0.5rem; }
  .weekly-stat-card { flex: 1 1 100%; }
  .weekly-post { padding: 0 1rem; }
}

/* ===== Mediji — outlet detail (minimal polish, 2026-06-03) ===== */
.medijs .back-link { display:inline-block; margin-bottom:1.25rem; }
.medijs-head { margin-bottom:1.5rem; }
.medijs-head h1 { margin:0 0 0.5rem; }
.medijs-meta { display:flex; flex-wrap:wrap; align-items:center; gap:0.75rem; font-size:0.85rem; }
.medijs-chip {
  display:inline-block; padding:0.15rem 0.6rem; border:1px solid var(--border);
  border-radius:999px; color:var(--text-muted); text-transform:uppercase;
  letter-spacing:0.04em; font-size:0.72rem;
}
.medijs-link { color:var(--accent); }
.medijs-link:hover { color:var(--text); }
.medijs-desc { color:var(--text-muted); margin-top:0.85rem; max-width:62ch; }

.medijs-h2 {
  font-size:0.8rem; text-transform:uppercase; letter-spacing:0.08em;
  color:var(--text-muted); border-bottom:1px solid var(--border);
  padding-bottom:0.5rem; margin:2.25rem 0 1rem;
}
.medijs-h3 { font-size:0.95rem; margin:2rem 0 0.85rem; color:var(--text); }

/* Transparency fact cards */
.fact-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:0.75rem;
}
.fact-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:0.9rem 1rem; border-left:3px solid var(--accent-brand);
}
.fact-label {
  font-size:0.7rem; text-transform:uppercase; letter-spacing:0.06em;
  color:var(--text-muted); margin-bottom:0.4rem;
}
.fact-value { font-size:0.88rem; line-height:1.5; }
.fact-foot { margin-top:0.55rem; display:flex; gap:0.6rem; align-items:center; font-size:0.75rem; }

/* X feeds / raidījumi */
.feed-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr));
  gap:0.75rem; margin-bottom:1.5rem;
}
.feed-card {
  display:flex; align-items:center; gap:0.7rem; padding:0.7rem 0.9rem;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  text-decoration:none; color:inherit; transition:border-color .15s ease;
}
.feed-card:hover { border-color:var(--accent-brand); }
.feed-avatar { width:40px; height:40px; border-radius:50%; object-fit:cover; flex:none; }
.feed-avatar-ph {
  display:flex; align-items:center; justify-content:center;
  background:var(--border); color:var(--text-muted);
  font-weight:600; font-size:0.95rem;
}
.feed-ident { display:flex; flex-direction:column; min-width:0; }
.feed-name { font-size:0.9rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.feed-sub { font-size:0.75rem; color:var(--text-muted); }

/* Coverage header */
.medijs-cover-head { display:flex; align-items:baseline; gap:0.75rem; border-bottom:1px solid var(--border); margin:2.25rem 0 0; padding-bottom:0.5rem; }
.medijs-cover-head .medijs-h2 { border:0; margin:0; padding:0; }
.medijs-volume {
  font-family:var(--prv2-mono, monospace); font-size:0.8rem; color:var(--text);
  background:var(--surface2); padding:0.1rem 0.5rem; border-radius:4px;
}
.medijs-note { margin:0.75rem 0 0; max-width:66ch; font-size:0.82rem; }

/* Coverage bars (politicians + parties) */
.cover-list { display:flex; flex-direction:column; gap:0.3rem; }
.cover-row {
  display:grid; grid-template-columns:minmax(140px, 230px) 1fr 3rem;
  align-items:center; gap:0.85rem; padding:0.4rem 0.5rem; border-radius:6px;
  color:var(--text); transition:background var(--transition);
}
a.cover-row:hover { background:var(--surface); }
.cover-name { display:flex; align-items:center; gap:0.45rem; font-size:0.86rem; min-width:0; }
.cover-party, .cover-sub { color:var(--text-muted); font-size:0.75rem; }
.cover-dot { width:8px; height:8px; border-radius:50%; flex:0 0 auto; }
.cover-party { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cover-track { position:relative; height:8px; background:var(--surface2); border-radius:999px; overflow:visible; }
.cover-fill { position:absolute; left:0; top:0; height:100%; border-radius:999px; opacity:0.92; }
.cover-avg { position:absolute; top:-3px; width:2px; height:14px; background:var(--text); opacity:0.7; border-radius:1px; }
.cover-count { font-family:var(--prv2-mono, monospace); font-size:0.8rem; color:var(--text-muted); text-align:right; }
.cover-legend { font-size:0.75rem; color:var(--text-muted); margin-top:0.75rem; display:flex; align-items:center; gap:0.4rem; }
.cover-avg-key { display:inline-block; width:2px; height:12px; background:var(--text); opacity:0.7; }

/* Topic chips */
.topic-chips { display:flex; flex-wrap:wrap; gap:0.5rem; }
.topic-chip {
  display:inline-flex; align-items:center; gap:0.4rem; padding:0.25rem 0.7rem;
  background:var(--surface); border:1px solid var(--border); border-radius:999px;
  font-size:0.82rem; color:var(--text);
}
.topic-chip b { color:var(--text-muted); font-weight:500; font-size:0.75rem; }

/* Recent list */
.recent-list { list-style:none; padding:0; margin:0; }
.recent-list li {
  display:flex; justify-content:space-between; gap:1rem; align-items:baseline;
  padding:0.55rem 0; border-bottom:1px solid var(--prv2-border-soft, var(--border));
}
.recent-list li:last-child { border-bottom:0; }
.recent-list a { color:var(--text); }
.recent-list a:hover { color:var(--accent); }
.recent-date { color:var(--text-muted); font-size:0.78rem; font-family:var(--prv2-mono, monospace); white-space:nowrap; }

@media (max-width:640px) {
  .cover-row { grid-template-columns:minmax(110px,1fr) 1.2fr 2.5rem; gap:0.5rem; }
  .cover-party { display:none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Attention / engagement redesign — 2026-06-08
   Nav disclosure + mobile menu · curiosity-first hero · discovery ranks ·
   this-week strip · keep-digging · topic destination pages · share buttons.
   Reuses design tokens (--bg/--surface/--accent/--border/--radius). Mobile
   audited at 360–414px; 44px tap targets; honours prefers-reduced-motion.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Nav: "Vairāk" disclosure (desktop dropdown) + mobile hamburger ── */
.nav-burger { display: none; background: none; border: none; padding: 0; cursor: pointer; }
.nav-burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.nav-more { position: relative; display: flex; align-items: stretch; }
.nav-more-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 400; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 0 16px; display: flex; align-items: center; gap: 5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}
.nav-more-btn:hover, .nav-more-btn.active { color: var(--text); border-bottom-color: var(--accent-highlight); }
.nav-more-caret { font-size: 9px; transition: transform 0.2s ease; }
.nav-more-menu {
  position: absolute; top: 100%; right: 0; min-width: 168px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 14px 32px var(--shadow-overlay-strong);
  display: none; flex-direction: column; padding: 0.35rem 0; z-index: 200;
}
.nav-more:hover .nav-more-menu,
.nav-more:focus-within .nav-more-menu,
.nav-more.is-open .nav-more-menu { display: flex; }
.nav-more.is-open .nav-more-caret { transform: rotate(180deg); }
.nav-more-menu a {
  padding: 0.55rem 1rem; border-bottom: none !important; margin-bottom: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
}
.nav-more-menu a:hover, .nav-more-menu a.active { color: var(--text); background: var(--surface2); }

@media (max-width: 768px) {
  .nav .container { flex-wrap: nowrap; position: relative; gap: 1rem; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer;
    margin-left: auto; width: 44px; height: 44px;
    justify-content: center; align-items: center;
  }
  .nav-burger span { display: block; width: 22px; height: 2px; background: var(--text);
    border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
  .nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    /* nowrap obligāts: bāzes .nav-links ir flex-wrap:wrap (desktop saitēm), bet
       kolonnas režīmā ar max-height tas aplauž izvēlni otrā kolonnā, tiklīdz
       saturs pārsniedz augstumu (ritināšanu jau dod overflow-y:auto). */
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0;
    background: rgba(13, 16, 20, 0.98); background: color-mix(in srgb, var(--bg) 98%, transparent); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); box-shadow: 0 16px 32px var(--shadow-overlay);
    padding: 0.4rem 0; max-height: calc(100vh - 56px); overflow-y: auto;
  }
  .nav.nav-open .nav-links { display: flex; }
  .nav-links > a, .nav-more-btn {
    padding: 0; min-height: 46px; display: flex; align-items: center;
    padding-left: 1.5rem; border-bottom: none; margin-bottom: 0; font-size: 0.92rem;
  }
  .nav-links > a:hover, .nav-links > a.active { border-bottom: none; color: var(--text); background: var(--surface); }
  .nav-more { flex-direction: column; align-items: stretch; }
  .nav-more-btn { width: 100%; color: var(--text-muted); border-top: 1px solid var(--border); }
  .nav-more-menu { position: static; display: flex; box-shadow: none; border: none; background: transparent; padding: 0; min-width: 0; }
  .nav-more-menu a { padding-left: 2.75rem; min-height: 42px; display: flex; align-items: center; }
  .nav-more-caret { display: none; }
  /* Meklētājs kā pilna platuma rinda burger paneļa (#nav-menu) apakšā. */
  .nav-search {
    width: auto; height: 42px; margin: 0.6rem 1.5rem;
    border-top: none;
  }
  .nav-search .sgv1-drop {
    position: static; width: 100%; right: auto; margin-top: 0.4rem;
    box-shadow: none; max-height: 42vh;
  }
}

/* ── Hero: brand line + global search ── */
.hero-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1.75rem;
}
/* Labā kolonna: countdown virs meklētāja (landing redesign 2026-07-04). */
.hero-top-right {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 0.7rem; flex: 1 1 320px; max-width: 460px;
}
.hero-top-right .hero-search { width: 100%; flex: initial; max-width: none; }
.hero-brand { display: flex; flex-direction: column; line-height: 1.05; }
.hero-brand-line {
  font-size: clamp(1.5rem, 3.4vw, 2.35rem); font-weight: 700; letter-spacing: -0.03em; color: var(--text);
}
.hero-brand-line-muted { color: var(--text-muted); }
.hero-search {
  position: relative;
  display: flex; align-items: center; gap: 0; flex: 1 1 320px; max-width: 460px;
  background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.3rem 0.3rem 0.3rem 0.95rem;
  transition: border-color var(--transition), background var(--transition);
}
.hero-search:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--bg) 80%, transparent); outline: 2px solid var(--accent); outline-offset: 2px; }
.hero-search-icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.hero-search-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 0.92rem; padding: 0.5rem 0.6rem;
}
.hero-search-input::placeholder { color: var(--text-muted); }
.hero-search-btn {
  flex-shrink: 0; border: none; cursor: pointer; border-radius: 999px;
  background: var(--accent-highlight); color: #fff; font-size: 0.82rem; font-weight: 600;
  padding: 0.5rem 1.1rem; min-height: 38px; transition: filter var(--transition);
}
.hero-search-btn:hover { filter: var(--hover-brighten-soft); }

/* ── Hero search suggestions (sgv1) ── */
.sgv1-drop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  max-height: min(60vh, 480px); overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 12px 32px var(--shadow-overlay-strong); padding: 0.35rem 0;
}
.sgv1-kicker {
  padding: 0.5rem 0.9rem 0.25rem;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted);
}
.sgv1-opt {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.9rem; min-height: 40px;
  text-decoration: none; color: var(--text); font-size: 0.88rem;
}
.sgv1-opt:hover, .sgv1-opt.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sgv1-opt-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgv1-opt-sub { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: 0.78rem; flex-shrink: 0; }
.sgv1-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); color: var(--text); font-weight: 700; font-size: 0.66rem;
  border: 2px solid var(--pc, var(--border)); object-fit: cover;
}
.sgv1-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sgv1-dot-lg { width: 10px; height: 10px; margin: 0 9px; }
.sgv1-contra-glyph {
  width: 20px; flex-shrink: 0; text-align: center;
  color: var(--accent); font-size: 0.95rem; line-height: 1;
}
.sgv1-counts {
  margin-left: auto; padding-left: 0.6rem; flex-shrink: 0;
  color: var(--text-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums;
}
.sgv1-submit-row {
  border-top: 1px solid var(--border); margin-top: 0.35rem;
  color: var(--accent); font-weight: 600;
}
.sgv1-submit-row:hover, .sgv1-submit-row.is-active { color: var(--accent-highlight); }

/* ── Hero: rotating featured contradiction ── */
.hero-feature { margin-bottom: 1.5rem; }
.hero-feature-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.7rem;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted);
}
.hero-feature-stage { display: grid; }
.hero-feature-card {
  grid-area: 1 / 1; visibility: hidden; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface2) 55%, transparent) 0%, color-mix(in srgb, var(--bg) 35%, transparent) 100%);
  border: 1px solid var(--border); border-radius: 14px; padding: 1.15rem 1.25rem;
  transition: border-color var(--transition);
}
.hero-feature-card.is-active { visibility: visible; animation: heroFeatureFade 0.5s ease; }
@keyframes heroFeatureFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hero-feature-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.hero-feature-persona { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.hero-feature-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); color: var(--text); font-weight: 700; font-size: 0.9rem;
  border: 2px solid var(--pc, var(--border)); object-fit: cover;
}
.hero-feature-persona-text { display: flex; flex-direction: column; min-width: 0; }
.hero-feature-name { font-weight: 700; color: var(--text); font-size: 1.02rem; }
.hero-feature-role { font-size: 0.78rem; color: var(--text-muted); }
.hero-feature-badge {
  margin-left: auto; font-size: 0.68rem; opacity: .8; color: var(--text-muted);
  background: color-mix(in srgb, var(--bg) 50%, transparent); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.25rem 0.65rem; white-space: nowrap;
}
.hero-feature-split { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.85rem; align-items: stretch; }
.hero-feature-pane {
  display: flex; flex-direction: column; gap: 0.3rem;
  background: color-mix(in srgb, var(--bg) 40%, transparent); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.7rem 0.85rem;
}
.hero-feature-pane-new { border-color: color-mix(in srgb, var(--accent-highlight) 40%, transparent); }
.hero-feature-pane-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.hero-feature-stance { font-size: 0.95rem; line-height: 1.45; color: var(--text); }
.hero-feature-arrow { display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.4rem; }
.hero-feature-cta { display: inline-block; margin-top: 0.85rem; font-size: 0.82rem; color: var(--accent); font-weight: 600; }
.hero-feature-card:hover .hero-feature-cta { color: var(--accent-highlight); }
.hero-vote-bar {
  display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden;
  margin-top: 0.7rem;
}
.hero-vote-par { background: var(--green); }
.hero-vote-pret { background: var(--red); }
.hero-vote-att { background: var(--yellow); }
.hero-vote-legend {
  display: flex; gap: 1rem; margin-top: 0.35rem;
  font-size: 0.72rem; color: var(--text-muted);
}
.hero-feature-dots { display: flex; gap: 0.4rem; justify-content: center; margin-top: 0.9rem; }
.hero-feature-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
  background: var(--border); transition: background var(--transition), transform var(--transition);
}
.hero-feature-dot.is-active { background: var(--accent); transform: scale(1.25); }

.hero-v2-metrics-compact { margin-top: 1.25rem; gap: 0.75rem; }
.hero-v2-metrics-compact .hero-v2-metric { padding: 0.7rem 0.9rem; }
.hero-v2-metrics-compact .hero-v2-metric-num { font-size: 1.7rem; }
.hero-v2-metrics-compact .hero-v2-metric-spark svg { height: 20px; }

@media (max-width: 768px) {
  .hero-top { flex-direction: column; align-items: stretch; gap: 1rem; }
  /* Kolonnas virzienā flex-basis 320px kļūst par AUGSTUMU — bez šī
     pārslēguma meklētājs izstiepjas par milzu ovālu. */
  .hero-search { max-width: none; flex: 0 0 auto; }
  .hero-top-right { flex: 0 0 auto; }
  .sgv1-drop { max-height: 50vh; }
  .sgv1-opt { min-height: 44px; }
  .hero-feature-split { grid-template-columns: 1fr; gap: 0.6rem; }
  .hero-feature-arrow { transform: rotate(90deg); }
  .hero-feature-badge { margin-left: 0; }
  .hero-v2-metrics-compact { grid-template-columns: 1fr; }
}

/* ── Index: recent-votes table ── */
.vote-link { color: var(--text); text-decoration: none; }
.vote-link:hover, .vote-link:focus-visible { color: var(--accent); }
@media (max-width: 600px) {
  /* Šaurā skatā paliek Datums / Jautājums / Rezultāts; balsu sadalījums dzīvo balsojumi.html */
  .votes-mini th:nth-child(n+4), .votes-mini td:nth-child(n+4) { display: none; }
}

/* ── Discovery ranks ("Atklāj bez meklēšanas") ── */
.ranks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
/* 4 kartītes ar auto-fit wrap-ojas 3+1 (burtā kartīte + tukšums blakus)
   viewport joslā 769–1015px (content 721–967px: trūkst ~1px līdz 4×230+gap).
   Šajā joslā piespiežam līdzsvarotu 2×2. */
@media (min-width: 769px) and (max-width: 1015px) {
  .ranks-grid { grid-template-columns: repeat(2, 1fr); }
}
.rank-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.rank-card-title { font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 0.7rem; letter-spacing: -0.01em; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.rank-card-note { margin-top: 0.65rem; font-size: 0.7rem; color: var(--text-muted); opacity: 0.85; line-height: 1.4; }

/* Līderu josla — Rangi ar sejām (landing redesign 2026-07-04). */
.rank-leader { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem; text-decoration: none; color: var(--text); background: var(--surface); }
.rank-leader:hover { border-color: var(--accent); }
.rank-leader-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pc, var(--border)); flex-shrink: 0; }
.rank-leader-initials { display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; color: var(--pc, var(--text-muted)); background: color-mix(in srgb, var(--pc, var(--border)) 18%, transparent); }
.rank-leader-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-leader-value { margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.9rem; }
.rank-row { display: flex; align-items: center; gap: 0.45rem; padding: 0.28rem 0.2rem; text-decoration: none; color: var(--text-muted); font-size: 0.85rem; }
.rank-row:hover { color: var(--text); }
.rank-row-photo { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rank-row-initials { background: color-mix(in srgb, var(--pc, var(--border)) 22%, transparent); }
.rank-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row-value { margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ── "Šonedēļ" strip ── */
.week-section { padding-top: 1rem; }
.week-strip {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-deep) 100%);
  border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.4rem;
}
.week-strip-head { display: flex; flex-direction: column; }
.week-strip-title { font-family: Georgia, 'Times New Roman', serif; font-size: 1.4rem; color: var(--text); letter-spacing: -0.4px; }
.week-strip-stats { display: flex; flex-wrap: wrap; }
/* Stat-iem vienāda divu-līniju anatomija (vērtība + etiķete) un matu
   dalītāji starp tiem — iepriekš "fact" režīms (0 balsojumu/pretrunu)
   renderējās kā viena pelēka vidēja rinda, kas sarāva visa strip ritmu. */
.week-stat { display: flex; flex-direction: column; text-decoration: none; padding: 0 1.75rem; border-left: 1px solid var(--border); }
.week-stat:first-child { border-left: 0; padding-left: 0; }
.week-stat-num { font-size: 1.6rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.week-stat:hover .week-stat-num { color: var(--accent); }
/* Datums kā "vērtības" līnija fact režīmā — vizuālais svars tuvu ciparam,
   lai statu rinda paliek vienā līmenī. 1.05rem × 1.52 ≈ cipara 1.6rem. */
.week-stat-date { font-size: 1.05rem; line-height: 1.52; }
.week-stat-label { font-size: 0.74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.25rem; }
.week-stat:hover .week-stat-label { color: var(--accent); }
.week-strip-cta { margin-left: auto; font-size: 0.86rem; font-weight: 600; color: var(--accent); white-space: nowrap; text-decoration: none; border: 1px solid var(--border); border-radius: 999px; padding: 0.5rem 1rem; transition: border-color var(--transition), color var(--transition); }
.week-strip-cta:hover { color: var(--accent-highlight); border-color: var(--accent); }
@media (max-width: 768px) {
  .week-strip { gap: 1rem; }
  .week-strip-cta { margin-left: 0; }
  .week-strip-stats { gap: 1.25rem; }
  .week-stat { padding: 0; border-left: 0; }
}

/* ── "Turpini rakt" keep-digging blocks (dossier cards) ── */
.keep-digging { margin: 3rem 0 0.5rem; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.keep-digging-kicker {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 600; color: var(--text-muted); margin-bottom: 1.1rem;
}
.keep-digging-pick { font-size: 0.82rem; line-height: 1; }
.keep-digging-kicker::after {
  content: ""; flex: 1 1 auto; height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}
.keep-digging-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.9rem; }

.keep-digging-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.95rem 0.85rem 0.7rem;
  transition: border-color 0.2s ease;
}
.keep-digging-card:hover { border-color: var(--surface2); }
.keep-digging-title {
  font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.11em;
  color: var(--text-muted); margin: 0 0 0.5rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.keep-digging-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

/* row shell */
.kd-row a {
  display: flex; align-items: center; gap: 0.6rem; position: relative;
  padding: 0.4rem 0.5rem; margin: 0 -0.35rem; border-radius: 8px;
  color: var(--text); text-decoration: none;
  transition: background 0.15s ease;
}
.kd-row a:hover { background: var(--surface2); }
.kd-name {
  flex: 1 1 auto; min-width: 0; font-size: 0.87rem; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kd-arrow {
  flex-shrink: 0; color: var(--accent); font-size: 0.85rem;
  opacity: 0; transform: translateX(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.kd-row a:hover .kd-arrow { opacity: 1; transform: translateX(0); }

/* profile row — avatar + name (+ party) */
.kd-profile .kd-meta { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.kd-profile .kd-name { flex: 0 0 auto; }
.kd-avatar {
  flex-shrink: 0; width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--text-muted); background: var(--surface2); border: 1.5px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.kd-avatar-photo { object-fit: cover; padding: 0; }
.kd-avatar--coalition { border-color: var(--accent); }
.kd-avatar--opposition { border-color: var(--accent-highlight); }
.kd-row a:hover .kd-avatar { color: var(--text); }
.kd-party {
  display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%;
  font-size: 0.7rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.kd-dot--coalition { background: var(--accent); }
.kd-dot--opposition { background: var(--accent-highlight); }

/* topic / metric row — name + count + proportional underline bar */
.kd-topic .kd-topic-name {
  flex: 1 1 auto; min-width: 0; font-size: 0.87rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kd-topic-count {
  flex-shrink: 0; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.76rem; color: var(--text); font-variant-numeric: tabular-nums;
}
.kd-topic-unit { color: var(--text-muted); }
.kd-bar {
  position: absolute; left: 0.5rem; bottom: 1px; height: 2px;
  max-width: calc(100% - 1rem); background: var(--accent);
  border-radius: 2px; opacity: 0.45; transition: opacity 0.15s ease;
}
.kd-topic a:hover .kd-bar { opacity: 0.85; }

/* generic row — name + muted sub */
.kd-generic .kd-sub {
  flex-shrink: 0; font-size: 0.74rem; color: var(--text-muted); white-space: nowrap;
}

/* ── Topic destination pages: directory grid ── */
.temas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.9rem; margin-top: 1.5rem; }
.tema-card {
  display: flex; flex-direction: column; gap: 0.4rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; transition: transform var(--transition), border-color var(--transition);
}
.tema-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tema-card-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tema-card-name { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.25; }
.tema-card-counts { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tema-card-count { font-size: 0.76rem; color: var(--text-muted); }

/* ── Topic destination pages: detail ── */
.tema-detail-back { margin-bottom: 1rem; }
.tema-detail-back a { font-size: 0.85rem; color: var(--text-muted); }
.tema-detail-back a:hover { color: var(--accent); }
.tema-section { margin: 2rem 0; }
.tema-section-title { font-family: Georgia, 'Times New Roman', serif; font-size: 1.35rem; color: var(--text); letter-spacing: -0.4px; margin-bottom: 1rem; }
.tema-politiki-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; }
.tema-politiks {
  display: flex; align-items: center; gap: 0.6rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.8rem;
}
.tema-politiks:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tema-politiks-bar { width: 4px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.tema-politiks-name { flex: 1; min-width: 0; color: var(--text); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tema-politiks-meta { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.tema-pozicijas-list { display: flex; flex-direction: column; gap: 0.7rem; }
.tema-pozicija { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; }
.tema-pozicija-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.45rem; }
.tema-pozicija-bar { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tema-pozicija-name { color: var(--text); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.tema-pozicija-name:hover { color: var(--accent); }
.tema-pozicija-date { margin-left: auto; font-size: 0.76rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tema-pozicija-stance { font-size: 0.9rem; line-height: 1.5; color: var(--text); }
.tema-pozicija-meta { margin-top: 0.45rem; font-size: 0.78rem; }
.tema-bills-list { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tema-sintezes-list { display: grid; gap: 0.5rem; }
.tema-sinteze { display: flex; gap: 0.75rem; align-items: center; padding: 0.75rem; text-decoration: none; }
.tema-sinteze-img { width: 96px; height: 54px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.tema-sinteze-title { font-weight: 600; line-height: 1.3; color: var(--text); }
.tema-sinteze-desc { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }
@media (max-width: 600px) {
  .tema-pozicija-date { margin-left: 0; width: 100%; }
}

/* ── Share buttons (X-intent + copy URL) ── */
.share-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.share-btn {
  display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer;
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.78rem; font-weight: 600;
  text-decoration: none; min-height: 34px; transition: background var(--transition), border-color var(--transition);
}
.share-btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--text); }
.share-btn-copy.is-copied { background: var(--accent-brand); color: #fff; border-color: var(--accent-brand); }

@media (prefers-reduced-motion: reduce) {
  .hero-feature-card.is-active { animation: none; }
  .tema-card:hover { transform: none; }
}

/* ── Nav ikonu pogas (tēma + skaņa) ──
   Tīras stroke ikonas bez skeuomorfā korpusa — iepriekšējās 22×36 "plate"
   kastes ar sviru/skrūvēm lasījās kā sveši objekti (baterija), ne kā pogas.
   44×44 tap target ar negatīvo block margin, lai nav josla neuzpūšas
   (sk. light-theme QA 57→69px regresiju). */
.nav-icon-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -8px 0;
  border-radius: 10px;
  color: var(--text-muted);
  transition: color var(--transition), background-color var(--transition);
}
.nav-icon-btn:hover { color: var(--text); background: var(--surface); }
.nav-icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-icon { width: 20px; height: 20px; }

/* Tēma: rādam MĒRĶA režīma ikonu (ne pašreizējā) — light → mēness
   (pārslēgt uz tumšo), dark/default → saule. */
.nav-icon-moon { display: none; }
html[data-theme="light"] .nav-icon-moon { display: block; }
html[data-theme="light"] .nav-icon-sun { display: none; }

/* Skaņa: OFF (default) = svītrotais skaļrunis, ON = viļņi. */
#nav-sound[aria-checked="true"] .nav-sound-slash { display: none; }
#nav-sound[aria-checked="false"] .nav-sound-wave { display: none; }

/* ── JS surface helpers (bmv1 balsojumi / pzv1 pozīcijas) ── */
.bmv1-seg-par { background: var(--green); }
.bmv1-seg-pret { background: var(--red-bright); }
.bmv1-seg-att { background: var(--yellow); }
.bmv1-stat-par { color: var(--green); }
.bmv1-stat-pret { color: var(--red-bright); }
.bmv1-stat-att { color: var(--yellow); }
.pzv1-row-topic-chip { --topic-color: var(--text-muted); }

/* ── Light-mode contrast adjustments (WCAG AA on cream) ──
   Light-only: dark theme stays byte-identical. Fixed semantic colours that
   landed just under 4.5:1 as small text on paper. Data-driven party/topic
   palettes are intentionally NOT here — they need a palette-source decision. */
html[data-theme="light"] .prv2-card.sev-direct_contradiction,
html[data-theme="light"] .prv2-related-card.sev-direct_contradiction { --prv2-sev: #b42318; }
html[data-theme="light"] .prv2-card.sev-reversal,
html[data-theme="light"] .prv2-related-card.sev-reversal { --prv2-sev: #9a3508; }
html[data-theme="light"] .prv2-card.sev-minor_shift,
html[data-theme="light"] .prv2-related-card.sev-minor_shift { --prv2-sev: #6e5200; }
html[data-theme="light"] .badge-green { color: #15662e; }
html[data-theme="light"] .badge-yellow { color: #6e5200; }
html[data-theme="light"] .role-chip-minister { background: var(--green); }
html[data-theme="light"] .pzv1-row-party,
html[data-theme="light"] .xv1-item-party,
html[data-theme="light"] .xv1-item-at,
html[data-theme="light"] .xv1-mention-handle { color: color-mix(in srgb, var(--party-color, var(--text-muted)) 47%, #1f1b14); }
html[data-theme="light"] .pzv1-row-topic-chip { color: color-mix(in srgb, var(--topic-color, var(--text-muted)) 47%, #1f1b14); }
html[data-theme="light"] .pzv1-row-topic-chip:hover {
  background: color-mix(in srgb, var(--topic-color, var(--text-muted)) 18%, var(--surface));
  color: color-mix(in srgb, var(--topic-color, var(--text-muted)) 47%, #1f1b14);
}
html[data-theme="light"] .stat-change.positive,
html[data-theme="light"] .stat-hero-change.positive,
html[data-theme="light"] .domain-chip.domain-state { color: #15662e; }

/* ── Uzmanības centrā composite (spec 2026-07-07) ─────────────── */
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.focus-slot { display: flex; flex-direction: column; }
.focus-slot .focus-cta { align-self: flex-start; }
.focus-hot { grid-column: 1 / -1; }
.focus-grid > .focus-slot:only-of-type { grid-column: 1 / -1; }
.focus-hot-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.focus-hot, .focus-slot { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 18px; }
.focus-hot-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.focus-hot-flame { font-size: 1.4rem; line-height: 1; }
.focus-hot-title { margin: 2px 0 0; font-size: 1.35rem; }
.focus-hot-title a { color: inherit; text-decoration: none; }
.focus-hot-chips { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.focus-chip { font-size: .72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-soft); white-space: nowrap; }
.focus-chip-dim { opacity: .65; }
.focus-kicker { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-bottom: 8px; }
.focus-quote-card { border-left: 3px solid var(--pc, #8b8fa3); padding: 10px 12px; margin: 0; background: color-mix(in srgb, var(--pc, #8b8fa3) 6%, transparent); border-radius: 0 8px 8px 0; }
.focus-quote-text { margin: 0 0 8px; font-style: italic; font-size: .95rem; }
.focus-quote-attr { display: flex; gap: 10px; align-items: center; }
.focus-avatar { width: 40px; height: 40px; font-size: .8rem; }
.focus-quote-who a { font-weight: 600; text-decoration: none; }
.focus-quote-meta { display: block; font-size: .75rem; opacity: .75; }
.focus-bloc-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 12px; }
.focus-bloc-koal { background: var(--accent, #90A4AE); }
.focus-bloc-opoz { background: #c25e5e; }
.focus-bloc-legend { display: flex; justify-content: space-between; font-size: .72rem; opacity: .75; margin-top: 4px; }
.focus-cta { display: inline-block; margin-top: 12px; font-size: .85rem; }
.focus-duel-pair { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.focus-duel-arrow { opacity: .6; }
.focus-duel-desc { font-size: .88rem; margin: 8px 0; }
.focus-duel-meta { font-size: .75rem; opacity: .75; }
.focus-duel + .focus-duel { border-top: 1px solid var(--border-soft); padding-top: 12px; margin-top: 12px; }
.focus-kicker-stacked { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.focus-kicker-stacked + .focus-quote-card .focus-quote-text { font-size: 1.02rem; }
@media (max-width: 900px) { .focus-grid { grid-template-columns: 1fr; } }

/* ── Synthesis enhancements (2026-07-09) ── */
/* Table scroll wrap — fixes mobile overflow where a wide synthesis table
   pushed past .post-content and triggered horizontal page scroll. */
.table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-scroll > table { min-width: max-content; }

/* Empty ("—") cells sit back visually so real data reads first. */
.post-content .cell-empty { color: var(--text-muted); opacity: .55; }

/* Satura rādītājs ("Saturs") — compact anchor list before the prose. Reuses
   the neighbour box language (surface2 fill, border, radius). Both themes
   inherit via the --tokens (light is the bootstrap default). */
.post-toc {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.75rem 0;
}
.post-toc-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.post-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.post-toc-list a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.92rem;
}
.post-toc-list a:hover { text-decoration: underline; }

/* Offset anchored h2 jumps so the sticky nav doesn't cover the heading. */
.post-content h2[id] { scroll-margin-top: 4.5rem; }

/* =========================================================================
   Sintēzes vidžetu stili — "Partiju programmas 2026: solījumu karte"
   -------------------------------------------------------------------------
   Šo bloku orkestrators pievieno assets/style.css beigās (pēc review).
   Klašu telpa: .syn-*  (vidžeti dzīvo wiki/synthesis/widgets/<slug>/*.html,
   ielīmēti .post-content kolonnā, kur style.css jau ielādēts).

   Konvencijas:
   - Tikai eksistējoši CSS mainīgie: --surface, --surface2, --border,
     --text, --text-muted, --accent, --radius, --green, --yellow, --red.
   - Gaišā tēma = noklusējums; tumšā caur html[data-theme="dark"] (mainīgie
     jau pārslēdzas paši — vidžetiem atsevišķa tumšā kārta nav vajadzīga,
     izņemot dažus kontrasta pieskaņojumus zemāk).
   - Bez gradientiem, bez animācijām (izņemot smalku border/opacity hover).
   ========================================================================= */

/* ---- Kopīgie elementi ------------------------------------------------- */

.syn-w {
  margin: 1.5rem 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.syn-w * { box-sizing: border-box; }

/* Īsvārda čips (MMN, SV-AJ, NA, ...) — neitrāls pēc noklusējuma. */
.syn-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 0.32em 0.5em;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface2);
  color: var(--text);
  white-space: nowrap;
}
.syn-chip-muted {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  font-weight: 500;
}
.syn-chip-note {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-muted);
  white-space: normal;
}

.syn-w-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.85rem 0;
}

/* ---- 1. Sarakstu pārskats (saraksti.html) ---------------------------- */

.syn-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.syn-list-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.syn-list-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.syn-list-name {
  font-weight: 600;
  color: var(--accent);
  line-height: 1.35;
  flex: 1;
}
.syn-list-name:hover { color: var(--accent-highlight); text-decoration: underline; }
.syn-list-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.syn-list-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 1.8em;
  text-align: right;
}
/* Mini horizontālā josla (mērogs pret max 25 pozīcijas). */
.syn-bar {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}
.syn-bar-fill {
  display: block;
  height: 100%;
  background: color-mix(in srgb, var(--accent) 55%, var(--surface2));
  border-radius: 3px;
}

/* Statusa čips — trīs atšķirami stili BEZ vērtējuma krāsām (neitralitāte):
   koalīcija = akcenta tonējums, opozīcija = kontūra, ārpus Saeimas = pieklusināts. */
.syn-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 0.28em 0.55em;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.syn-status-coalition {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.syn-status-opposition {
  color: var(--text);
  border-color: var(--border-strong);
  background: transparent;
}
.syn-status-outside {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--surface2);
}

/* ---- 2. Spektra asis (ass-*.html) ------------------------------------ */

.syn-axis-zones {
  display: grid;
  gap: 0.6rem;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
}
.syn-zone {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--zone-accent, var(--border));
  border-radius: var(--radius);
}
/* Polu akcenti apzināti BEZ sarkans/zaļš valences — pozīciju šķir novietojums
   un paraksts, nevis "laba/slikta" krāsa (vietnes neitralitātes princips). */
.syn-zone-pole-a,
.syn-zone-pole-b  { --zone-accent: color-mix(in srgb, var(--accent) 60%, transparent); }
.syn-zone-mid     { --zone-accent: color-mix(in srgb, var(--accent) 28%, transparent); }
.syn-zone-neutral { --zone-accent: var(--border-strong); }

.syn-zone-label {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--text);
}
.syn-zone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.syn-zone-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}
/* "Nemin" rinda zem ass. */
.syn-axis-silent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}
.syn-axis-silent-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.2rem;
}

/* ---- 3./5. Punktu joslas (konsensa/klusesanas-joslas.html) ----------- */

.syn-dots-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.syn-dots-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem 0.9rem;
}
.syn-dots-label { color: var(--text); line-height: 1.35; }
.syn-dots-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.syn-dots {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.syn-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-sizing: border-box;
}
.syn-dot-on  { background: var(--accent); border: 1px solid var(--accent); }
.syn-dot-off { background: transparent; border: 1px solid var(--border-strong); }

/* ---- 4. Modes joslas (modes-joslas.html) ----------------------------- */

.syn-mode {
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.syn-mode + .syn-mode { margin-top: 0.7rem; }
.syn-mode-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}
.syn-mode-title { font-weight: 600; color: var(--text); line-height: 1.35; }
.syn-mode-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.syn-mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.syn-mode-note {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  padding-left: 0.7rem;
  border-left: 2px solid var(--border);
}

/* ---- 6. Solījumu matrica (solijumu-matrica.html) --------------------- */

.syn-matrix-scroll {
  overflow: auto;
  max-height: 70vh;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
.syn-matrix {
  border-collapse: separate;
  border-spacing: 0;
  min-width: max-content;
  font-size: 0.8rem;
}
.syn-matrix th,
.syn-matrix td {
  padding: 0.35rem 0.45rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface);
}
/* Sticky galvene (augšā) + sticky pirmā kolonna (tēma). */
.syn-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.syn-matrix th.syn-matrix-topic,
.syn-matrix td.syn-matrix-topic {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  font-weight: 500;
  color: var(--text);
  background: var(--surface2);
  max-width: 15rem;
  white-space: normal;
}
.syn-matrix thead th.syn-matrix-topic {
  z-index: 3;
  text-align: left;
}
.syn-matrix-cell-on {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.syn-matrix-cell-on:hover {
  color: var(--accent-highlight);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.syn-matrix-cell-off { color: var(--text-muted); opacity: 0.5; }
.syn-matrix-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.55rem;
  line-height: 1.4;
}

/* ---- Mobilais (viena kolonna) ---------------------------------------- */

@media (max-width: 560px) {
  .syn-lists { grid-template-columns: 1fr; }
  .syn-axis-zones {
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }
  .syn-zone {
    border-top: 1px solid var(--border);
    border-left: 3px solid var(--zone-accent, var(--border));
  }
}

/* ── Pretrunas v2: izceltas sekcija + kompakts accordion reģistrs ── */
.prv2-section { margin-top: 1.75rem; }
.prv2-section-h {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: var(--text);
}
.prv2-section-h-n { color: var(--text-muted); font-weight: 400; }
.prv2-view-bar { align-items: center; margin-bottom: 0.5rem; }
.prv2-view-label { font-size: 0.8rem; color: var(--text-muted); margin-right: 0.25rem; }

#register { display: flex; flex-direction: column; gap: 0.5rem; }

.prv2-row {
  --prv2-sev: var(--yellow);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.prv2-row.sev-direct_contradiction { --prv2-sev: #dc2626; }
.prv2-row.sev-reversal             { --prv2-sev: var(--orange); }
.prv2-row.sev-minor_shift          { --prv2-sev: var(--yellow); }
.prv2-row:hover { border-color: var(--border-strong); }
.prv2-row.open { border-color: var(--prv2-sev); }

.prv2-row-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.9rem;
}
.prv2-row-glyph { flex: 0 0 auto; font-size: 0.95rem; color: var(--prv2-sev); }
.prv2-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.prv2-row-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prv2-row-party { color: var(--text-muted); font-weight: 400; font-size: 0.85em; }
.prv2-row-shift {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prv2-row-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 0.6rem; }
.prv2-row-topic {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text-muted);
  white-space: nowrap;
}
.prv2-row-dates {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.prv2-row-chev { color: var(--text-dim); transition: transform var(--transition); }
.prv2-row.open .prv2-row-chev { transform: rotate(180deg); }

.prv2-row-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
  background: var(--bg);
  border-top: 1px solid transparent;
}
.prv2-row.open .prv2-row-body { grid-template-rows: 1fr; border-top-color: var(--border-soft); }
.prv2-row-body-inner { overflow: hidden; min-height: 0; padding: 0 0.9rem 0.9rem; }
.prv2-row-body-inner .prv2-card { margin: 0.9rem 0 0; }
@media (prefers-reduced-motion: reduce) {
  .prv2-row-body { transition: none; }
}

.prv2-group { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.prv2-group-h { font-size: 0.92rem; font-weight: 700; margin: 0 0 0.25rem; color: var(--text); }
.prv2-group-n { color: var(--text-muted); font-weight: 400; }

@media (max-width: 640px) {
  .prv2-row-head { flex-wrap: wrap; gap: 0.4rem 0.5rem; padding: 0.6rem 0.7rem; }
  /* 1. rinda: avatars + meta (pa labi); 2. rinda: vārds + shift pilnā platumā */
  .prv2-row-meta { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
  .prv2-row-main { order: 3; flex: 1 1 100%; }
  .prv2-row-topic { display: none; }
  .prv2-row-dates { font-size: 0.7rem; }
}

/* ── Pretrunas v2.1: rindu avatari, JAUNS žetons, severity leģenda, tukšais stāvoklis ── */
.prv2-row-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--pc, var(--border));
}
.prv2-row-avatar-init {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--surface2);
  color: var(--text);
}

.prv2-row-new {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-highlight);
  white-space: nowrap;
}

.prv2-sev-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.25rem 0 0.9rem;
}
.prv2-chip {
  --prv2-sev: var(--yellow);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.prv2-chip.sev-all                { --prv2-sev: var(--text-muted); }
.prv2-chip.sev-direct_contradiction { --prv2-sev: #dc2626; }
.prv2-chip.sev-reversal             { --prv2-sev: var(--orange); }
.prv2-chip.sev-minor_shift          { --prv2-sev: var(--yellow); }
.prv2-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--prv2-sev);
}
.prv2-chip-n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.prv2-chip:hover { border-color: var(--prv2-sev); color: var(--text); }
.prv2-chip.active {
  color: var(--text);
  border-color: var(--prv2-sev);
  background: color-mix(in srgb, var(--prv2-sev) 12%, var(--surface));
}
.prv2-chip.active .prv2-chip-n { color: var(--text-muted); }

.prv2-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* hidden atribūts zūd, ja elementam ir display:flex/grid — atjaunojam */
.prv2-empty[hidden] { display: none; }

/* ── Pretrunas v2.2: vienotais toolbar (filtrēt / grupēt+kārtot) ── */
.prv2-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.prv2-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.prv2-toolbar-row .prv2-sev-chips { margin: 0; }
.prv2-toolbar-row .filter-bar { margin: 0; }
.prv2-toolbar-row .multi-select { min-width: 180px; }
.prv2-toolbar-spacer { flex: 1 1 auto; }
.prv2-inline-btns { display: inline-flex; gap: 0.35rem; }
