/* Politilens — styles.css
   Theming via CSS variables. Tweaks panel toggles classes on .app:
   - .dir-sobre / .dir-editorial  → typography & accent
   - .dark / .light               → palette
   - .dens-compact / .dens-aere   → spacing scale
*/

:root {
  --ff-serif: "Newsreader", ui-serif, Georgia, serif;
  --ff-sans:  "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --ff-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── Theme tokens ──────────────────────────────────────────────────── */
.app.light {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --surface-3: #efece5;
  --ink: #14110b;
  --ink-1: #14110b;
  --ink-2: #3a352b;
  --ink-3: #6d6759;
  --ink-4: #9b9482;
  --line: #e3dfd4;
  --line-2: #d4cfc1;
  --accent: #14110b;
  --accent-ink: #faf8f3;
  --pos: #2c7a3c;
  --neg: #c0392b;
  --abs: #8a8270;
  --absent: #c9c3b3;
  --highlight: #fff7cc;
  --link: #1d4ed8;
  --warn: #b45309;
}
.app.dark {
  --bg: #0e0d0a;
  --surface: #18170f;
  --surface-2: #1f1d14;
  --surface-3: #2a2719;
  --ink: #f3eedd;
  --ink-1: #f3eedd;
  --ink-2: #d8d2bd;
  --ink-3: #9c9582;
  --ink-4: #6a6453;
  --line: #2c2a1f;
  --line-2: #3a3727;
  --accent: #f3eedd;
  --accent-ink: #14110b;
  --pos: #6dca7c;
  --neg: #ef7b6e;
  --abs: #bcb29a;
  --absent: #4d4838;
  --highlight: #5a4d18;
  --link: #93b4ff;
  --warn: #f0b056;
}

/* Sobre vs Éditorial */
.app.dir-sobre {
  --h-font: var(--ff-sans);
  --h-weight: 600;
  --h-tracking: -0.01em;
  --h-italic: normal;
  --display-font: var(--ff-sans);
  --display-weight: 700;
  --display-tracking: -0.02em;
}
.app.dir-editorial {
  --h-font: var(--ff-serif);
  --h-weight: 500;
  --h-tracking: -0.015em;
  --h-italic: italic;
  --display-font: var(--ff-serif);
  --display-weight: 400;
  --display-tracking: -0.02em;
}

/* Density */
.app.dens-compact { --s: 6px; --row-pad: 10px 14px; --card-pad: 14px; --gap: 10px; }
.app.dens-aere    { --s: 8px; --row-pad: 18px 20px; --card-pad: 22px; --gap: 18px; }

/* ─── Layout primitives ────────────────────────────────────────────── */
.app {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  transition: background .25s, color .25s;
}

.shell { max-width: 1280px; margin: 0 auto; padding: 28px 32px 80px; }
.shell-narrow { max-width: 980px; margin: 0 auto; padding: 28px 32px 80px; }

.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 32px; border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.brand {
  font-family: var(--display-font);
  font-weight: var(--display-weight);
  font-size: 22px; letter-spacing: var(--display-tracking);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.brand .dot { width: 10px; height: 10px; border-radius: 2px; background: var(--accent);
              display: inline-block; }
.app.dir-editorial .brand em { font-style: italic; font-weight: 400; color: var(--ink-3); }

.topbar-spacer { flex: 1; }
.topbar-link {
  font-size: 13px; color: var(--ink-3); cursor: pointer;
  padding: 6px 10px; border-radius: 6px;
}
.topbar-link:hover { background: var(--surface-2); color: var(--ink); }

/* ─── Search hero ──────────────────────────────────────────────────── */
.hero {
  padding: 56px 0 24px;
}
.hero h1 {
  font-family: var(--display-font);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  margin: 0 0 14px;
  text-wrap: pretty;
  max-width: 920px;
}
.app.dir-editorial .hero h1 em { font-style: italic; color: var(--ink-2); font-weight: 400; }
.hero p.lede {
  font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 620px;
  margin: 0 0 32px;
}
.app.dir-editorial .hero p.lede { font-family: var(--ff-serif); font-size: 19px; }

.search-wrap {
  position: relative;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 14px;
  padding: 6px 6px 6px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 8px 28px -16px rgba(0,0,0,.18);
  transition: border-color .15s;
}
.search-wrap:focus-within { border-color: var(--ink-2); }
.search-wrap svg.search-ic { width: 20px; height: 20px; flex-shrink: 0; color: var(--ink-3); }
.search-wrap input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 18px; padding: 16px 0; color: var(--ink);
  font-family: var(--ff-sans);
}
.search-wrap input::placeholder { color: var(--ink-4); }
.search-wrap .kbd {
  font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3);
  background: var(--surface-3); padding: 3px 7px; border-radius: 4px;
  border: 1px solid var(--line);
}
.search-wrap .clear {
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
  font-size: 13px; padding: 8px 10px; border-radius: 8px;
}

