/* ─── Local Intelligence Design System ──────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Serif:opsz,wght@8..144,400;8..144,500;8..144,600;8..144,700&family=Roboto:ital,wght@0,400;0,500;0,700;1,400&family=Roboto+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Debatable brand palette */
  --navy:       #191E39;
  --brand:      #CF5F3A;
  --brand-soft: rgba(207,95,58,.12);

  /* Page surfaces */
  --bg:          #F5F0E6;
  --bg-1:        #F5F0E6;
  --bg-2:        #EDE7DA;
  --bg-3:        #E4DCCD;
  --surface:     #FEFFFF;
  --surface-2:   #FBF8F1;
  --surface-3:   #F0EADD;
  --red:         #AF1818;

  /* Text */
  --ink:         #1B1B26;
  --ink-2:       #2A2F38;
  --ink-3:       #4A4A56;
  --ink-4:       #8A857C;
  --ink-5:       #B7ACA4;

  /* Borders */
  --line:        #E4DCCD;
  --line-2:      #EDE7DA;

  /* Accent (links/focus) — use navy for trust, orange for action */
  --accent:      #191E39;
  --accent-2:    #292947;
  --accent-soft: rgba(41,41,71,.08);

  /* Status colors */
  --good:        #27B430;
  --good-soft:   rgba(39,180,48,.10);
  --good-line:   rgba(39,180,48,.25);
  --warn:        #B5751F;
  --warn-soft:   #FBF1DF;
  --warn-line:   #EFD9A8;
  --bad:         #AF1818;
  --bad-soft:    rgba(175,24,24,.08);
  --bad-line:    rgba(175,24,24,.22);
  --teal:        #42C8C1;
  --teal-soft:   rgba(66,200,193,.12);
  --teal-line:   rgba(66,200,193,.30);

  /* Layout */
  --sidebar-w:  224px;
  --topbar-h:   60px;
  --radius:     10px;
  --radius-lg:  12px;
  --drawer-width: 440px;

  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 13px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;

  /* Semantic aliases used by some templates */
  --text-primary:   var(--ink);
  --text-secondary: var(--ink-3);
  --text-muted:     var(--ink-4);
  --border:         var(--line);
}

body {
  background: var(--bg);
  min-height: 100vh;
}

/* ─── Typography helpers ─────────────────────────────────────────────────── */

.font-serif { font-family: 'Roboto Serif', Georgia, serif; font-feature-settings: 'lnum'; }
.font-mono  { font-family: 'Roboto Mono', ui-monospace, monospace; }
.tabular    { font-variant-numeric: tabular-nums; }

.label-eyebrow {
  font-family: 'Roboto', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ─── App Shell ──────────────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar (dark) ─────────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
}

/* Township tag chip in sidebar */
.township-tag {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: .06em;
  padding: 3px 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 5px;
  display: inline-block;
  margin-top: 10px;
  text-transform: uppercase;
}

.sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Simple orange brand mark — replaces complex inline SVG */
.brand-mark-box {
  width: 28px; height: 28px;
  background: var(--brand);
  border-radius: 6px;
  position: relative;
  flex-shrink: 0;
}
.brand-mark-box::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(255,255,255,.85);
  border-radius: 2px;
}

.brand-text-block { line-height: 1.2; }

.brand-name {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #FEFFFF;
}

.brand-sub {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-top: 1px;
}

.sidebar-office {
  padding: 10px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-office-name {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  color: #FEFFFF;
  line-height: 1.3;
}

.sidebar-office-county {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  margin-top: 1px;
}

/* Nav section group labels */
.sidebar-nav-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 12px 12px 5px;
}

.sidebar-nav {
  list-style: none;
  padding: 10px 8px 8px;
  flex: 1;
  overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.sidebar-nav li { margin-bottom: 2px; }

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.68);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: background .12s, color .12s;
  position: relative;
}

.sidebar-nav li a svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: rgba(255,255,255,.45);
  transition: color .12s;
}

.sidebar-nav li a:hover {
  background: rgba(255,255,255,.07);
  color: #FEFFFF;
}
.sidebar-nav li a:hover svg { color: rgba(255,255,255,.7); }

.sidebar-nav li.active a {
  background: var(--brand);
  color: #FEFFFF;
  font-weight: 500;
  box-shadow: none;
}
.sidebar-nav li.active a svg { color: #FEFFFF; }
.sidebar-nav li.active a::after { display: none; }

/* Nav badge (count pill) */
.sidebar-nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9px;
  background: rgba(255,255,255,.15);
  color: #FEFFFF;
  line-height: 1.5;
}
.sidebar-nav-badge--warn { background: var(--brand); }
.sidebar-nav-badge--bad  { background: var(--bad); }

.sidebar-footer {
  padding: 11px 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* User avatar circle */
.sidebar-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #FEFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 12px; font-weight: 500; color: #FEFFFF;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 10px;
  color: rgba(255,255,255,.45);
}

.logout-link {
  color: rgba(255,255,255,.45);
  font-size: 12px;
  text-decoration: none;
  display: block;
  padding: 4px 0;
}
.logout-link:hover { color: rgba(255,255,255,.75); }

/* Deprecated classes kept for compatibility */
.sidebar-status { display: none; }
.sidebar-version { display: none; }
.brand-mark-svg  { display: none; }

/* ─── Main content ───────────────────────────────────────────────────────── */

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  min-width: 0;
}

/* ─── Top bar ────────────────────────────────────────────────────────────── */

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 var(--line);
}

.topbar-title-block { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }

.topbar-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-4);
  line-height: 1;
  margin-bottom: 2px;
}

.page-title {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--navy);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Date / subtitle pill in topbar */
.page-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
  padding: 3px 9px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.topbar-staff {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-4);
  white-space: nowrap;
}

/* ─── Page body ──────────────────────────────────────────────────────────── */

.page-body { padding: 24px 28px; }

/* ─── Flash messages ─────────────────────────────────────────────────────── */

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  border: 1px solid;
}
.alert-error   { background: var(--bad-soft);  color: var(--bad);  border-color: var(--bad-line); }
.alert-success { background: var(--good-soft); color: var(--good); border-color: var(--good-line); }

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(25,30,57,0.05);
  position: relative;
}

.card-thin  { box-shadow: none; }
.card-accent { border-top: 3px solid var(--brand); }
.card-good   { border-top: 3px solid var(--good); }
.card-warn   { border-top: 3px solid var(--warn); }
.card-bad    { border-top: 3px solid var(--bad); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.card-header-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 2px; }
.card-header h2, .card-header h3 { font-family: 'Roboto Serif', Georgia, serif; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }

.card-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--line-2);
  font-size: 12.5px;
}

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

/* ─── Dashboard ──────────────────────────────────────────────────────────── */

.dashboard-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.dashboard-greeting { font-family: 'Roboto Serif', Georgia, serif; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.dashboard-sub { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.dashboard-status-row { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--ink-4); }
.dashboard-status-item { display: inline-flex; align-items: center; gap: 6px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.status-dot-good { background: var(--good); }
.status-dot-warn { background: var(--warn); }
.status-dot-bad  { background: var(--bad);  }
.status-dot-accent { background: var(--accent); }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1280px) { .dashboard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .dashboard-grid { grid-template-columns: 1fr; } }

/* Meeting row inside dashboard card */
.mtg-mini {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  transition: border-color .12s, background .12s;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}
.mtg-mini:hover { border-color: var(--line); background: var(--surface-2); }
.mtg-mini:last-child { margin-bottom: 0; }
.mtg-mini-date { font-family: 'Roboto Serif', Georgia, serif; font-size: 13.5px; font-weight: 600; }
.mtg-mini-title { font-size: 12px; color: var(--ink-3); margin: 3px 0 6px; line-height: 1.4; }
.mtg-mini-link { font-size: 11.5px; font-weight: 500; color: var(--accent); }

/* Compliance alert rows */
.alert-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: filter .12s;
}
.alert-row:last-child { margin-bottom: 0; }
.alert-row:hover { filter: brightness(.97); }
.alert-row-bad  { background: var(--bad-soft);  border-color: var(--bad-line);  }
.alert-row-warn { background: var(--warn-soft); border-color: var(--warn-line); }

.alert-row-icon { flex-shrink: 0; width: 14px; height: 14px; margin-top: 1px; }
.alert-row-icon-bad  { color: var(--bad); }
.alert-row-icon-warn { color: var(--warn); }

.alert-row-body  { flex: 1; min-width: 0; }
.alert-row-title { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.alert-row-meta  { font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.alert-row-chevron { width: 12px; height: 12px; flex-shrink: 0; margin-top: 2px; color: var(--ink-4); }

/* Signal Summary */
.signal-card { background: var(--surface-2); }

.tier-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 10.5px;
}
.tier-bar-label { width: 120px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; flex-shrink: 0; }
.tier-bar-track {
  flex: 1;
  height: 5px;
  background: var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}
.tier-bar-fill { height: 100%; border-radius: 2px; }
.tier-bar-count { width: 24px; text-align: right; font-family: 'Roboto Mono', monospace; color: var(--ink-3); font-weight: 500; font-size: 10.5px; }

.signal-disclaimer { font-size: 10.5px; font-style: italic; color: var(--ink-4); margin-top: 8px; line-height: 1.4; }
.signal-divider { height: 1px; background-image: linear-gradient(to right, var(--ink-5) 33%, transparent 0); background-size: 6px 1px; background-repeat: repeat-x; margin: 12px 0; }

/* Voice items in dashboard */
.voice-item { margin-bottom: 12px; font-size: 12.5px; }
.voice-item:last-child { margin-bottom: 0; }
.voice-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.voice-item-name { font-weight: 600; }
.voice-item-text { color: var(--ink-3); line-height: 1.4; }
.voice-item-meta { font-size: 10px; color: var(--ink-5); text-transform: uppercase; letter-spacing: .07em; margin-top: 3px; }

/* Activity feed */
.activity-feed { }
.activity-feed-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--line);
}
.activity-feed-header h3 { font-family: 'Roboto Serif', Georgia, serif; font-size: 15px; font-weight: 600; }

.activity-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
  transition: background .1s;
}
.activity-row:last-child { border-bottom: none; }
.activity-row:hover { background: var(--surface-2); }

