:root {
  color-scheme: light;
  --ink: #19212c;
  --muted: #667284;
  --soft: #949ba7;
  --paper: #f5f6f4;
  --paper-2: #edf1ef;
  --paper-3: #e6ecea;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-raised: #f8faf8;
  --line: rgba(32, 40, 50, 0.12);
  --line-strong: rgba(32, 40, 50, 0.24);
  --blue: #3a6470;
  --green: #287863;
  --gold: #ad7a3a;
  --red: #c84c5d;
  --glass-sheen: rgba(255, 255, 255, 0.78);
  --glass-lowlight: rgba(34, 42, 52, 0.08);
  --control-bg: rgba(255, 255, 255, 0.9);
  --control-hover: #eef2ef;
  --control-active: #2f4d4f;
  --control-active-ink: #ffffff;
  --logo-bg: #2a4248;
  --logo-glow: rgba(42, 91, 91, 0.18);
  --panel-rail: rgba(104, 154, 134, 0.34);
  --shadow: 0 18px 44px rgba(34, 40, 45, 0.1);
  --shell: min(1440px, calc(100vw - 40px));
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f0ea;
  --muted: #aaa89f;
  --soft: #7f817c;
  --paper: #121211;
  --paper-2: #171817;
  --paper-3: #20211f;
  --surface: rgba(29, 31, 30, 0.96);
  --surface-strong: #232522;
  --surface-raised: #1b1d1b;
  --line: rgba(241, 236, 224, 0.12);
  --line-strong: rgba(241, 236, 224, 0.24);
  --blue: #9cb7b4;
  --green: #73c8ab;
  --gold: #d6a86a;
  --red: #ff7084;
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-lowlight: rgba(0, 0, 0, 0.22);
  --control-bg: rgba(35, 37, 35, 0.96);
  --control-hover: #2a2d2a;
  --control-active: #dbe8de;
  --control-active-ink: #151715;
  --logo-bg: #253735;
  --logo-glow: rgba(115, 200, 171, 0.13);
  --panel-rail: rgba(115, 200, 171, 0.25);
  --shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
}

body[data-council="N"] {
  --paper: #f5f7f6;
  --paper-2: #edf2f1;
  --paper-3: #e5eceb;
  --blue: #315f78;
  --green: #2f745f;
  --gold: #a36f37;
  --red: #bf4d63;
  --control-hover: #eaf0ee;
  --control-active: #294f60;
  --control-active-ink: #ffffff;
  --logo-bg: #263f4d;
  --logo-glow: rgba(49, 95, 120, 0.17);
  --panel-rail: rgba(47, 116, 95, 0.32);
}

body[data-council="S"] {
  --paper: #f6f5f2;
  --paper-2: #f0ede8;
  --paper-3: #e8e3dc;
  --blue: #5d6178;
  --green: #5f755d;
  --gold: #a1743d;
  --red: #a74b5f;
  --control-hover: #f0ece6;
  --control-active: #5a404d;
  --control-active-ink: #ffffff;
  --logo-bg: #4a3c49;
  --logo-glow: rgba(126, 88, 73, 0.16);
  --panel-rail: rgba(161, 116, 61, 0.3);
}

body[data-theme="dark"][data-council="N"] {
  --ink: #f1f3ee;
  --muted: #aab2ac;
  --soft: #7f8984;
  --paper: #111413;
  --paper-2: #171b1a;
  --paper-3: #202625;
  --surface: rgba(29, 34, 33, 0.96);
  --surface-strong: #242a29;
  --surface-raised: #1c211f;
  --blue: #91b4c2;
  --green: #79c2a5;
  --gold: #d0a160;
  --red: #f07a8b;
  --control-bg: rgba(36, 41, 40, 0.96);
  --control-hover: #2b3331;
  --control-active: #c9dde2;
  --control-active-ink: #121819;
  --logo-bg: #23393f;
  --logo-glow: rgba(121, 194, 165, 0.14);
  --panel-rail: rgba(121, 194, 165, 0.25);
}

body[data-theme="dark"][data-council="S"] {
  --ink: #f3eee7;
  --muted: #b0a99f;
  --soft: #88827b;
  --paper: #131211;
  --paper-2: #1a1816;
  --paper-3: #24211d;
  --surface: rgba(31, 29, 27, 0.96);
  --surface-strong: #28241f;
  --surface-raised: #1e1b18;
  --blue: #afa9c8;
  --green: #b6be8a;
  --gold: #d2a46a;
  --red: #f18495;
  --control-bg: rgba(44, 40, 36, 0.96);
  --control-hover: #342f29;
  --control-active: #e0cfb3;
  --control-active-ink: #201916;
  --logo-bg: #3b3039;
  --logo-glow: rgba(210, 164, 106, 0.14);
  --panel-rail: rgba(210, 164, 106, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

body::before,
body::after {
  display: none;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: var(--shell);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 64px;
}

main {
  min-height: calc(100vh - 116px);
  padding-bottom: clamp(40px, 8vh, 96px);
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--glass-sheen)), var(--surface)),
    var(--surface);
  box-shadow:
    0 12px 30px color-mix(in srgb, #000000 12%, transparent),
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
  backdrop-filter: blur(16px) saturate(1.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--glass-sheen) 70%, var(--line));
  border-radius: 9px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-sheen) 62%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--logo-bg) 82%, #ffffff), var(--logo-bg));
  box-shadow:
    0 8px 18px var(--logo-glow),
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