/* Autocomplete dropdown */
.ac {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 12px; box-shadow: 0 14px 48px -12px rgba(0,0,0,.18);
  overflow: hidden; z-index: 5;
}
.ac-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line);
}
.ac-row:last-child { border-bottom: 0; }
.ac-row:hover, .ac-row.active { background: var(--surface-2); }
.ac-row .avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.ac-row .ac-name { font-weight: 500; }
.ac-row .ac-meta { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.ac-row .ac-side { margin-left: auto; }

/* ─── Filter chips ─────────────────────────────────────────────────── */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 22px 0 8px;
}
.filter-group {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 4px 6px 4px 12px;
  font-size: 13px; cursor: pointer;
  position: relative;
}
.filter-group:hover { border-color: var(--ink-3); }
.filter-group .lab { color: var(--ink-3); }
.filter-group .count {
  background: var(--ink); color: var(--accent-ink);
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  min-width: 18px; text-align: center;
}
.filter-group .caret { color: var(--ink-3); width: 12px; height: 12px; }
.filter-clear {
  font-size: 12px; color: var(--ink-3); cursor: pointer; padding: 6px 8px;
  border-radius: 999px;
}
.filter-clear:hover { background: var(--surface-2); color: var(--ink); }

.filter-pop {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 10px; min-width: 240px; z-index: 6;
  box-shadow: 0 14px 48px -12px rgba(0,0,0,.18);
  display: flex; flex-direction: column; gap: 4px;
  max-height: 320px; overflow: auto;
}
.filter-pop label {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; cursor: pointer;
  font-size: 13px; border-radius: 6px; color: var(--ink);
}
.filter-pop label:hover { background: var(--surface-2); }
.filter-pop input[type=checkbox] { accent-color: var(--ink); }

/* slider (presence) */
.slider-pop { padding: 16px; min-width: 280px; }
.slider-pop input[type=range] { width: 100%; accent-color: var(--ink); }
.slider-pop .slider-val { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); }

/* ─── Results grid ─────────────────────────────────────────────────── */
.results {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap, 14px); margin-top: 28px;
}
.app.dens-compact .results { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.result-empty {
  text-align: center; color: var(--ink-3); padding: 80px 20px;
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--card-pad, 18px);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.card:hover { border-color: var(--ink-3); }
.card .card-top { display: flex; align-items: center; gap: 12px; }
.card .avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.card .name {
  font-family: var(--h-font); font-weight: var(--h-weight);
  letter-spacing: var(--h-tracking); font-size: 19px; line-height: 1.15;
}
.card .meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.card .mandate-row {
  font-size: 13px; line-height: 1.4; color: var(--ink-2);
  border-top: 1px dashed var(--line); padding-top: 10px;
}
.card .mandate-row strong { font-weight: 600; color: var(--ink); }
.card .stat-row { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.card .stat-row b { color: var(--ink); font-family: var(--ff-mono); font-weight: 500; }
.card .pres-bar {
  height: 3px; background: var(--surface-3); border-radius: 999px; overflow: hidden;
  margin-top: 2px;
}
.card .pres-bar > i { display: block; height: 100%; background: var(--accent); }

/* Party chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
  letter-spacing: .01em;
  font-family: var(--ff-sans);
}
.chip.chip-block {
  display: inline-block; padding: 4px 9px; border-radius: 4px;
}

/* Mandate tag */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  background: var(--surface-3); color: var(--ink-2);
  font-family: var(--ff-mono); letter-spacing: .02em;
  text-transform: uppercase;
}

/* ─── Detail page ──────────────────────────────────────────────────── */
.back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-3); cursor: pointer;
  padding: 6px 10px; border-radius: 6px; margin-bottom: 16px;
}
.back:hover { background: var(--surface-2); color: var(--ink); }

