/* ============================================================
   PrajaPulse, AI Political Intelligence Platform
   Design system: voter-ink indigo + warm paper, Anek Latin /
   Hanken Grotesk / Spline Sans Mono, validated dataviz palette.
   ============================================================ */

:root {
  color-scheme: light;
  /* ground + surfaces */
  --page: #f5f4ef;
  --surface: #fdfdfa;
  --surface-2: #f0efe8;
  --surface-3: #e9e8df;
  /* ink */
  --ink: #191813;
  --ink-2: #55534a;
  --muted: #8b887c;
  --faint: #b3b0a3;
  /* hairlines */
  --line: #e4e2d7;
  --line-soft: #edece3;
  /* brand: voter-ink indigo */
  --brand: #43409c;
  --brand-hover: #37347f;
  --brand-ink: #3b3890;
  --brand-soft: #e9e8f6;
  --brand-wash: #f2f1fa;
  --on-brand: #ffffff;
  /* marigold accent, LIVE + tour only */
  --accent: #d07c14;
  --accent-strong: #b96a08;
  --accent-soft: #f9ecd8;
  /* sentiment (diverging green <-> red, neutral gray) */
  --pos: #12a15e;
  --neg: #e34948;
  --neu: #a5a294;
  --pos-text: #0b7a45;
  --neg-text: #c03230;
  /* categorical series (validated reference palette, light) */
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  /* ordinal ramp steps (blue) */
  --ramp-250: #86b6ef;
  --ramp-350: #5598e7;
  --ramp-450: #2a78d6;
  --ramp-550: #1c5cab;
  /* status (reserved) */
  --good: #0ca30c;
  --good-text: #006300;
  --warn: #fab219;
  --serious: #ec835a;
  --crit: #d03b3b;
  /* chart chrome */
  --grid: #e3e2da;
  --map-stroke: #55536b;
  --axis: #c6c4b9;
  /* nav rail (committed dark in both themes) */
  --nav-bg: #16152b;
  --nav-bg-2: #1d1c38;
  --nav-ink: #cbc9e4;
  --nav-ink-2: #8e8cb5;
  --nav-active-bg: rgba(255, 255, 255, 0.08);
  --nav-active-ink: #ffffff;
  --nav-line: rgba(255, 255, 255, 0.09);
  --nav-brand: #a9a5f2;
  /* corners */
  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 13px;
  /* elevation */
  --shadow-sm: 0 1px 2px rgba(25, 24, 19, 0.05);
  --shadow-1: 0 1px 2px rgba(25, 24, 19, 0.05), 0 6px 18px -10px rgba(25, 24, 19, 0.16);
  --shadow: 0 1px 2px rgba(25, 24, 19, 0.04), 0 10px 28px -14px rgba(25, 24, 19, 0.14);
  --shadow-lg: 0 2px 6px rgba(25, 24, 19, 0.06), 0 24px 60px -24px rgba(25, 24, 19, 0.28);
  /* type */
  --font-display: "Anek Latin", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0e0e12;
    --surface: #17171d;
    --surface-2: #1e1e26;
    --surface-3: #26262f;
    --ink: #f0efe8;
    --ink-2: #bdbcb1;
    --muted: #8b897f;
    --faint: #605e55;
    --line: #2a2a33;
    --line-soft: #22222a;
    --brand: #5f5ad2;
    --brand-hover: #7370dd;
    --brand-ink: #a5a1f0;
    --brand-soft: #26254a;
    --brand-wash: #1d1d33;
    --on-brand: #ffffff;
    --accent: #e79a33;
    --accent-strong: #f0ab4e;
    --accent-soft: #2e2417;
    --pos: #2cb576;
    --neg: #e66767;
    --neu: #6f6d63;
    --pos-text: #58d095;
    --neg-text: #ef8b8b;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --s5: #d55181;
    --ramp-250: #86b6ef;
    --ramp-350: #5598e7;
    --ramp-450: #3987e5;
    --ramp-550: #6da7ec;
    --good: #0ca30c;
    --good-text: #0ca30c;
    --warn: #fab219;
    --serious: #ec835a;
    --crit: #d03b3b;
    --grid: #2c2c34;
  --map-stroke: #17171d;
    --map-stroke: #17171d;
    --axis: #3c3c45;
    --nav-bg: #111020;
    --nav-bg-2: #17162b;
    --nav-ink: #c5c3de;
    --nav-ink-2: #83819f;
    --nav-active-bg: rgba(255, 255, 255, 0.09);
    --nav-active-ink: #ffffff;
    --nav-line: rgba(255, 255, 255, 0.08);
    --nav-brand: #a9a5f2;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px -10px rgba(0, 0, 0, 0.55);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 30px -14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.45), 0 28px 70px -24px rgba(0, 0, 0, 0.65);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0e0e12;
  --surface: #17171d;
  --surface-2: #1e1e26;
  --surface-3: #26262f;
  --ink: #f0efe8;
  --ink-2: #bdbcb1;
  --muted: #8b897f;
  --faint: #605e55;
  --line: #2a2a33;
  --line-soft: #22222a;
  --brand: #5f5ad2;
  --brand-hover: #7370dd;
  --brand-ink: #a5a1f0;
  --brand-soft: #26254a;
  --brand-wash: #1d1d33;
  --on-brand: #ffffff;
  --accent: #e79a33;
  --accent-strong: #f0ab4e;
  --accent-soft: #2e2417;
  --pos: #2cb576;
  --neg: #e66767;
  --neu: #6f6d63;
  --pos-text: #58d095;
  --neg-text: #ef8b8b;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --s5: #d55181;
  --ramp-250: #86b6ef;
  --ramp-350: #5598e7;
  --ramp-450: #3987e5;
  --ramp-550: #6da7ec;
  --good: #0ca30c;
  --good-text: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --crit: #d03b3b;
  --grid: #2c2c34;
  --axis: #3c3c45;
  --nav-bg: #111020;
  --nav-bg-2: #17162b;
  --nav-ink: #c5c3de;
  --nav-ink-2: #83819f;
  --nav-active-bg: rgba(255, 255, 255, 0.09);
  --nav-active-ink: #ffffff;
  --nav-line: rgba(255, 255, 255, 0.08);
  --nav-brand: #a9a5f2;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px -10px rgba(0, 0, 0, 0.55);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 30px -14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.45), 0 28px 70px -24px rgba(0, 0, 0, 0.65);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 650; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 2px;
  border-radius: 4px;
}
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
svg[hidden] { display: none !important; }
::selection { background: var(--brand-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- app shell ---------- */
.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- sidebar ---------- */
.sidebar {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.028' stroke-width='1.4'%3E%3Cpath d='M-20 40 Q60 10 120 44 T260 38'/%3E%3Cpath d='M-20 92 Q70 60 130 96 T260 90'/%3E%3Cpath d='M-20 146 Q60 112 124 148 T260 142'/%3E%3Cpath d='M-20 200 Q72 166 128 202 T260 196'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--nav-bg-2), var(--nav-bg) 42%);
  background-color: var(--nav-bg);
  color: var(--nav-ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  scrollbar-width: thin;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--nav-line);
}
.brand-mark {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px;
  background: linear-gradient(145deg, #504bb8, #37347f);
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 4px 12px -4px rgba(0,0,0,.5);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17.5px;
  letter-spacing: 0.01em;
  color: #fff;
  line-height: 1.1;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nav-ink-2);
  margin-top: 3px;
  font-weight: 600;
}
.nav-group { padding: 14px 10px 4px; }
.nav-group + .nav-group { margin-top: 2px; }
.nav-label {
  display: flex; align-items: center;
  font-family: var(--font-display);
  font-size: 12.5px;
  /* four group names now, and "Political Intelligence" is the longest of them.
     Tracking is tuned so every one holds a single line at the rail's width. */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: #fff;
  padding: 4px 10px 10px;
  opacity: 1;
  gap: 7px;
  white-space: nowrap;
}
.nl-bar { width: 3px; height: 14px; border-radius: 2px; background: var(--accent); flex: none; }
.nav-label.ai .nl-bar { background: linear-gradient(180deg, #a98ff0 0%, #6f63d8 100%); }
.nav-group { padding-top: 4px; }
.nav-label svg { width: 13px; height: 13px; }
/* the AI group is its own zone, marked off from Monitor and Operate */
.nav-group.nav-ai + .nav-group.nav-ai { border-top: none; }
.nav-group.nav-ai {
  border-top: 1px solid rgba(255,255,255,.09);
  border-bottom: 1px solid rgba(255,255,255,.09);
  padding: 14px 0 12px;
  margin: 4px 0;
  background: rgba(255,255,255,.028);
}
.nav-label.ai { color: #b9b4f2; }
.nav-item.nav-cta {
  margin-top: 6px;
  background: linear-gradient(135deg, var(--brand) 0%, #5b57c4 100%);
  color: #fff; font-weight: 650;
}
.nav-item.nav-cta:hover { filter: brightness(1.08); }
.nav-item.nav-cta svg { color: #fff; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8.5px 10px;
  border-radius: 9px;
  color: var(--nav-ink);
  font-weight: 500;
  font-size: 13.5px;
  text-align: left;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-item[aria-current="page"] {
  background: var(--nav-active-bg);
  color: var(--nav-active-ink);
  font-weight: 600;
}
.nav-item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -10px; top: 7px; bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--nav-brand);
}
.nav-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--nav-ink-2);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 7px;
  border-radius: 99px;
}
.nav-live-dot {
  margin-left: auto;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(231, 154, 51, 0.18);
  animation: livePulse 2.2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(231, 154, 51, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(231, 154, 51, 0.05); }
}
.sidebar-foot {
  margin-top: auto;
  padding: 12px 10px 14px;
  border-top: 1px solid var(--nav-line);
}
.wave-card {
  margin: 0 10px 12px;
  padding: 11px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--nav-line);
}
.wave-card .wc-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--nav-ink-2); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.wave-card .wc-days { font-family: var(--font-mono); font-size: 11px; color: var(--nav-ink); }
.wave-card .wc-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,0.1); margin: 9px 0 7px; overflow: hidden; }
.wave-card .wc-bar i { display: block; height: 100%; width: 51%; border-radius: 99px; background: linear-gradient(90deg, #7d78e0, #a9a5f2); }
.wave-card .wc-note { font-size: 11.5px; color: var(--nav-ink-2); }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.05); }
.avatar {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 12px;
  color: #fff;
  background: linear-gradient(140deg, #6b66d6, #413d99);
}
.user-chip .uc-name { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.15; }
.user-chip .uc-role { font-size: 11px; color: var(--nav-ink-2); }

/* ---------- main column ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.campaign-switch {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px 7px 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 13px;
}
.campaign-switch:hover { border-color: var(--axis); }
.campaign-switch .cs-flag {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--brand-soft);
  display: grid; place-items: center;
  color: var(--brand-ink);
}
.campaign-switch .cs-flag svg { width: 15px; height: 15px; }
.campaign-switch .cs-sub { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.campaign-switch > svg { width: 14px; height: 14px; color: var(--muted); }

.searchbox {
  flex: 1 1 220px;
  max-width: 420px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.searchbox svg { width: 15px; height: 15px; flex: none; }
.searchbox input {
  border: none; background: none; outline: none;
  width: 100%;
  font-size: 13px;
  color: var(--ink);
}
.searchbox input::placeholder { color: var(--muted); }
.searchbox kbd {
  font-family: var(--font-mono); font-size: 10px;
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 5px; color: var(--muted);
  background: var(--surface-2);
}
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  position: relative;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--axis); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--crit);
  border: 2px solid var(--surface);
}
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8.5px 15px;
  border-radius: 10px;
  font-weight: 600; font-size: 13px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--axis); color: var(--ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { background: color-mix(in srgb, var(--brand-soft) 80%, var(--brand) 12%); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm svg { width: 13.5px; height: 13.5px; }
.btn-tour { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); color: var(--accent-strong); }
.btn-tour:hover { border-color: var(--accent); }

/* ---------- screens & layout primitives ---------- */
.screens { padding: 20px 22px 60px; max-width: 1560px; margin: 0 auto; width: 100%; }
.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.28s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.screen-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.screen-head h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.screen-head .sh-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.screen-head .sh-actions { margin-left: auto; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.eyebrow {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px 0;
  flex-wrap: wrap;
}
.card-head h3 { font-size: 14.5px; font-weight: 650; }
.card-head .ch-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.card-head .ch-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 12px 16px 16px; }
.link-btn { font-size: 12.5px; font-weight: 600; color: var(--brand-ink); border-radius: 6px; }
.link-btn:hover { text-decoration: underline; }

.grid { display: grid; gap: 14px; }
.g-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-kpis4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: stretch; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.g-map { grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); align-items: start; }
.g-ins { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.g-side { grid-template-columns: minmax(280px, 1fr) minmax(0, 1.8fr); align-items: start; }
.stack { display: grid; gap: 14px; }

/* ---------- KPI tiles ---------- */
.kpi {
  padding: 13px 15px 12px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative;
  overflow: hidden;
}
.kpi .kpi-label { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; display: flex; align-items: center; gap: 6px; }
.kpi .kpi-label svg { width: 13px; height: 13px; opacity: .8; }
.kpi .kpi-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}
.kpi .kpi-value .unit { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi .kpi-meta { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); margin-top: 2px; min-height: 16px; }
.kpi .delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 11.5px; }
.kpi .delta svg { width: 11px; height: 11px; }
.delta.up-good { color: var(--good-text); }
.delta.down-bad { color: var(--crit); }
.delta.flat { color: var(--muted); }
.kpi .kpi-spark { position: absolute; right: 10px; bottom: 10px; opacity: 0.95; }
.kpi:has(.kpi-spark) .kpi-meta { padding-right: 86px; }
.kpi.kpi-live::after {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: .7;
}