.eye-logo {
  display: block;
  width: 34px;
  height: 28px;
  overflow: visible;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.18));
}

.eye-orbit,
.eye-iris,
.eye-pupil,
.eye-highlight,
.eye-sheen,
.eye-lower-line,
.eye-lash {
  transform-box: fill-box;
  transform-origin: center;
}

.eye-orbit {
  fill: url(#logoEyeGlass);
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2.4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  animation: eye-blink-lid 4.8s ease-in-out infinite;
}

.eye-iris {
  fill: url(#logoIrisGradient);
  stroke: rgba(255, 255, 255, 0.74);
  stroke-width: 1.6;
  animation: eye-blink-core 4.8s ease-in-out infinite;
}

.eye-pupil {
  fill: #14252b;
  animation: eye-blink-core 4.8s ease-in-out infinite;
}

.eye-highlight {
  fill: rgba(255, 255, 255, 0.9);
  animation: eye-blink-highlight 4.8s ease-in-out infinite;
}

.eye-sheen,
.eye-lower-line,
.eye-lash {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.eye-sheen {
  stroke-width: 2.2;
  opacity: 0.72;
  animation: eye-blink-sheen 4.8s ease-in-out infinite;
}

.eye-lower-line {
  stroke-width: 1.8;
  opacity: 0.42;
  animation: eye-blink-lower 4.8s ease-in-out infinite;
}

.eye-lash {
  stroke-width: 2.3;
  opacity: 0.82;
  transform-origin: center bottom;
  animation: eye-blink-lash 4.8s ease-in-out infinite;
}

.eye-lash.center {
  opacity: 0.95;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.topnav {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--control-bg) 48%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-sheen);
}

.topnav a,
.source-pill,
.theme-toggle,
.button,
.council-switch button,
.segmented button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.topnav a:hover,
.topnav a.active {
  color: var(--ink);
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-hover) 92%, var(--glass-sheen)), var(--control-hover));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--glass-sheen) 50%, transparent),
    0 5px 14px color-mix(in srgb, #000000 7%, transparent);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.council-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-bg) 88%, var(--glass-sheen)), var(--control-bg));
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.council-switch button {
  min-width: 96px;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 860;
  white-space: nowrap;
  box-shadow: none;
}

.council-switch button.active {
  color: var(--control-active-ink);
  border-color: color-mix(in srgb, var(--control-active) 62%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-active) 76%, #ffffff), var(--control-active));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 28%, transparent),
    0 8px 18px color-mix(in srgb, var(--control-active) 18%, transparent);
}

.source-pill {
  display: inline-flex;
  align-items: center;
  max-width: 250px;
  padding: 0 13px;
  overflow: hidden;
  color: var(--green);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--green) 7%, var(--control-bg)), var(--control-bg));
  font-size: 12px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 3px 0 0 color-mix(in srgb, var(--green) 56%, transparent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: var(--ink);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-bg) 92%, var(--glass-sheen)), var(--control-bg));
  cursor: pointer;
  font-size: 12px;
  font-weight: 820;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.theme-glyph {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 6px 0 0 currentColor;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.intro-grid,
.tool-layout,
.dashboard-grid,
.explain-grid {
  display: grid;
  gap: 22px;
}

.intro-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  align-items: stretch;
  padding: 36px 0 20px;
}

.intro-copy,
.page-heading {
  padding: 12px 0;
}

.page-heading {
  position: relative;
  max-width: 920px;
  margin: 28px 0 18px;
  padding-left: 22px;
}

.page-heading::before {
  position: absolute;
  top: 18px;
  bottom: 15px;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--panel-rail), transparent);
  content: "";
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 16px;
  font-size: clamp(36px, 4.1vw, 56px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1.08;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.16;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.56;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.button.primary {
  color: var(--control-active-ink);
  border-color: color-mix(in srgb, var(--control-active) 68%, #ffffff);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-active) 78%, #ffffff), var(--control-active));
  box-shadow:
    0 16px 34px color-mix(in srgb, var(--control-active) 25%, transparent),
    inset 0 1px 0 color-mix(in srgb, #ffffff 32%, transparent),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.button.secondary {
  color: var(--ink);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-bg) 88%, var(--glass-sheen)), var(--control-bg));
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.system-import-note {
  display: flex;
  max-width: 560px;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 26%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--gold) 8%, var(--surface-raised));
}

.system-import-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.inline-error {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 820;
}

.live-panel,
.surface,
.action-tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 76%, var(--surface)), var(--surface)),
    var(--surface);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
  backdrop-filter: blur(14px) saturate(1.02);
}