.profile-head {
  display: grid; grid-template-columns: 168px 1fr auto;
  gap: 28px; align-items: start;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--line);
}
.profile-head .photo {
  width: 168px; height: 168px; border-radius: 12px;
  background: var(--surface-2);
  position: relative; overflow: hidden;
}
.profile-head .photo .avatar-lg {
  width: 100%; height: 100%; display: block;
}
.profile-head .photo .party-stripe {
  position: absolute; bottom: 0; left: 0; right: 0; height: 8px;
}
.profile-head h1 {
  font-family: var(--display-font);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1; margin: 0 0 14px;
}
.profile-head .subline {
  font-size: 14px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  margin-bottom: 10px;
}
.profile-head .mandate-line {
  font-family: var(--h-font); font-weight: 500;
  font-size: 18px; color: var(--ink-2);
  margin-top: 6px;
}
.profile-head .bio {
  font-size: 14px; line-height: 1.55; color: var(--ink-2);
  max-width: 600px; margin-top: 14px;
}
.app.dir-editorial .profile-head .bio { font-family: var(--ff-serif); font-size: 16px; }
.profile-head .actions { display: flex; flex-direction: column; gap: 8px; }
.btn {
  border: 1px solid var(--line-2); background: var(--surface);
  padding: 8px 14px; border-radius: 8px; font: inherit; font-size: 13px;
  color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--ink-3); }
.btn.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.btn-primary:hover { opacity: .9; }

/* Key stats strip */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.stat-cell {
  padding: 22px 24px 22px 0;
  border-right: 1px solid var(--line);
}
.stat-cell:last-child { border-right: 0; }
.stat-cell .lab {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin-bottom: 6px; font-weight: 500;
}
.stat-cell .val {
  font-family: var(--h-font); font-weight: var(--h-weight);
  letter-spacing: var(--h-tracking); font-size: 28px; line-height: 1;
}
.app.dens-compact .stat-cell { padding: 14px 18px 14px 0; }
.app.dens-compact .stat-cell .val { font-size: 22px; }

/* Tabs */
.tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--line);
  margin-bottom: 24px; overflow-x: auto;
  /* Ombre dégradée à droite pour signaler qu'il y a plus d'onglets à scroller */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 2px; }
.tabs .tab { scroll-snap-align: start; }
.tab {
  padding: 12px 18px; cursor: pointer; font-size: 14px;
  color: var(--ink-3); border-bottom: 2px solid transparent;
  white-space: nowrap; transition: color .12s, border-color .12s;
  font-family: var(--h-font); font-weight: 500;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab .badge {
  margin-left: 6px; font-family: var(--ff-mono); font-size: 11px;
  color: var(--ink-3); font-weight: 400;
}
.tab.active .badge { color: var(--ink-2); }

/* Sidebar layout */
.detail.layout-sidebar { display: grid; grid-template-columns: 220px 1fr; gap: 36px; }
.detail.layout-sidebar .sidenav {
  position: sticky; top: 76px; align-self: start;
  display: flex; flex-direction: column; gap: 1px;
  border-left: 1px solid var(--line);
}
.detail.layout-sidebar .sidenav .tab {
  border-bottom: 0; border-left: 2px solid transparent;
  margin-left: -1px; padding: 10px 16px; text-align: left;
}
.detail.layout-sidebar .sidenav .tab.active { border-left-color: var(--accent); }

/* Long-scroll sections */
.section-h {
  font-family: var(--h-font); font-weight: var(--h-weight);
  letter-spacing: var(--h-tracking); font-size: 22px; margin: 32px 0 16px;
  display: flex; align-items: baseline; gap: 12px;
}
.section-h .count {
  font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3);
  font-weight: 400;
}
.section-anchor { scroll-margin-top: 100px; }