.activity-time { width: 80px; flex-shrink: 0; font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.activity-dot  { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-5); flex-shrink: 0; }
.activity-text { flex: 1; line-height: 1.4; }
.activity-who   { font-weight: 600; color: var(--ink); }
.activity-what  { color: var(--ink-3); }
.activity-target { font-weight: 500; color: var(--accent); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
  line-height: 1;
  white-space: nowrap;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-lg { font-size: 14px; padding: 10px 20px; gap: 8px; }
.btn-md { font-size: 13px; padding: 7px 14px; }
.btn-sm { font-size: 12px; padding: 5px 11px; gap: 5px; }
.btn-xs { font-size: 11px; padding: 3px 8px; }

.btn-primary  { background: var(--brand);    color: #fff; border-color: var(--brand); }
.btn-primary:hover  { background: #b94e2c; border-color: #b94e2c; }

.btn-accent   { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-accent:hover   { background: var(--accent-2); border-color: var(--accent-2); }

.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-2); }

.btn-ghost { background: transparent; color: var(--ink-3); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger { background: var(--surface); color: var(--bad); border-color: var(--bad-line); }
.btn-danger:hover { background: var(--bad-soft); }

.btn-outline { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-outline:hover { background: var(--surface-2); color: var(--ink); }
.btn-outline-danger { background: transparent; color: var(--bad); border-color: var(--bad-line); }
.btn-outline-danger:hover { background: var(--bad-soft); }

.btn-green { background: var(--good);  color: #fff; border-color: var(--good); }
.btn-green:hover { filter: brightness(.92); }

/* ─── Badges ─────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid;
}

.badge-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.badge-neutral { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); }
.badge-good    { background: var(--good-soft);  color: var(--good);  border-color: var(--good-line); }
.badge-warn    { background: var(--warn-soft);  color: var(--warn);  border-color: var(--warn-line); }
.badge-bad     { background: var(--bad-soft);   color: var(--bad);   border-color: var(--bad-line); }
.badge-accent  { background: var(--accent-soft);color: var(--accent);border-color: #CCDAEA; }
.badge-teal    { background: var(--teal-soft);  color: var(--teal);  border-color: var(--teal-line); }
.badge-ink     { background: var(--ink);        color: var(--surface); border-color: var(--ink); }

/* status-specific */
.badge-scheduled, .badge-upcoming { background: var(--accent-soft); color: var(--accent); border-color: #CCDAEA; }
.badge-published, .badge-completed { background: var(--good-soft); color: var(--good); border-color: var(--good-line); }
.badge-draft, .badge-pending { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge-cancelled  { background: var(--bad-soft);  color: var(--bad);  border-color: var(--bad-line); }
.badge-in_progress { background: var(--accent-soft); color: var(--accent); border-color: #CCDAEA; }

/* Color aliases (red/yellow/green/blue) used by some templates */
.badge-red    { background: var(--bad-soft);    color: var(--bad);    border-color: var(--bad-line); }
.badge-yellow { background: var(--warn-soft);   color: var(--warn);   border-color: var(--warn-line); }
.badge-green  { background: var(--good-soft);   color: var(--good);   border-color: var(--good-line); }
.badge-blue   { background: var(--accent-soft); color: var(--accent); border-color: #CCDAEA; }

/* ─── Verification tier ──────────────────────────────────────────────────── */

.vtier { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.vtier-sym { font-family: 'Roboto Mono', monospace; font-size: 12px; line-height: 1; }
.vtier-label { font-weight: 500; }

.vtier-verified   { color: var(--good); }
.vtier-address    { color: var(--accent); }
.vtier-unverified { color: var(--ink-4); }

/* legacy numeric tier support */
.tier-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.tier-badge.tier-2 { background: var(--accent-soft); color: var(--accent); border-color: #CCDAEA; }
.tier-badge.tier-3 { background: var(--good-soft);   color: var(--good);   border-color: var(--good-line); }

/* ─── Debatable attribution ──────────────────────────────────────────────── */

.debatable-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--teal-line);
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }
.form-group > label, .form-label, .field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.form-group input:not([type=checkbox]):not([type=radio]),
.form-group select,
.form-group textarea,
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.form-group input:not([type=checkbox]):not([type=radio]):focus,
.form-group select:focus,
.form-group textarea:focus,
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-hint { font-size: 11px; color: var(--ink-4); margin-top: 4px; display: block; }
.form-actions { display: flex; gap: 8px; margin-top: 24px; }
.form-container, .ask-container { max-width: 640px; }

.field-hint { font-size: 11.5px; color: var(--ink-4); margin-top: 4px; display: flex; align-items: flex-start; gap: 4px; }

/* ─── Tables ─────────────────────────────────────────────────────────────── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table a { color: var(--accent); text-decoration: none; }
.data-table a:hover { text-decoration: underline; }

/* ─── Compliance ─────────────────────────────────────────────────────────── */

.compliance-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.compliance-tab {
  padding: 10px 20px 12px;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-4);
  cursor: pointer;
  transition: color .12s, border-color .12s;
  text-align: left;
}
.compliance-tab span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-5); margin-top: 1px; }
.compliance-tab:hover { color: var(--ink); }
.compliance-tab.active { color: var(--ink); border-bottom-color: var(--accent); }

.stat-row { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card {
  flex: 1;
  min-width: 120px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-card-good { border-top: 3px solid var(--good); }
.stat-card-warn { border-top: 3px solid var(--warn); }
.stat-card-bad  { border-top: 3px solid var(--bad);  }
.stat-value { font-family: 'Roboto Serif', Georgia, serif; font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); }
.stat-hint  { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; }

/* Compliance alert list */
.alert-list { list-style: none; }
.alert-item {
  padding: 12px 16px;
  border-left: 3px solid;
  margin-bottom: 4px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.alert-item.alert-red    { border-color: var(--bad);  background: var(--bad-soft); }
.alert-item.alert-yellow { border-color: var(--warn); background: var(--warn-soft); }
.alert-item.alert-green  { border-color: var(--good); background: var(--good-soft); }
.alert-rule   { font-weight: 600; font-size: 13px; color: var(--ink); }
.alert-meta   { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.alert-statute { font-size: 11px; color: var(--ink-4); }

/* ─── Constituent Voice ───────────────────────────────────────────────────── */

.constituent-header { margin-bottom: 20px; }

.sentiment-bar-wrap { margin-bottom: 16px; }
.sentiment-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--line-2);
}
.sentiment-seg { height: 100%; }
.sentiment-seg.sentiment-negative { background: var(--bad); }
.sentiment-seg.sentiment-positive { background: var(--good); }
.sentiment-seg.sentiment-neutral  { background: var(--ink-4); }
.sentiment-seg.sentiment-mixed    { background: var(--warn); }

.sentiment-legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-4); margin-top: 8px; flex-wrap: wrap; }
.sentiment-legend .total    { font-weight: 600; color: var(--ink-3); }
.sentiment-legend .verified { color: var(--good); font-weight: 500; }

.filter-form { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-form select {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  outline: none;
}
.filter-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Voice cards */
.stmt-list-full { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.stmt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
}
.stmt-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); border-radius: var(--radius) var(--radius) 0 0; }

.stmt-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.stmt-name   { font-weight: 600; font-size: 13px; color: var(--ink); }
.stmt-body   { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.stmt-footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.stmt-actions { margin-top: 8px; display: flex; gap: 6px; }
.stmt-date   { font-size: 11px; color: var(--ink-5); margin-left: auto; font-variant-numeric: tabular-nums; }

.sentiment-tag { font-size: 11px; padding: 2px 7px; border-radius: 3px; font-weight: 500; }
.sentiment-positive { background: var(--good-soft); color: var(--good); }
.sentiment-negative { background: var(--bad-soft);  color: var(--bad); }
.sentiment-neutral  { background: var(--surface-2); color: var(--ink-3); }
.sentiment-mixed    { background: var(--warn-soft);  color: var(--warn); }

.source-tag  { font-size: 11px; color: var(--ink-4); }
.topic-tag   { font-size: 11px; background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 3px; font-weight: 500; }
.in-district { font-size: 11px; color: var(--good); font-weight: 500; }

/* Dashboard stmt list */
.stmt-list { list-style: none; }
.stmt-list li { padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.stmt-list li:last-child { border-bottom: none; }
.stmt-preview { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.stmt-meta { font-size: 11px; color: var(--ink-4); margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── Meetings ───────────────────────────────────────────────────────────── */

.meeting-list-layout { display: flex; height: calc(100vh - var(--topbar-h)); overflow: hidden; margin: -24px -28px; }

.meeting-list-panel {
  width: 340px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.meeting-list-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meeting-list-scroll { flex: 1; overflow-y: auto; }

.meeting-list-section { padding: 10px 20px 4px; }
.meeting-list-section-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }

.meeting-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  border-left: 2px solid transparent;
  transition: background .1s, border-color .1s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'Roboto', sans-serif;
}
.meeting-row:hover { background: var(--surface); }
.meeting-row.active { background: var(--surface); border-left-color: var(--accent); }
.meeting-row-date { font-family: 'Roboto Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); margin-bottom: 3px; }
.meeting-row-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.meeting-row-time  { font-size: 11px; color: var(--ink-4); margin-top: 3px; }

.meeting-detail { flex: 1; overflow-y: auto; padding: 28px; }

.meeting-header { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.meeting-header-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.meeting-title { font-family: 'Roboto Serif', Georgia, serif; font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.meeting-meta { font-size: 13.5px; color: var(--ink-3); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 20px; }

.meeting-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 640px) { .meeting-status-grid { grid-template-columns: 1fr; } }
.status-card {
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid;
}
.status-card-good { background: var(--good-soft); border-color: var(--good-line); }
.status-card-warn { background: var(--warn-soft); border-color: var(--warn-line); }
.status-card-neutral { background: var(--surface-2); border-color: var(--line); }

.status-card-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.status-card-value { font-size: 13px; font-weight: 600; }
.status-card-good .status-card-value { color: var(--good); }
.status-card-warn .status-card-value { color: var(--warn); }
.status-card-neutral .status-card-value { color: var(--ink-3); }

.meeting-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.meeting-section-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
}
.meeting-section-nav a {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  padding: 8px 16px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .12s, border-color .12s;
}
.meeting-section-nav a:hover { color: var(--ink); border-bottom-color: var(--line); }

/* Agenda */
.agenda-list { list-style: none; }
.agenda-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line-2);
  cursor: grab;
  transition: background .1s;
}
.agenda-item:last-child { border-bottom: none; }
.agenda-item:hover { background: var(--surface-2); }
.agenda-item-num { font-family: 'Roboto Mono', monospace; font-size: 10.5px; color: var(--ink-4); width: 24px; }
.agenda-item-title { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.agenda-item-presenter { font-size: 11.5px; color: var(--ink-4); }
.agenda-item-duration { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; width: 60px; text-align: right; }

/* Speaker queue */
.speaker-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.speaker-table th {
  text-align: left;
  padding: 9px 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.speaker-table td { padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.speaker-table tr:last-child td { border-bottom: none; }
.speaker-table tr:hover td { background: var(--surface-2); }

/* Pre-Vote Signal Brief */
.signal-brief { background: var(--surface); }
.signal-brief-meta { background: var(--accent-soft); border: 1px solid #CCDAEA; border-radius: var(--radius); padding: 12px 16px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin-bottom: 20px; }
.signal-brief-meta strong { color: var(--accent); }

.signal-row { margin-bottom: 12px; }
.signal-row-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; font-size: 12px; }
.signal-row-label-text { font-weight: 500; color: var(--ink-2); }
.signal-row-label-counts { font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.signal-bar { display: flex; height: 7px; border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.signal-bar-oppose  { background: var(--ink-2); }
.signal-bar-support { background: var(--accent); }
.signal-bar-neutral { background: var(--ink-5); }

.concerns-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.concern-item { display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.concern-num { font-family: 'Roboto Mono', monospace; font-size: 11px; color: var(--ink-4); width: 20px; flex-shrink: 0; padding-top: 2px; }

/* Compliance checklist in meeting view */
.compliance-list { list-style: none; }
.compliance-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line-2);
}
.compliance-item:last-child { border-bottom: none; }
.compliance-item.status-green  { border-left: 3px solid var(--good); }
.compliance-item.status-yellow { border-left: 3px solid var(--warn); }
.compliance-item.status-red    { border-left: 3px solid var(--bad);  }
.compliance-rule   { font-size: 13px; font-weight: 500; color: var(--ink); flex: 1; }
.compliance-statute { font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.compliance-due    { font-size: 11px; color: var(--warn); margin-top: 2px; font-weight: 500; }
.compliance-actions { margin-left: auto; flex-shrink: 0; }

/* Transcript */
.transcript-body { padding: 16px 20px; }
.transcript-body pre { font-family: 'Roboto Mono', monospace; font-size: 12px; line-height: 1.8; color: var(--ink-3); white-space: pre-wrap; word-break: break-word; }

/* Notify-residents inline form */
.notify-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px; }
.notify-form textarea { flex: 1; min-width: 220px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; font-family: 'Roboto', sans-serif; resize: vertical; outline: none; }
.notify-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ─── Knowledge Base ─────────────────────────────────────────────────────── */

.kb-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .kb-layout { grid-template-columns: 1fr; } }

.kb-sidebar { position: sticky; top: 20px; }
.kb-sidebar-heading { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.kb-folder-list { list-style: none; }
.kb-folder-item { display: flex; align-items: center; gap: 7px; padding: 2px 0; font-size: 13px; color: var(--ink-3); border-radius: var(--radius); }
.kb-folder-item a { padding: 5px 6px; border-radius: var(--radius); width: 100%; }
.kb-folder-item a:hover { background: var(--surface-2); color: var(--ink); }
.kb-folder-item--active a { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.kb-folder-icon { display: flex; align-items: center; flex-shrink: 0; }
.kb-folder-icon svg { width: 14px; height: 14px; }
.kb-folder-name { flex: 1; }
.kb-folder-count { font-size: 11px; color: var(--ink-5); background: var(--line-2); padding: 1px 6px; border-radius: 8px; }

.kb-topic-sidebar-list { list-style: none; margin-top: 4px; }
.kb-topic-sidebar-link { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; border-radius: var(--radius); gap: 6px; }
.kb-topic-sidebar-link:hover { background: var(--surface); color: var(--ink); }
.case-indicator { color: var(--accent); font-size: 8px; }

.kb-sidebar-section { margin-bottom: 20px; }

.kb-doc-list { list-style: none; }
.kb-doc-list li { padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.kb-doc-list li:last-child { border-bottom: none; }
.doc-title { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.doc-meta  { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.doc-date  { font-size: 11px; color: var(--ink-5); }
.source-badge { font-size: 10px; background: var(--surface-2); color: var(--ink-4); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line); }

/* ─── Cases ──────────────────────────────────────────────────────────────── */

.case-list { display: flex; flex-direction: column; gap: 10px; }
.case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.case-priority-high   { border-left-color: var(--bad); }
.case-priority-urgent { border-left-color: var(--bad); }
.case-priority-medium { border-left-color: var(--warn); }
.case-priority-low    { border-left-color: var(--line); }

.case-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.case-meta-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.case-topic-link { font-size: 11.5px; color: var(--accent); text-decoration: none; }
.case-topic-link:hover { text-decoration: underline; }
.count-constituent { color: var(--teal); }
.constituent-count { font-size: 11px; color: var(--ink-4); }
.case-number { font-size: 10.5px; font-weight: 600; color: var(--ink-5); letter-spacing: .05em; }
.case-title { font-family: 'Roboto Serif', Georgia, serif; font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.case-title a { color: inherit; text-decoration: none; }
.case-title a:hover { color: var(--accent); }
.case-summary { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; line-height: 1.5; }
.case-footer { display: flex; justify-content: space-between; align-items: center; }
.case-updated { font-size: 11px; color: var(--ink-5); }
.case-counts { display: flex; align-items: center; gap: 10px; }
.count-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-4); }
.count-badge svg { width: 13px; height: 13px; flex-shrink: 0; }

.badge-researching     { background: var(--accent-soft); color: var(--accent); border-color: #CCDAEA; }
.badge-pending_response{ background: var(--warn-soft);   color: var(--warn);   border-color: var(--warn-line); }
.badge-resolved        { background: var(--good-soft);   color: var(--good);   border-color: var(--good-line); }
.badge-closed          { background: var(--surface-2);   color: var(--ink-4);  border-color: var(--line); }
.badge-priority-urgent { background: var(--bad-soft);   color: var(--bad);   border-color: var(--bad-line); }
.badge-priority-high   { background: var(--bad-soft);   color: var(--bad);   border-color: var(--bad-line); }
.badge-priority-medium { background: var(--warn-soft);  color: var(--warn);  border-color: var(--warn-line); }
.badge-priority-low    { background: var(--surface-2);  color: var(--ink-4); border-color: var(--line); }

.case-view-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .case-view-layout { grid-template-columns: 1fr; } }

/* case timeline */
.case-timeline { display: flex; flex-direction: column; }
.timeline-entry { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.timeline-entry:last-child { border-bottom: none; }
.timeline-icon { flex-shrink: 0; width: 28px; height: 28px; background: var(--surface-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.timeline-icon svg { width: 13px; height: 13px; color: var(--ink-4); }
.timeline-content { flex: 1; min-width: 0; }
.timeline-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.note-type-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); }
.timeline-date { font-size: 11.5px; color: var(--ink-4); }
.timeline-body { font-size: 13px; line-height: 1.6; color: var(--ink-2); }

/* internal notes: dashed border so it's visually distinct */
.note-type-internal .timeline-icon { border-style: dashed; border-color: var(--warn-line); }
.note-type-internal .note-type-label { color: var(--warn); }

/* ─── Case detail view ───────────────────────────────────────────────────── */

.inline-form { display: inline; }
.select-inline {
  font-size: 12px;
  font-family: inherit;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 8px;
  cursor: pointer;
}
.select-inline:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.case-header-card { padding: 20px 24px !important; }
.case-header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.case-header-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.case-header-actions { display: flex; gap: 8px; align-items: center; }
.case-view-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.case-topic-ref { font-size: 12.5px; color: var(--ink-4); margin-bottom: 12px; }
.case-topic-ref a { color: var(--accent); text-decoration: none; }
.case-topic-ref a:hover { text-decoration: underline; }
.case-issue-summary { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin-bottom: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); border-left: 3px solid var(--line); }
.case-header-footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--ink-4); font-size: 12px; padding-top: 14px; border-top: 1px solid var(--line-2); margin-top: 14px; }

.add-note-form { padding: 16px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.add-note-form .form-row { margin-bottom: 10px; }
.add-note-form .form-textarea { margin: 10px 0; }
.form-row-split { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-row-split .form-input { flex: 1; min-width: 0; }

.timeline-source { margin-top: 6px; }
.timeline-source a { font-size: 11.5px; color: var(--accent); text-decoration: none; }
.timeline-source a:hover { text-decoration: underline; }

.stmt-case-list { list-style: none; padding: 0 14px 10px; }
.stmt-case-item { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.stmt-case-item:last-child { border-bottom: none; }
.stmt-body { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin-bottom: 4px; }
.stmt-meta-mini { font-size: 11px; color: var(--ink-4); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.in-district { color: var(--good); font-weight: 600; }
.stmt-sentiment-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin: 12px 14px 6px; }
.sbar-seg { transition: width .3s; }
.sbar-neg { background: var(--bad); }
.sbar-pos { background: var(--good); }
.sbar-mix { background: var(--warn); }
.sbar-neu { background: var(--line); }
.stmt-legend-mini { display: flex; gap: 10px; padding: 0 14px 10px; font-size: 11px; flex-wrap: wrap; }
.stmt-legend-mini .neg { color: var(--bad); }
.stmt-legend-mini .pos { color: var(--good); }
.stmt-legend-mini .mix { color: var(--warn); }
.stmt-legend-mini .in-d { color: var(--ink-4); }

.doc-case-list { list-style: none; padding: 8px 14px 10px; }
.doc-case-list li { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.doc-case-list li:last-child { border-bottom: none; }
.doc-case-title { font-size: 13px; color: var(--ink); text-decoration: none; font-weight: 500; }
.doc-case-title:hover { color: var(--accent); }
.doc-meta-mini { font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.card-footer { padding: 12px 14px; border-top: 1px solid var(--line-2); }

/* ─── Casework workspace — master-detail layout ──────────────────────────── */

.case-workspace {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  margin: -24px -28px;
  overflow: hidden;
}

.case-list-panel {
  width: 340px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.case-list-panel-hdr {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.case-list-panel-title { font-size: 13px; font-weight: 600; color: var(--ink); }

.case-filter-strip {
  padding: 8px 12px;
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.case-filter-strip::-webkit-scrollbar { display: none; }

.case-chip {
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--line);
  color: var(--ink-3);
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  line-height: 1.7;
}
.case-chip:hover { border-color: var(--accent); color: var(--accent); }
.case-chip--active { background: var(--accent); color: #fff; border-color: var(--accent); }

.case-list-scroll { flex: 1; overflow-y: auto; }

.case-list-row {
  display: block;
  padding: 11px 14px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--line-2);
  text-decoration: none;
  color: inherit;
  transition: background .1s;
}
.case-list-row:hover { background: var(--surface); }
.case-list-row--active { border-left-color: var(--accent); background: var(--accent-soft); }

.case-list-row-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.case-list-num {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-5);
  letter-spacing: .05em;
  font-family: 'Roboto Mono', monospace;
  margin-right: 2px;
}
.case-list-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-list-row--active .case-list-row-title { color: var(--accent-2); }
.case-list-row-meta {
  font-size: 11px;
  color: var(--ink-5);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.case-list-signal { color: var(--teal); font-weight: 500; }

/* RIGHT PANEL */
.case-detail-panel { flex: 1; overflow-y: auto; background: var(--bg); }
.case-detail-body { padding: 24px; }
.case-detail-cols {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.case-detail-main { display: flex; flex-direction: column; gap: 14px; }
.case-detail-sidebar { display: flex; flex-direction: column; gap: 12px; }

/* Signal block */
.case-signal-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.case-signal-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-5);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.case-signal-tier-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.case-signal-tier { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.case-signal-tier-sym { color: var(--ink-4); margin-right: 3px; }
.case-signal-desc { font-size: 12px; color: var(--ink-4); line-height: 1.5; }

/* Note type visual distinction in timeline */
.case-timeline-entry {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
}
.case-timeline-entry + .case-timeline-entry { border-top: 1px solid var(--line-2); }
.case-note-internal { background: rgba(181,117,31,.04); border-left: 2px solid var(--warn-line); }
.case-note-public_response { background: rgba(47,125,91,.04); border-left: 2px solid var(--good-line); }
.case-note-research { background: var(--surface); }

.case-note-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.case-note-icon svg { width: 11px; height: 11px; color: var(--ink-4); }
.case-note-internal .case-note-icon { border-color: var(--warn-line); border-style: dashed; }
.case-note-public_response .case-note-icon { border-color: var(--good-line); }

.case-note-content { flex: 1; min-width: 0; }
.case-note-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.case-note-type-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-5);
}
.case-note-internal .case-note-type-label { color: var(--warn); }
.case-note-public_response .case-note-type-label { color: var(--good); }
.case-note-research .case-note-type-label { color: var(--accent-2); }
.case-note-date { font-size: 11px; color: var(--ink-5); }
.case-note-body { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.case-note-source { margin-top: 5px; }
.case-note-source a { font-size: 11.5px; color: var(--accent); text-decoration: none; }
.case-note-source a:hover { text-decoration: underline; }

/* Collapsible note adder */
.case-note-adder { padding: 12px 16px; border-top: 1px solid var(--line-2); }
.case-note-adder summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink-3);
}
.case-note-adder summary::-webkit-details-marker { display: none; }
.case-note-adder summary:hover { border-color: var(--accent); color: var(--accent); }
.case-note-adder[open] summary { margin-bottom: 12px; border-color: var(--accent); color: var(--accent); }
.case-note-adder-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }

/* Quick actions card */
.case-action-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case-action-card-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-4);
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-2);
}
.case-action-list { padding: 4px 0; }
.case-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-2);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background .1s;
}
.case-action-btn:hover { background: var(--surface-2); color: var(--accent); }
.case-action-btn svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--ink-4); }
.case-action-btn:hover svg { color: var(--accent); }

@media (max-width: 920px) {
  .case-workspace { flex-direction: column; height: auto; margin: -20px; }
  .case-list-panel { width: 100%; max-height: 260px; border-right: none; border-bottom: 1px solid var(--line); }
  .case-detail-cols { grid-template-columns: 1fr; }
  .meeting-list-layout { flex-direction: column; height: auto; margin: -20px; }
  .meeting-list-panel { width: 100%; max-height: 240px; border-right: none; border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .case-workspace { margin: -14px; }
  .meeting-list-layout { margin: -14px; }
}

/* ─── KB topic view ──────────────────────────────────────────────────────── */

.topic-view-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .topic-view-layout { grid-template-columns: 1fr; } }

.topic-main { min-width: 0; }
.topic-sidebar { min-width: 0; }

.topic-header-card { padding: 20px 24px !important; margin-bottom: 0; }
.topic-description { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin-bottom: 16px; }
.topic-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.world-kb-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; background: var(--teal-soft); color: var(--teal); border: 1px solid var(--teal-line); border-radius: 4px; padding: 3px 8px; font-weight: 500; }
.world-kb-pill svg { width: 12px; height: 12px; flex-shrink: 0; }

.topic-doc-list { }
.topic-doc-item { padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.topic-doc-item:last-child { border-bottom: none; }
.topic-doc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.topic-doc-title { font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none; }
.topic-doc-title:hover { color: var(--accent); }
.topic-doc-badges { display: flex; gap: 5px; flex-shrink: 0; }
.doc-mtg-ref { font-size: 11.5px; color: var(--ink-4); margin-bottom: 5px; }
.doc-preview { font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.doc-source-link { margin-top: 6px; }
.doc-source-link a { font-size: 12px; color: var(--accent); text-decoration: none; }
.doc-source-link a:hover { text-decoration: underline; }

.topic-constituent-box { }
.constituent-voice-note p { font-size: 13px; color: var(--ink-3); line-height: 1.5; margin-bottom: 10px; }
.world-note { font-style: italic; font-size: 12.5px; }
.world-kb-tag { font-size: 10px; background: var(--teal-soft); color: var(--teal); border: 1px solid var(--teal-line); border-radius: 3px; padding: 1px 5px; }
.world-kb-tag-sm { font-size: 10px; background: var(--teal-soft); color: var(--teal); border: 1px solid var(--teal-line); border-radius: 3px; padding: 1px 5px; }

.topic-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--ink-4); }

/* ─── Login ──────────────────────────────────────────────────────────────── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 380px;
  box-shadow: 0 4px 24px rgba(20,24,31,.08);
}
.login-brand { text-align: center; margin-bottom: 32px; }
.brand-mark-large {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}
.login-brand p { font-size: 12px; color: var(--ink-4); }

.btn-full { width: 100%; justify-content: center; }

/* ─── Misc utilities ─────────────────────────────────────────────────────── */

.empty-state { padding: 16px; color: var(--ink-4); font-size: 13px; }
.empty-state a { color: var(--accent); }
.empty-state-large { text-align: center; padding: 60px 24px; color: var(--ink-4); }

.page-actions { margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }

.prose { font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.prose h1, .prose h2 { font-family: 'Roboto Serif', Georgia, serif; font-size: 18px; font-weight: 700; margin: 24px 0 10px; color: var(--ink); }
.prose h3, .prose h4 { font-family: 'Roboto Serif', Georgia, serif; font-size: 15px; font-weight: 600; margin: 20px 0 8px; color: var(--ink); }
.prose p { margin-bottom: 12px; }
.prose ul, .prose ol { margin: 0 0 12px 20px; padding: 0; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 4px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose hr { border: none; border-top: 1px solid var(--line-2); margin: 16px 0; }
.prose blockquote { border-left: 3px solid var(--line-2); margin: 0 0 12px; padding: 8px 14px; color: var(--ink-3); font-style: italic; }
.prose code { font-family: monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; font-size: 12.5px; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 12px 16px; overflow-x: auto; margin-bottom: 12px; }
.prose pre code { background: none; padding: 0; }
.prose-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 13.5px; }
.prose-table th { background: var(--surface-2); font-weight: 600; color: var(--ink); text-align: left; padding: 7px 12px; border: 1px solid var(--line); }
.prose-table td { padding: 6px 12px; border: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.prose-table tr:nth-child(even) td { background: var(--surface-2); }

.divider-dotted {
  height: 1px;
  background-image: linear-gradient(to right, var(--ink-5) 33%, transparent 0%);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  margin: 16px 0;
}

/* Ask / AI */
.ask-layout { display: grid; grid-template-columns: 1fr 240px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .ask-layout { grid-template-columns: 1fr; } }
.answer-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.answer-block h2 { font-family: 'Roboto Serif', Georgia, serif; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.answer-body { font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.generating-notice { padding: 16px; color: var(--warn); font-style: italic; }

/* Insight list */
.insight-list { list-style: none; }
.insight-list li { padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.insight-list li:last-child { border-bottom: none; }
.insight-title { font-weight: 500; font-size: 13px; color: var(--ink); }
.insight-meta  { font-size: 11px; color: var(--ink-5); margin-top: 3px; }

/* KB main layout */
.kb-main { min-width: 0; }
.kb-topics-section { margin-bottom: 28px; }
.section-heading {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 14px;
  letter-spacing: -.01em;
}

/* Recent docs list */
.recent-doc-list { display: flex; flex-direction: column; gap: 0; }
.recent-doc-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}
.recent-doc-item:last-child { border-bottom: none; }
.recent-doc-main { flex: 1; min-width: 0; }
.recent-doc-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}
.recent-doc-title:hover { color: var(--accent); text-decoration: underline; }
.recent-doc-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 11.5px; color: var(--ink-4); }
.recent-doc-date { font-size: 11.5px; color: var(--ink-5); white-space: nowrap; flex-shrink: 0; }
.source-badge-sm {
  font-size: 10px;
  background: var(--surface-2);
  color: var(--ink-4);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  text-transform: capitalize;
}

/* Topic card header + case badge */
.topic-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.topic-case-badge { font-size: 10px; white-space: nowrap; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); border-radius: 3px; padding: 1px 5px; flex-shrink: 0; }

/* KB topic cards */
.topic-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 24px; }
.topic-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
  display: block;
}
.topic-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(30,58,95,.08); }
.topic-card-name { font-size: 14px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }
.topic-card-desc { font-size: 12.5px; color: var(--ink-4); line-height: 1.6; }

.world-kb-badge { font-size: 10.5px; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 3px; border: 1px solid #CCDAEA; }

/* ─── Dashboard card layout ──────────────────────────────────────────────── */

.dash-card { padding: 20px; display: flex; flex-direction: column; }
.dash-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-card-title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.dash-card-link { font-size: 12px; color: var(--accent); text-decoration: none; }
.dash-card-link:hover { text-decoration: underline; }

.dashboard-intro-left { }
.dashboard-intro-eyebrow { margin-bottom: 4px; }
.dashboard-status-item--good { color: var(--good); }
.dashboard-status-item--warn { color: var(--warn); }

/* vtier badge overrides (badge-style — overrides the text-only originals above) */
.vtier {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid transparent;
  line-height: 1.6;
  gap: 3px;
}
.vtier-verified   { background: var(--good-soft);   color: var(--good);   border-color: var(--good-line); }
.vtier-address    { background: var(--accent-soft);  color: var(--accent); border-color: #CCDAEA; }
.vtier-unverified { background: var(--surface-2);    color: var(--ink-4);  border-color: var(--line); }

/* ─── Meetings card list (meetings/index.tt) ─────────────────────────────── */

.mtg-card-list { display: flex; flex-direction: column; }
.mtg-card-row {
  display: flex;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color .12s, box-shadow .12s;
}
.mtg-card-row:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(30,58,95,.07); }
.mtg-card-date {
  width: 64px;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
}
.mtg-card-month { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.mtg-card-day { font-family: 'Roboto Serif', Georgia, serif; font-size: 26px; font-weight: 700; line-height: 1; margin-top: 2px; }
.mtg-card-body { flex: 1; min-width: 0; padding: 14px 16px; }
.mtg-card-title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.mtg-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.mtg-card-chevron { flex-shrink: 0; color: var(--ink-5); margin: auto 16px auto 0; }

.empty-state-icon { margin-bottom: 12px; color: var(--ink-5); }

/* ─── Mobile sidebar ─────────────────────────────────────────────────────── */

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 4px;
  margin-right: 8px;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
}
.sidebar-toggle:hover { background: var(--surface-2); }
.sidebar-toggle svg { width: 20px; height: 20px; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,24,31,.35);
  z-index: 99;
  backdrop-filter: blur(1px);
}

/* Sidebar collapses at 1024px — keeps content usable on narrow laptops */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
  }
  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(20,24,31,.15);
  }
  .sidebar-overlay.is-open { display: block; }
  .sidebar-toggle { display: inline-flex; }
  .main-content { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .page-body { padding: 20px; }
  .dashboard-intro { flex-direction: column; align-items: flex-start; gap: 12px; }
  .dashboard-grid { gap: 12px; }
}

@media (max-width: 640px) {
  .page-body { padding: 14px; }
}

/* ─── Compliance page ────────────────────────────────────────────────────── */

/* stat card color aliases used by compliance/index.tt */
.compliance-stats { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.compliance-stats .stat-card { flex: 1; min-width: 100px; }
.stat-green { border-top: 3px solid var(--good);  }
.stat-yellow{ border-top: 3px solid var(--warn);  }
.stat-red   { border-top: 3px solid var(--bad);   }

/* stat number inside compliance cards */
.stat-num { font-family: 'Roboto Serif', Georgia, serif; font-size: 32px; font-weight: 700; line-height: 1; color: var(--ink); margin-bottom: 4px; }

.compliance-actions { display: flex; gap: 6px; flex-wrap: wrap; white-space: nowrap; }
.rule-desc { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; line-height: 1.4; font-style: italic; }

/* colored button variants for compliance actions */
.btn-good { background: var(--good); color: #fff; border-color: var(--good); }
.btn-good:hover { filter: brightness(.92); }
.btn-warn { background: var(--warn); color: #fff; border-color: var(--warn); }
.btn-warn:hover { filter: brightness(.92); }
.btn-bad  { background: var(--bad);  color: #fff; border-color: var(--bad); }
.btn-bad:hover  { filter: brightness(.92); }

/* ─── KB Document view ───────────────────────────────────────────────────── */

.doc-view-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .doc-view-layout { grid-template-columns: 1fr; } }

.doc-main { min-width: 0; }

.doc-page-header { margin-bottom: 16px; }
.doc-page-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-4);
  text-decoration: none;
  margin-bottom: 8px;
}
.doc-page-back:hover { color: var(--accent); }
.doc-page-title {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 6px;
}
.doc-page-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.doc-card-inner { padding: 24px; }

.doc-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}
.doc-header-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.folder-badge { font-size: 10px; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 3px; border: 1px solid #CCDAEA; }
.world-kb-pill-sm { font-size: 10px; background: var(--teal-soft); color: var(--teal); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--teal-line); }

.doc-mtg-ref {
  font-size: 12px;
  color: var(--ink-4);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 16px;
}

.doc-body { font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.doc-body h3 { font-family: 'Roboto Serif', Georgia, serif; font-size: 17px; font-weight: 600; margin: 24px 0 10px; color: var(--ink); }
.doc-body p { margin-bottom: 10px; }
.doc-body strong { font-weight: 600; color: var(--ink); }
.doc-table-row { font-family: 'Roboto Mono', monospace; font-size: 12px; color: var(--ink-3); padding: 2px 0; border-bottom: 1px solid var(--line-2); }

.doc-sidebar > .card { padding: 0; margin-bottom: 14px; }
.doc-sidebar .card-header { padding: 12px 16px; }
.doc-sidebar .card-header h3 { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); }

.tag-list { list-style: none; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.topic-tag-link {
  display: inline-block;
  padding: 3px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #CCDAEA;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.topic-tag-link:hover { background: #dce8f5; }

.doc-meta-dl { padding: 12px 16px; }
.doc-meta-dl dt { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-5); margin-top: 10px; }
.doc-meta-dl dt:first-child { margin-top: 0; }
.doc-meta-dl dd { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

.case-sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.case-sidebar-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.case-sidebar-list { list-style: none; padding: 10px 14px; }
.case-sidebar-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.case-sidebar-item:last-child { border-bottom: none; }
.case-sidebar-link { display: flex; flex-direction: column; text-decoration: none; flex: 1; min-width: 0; }
.case-sidebar-num   { font-size: 10px; color: var(--ink-5); font-weight: 600; }
.case-sidebar-title { font-size: 12.5px; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Agenda Items ───────────────────────────────────────────────────────── */
.agenda-list { border-top: 1px solid var(--line-2); }
.agenda-item { border-bottom: 1px solid var(--line-2); }
.agenda-item:last-child { border-bottom: none; }

.agenda-item-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; flex-wrap: wrap;
}
.agenda-pos {
  font-size: 11px; font-weight: 700; color: var(--ink-5);
  min-width: 18px; text-align: right; flex-shrink: 0;
}
.agenda-item-title {
  flex: 1; font-size: 13px; font-weight: 500; color: var(--ink);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0;
}
.agenda-topic-tag {
  font-size: 10.5px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid #CCDAEA;
  border-radius: 4px; padding: 1px 6px; text-decoration: none;
  white-space: nowrap;
}
.agenda-topic-tag:hover { text-decoration: underline; }
.agenda-type-badge { font-size: 10px; white-space: nowrap; }
.agenda-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.agenda-generating { font-size: 11px; color: var(--ink-4); font-style: italic; }

.agenda-item-desc {
  font-size: 12px; color: var(--ink-4); padding: 0 20px 10px 48px;
}

/* Vote outcome pill */
.vote-outcome {
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 4px; border: 1px solid; white-space: nowrap; flex-shrink: 0;
}
.vote-outcome-passed   { background: var(--good-soft);   color: var(--good);   border-color: var(--good-line); }
.vote-outcome-failed   { background: var(--bad-soft);    color: var(--bad);    border-color: var(--bad-line); }
.vote-outcome-tabled   { background: var(--warn-soft);   color: var(--warn);   border-color: var(--warn-line); }
.vote-outcome-withdrawn{ background: var(--surface-2);   color: var(--ink-4);  border-color: var(--line); }
.vote-outcome-no_vote  { background: var(--surface-2);   color: var(--ink-4);  border-color: var(--line); }

/* Vote record (after saved) */
.vote-record {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 6px 20px 10px 48px; font-size: 12px; color: var(--ink-4);
}
.vote-motion { font-style: italic; color: var(--ink-3); }
.vote-meta   { color: var(--ink-4); }

/* Vote form */
.vote-form { background: var(--surface-2); border-top: 1px solid var(--line-2); padding: 14px 20px; }
.vote-form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.vote-form-group { display: flex; flex-direction: column; gap: 3px; }
.vote-form-group label { font-size: 10.5px; font-weight: 600; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; }
.vote-form-group.vote-count input { width: 52px; text-align: center; }

/* Pre-vote briefing */
.agenda-briefing {
  border-top: 1px solid var(--line-2);
  background: var(--surface-2);
  padding: 16px 20px;
}
.briefing-label {
  font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.briefing-label::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--teal);
}
.briefing-body { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.briefing-body br + br { display: none; }

/* Add item row */
.agenda-add-row { border-top: 1px solid var(--line-2); padding: 10px 20px; }

/* ── Feed tabs & HTMX fragments ───────────────────────────────────────────── */
.feed-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border, #e5e7eb);
  margin-bottom: 20px;
}
.feed-tab-btn {
  background: none;
  border: none;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 4px 4px 0 0;
  transition: color 0.15s, border-color 0.15s;
}
.feed-tab-btn:hover  { color: var(--text-primary, #111); }
.feed-tab-btn.active { color: var(--teal, #2E8B87); border-bottom-color: var(--teal, #2E8B87); }

.feed-tab-content { min-height: 120px; }
.feed-loading { color: var(--text-muted, #9ca3af); font-size: 0.9rem; padding: 24px 0; }

/* Feed sections (rendered by Debatable::UI::Component::FeedSection) */
.feed-section {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}
.feed-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface, #f9fafb);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  list-style: none;
  user-select: none;
}
.feed-section-header::-webkit-details-marker { display: none; }
.feed-section-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* Topic cards (rendered by Debatable::UI::Component::TopicCard) */
.topic-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
}
.topic-card-body { flex: 1; min-width: 0; }
.topic-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary, #111);
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}
.topic-card-title:hover { text-decoration: underline; }
.topic-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
  line-height: 1.5;
}
.topic-card-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  white-space: nowrap;
}
.topic-card-stats strong { color: var(--text-primary, #111); font-size: 1.05rem; }
.topic-card-stats .stat-verified strong { color: var(--teal, #2E8B87); }
.topic-card-debatable-link {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--teal, #2E8B87);
  text-decoration: none;
  opacity: 0.82;
}
.topic-card-debatable-link:hover { text-decoration: underline; opacity: 1; }

.feed-empty { color: var(--text-muted, #9ca3af); font-size: 0.88rem; padding: 12px 0; }
.feed-section-count.badge {
  background: var(--surface-2, #f3f4f6);
  color: var(--text-muted, #9ca3af);
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 500;
}

/* ── KB Intel Panel (TopicIntelPanel component) ───────────────────────────── */
.intel-panel {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg, #fff);
}
.intel-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--surface, #f9fafb);
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary, #111);
  gap: 10px;
}
.intel-panel-header::-webkit-details-marker { display: none; }
.intel-panel-title { flex: 1; }
.intel-panel-badge {
  background: var(--teal, #2E8B87);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.intel-panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Individual topic entry inside the panel */
.intel-entry { border-top: 1px solid var(--border, #e5e7eb); padding-top: 16px; }
.intel-entry:first-child { border-top: none; padding-top: 0; }
.intel-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.intel-entry-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary, #111);
  text-decoration: none;
}
.intel-entry-name:hover { text-decoration: underline; }
.intel-entry-stats {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.intel-stat strong { color: var(--text-primary, #111); font-size: 1rem; }
.intel-verified strong { color: var(--teal, #2E8B87); }

/* Constituent statements */
.intel-entry-stmts { display: flex; flex-direction: column; gap: 10px; }
.intel-stmt {
  background: var(--surface, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  padding: 10px 12px;
}
.intel-stmt-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.intel-stmt-body {
  font-size: 0.85rem;
  color: var(--text-secondary, #4b5563);
  margin: 0;
  line-height: 1.5;
}

/* ── Topic page accordion sections ──────────────────────────────────────────── */
.topic-accordion-sections {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.topic-accordion-section {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg, #fff);
}
.topic-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: var(--surface, #f9fafb);
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary, #111);
  gap: 10px;
}
.topic-accordion-header::-webkit-details-marker { display: none; }
.topic-accordion-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Official responses */
.response-item {
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding-bottom: 12px;
}
.response-item:last-child { border-bottom: none; padding-bottom: 0; }
.response-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.response-stance {
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
}
.response-item-body {
  font-size: 0.88rem;
  color: var(--text-secondary, #4b5563);
  margin: 0;
  line-height: 1.55;
}

/* Meeting history */
.meeting-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meeting-history-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.meeting-history-date {
  color: var(--text-muted, #9ca3af);
  font-size: 0.8rem;
  min-width: 90px;
}
.meeting-history-body {
  color: var(--text-secondary, #4b5563);
  font-weight: 500;
}
.mtg-link {
  font-size: 0.8rem;
  color: var(--teal, #2E8B87);
  text-decoration: none;
}
.mtg-link:hover { text-decoration: underline; }

/* Constituent voice card (TopicVoiceCard) */
.topic-voice-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.voice-card-stats {
  display: flex;
  gap: 20px;
  padding: 12px 18px;
  background: var(--surface, #f9fafb);
  border-top: 1px solid var(--border, #e5e7eb);
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.voice-stat { display: flex; flex-direction: column; align-items: center; }
.voice-stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary, #111);
  line-height: 1.2;
}
.voice-verified { color: var(--teal, #2E8B87); }
.voice-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.voice-card-stmts {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.voice-stmt {
  background: var(--surface, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  padding: 10px 12px;
}
.voice-stmt-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
  margin-bottom: 5px;
}
.voice-stmt-body {
  font-size: 0.85rem;
  color: var(--text-secondary, #4b5563);
  margin: 0;
  line-height: 1.5;
}
.voice-card-empty {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-muted, #9ca3af);
  margin: 0;
}
.voice-card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border, #e5e7eb);
}
/* ── Signal Summary tier count chips (dashboard) ─────────────────────────── */
.signal-tier-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 4px;
}
.signal-tier-counts .vtier {
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.signal-tier-counts .vtier-verified   { background: var(--good-soft);    color: var(--good);   border-color: var(--good-line); }
.signal-tier-counts .vtier-address    { background: var(--accent-soft);   color: var(--accent); border-color: #CCDAEA; }
.signal-tier-counts .vtier-unverified { background: var(--surface-2);     color: var(--ink-4);  border-color: var(--line); }

.signal-topic-entry { font-size: 12px; }

/* ── Signal Intel Brief (dashboard full-width section) ──────────────────── */
.signal-brief-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.signal-brief-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
}
.signal-brief-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
}
.signal-brief-title {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-top: 2px;
}
.signal-brief-disclaimer {
  font-size: 10.5px;
  color: var(--ink-4);
  line-height: 1.5;
  margin-bottom: 12px;
}
.signal-topic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.signal-topic-row:last-child { border-bottom: none; }
.signal-topic-left { flex: 1; min-width: 0; }
.signal-topic-name { font-weight: 600; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.signal-topic-meta { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.signal-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .signal-topic-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .signal-topic-chips { flex-direction: row; }
}

/* ── Intelligence topic two-col layout ──────────────────────────────────── */
.topic-voice-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .topic-voice-layout { grid-template-columns: 1fr; } }

/* ── Filter form select min-width ───────────────────────────────────────── */
.filter-form select { min-width: 140px; }

/* ── Metric cards (dashboard top row) ───────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 900px)  { .metric-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .metric-grid { grid-template-columns: 1fr 1fr; } }

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.metric-card-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-card-val {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 4px;
}
.metric-card-sub {
  font-size: 11px;
  color: var(--ink-4);
}
.metric-card-sub--good { color: var(--good); }
.metric-card-sub--warn { color: var(--warn); }
.metric-card-sub--bad  { color: var(--bad); }
.metric-card-val--warn { color: var(--warn); }
.metric-card-val--bad  { color: var(--bad); }

/* ── Dashboard 2-col content grid ───────────────────────────────────────── */
.dash-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .dash-2col { grid-template-columns: 1fr; } }

/* list-row style (dashboard meetings & compliance) */
.dash-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
}
.dash-list-row:last-child { border-bottom: none; }
.dash-list-row-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
}
.dash-list-row-icon--warn { background: var(--warn-soft); color: var(--warn); }
.dash-list-row-icon--bad  { background: var(--bad-soft);  color: var(--bad); }
.dash-list-row-icon--good { background: var(--good-soft); color: var(--good); }
.dash-list-row-icon--neutral { background: var(--surface-2); color: var(--ink-4); }
.dash-list-row-body { flex: 1; min-width: 0; }
.dash-list-row-title { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-list-row-sub { font-size: 11px; color: var(--ink-4); }

/* ── Dashboard card header (title + action) ──────────────────────────────── */
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dash-card-title-new {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.01em;
}
.dash-card-action {
  font-size: 11.5px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.dash-card-action:hover { text-decoration: underline; }

/* ── AI insight cards ────────────────────────────────────────────────────── */
.ai-insight-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 10px;
}
.ai-insight-card:last-child { margin-bottom: 0; }
.ai-insight-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ai-insight-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ── Voice items with sentiment border (dashboard) ───────────────────────── */
.dash-voice-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface);
}
.dash-voice-item:last-child { margin-bottom: 0; }
.dash-voice-item--negative { border-left-color: var(--bad); }
.dash-voice-item--positive { border-left-color: var(--good); }
.dash-voice-item--mixed    { border-left-color: var(--warn); }
.dash-voice-item--neutral  { border-left-color: var(--ink-5); }

.dash-voice-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--ink-4);
  flex-wrap: wrap;
}
.dash-voice-meta-name { font-size: 12px; font-weight: 600; color: var(--ink); }
.dash-voice-text { font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* ── Nav section group label ─────────────────────────────────────────────── */
.sidebar-nav-group { margin-top: 12px; }
.sidebar-nav-group:first-child { margin-top: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   Prototype Component System — added in gov-ux overhaul
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── AI Insight Cards (orange left-border, per prototype) ────────────────── */
.ai-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.ai-card:last-child { margin-bottom: 0; }
.ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ai-text { font-size: 12px; line-height: 1.55; color: var(--ink); }

/* ── Sentiment bars (sbar) — community sentiment by topic ───────────────── */
.sbar {
  display: flex;
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0;
}
.sbar-seg { transition: width .4s; }
.sbar-support { background: var(--good); }
.sbar-oppose  { background: var(--bad); }
.sbar-neutral { background: var(--ink-5); }

.sentiment-row { margin-bottom: 16px; }
.sentiment-row:last-child { margin-bottom: 0; }
.sentiment-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.sentiment-meta { font-size: 10px; color: var(--ink-4); }
.sentiment-labels {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--ink-4);
  margin-top: 4px;
}
.sentiment-labels .lbl-support { color: var(--good); font-weight: 500; }
.sentiment-labels .lbl-oppose  { color: var(--bad);  font-weight: 500; }

/* ── Dashboard list rows (with icon, body, badge) ───────────────────────── */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background .1s;
}
.list-row:last-child { border: none; padding-bottom: 0; }
.list-row-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.list-row-body { flex: 1; min-width: 0; }
.list-row-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; color: var(--ink); }
.list-row-sub { font-size: 11px; color: var(--ink-4); }

/* ── Tabs — orange underline style ──────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.tab-item {
  padding: 9px 14px;
  font-size: 12px;
  color: var(--ink-4);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .12s;
  font-weight: 500;
  margin-bottom: -1px;
  background: none;
  border-left: none; border-right: none; border-top: none;
  font-family: inherit;
}
.tab-item:hover { color: var(--ink-2); }
.tab-item.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Filter chips ────────────────────────────────────────────────────────── */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--ink-3);
  border-color: var(--line);
  text-decoration: none;
}
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip--active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

/* ── Drawer (constituent detail panel) ───────────────────────────────────── */
.drawer-overlay {
  position: fixed; top: var(--topbar-h); right: 0; bottom: 0; left: 0;
  background: rgba(25,30,57,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 30;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed; top: var(--topbar-h); right: 0; bottom: 0;
  width: var(--drawer-width);
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  z-index: 40;
  overflow: hidden;
  box-shadow: -8px 0 28px rgba(25,30,57,0.12);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--surface-2);
}
.drawer-close {
  width: 28px; height: 28px;
  border-radius: 6px; border: 1px solid var(--line);
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); font-size: 16px;
  transition: all .1s; margin-left: auto;
}
.drawer-close:hover { background: var(--surface-3); color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; }

/* ── User dropdown ───────────────────────────────────────────────────────── */
.user-dropdown {
  position: absolute;
  bottom: 56px; left: 14px;
  width: 192px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px;
  display: none;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.user-dropdown.open { display: block; }
.user-dropdown-item {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 4px;
  transition: background .1s;
  display: block;
  text-decoration: none;
}
.user-dropdown-item:hover { background: var(--surface-3); color: var(--ink); }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  margin-top: 16px;
}
.page-info { font-size: 11px; color: var(--ink-4); }
.page-btns { display: flex; gap: 4px; }
.page-btn {
  min-width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 11px; color: var(--ink-4);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .1s; padding: 0 6px;
}
.page-btn:hover { background: var(--surface-3); color: var(--ink-2); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Toast notification ──────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--navy); border: 1px solid rgba(255,255,255,.1);
  color: #fff; padding: 11px 20px;
  border-radius: 9px; font-size: 12px; font-weight: 500;
  opacity: 0; transition: opacity .2s;
  pointer-events: none; z-index: 1000;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(25,30,57,0.25);
}

/* ── Feed tab buttons — updated to use orange accent ─────────────────────── */
.feed-tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ── Metric cards — update label text ────────────────────────────────────── */
.metric-label { font-family: 'Roboto', sans-serif; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.metric-val   { font-family: 'Roboto Serif', Georgia, serif; font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--navy); }

/* ── Constituent list page ───────────────────────────────────────────────── */

.clist-filterbar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 0 14px; flex-wrap: wrap;
}
.clist-search-wrap {
  position: relative; flex: 1; min-width: 200px; max-width: 320px;
}
.clist-search-wrap svg {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); opacity: .4; pointer-events: none;
}
.clist-search-input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 10px 7px 32px;
  font-size: 12px; color: var(--ink); outline: none; transition: border-color .15s;
}
.clist-search-input:focus { border-color: var(--brand); }
.clist-search-input::placeholder { color: var(--ink-4); }

.clist-filter-select {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 10px; font-size: 12px;
  color: var(--ink-3); outline: none; cursor: pointer; transition: border-color .15s;
}
.clist-filter-select:focus { border-color: var(--brand); }

.clist-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all .15s; white-space: nowrap;
}
.clist-chip-all     { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.clist-chip-active  { background: var(--good-soft);  color: var(--good); }
.clist-chip-active:hover  { border-color: var(--good); }
.clist-chip-engaged { background: var(--teal-soft);  color: var(--teal); }
.clist-chip-engaged:hover { border-color: var(--teal); }
.clist-chip-flagged { background: var(--warn-soft);  color: var(--warn); }
.clist-chip-flagged:hover { border-color: var(--warn); }
.clist-chip-unverified { background: var(--surface-3); color: var(--ink-4); border-color: var(--line); }
.clist-chip-unverified:hover { border-color: var(--ink-4); }

.clist-thead {
  display: grid;
  grid-template-columns: 2fr 130px 1fr 110px 120px;
  gap: 0; padding: 0 6px; height: 36px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0; flex-shrink: 0;
}

@media (max-width: 680px) {
  .clist-thead { grid-template-columns: 1fr 120px 90px; }
  .clist-row2  { grid-template-columns: 1fr 120px 90px; }
  .clist-th:nth-child(3),
  .clist-th:nth-child(4)  { display: none; }
}
.clist-th {
  font-size: 10px; font-weight: 600; color: var(--ink-4);
  letter-spacing: .07em; text-transform: uppercase;
  cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 4px; padding: 0 8px;
}
.clist-th:hover { color: var(--ink-2); }
.clist-th.sorted { color: var(--brand); }

.clist-list-wrap {
  overflow-y: auto; overflow-x: hidden;
  max-height: 62vh;
  border: 1px solid var(--line); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.clist-list-wrap::-webkit-scrollbar { width: 6px; }
.clist-list-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.clist-row {
  display: grid;
  grid-template-columns: 28px 1fr 90px 160px 120px 80px 90px 40px;
  gap: 0; padding: 0 2px; height: 52px; align-items: center;
  border-bottom: 1px solid var(--line-2); cursor: pointer;
  transition: background .1s; background: var(--surface);
}
.clist-row:last-child { border-bottom: none; }
.clist-row:hover { background: var(--surface-2); }
.clist-row.selected { background: var(--brand-soft); border-left: 2px solid var(--brand); padding-left: 0; }

.clist-check {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1px solid var(--line); background: transparent;
  cursor: pointer; appearance: none; flex-shrink: 0; margin: 0 6px;
  transition: all .1s;
}
.clist-check:checked { background: var(--brand); border-color: var(--brand); }

.clist-cell-name { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 8px; }
.clist-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
  font-family: 'Roboto Mono', monospace;
}
.clist-name-primary { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clist-name-secondary { font-size: 11px; color: var(--ink-4); font-family: 'Roboto Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.clist-cell { display: flex; align-items: center; padding: 0 8px; }
.clist-cell-center { justify-content: center; padding: 0; }

.ctier-t1 { background: var(--good-soft);  color: var(--good);  font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 4px; white-space: nowrap; font-family: 'Roboto Mono', monospace; }
.ctier-t2 { background: var(--teal-soft);  color: var(--teal);  font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 4px; white-space: nowrap; font-family: 'Roboto Mono', monospace; }
.ctier-t3 { background: var(--surface-3);  color: var(--ink-4); font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 4px; white-space: nowrap; border: 1px solid var(--line); font-family: 'Roboto Mono', monospace; }

.clist-topic-tags { display: flex; gap: 3px; flex-wrap: wrap; overflow: hidden; max-height: 20px; }
.clist-topic-tag  { font-size: 10px; padding: 2px 5px; border-radius: 3px; background: var(--surface-3); color: var(--ink-4); white-space: nowrap; }

.clist-eng-bar-wrap { width: 54px; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin-right: 6px; }
.clist-eng-bar { height: 100%; border-radius: 2px; }

.clist-msg-count { display: flex; align-items: center; gap: 4px; font-family: 'Roboto Mono', monospace; font-size: 11px; }
.clist-msg-dot { width: 6px; height: 6px; border-radius: 50%; }
.clist-dot-unread { background: var(--brand); }
.clist-dot-read   { background: var(--line); }

.clist-last-active { font-family: 'Roboto Mono', monospace; font-size: 11px; color: var(--ink-4); }

.clist-action-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid transparent; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); transition: all .1s; font-size: 16px;
}
.clist-action-btn:hover { background: var(--surface-3); border-color: var(--line); color: var(--ink-2); }

/* Drawer additions for constituent detail */
.drawer-header-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.drawer-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; font-family: 'Roboto Mono', monospace; flex-shrink: 0;
}
.drawer-name    { font-family: 'Roboto Serif', Georgia, serif; font-size: 17px; font-weight: 700; margin-bottom: 2px; color: var(--navy); }
.drawer-address { font-size: 12px; color: var(--ink-4); margin-bottom: 6px; word-break: break-all; }
.drawer-tags    { display: flex; gap: 6px; flex-wrap: wrap; }
.drawer-tag     { font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 500; }
.drawer-stats   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.dstat { background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; text-align: center; }
.dstat-val   { font-family: 'Roboto Serif', Georgia, serif; font-size: 17px; font-weight: 700; line-height: 1; margin-bottom: 3px; }
.dstat-label { font-size: 10px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }

.drawer-tabs { display: flex; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.dtab {
  flex: 1; padding: 10px; text-align: center;
  font-size: 12px; font-weight: 500; color: var(--ink-4);
  cursor: pointer; border-bottom: 2px solid transparent; transition: all .1s;
}
.dtab:hover { color: var(--ink-2); }
.dtab.active { color: var(--brand); border-bottom-color: var(--brand); }
.drawer-panel { display: none; padding: 16px 20px; }
.drawer-panel.active { display: block; }

.clist-msg-compose {
  display: flex; gap: 8px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.clist-msg-compose input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 12px; font-size: 12px; color: var(--ink); outline: none;
}
.clist-msg-compose input:focus { border-color: var(--brand); }
.clist-msg-compose input::placeholder { color: var(--ink-4); }
.clist-msg-thread { display: flex; flex-direction: column; gap: 12px; }
.clist-msg-item { display: flex; flex-direction: column; gap: 4px; }
.clist-msg-meta { font-size: 10px; color: var(--ink-4); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.clist-msg-bubble { padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.5; }
.clist-msg-them { background: var(--surface-3); border-radius: 10px 10px 10px 2px; color: var(--ink); }
.clist-msg-us   { background: var(--navy); color: #fff; border-radius: 10px 10px 2px 10px; align-self: flex-end; }
.clist-type-badge { font-size: 9px; padding: 1px 6px; border-radius: 10px; font-weight: 700; }
.clist-badge-comment { background: var(--teal-soft); color: var(--navy); }
.clist-badge-foia    { background: var(--warn-soft); color: var(--warn); }
.clist-badge-email   { background: var(--good-soft); color: var(--good); }
.clist-badge-system  { background: var(--surface-3); color: var(--ink-4); }

.clist-eng-section { margin-bottom: 20px; }
.clist-eng-section-title {
  font-size: 10px; font-weight: 700; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
}
.clist-eng-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 12px; gap: 8px;
}
.clist-eng-item-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.clist-eng-item-sub  { font-size: 10px; color: var(--ink-4); }

.clist-profile-row  { display: flex; align-items: flex-start; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-2); gap: 12px; }
.clist-profile-label { font-size: 11px; color: var(--ink-4); white-space: nowrap; min-width: 110px; }
.clist-profile-val   { font-size: 12px; color: var(--ink-2); text-align: right; word-break: break-word; }

/* ── Stat number — compliance/dashboard ─────────────────────────────────── */
.stat-num { font-family: 'Roboto Serif', Georgia, serif; font-size: 30px; font-weight: 700; line-height: 1; }

/* ── Dashboard 4-col metric grid ────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Dash card header ────────────────────────────────────────────────────── */
.dash-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dash-card-title-new {
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.dash-card-action {
  font-size: 11px;
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
}
.dash-card-action:hover { text-decoration: underline; }

/* ── Dashboard list rows with icon ──────────────────────────────────────── */
.dash-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background .1s;
}
.dash-list-row:last-child { border: none; padding-bottom: 0; }
.dash-list-row-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-list-row-icon--good { background: var(--good-soft); color: var(--good); }
.dash-list-row-icon--warn { background: var(--warn-soft); color: var(--warn); }
.dash-list-row-icon--bad  { background: var(--bad-soft);  color: var(--bad); }
.dash-list-row-body { flex: 1; min-width: 0; }
.dash-list-row-title { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.dash-list-row-sub   { font-size: 11px; color: var(--ink-4); }

/* ── Signal topic rows (dashboard resident signal card) ─────────────────── */
.signal-topic-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.signal-topic-row:last-child { border: none; }
.signal-topic-left { flex: 1; min-width: 0; }
.signal-topic-name { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.signal-topic-meta { font-size: 11px; color: var(--ink-4); }
.signal-topic-chips { display: flex; gap: 5px; flex-shrink: 0; }

/* ── Card inner padding ─────────────────────────────────────────────────── */
.card-inner { padding: 18px 20px; }

/* ── Login page updates ─────────────────────────────────────────────────── */
.login-container { border-radius: var(--radius-lg); }

/* ── Compliance stat cards ──────────────────────────────────────────────── */
.compliance-stats .stat-card { border-radius: var(--radius-lg); }
.stat-green { border-top: 3px solid var(--good); }
.stat-yellow{ border-top: 3px solid var(--warn); }
.stat-red   { border-top: 3px solid var(--bad); }

/* ── Meeting card row ───────────────────────────────────────────────────── */
.mtg-card-row { border-radius: var(--radius-lg); }
.mtg-card-date { background: var(--brand); }
.mtg-card-day  { font-family: 'Roboto Serif', Georgia, serif; }

/* ── Case cards ─────────────────────────────────────────────────────────── */
.case-card { border-radius: var(--radius-lg); }
.case-title { font-family: 'Roboto Serif', Georgia, serif; }

/* ── Form inputs ────────────────────────────────────────────────────────── */
.form-group input:not([type=checkbox]):not([type=radio]):focus,
.form-group select:focus,
.form-group textarea:focus,
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ── KB topic cards ─────────────────────────────────────────────────────── */
.topic-card { border-radius: var(--radius-lg); }
.topic-card:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(207,95,58,.10); }

/* ── Empty state icon ───────────────────────────────────────────────────── */
.empty-state-icon { color: var(--ink-5); margin-bottom: 12px; }

/* ── Decision Brief (meeting agenda item — publish rationale) ───────────── */
.decision-brief {
  margin: 12px 0 4px;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
}
.decision-brief--published {
  background: color-mix(in srgb, var(--good) 8%, white);
  border: 1px solid color-mix(in srgb, var(--good) 25%, transparent);
}
.decision-brief--draft {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}
.decision-brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.decision-brief-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--good);
  display: flex;
  align-items: center;
  gap: 5px;
}
.decision-brief-label--draft { color: var(--ink-3); }
.decision-rationale-text {
  margin: 0 0 4px;
  padding: 10px 14px;
  background: white;
  border-left: 3px solid var(--good);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
  line-height: 1.65;
  font-style: italic;
}

/* ── Decision voice summary bar ─────────────────────────────────────────── */
.decision-voice-summary {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.dvs-label    { color: var(--ink-3); }
.dvs-total    { font-weight: 600; color: var(--ink); }
.dvs-verified { font-size: 11px; color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); padding: 1px 6px; border-radius: 99px; }
.dvs-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--line-2);
  overflow: hidden;
  display: flex;
  margin: 2px 0;
}
.dvs-seg { display: block; height: 100%; }
.dvs-support { background: var(--good); }
.dvs-oppose  { background: var(--bad); }
.dvs-neutral { background: var(--ink-5); }
.dvs-counts  { display: flex; gap: 10px; width: 100%; }
.dvs-count   { font-size: 11px; font-weight: 500; }
.dvs-count.dvs-support { color: var(--good); }
.dvs-count.dvs-oppose  { color: var(--bad); }
.dvs-count.dvs-neutral { color: var(--ink-4); }

/* ── Public comment card in constituent voice section ───────────────────── */
.stmt-stance-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 1px 7px;
  border-radius: 99px;
}
.stmt-stance-support { background: color-mix(in srgb, var(--good) 12%, white); color: var(--good); }
.stmt-stance-oppose  { background: color-mix(in srgb, var(--bad)  12%, white); color: var(--bad);  }
.stmt-stance-neutral { background: var(--bg-2); color: var(--ink-4); }

/* ── KB Document Editing ─────────────────────────────────────────────── */
.doc-edit-layout   { display:grid; grid-template-columns:1fr 260px; gap:20px; align-items:start; }
.doc-edit-main     { min-width:0; }
.doc-edit-sidebar  { position:sticky; top:20px; }
.doc-edit-form     { display:flex; flex-direction:column; gap:16px; padding:20px 20px 24px; }
.doc-edit-form .form-group { margin-bottom:0; }
.doc-edit-form .form-actions { margin-top:4px; padding-top:16px; border-top:1px solid var(--line); }

.md-editor-toolbar { display:flex; gap:4px; margin-bottom:6px; }
.md-tool           { padding:3px 8px; font-size:12px; font-weight:600; background:var(--bg-2); border:1px solid var(--line-2); border-radius:4px; cursor:pointer; color:var(--ink-2); }
.md-tool:hover     { background:var(--bg-3); }
.form-textarea--mono { font-family:ui-monospace,monospace; font-size:13px; }

.topic-checkbox-grid   { display:flex; flex-wrap:wrap; gap:8px; max-height:180px; overflow-y:auto; padding:4px 2px; border:1px solid var(--line-2); border-radius:6px; }
.topic-checkbox-label  { display:flex; align-items:center; gap:5px; font-size:13px; cursor:pointer; padding:4px 8px; border:1px solid var(--line-2); border-radius:6px; background:var(--bg-1); text-transform:none; letter-spacing:normal; color:var(--ink-2); font-weight:400; }
.topic-checkbox-label:hover { border-color:var(--accent); }
.topic-checkbox-label input[type=checkbox]:checked ~ * { color:var(--accent); }

.edit-tips-list { margin:0; padding:0 0 0 16px; list-style:disc; font-size:12.5px; color:var(--ink-3); line-height:1.7; }
.edit-tips-list strong { color:var(--ink-2); }

/* ── KB Research Brief ───────────────────────────────────────────────── */
.ask-brief-note    { font-size:11px; color:var(--ink-4); align-self:center; }
.loading-spinner   { width:28px; height:28px; border:3px solid var(--line-2); border-top-color:var(--accent); border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── KB page-actions upgrade ─────────────────────────────────────────── */
.page-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:20px; }

@media(max-width:680px){
  .doc-edit-layout { grid-template-columns:1fr; }
}

/* ── Mobile responsive additions ────────────────────────────────────────── */
@media (max-width: 680px) {
  .topic-card { flex-direction: column; gap: 8px; }
  .topic-card-stats { flex-shrink: unset; width: 100%; justify-content: flex-start; gap: 12px; }
  .feed-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0; }
  .feed-tab-btn { padding: 8px 14px; font-size: 0.85rem; flex-shrink: 0; }
}

@media (max-width: 768px) {
  .signal-topic-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dash-list-row-title { font-size: 12px; }
  .dash-list-row-sub { font-size: 11px; }
}

@media (max-width: 480px) {
  .metric-card-val { font-size: 22px; }
}

/* ── Settings shared layout + utilities (added during gov UI refresh) ──── */
.settings-layout { display: flex; gap: 32px; }
.settings-nav { width: 200px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.settings-nav-link {
  display: block; padding: 8px 12px; font-size: 13px; color: var(--ink-3);
  text-decoration: none; border-radius: var(--radius); font-weight: 500;
  transition: background .1s, color .1s;
}
.settings-nav-link:hover { background: var(--surface-2); color: var(--ink); }
.settings-nav-link.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.settings-body { flex: 1; min-width: 0; }
@media (max-width: 768px) {
  .settings-layout { flex-direction: column; }
  .settings-nav { width: 100%; flex-direction: row; flex-wrap: wrap; padding-bottom: 4px;
                  border-bottom: 1px solid var(--line); margin-bottom: 4px; }
}

.count-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 7px;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line);
  border-radius: 10px; font-size: 11px; font-weight: 600;
}

.link-action {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 12.5px; color: var(--accent); text-decoration: none;
  font-family: inherit; font-weight: 500;
}
.link-action:hover { text-decoration: underline; }
.link-danger { color: var(--bad); }

/* Modal pattern reused for New Case, Make Public confirm, Zoom placeholder, etc. */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,28,40,.45);
  display: none; align-items: center; justify-content: center; z-index: 100;
  padding: 16px;
}
.modal-backdrop.is-open { display: flex; }
.modal-card {
  background: var(--surface); border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.18);
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.modal-header {
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2, .modal-header h3 {
  font-family: 'Roboto Serif', Georgia, serif; font-size: 16px; font-weight: 600; margin: 0;
}
.modal-body { padding: 20px 22px; }
.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2);
  border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;
}
.modal-close-x {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--ink-4); font-size: 18px; line-height: 1;
}

/* Tab strip used in Inbox split, Compliance OMA/FOIA, Casework filter, KB scope */
.tab-strip {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tab-strip .tab-item {
  background: none; border: none; cursor: pointer;
  padding: 9px 14px; font-size: 13px; font-weight: 500; color: var(--ink-3);
  border-bottom: 2px solid transparent; white-space: nowrap; font-family: inherit;
}
.tab-strip .tab-item:hover { color: var(--ink); }
.tab-strip .tab-item.active { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }

/* Collapsible activity feed (Section 1 dashboard) */
.activity-summary-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; user-select: none;
}
.activity-summary-bar:hover { background: var(--surface-3, #eef2f7); }
.activity-summary-bar .chev { transition: transform .15s; }
.activity-summary-bar.is-open .chev { transform: rotate(180deg); }

/* Lock icon next to non-public meetings (Section 5) */
.icon-lock-inline { width: 13px; height: 13px; vertical-align: -2px; color: var(--ink-4); margin-left: 6px; }

/* ── KB scope filter + roomier topic cards (Section 4) ──────────────────── */
.topic-card-grid--3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) {
  .topic-card-grid--3col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .topic-card-grid--3col { grid-template-columns: 1fr; }
}
.topic-card.topic-card--roomy {
  padding: 18px 18px 16px;
  min-height: 130px;
  display: flex; flex-direction: column; gap: 8px;
}
.topic-card.topic-card--roomy .topic-card-name { font-size: 15px; line-height: 1.4; }
.topic-card.topic-card--roomy .topic-card-desc { font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.topic-card.topic-card--roomy .topic-card-footer { margin-top: auto; padding-top: 8px; gap: 8px; }

/* KB scope groups */
.kb-scope-group { margin-bottom: 28px; }
.kb-scope-group:last-child { margin-bottom: 0; }
.kb-show-more { margin-top: 0; }

/* KB scope grouping label */
.kb-scope-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-2);
}

/* KB show-more toggle button */
.kb-show-more-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  margin-top: 10px;
  background: none;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--ink-4);
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.kb-show-more-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Civic Library list + detail (Section 4) ────────────────────────────── */
.civic-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit;
  transition: border-color .1s, box-shadow .1s;
}
.civic-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(30,58,95,.08); }
.civic-card-jurisdiction {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-4);
}
.civic-card-title { font-family: 'Roboto Serif', Georgia, serif; font-size: 15px; font-weight: 600; line-height: 1.4; }
.civic-card-desc  { font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.civic-card-footer {
  display: flex; gap: 12px; align-items: center;
  font-size: 11.5px; color: var(--ink-4); margin-top: auto; padding-top: 6px;
}

.civic-detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media (max-width: 960px) { .civic-detail-layout { grid-template-columns: 1fr; } }

.comment-thread { display: flex; flex-direction: column; gap: 14px; }
.comment-item {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  background: var(--surface);
}
.comment-item.is-reply { margin-left: 26px; background: var(--surface-2); }
.comment-meta { font-size: 11.5px; color: var(--ink-4); margin-bottom: 4px; }
.comment-meta strong { color: var(--ink-2); font-weight: 600; }
.comment-body { font-size: 13.5px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }

/* ─── Sprint 2 ─────────────────────────────────────────────────────────── */

/* Role-preview banner (Section 2). Sits above .app-shell. */
.preview-banner {
  background: var(--warn); color: #fff;
  border-bottom: 1px solid var(--warn-line);
  font-size: 13px; line-height: 1.4;
}
.preview-banner-inner {
  display: flex; align-items: center; gap: 10px;
  max-width: 100%; padding: 9px 18px;
}
.preview-banner svg { flex-shrink: 0; }
.preview-banner-exit {
  background: rgba(255,255,255,.15); color: #fff;
  border: 1px solid rgba(255,255,255,.35); border-radius: 4px;
  font-size: 12px; font-weight: 500; padding: 4px 10px; cursor: pointer;
}
.preview-banner-exit:hover { background: rgba(255,255,255,.25); }
.app-shell.has-preview-banner { height: calc(100vh - 36px); }

/* Calendar event-type color tokens (Section 1). Reuse existing palette. */
.cal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cal-dot-meeting    { background: #C04D2B; } /* orange */
.cal-dot-compliance { background: var(--bad); }
.cal-dot-statutory  { background: var(--accent); }
.cal-dot-foia       { background: var(--warn); }
.cal-dot-custom     { background: var(--ink-4); }

/* Generic three-column layout used by inbox detail + calendar detail drawer. */
.tri-col {
  display: grid; grid-template-columns: 1fr 320px; gap: 20px;
}
@media (max-width: 1080px) { .tri-col { grid-template-columns: 1fr; } }

/* Live Meeting Mode overlay (Section 6). */
.live-mode-overlay {
  position: fixed; inset: 0; background: #0F1322; color: #E8EDF4;
  z-index: 90; overflow-y: auto;
}
.live-mode-shell { max-width: 1100px; margin: 0 auto; padding: 28px 32px; }
.live-mode-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #2A2F47; padding-bottom: 16px; margin-bottom: 22px;
}
.live-mode-title { font-family: 'Roboto Serif', Georgia, serif; font-size: 22px; font-weight: 600; }
.live-mode-current-item {
  background: #1A2040; border-left: 4px solid #F39C12;
  padding: 18px 22px; border-radius: 6px; margin-bottom: 18px;
}
.live-mode-agenda-row {
  display: flex; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid #2A2F47; align-items: center;
}
.live-mode-agenda-row.done { opacity: .55; }
.live-mode-agenda-status {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid #4A5275;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.live-mode-agenda-status.done { background: #1F8A4C; border-color: #1F8A4C; }
.live-mode-roll {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.live-mode-roll-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #1A2040; border: 1px solid #2A2F47; border-radius: 16px;
  padding: 5px 12px; font-size: 12.5px; cursor: pointer;
}
.live-mode-roll-chip.present { background: #1F4F32; border-color: #2B7A4A; color: #C0E8C8; }
.live-mode-roll-chip.absent  { background: #4A1F1F; border-color: #7A2B2B; color: #E8C0C0; }
.live-mode-input {
  background: #1A2040; border: 1px solid #2A2F47; color: #E8EDF4;
  border-radius: 4px; padding: 8px 10px; font-size: 13px; width: 100%;
}
.live-mode-btn {
  background: #2A5BAA; color: #fff; border: 0; border-radius: 4px;
  padding: 9px 16px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.live-mode-btn:hover { background: #345FB8; }
.live-mode-btn-secondary { background: transparent; border: 1px solid #4A5275; color: #C0CCE2; }

/* Calendar grid + Deadline Gauntlet */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden;
}
.cal-cell {
  background: var(--surface); min-height: 96px; padding: 6px 8px;
  font-size: 12px; position: relative;
}
.cal-cell.other-month { background: var(--surface-2); color: var(--ink-5); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell-day { font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.cal-event {
  display: block; padding: 2px 6px; border-radius: 3px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 11px; line-height: 1.35; margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-decoration: none;
}
.cal-event:hover { filter: brightness(.95); }
.cal-event-meeting    { background: #FBE6DC; color: #7A2D11; }
.cal-event-compliance { background: var(--bad-soft); color: var(--bad); }
.cal-event-statutory  { background: var(--accent-soft); color: var(--accent); }
.cal-event-foia       { background: var(--warn-soft); color: var(--warn); }
.cal-event-custom     { background: var(--surface-2); color: var(--ink-2); }

.gauntlet {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px;
}
.gauntlet-card {
  flex: 0 0 220px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 12px 14px; cursor: pointer;
}
.gauntlet-card:hover { border-color: var(--ink-4); }
.gauntlet-card-countdown { font-size: 18px; font-weight: 600; color: var(--ink); }
.gauntlet-card-countdown.urgent { color: var(--bad); }
.gauntlet-card-title { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.4; }
.gauntlet-card-meta { font-size: 10.5px; color: var(--ink-5); margin-top: 6px; text-transform: uppercase; letter-spacing: .04em; }

/* Litigation hold lock indicator */
.hold-banner {
  background: #4A1F1F; color: #fff;
  padding: 8px 14px; border-radius: 4px; font-size: 13px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.hold-icon { width: 14px; height: 14px; }

.tab-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 16px;
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--line);
  text-decoration: none; cursor: pointer;
}
.tab-pill:hover { color: var(--ink); background: var(--surface); }
.tab-pill.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.tab-pill.active .count-chip { background: rgba(255,255,255,.25); color: #fff; }

/* Workload + Next 14 Days panels (Sections 5, 1) */
.workload-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px; margin-top: 10px;
}
.workload-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px; background: var(--surface-2);
}
.workload-row:hover { background: var(--surface); border: 1px solid var(--line); padding: 7px 9px; }
.workload-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; flex-shrink: 0;
}
.workload-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.workload-meta { font-size: 11.5px; color: var(--ink-4); }
.workload-total { font-size: 17px; font-weight: 600; color: var(--ink); margin-left: auto; }

.next14-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 4px; font-size: 13px;
}
.next14-row:hover { background: var(--surface-2); }
.next14-when  { color: var(--ink-3); width: 80px; flex-shrink: 0; font-size: 12px; }
.next14-title { flex: 1; color: var(--ink); }
.next14-meta  { color: var(--ink-4); font-size: 11.5px; }

.deadline-pressure-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--warn-soft); color: var(--warn);
  border: 1px solid var(--warn-line); border-radius: 6px;
  padding: 9px 14px; font-size: 13px; margin-bottom: 16px;
}
.deadline-pressure-bar.urgent {
  background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line);
}
.deadline-pressure-bar:hover { filter: brightness(.97); }
.deadline-pressure-chev { margin-left: auto; font-size: 12px; font-weight: 500; }

/* ─── Change 1: Messages sender-type filter pills ─────────────────────────── */

.sender-filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
}

.sender-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 12.5px; font-weight: 500; text-decoration: none;
  border: 1.5px solid var(--line); color: var(--ink-3);
  background: var(--surface); transition: all .15s;
  cursor: pointer; font-family: inherit;
}
.sender-pill:hover { border-color: var(--accent); color: var(--accent); }
.sender-pill.active {
  background: #1E3A5F; border-color: #1E3A5F;
  color: #F7F6F2; font-weight: 600;
}

/* Sender-type badge in message rows */
.stype-badge {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .03em; white-space: nowrap;
}
.stype-constituent { background: var(--good-soft);   color: #1a6b1e; }
.stype-gov         { background: rgba(30,58,95,.10);  color: #1E3A5F; }
.stype-debatable   { background: var(--teal-soft);    color: #1a5a57; }
.stype-ai          { background: rgba(139,92,246,.10); color: #6d28d9; }

/* ─── Change 2/3: Contacts tab type badges ────────────────────────────────── */

.contact-type-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.ctier-verified   { background: rgba(39,180,48,.12);  color: #1a6b1e; }
.ctier-address    { background: rgba(66,200,193,.12); color: #1a5a57; }
.ctier-unverified { background: rgba(25,30,57,.07);   color: #5A5670; }
.ctier-gov        { background: rgba(30,58,95,.10);   color: #1E3A5F; }

/* Contacts list rows */
.clist-row2 {
  display: grid;
  grid-template-columns: 2fr 130px 1fr 110px 120px;
  align-items: center; gap: 0;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer; text-decoration: none; color: inherit;
  transition: background .12s;
}
.clist-row2:hover { background: var(--surface-2); }
.clist-row2:last-child { border-bottom: none; }

.clist-cell-name2 {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 8px;
}
.clist-cell {
  display: flex; align-items: center; padding: 0 8px; min-width: 0;
}

/* ─── Change 4: Verified constituent wizard ───────────────────────────────── */

.verified-wizard-wrap { max-width: 640px; margin: 0 auto; }

.wizard-progress {
  display: flex; align-items: center; margin-bottom: 28px;
}
.wizard-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wizard-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-4);
  border: 1.5px solid var(--line);
}
.wizard-step.current .wizard-step-num {
  background: #1E3A5F; color: #F7F6F2; border-color: #1E3A5F;
}
.wizard-step.done .wizard-step-num {
  background: var(--good-soft); color: var(--good); border-color: var(--good);
}
.wizard-step-label {
  font-size: 11px; color: var(--ink-4); text-align: center; max-width: 100px;
}
.wizard-step.current .wizard-step-label { color: var(--ink); font-weight: 600; }
.wizard-step-connector {
  flex: 1; height: 1px; background: var(--line); margin-bottom: 18px;
}

.wizard-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 32px;
}
.wizard-card-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-4); margin-bottom: 6px;
}
.wizard-intro {
  font-size: 13px; color: var(--ink-3); line-height: 1.6;
  margin-bottom: 20px; border-bottom: 1px solid var(--line-2); padding-bottom: 16px;
}

.wizard-field { margin-bottom: 16px; }
.wizard-label {
  font-size: 11.5px; font-weight: 600; display: block; margin-bottom: 5px; color: var(--ink-2);
}
.req { color: var(--bad); }
.wizard-input {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface-2); color: var(--ink);
  font-family: inherit;
}
.wizard-input:focus { outline: 2px solid #1E3A5F; outline-offset: 1px; border-color: #1E3A5F; }

.wizard-checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.wizard-check-row {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-size: 13px; color: var(--ink-2); line-height: 1.5;
}
.wizard-check-row input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; }

.wizard-id-block {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 18px; margin-bottom: 20px;
}
.wizard-id-name  { font-size: 15px; font-weight: 700; color: var(--ink); }
.wizard-id-email { font-size: 13px; color: var(--ink-3); margin-top: 3px; }

.wizard-staff-row { margin-top: 16px; margin-bottom: 20px; }
.wizard-staff-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }

.wizard-actions {
  display: flex; justify-content: space-between; gap: 10px; padding-top: 12px;
  border-top: 1px solid var(--line-2);
}

.wizard-card-success { text-align: center; }
.wizard-success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--good-soft); color: var(--good); margin-bottom: 16px;
}
.wizard-success-title { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.wizard-success-detail {
  text-align: left; font-size: 13px; color: var(--ink-2); line-height: 1.6;
  background: var(--surface-2); border-radius: 8px; padding: 16px 20px; margin-bottom: 8px;
}
.wizard-success-detail ul { margin: 8px 0 0 18px; }
.wizard-success-detail li { margin-bottom: 6px; }

/* ─── Change 5: Meeting public comments ──────────────────────────────────── */

.comment-window-status {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px;
}
.comment-window-open { color: var(--warn); font-weight: 600; }
.comment-window-scheduled { color: var(--ink-4); }
.status-dot-orange {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn); flex-shrink: 0;
}

/* Inline agenda-item comments */
.agenda-comments-block {
  padding: 4px 20px 12px 48px;
  border-top: 1px solid var(--line-2);
}
.agenda-comments-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--ink-4); padding: 4px 0;
  font-weight: 500; text-decoration: underline; text-underline-offset: 2px;
}
.agenda-comment-card {
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 12px 14px; margin-top: 8px;
}