.live-panel,
.surface {
  padding: 17px;
}

.surface {
  position: relative;
  overflow: hidden;
}

.surface::before,
.live-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  opacity: 0.58;
  background: linear-gradient(90deg, var(--panel-rail), transparent 34%);
  content: "";
}

.live-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 16px;
  overflow: hidden;
}

.panel-header,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-head {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.compact-head {
  padding-bottom: 12px;
}

.panel-header span,
.metric span,
.searchbox span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.panel-header strong {
  color: var(--green);
  font-size: 12px;
  text-transform: uppercase;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metrics-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.metrics-grid.three {
  margin: 16px 0;
}

.metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 92%, var(--glass-sheen)), var(--surface-raised));
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  line-height: 1;
}

.metric.muted strong {
  color: var(--soft);
}

.panel-note,
.empty-state,
.surface p,
.detail-block p {
  color: var(--muted);
  line-height: 1.5;
}

.panel-note,
.empty-state {
  margin: 0;
  font-size: 13px;
}

.council-empty {
  display: grid;
  gap: 5px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  padding: 13px;
  background: color-mix(in srgb, var(--surface-raised) 62%, transparent);
}

.council-empty strong,
.council-empty span {
  display: block;
}

.council-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.council-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr);
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  border-radius: 9px;
  padding: 14px;
  background: color-mix(in srgb, var(--gold) 7%, var(--surface-raised));
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--gold) 56%, transparent),
    inset 0 1px 0 var(--glass-sheen);
}

.council-status.compact {
  margin-top: 2px;
}

.council-status.detail {
  grid-template-columns: 1fr;
}

.council-status strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.council-status p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.status-facts {
  display: grid;
  gap: 7px;
  align-content: start;
}

.status-facts span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.status-facts strong {
  margin: 0;
  color: var(--gold);
  font-size: 14px;
  line-height: 1;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 24px;
}

.action-tile {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 15px;
  overflow: hidden;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.action-tile::before {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--glass-sheen);
  content: "";
}

.action-tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.action-tile span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--blue);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 88%, var(--glass-sheen)), var(--surface-raised));
  font-size: 12px;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    0 8px 18px color-mix(in srgb, var(--blue) 10%, transparent);
}

.action-tile strong {
  font-size: 17px;
}

.action-tile p {
  margin: 0;
  font-size: 13px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.tool-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.62fr);
  align-items: stretch;
  gap: 20px;
}

.vote-tool-layout {
  grid-template-columns: minmax(0, 1fr);
}

.list-surface,
.detail-panel {
  min-width: 0;
}

.list-surface {
  display: flex;
  flex-direction: column;
}

.list-surface > .table-shell,
.list-surface > .party-grid,
.list-surface > .stack-list {
  flex: 1;
}

.list-surface > .party-grid,
.list-surface > .stack-list {
  align-content: start;
}

.searchbox {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
}

.searchbox input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  color: var(--ink);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-bg) 92%, var(--glass-sheen)), var(--control-bg));
  outline: none;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.searchbox input:focus {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent);
}

.vote-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 14px 0 0;
}

.filterbox {
  display: grid;
  gap: 6px;
  min-width: min(240px, 100%);
}

.filterbox.compact {
  min-width: 120px;
}

.filterbox span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.filterbox select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 34px 0 11px;
  color: var(--ink);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-bg) 92%, var(--glass-sheen)), var(--control-bg));
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.filterbox select:focus {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent);
}

.segmented {
  align-self: end;
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-bg) 88%, var(--glass-sheen)), var(--control-bg));
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.segmented button {
  min-width: 54px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  box-shadow: none;
}

.segmented button.active {
  color: var(--control-active-ink);
  border-color: color-mix(in srgb, var(--control-active) 62%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-active) 76%, #ffffff), var(--control-active));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 28%, transparent),
    0 8px 18px color-mix(in srgb, var(--control-active) 18%, transparent);
}

.count-pill,
.status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--green);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--green) 10%, var(--control-bg)), var(--control-bg));
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 var(--glass-sheen);
}

.vote-head-status {
  display: flex;
  max-width: min(560px, 100%);
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.import-status {
  min-height: 30px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--control-bg) 82%, transparent);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.2;
  text-align: right;
}

.status.warn {
  color: var(--gold);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--gold) 12%, var(--control-bg)), var(--control-bg));
}

.status.ok {
  color: var(--green);
}

.status.muted {
  color: var(--muted);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--muted) 10%, var(--control-bg)), var(--control-bg));
}

.status.danger {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, var(--surface-strong));
}

.status.busy {
  gap: 7px;
}

.status.busy::before {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  content: "";
  animation: loading-spin 760ms linear infinite;
}

.loading-state {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 13px;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 10px;
  padding: 13px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 80%, var(--glass-sheen)), var(--surface-raised)),
    var(--surface-raised);
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--gold) 48%, transparent),
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.loading-state.compact {
  min-height: 52px;
  padding: 10px 11px;
}