/* ─── Votes ────────────────────────────────────────────────────────── */
.votes-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.votes-toolbar .search-mini {
  flex: 1; min-width: 200px; max-width: 320px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 8px; padding: 6px 10px;
}
.votes-toolbar .search-mini input {
  border: 0; background: transparent; outline: 0; font: inherit;
  font-size: 13px; flex: 1; color: var(--ink);
}
.votes-toolbar .seg { display: flex; gap: 0; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.votes-toolbar .seg button {
  border: 0; background: transparent; padding: 6px 12px; font: inherit; font-size: 12px;
  cursor: pointer; color: var(--ink-3); border-right: 1px solid var(--line-2);
}
.votes-toolbar .seg button:last-child { border-right: 0; }
.votes-toolbar .seg button.active { background: var(--surface-3); color: var(--ink); }

/* Vote row */
.vote-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  padding: var(--row-pad, 16px 0);
  border-top: 1px solid var(--line);
  align-items: center;
  cursor: pointer;
  position: relative;
}
.vote-row:hover { background: var(--surface-2); }
.vote-row:hover .vote-title { color: var(--ink); }
.vote-row .vote-icons {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--ff-mono);
}
.vote-row .vote-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-3);
}
.vote-row .vote-date { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); min-width: 78px; }
.vote-row .vote-title {
  font-family: var(--h-font); font-weight: 500;
  letter-spacing: var(--h-tracking); font-size: 16px;
  line-height: 1.35; color: var(--ink-2); transition: color .1s;
  margin-bottom: 4px;
}
.app.dir-editorial .vote-row .vote-title { font-size: 18px; }
.vote-row .theme-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); font-weight: 600;
}
.vote-row .divergence {
  font-size: 11px; color: var(--warn); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}

/* Position dot */
.pdot {
  width: 18px; height: 18px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: white;
  font-family: var(--ff-mono); position: relative;
}
.pdot[data-v=P] { background: var(--pos); }
.pdot[data-v=C] { background: var(--neg); }
.pdot[data-v=A] { background: var(--abs); }
.pdot[data-v="-"] { background: transparent; color: var(--ink-4); border: 1px dashed var(--line-2); }
.pdot.pdot-round { border-radius: 50%; }
.pdot.pdot-small { width: 12px; height: 12px; font-size: 0; }

.icon-stack {
  display: flex; align-items: center; gap: 3px;
  background: var(--surface-2); border-radius: 6px; padding: 4px;
}
.icon-stack .leg { font-size: 9px; color: var(--ink-4); padding: 0 2px;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* Vote summary chart */
.vote-chart {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; background: var(--surface);
  margin-bottom: 18px;
}
.vote-chart h4 { font-size: 12px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3); margin: 0 0 12px; font-weight: 600; }
.vote-chart .legend {
  display: flex; gap: 16px; font-size: 12px; color: var(--ink-3);
  margin-bottom: 14px; flex-wrap: wrap;
}
.vote-chart .legend i {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 6px; vertical-align: -1px;
}
.bars-row {
  display: grid; grid-template-columns: 70px 1fr 60px; gap: 12px; align-items: center;
  font-size: 13px; padding: 6px 0;
}
.bars-row .lab { color: var(--ink-2); font-weight: 500; }
.bars-row .pct { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); text-align: right; }
.bars-bar {
  display: flex; height: 14px; border-radius: 3px; overflow: hidden;
  background: var(--surface-3);
}
.bars-bar > span { display: block; height: 100%; }
.bars-bar .bp { background: var(--pos); }
.bars-bar .bc { background: var(--neg); }
.bars-bar .ba { background: var(--abs); }
.bars-bar .bx { background: var(--absent); }

/* Dots viz */
.dots-grid {
  display: grid; grid-template-columns: repeat(auto-fill, 14px); gap: 4px;
}
.dot-cell {
  width: 14px; height: 14px; border-radius: 2px;
}

/* Heatmap viz */
.heat-row {
  display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center;
  font-size: 12px; padding: 3px 0;
}
.heat-cells { display: flex; gap: 3px; flex-wrap: wrap; }
.heat-cell {
  width: 22px; height: 22px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-size: 10px; color: white; font-weight: 600;
  cursor: pointer;
}