/* Public Comments tab */
.pub-comments-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 20px; border-bottom: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--ink-2);
}
.pub-comment-card {
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.pub-comment-card:last-child { border-bottom: none; }
.pub-sort-btn { font-size: 11px !important; }
.pub-sort-btn.active { background: var(--surface-3) !important; font-weight: 600 !important; }

/* ─── Change 6: Budget tool ──────────────────────────────────────────────── */

/* Sub-nav */
.budget-subnav {
  display: flex; gap: 4px; border-bottom: 2px solid var(--line-2);
  margin-bottom: 24px; padding-bottom: 0;
}
.budget-subnav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  color: var(--ink-3); text-decoration: none; border-radius: 6px 6px 0 0;
  border: 1.5px solid transparent; border-bottom: none;
  margin-bottom: -2px; transition: color .15s;
}
.budget-subnav-item:hover { color: var(--ink); }
.budget-subnav-item.active {
  background: var(--surface); border-color: var(--line-2); border-bottom-color: var(--surface);
  color: var(--ink); font-weight: 600;
}

/* Disclaimer */
.grant-disclaimer {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--warn-soft); border: 1px solid var(--warn-line);
  border-radius: 6px; padding: 10px 14px; font-size: 12px; color: var(--warn);
  margin-bottom: 16px; line-height: 1.5;
}