.loading-state.table {
  min-height: 58px;
}

.loading-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--line));
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 47%),
    color-mix(in srgb, var(--surface-strong) 84%, transparent);
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    0 10px 22px color-mix(in srgb, var(--blue) 12%, transparent);
  overflow: hidden;
}

.loading-mark::before {
  position: absolute;
  inset: -42%;
  background:
    conic-gradient(
      from 0deg,
      transparent 0deg 215deg,
      color-mix(in srgb, var(--gold) 58%, transparent) 250deg,
      transparent 305deg 360deg
    );
  content: "";
  animation: loading-sweep 1.35s linear infinite;
}

.loading-mark::after {
  position: absolute;
  inset: 5px;
  border: 1px solid color-mix(in srgb, var(--blue) 26%, transparent);
  border-radius: 8px;
  content: "";
}

.loading-mark-core,
.loading-mark-orbit {
  position: relative;
  z-index: 1;
}

.loading-mark-core {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 14%, transparent);
  animation: loading-core 1.35s ease-in-out infinite;
}

.loading-mark-orbit {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: 999px;
  animation: loading-ring 1.65s ease-in-out infinite;
}

.loading-mark-orbit.one {
  inset: 10px;
}

.loading-mark-orbit.two {
  inset: 4px;
  border-color: color-mix(in srgb, var(--blue) 24%, transparent);
  animation-delay: 220ms;
}

.loading-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.loading-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.loading-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.42;
}

.text-link {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.table-shell {
  max-height: 640px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 74%, var(--glass-sheen)), var(--surface-raised));
  overflow: auto;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.vote-list-surface {
  gap: 0;
}

.vote-list-surface .vote-table-shell {
  flex: 1;
  min-height: 420px;
  max-height: none;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 86%, var(--glass-sheen)), var(--surface-strong));
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-size: 14px;
}

tbody tr {
  background: linear-gradient(90deg, color-mix(in srgb, var(--party-color, transparent) 5%, transparent), transparent 34%);
}

tbody tr:hover,
tbody tr.selected {
  background: linear-gradient(90deg, color-mix(in srgb, var(--party-color, transparent) 13%, transparent), color-mix(in srgb, var(--surface-strong) 68%, transparent));
}

tbody tr.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--party-color, var(--blue));
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 30px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.sort-button i {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--soft);
  font-style: normal;
  font-weight: 950;
}

.sort-button.active {
  color: var(--ink);
}

.sort-button.active i,
.sort-button:hover i {
  color: var(--blue);
  border-color: var(--line);
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-strong));
}

.vote-table {
  min-width: 980px;
}

.vote-table th:nth-child(1) {
  min-width: 360px;
}

.vote-table th:nth-child(2) {
  width: 150px;
}

.vote-table th:nth-child(3) {
  width: 190px;
}

.vote-table th:nth-child(4) {
  width: 190px;
}

.vote-table th:nth-child(5) {
  width: 150px;
}

.vote-table-row:hover,
.vote-table-row.selected {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green) 9%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface-strong) 72%, transparent);
}

.vote-table-row.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--green);
}

.vote-title-cell,
.vote-date-cell,
.vote-count-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.vote-title-cell {
  cursor: pointer;
}

.vote-title-cell.disabled {
  cursor: default;
}

.vote-title-cell strong {
  line-height: 1.2;
}

.vote-title-cell small,
.vote-date-cell small,
.vote-count-cell small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.vote-count-cell strong {
  font-size: 16px;
  line-height: 1;
}

.vote-count-cell.muted strong {
  color: var(--soft);
}

.table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding-top: 13px;
  color: var(--muted);
  font-size: 13px;
}

.table-pagination strong {
  color: var(--ink);
  font-weight: 900;
}

.table-pagination span {
  margin-left: 8px;
}

.pagination-actions {
  display: inline-flex;
  gap: 8px;
}

.row-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.row-button strong,
.row-button small {
  display: block;
}

.row-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #ffffff;
  background: var(--party-color, var(--blue));
  font-size: 12px;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 3px color-mix(in srgb, var(--party-color, var(--blue)) 14%, transparent);
}

.tag,
.party-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  max-width: 100%;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.tag {
  border: 1px solid color-mix(in srgb, currentColor 20%, var(--line));
  color: var(--ink);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--control-bg) 88%, var(--glass-sheen)), var(--control-bg));
  box-shadow: inset 0 1px 0 var(--glass-sheen);
}

.tag.n {
  color: var(--green);
}

.tag.s {
  color: var(--gold);
}

.party-chip {
  border: 1px solid color-mix(in srgb, var(--party-color, var(--blue)) 28%, transparent);
  color: color-mix(in srgb, var(--party-color, var(--blue)) 76%, var(--ink));
  background: color-mix(in srgb, var(--party-color, var(--blue)) 12%, var(--surface-strong));
}

.party-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.party-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: var(--party-color, var(--blue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--party-color, var(--blue)) 16%, transparent);
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bar-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--party-color, var(--blue));
}