/* live badge */
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 4px 10px; border-radius: 99px;
  text-transform: uppercase;
}
.live-pill .ld { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-strong); animation: livePulse 2.2s ease-in-out infinite; }
.live-pill.paused { color: var(--muted); background: var(--surface-2); border-color: var(--line); }
.live-pill.paused .ld { background: var(--muted); animation: none; box-shadow: none; }

/* ---------- chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  padding: 2.5px 9px; border-radius: 99px;
  white-space: nowrap;
}
.chip svg { width: 11px; height: 11px; }
.chip-pos { color: var(--pos-text); background: color-mix(in srgb, var(--pos) 12%, transparent); }
.chip-neg { color: var(--neg-text); background: color-mix(in srgb, var(--neg) 12%, transparent); }
.chip-neu { color: var(--ink-2); background: var(--surface-2); }
.chip-brand { color: var(--brand-ink); background: var(--brand-soft); }
.chip-good { color: var(--good-text); background: color-mix(in srgb, var(--good) 12%, transparent); }
.chip-warn { color: var(--ink); background: color-mix(in srgb, var(--warn) 20%, transparent); }
.chip-crit { color: var(--crit); background: color-mix(in srgb, var(--crit) 11%, transparent); }
.chip-outline { border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mode-tag { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 1.5px 7px; border-radius: 6px; white-space: nowrap; }

/* ---------- charts ---------- */
.chart-wrap { position: relative; overflow: hidden; }
.chart-wrap svg { display: block; }
.chart-wrap svg text { font-family: var(--font-ui); }

/* equal-height dashboard rows: feed and chart cards fill their track */
#liveFeedCard, #volumeCard, #sentTrendCard, #issuesCard, #voteCard, #dashMapCard { display: flex; flex-direction: column; }
#dashMapCard .card-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#dashMapCard .minimap-shell { flex: 1; min-height: 300px; }
#dashMapCard .minimap-shell svg { position: absolute; inset: 0; }
#liveFeedCard .card-body { flex: 1; display: flex; flex-direction: column; }
#liveFeedCard .feed { flex: 1; overflow: hidden; }
#liveFeedCard .pulse-strip { margin-top: auto; }
#volumeCard .card-body, #sentTrendCard .card-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
#issuesCard .card-body, #voteCard .card-body { flex: 1; display: flex; flex-direction: column; }
#voteCard .footnote { margin-top: auto; padding-top: 12px; }
#issuesCard .hbar-rows { margin-top: 2px; }
.viz-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--page);
  font-size: 11.5px;
  line-height: 1.45;
  padding: 7px 10px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 20;
  max-width: 240px;
  transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap;
}
.viz-tip.show { opacity: 1; }
.viz-tip .tt-title { font-weight: 700; margin-bottom: 2px; }
.viz-tip .tt-row { display: flex; align-items: center; gap: 6px; }
.viz-tip .tt-sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); }
.legend .lg-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.legend .lg-sw { width: 9px; height: 9px; border-radius: 3px; }
.legend .lg-line { width: 14px; height: 2px; border-radius: 2px; }

/* horizontal bar rows */
.hbar-rows { display: grid; gap: 9px; }
.hbar-row { display: grid; grid-template-columns: 150px 1fr 52px; align-items: center; gap: 10px; border-radius: 6px; }
.hbar-row .hb-label { font-size: 12.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-row .hb-track { height: 16px; display: flex; align-items: center; }
.hbar-row .hb-fill { height: 14px; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; transition: width .5s cubic-bezier(.2,.7,.3,1); }
.hbar-row .hb-val { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); text-align: right; }
.hbar-row:hover .hb-label { color: var(--ink); }

/* diverging inline meter (tables) */
.div-meter { display: inline-flex; align-items: center; width: 120px; height: 12px; position: relative; background: var(--surface-2); border-radius: 4px; }
.div-meter::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--axis); }
.div-meter i { position: absolute; top: 1px; height: 10px; }
.div-meter i.m-pos { left: 50%; background: var(--pos); border-radius: 0 3px 3px 0; }
.div-meter i.m-neg { right: 50%; background: var(--neg); border-radius: 3px 0 0 3px; }

/* meter (coverage) */
.meter { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--s1) 16%, transparent); overflow: hidden; width: 100%; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--s1); }

/* ---------- live feed ---------- */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.feed-item:last-child { border-bottom: none; }
.feed-item.fresh { animation: feedIn 0.5s ease; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-7px); background: var(--brand-wash); } to { opacity: 1; transform: none; } }
.feed-ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2);
}
.feed-ico svg { width: 14px; height: 14px; }
.feed-item .fi-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.feed-item .fi-text b { color: var(--ink); font-weight: 600; }
.feed-item .fi-meta { display: flex; gap: 6px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.feed-item .fi-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; padding-top: 2px; }

/* activity strip below feed */
.pulse-strip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); }
.pulse-strip svg { width: 14px; height: 14px; color: var(--brand-ink); flex: none; }

/* ---------- map ---------- */
.map-card .card-body { padding: 0 0 0; }
.map-shell { position: relative; overflow: hidden; border-radius: 0 0 13px 13px; background: var(--surface-2); }
.map-svg-holder { position: relative; }
.map-svg-holder svg { width: 100%; height: auto; display: block; }
.district {
  stroke: var(--map-stroke);
  stroke-width: 0.9;
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
}
.district:hover { filter: brightness(0.92); }
.district.dimmed { opacity: 0.35; }
.map-label { font-size: 10px; font-weight: 600; fill: var(--ink-2); pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 2.5px; stroke-linejoin: round; }

/* ---- assembly constituency layer: AC fills under district boundaries ---- */
.ac-shape {
  stroke: var(--map-stroke); stroke-width: 0.4; stroke-opacity: 0.55;
  cursor: pointer; transition: filter 0.15s;
}
.ac-shape:hover { filter: brightness(0.9); }
.dist-outline { stroke: var(--ink); stroke-width: 1.35; stroke-opacity: 0.78; pointer-events: none; stroke-linejoin: round; }
.map-svg-holder svg.plain-mode .ac-shape { stroke: var(--ink); stroke-width: 0.55; stroke-opacity: 0.5; }
.map-svg-holder svg.plain-mode .dist-outline { stroke: var(--ink); stroke-width: 1.6; stroke-opacity: 1; }
.ac-label { font-weight: 600; fill: var(--ink-2); stroke-width: 2px; }
/* once constituency names are readable the district names step back */
.map-svg-holder svg.ac-zoomed .map-label:not(.ac-label) { fill: var(--muted); opacity: 0.72; }
.booth-dot { cursor: pointer; }
.booth-labels { pointer-events: none; }
.booth-label { font-weight: 650; fill: var(--ink-2); }
.booth-dot.worked:hover { stroke: var(--ink); stroke-width: 1.4; }
.booth-sel { pointer-events: none; }