/* Filter row */
.grant-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Grant card grid */
.grant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.grant-card {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--navy); border-radius: var(--radius-lg);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
}
.grant-card-header { display: flex; align-items: flex-start; gap: 10px; }
.grant-card-eyebrow { display: flex; gap: 6px; margin-bottom: 4px; }
.grant-card-name { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.grant-card-agency { font-size: 12px; color: var(--ink-4); }
.grant-card-desc { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.grant-eligibility {
  font-size: 11.5px; color: var(--ink-4); line-height: 1.55;
  border-top: 1px solid var(--line-2); padding-top: 8px;
}
.grant-card-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.grant-meta-item { display: flex; flex-direction: column; gap: 2px; }
.grant-meta-label { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-5); }
.grant-meta-val { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.grant-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-2); }

/* Grant source/status/category badges */
.grant-source-badge {
  display: inline-block; padding: 1px 7px; border-radius: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.grant-source-federal { background: rgba(30,58,95,.10); color: #1E3A5F; }
.grant-source-state   { background: var(--teal-soft);   color: #1a5a57; }
.grant-cat-badge {
  display: inline-block; padding: 1px 7px; border-radius: 3px;
  font-size: 10px; background: var(--surface-2); color: var(--ink-3);
}
.grant-status-badge {
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0;
}
.grant-status-open     { background: var(--good-soft);  color: var(--good); }
.grant-status-upcoming { background: var(--warn-soft);  color: var(--warn); }
.grant-status-closed   { background: var(--surface-2);  color: var(--ink-4); }

/* Grant → KB topic links */
.grant-topic-links {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 6px;
}
.grant-topic-links-label {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-4);
}
.grant-topic-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.grant-topic-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.2);
  border-radius: 4px; padding: 1px 6px; font-size: 11.5px;
}
.grant-topic-tag a { color: #2563EB; text-decoration: none; }
.grant-topic-tag a:hover { text-decoration: underline; }
.grant-topic-tag-remove {
  background: none; border: none; cursor: pointer; color: var(--ink-4);
  font-size: 13px; line-height: 1; padding: 0 1px; display: flex; align-items: center;
}
.grant-topic-tag-remove:hover { color: var(--danger); }
.grant-topic-add-form {
  display: flex; align-items: center; gap: 6px;
}
.grant-topic-input {
  height: 26px; padding: 0 8px; border-radius: 4px;
  border: 1px solid var(--line); font-size: 12px; color: var(--ink);
  background: var(--surface); width: 180px;
}
.grant-topic-input:focus { outline: none; border-color: #2563EB; }
.btn-outline {
  background: none; border: 1px solid var(--line); color: var(--ink-3);
  cursor: pointer; font-weight: 600;
}
.btn-outline:hover { border-color: #2563EB; color: #2563EB; }

/* Tracker kanban */
.tracker-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 16px; margin-bottom: 20px;
  font-size: 12.5px; color: var(--ink-2);
}
.tracker-sum-dot { color: var(--ink-5); }

.tracker-kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px; min-width: 0; overflow-x: auto;
}
@media (max-width: 1100px) { .tracker-kanban { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .tracker-kanban { grid-template-columns: 1fr; } }

.tracker-col {
  background: var(--surface-2); border-radius: 8px;
  padding: 10px; min-height: 160px;
  display: flex; flex-direction: column; gap: 8px;
}
.tracker-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 8px; margin-bottom: 4px;
}
.tracker-col-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tracker-empty { font-size: 12px; color: var(--ink-5); text-align: center; padding: 20px 0; }

.tracker-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.tracker-card-name   { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.tracker-card-agency { font-size: 11px; color: var(--ink-4); }
.tracker-card-meta   { display: flex; flex-direction: column; gap: 2px; }
.tracker-card-actions { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.tracker-card-notes {
  font-size: 11.5px; color: var(--ink-3); background: var(--surface-2);
  border-left: 3px solid var(--line); padding: 6px 8px; border-radius: 4px;
  white-space: pre-wrap; word-break: break-word;
}
.tracker-edit-panel { margin-top: 8px; }
.tracker-edit-toggle {
  font-size: 11px; color: var(--ink-4); cursor: pointer;
  list-style: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 0; user-select: none;
}
.tracker-edit-toggle::-webkit-details-marker { display: none; }
.tracker-edit-toggle::before { content: '▸'; font-size: 9px; }
details[open] > .tracker-edit-toggle::before { content: '▾'; }
.tracker-edit-form { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.tracker-edit-row { display: flex; flex-direction: column; gap: 2px; }
.tracker-edit-row label { font-size: 10.5px; color: var(--ink-4); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tracker-edit-input {
  font-size: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; padding: 4px 8px; color: var(--ink); width: 100%; box-sizing: border-box;
}
.tracker-edit-textarea {
  font-size: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; padding: 4px 8px; color: var(--ink); width: 100%; box-sizing: border-box;
  resize: vertical; min-height: 56px; font-family: inherit;
}
.tracker-edit-input:focus, .tracker-edit-textarea:focus { outline: none; border-color: var(--brand); }
.btn-danger {
  background: transparent; border: 1px solid #e53e3e; color: #e53e3e;
  font-size: 11px; padding: 3px 8px; border-radius: 4px; cursor: pointer;
}
.btn-danger:hover { background: #e53e3e; color: #fff; }

/* ── AI Assistant Panel ──────────────────────────────────────────────── */
.gov-ai-panel {
  position: fixed;
  top: var(--topbar-h, 60px);
  right: 0;
  width: min(480px, 100vw);
  height: calc(100vh - var(--topbar-h, 60px));
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -4px 0 24px rgba(0,0,0,.10);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  z-index: 900;
}
.gov-ai-panel--open { transform: translateX(0); }

.gov-ai-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.gov-ai-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 899;
}
.gov-ai-backdrop--show { display: block; }

.gov-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
}

.gov-ai-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-4);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.gov-ai-close:hover { background: var(--bg-2); color: var(--ink); }

.gov-ai-model-badge {
  font-size: .68rem;
  background: var(--teal-soft);
  color: #1a8c87;
  border: 1px solid var(--teal-line);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
}

.gov-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gov-ai-empty {
  margin: auto;
  text-align: center;
  color: var(--ink-4);
  font-size: .85rem;
  max-width: 300px;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gov-ai-msg {
  max-width: 92%;
  font-size: .85rem;
  line-height: 1.55;
}
.gov-ai-msg--user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  border-radius: 12px 12px 2px 12px;
  padding: 10px 14px;
}
.gov-ai-msg--assistant {
  align-self: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 2px 12px 12px 12px;
  padding: 12px 16px;
  max-width: 96%;
}
.gov-ai-msg--assistant p { margin: 0 0 .5em; }
.gov-ai-msg--assistant p:last-child { margin-bottom: 0; }
.gov-ai-msg--assistant ul { margin: .4em 0; padding-left: 1.3em; }
.gov-ai-msg--assistant li { margin-bottom: .2em; }

.gov-ai-thinking span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-4);
  margin: 0 2px;
  animation: gov-ai-bounce .9s ease-in-out infinite;
}
.gov-ai-thinking span:nth-child(2) { animation-delay: .15s; }
.gov-ai-thinking span:nth-child(3) { animation-delay: .30s; }
@keyframes gov-ai-bounce {
  0%,60%,100% { transform: translateY(0); }
  30%          { transform: translateY(-5px); }
}

.gov-ai-error {
  color: var(--bad);
  font-size: .82rem;
}

.gov-ai-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
}
.gov-ai-textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: .85rem;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.4;
}
.gov-ai-textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }
.gov-ai-send {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
}
.gov-ai-send:disabled { opacity: .45; cursor: default; }