.bars,
.stack-list,
.mini-list,
.coverage-list,
.change-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.vote-row,
.mini-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 92%, var(--glass-sheen)), var(--surface-raised));
  color: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.vote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 13px;
  cursor: pointer;
}

.vote-row:hover,
.vote-row.selected {
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 4%, var(--surface-raised)), var(--surface-raised));
}

.vote-row strong,
.vote-row small {
  display: block;
}

.vote-row > span {
  min-width: 0;
}

.vote-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.vote-row em {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 34px;
  max-width: 280px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 8px;
  padding: 0 11px;
  color: var(--green);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--green) 10%, var(--control-bg)), var(--control-bg));
  font-size: 12.5px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.02em;
  line-height: 1.08;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  box-shadow: inset 0 1px 0 var(--glass-sheen);
}

.vote-row em.warn {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 32%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--gold) 12%, var(--control-bg)), var(--control-bg));
}

.vote-row em.danger {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 32%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--red) 10%, var(--control-bg)), var(--control-bg));
}

.vote-row em.muted {
  color: var(--muted);
  border-color: var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--muted) 10%, var(--control-bg)), var(--control-bg));
}

.list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.list-footer.muted {
  justify-content: center;
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  font-size: 13px;
}

.mini-row strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.mini-row strong.ok {
  color: var(--green);
}

.mini-row strong.warn {
  color: var(--gold);
}

.person-card,
.party-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.portrait {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  border: 1px solid color-mix(in srgb, var(--party-color, var(--blue)) 32%, var(--line));
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--party-color, var(--blue)) 14%, var(--surface-raised)), var(--surface-raised));
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    0 12px 24px color-mix(in srgb, var(--party-color, var(--blue)) 14%, transparent);
}

.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  background: var(--party-color, var(--blue));
  font-size: 28px;
  font-weight: 900;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
  overflow: hidden;
}

.fact-list.one {
  grid-template-columns: 1fr;
}

.fact-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.fact-list div:last-child {
  border-bottom: 0;
}

.fact-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.fact-list dd {
  margin: 0;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.detail-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-page {
  padding-top: 26px;
}

.detail-hero {
  display: grid;
  gap: 9px;
  max-width: 1120px;
  margin-bottom: 20px;
}

.detail-hero h1 {
  margin-bottom: 0;
  font-size: clamp(33px, 3.8vw, 52px);
  line-height: 1.05;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.68fr);
  gap: 20px;
  align-items: start;
}

.detail-main,
.detail-sidebar {
  min-width: 0;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
}

.detail-person-card {
  align-items: flex-start;
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-person-card .portrait {
  width: 98px;
  height: 98px;
}

.vote-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-top: 15px;
}

.vote-events {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.vote-event-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 72%, var(--surface)), var(--surface));
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.vote-event-card.collapsible {
  padding: 0;
  overflow: hidden;
}

.vote-event-summary {
  display: block;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  transition: background 160ms ease;
}

.vote-event-summary::-webkit-details-marker {
  display: none;
}

.vote-event-summary .vote-event-head {
  align-items: center;
}

.vote-event-summary .vote-event-head::after {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 84%, var(--glass-sheen)), var(--surface-raised));
  content: "+";
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 var(--glass-sheen);
}

.vote-event-summary:hover {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.vote-event-card.collapsible[open] .vote-event-summary {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}

.vote-event-card.collapsible[open] .vote-event-summary .vote-event-head::after {
  content: "−";
}

.vote-event-body {
  padding: 0 16px 16px;
}

.vote-event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.vote-event-head h3 {
  margin: 2px 0 4px;
}

.vote-event-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.event-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.event-counts span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-raised) 66%, transparent);
  font-size: 12px;
  font-weight: 820;
}

.event-counts strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.vote-group {
  align-self: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0;
  background: color-mix(in srgb, var(--surface-raised) 66%, transparent);
  overflow: hidden;
}

.vote-group.yes {
  border-color: color-mix(in srgb, var(--green) 34%, var(--line));
}

.vote-group.no {
  border-color: color-mix(in srgb, var(--red) 34%, var(--line));
}

.vote-group.abstain {
  border-color: color-mix(in srgb, var(--gold) 34%, var(--line));
}

.vote-group-head,
.vote-person-row,
.person-vote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vote-group-head {
  min-height: 64px;
  padding: 13px;
  cursor: pointer;
  list-style: none;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.vote-group-head::-webkit-details-marker {
  display: none;
}

.vote-group-head::after {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 84%, var(--glass-sheen)), var(--surface-raised));
  content: "+";
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 var(--glass-sheen);
}

.vote-group[open] .vote-group-head {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}

.vote-group[open] .vote-group-head::after {
  content: "−";
}