/* ─── Vote detail modal ────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.4);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 20px 40px; overflow-y: auto;
}
.app.dark .modal-bg { background: rgba(0,0,0,.6); }
.modal {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 14px; max-width: 680px; width: 100%;
  padding: 32px;
  box-shadow: 0 32px 80px -20px rgba(0,0,0,.45);
}
.modal h2 {
  font-family: var(--h-font); font-weight: var(--h-weight);
  letter-spacing: var(--h-tracking); font-size: 24px; margin: 8px 0 6px;
  line-height: 1.25;
}
.modal .modal-meta {
  font-size: 12px; color: var(--ink-3); display: flex; gap: 12px;
  margin-bottom: 18px;
}
.modal .modal-text { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin-bottom: 20px; }
.app.dir-editorial .modal .modal-text { font-family: var(--ff-serif); font-size: 16px; }
.modal h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); margin: 18px 0 10px; font-weight: 600; }
.modal .position-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.modal .pcol { padding: 14px 16px; border-right: 1px solid var(--line); }
.modal .pcol:last-child { border-right: 0; }
.modal .pcol .lab { font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin-bottom: 8px; font-weight: 600; }
.modal .pcol .pval {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--h-font); font-weight: 500; font-size: 15px;
}
.modal .pcol .pval .pdot { width: 22px; height: 22px; font-size: 12px; }
.modal-close {
  border: 0; background: transparent; color: var(--ink-3);
  font-size: 20px; cursor: pointer; padding: 4px 10px; border-radius: 6px;
  float: right;
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }

/* ─── Amendments / Actions list ────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list-row {
  display: grid; grid-template-columns: 90px 1fr auto;
  gap: 18px; padding: var(--row-pad, 16px 0);
  border-top: 1px solid var(--line); align-items: center;
}
.list-row .date { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); }
.list-row .title {
  font-family: var(--h-font); font-weight: 500;
  font-size: 15px; line-height: 1.4; color: var(--ink); margin-bottom: 3px;
}
.list-row .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 10px; align-items: center; }
.status {
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .04em;
  font-weight: 600;
}
.status-pos { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); }
.status-neg { background: color-mix(in srgb, var(--neg) 18%, transparent); color: var(--neg); }
.status-mid { background: var(--surface-3); color: var(--ink-3); }

/* Themes pill row */
.themes-row { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-pill {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2);
}

/* Section divider */
.divider { height: 1px; background: var(--line); margin: 28px 0; border: 0; }

/* Misc */
.muted { color: var(--ink-3); }
.tabular { font-variant-numeric: tabular-nums; font-family: var(--ff-mono); }

/* Mode-comparaison off → hide group/party icons */
.app.no-compare .vote-row .vote-icons .pdot.g,
.app.no-compare .vote-row .vote-icons .pdot.pa,
.app.no-compare .vote-row .vote-icons .lab-g,
.app.no-compare .vote-row .vote-icons .lab-pa { display: none; }

/* Selected option indication on detail title */
.app.dir-editorial h1, .app.dir-editorial h2, .app.dir-editorial h3, .app.dir-editorial h4 {
  font-family: var(--h-font); font-weight: var(--h-weight); letter-spacing: var(--h-tracking);
}

/* small screens */
@media (max-width: 720px) {
  .shell, .shell-narrow { padding: 18px 16px 60px; }
  .topbar { padding: 12px 16px; }
  .profile-head { grid-template-columns: 92px 1fr; }
  .profile-head .photo { width: 92px; height: 92px; }
  .profile-head .actions { grid-column: 1 / -1; flex-direction: row; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-cell:nth-child(2) { border-right: 0; }
  .detail.layout-sidebar { grid-template-columns: 1fr; }
  .detail.layout-sidebar .sidenav { position: static; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); }
  .detail.layout-sidebar .sidenav .tab { border-left: 0; border-bottom: 2px solid transparent; margin-left: 0; }
  .detail.layout-sidebar .sidenav .tab.active { border-bottom-color: var(--accent); border-left-color: transparent; }
  .vote-row { grid-template-columns: 1fr; gap: 6px; }
  .list-row { grid-template-columns: 1fr; gap: 4px; }
}