.gov-ai-footer {
  padding: 6px 14px 10px;
  font-size: .72rem;
  text-align: center;
  flex-shrink: 0;
  background: var(--surface-2);
}

/* AI panel: action buttons shown after each response */
.gov-ai-response-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 4px 14px 8px;
}
.gov-ai-action-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; font-size: .75rem; font-weight: 500; font-family: inherit;
  background: var(--surface-2); color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 5px; cursor: pointer;
  transition: all .12s;
}
.gov-ai-action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.gov-ai-action-btn--primary { background: var(--accent-soft); color: var(--accent); border-color: #CCDAEA; }
.gov-ai-action-btn:disabled { opacity: .5; cursor: default; }

/* AI panel: inline KB save form */
.gov-ai-kb-form {
  margin: 0 14px 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .82rem;
}
.gov-ai-kb-title-input {
  flex: 1; min-width: 160px;
  padding: 5px 8px; font-size: .8rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--surface); color: var(--ink);
}
.gov-ai-kb-select {
  padding: 5px 8px; font-size: .8rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--surface); color: var(--ink);
}

/* Trigger button shared style */
.btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-soft);
  color: #1a8c87;
  border: 1px solid var(--teal-line);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-ai:hover { background: rgba(66,200,193,.22); }

/* ─── Constituent Voice card (casework main column) ───────────────────────── */

