/* atmina.lv — Politiskā atmiņa — Design System */

/* ── Custom scrollbars ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg, #0d1014);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(55,71,79,0.25);
  border-radius: 4px;
  border: 1px solid transparent;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(55,71,79,0.45);
}
::-webkit-scrollbar-corner {
  background: var(--bg, #0d1014);
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(55,71,79,0.25) var(--bg, #0d1014);
}

:root {
  --bg: #0d1014;
  --surface: #161a22;
  --surface2: #242838;
  --text: #e2e4e9;
  --text-muted: #8b8fa3;
  --accent: #90A4AE;
  --accent-brand: #37474F;
  --accent-highlight: #B71C1C;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #C62828;
  --orange: #f97316;
  --border: #2d3148;
  --radius: 8px;
  --transition: 0.2s ease;
}

/* 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; }

/* 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 {
  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);
  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); }

/* 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 rgba(0,0,0,0.4);
  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); }

/* Pretruna Card — editorial register (serif title, mono kickers,
   severity left rail + tinted stance rails). */
.pretruna-card {
  --pc-mono:   'JetBrains Mono', ui-monospace, monospace;
  --pc-serif:  Georgia, 'Times New Roman', serif;
  --pc-muted:  #8b8fa3;
  --pc-border: #1f2432;
  --pc-severity: var(--yellow);
  background: var(--surface);
  border: 1px solid var(--pc-border);
  border-left: 3px solid var(--pc-severity);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.pretruna-card:hover {
  border-color: var(--pc-severity);
  transform: translateY(-1px);
}
.pretruna-card.severity-direct_contradiction { --pc-severity: #dc2626; }
.pretruna-card.severity-reversal            { --pc-severity: #f97316; }
.pretruna-card.severity-minor_shift         { --pc-severity: #eab308; }

.pretruna-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.pretruna-card .politician-name {
  font-family: var(--pc-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: #e2e4e9;
  text-decoration: none;
  display: inline;
}
.pretruna-card .politician-name:hover { color: var(--accent); }

.pretruna-card .party-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 0.6rem;
  font-family: var(--pc-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--pc-muted);
  text-decoration: none;
  vertical-align: 2px;
  transition: color 0.15s;
}
.pretruna-card .party-tag::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pc-party-color, var(--pc-muted));
}
.pretruna-card .party-tag:hover { color: #e2e4e9; }

.pretruna-card .severity-chip {
  font-family: var(--pc-mono);
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 3px;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--pc-severity);
  color: var(--pc-severity);
}

.pretruna-card .topic-tag {
  display: inline-block;
  font-family: var(--pc-mono);
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--pc-muted);
  padding: 0;
  margin-bottom: 0.9rem;
  background: transparent;
}

.pretruna-card .summary {
  margin-bottom: 1.1rem;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #c8ccd8;
  white-space: pre-line;
}

.pretruna-card .stances { display: grid; gap: 0.7rem; }
.pretruna-card .stance {
  background: transparent;
  border: 0;
  border-left: 2px solid var(--pc-border);
  border-radius: 0;
  padding: 0.2rem 0 0.2rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #c8ccd8;
}
.pretruna-card .stance-then { border-left-color: #3a4052; }
.pretruna-card .stance-now  { border-left-color: var(--pc-severity); }

.pretruna-card .stance-label {
  font-family: var(--pc-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pc-muted);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pretruna-card .stance-label a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.pretruna-card .stance-label a:hover { color: #e2e4e9; }
.pretruna-card .stance-label .stance-ext { opacity: 0.5; border: 0; font-size: 11px; }
.pretruna-card .stance-label .stance-ext:hover { opacity: 1; }

.pretruna-card .stance-date {
  font-family: var(--pc-mono);
  font-size: 10px;
  color: var(--pc-muted);
  margin-left: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.pretruna-card .stance-vote {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(127, 127, 127, 0.05);
  border-left: 2px solid var(--pc-border);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--pc-muted);
}
.pretruna-card .stance-vote strong {
  font-family: var(--pc-mono);
  font-size: 9px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--pc-severity);
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.pretruna-card .sources { margin-top: 0.75rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.pretruna-card .sources a { font-size: 0.8rem; color: var(--pc-muted); }
.pretruna-card .sources a:hover { color: var(--accent); }

/* 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 {
  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 { 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;
}

/* Vote card */
.vote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.vote-card .vote-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.vote-card .vote-motif { font-weight: 600; font-size: 1rem; flex: 1; }
.vote-card .vote-meta { color: var(--text-muted); font-size: 0.85rem; }
.vote-card .vote-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.75rem 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); }

/* 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); }

/* 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;
}
.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 */
.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.card-info {
  flex: 1;
  min-width: 0;
}
.card-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.card-role {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}
.card-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.stat-dot {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.card-last-activity {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.activity-date {
  font-variant-numeric: tabular-nums;
}
.activity-topic {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.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); }
.activity-link {
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.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: #e9a820; }
.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 */
.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; }

/* 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-feat {
  --af-mono:  'JetBrains Mono', ui-monospace, monospace;
  --af-serif: Georgia, 'Times New Roman', serif;
  --af-muted: #8b8fa3;
  --af-border: #1f2432;
  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: #0f1218;
}
.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); }
.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: #e2e4e9;
}
.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;
}

/* 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 { 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 h3 { 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);
}
.profile-stats-bar {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: 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-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.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;
  }
  .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; }
}

/* Alternative explanation on contradiction cards */
.alt-explanation {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #1f2432;
}
.alt-explanation summary {
  list-style: none;
  cursor: pointer;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #8b8fa3;
  transition: color 0.15s;
}
.alt-explanation summary::-webkit-details-marker { display: none; }
.alt-explanation summary:hover { color: #e2e4e9; }
.alt-explanation[open] summary { color: #e2e4e9; margin-bottom: 0.5rem; }
.alt-explanation-content {
  font-size: 0.85rem;
  color: #8b8fa3;
  line-height: 1.6;
  padding: 0;
  background: transparent;
}
.alt-explanation-content ul {
  margin: 0.5rem 0 0 1.25rem;
}
.alt-explanation-content li {
  margin-bottom: 0.25rem;
}

/* Persona cards (vertical) */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.6rem;
}
.persona-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
}
.persona-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.persona-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.85rem 0.6rem 0.4rem;
  text-decoration: none;
  color: inherit;
}
.persona-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.4rem;
  border: 2px solid var(--border);
}
.persona-avatar-ph {
  background: var(--surface2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}
.persona-name {
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.2;
  color: var(--text);
}
.persona-top:hover .persona-name { color: var(--accent); }
.persona-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  margin-top: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.persona-mid {
  padding: 0 0.6rem;
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  min-height: 1.4rem;
}
.persona-party-link {
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
a.persona-party-link:hover { border-color: var(--accent); color: var(--text); }
.persona-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem 0.25rem;
}
.persona-stats a { color: var(--text-muted); text-decoration: none; }
.persona-stats a:hover { color: var(--accent); }
.persona-stat-red { color: var(--red) !important; }
.persona-activity {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.15);
}

/* 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-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;
}
.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);
}
.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);
}
.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;
}
.activity-link {
  color: var(--accent);
  white-space: nowrap;
  margin-left: auto;
}

/* ── 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 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 rgba(45,49,72,0.4);
  border-right: 1px solid rgba(45,49,72,0.2);
  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: #22c55e;
}
.matrix-cell.vote-pret {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}
.matrix-cell.vote-atturas {
  background: rgba(234,179,8,0.15);
  color: #eab308;
}
.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 rgba(255,255,255,0.15);
}

/* 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%, rgba(144,164,174,0.05) 0%, transparent 70%),
    linear-gradient(180deg, var(--surface) 0%, #131721 100%);
  border: 1px solid var(--border);
  overflow: hidden;
}
.hero-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.02) 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; }

.hero-v2-chip {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.85rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(13,16,20,0.55);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  z-index: 2;
}
.hero-v2-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(144,164,174,0.12);
}

.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: rgba(13,16,20,0.45);
  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: rgba(144,164,174,0.32);
  background: rgba(13,16,20,0.7);
}
.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: rgba(13,16,20,0.55);
  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 rgba(183,28,28,0.55); }
  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 rgba(13,16,20,0.7);
}
.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;
  }
  .hero-v2-chip {
    top: 0.7rem;
    right: 0.7rem;
    font-size: 0.68rem;
    padding: 0.25rem 0.6rem;
  }
  .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; }
  .hero-v2-ticker-row { font-size: 0.74rem; gap: 0.4rem; }
  .hero-v2-ticker-stance { display: none; }
}

/* ===== 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: #8b8fa3;
  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 #1f2432;
}
.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: #8b8fa3;
  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: #e2e4e9;
}
@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: #8b8fa3;
  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%;
  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-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;
  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: #1f2432;
  --xv1-border:      #2d3148;
  --xv1-surface:     #161a22;
  --xv1-surface-hi:  #242838;
  --xv1-text:        #e2e4e9;
  --xv1-text-muted:  #8b8fa3;
  --xv1-text-dim:    #5e6478;
  --xv1-brand-red:   #B71C1C;
  --xv1-green:       #22c55e;
  --xv1-red-trend:   #e25b5b;
  --xv1-mono:        'JetBrains Mono', ui-monospace, monospace;
  --xv1-serif:       Georgia, 'Times New Roman', serif;

  font-family: var(--xv1-serif);
  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(--xv1-mono);
  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(--xv1-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
}
.xv1-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;
}

/* ---- 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(--xv1-mono);
  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(--xv1-mono);
  font-size: 10px;
  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(--xv1-serif);
  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(--xv1-mono);
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 2px;
}
.xv1-mention-count {
  font-family: var(--xv1-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.xv1-mention-trend {
  font-family: var(--xv1-mono);
  font-size: 10px;
  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(--xv1-serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.15px;
  margin-bottom: 3px;
  display: block;
}
.xv1-topic-meta {
  font-family: var(--xv1-mono);
  font-size: 10px;
  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(--xv1-mono);
  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(--xv1-mono);
  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(--xv1-mono);
  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(--xv1-mono);
  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(--xv1-mono);
  font-size: 10px;
  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 rgba(0, 0, 0, 0.6);
  font-family: var(--xv1-mono);
  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(--xv1-mono);
  font-size: 10px;
  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: 9px;
  color: var(--xv1-text-muted);
}
.xv1-item-kind.is-post { color: var(--xv1-brand-red); }
.xv1-item-date { color: var(--xv1-text-dim); font-size: 9px; }

.xv1-item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.xv1-item-author {
  font-family: var(--xv1-serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.15px;
}
.xv1-item-handle {
  font-family: var(--xv1-mono);
  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(--xv1-mono);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--xv1-text-muted);
  cursor: pointer;
}
.xv1-item-at:hover,
.xv1-item-party:hover { text-decoration: underline; filter: brightness(1.2); }
.xv1-item-handle-sep {
  font-family: var(--xv1-mono);
  font-size: 10px;
  color: var(--xv1-text-dim);
}
.xv1-item-mentionedby {
  font-family: var(--xv1-serif);
  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(--xv1-mono);
  font-size: 10px;
  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: brightness(1.1);
}

.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: #1f2432;
  --xv1-text-muted:  #8b8fa3;
  --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: #1f2432;
  --xv1-text-muted:  #8b8fa3;
  --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: #e2e4e9;
}
.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: #8b8fa3;
  --pt-accent: #B71C1C;
  display: flex;
  gap: 0;
  border-bottom: 1px solid #1f2432;
  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: #e2e4e9; }
.pagehead-tab.active {
  color: #e2e4e9;
  border-bottom-color: var(--pt-accent);
}
.pagehead-tab-count {
  font-family: var(--pt-mono);
  font-size: 10px;
  color: var(--pt-muted);
  font-variant-numeric: tabular-nums;
}
.pagehead-tab.active .pagehead-tab-count { color: var(--pt-accent); }

/* ---- Grid ---- */
.pzv1-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: start;
}

/* ---- Aside (sticky filter rail) ---- */
.pzv1-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 {
  margin-bottom: 22px;
}
.pzv1-rail-title {
  font-family: var(--xv1-mono);
  font-size: 9px;
  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 { display: flex; flex-direction: column; }

.pzv1-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(--xv1-serif);
  font-size: 13px;
  color: var(--xv1-text-muted);
  cursor: pointer;
  transition: color 80ms ease, background 80ms ease;
}
.pzv1-rail-row:hover {
  color: var(--xv1-text);
  background: var(--xv1-surface);
}
.pzv1-rail-row.is-active {
  color: var(--xv1-text);
  font-weight: 500;
  border-left-color: var(--xv1-brand-red);
}
.pzv1-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 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.pzv1-rail-count {
  font-family: var(--xv1-mono);
  font-size: 10px;
  color: var(--xv1-text-dim);
  font-variant-numeric: tabular-nums;
}
.pzv1-rail-more {
  font-family: var(--xv1-mono);
  font-size: 9px;
  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(--xv1-serif);
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
}
.pzv1-rail-search-input:focus {
  border-color: var(--xv1-border);
}
.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 { min-width: 0; }

.pzv1-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--xv1-border-soft);
}
.pzv1-search-icon {
  width: 14px;
  height: 14px;
  color: var(--xv1-text-dim);
  flex-shrink: 0;
}
.pzv1-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--xv1-text);
  font-family: var(--xv1-serif);
  font-size: 15px;
  font-style: italic;
  padding: 4px 0;
  outline: none;
  letter-spacing: -0.1px;
}
.pzv1-search-input:not(:placeholder-shown) { font-style: normal; }
.pzv1-clear-chip {
  font-family: var(--xv1-mono);
  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 { color: var(--xv1-text); }

.pzv1-sortbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--xv1-border-soft);
  font-family: var(--xv1-mono);
  font-size: 10px;
  color: var(--xv1-text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.pzv1-showing { font-variant-numeric: tabular-nums; }
.pzv1-showing #pzv1-shown, .pzv1-showing #pzv1-total { color: var(--xv1-text); }
.pzv1-sortbar-spacer { flex: 1; }
.pzv1-sortbar-label { letter-spacing: 0.8px; }
.pzv1-sortbtn {
  font-family: var(--xv1-mono);
  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 { color: var(--xv1-text); }
.pzv1-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(--xv1-mono);
  font-size: 9px;
  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(--xv1-serif);
  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(--xv1-mono);
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 3px;
}
.pzv1-row-topic-chip {
  font-family: var(--xv1-mono);
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 6px;
  display: inline-block;
  border: 1px solid;
  cursor: pointer;
  color: var(--topic-color, #8b8fa3);
  border-color: color-mix(in srgb, var(--topic-color, #8b8fa3) 33%, transparent);
  background: color-mix(in srgb, var(--topic-color, #8b8fa3) 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, #8b8fa3);
  border-color: var(--topic-color, #8b8fa3);
  color: #0b0d14;
  transform: translateY(-1px);
}
.pzv1-row-stance-tag {
  font-family: var(--xv1-mono);
  font-size: 9px;
  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(--xv1-mono);
  font-size: 10px;
  color: var(--xv1-text-muted);
  text-align: right;
  letter-spacing: 0.4px;
}
.pzv1-row-confidence {
  font-family: var(--xv1-mono);
  font-size: 10px;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}
.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(--xv1-serif);
  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(--xv1-mono);
  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;
}

/* ---- 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 { grid-template-columns: 1fr; }
  .pzv1-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 + X) ---- */
.pzv1-mobile-filterbar,
.xv1-mobile-filterbar {
  display: none;
}

@media (max-width: 900px) {
  .pzv1-mobile-filterbar,
  .xv1-mobile-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 16px 0 12px;
  }
  .pzv1-mobile-chips,
  .xv1-mobile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .pzv1-grid[data-mobile-filter-open="false"] .pzv1-aside { display: none; }
  .xv1-aside { display: none; }
  .pzv1-mobile-toggle,
  .xv1-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-family: var(--xv1-mono);
    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,
  .xv1-mobile-toggle:hover {
    background: var(--xv1-surface-hi);
    border-color: var(--xv1-text-muted);
  }
  .pzv1-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,
  .xv1-mobile-count {
    color: var(--xv1-text-dim);
    font-weight: inherit;
  }
  .pzv1-chip,
  .xv1-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-family: var(--xv1-mono);
    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,
  .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,
  .xv1-mobile-clearall {
    background: transparent;
    border: none;
    padding: 4px 6px;
    font-family: var(--xv1-mono);
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--xv1-text-muted);
    cursor: pointer;
  }
  .pzv1-mobile-clearall:hover,
  .xv1-mobile-clearall:hover {
    color: var(--xv1-text);
  }
}