.vote-group-head:hover {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.vote-group-head .count-pill {
  margin-left: auto;
}

.vote-group-body {
  padding: 0 13px 5px;
}

.vote-person-row,
.person-vote-row {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding: 11px 0;
  color: inherit;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.person-vote-row:hover {
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}

.vote-person-row span,
.person-vote-row span {
  min-width: 0;
}

.vote-row-copy {
  display: grid;
  gap: 2px;
}

.vote-row-status {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 3px;
  text-align: right;
}

.vote-person-row strong,
.person-vote-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.vote-person-row strong.yes,
.person-vote-row em.ok {
  color: var(--green);
}

.vote-person-row strong.no {
  color: var(--red);
}

.vote-person-row strong.abstain {
  color: var(--gold);
}

.person-vote-row em.warn {
  color: var(--gold);
}

.person-vote-row em.muted {
  color: var(--muted);
}

.person-vote-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.vote-row-status small {
  margin-top: 0;
  color: var(--blue);
  font-weight: 850;
}

.person-vote-list {
  display: grid;
  gap: 0;
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-raised) 66%, transparent);
  overflow: hidden;
}

.person-vote-list .person-vote-row {
  border-top: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 13px;
}

.person-vote-list .person-vote-row:last-child {
  border-bottom: 0;
}

.profile-note {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.official-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  margin-top: 16px;
}

.official-data-block {
  min-width: 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.official-data-block h3 {
  margin-bottom: 9px;
  font-size: 16px;
}

.fact-list a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.fact-list a:hover {
  text-decoration: underline;
}

.source-link-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.source-link-list a {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
  color: inherit;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 82%, var(--glass-sheen)), var(--surface-raised));
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.source-link-list a:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--blue) 7%, var(--surface-raised));
}

.source-link-list strong,
.source-link-list small {
  display: block;
}

.source-link-list strong {
  color: var(--blue);
  font-size: 13px;
}

.source-link-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.promise-mode {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.quiet-details {
  color: var(--muted);
}

.quiet-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.quiet-details summary::-webkit-details-marker {
  display: none;
}

.quiet-details summary::after {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  content: "+";
  font-weight: 900;
}

.quiet-details[open] summary::after {
  content: "−";
}

.quiet-details summary strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.alignment-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.alignment {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.alignment.ok {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 11%, var(--surface-strong));
}

.alignment.warn {
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 13%, var(--surface-strong));
}

.alignment.danger {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, var(--surface-strong));
}

.party-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.party-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border: 1px solid color-mix(in srgb, var(--party-color, var(--blue)) 20%, var(--line));
  border-radius: 10px;
  padding: 12px;
  background: color-mix(in srgb, var(--party-color, var(--blue)) 9%, var(--surface-strong));
  cursor: pointer;
  text-align: left;
}

.party-card.selected,
.party-card:hover {
  border-color: color-mix(in srgb, var(--party-color, var(--blue)) 44%, var(--line));
  background: color-mix(in srgb, var(--party-color, var(--blue)) 15%, var(--surface-strong));
}

.party-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.party-hero .party-dot {
  width: 28px;
  height: 28px;
}

.vote-detail-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.party-vote-overview {
  display: grid;
  gap: 12px;
}

.party-vote-overview .section-head {
  padding-bottom: 12px;
}

.party-vote-legend,
.party-vote-counts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.party-vote-legend {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.party-vote-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}

.party-vote-list {
  display: grid;
  gap: 9px;
}

.party-vote-row {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--party-color, var(--blue)) 18%, var(--line));
  border-radius: 9px;
  padding: 11px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--party-color, var(--blue)) 10%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface-raised) 76%, transparent);
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 3px 0 0 color-mix(in srgb, var(--party-color, var(--blue)) 68%, transparent);
}

.party-vote-row.yes {
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
}

.party-vote-row.no {
  border-color: color-mix(in srgb, var(--red) 28%, var(--line));
}

.party-vote-row.abstain {
  border-color: color-mix(in srgb, var(--gold) 30%, var(--line));
}

.party-vote-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.party-vote-meta .party-chip {
  min-width: 0;
}

.party-vote-meta strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.party-vote-counts {
  gap: 6px;
}

.party-vote-counts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 7px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-strong) 64%, transparent);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.party-vote-counts strong {
  color: var(--ink);
  font-size: 12px;
}

.party-vote-counts .yes strong {
  color: var(--green);
}

.party-vote-counts .no strong {
  color: var(--red);
}

.party-vote-counts .abstain strong {
  color: var(--gold);
}

.party-vote-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 18px;
  align-items: center;
}

.vote-dot-link {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.vote-dot-link.disabled {
  cursor: default;
}

.vote-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 13%, transparent);
  transition:
    box-shadow 120ms ease,
    transform 120ms ease;
}

.vote-dot-link:hover .vote-dot,
.vote-dot-link:focus-visible .vote-dot {
  transform: scale(1.45);
  box-shadow:
    0 0 0 3px color-mix(in srgb, currentColor 18%, transparent),
    0 4px 10px color-mix(in srgb, currentColor 24%, transparent);
}

.vote-dot-link:focus-visible {
  outline: 2px solid color-mix(in srgb, currentColor 56%, transparent);
  outline-offset: 1px;
}