.cv-card {
  padding: 0;
  overflow: hidden;
}

.cv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line-2);
}

.cv-header-left { flex: 1; min-width: 0; }

.cv-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.cv-eyebrow svg { color: var(--brand); flex-shrink: 0; }

.cv-summary {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.cv-header-right {
  text-align: center;
  flex-shrink: 0;
}
.cv-count {
  display: block;
  font-family: 'Roboto Serif', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.cv-count-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-4);
  margin-top: 2px;
}

.cv-tier-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--ink-3);
}
.cv-tier { display: flex; align-items: center; gap: 5px; }
.cv-tier-sym { font-size: 13px; }
.cv-tier-sym.good { color: var(--good); }
.cv-tier-sym.warn { color: var(--warn); }
.cv-tier-sym.mute { color: var(--ink-4); }
.cv-tier.in-district { color: var(--good); font-weight: 600; }

.cv-sentiment-bar {
  display: flex;
  height: 6px;
  overflow: hidden;
}
.cv-seg { height: 100%; transition: width .3s; }
.cv-seg-neg { background: var(--bad); }
.cv-seg-pos { background: var(--good); }
.cv-seg-mix { background: var(--warn); }
.cv-seg-neu { background: var(--ink-5); }

.cv-legend {
  display: flex;
  gap: 14px;
  padding: 8px 18px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line-2);
}
.cv-leg-item { color: var(--ink-4); }
.cv-leg-item.neg { color: var(--bad); }
.cv-leg-item.pos { color: var(--good); }
.cv-leg-item.mix { color: var(--warn); }
.cv-leg-item.in-d { color: var(--ink-4); }