/* ---- reservation tags: solid, high contrast, and deliberately not any party
       or sentiment colour so they never read as a result ---- */
.res-tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: #fff; padding: 1px 6px; border-radius: 4px; vertical-align: 1px;
  line-height: 1.6; white-space: nowrap;
}
.res-sc { background: #7b4bd8; color: #fff; }
.res-st { background: #0f8a8a; color: #fff; }
/* dark overrides follow the project token pattern: media query for system dark,
   plus the explicit data-theme so the toggle wins in both directions */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .res-sc { background: #a98ff0; color: #16121f; }
  :root:not([data-theme="light"]) .res-st { background: #3fc4bf; color: #0b1414; }
}
:root[data-theme="dark"] .res-sc { background: #a98ff0; color: #16121f; }
:root[data-theme="dark"] .res-st { background: #3fc4bf; color: #0b1414; }
.res-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }

/* ---- AI intelligence screen ----
   Each pattern family carries a --k hue set by .t-* below, and every accent on
   the card (badge, border, stat, play box) is derived from it, so a card reads
   as one signal instead of a set of unrelated colours. */
.t-red    { --k: var(--neg);  --kt: var(--neg-text); }
.t-orange { --k: #e8730c;     --kt: #b7560a; }
.t-yellow { --k: #d9a406;     --kt: #8f6c04; }
.t-green  { --k: var(--pos);  --kt: var(--pos-text); }
.t-violet { --k: #7b4bd8;     --kt: #5c34ad; }
.t-blue   { --k: var(--s1);   --kt: var(--brand-ink); }
.t-slate  { --k: #6b7280;     --kt: #4b5563; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-orange { --kt: #f0913c; }
  :root:not([data-theme="light"]) .t-yellow { --kt: #e8bd3a; }
  :root:not([data-theme="light"]) .t-violet { --kt: #a98ff0; }
  :root:not([data-theme="light"]) .t-slate  { --kt: #9ca3af; }
}
:root[data-theme="dark"] .t-orange { --kt: #f0913c; }
:root[data-theme="dark"] .t-yellow { --kt: #e8bd3a; }
:root[data-theme="dark"] .t-violet { --kt: #a98ff0; }
:root[data-theme="dark"] .t-slate  { --kt: #9ca3af; }

.intel-brief { margin-bottom: 18px; border-top: 3px solid var(--brand); }
.brief-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.brief-item { display: flex; gap: 12px; align-items: flex-start; }
.bi-num {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--k) 16%, transparent); color: var(--kt);
}
.bi-num svg { width: 16px; height: 16px; }
.bi-body { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.bi-body b { color: var(--ink); font-weight: 650; }
.bi-tag {
  display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--kt); background: color-mix(in srgb, var(--k) 14%, transparent);
  padding: 1px 7px; border-radius: 999px; vertical-align: 1px;
}
.intel-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.intel-filters .filter-chip { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.intel-filters .filter-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.intel-filters .filter-chip.empty { opacity: .45; }
.fc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fc-n { font-family: var(--font-mono); font-size: 10.5px; opacity: .75; }
.intel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1180px) { .intel-grid { grid-template-columns: 1fr; } }
.intel-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 0 18px 15px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  border-top: 4px solid var(--k); overflow: hidden;
}
.ic-top {
  display: flex; align-items: center; gap: 9px; margin: 0 -18px 12px; padding: 11px 18px;
  background: color-mix(in srgb, var(--k) 8%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--k) 18%, transparent);
}
.ic-badge {
  width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--k); color: #fff;
}
.ic-badge svg { width: 15px; height: 15px; }
.ic-kind { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--kt); }
.ic-pri { margin-left: auto; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.ic-pri.p1 { background: var(--neg); color: #fff; }
.ic-pri.p2 { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--accent-strong); }
.ic-pri.p3 { background: var(--surface-2); color: var(--muted); }
.ic-stat { display: flex; align-items: baseline; gap: 9px; margin-bottom: 7px; }
.ic-stat b { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1; color: var(--kt); letter-spacing: -0.01em; }
.ic-stat span { font-size: 12px; color: var(--muted); }
.ic-title { font-size: 15.5px; line-height: 1.42; margin: 0 0 11px; font-weight: 700; }
.ic-ev { margin: 0 0 13px; padding-left: 16px; display: grid; gap: 5px; }
.ic-ev li { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.ic-ev li::marker { color: var(--k); }
.ic-play { background: color-mix(in srgb, var(--k) 7%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--k) 22%, transparent); border-radius: var(--r-md); padding: 11px 13px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); margin-top: auto; }
.ic-play-h { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--kt); margin-bottom: 5px; }
.ic-play-h svg { width: 12px; height: 12px; }
.ic-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* the featured pattern runs full width and puts its chart beside the argument */
.intel-card.featured { grid-column: 1 / -1; }
.ic-main { display: grid; grid-template-columns: 1fr; gap: 14px; }
.intel-card.featured .ic-main { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .intel-card.featured .ic-main { grid-template-columns: 1fr; } }
.intel-card.featured .ic-stat b { font-size: 46px; }
.intel-card.featured .ic-title { font-size: 19px; }

/* the evidence chart: each family draws what its finding is built on */
.ic-viz { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 11px 13px 12px; }
.ic-viz-h { font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.mv-bars { display: grid; gap: 7px; }
.mv-row { display: grid; grid-template-columns: minmax(0, 84px) 1fr auto; align-items: center; gap: 9px; font-size: 11.5px; }
.mv-l { color: var(--ink-2); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-t { height: 11px; background: var(--surface-3); border-radius: 3px; overflow: hidden; position: relative; }
.mv-t i { display: block; height: 100%; border-radius: 3px; }
.mv-t.mv-d { background: var(--surface-3); }
.mv-t.mv-d::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--axis); z-index: 1; }
.mv-t.mv-d i { position: absolute; top: 0; height: 100%; }
.mv-t.mv-d i.d-pos { left: 50%; background: var(--pos); border-radius: 0 3px 3px 0; }
.mv-t.mv-d i.d-neg { right: 50%; background: var(--neg); border-radius: 3px 0 0 3px; }
.mv-v { font-family: var(--font-mono); font-size: 10.5px; font-weight: 650; color: var(--ink-2); text-align: right; white-space: nowrap; }

/* how much of the state this pattern actually touches */
.ic-impact { display: flex; align-items: center; gap: 9px; margin: 13px 0 0; }
.ii-cap { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); flex: none; }
.ii-track { width: 100%; max-width: 170px; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; flex: none; }
.ii-track i { display: block; height: 100%; border-radius: 3px; }
.ii-val { font-size: 11px; font-family: var(--font-mono); color: var(--muted); white-space: nowrap; }

/* who holds the seat versus who this respondent now prefers */
.switch-box {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 11px 12px; margin: 4px 0 10px;
}
.sw-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.sw-side:last-child { align-items: flex-end; text-align: right; }
.sw-cap { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sw-sub { font-size: 10.5px; color: var(--muted); }
.sw-arrow { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.sw-arrow svg { width: 14px; height: 14px; }
.switch-box.s-stay .sw-arrow { background: color-mix(in srgb, var(--pos) 16%, transparent); color: var(--pos-text); }
.switch-box.s-flip .sw-arrow { background: color-mix(in srgb, var(--neg) 16%, transparent); color: var(--neg-text); }
.switch-box.s-open .sw-arrow { background: var(--surface-3); color: var(--muted); }
.switch-box.s-stay { border-color: color-mix(in srgb, var(--pos) 32%, transparent); }
.switch-box.s-flip { border-color: color-mix(in srgb, var(--neg) 32%, transparent); }
.party-pill.pp-soft { border: 1px solid var(--line); }

/* ---- voter bank scope selector ---- */
.scope-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.vb-select {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--brand); border-radius: var(--r-sm);
  padding: 7px 11px; min-width: 270px;
}
.vb-select:focus { outline: 2px solid var(--brand-soft); }
.scope-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.sc-mark {
  width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-family: var(--font-display);
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
}
.sc-mark.state { background: var(--ink); }
.sc-txt h2 { font-family: var(--font-display); font-size: 24px; font-weight: 800; margin: 0; line-height: 1.15; }
.sc-txt p { font-size: 12.5px; color: var(--muted); margin: 3px 0 0; }
.sc-tags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 700px) { .sc-tags { margin-left: 0; } .vb-select { min-width: 0; flex: 1 1 100%; } }
.ic-scale { font-size: 11.5px; font-weight: 600; color: var(--muted); font-family: var(--font-mono); }
.ic-seats { display: flex; gap: 5px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.seat-chip { font: inherit; font-size: 11px; font-weight: 600; color: var(--brand-ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; cursor: pointer; }
.seat-chip:hover { background: var(--brand-soft); border-color: var(--brand-soft); }

/* ---- voter bank ---- */
.vb-bars { display: grid; gap: 9px; }
.vb-row { display: grid; grid-template-columns: 96px 1fr 74px auto; align-items: center; gap: 10px; font-size: 12.5px; }
.vb-l { color: var(--ink-2); font-weight: 550; }
.vb-t { height: 15px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.vb-t i { display: block; height: 100%; border-radius: 4px; }
.vb-n { text-align: right; font-family: var(--font-mono); font-size: 11.5px; font-weight: 650; }
.vb-x { font-size: 11px; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .vb-row { grid-template-columns: 78px 1fr 62px; } .vb-x { display: none; } }

.nav-item.nav-hero { margin-top: 8px; background: linear-gradient(135deg, rgba(169,143,240,.20) 0%, rgba(111,99,216,.16) 100%);
  border: 1px solid rgba(169,143,240,.30); font-weight: 650; }
.nav-item.nav-hero svg { color: #c3b4f7; }
.nav-item.nav-hero.active, .nav-item.nav-hero[aria-current="page"] { background: linear-gradient(135deg, #6f63d8 0%, #5b57c4 100%); }

/* ---- digital PR, rivals, audience ---- */
.src-note { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.6;
  color: var(--ink-2); background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--r-md); padding: 11px 13px; }
.src-note svg { width: 17px; height: 17px; flex: none; color: var(--accent-strong); margin-top: 1px; }
.tone-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-3); min-width: 90px; }
.tone-bar i { display: block; height: 100%; }
.ch-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 66px 110px 44px; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.ch-row:last-child { border-bottom: none; }
.ch-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2); }
.ch-ico svg { width: 16px; height: 16px; }
.ch-ico.sm { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; vertical-align: -6px; margin-right: 6px; }
.ch-ico.sm svg { width: 12px; height: 12px; }
.ch-name { font-size: 13px; font-weight: 600; display: grid; gap: 1px; min-width: 0; }
.ch-live, .ch-need { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 999px; margin-left: 7px; vertical-align: 1px; }
.ch-live { background: color-mix(in srgb, var(--pos) 16%, transparent); color: var(--pos-text); }
.ch-need { background: var(--surface-3); color: var(--muted); }
.ch-how { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.ch-n { font-family: var(--font-mono); font-size: 12px; font-weight: 650; text-align: right; }
.co-row { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.co-row:last-child { border-bottom: none; }
.co-top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.co-share { color: var(--muted); font-size: 11.5px; }
.co-net { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; }
.co-bar { height: 7px; background: var(--surface-3); border-radius: 4px; margin: 6px 0 5px; overflow: hidden; }
.co-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.co-geo { font-size: 11.5px; color: var(--muted); }
.kw-cloud { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: baseline; padding: 4px 0; }
.kw { font-weight: 650; color: var(--brand-ink); line-height: 1.5; }
.post-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; margin-bottom: 12px; background: var(--surface); }
.pc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.pc-likes { margin-left: auto; font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); }
.pc-title { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 9px; }
.pc-split { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.pc-comments { display: grid; gap: 5px; }
.cmt { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.5;
  color: var(--ink-2); padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.cmt-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 6px; }
.cmt.pos .cmt-dot { background: var(--pos); }
.cmt.neg .cmt-dot { background: var(--neg); }
.cmt.neu .cmt-dot { background: var(--muted); }
.pc-flag { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: var(--r-sm); padding: 8px 11px; }
.rv-row { display: grid; grid-template-columns: 92px minmax(0,1fr) 70px 110px 46px; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.rv-row:last-child { border-bottom: none; }
.rv-row.us { background: var(--brand-wash); border-radius: var(--r-sm); }
.rv-p { display: flex; align-items: center; gap: 6px; }
.rv-us { font-size: 9.5px; font-weight: 800; text-transform: uppercase; color: var(--brand-ink); }
.rv-t { height: 12px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.rv-t i { display: block; height: 100%; border-radius: 4px; }
.rv-n { font-family: var(--font-mono); font-size: 12px; text-align: right; font-weight: 650; }
.rv-net { font-family: var(--font-mono); font-size: 12px; font-weight: 800; text-align: right; }

/* ---- AI news research ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.nc-thumb { position: relative; height: 150px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; }
.nc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.nc-fallback { color: var(--faint); }
.nc-fallback svg { width: 34px; height: 34px; }
.nc-tone { position: absolute; z-index: 2; left: 10px; top: 10px; color: #fff; font-size: 10.5px;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.nc-body { padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nc-meta { font-size: 11px; color: var(--muted); }
.nc-meta b { color: var(--ink-2); }
.nc-topic { color: var(--brand-ink); font-weight: 600; }
.nc-title { font-size: 14.5px; line-height: 1.38; margin: 0; font-weight: 700; }
.nc-title a { color: var(--ink); text-decoration: none; }
.nc-title a:hover { color: var(--brand-ink); text-decoration: underline; }
.nc-sum { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; }
.nc-seats { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; align-items: center; }

/* ---- political AI ---- */
.pol-src { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ps-cap { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ps-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.ps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.ph-ico { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.pol-say { border-top: 3px solid var(--pos); }
.pol-dont { border-top: 3px solid var(--neg); }
.play { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.play:last-child { border-bottom: none; }
.pl-t { font-size: 13.5px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.play.yes .pl-t { color: var(--pos-text); }
.play.no .pl-t { color: var(--neg-text); }
.pl-w { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.pl-s { margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- questionnaire generator screen ---- */
.qg-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .qg-grid { grid-template-columns: 1fr; } }
.qg-config { position: sticky; top: 84px; }
.qg-opts { display: grid; gap: 8px; margin-top: 14px; }
.qg-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.qg-opt:has(input:checked) { background: var(--brand-wash); border-color: var(--brand-soft); }
.qg-opt input { margin-top: 2px; accent-color: var(--brand); flex: none; }
.qo-body { display: grid; gap: 2px; }
.qo-t { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; color: var(--ink); }
.qo-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.qo-s { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.qg-go { width: 100%; margin-top: 16px; justify-content: center; }
.qg-empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.qg-empty svg { width: 34px; height: 34px; color: var(--faint); margin-bottom: 10px; }
.qg-empty p { font-size: 13px; max-width: 340px; margin: 0 auto; line-height: 1.6; }
.qg-load { padding: 20px 4px; }
.qgl-bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.qgl-bar i { display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #7b6fe0 100%); transition: width .35s ease; }
.qgl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qgl-steps li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); transition: color .2s; }
.qgl-steps li.run { color: var(--ink); }
.qgl-steps li.ok { color: var(--ink-2); }
.qs-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; position: relative; }
.qgl-steps li.run .qs-dot { border-color: var(--brand); border-top-color: transparent; animation: qspin .7s linear infinite; }
.qgl-steps li.ok .qs-dot { border-color: var(--pos); background: var(--pos); }
.qgl-steps li.ok .qs-dot::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes qspin { to { transform: rotate(360deg); } }
.sch-chev { width: 30px; text-align: right; color: var(--faint); }
.sch-chev svg { width: 16px; height: 16px; transition: transform .2s; }
#schTable tbody tr.open .sch-chev svg { transform: rotate(180deg); color: var(--brand-ink); }
#schTable tbody tr.open { box-shadow: inset 3px 0 0 var(--brand); }
.sch-detail td { border-left: 3px solid var(--brand); }

/* ---- AI questionnaire modal ---- */
.modal.modal-wide { width: min(760px, 100%); }
.qm-mark { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, #5b57c4 100%); color: #fff; }
.qm-mark svg { width: 18px; height: 18px; }
.modal-head .icon-btn { margin-left: auto; }
.qm-pick { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
@media (max-width: 620px) { .qm-pick { grid-template-columns: 1fr; } }
.qm-lab { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.qm-why { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); background: var(--brand-wash);
  border: 1px solid var(--brand-soft); border-radius: var(--r-md); padding: 10px 12px; }
.qm-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding-top: 4px; }
.qm-done { display: flex; gap: 11px; align-items: flex-start; background: color-mix(in srgb, var(--pos) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--pos) 34%, transparent); border-radius: var(--r-md); padding: 12px 14px; }
.qm-tick { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--pos); color: #fff; }
.qm-tick svg { width: 15px; height: 15px; }
.qm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
@media (max-width: 620px) { .qm-cols { grid-template-columns: 1fr; } }
.qm-cols .tgt-row { margin-bottom: 4px; }

/* ---- state and constituency emblem ---- */
.emblem-wrap { background: transparent !important; padding: 0; width: 52px; height: 52px; }
.emblem { width: 100%; height: 100%; display: block; overflow: visible; }
.em-state.solid { fill: var(--brand); stroke: var(--brand); stroke-width: 6; stroke-linejoin: round; }
.em-state.ghost { fill: var(--surface-3); stroke: var(--line); stroke-width: 4; stroke-linejoin: round; }
.em-ac { fill: var(--brand); stroke: var(--brand); stroke-width: 8; stroke-linejoin: round; }

/* ---- filter rail: always visible, left aligned ---- */
.filter-rail {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.fr-cap { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fr-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px 3px 4px; cursor: pointer;
}
.cat-chip:not(:has(.sch-thumb)) { padding-left: 10px; }
.cat-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.cat-chip.active .sch-thumb { background: rgba(255,255,255,.22); color: #fff; }

/* ---- scheme thumbnails ---- */
.sch-thumb {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: inline-grid; place-items: center;
}
.sch-thumb svg { width: 16px; height: 16px; }
.sch-thumb.sm { width: 20px; height: 20px; border-radius: 6px; }
.sch-thumb.sm svg { width: 12px; height: 12px; }
.c-farm    { background: color-mix(in srgb, var(--pos) 16%, transparent); color: var(--pos-text); }
.c-women   { background: color-mix(in srgb, #d1478f 18%, transparent); color: #b03574; }
.c-power   { background: color-mix(in srgb, var(--s4) 24%, transparent); color: #8f6c04; }
.c-housing { background: color-mix(in srgb, #e8730c 18%, transparent); color: #b7560a; }
.c-health  { background: color-mix(in srgb, var(--neg) 15%, transparent); color: var(--neg-text); }
.c-cash    { background: var(--brand-soft); color: var(--brand-ink); }
.c-food    { background: color-mix(in srgb, var(--s2) 18%, transparent); color: var(--accent-strong); }
.c-youth   { background: color-mix(in srgb, #7b4bd8 16%, transparent); color: #5c34ad; }
.c-work    { background: color-mix(in srgb, #6b7280 20%, transparent); color: #4b5563; }
.c-water   { background: color-mix(in srgb, var(--s1) 18%, transparent); color: var(--brand-ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .c-women { color: #ee89bd; }
  :root:not([data-theme="light"]) .c-housing { color: #f0913c; }
  :root:not([data-theme="light"]) .c-youth { color: #a98ff0; }
  :root:not([data-theme="light"]) .c-work { color: #9ca3af; }
  :root:not([data-theme="light"]) .c-power { color: #e8bd3a; }
}
:root[data-theme="dark"] .c-women { color: #ee89bd; }
:root[data-theme="dark"] .c-housing { color: #f0913c; }
:root[data-theme="dark"] .c-youth { color: #a98ff0; }
:root[data-theme="dark"] .c-work { color: #9ca3af; }
:root[data-theme="dark"] .c-power { color: #e8bd3a; }
#schTable td.sch-name { display: flex; gap: 10px; align-items: flex-start; }

/* ---- where to ask it: seat then booth ---- */
.sd-target { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 12px; }
.tgt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
@media (max-width: 980px) { .tgt-cols { grid-template-columns: 1fr; } }
.tgt-cap { font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.tgt-cap b { color: var(--ink); }
.tgt-list { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; }
.tgt-row {
  display: grid; grid-template-columns: 1fr auto 54px; align-items: center; gap: 10px;
  width: 100%; text-align: left; font: inherit; padding: 7px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.tgt-row.booth { cursor: default; }
.tgt-row:hover:not(.booth) { border-color: var(--brand); }
.tgt-row[aria-current="true"] { background: var(--brand-wash); border-color: var(--brand); }
.tr-main { font-size: 12.5px; font-weight: 600; color: var(--ink); min-width: 0; }
.tr-sub { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); line-height: 1.35; }
.tr-num { text-align: right; font-size: 12px; white-space: nowrap; }
.tr-num b { font-family: var(--font-mono); font-size: 12.5px; color: var(--neg-text); }
.tr-rate { text-align: right; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: var(--pos-text); }
.tr-rate.bad { color: var(--neg-text); }
.tr-dark { font-family: var(--font-ui); font-size: 9.5px; font-weight: 600; color: var(--accent-strong); }
.tr-ok { font-family: var(--font-ui); font-size: 9.5px; font-weight: 600; color: var(--muted); }
#schTable tbody tr.open { background: var(--brand-wash); }
.tier-reach { border-top: 1px solid var(--line-soft); padding-top: 12px; display: grid; gap: 7px; }

/* ---- scheme delivery ---- */
/* the base data table is nowrap, which makes long benefit text run under the
   numbers. This table carries sentences, so let its text columns wrap. */
#schTable td { white-space: normal; vertical-align: top; }
#schTable td.num { white-space: nowrap; text-align: right; }
#schTable th.num { text-align: right; }
#schTable th:nth-child(1), #schTable td:nth-child(1) { min-width: 190px; }
#schTable th:nth-child(3), #schTable td:nth-child(3) { min-width: 210px; }
#schTable th:nth-child(4), #schTable td:nth-child(4) { min-width: 160px; }
#schTable tbody tr.sch-detail:hover { background: var(--surface-2); }
.tier-chip { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: #fff; }
.tier-chip.t-high { background: var(--s1); }
.tier-chip.t-mid  { background: var(--s3); }
.tier-chip.t-low  { background: var(--accent-strong); }
.lvl-pill { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.lvl-pill.state { background: var(--brand-soft); color: var(--brand-ink); }
.lvl-pill.central { background: color-mix(in srgb, var(--s2) 20%, transparent); color: var(--accent-strong); }
#schTable tbody tr[data-sch] { cursor: pointer; }
#schTable tbody tr[data-sch]:hover { background: var(--brand-wash); }
.sch-detail td { background: var(--surface-2); }
.sd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 6px 2px 10px; }
@media (max-width: 820px) { .sd-grid { grid-template-columns: 1fr; } }
.sd-h { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 5px; }
.sd-grid p { font-size: 12.5px; line-height: 1.55; margin: 0 0 5px; color: var(--ink-2); }
.sd-q { font-weight: 600; color: var(--ink); }
.sd-native { color: var(--muted); font-weight: 500; }
.sq-list { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.sq-list li { font-size: 13.5px; line-height: 1.55; }
.sq-list li::marker { color: var(--brand-ink); font-weight: 800; }
.sq-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-ink); background: var(--brand-soft); padding: 1px 8px; border-radius: 999px; margin-right: 7px; vertical-align: 1px; }
.sq-native { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---- seat forecast card ---- */
.fc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .fc-grid { grid-template-columns: 1fr; } }
.fc-cap { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.fc-bars { display: grid; gap: 6px; }
.fc-row { display: grid; grid-template-columns: 52px 1fr 30px; align-items: center; gap: 9px; font-size: 12px; }
.fc-t { height: 14px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.fc-t i { display: block; height: 100%; border-radius: 4px; }
.fc-n { text-align: right; font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.fc-verdict { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.fc-verdict p { font-size: 13px; line-height: 1.6; margin: 0 0 6px; color: var(--ink-2); }
.fcv-head { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 7px; color: var(--ink); }

/* ---- sitting member / forecast card ---- */
.seat-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px 8px; background: var(--surface-2); }
.sc-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.party-pill { color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; }
.call-pill { margin-left: auto; font-weight: 700; font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.split-bars { display: grid; gap: 4px; margin: 8px 0 6px; }
.sb { display: grid; grid-template-columns: 76px 1fr 36px; align-items: center; gap: 8px; font-size: 11.5px; }
.sb-l { color: var(--muted); }
.sb-t { position: relative; height: 7px; background: var(--surface-3); border-radius: 4px; display: block; }
.sb-t i { position: absolute; top: 0; bottom: 0; left: 50%; border-radius: 4px; }
.sb-t i.m-pos { background: var(--pos); }
.sb-t i.m-neg { background: var(--neg); transform: translateX(-100%); }
.sb-v { text-align: right; font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.sc-note { font-size: 12px; line-height: 1.5; margin: 6px 0 0; color: var(--ink-2); }

/* ---- constituency register controls ---- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  padding: 0 var(--pad) 12px; border-bottom: 1px solid var(--line); margin-bottom: 2px;
}
.filter-bar .seat-filter { min-width: 0; font-size: 12px; padding: 5px 8px; }
.filter-bar select.seat-filter { max-width: 190px; }
.filter-bar input.seat-filter { min-width: 210px; flex: 1 1 210px; }
@media (max-width: 900px) { .filter-bar .res-legend { margin-left: 0 !important; width: 100%; } }
.seat-filter {
  font: inherit; font-size: 12.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 6px 10px; min-width: 150px;
}
.seat-filter:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
#seatTable tbody tr { cursor: pointer; }
#seatTable tbody tr:hover { background: var(--brand-wash); }

/* ---- GPS resolution panel in the response drawer ---- */
.resolve-box {
  border: 1px solid var(--brand-soft); background: var(--brand-wash);
  border-radius: var(--r-md); padding: 10px 12px 6px;
}
.resolve-box .rail-row { border-color: color-mix(in srgb, var(--brand-soft) 70%, transparent); }
.resolve-box .rail-row:last-child { border-bottom: 0; }
.rb-head {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 4px;
}
.rb-head svg { width: 13px; height: 13px; }

/* ---- drill breadcrumb ---- */
.map-crumbs {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 0 var(--pad) 10px; margin-top: -2px;
}
.crumb {
  font: inherit; font-size: 12px; font-weight: 600; color: var(--brand-ink);
  background: var(--brand-wash); border: 1px solid var(--brand-soft); border-radius: 999px;
  padding: 3px 10px; cursor: pointer; transition: background 0.15s;
}
.crumb:hover { background: var(--brand-soft); }
.crumb.cur { background: transparent; border-color: transparent; color: var(--ink); cursor: default; }
.crumb-sep { color: var(--faint); font-size: 12px; }
.map-dot { pointer-events: none; }
.map-dot.livedot { animation: dotIn 0.9s ease; }
@keyframes dotIn { 0% { opacity: 0; } 100% { opacity: 0.97; } }
.trail-line { fill: none; stroke: var(--brand-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.trail-stop { fill: var(--brand-ink); stroke: var(--surface); stroke-width: 1.6; }
.map-controls {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 240px;
}
.map-zoom {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  display: flex; flex-direction: column; gap: 6px;
}
.map-zoom button {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow);
}
.map-zoom button:hover { color: var(--ink); border-color: var(--axis); }
.map-zoom button svg { width: 16px; height: 16px; }
.map-zoom .mz-level { font-family: var(--font-mono); font-size: 10px; text-align: center; color: var(--muted); background: color-mix(in srgb, var(--surface) 93%, transparent); border: 1px solid var(--line); border-radius: 7px; padding: 2px 0; }
.map-svg-holder svg { cursor: grab; touch-action: none; user-select: none; }
.map-svg-holder svg.panning { cursor: grabbing; }
.map-svg-holder svg.plain-mode .trail-line { stroke-width: 2.6; }
.map-svg-holder svg.plain-mode .district { stroke: var(--ink); stroke-width: 1; }
.map-legend {
  position: absolute; bottom: 12px; left: 12px; z-index: 5;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11px;
  color: var(--ink-2);
  box-shadow: var(--shadow);
}
.map-legend .ml-title { font-weight: 700; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.map-legend .ml-row { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.map-legend .ml-sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.seg {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 2.5px;
  gap: 2px;
  box-shadow: var(--shadow);
}
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.seg button svg { width: 13px; height: 13px; flex: none; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-ink); }
.map-side { display: flex; flex-direction: column; gap: 0; max-height: 640px; overflow-y: auto; }
.map-side-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto;
  gap: 10px; align-items: center;
  padding: 8.5px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.map-side-row:hover { background: var(--surface-2); }
.map-side-row.sel { background: var(--brand-wash); border-left-color: var(--brand); }
.map-side-row .msr-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-side-row .msr-sub { font-size: 11px; color: var(--muted); font-weight: 400; }
.map-side-row .msr-net { font-family: var(--font-mono); font-size: 11.5px; text-align: right; }
.gmaps-note {
  display: flex; gap: 9px; align-items: flex-start;
  margin: 12px 16px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--axis);
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}
.gmaps-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--brand-ink); }
.gmaps-note code { font-family: var(--font-mono); font-size: 10.5px; background: var(--surface-3); padding: 0 5px; border-radius: 4px; }

/* mini map on dashboard */
.minimap-shell { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line-soft); }
.minimap-shell svg { width: 100%; height: auto; }
.minimap-foot { display: flex; align-items: center; gap: 10px; padding: 10px 2px 0; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.data th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 9.5px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  white-space: nowrap;
}
table.data tr:last-child td { border-bottom: none; }
/* the topic board's last column is a sentence, not a value, so it wraps and
   takes whatever width is left after the fixed columns */
#rvTopicTable { table-layout: fixed; }
#rvTopicTable th:nth-child(1), #rvTopicTable td:nth-child(1) { width: 190px; }
#rvTopicTable th:nth-child(2), #rvTopicTable td:nth-child(2) { width: 152px; }
#rvTopicTable th:nth-child(3), #rvTopicTable td:nth-child(3) { width: 84px; }
#rvTopicTable th:nth-child(4), #rvTopicTable td:nth-child(4) { width: 116px; }
#rvTopicTable td { white-space: normal; vertical-align: top; line-height: 1.5; }
#rvTopicTable td:last-child { color: var(--ink-2); font-size: 12px; }
#rvTopicTable tbody tr { cursor: default; }

table.data tbody tr { cursor: pointer; transition: background 0.12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .num { font-family: var(--font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
table.data .t-main { font-weight: 600; color: var(--ink); }
table.data .t-sub { font-size: 11px; color: var(--muted); display: block; margin-top: 1px; font-weight: 400; }
.filters-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6.5px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px; font-weight: 550;
  color: var(--ink-2);
  box-shadow: var(--shadow);
}
.filter-chip svg { width: 13px; height: 13px; color: var(--muted); }
.filter-chip:hover { border-color: var(--axis); color: var(--ink); }
.filter-chip .fc-val { color: var(--ink); font-weight: 650; }
.pagination { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pagination .pg-btn { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); }
.pagination .pg-btn:hover { border-color: var(--axis); }
.pagination .pg-btn svg { width: 13px; height: 13px; }

/* ---------- surveys screen ---------- */
.survey-card { display: flex; flex-direction: column; gap: 0; transition: border-color .15s, transform .15s, box-shadow .15s; }
.survey-card:hover { border-color: var(--axis); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.survey-card .sc-top { display: flex; align-items: flex-start; gap: 10px; padding: 15px 16px 0; }
.survey-card h3 { font-size: 15px; line-height: 1.3; }
.survey-card .sc-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.survey-card .sc-stats { display: flex; gap: 0; padding: 13px 6px 4px; }
.survey-card .sc-stat { flex: 1; padding: 0 10px; border-left: 1px solid var(--line-soft); }
.survey-card .sc-stat:first-child { border-left: none; }
.survey-card .sc-stat .v { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink); }
.survey-card .sc-stat .l { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.survey-card .sc-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid var(--line-soft); margin-top: 10px; flex-wrap: wrap; }
.lang-dots { display: inline-flex; gap: 3px; }
.lang-dots span { font-size: 10px; font-weight: 700; padding: 2px 6px; background: var(--surface-2); border-radius: 5px; color: var(--ink-2); }

/* ---------- builder ---------- */
.builder-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.q-card { position: relative; padding: 14px 16px 14px 38px; transition: border-color .15s, box-shadow .15s; }
.q-card:hover { border-color: var(--axis); }
.q-card.q-selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.q-drag {
  position: absolute; left: 10px; top: 15px;
  color: var(--faint); cursor: grab;
}
.q-drag svg { width: 15px; height: 15px; }
.q-head { display: flex; align-items: flex-start; gap: 9px; }
.q-num { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--muted); padding-top: 3px; }
.q-title { font-size: 14px; font-weight: 650; color: var(--ink); line-height: 1.4; flex: 1; }
.q-title .q-native { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.q-type-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; color: var(--brand-ink); background: var(--brand-soft); padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.q-type-tag svg { width: 12px; height: 12px; }
.q-req { color: var(--crit); font-weight: 700; }
.q-opts { display: grid; gap: 6px; margin-top: 11px; }
.q-opt { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); }
.q-opt .radio { width: 15px; height: 15px; border-radius: 50%; border: 1.6px solid var(--axis); flex: none; }
.q-opt .checksq { width: 15px; height: 15px; border-radius: 4px; border: 1.6px solid var(--axis); flex: none; }
.q-opt.q-opt-add { color: var(--brand-ink); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.q-opt.q-opt-add .radio, .q-opt.q-opt-add .checksq { border-style: dashed; }
.q-stars { display: flex; gap: 6px; margin-top: 11px; color: var(--faint); }
.q-stars svg { width: 22px; height: 22px; }
.q-textline { margin-top: 12px; border-bottom: 1.5px dashed var(--axis); padding-bottom: 6px; color: var(--faint); font-size: 12.5px; font-style: italic; }
.q-foot { display: flex; align-items: center; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.q-foot .qf-right { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.q-mini-btn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.q-mini-btn:hover { background: var(--surface-2); color: var(--ink); }
.q-mini-btn svg { width: 14.5px; height: 14.5px; }
.logic-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--accent-strong); background: var(--accent-soft); padding: 3px 9px; border-radius: 7px; }
.logic-chip svg { width: 11.5px; height: 11.5px; }
.add-q-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 13px 14px; border: 1.5px dashed var(--axis); border-radius: 14px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.add-q-bar .aq-label { width: 100%; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.aq-type {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6.5px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.aq-type svg { width: 13.5px; height: 13.5px; color: var(--brand-ink); }
.aq-type:hover { border-color: var(--brand); color: var(--ink); background: var(--brand-wash); }
.builder-rail .card { margin-bottom: 14px; }
.rail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.rail-row:last-child { border-bottom: none; }
.rail-row .rr-label { color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.rail-row .rr-label svg { width: 15px; height: 15px; color: var(--muted); }
.rail-row .rr-val { font-weight: 650; color: var(--ink); font-size: 12.5px; text-align: right; }
.toggle { width: 34px; height: 20px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .15s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2.5px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.toggle[aria-pressed="true"] { background: var(--brand); }
.toggle[aria-pressed="true"]::after { left: 16px; }
.lang-tabs { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 9px; padding: 2.5px; }
.lang-tabs button { padding: 4.5px 11px; font-size: 12px; font-weight: 600; border-radius: 7px; color: var(--muted); }
.lang-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.builder-topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.builder-title-input {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  border: 1px solid transparent; background: transparent; border-radius: 9px;
  padding: 6px 10px; color: var(--ink); min-width: 0; flex: 1 1 300px;
}
.builder-title-input:hover, .builder-title-input:focus { border-color: var(--line); background: var(--surface); outline: none; }

/* ---------- drawer (response detail) ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(12, 11, 24, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 71;
  width: min(480px, 94vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 0.28s cubic-bezier(.3,.8,.3,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.drawer-head .dh-id { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.drawer-head h3 { font-size: 16px; }
.drawer-body { overflow-y: auto; padding: 16px 18px 30px; display: grid; gap: 16px; align-content: start; }
.d-section h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.d-answer { padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 11px; margin-bottom: 8px; background: var(--surface); }
.d-answer .da-q { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.d-answer .da-a { font-size: 13.5px; font-weight: 550; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.d-answer .da-quote { font-size: 13px; color: var(--ink-2); font-style: italic; line-height: 1.55; }
.d-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 12.5px; }
.d-kv .kv { display: flex; flex-direction: column; gap: 1px; }
.d-kv .kv b { font-weight: 600; color: var(--ink); }
.d-kv .kv span { color: var(--muted); font-size: 11px; }
.scan-box { display: grid; grid-template-columns: 132px 1fr; gap: 12px; }
.scan-thumb {
  height: 170px; border-radius: 10px; overflow: hidden; position: relative;
  background:
    repeating-linear-gradient(180deg, transparent 0 22px, color-mix(in srgb, var(--axis) 45%, transparent) 22px 23px),
    linear-gradient(160deg, #fbfaf4, #eeece0);
  border: 1px solid var(--line);
}
.scan-thumb::after {
  content: ""; position: absolute; inset: 12px 14px auto 14px; height: 8px; border-radius: 3px;
  background: rgba(25, 24, 19, 0.26); /* ink on paper, the mock stays light in both themes */
}
.scan-thumb .scan-glare { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.5) 50%, transparent 60%); }
.scan-thumb .scan-badge { position: absolute; left: 8px; bottom: 8px; }
.ocr-lines { font-size: 12px; color: var(--ink-2); display: grid; gap: 6px; }
.ocr-lines .ol { display: flex; gap: 7px; align-items: baseline; }
.ocr-lines .ol svg { width: 12px; height: 12px; flex: none; color: var(--good-text); transform: translateY(2px); }
.ocr-conf { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.mini-geo { border-radius: 10px; overflow: hidden; border: 1px solid #d9d7cd; background: #ffffff; position: relative; }
.mini-geo svg.geo-mode .district { fill: #fbfbf9; stroke: #5b5872; stroke-width: 0.7; opacity: 1; cursor: default; }
.mini-geo svg.geo-mode .district.geo-focus { fill: #fdecea; stroke: #c03230; stroke-width: 1.2; }
.mini-geo svg { width: 100%; height: auto; }
.audit { display: grid; gap: 0; font-size: 12.5px; }
.audit .au { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; padding: 7px 0; position: relative; }
.audit .au::before { content: ""; position: absolute; left: 6px; top: 22px; bottom: -4px; width: 1.5px; background: var(--line); }
.audit .au:last-child::before { display: none; }
.audit .au i { width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--surface); background: var(--brand); margin-top: 3px; box-shadow: 0 0 0 1px var(--line); }
.audit .au .au-t { font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding-top: 2px; }

/* ---------- insights ---------- */
.gauge-wrap { display: flex; align-items: center; gap: 18px; }
.points-list { display: grid; gap: 8px; }
.point-row {
  display: grid; grid-template-columns: 22px minmax(0,1fr) auto;
  gap: 10px; align-items: start;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
}
.point-row:hover { border-color: var(--axis); }
.point-row .pr-ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; }
.point-row .pr-ico svg { width: 12.5px; height: 12.5px; }
.point-row.pr-pos .pr-ico { background: color-mix(in srgb, var(--pos) 13%, transparent); color: var(--pos-text); }
.point-row.pr-neg .pr-ico { background: color-mix(in srgb, var(--neg) 13%, transparent); color: var(--neg-text); }
.point-row .pr-text { font-size: 13px; color: var(--ink); font-weight: 550; line-height: 1.4; }
.point-row .pr-sub { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.point-row .pr-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; padding-top: 2px; }
.quote-card { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); position: relative; }
.quote-card .qc-mark { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--brand-ink); opacity: .35; line-height: 0.6; }
.quote-card blockquote { margin: 6px 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--ink); font-style: italic; }
.quote-card .qc-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.demo-split { display: grid; gap: 12px; }
.demo-row { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.demo-row .dr-label { color: var(--ink-2); font-weight: 550; }
.demo-row .dr-val { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }
.stackbar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface); }
.stackbar i { height: 100%; }

/* ---------- teams ---------- */
.team-lead { display: flex; align-items: center; gap: 10px; }
.rank-num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); width: 18px; }
.flag-row { background: color-mix(in srgb, var(--warn) 7%, transparent); }

/* ---------- reports ---------- */
.report-card { display: flex; gap: 13px; padding: 14px 16px; align-items: flex-start; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.report-card:hover { border-color: var(--axis); }
.report-card.sel { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.report-ico { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.report-ico svg { width: 19px; height: 19px; }
.report-card h3 { font-size: 14px; }
.report-card .rc-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.report-card .rc-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.report-preview { padding: 22px 26px; }
.report-preview .rp-head { border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 12px; }
.report-preview .rp-head h2 { font-size: 18px; }
.report-preview .rp-head .rp-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.report-preview h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-ink); margin: 16px 0 7px; }
.report-preview p { font-size: 13px; line-height: 1.65; color: var(--ink-2); max-width: 68ch; }
.report-preview ul { margin: 7px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.report-preview li { margin-bottom: 4px; }
.report-preview li b, .report-preview p b { color: var(--ink); font-weight: 650; }
.ai-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--brand-ink); background: var(--brand-soft); padding: 3.5px 10px; border-radius: 99px; }
.ai-note svg { width: 12px; height: 12px; }

/* ---------- tactical report components ---------- */
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 6px 0 4px; }
.rp-stat { border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; background: var(--surface); }
.rp-stat b { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ink); }
.rp-stat b.pos { color: var(--pos-text); } .rp-stat b.neg { color: var(--neg-text); }
.rp-stat span { font-size: 10.5px; color: var(--muted); font-weight: 600; line-height: 1.35; display: block; }
.rp-chart { margin: 6px 0 2px; }
.mover-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
.mover { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.mover:last-child { border-bottom: none; }
.mover b { font-weight: 650; color: var(--ink); }
.mover .mv { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; flex: none; }
.rp-bars { display: grid; gap: 7px; margin-top: 8px; max-width: 62ch; }
.rp-bar { display: grid; grid-template-columns: 150px 1fr 46px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.rp-bar .bt { height: 12px; background: color-mix(in srgb, var(--s1) 14%, transparent); border-radius: 4px; overflow: hidden; }
.rp-bar .bt i { height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); display: block; }
.rp-bar .bv { font-family: var(--font-mono); font-size: 11px; text-align: right; }
.action-card { display: flex; gap: 11px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 11px; padding: 11px 13px; margin-top: 8px; background: var(--surface); max-width: 72ch; }
.action-card.p1 { border-left-color: var(--crit); }
.action-card.p2 { border-left-color: var(--warn); }
.ac-pri { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--muted); padding-top: 2px; flex: none; }
.action-card b { font-size: 13px; color: var(--ink); }
.action-card .ac-body { font-size: 12.5px; margin-top: 2px; line-height: 1.55; color: var(--ink-2); }
.ac-meta { font-size: 11px; color: var(--brand-ink); font-weight: 650; margin-top: 6px; }
@media (max-width: 820px) { .rp-kpis { grid-template-columns: 1fr 1fr; } .mover-grid { grid-template-columns: 1fr; } }

/* ---------- mobile preview ---------- */
.mobile-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: start; }
.phone {
  width: 300px;
  border-radius: 38px;
  padding: 10px;
  background: linear-gradient(160deg, #2b2a33, #131218);
  box-shadow: var(--shadow-lg), inset 0 1px 1px rgba(255,255,255,.14);
  position: sticky; top: 80px;
}
.phone-screen {
  border-radius: 29px;
  overflow: hidden;
  background: var(--page);
  height: 596px;
  display: flex; flex-direction: column;
  position: relative;
}
.phone-notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 86px; height: 22px; border-radius: 99px; background: #131218; z-index: 5; }
.p-status { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 4px; font-family: var(--font-mono); font-size: 10px; color: var(--ink-2); }
.p-head { padding: 10px 16px 10px; background: var(--nav-bg); color: #fff; }
.p-head .ph-title { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.p-head .ph-sub { font-size: 10.5px; color: var(--nav-ink-2); margin-top: 1px; }
.p-head .ph-row { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.p-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 700; padding: 2.5px 8px; border-radius: 99px; background: rgba(255,255,255,.12); color: var(--nav-ink); }
.p-chip svg { width: 10px; height: 10px; }
.p-chip.p-ok { color: #7ee29a; }
.p-chip.p-warn { color: #ffd27a; }
.p-progress { height: 4px; background: rgba(255,255,255,.14); border-radius: 99px; margin-top: 9px; overflow: hidden; }
.p-progress i { display: block; height: 100%; width: 25%; background: var(--nav-brand); border-radius: 99px; }
.p-body { flex: 1; overflow: hidden; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.p-qnum { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.p-q { font-family: var(--font-display); font-size: 16.5px; font-weight: 650; line-height: 1.35; color: var(--ink); }
.p-q-native { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.p-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  font-size: 13px; font-weight: 550; color: var(--ink);
  background: var(--surface);
}
.p-opt .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.8px solid var(--axis); flex: none; }
.p-opt.p-sel { border-color: var(--brand); background: var(--brand-wash); }
.p-opt.p-sel .radio { border-color: var(--brand); background: radial-gradient(circle at center, var(--brand) 0 4.5px, transparent 5px); }
.p-foot { display: flex; gap: 9px; padding: 10px 16px 16px; }
.p-btn { flex: 1; text-align: center; padding: 11px; border-radius: 12px; font-weight: 700; font-size: 13px; }
.p-btn-primary { background: var(--brand); color: var(--on-brand); }
.p-btn-ghost { background: var(--surface-2); color: var(--ink-2); flex: 0 0 auto; padding: 11px 16px; }
.p-mic { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 12px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); }
.p-mic svg { width: 15px; height: 15px; color: var(--crit); }
.p-mic .p-wave { display: flex; gap: 2.5px; align-items: center; height: 16px; margin-left: auto; }
.p-mic .p-wave i { width: 2.5px; border-radius: 2px; background: var(--brand-ink); animation: wave 1.1s ease-in-out infinite; }
.p-mic .p-wave i:nth-child(2) { animation-delay: .15s; } .p-mic .p-wave i:nth-child(3) { animation-delay: .3s; }
.p-mic .p-wave i:nth-child(4) { animation-delay: .45s; } .p-mic .p-wave i:nth-child(5) { animation-delay: .6s; }
@keyframes wave { 0%,100% { height: 4px; } 50% { height: 14px; } }
.mobile-copy h2 { font-size: 19px; margin-bottom: 4px; }
.mobile-copy > p { color: var(--muted); font-size: 13.5px; max-width: 56ch; }
.feature-li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.feature-li:last-child { border-bottom: none; }
.feature-li .fl-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
.feature-li .fl-ico svg { width: 16px; height: 16px; }
.feature-li b { font-size: 13.5px; font-weight: 650; color: var(--ink); display: block; }
.feature-li p { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; max-width: 52ch; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(12, 11, 24, 0.5);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  padding: 20px;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(.98);
  transition: transform 0.2s;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-backdrop.open .modal { transform: none; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 17px 20px 0; }
.modal-head h3 { font-size: 16.5px; }
.modal-body { padding: 14px 20px 20px; display: grid; gap: 14px; }
.share-link-row { display: flex; gap: 8px; }
.share-link-row input {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px;
  background: var(--surface-2); color: var(--ink-2);
}
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-opt {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 8px;
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--surface);
}
.share-opt:hover { border-color: var(--axis); color: var(--ink); }
.share-opt svg { width: 20px; height: 20px; color: var(--brand-ink); }
.qr-row { display: flex; gap: 16px; align-items: center; padding: 13px; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--surface-2); }
.qr-row canvas { width: 96px; height: 96px; border-radius: 8px; background: #fff; padding: 6px; box-sizing: border-box; border: 1px solid var(--line); }
.qr-row .qr-text { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.qr-row .qr-text b { color: var(--ink); }

/* ---------- campaign switcher menu ---------- */
.camp-menu { position: fixed; z-index: 85; width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; }
.camp-menu .cm-item { display: flex; gap: 10px; align-items: center; padding: 10px 11px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 13px; line-height: 1.35; }
.camp-menu .cm-item:hover { background: var(--surface-2); }
.camp-menu .cm-item.active { background: var(--brand-wash); }
.camp-menu .cm-item b { font-weight: 650; }
.camp-menu .cm-sub { font-size: 11px; color: var(--muted); }
.camp-menu .cm-flag { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
.camp-menu .cm-flag svg { width: 15px; height: 15px; }
.camp-menu .cm-check { width: 15px; height: 15px; margin-left: auto; color: var(--brand-ink); flex: none; }
.camp-menu .cm-foot { padding: 8px 11px 6px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line-soft); margin-top: 4px; }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 9px;
  background: var(--ink); color: var(--page);
  padding: 11px 15px;
  border-radius: 11px;
  font-size: 13px; font-weight: 550;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
  max-width: 340px;
}
.toast svg { width: 15px; height: 15px; flex: none; color: var(--good); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.toast .t-act { margin-left: 6px; padding: 4px 12px; border-radius: 8px; background: var(--page); color: var(--ink); font-weight: 700; font-size: 12px; flex: none; }
.feed-item.fielditem { cursor: pointer; border-left: 3px solid var(--accent); padding-left: 9px; background: color-mix(in srgb, var(--accent) 5%, transparent); border-radius: 8px; }
.feed-item.fielditem:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---------- tour ---------- */
.tour-ring {
  position: fixed; z-index: 90;
  border-radius: 14px;
  box-shadow: 0 0 0 4px var(--accent), 0 0 0 9999px rgba(10, 9, 22, 0.55);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(.3,.8,.3,1);
  display: none;
}
.tour-card {
  position: fixed; z-index: 91;
  width: min(360px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  padding: 16px 18px;
  display: none;
}
.tour-card .tc-step { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent-strong); font-weight: 600; letter-spacing: 0.08em; }
.tour-card h3 { font-size: 15.5px; margin: 5px 0 6px; }
.tour-card p { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.tour-card .tc-foot { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.tour-card .tc-foot .tc-end { margin-right: auto; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.tour-card .tc-foot .tc-end:hover { color: var(--ink); }

/* ---------- empty states & misc ---------- */
.footnote { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.divider-v { width: 1px; align-self: stretch; background: var(--line); }
.scroll-y { overflow-y: auto; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }

/* ---------- print (real Save as PDF of the visible view) ---------- */
@media print {
  .sidebar, .topbar, .toasts, .tour-ring, .tour-card, .drawer, .drawer-backdrop,
  .modal-backdrop, .map-zoom, .net-banner, .screen-head .sh-actions, .camp-menu { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .screens { max-width: none; padding: 8px 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body.print-report #reportList { display: none !important; }
  body.print-report #screen-reports .grid { grid-template-columns: 1fr !important; }
  body.print-intel .intel-filters { display: none !important; }
  body.print-intel .intel-grid { grid-template-columns: 1fr !important; }
  body.print-intel .intel-card { border: 1px solid #ddd; break-inside: avoid; }
}

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .g-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .app { grid-template-columns: 74px minmax(0, 1fr); }
  .g-map, .g-ins, .g-side { grid-template-columns: 1fr; }
  .sidebar .brand-name, .sidebar .brand-sub, .sidebar .nav-label,
  .sidebar .nav-item span, .sidebar .nav-count, .sidebar .wave-card,
  .sidebar .user-chip .uc-text { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 10px; }
  .sidebar .nav-live-dot { position: absolute; top: 6px; right: 6px; margin: 0; }
  .brand { justify-content: center; padding: 14px 8px; }
  .user-chip { justify-content: center; }
  .g-main { grid-template-columns: 1fr; }
  .builder-grid { grid-template-columns: 1fr; }
  .mobile-stage { grid-template-columns: 1fr; }
  .phone { position: static; margin: 0 auto; }
}
@media (max-width: 820px) {
  .g-kpis, .g-kpis4, .g-2, .g-3 { grid-template-columns: 1fr 1fr; }
  .screens { padding: 14px 12px 80px; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; }
  .searchbox { display: none; }
  .campaign-switch .cs-text { display: none; }
}
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .card-head { flex-wrap: wrap; }
  .card-head .ch-actions { margin-left: 0; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .screen-head .sh-actions { margin-left: 0; }
  .builder-topbar .sh-actions { margin-left: 0; }
  .mobile-stage .phone { width: min(300px, 100%); }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    height: auto; flex-direction: row; align-items: center;
    overflow-x: auto; overflow-y: hidden;
    border-top: 1px solid var(--nav-line);
    z-index: 60;
    padding: 4px 6px;
  }
  .brand, .sidebar-foot, .nav-label { display: none; }
  .nav-group { display: flex; padding: 4px 2px; gap: 2px; }
  .nav-group + .nav-group { margin: 0; }
  .nav-item { flex-direction: column; gap: 3px; font-size: 9.5px; padding: 7px 9px; }
  .nav-item span { display: block; }
  .nav-item[aria-current="page"]::before { display: none; }
  .g-kpis, .g-kpis4, .g-2, .g-3 { grid-template-columns: 1fr; }
  .scan-box { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: 1fr 1fr; }
  .screens { padding-bottom: 130px; }
  .hbar-row { grid-template-columns: 105px 1fr 48px; }
  .drawer { width: 100vw; }
}

/* =========================================================================
   ARTICLE BRIEFING MODAL  (AI News Research)
   The verdict drives one hue through the whole sheet: green when a story
   works for us, pink when it works against us, neutral grey otherwise.
   ========================================================================= */
.art-modal { --a: var(--muted); --a-soft: var(--surface-2); position: relative; padding: 0; overflow: hidden; }
.art-modal.good { --a: var(--pos-text); --a-soft: color-mix(in srgb, var(--pos) 12%, var(--surface)); }
.art-modal.bad  { --a: var(--neg-text); --a-soft: color-mix(in srgb, var(--neg) 12%, var(--surface)); }
.art-modal.flat { --a: var(--muted);    --a-soft: var(--surface-2); }
.art-modal .modal-body { padding: 16px 20px 20px; max-height: min(72vh, 640px); overflow-y: auto; }
.art-hero { position: relative; height: 190px; background: var(--surface-3); overflow: hidden; }
.art-hero::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -60px 60px -40px var(--surface); }
.art-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-hero:empty { height: 6px; }
.art-hero.good { border-bottom: 3px solid var(--pos); }
.art-hero.bad  { border-bottom: 3px solid var(--neg); }
.art-hero.flat { border-bottom: 3px solid var(--line); }
.art-close { position: absolute; top: 10px; right: 10px; z-index: 4;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.art-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.art-meta b { color: var(--ink-2); }
.art-verdict { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; color: #fff; background: var(--muted); }
.art-verdict.good { background: var(--pos); }
.art-verdict.bad  { background: var(--neg); }
.art-title { font-size: 19px; line-height: 1.3; font-weight: 800; margin: 0 0 8px; letter-spacing: -.01em; }
.art-sum { font-size: 13px; line-height: 1.62; color: var(--ink-2); margin: 0 0 14px; }
.au-h { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--a); margin-bottom: 6px; }
.art-read { background: var(--a-soft); border: 1px solid color-mix(in srgb, var(--a) 26%, transparent);
  border-left: 3px solid var(--a); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 14px; }
.art-read p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--ink); }
.art-use { margin-bottom: 14px; }
.art-use ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.art-use li { position: relative; padding-left: 22px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.art-use li::before { content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--a); }
.art-seats { margin-bottom: 14px; }
.as-list { display: flex; gap: 6px; flex-wrap: wrap; }
.as-list .seat-chip { padding: 4px 10px; font-size: 11.5px; display: inline-flex; align-items: center; gap: 7px; }
.as-net { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; }
.art-foot { display: flex; gap: 9px; flex-wrap: wrap; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.news-card { cursor: pointer; }
.news-card:hover { border-color: var(--brand-soft); box-shadow: var(--shadow-1); }
.news-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nc-open { margin-left: auto; display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: var(--brand-ink); white-space: nowrap; }
.nc-open svg { width: 12px; height: 12px; }

/* =========================================================================
   POST GRID  (AI Digital PR and Rival Watch)
   ========================================================================= */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.post-grid .post-card { display: flex; flex-direction: column; padding: 0; margin: 0; overflow: hidden;
  border-radius: var(--r-lg); }
.post-grid .post-card.good { border-top: 3px solid var(--pos); }
.post-grid .post-card.bad  { border-top: 3px solid var(--neg); }
.pc-thumb { position: relative; height: 148px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; }
.pc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pc-thumb .nc-tone { position: absolute; z-index: 3; left: 10px; top: 10px; }
.pc-plat { position: absolute; z-index: 3; right: 10px; top: 10px; width: 26px; height: 26px;
  border-radius: 7px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.pc-plat svg { width: 15px; height: 15px; }
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.pc-body .pc-title { margin: 0; }
.pc-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.pc-stats b { font-family: var(--font-mono); color: var(--ink-2); font-size: 11.5px; }
.pc-body .pc-split { margin: 0; }
.pc-legend { font-size: 11px; color: var(--muted); }
.pc-src { display: block; margin-top: auto; padding-top: 4px; font-size: 11px; color: var(--brand-ink); text-decoration: none; }
.pc-src:hover { text-decoration: underline; }
/* platform brand tints, only on the badge so the card palette stays ours */
.br-youtube  { color: #ff0000; }
.br-facebook { color: #1877f2; }
.br-x        { color: var(--ink); }
.br-instagram{ color: #d62976; }
.br-linkedin { color: #0a66c2; }
.br-web      { color: var(--brand-ink); }
.rv-chase { font-size: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ch-net { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; text-align: right; }
.pp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--k, var(--muted)); margin-right: 6px; }

/* =========================================================================
   ANALYST CITATIONS  (AI Political Analyst)
   Every call names the layer it came from and the number behind it.
   ========================================================================= */
.pl-cites { margin-top: 8px; display: grid; gap: 5px; }
.cite { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
  background: var(--surface-2); border-left: 2px solid var(--line);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 5px 9px; }
.play.yes .cite { border-left-color: var(--pos); }
.play.no  .cite { border-left-color: var(--neg); }
.cite-layer { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap; }
.cite-txt { flex: 1 1 200px; }
.cite-link { font-weight: 700; color: var(--brand-ink); text-decoration: none; white-space: nowrap; }
.cite-link:hover { text-decoration: underline; }
.pl-seats { margin-top: 8px; display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.pls-cap { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
button.tgt-row { width: 100%; font: inherit; text-align: left; cursor: pointer; background: none; }
button.tgt-row:hover { background: var(--surface-2); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .br-x { color: #e7e9ea; }
  :root:not([data-theme="light"]) .art-hero::after { box-shadow: inset 0 -60px 60px -40px var(--surface); }
}
:root[data-theme="dark"] .br-x { color: #e7e9ea; }

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .art-hero { height: 150px; }
  .art-title { font-size: 17px; }
}