.vote-dot.yes {
  color: var(--green);
  background: var(--green);
}

.vote-dot.no {
  color: var(--red);
  background: var(--red);
}

.vote-dot.abstain {
  color: var(--gold);
  background: var(--gold);
}

.vote-dot.absent {
  color: var(--soft);
  background: var(--soft);
}

.vote-dot.unknown {
  color: var(--blue);
  background: var(--blue);
}

.foundation-page {
  padding-top: 6px;
}

.foundation-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.foundation-grid,
.foundation-kpi-list,
.foundation-split {
  display: grid;
  gap: 12px;
}

.foundation-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.foundation-kpi-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.foundation-split {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  margin-top: 18px;
}

.foundation-metric,
.foundation-principle,
.foundation-goal {
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 86%, var(--glass-sheen)), var(--surface-raised));
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.foundation-metric {
  display: grid;
  align-content: start;
  min-height: 112px;
  padding: 14px;
}

.foundation-metric span,
.foundation-principle span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.foundation-metric strong {
  margin-top: 7px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
}

.foundation-metric small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.foundation-communication,
.foundation-goals,
.principles-grid {
  margin-top: 18px;
}

.live-import-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.tqdm-readout {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.tqdm-readout strong {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.92;
}

.tqdm-readout span {
  color: var(--muted);
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 950;
  line-height: 1;
}

.tqdm-bar {
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 9%, transparent), color-mix(in srgb, var(--ink) 4%, transparent));
  overflow: hidden;
}

.tqdm-bar span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--green), color-mix(in srgb, var(--blue) 55%, var(--green)));
  box-shadow: 0 0 24px color-mix(in srgb, var(--green) 24%, transparent);
  transition: width 260ms ease;
}

.import-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.import-log-line {
  display: grid;
  grid-template-columns: 140px minmax(180px, 0.8fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-strong) 58%, transparent);
}

.import-log-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.import-log-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-log-line p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 42%, transparent);
  animation: pulse-dot 1.4s ease-out infinite;
}

@keyframes eye-blink-lid {
  0%,
  84%,
  92%,
  100% {
    transform: scaleY(1);
  }

  88% {
    transform: scaleY(0.12);
  }
}

@keyframes eye-blink-core {
  0%,
  84%,
  92%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }

  88% {
    opacity: 0.12;
    transform: scaleY(0.06);
  }
}

@keyframes eye-blink-highlight {
  0%,
  84%,
  92%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }

  88% {
    opacity: 0;
    transform: scaleY(0.04);
  }
}

@keyframes eye-blink-sheen {
  0%,
  84%,
  92%,
  100% {
    opacity: 0.72;
    transform: scaleY(1);
  }

  88% {
    opacity: 0.18;
    transform: scaleY(0.18);
  }
}

@keyframes eye-blink-lower {
  0%,
  84%,
  92%,
  100% {
    opacity: 0.42;
    transform: translateY(0) scaleY(1);
  }

  88% {
    opacity: 0.76;
    transform: translateY(-6px) scaleY(0.55);
  }
}

@keyframes eye-blink-lash {
  0%,
  84%,
  92%,
  100% {
    transform: translateY(0) scaleY(1);
  }

  88% {
    transform: translateY(4px) scaleY(0.72);
  }
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 42%, transparent);
  }

  70% {
    box-shadow: 0 0 0 8px transparent;
  }

  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loading-sweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loading-core {
  0%,
  100% {
    transform: scale(0.82);
  }

  50% {
    transform: scale(1.12);
  }
}

@keyframes loading-ring {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.94);
  }

  50% {
    opacity: 0.95;
    transform: scale(1.03);
  }
}

.foundation-communication p {
  max-width: 980px;
}

.foundation-goals {
  display: grid;
  gap: 14px;
}

.foundation-goal {
  padding: 16px;
}

.foundation-goal.partial {
  border-color: color-mix(in srgb, var(--gold) 28%, var(--line));
}

.foundation-goal.missing,
.foundation-goal.danger {
  border-color: color-mix(in srgb, var(--red) 28%, var(--line));
}

.foundation-goal.ok {
  border-color: color-mix(in srgb, var(--green) 32%, var(--line));
}

.foundation-goal-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.foundation-goal-head h2 {
  margin: 1px 0 0;
  font-size: clamp(20px, 2vw, 28px);
}

.foundation-goal-head > strong {
  font-size: 28px;
  line-height: 1;
}

.goal-id {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-strong) 68%, transparent);
  font-size: 18px;
  font-weight: 950;
}

.foundation-progress {
  height: 8px;
  margin: 14px 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  overflow: hidden;
}

.foundation-progress span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--green), color-mix(in srgb, var(--gold) 70%, var(--green)));
}

.foundation-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 12px;
}

.foundation-columns.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-columns h3 {
  margin-bottom: 8px;
  font-size: 13px;
  text-transform: uppercase;
}

.foundation-columns ul,
.foundation-communication ul,
.foundation-page ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  line-height: 1.45;
}

.foundation-principle {
  padding: 14px;
}