.cv-stmt-list {
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
}
.cv-stmt-list::-webkit-scrollbar { width: 4px; }
.cv-stmt-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.cv-stmt-item {
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-2);
  border-left: 3px solid transparent;
}
.cv-stmt-item:last-child { border-bottom: none; }
.cv-stmt-item.sentiment-negative { border-left-color: var(--bad); }
.cv-stmt-item.sentiment-positive { border-left-color: var(--good); }
.cv-stmt-item.sentiment-mixed    { border-left-color: var(--warn); }

.cv-stmt-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.cv-stmt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cv-stmt-zip  { font-size: 11px; color: var(--ink-5); }
.cv-stmt-date { font-size: 11px; color: var(--ink-5); margin-left: auto; }

/* -- Sprint 3: Statute reference popup -------------------------------------- */
.statute-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); font-family: 'Roboto Mono', monospace; font-size: inherit;
  text-decoration: underline dotted; text-underline-offset: 2px;
}
.statute-link:hover { color: var(--ink); }
.statute-modal-card { max-width: 600px; }
.statute-modal-body { padding: 18px 22px; }
.statute-explainer  { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin: 0; }

/* Mobile: full-screen sheet */
@media (max-width: 768px) {
  .statute-modal-card {
    max-width: 100%; width: 100%; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    position: fixed; bottom: 0; left: 0; right: 0; max-height: 85vh;
  }
  .modal-backdrop:has(.statute-modal-card) { align-items: flex-end; padding: 0; }
}

/* -- Sprint 3: Compliance pill (calendar same-day collapse) ----------------- */
.cal-compliance-pill {
  display: block; font-size: 10.5px; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; margin-bottom: 2px; cursor: pointer;
  background: var(--bad-soft); color: var(--bad); border: none; text-align: left;
  width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-compliance-pill:hover { filter: brightness(.93); }
.cal-pill-popover {
  position: absolute; z-index: 50; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.14);
  padding: 10px 0; min-width: 260px; max-width: 340px;
}
.cal-pill-popover-item {
  display: block; padding: 8px 14px; font-size: 12.5px; color: var(--ink-2);
  text-decoration: none; border-bottom: 1px solid var(--line-2);
}
.cal-pill-popover-item:last-child { border-bottom: none; }
.cal-pill-popover-item:hover { background: var(--surface-2); }
.cal-cell { position: relative; }

/* -- Sprint 3: Compliance row grouping ------------------------------------- */
.compliance-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--line-2); cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  user-select: none;
}
.compliance-group-header:hover { background: var(--bg-2); }
.compliance-group-toggle {
  font-size: 10px; color: var(--ink-4); transition: transform .15s;
  width: 16px; flex-shrink: 0;
}
.compliance-group-toggle.open { transform: rotate(90deg); }
.compliance-group-rows { display: none; }
.compliance-group-rows.expanded { display: table-row-group; }

/* -- Sprint 3: Casework constituent voice collapse ------------------------- */
.cv-view-all-btn {
  display: block; text-align: center; padding: 10px 18px;
  font-size: 12.5px; color: var(--accent); text-decoration: none;
  border-top: 1px solid var(--line-2); background: none; border-left: none;
  border-right: none; border-bottom: none; width: 100%; cursor: pointer;
}
.cv-view-all-btn:hover { background: var(--surface-2); }

/* -- Sprint 3: Decisions search/filter bar --------------------------------- */
.decisions-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 18px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.decisions-toolbar .form-input  { flex: 1; min-width: 180px; }
.decisions-toolbar .form-select { min-width: 130px; }
.decisions-empty-filtered {
  text-align: center; padding: 48px 24px;
  border: 1px dashed var(--line); border-radius: 8px;
  color: var(--ink-3); font-size: 14px;
}

/* -- Sprint 3: Gauntlet bucket labels -------------------------------------- */
.gauntlet-card-countdown { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.gauntlet-card-countdown.urgent { color: var(--bad); }