.foundation-principle > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.foundation-principle strong {
  font-size: 20px;
}

.foundation-principle p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.foundation-table {
  max-height: 380px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
}

.foundation-table table {
  min-width: 520px;
}

.foundation-table th,
.foundation-table td {
  padding: 10px 12px;
  font-size: 12px;
}

.explain-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.explain-grid .wide {
  grid-column: 1 / -1;
}

.coverage-item,
.change-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 86%, var(--glass-sheen)), var(--surface-raised));
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.coverage-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.coverage-item.active {
  border-color: color-mix(in srgb, var(--green) 34%, var(--line));
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--green) 56%, transparent),
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 var(--glass-lowlight);
}

.coverage-item strong,
.change-item strong {
  display: block;
  margin-bottom: 5px;
}

.coverage-item p,
.change-item p {
  margin: 0;
  font-size: 13px;
}

.change-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
}

.change-item strong,
.change-item p {
  grid-column: 2;
}

.change-item span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--blue);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 82%, var(--glass-sheen)), var(--surface-raised));
  font-size: 12px;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    0 8px 18px color-mix(in srgb, var(--blue) 10%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .action-tile {
    animation: none;
    transition: none;
  }

  .loading-mark::before,
  .loading-mark-core,
  .loading-mark-orbit,
  .status.busy::before,
  .eye-orbit,
  .eye-iris,
  .eye-pupil,
  .eye-highlight,
  .eye-sheen,
  .eye-lower-line,
  .eye-lash,
  .pulse-dot {
    animation: none;
  }
}

@media (min-width: 1181px) {
  .tool-layout {
    min-height: min(780px, calc(100vh - 206px));
  }

  .tool-layout .list-surface {
    height: min(780px, calc(100vh - 206px));
    min-height: min(640px, calc(100vh - 206px));
  }

  .tool-layout .detail-panel {
    min-height: min(780px, calc(100vh - 206px));
  }

  .tool-layout .table-shell {
    min-height: 0;
    max-height: none;
  }

  .vote-tool-layout,
  .vote-tool-layout .list-surface {
    height: auto;
    min-height: 0;
  }

  .detail-panel {
    position: sticky;
    top: 104px;
  }
}

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

  .topnav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .top-actions {
    justify-content: space-between;
  }

  .source-pill {
    max-width: none;
  }

  .intro-grid,
  .tool-layout,
  .dashboard-grid,
  .foundation-split,
  .import-progress-grid,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .import-log-line {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --shell: min(1440px, calc(100vw - 24px));
  }

  .app-shell {
    padding-top: 10px;
  }

  .topbar {
    position: static;
    gap: 10px;
    padding: 9px;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .topnav a {
    justify-content: center;
    min-width: 0;
    min-height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }

  .topnav a:last-child {
    grid-column: auto;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .top-actions .council-switch {
    grid-column: 1 / -1;
    width: 100%;
  }

  .top-actions .council-switch button {
    flex: 1;
    min-width: 0;
    min-height: 36px;
  }

  .top-actions .source-pill,
  .top-actions .theme-toggle {
    width: auto;
    min-height: 36px;
  }

  .top-actions,
  .section-head,
  .vote-row,
  .mini-row,
  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head .theme-toggle,
  .section-head .source-pill,
  .vote-head-status {
    justify-content: center;
    width: 100%;
  }

  .vote-head-status {
    align-items: stretch;
    flex-direction: column;
  }

  .vote-filter-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filterbox,
  .filterbox.compact {
    min-width: 0;
  }

  .pagination-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .table-pagination span {
    display: block;
    margin: 4px 0 0;
  }

  .vote-head-status .count-pill,
  .import-status {
    justify-content: center;
    text-align: center;
  }

  h1 {
    font-size: 35px;
  }

  .detail-hero h1 {
    font-size: 32px;
  }

  .lead {
    font-size: 15px;
  }

  .page-heading {
    margin: 22px 0 14px;
    padding-left: 14px;
  }

  .page-heading::before {
    top: 8px;
    bottom: 8px;
  }

  .foundation-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .metrics-grid.two,
  .metrics-grid.three,
  .action-grid,
  .party-grid,
  .foundation-grid,
  .foundation-kpi-list,
  .foundation-columns,
  .foundation-columns.two,
  .import-progress-grid,
  .council-status,
  .fact-list,
  .official-data-grid,
  .vote-groups,
  .explain-grid {
    grid-template-columns: 1fr;
  }

  .tqdm-readout {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-log-line {
    grid-template-columns: 1fr;
  }

  .import-log-line strong,
  .import-log-line p {
    white-space: normal;
  }

  .detail-person-card {
    display: grid;
  }

  .vote-person-row,
  .person-vote-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .vote-row-status {
    justify-items: start;
    text-align: left;
  }

  .party-vote-counts span {
    flex: 1 1 calc(50% - 6px);
    justify-content: space-between;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .coverage-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .topnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topnav a:last-child {
    grid-column: 1 / -1;
  }
}
