:root {
  --paper: #f2ede2;
  --paper-deep: #e7dfcf;
  --surface: #fffdf8;
  --surface-soft: #f8f4eb;
  --surface-muted: #f3efe6;
  --line: #ded7ca;
  --line-strong: #c6d2df;
  --text: #1e2d3c;
  --muted: #596776;
  --navy: #1f4b75;
  --navy-deep: #123253;
  --navy-soft: rgba(31, 75, 117, 0.08);
  --saffron: #d67a1f;
  --saffron-deep: #a85612;
  --saffron-soft: rgba(214, 122, 31, 0.1);
  --green: #2d6a4f;
  --green-soft: rgba(45, 106, 79, 0.12);
  --red: #b04434;
  --red-soft: rgba(176, 68, 52, 0.12);
  --amber: #9b6a18;
  --amber-soft: rgba(155, 106, 24, 0.12);
  --shadow: 0 16px 34px rgba(18, 50, 83, 0.08);
  --bjp: #a49a22;
  --bjp-deep: #7d750f;
  --cpim: #d93e58;
  --cpim-deep: #a51836;
  --tmc: #179c51;
  --tmc-deep: #0c7038;
  --winner-green: #0d8642;
  --summary-cyan: #33cfff;
  --summary-magenta: #f42cff;
  --summary-indigo: #3651ff;
  --summary-teal: #2ab6c2;
  --summary-lime: #4ab825;
  --summary-mustard: #b9ac37;
  --summary-gray: #b3bac4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  color: var(--text);
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(31, 75, 117, 0.08), transparent 26%),
    linear-gradient(180deg, #f7f3e8 0%, var(--paper) 48%, var(--paper-deep) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: 0 0 auto;
  height: 8px;
  z-index: 40;
  background: linear-gradient(90deg, #ff9933 0 33.33%, #ffffff 33.33% 66.66%, #138808 66.66%);
}

body::after {
  inset: 0;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(31, 75, 117, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 75, 117, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 82%);
}

body:not(.is-authenticated) .page-shell {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

body.admin-users-body .page-shell {
  filter: none;
  pointer-events: auto;
  user-select: auto;
  width: min(1180px, calc(100% - 1.25rem));
  padding: 0.8rem 0 1.35rem;
}

body.admin-users-body .topbar {
  top: 0.55rem;
  margin-bottom: 0.55rem;
  padding: 0.5rem 0.72rem;
}

body.admin-users-body .topbar-brand strong {
  font-size: 1rem;
}

body.admin-users-body .site-masthead,
body.admin-users-body .section-banner,
body.admin-users-body .admin-users-list-panel,
body.admin-users-body .admin-users-create-panel,
body.admin-users-body .admin-users-access-panel {
  padding: 0.85rem;
  border-radius: 18px;
}

body.admin-users-body .site-masthead {
  margin-bottom: 0.55rem;
}

body.admin-users-body .site-masthead__band {
  height: 8px;
  margin: -0.85rem -0.85rem 0.7rem;
}

body.admin-users-body .site-masthead__inner,
body.admin-users-body .site-masthead__identity,
body.admin-users-body .site-masthead__authority {
  gap: 0.65rem;
}

body.admin-users-body .site-subtitle {
  margin-top: 0.35rem;
  max-width: 58ch;
  line-height: 1.45;
}

body.admin-users-body .section-banner {
  gap: 0.65rem;
  align-items: center;
}

body.admin-users-body .section-banner__text,
body.admin-users-body .panel-heading p,
body.admin-users-body .meta-text,
body.admin-users-body .empty-state {
  font-size: 0.86rem;
  line-height: 1.42;
}

body.admin-users-body .panel-heading {
  margin-bottom: 0.55rem;
  gap: 0.35rem 0.7rem;
}

body.admin-users-body .emblem-mark {
  width: 68px;
  box-shadow: inset 0 0 0 5px rgba(31, 75, 117, 0.07);
}

body.admin-users-body .emblem-mark__pillars {
  top: 16px;
  width: 24px;
  height: 15px;
  box-shadow:
    -11px 0 0 0 var(--saffron),
    11px 0 0 0 var(--saffron),
    0 7px 0 -3px rgba(18, 50, 83, 0.2);
}

body.admin-users-body .emblem-mark__chakra {
  bottom: 12px;
  width: 20px;
  height: 20px;
}

body.admin-users-body .admin-users-main {
  grid-template-columns: minmax(0, 1.45fr) minmax(285px, 0.85fr);
  gap: 0.65rem;
}

body.admin-users-body .user-create-form,
body.admin-users-body .admin-user-card__fields {
  gap: 0.55rem;
}

body.admin-users-body .admin-page-user-create-form {
  gap: 0.55rem;
}

body.admin-users-body .field {
  gap: 0.25rem;
  font-size: 0.84rem;
}

body.admin-users-body .field span {
  font-size: 0.76rem;
}

body.admin-users-body .field input,
body.admin-users-body select {
  min-height: 40px;
  padding: 0.56rem 0.75rem;
  border-radius: 10px;
}

body.admin-users-body .link-button {
  min-height: 2.15rem;
  padding: 0.5rem 0.78rem;
  border-radius: 10px;
}

body.admin-users-body .authority-pill {
  min-height: 1.7rem;
  padding: 0.24rem 0.58rem;
  font-size: 0.68rem;
}

body.admin-users-body .admin-users-guidance {
  margin-top: 0.65rem;
  padding: 0.72rem 0.78rem;
}

body.admin-users-body .admin-users-summary {
  margin-top: 0.65rem;
  gap: 0.55rem;
}

body.admin-users-body .stat-card {
  gap: 0.2rem;
  padding: 0.78rem 0.82rem;
}

body.admin-users-body .stat-card strong {
  font-size: clamp(1.15rem, 1.45vw, 1.55rem);
}

body.admin-users-body .admin-users-list {
  gap: 0.6rem;
}

body.admin-users-body .admin-user-card {
  gap: 0.65rem;
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
}

body.admin-users-body .admin-user-card__header {
  gap: 0.55rem;
}

body.admin-users-body .admin-user-card__title {
  font-size: 1rem;
}

body.admin-users-body .admin-user-card__subtext {
  font-size: 0.76rem;
}

body.admin-users-body .admin-user-card__actions,
body.admin-users-body .admin-topbar-actions {
  gap: 0.5rem;
}

::selection {
  background: rgba(31, 75, 117, 0.16);
}

a {
  color: var(--navy-deep);
}

button,
input,
select,
textarea {
  font: inherit;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 26, 44, 0.48);
  backdrop-filter: blur(12px);
}

.auth-card {
  width: min(100%, 560px);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(247, 242, 232, 0.98));
  box-shadow: 0 28px 64px rgba(7, 23, 39, 0.3);
}

.auth-card__header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.auth-title {
  margin: 0;
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  line-height: 1.05;
  max-width: none;
  color: var(--navy-deep);
}

.auth-text {
  margin-bottom: 0;
}

.auth-form {
  display: grid;
  gap: 0.8rem;
}

.auth-button {
  width: 100%;
}

.auth-message {
  min-height: 1.4rem;
  margin: 0.7rem 0 0;
  color: var(--red);
  font-weight: 700;
}

.page-shell {
  position: relative;
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.15rem 0 2.2rem;
}

.page-shell::before {
  content: none;
  position: absolute;
  inset: 2.3rem 0 auto;
  z-index: 0;
  text-align: center;
  font-family: "Cambria", "Georgia", serif;
  font-size: clamp(1.5rem, 5vw, 3.8rem);
  letter-spacing: 0.24em;
  color: rgba(18, 50, 83, 0.045);
  white-space: nowrap;
  pointer-events: none;
}

.panel,
.hero-copy {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.97), rgba(248, 244, 235, 0.97));
  box-shadow: var(--shadow);
}

.panel::before,
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--saffron), #ffffff 48%, #138808);
}

.panel::after,
.hero-copy::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(31, 75, 117, 0.08);
  opacity: 0.5;
  pointer-events: none;
}

.hero,
.workspace-grid,
.stats-grid {
  display: grid;
  gap: 0.85rem;
}

.hero-copy,
.hero-note,
.controls-panel,
.list-panel,
.detail-panel,
.stat-card,
.section-banner,
.menu-drawer__card {
  padding: 1.1rem;
}

.hero-copy {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  align-content: start;
  height: 100%;
  gap: 0.72rem;
}

.list-panel {
  min-width: 0;
}

.detail-panel {
  position: sticky;
  top: 5.2rem;
  align-self: start;
  max-height: calc(100vh - 6rem);
  overflow: auto;
  scrollbar-gutter: stable;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cambria", "Georgia", serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  line-height: 1.02;
}

.site-masthead {
  margin-bottom: 0.8rem;
}

.site-masthead__band {
  height: 12px;
  margin: -1.1rem -1.1rem 0.9rem;
  background: linear-gradient(90deg, #ff9933 0 33.33%, #ffffff 33.33% 66.66%, #138808 66.66%);
}

.site-masthead__inner,
.site-masthead__identity,
.site-masthead__authority {
  display: flex;
  gap: 0.85rem;
}

.site-masthead__inner {
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.site-masthead__identity {
  align-items: flex-start;
  min-width: min(100%, 720px);
}

.site-title {
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
  line-height: 1.04;
  color: var(--navy-deep);
}

.site-subtitle {
  max-width: 64ch;
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-masthead__authority {
  align-items: flex-start;
  flex-wrap: wrap;
}

.authority-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(31, 75, 117, 0.1), rgba(31, 75, 117, 0.06));
  color: var(--navy-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.authority-pill--outline {
  background: linear-gradient(180deg, rgba(214, 122, 31, 0.08), rgba(214, 122, 31, 0.03));
  color: var(--saffron-deep);
}

.emblem-mark {
  position: relative;
  flex: 0 0 auto;
  width: 84px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(31, 75, 117, 0.16);
  background: radial-gradient(circle at center, #ffffff 0 32%, #edf2f8 32% 100%);
  box-shadow: inset 0 0 0 7px rgba(31, 75, 117, 0.07);
}

.emblem-mark--compact {
  width: 72px;
}

.emblem-mark__pillars,
.emblem-mark__chakra {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.emblem-mark__pillars {
  top: 19px;
  width: 28px;
  height: 17px;
  border-radius: 6px 6px 4px 4px;
  background: linear-gradient(180deg, var(--saffron), var(--saffron-deep));
  box-shadow:
    -13px 0 0 0 var(--saffron),
    13px 0 0 0 var(--saffron),
    0 8px 0 -3px rgba(18, 50, 83, 0.2);
}

.emblem-mark__chakra {
  bottom: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--navy);
}

.emblem-mark__chakra::before,
.emblem-mark__chakra::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  background: rgba(31, 75, 117, 0.45);
  transform: translate(-50%, -50%);
}

.emblem-mark__chakra::before {
  width: 14px;
  height: 2px;
}

.emblem-mark__chakra::after {
  width: 2px;
  height: 14px;
}

.notice-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  border-radius: 18px;
}

.notice-strip__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--saffron), var(--saffron-deep));
  color: #fffdf9;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-strip p,
.hero-note p,
.section-banner__text,
.guidance-card p,
.detail-card p {
  margin: 0;
  line-height: 1.55;
}

.topbar {
  position: sticky;
  top: 0.8rem;
  z-index: 16;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
  padding: 0.62rem 0.85rem;
}

.topbar::after {
  display: none;
}

.topbar-brand,
.topbar-actions,
.menu-drawer__header,
.panel-heading {
  position: relative;
  z-index: 1;
}

.topbar-brand {
  display: flex;
  align-items: center;
  min-height: 1.8rem;
}

.topbar-brand strong,
.menu-drawer__header strong {
  display: block;
  font-family: "Cambria", "Georgia", serif;
  font-size: clamp(0.96rem, 1.4vw, 1.18rem);
  line-height: 1.05;
  color: var(--navy-deep);
}

.menu-toggle-button {
  display: inline-grid;
  gap: 0.28rem;
  padding: 0.52rem;
  min-width: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.menu-toggle-button span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy-deep);
  border-radius: 999px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-toggle-button.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle-button.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle-button.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-drawer {
  position: sticky;
  top: 4.45rem;
  z-index: 15;
  margin-bottom: 0.85rem;
}

.menu-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.menu-drawer__actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.admin-user-panel {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line-strong);
}

.admin-panel-heading {
  margin-top: 1rem;
}

.user-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.admin-data-form {
  margin-top: 0.8rem;
}

.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.admin-data-summary {
  margin: 0.7rem 0 0;
  line-height: 1.55;
}

.admin-topbar-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.admin-users-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
  gap: 0.85rem;
  align-items: start;
}

.admin-users-list-panel,
.admin-users-create-panel {
  min-width: 0;
}

.admin-users-create-panel {
  position: sticky;
  top: 5.2rem;
  align-self: start;
}

.admin-page-user-create-form {
  grid-template-columns: 1fr;
}

.admin-users-guidance {
  margin-top: 0.85rem;
}

.admin-users-summary {
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.admin-users-list {
  display: grid;
  gap: 0.75rem;
}

.admin-users-empty {
  padding: 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(31, 75, 117, 0.04);
}

.admin-user-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, var(--surface-muted));
}

.admin-user-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-user-card__meta {
  display: grid;
  gap: 0.15rem;
}

.admin-user-card__title {
  font-family: "Cambria", "Georgia", serif;
  font-size: 1.05rem;
  color: var(--navy-deep);
}

.admin-user-card__subtext {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.admin-user-card__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-user-card__note {
  margin: 0;
}

.admin-user-card__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  align-items: stretch;
  margin-bottom: 0.85rem;
}

.hero-title {
  max-width: none;
  font-size: clamp(1.2rem, 2.2vw, 1.85rem);
  line-height: 1.06;
  color: var(--navy-deep);
}

.hero-search-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.4rem;
  padding: 0.64rem 0.72rem;
  border: 1px solid rgba(31, 75, 117, 0.12);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(31, 75, 117, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 240, 231, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.hero-search-copy {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.hero-search-copy__label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 1.5rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: rgba(31, 75, 117, 0.08);
  color: var(--navy-deep);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-search-copy p {
  margin: 0;
  max-width: none;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.hero-search-toolbar {
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: stretch;
}

.hero-search-tip {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.hero-text,
.panel-heading p,
.subtle-note,
.message-box,
.stat-label,
.stat-foot,
.field span,
.meta-text,
.chip,
.empty-state,
.detail-card span,
.metric span,
.fact-item span {
  color: var(--muted);
}

.hero-text {
  max-width: 60ch;
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.hero-highlights,
.map-meta,
.detail-grid,
.candidate-grid,
.fact-grid,
.update-grid,
.editor-grid {
  display: grid;
  gap: 0.65rem;
}

.hero-highlights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.2rem;
}

.hero-highlight {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, var(--surface-muted));
}

.hero-highlight__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}

.hero-highlight strong {
  display: block;
  font-family: "Cambria", "Georgia", serif;
  color: var(--navy-deep);
  line-height: 1.45;
}

.hero-note {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.75rem;
}

.hero-summary {
  display: flex;
  flex-direction: column;
  margin-top: 0.2rem;
  overflow: visible;
  max-width: none;
  height: 100%;
}

.hero-summary__heading {
  align-items: center;
  margin-bottom: 0.2rem;
}

.hero-summary__content {
  margin-top: 0;
  flex: 1;
  display: flex;
}

.hero-summary-grid {
  display: grid;
  flex: 1;
  gap: 0.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.summary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 0.62rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(31, 75, 117, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 239, 230, 0.96));
  box-shadow: var(--shadow);
}

.summary-card--votes {
  grid-column: auto;
  grid-row: auto;
}

.summary-card--counts {
  grid-column: auto;
  grid-row: auto;
}

.summary-card--margins {
  grid-column: auto;
  grid-row: auto;
}

.summary-card__head {
  display: grid;
  gap: 0.28rem;
  margin-bottom: 0.42rem;
}

.summary-card__head h3 {
  margin: 0;
  font-family: "Cambria", "Georgia", serif;
  font-size: clamp(0.92rem, 1.2vw, 1.08rem);
  color: var(--navy-deep);
}

.summary-card__head p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.summary-card__eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 1.4rem;
  padding: 0.14rem 0.46rem;
  border-radius: 999px;
  background: rgba(31, 75, 117, 0.08);
  color: var(--navy);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.summary-vote-list,
.summary-count-list,
.summary-margin-list {
  display: grid;
  flex: 1;
  min-height: 0;
  gap: 0.38rem;
}

.summary-vote-list,
.summary-count-list {
  align-content: stretch;
  grid-auto-rows: 1fr;
}

.summary-margin-list {
  grid-auto-rows: minmax(0, 1fr);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.summary-vote-row,
.summary-count-row,
.summary-margin-row {
  position: relative;
  outline: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.summary-vote-row:hover,
.summary-vote-row:focus-visible,
.summary-count-row:hover,
.summary-count-row:focus-visible,
.summary-margin-row:hover,
.summary-margin-row:focus-visible {
  transform: translateY(-2px);
}

.summary-vote-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 0.42rem;
  align-items: center;
  padding: 0.5rem 0.54rem;
  border: 1px solid rgba(31, 75, 117, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.summary-vote-row__label-wrap {
  display: grid;
  gap: 0.1rem;
}

.summary-vote-row__label {
  font-size: 0.82rem;
  color: var(--navy-deep);
  line-height: 1.1;
}

.summary-vote-row__meta {
  display: none;
}

.summary-vote-row__track,
.summary-margin-row__track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 50, 83, 0.08);
}

.summary-vote-row__fill,
.summary-margin-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: transform 160ms ease, filter 160ms ease;
}

.summary-vote-row:hover .summary-vote-row__fill,
.summary-vote-row:focus-visible .summary-vote-row__fill,
.summary-margin-row:hover .summary-margin-row__fill,
.summary-margin-row:focus-visible .summary-margin-row__fill {
  transform: scaleX(1.01);
  transform-origin: left center;
  filter: saturate(1.12);
}

.summary-vote-row__value,
.summary-margin-row__value,
.summary-count-row__value {
  font-family: "Cambria", "Georgia", serif;
  font-size: clamp(0.88rem, 1.05vw, 1.05rem);
  color: var(--navy-deep);
}

.summary-vote-row--bjp .summary-vote-row__fill {
  background: linear-gradient(90deg, var(--bjp-deep), var(--bjp));
}

.summary-vote-row--cpim .summary-vote-row__fill {
  background: linear-gradient(90deg, var(--cpim-deep), var(--cpim));
}

.summary-vote-row--tmc .summary-vote-row__fill {
  background: linear-gradient(90deg, var(--tmc-deep), var(--tmc));
}

.summary-vote-row--winner .summary-vote-row__fill {
  background: linear-gradient(90deg, #096a32, var(--winner-green));
}

.summary-count-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.42rem;
  align-items: center;
  padding: 0.5rem 0.54rem;
  border-radius: 12px;
  border: 1px solid rgba(31, 75, 117, 0.1);
}

.summary-count-row__copy {
  display: grid;
  gap: 0.16rem;
}

.summary-count-row__copy strong {
  font-size: clamp(0.86rem, 1vw, 0.98rem);
  line-height: 1.08;
}

.summary-count-row__copy span {
  display: none;
}

.summary-count-row--lost {
  background: linear-gradient(135deg, rgba(217, 62, 88, 0.18), rgba(255, 255, 255, 0.98));
}

.summary-count-row--lead {
  background: linear-gradient(135deg, rgba(23, 156, 81, 0.2), rgba(255, 255, 255, 0.98));
}

.summary-count-row--total {
  background: linear-gradient(135deg, rgba(31, 75, 117, 0.12), rgba(255, 255, 255, 0.98));
}

.summary-margin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.32rem;
  align-items: center;
  padding: 0.34rem 0.38rem;
  border: 1px solid rgba(31, 75, 117, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.summary-margin-row__label-wrap {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.08rem;
}

.summary-margin-row__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 1.22rem;
  padding: 0.08rem 0.34rem;
  border-radius: 7px;
  color: #102031;
  font-size: 0.72rem;
  font-weight: 800;
}

.summary-margin-row__meta {
  display: none;
}

.summary-margin-row__track {
  height: 8px;
}

.summary-margin-row--gt500 .summary-margin-row__fill,
.summary-margin-row--gt500 .summary-margin-row__chip {
  background: linear-gradient(90deg, #0eb8ed, var(--summary-cyan));
}

.summary-margin-row--band400 .summary-margin-row__fill,
.summary-margin-row--band400 .summary-margin-row__chip {
  background: linear-gradient(90deg, #db1dff, var(--summary-magenta));
}

.summary-margin-row--band300 .summary-margin-row__fill,
.summary-margin-row--band300 .summary-margin-row__chip {
  background: linear-gradient(90deg, #1f38d8, var(--summary-indigo));
  color: #f9fbff;
}

.summary-margin-row--band200 .summary-margin-row__fill,
.summary-margin-row--band200 .summary-margin-row__chip {
  background: linear-gradient(90deg, #148a95, var(--summary-teal));
}

.summary-margin-row--band100 .summary-margin-row__fill,
.summary-margin-row--band100 .summary-margin-row__chip {
  background: linear-gradient(90deg, #217f1a, var(--summary-lime));
}

.summary-margin-row--band50 .summary-margin-row__fill,
.summary-margin-row--band50 .summary-margin-row__chip {
  background: linear-gradient(90deg, #8d811d, var(--summary-mustard));
}

.summary-margin-row--band0 .summary-margin-row__fill,
.summary-margin-row--band0 .summary-margin-row__chip {
  background: linear-gradient(90deg, #9199a4, var(--summary-gray));
}

.summary-hover-card {
  position: absolute;
  left: 0.75rem;
  bottom: calc(100% + 0.5rem);
  z-index: 5;
  width: min(250px, calc(100vw - 2rem));
  padding: 0.46rem 0.58rem;
  border-radius: 12px;
  background: rgba(18, 50, 83, 0.96);
  color: #f8fbff;
  font-size: 0.72rem;
  line-height: 1.38;
  box-shadow: 0 16px 30px rgba(18, 50, 83, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.summary-hover-card::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 100%;
  border-width: 8px 7px 0;
  border-style: solid;
  border-color: rgba(18, 50, 83, 0.96) transparent transparent;
}

.summary-vote-row:hover .summary-hover-card,
.summary-vote-row:focus-visible .summary-hover-card,
.summary-count-row:hover .summary-hover-card,
.summary-count-row:focus-visible .summary-hover-card,
.summary-margin-row:hover .summary-hover-card,
.summary-margin-row:focus-visible .summary-hover-card {
  opacity: 1;
  transform: translateY(0);
}

.map-panel {
  gap: 0.85rem;
}

.map-figure {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.map-figure img {
  display: block;
  width: 100%;
  height: auto;
}

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

.map-meta__item {
  padding: 0.72rem 0.82rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, var(--surface-muted));
}

.map-meta__item span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.map-meta__item strong {
  font-family: "Cambria", "Georgia", serif;
  color: var(--navy-deep);
}

#coverage-note {
  margin-top: auto;
  padding: 0.85rem;
  border-radius: 14px;
  border-left: 4px solid var(--navy);
  background: rgba(31, 75, 117, 0.06);
}

.dashboard {
  display: grid;
  gap: 0.85rem;
}

.site-credit {
  margin-top: 0.95rem;
  padding: 0.5rem 0 0;
  text-align: center;
  color: var(--muted);
}

.site-credit p {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.site-credit strong {
  color: var(--navy-deep);
}

.site-credit__heart {
  color: #d62839;
  font-size: 1.05em;
}

.section-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.section-banner h2 {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  color: var(--navy-deep);
}

.section-banner__text {
  max-width: 52ch;
}

.controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
  gap: 0.85rem;
  align-items: stretch;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.45rem 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.panel-heading h2,
.panel-heading h3 {
  color: var(--navy-deep);
}

.panel-heading p,
.section-banner__text,
.guidance-card p,
.detail-title__hint,
.meta-text,
.message-box,
.empty-state {
  font-size: 0.92rem;
  line-height: 1.5;
}

.search-toolbar {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0.7rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mode-button {
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.mode-button:hover,
.mode-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--navy);
}

.mode-button.active {
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  border-color: var(--navy-deep);
  color: #ffffff;
}

.search-category-select,
.search-input,
select,
input[type="search"],
.field input,
.note-textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.74rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.search-input {
  min-width: 0;
}

select {
  cursor: pointer;
}

input[type="search"]:focus-visible,
select:focus-visible,
.field input:focus-visible,
.note-textarea:focus-visible,
.link-button:focus-visible,
.menu-toggle-button:focus-visible,
.table-action:focus-visible {
  outline: 2px solid rgba(31, 75, 117, 0.2);
  outline-offset: 2px;
  border-color: var(--navy);
}

.guidance-card {
  padding: 0.85rem 0.95rem;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(31, 75, 117, 0.06), rgba(255, 255, 255, 0.82));
}

.guidance-card__title {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}

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

.stat-card {
  display: grid;
  gap: 0.35rem;
  border-left: 4px solid var(--navy);
}

.stat-card:nth-child(2) {
  border-left-color: var(--saffron);
}

.stat-card:nth-child(3) {
  border-left-color: var(--green);
}

.stat-card:nth-child(4) {
  border-left-color: var(--red);
}

.stat-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-card strong {
  position: relative;
  z-index: 1;
  font-family: "Cambria", "Georgia", serif;
  font-size: clamp(1.35rem, 1.7vw, 1.9rem);
  color: var(--navy-deep);
}

.workspace-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: start;
}

.message-box {
  position: relative;
  z-index: 1;
  padding: 0.85rem 0.95rem;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(31, 75, 117, 0.05);
}

.table-wrapper {
  position: relative;
  z-index: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.pagination {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(30, 45, 60, 0.1);
}

.pagination-link {
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid rgba(31, 75, 117, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy-deep);
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.pagination-link:hover:not(:disabled),
.pagination-link:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(31, 75, 117, 0.08);
  border-color: rgba(31, 75, 117, 0.32);
}

.pagination-link.is-active {
  border-color: var(--navy-deep);
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  color: #f8fbff;
  box-shadow: 0 10px 20px rgba(18, 50, 83, 0.16);
}

.pagination-link:disabled {
  cursor: default;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  min-height: 2.2rem;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hidden {
  display: none !important;
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

th,
td {
  padding: 0.78rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(30, 45, 60, 0.08);
}

th {
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  color: #f8fbff;
  font-family: "Cambria", "Georgia", serif;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.results-col--booth {
  width: 84px;
}

.results-col--name {
  width: 36%;
}

.results-col--voter {
  width: 39%;
}

.results-col--status {
  width: 132px;
}

tbody tr {
  cursor: pointer;
}

tbody tr:nth-child(even) td {
  background: #f8fafc;
}

tbody tr:hover td {
  background: rgba(31, 75, 117, 0.08);
}

tbody tr.selected td {
  background: rgba(31, 75, 117, 0.14);
}

.table-action-row {
  margin-top: 0.45rem;
}

.table-status {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}

.table-status .badge {
  min-height: 1.55rem;
  padding: 0.16rem 0.45rem;
  font-size: 0.7rem;
  line-height: 1.25;
  white-space: normal;
}

.table-status .badge--status {
  gap: 0.35rem;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(31, 75, 117, 0.2);
  border-radius: 999px;
  background: rgba(31, 75, 117, 0.08);
  color: var(--navy-deep);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.table-action:hover,
.table-action:focus-visible {
  transform: translateY(-1px);
  background: rgba(31, 75, 117, 0.14);
  border-color: rgba(31, 75, 117, 0.3);
}

.table-action--button {
  padding: 0.38rem 0.7rem;
}

.table-primary {
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}

.cell-ref {
  margin-top: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cell-ref a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.cell-meta {
  margin-top: 0.25rem;
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
}

.detail-card {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, var(--surface-muted));
}

.detail-card h3 {
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  color: var(--navy-deep);
}

.detail-card--nested {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.detail-title {
  display: grid;
  gap: 0.35rem;
}

.detail-title__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.detail-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 1.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--saffron-soft);
  color: var(--saffron-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-title strong {
  font-family: "Cambria", "Georgia", serif;
  font-size: clamp(1.3rem, 2.3vw, 1.8rem);
  color: var(--navy-deep);
}

.detail-title__hint {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  line-height: 1.45;
}

.hot-spotlight {
  position: relative;
  margin-left: auto;
  z-index: 4;
}

.hot-spotlight summary {
  list-style: none;
}

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

.hot-sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.6rem;
  padding: 0.18rem 0.58rem;
  border: 1px solid rgba(214, 122, 31, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff0db, #ffd8a8);
  color: var(--saffron-deep);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 10px 22px rgba(168, 86, 18, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hot-spotlight[open] .hot-sticker,
.hot-spotlight:hover .hot-sticker,
.hot-spotlight:focus-within .hot-sticker {
  transform: translateY(-1px);
  border-color: rgba(168, 86, 18, 0.4);
  box-shadow: 0 14px 26px rgba(168, 86, 18, 0.2);
}

.hot-spotlight__panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: min(390px, calc(100vw - 4rem));
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(198, 210, 223, 0.9);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(247, 241, 230, 0.98));
  box-shadow: 0 26px 56px rgba(18, 50, 83, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hot-spotlight__panel::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  right: 1.15rem;
  width: 0.95rem;
  height: 0.95rem;
  border-top: 1px solid rgba(198, 210, 223, 0.9);
  border-left: 1px solid rgba(198, 210, 223, 0.9);
  background: rgba(255, 251, 244, 0.98);
  transform: rotate(45deg);
}

.hot-spotlight[open] .hot-spotlight__panel,
.hot-spotlight:hover .hot-spotlight__panel,
.hot-spotlight:focus-within .hot-spotlight__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hot-spotlight__header {
  display: grid;
  gap: 0.25rem;
}

.hot-spotlight__eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron-deep);
}

.hot-spotlight__header strong {
  font-family: "Cambria", "Georgia", serif;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--navy-deep);
}

.hot-spotlight__header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.hot-faceoff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.hot-faceoff__card {
  display: grid;
  gap: 0.22rem;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 245, 238, 0.98));
}

.hot-faceoff__card--lead {
  border-color: rgba(45, 106, 79, 0.18);
  background: linear-gradient(180deg, rgba(45, 106, 79, 0.12), rgba(255, 255, 255, 0.98));
}

.hot-faceoff__card--trail {
  border-color: rgba(176, 68, 52, 0.18);
  background: linear-gradient(180deg, rgba(176, 68, 52, 0.1), rgba(255, 255, 255, 0.98));
}

.hot-faceoff__label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hot-faceoff__card strong {
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--navy-deep);
}

.hot-faceoff__card span:last-child {
  color: var(--navy);
  font-weight: 800;
}

.hot-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.hot-metric {
  display: grid;
  gap: 0.2rem;
  padding: 0.62rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 245, 238, 0.98));
}

.hot-metric span {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hot-metric strong {
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--navy-deep);
}

.hot-metric--lead {
  border-color: rgba(45, 106, 79, 0.18);
  background: linear-gradient(180deg, rgba(45, 106, 79, 0.12), rgba(255, 255, 255, 0.98));
}

.hot-metric--trail {
  border-color: rgba(176, 68, 52, 0.18);
  background: linear-gradient(180deg, rgba(176, 68, 52, 0.1), rgba(255, 255, 255, 0.98));
}

.hot-metric--tracked {
  border-color: rgba(214, 122, 31, 0.18);
  background: linear-gradient(180deg, rgba(214, 122, 31, 0.12), rgba(255, 255, 255, 0.98));
}

.hot-bars {
  display: grid;
  gap: 0.6rem;
}

.hot-bar-row {
  display: grid;
  gap: 0.36rem;
}

.hot-bar-row__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.hot-bar-row__identity {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.hot-bar-row__name {
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--navy-deep);
}

.hot-bar-row__value {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

.hot-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.hot-tag-row:empty {
  display: none;
}

.hot-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(31, 75, 117, 0.08);
  color: var(--navy-deep);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hot-bar-row__track {
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(31, 75, 117, 0.08);
  overflow: hidden;
}

.hot-bar-row__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.hot-bar-row__fill--lead {
  background: linear-gradient(90deg, #2d6a4f, #62ad82);
}

.hot-bar-row__fill--trail {
  background: linear-gradient(90deg, #b04434, #d97a66);
}

.hot-bar-row__fill--tracked {
  background: linear-gradient(90deg, #d67a1f, #f0b36f);
}

.hot-bar-row__fill--neutral {
  background: linear-gradient(90deg, #1f4b75, #6d91b5);
}

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

.metric,
.fact-item,
.update-item {
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8f5ee);
}

.metric strong,
.fact-item strong,
.update-item__head strong {
  display: block;
  margin-bottom: 0.18rem;
  font-family: "Cambria", "Georgia", serif;
  font-size: 0.94rem;
  color: var(--navy-deep);
}

.badge-row,
.chip-row,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.28rem 0.58rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 0.95rem;
  height: 0.95rem;
}

.badge__icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.25;
}

.badge--success {
  background: var(--green-soft);
  border-color: rgba(45, 106, 79, 0.16);
  color: var(--green);
}

.badge--danger {
  background: var(--red-soft);
  border-color: rgba(176, 68, 52, 0.16);
  color: var(--red);
}

.badge--warn {
  background: var(--amber-soft);
  border-color: rgba(155, 106, 24, 0.16);
  color: var(--amber);
}

.badge--neutral,
.chip {
  background: rgba(31, 75, 117, 0.08);
  border-color: rgba(31, 75, 117, 0.12);
  color: var(--navy-deep);
}

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

.update-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.update-item__meta {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--navy);
  word-break: break-word;
}

.note-editor,
.analysis-editor,
.data-editor {
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(31, 75, 117, 0.04);
}

.field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.field--full {
  grid-column: 1 / -1;
}

.note-label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: var(--text);
}

.note-textarea {
  min-height: 104px;
  resize: vertical;
}

.field input {
  min-height: 44px;
}

.editor-block {
  margin-top: 0.85rem;
}

.editor-block__title {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}

.saved-notes {
  margin-top: 0.85rem;
}

.saved-notes__list {
  display: grid;
  gap: 0.6rem;
}

.saved-note-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8f5ee);
}

.saved-note-item--editing {
  border-color: rgba(31, 75, 117, 0.35);
  box-shadow: 0 10px 24px rgba(31, 75, 117, 0.08);
}

.saved-note-item__content {
  display: grid;
  gap: 0.25rem;
  flex: 1;
}

.saved-note-item strong {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--navy-deep);
}

.saved-note-item span {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.saved-note-item__actions {
  display: flex;
  flex-shrink: 0;
}

.toast-container {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 20;
  display: grid;
  gap: 0.5rem;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(31, 75, 117, 0.97), rgba(18, 50, 83, 0.97));
  color: #f8fbff;
  box-shadow: 0 18px 40px rgba(18, 50, 83, 0.22);
  transform: translateY(14px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast--error {
  border-color: rgba(255, 202, 202, 0.34);
  background: linear-gradient(180deg, rgba(144, 38, 38, 0.97), rgba(96, 20, 20, 0.97));
  color: #fff4f4;
}

.toast--visible {
  transform: translateY(0);
  opacity: 1;
}

.detail-actions {
  margin-top: 0.75rem;
}

.upload-progress {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(31, 75, 117, 0.12);
}

.upload-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--navy-deep);
}

.upload-progress__track {
  overflow: hidden;
  height: 10px;
  border: 1px solid rgba(31, 75, 117, 0.14);
  border-radius: 999px;
  background: rgba(31, 75, 117, 0.08);
}

.upload-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy), var(--green));
  transition: width 160ms ease;
}

.upload-progress__track--indeterminate {
  position: relative;
}

.upload-progress__track--indeterminate .upload-progress__fill {
  width: 42%;
  animation: upload-progress-slide 1.1s ease-in-out infinite;
}

.upload-progress .meta-text {
  margin: 0;
  font-size: 0.76rem;
}

@keyframes upload-progress-slide {
  0% {
    transform: translateX(-90%);
  }

  100% {
    transform: translateX(170%);
  }
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.64rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(18, 50, 83, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(18, 50, 83, 0.22);
}

.link-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.link-button--secondary {
  border-color: #d7c8ae;
  background: linear-gradient(180deg, #fff8ec, #f2eadb);
  color: var(--navy-deep);
  box-shadow: none;
}

.link-button--secondary:hover,
.link-button--secondary:focus-visible {
  background: linear-gradient(180deg, #fff3df, #ebdfca);
  box-shadow: none;
}

.detail-card ul {
  margin: 0;
  padding-left: 1rem;
}

.detail-card li + li {
  margin-top: 0.35rem;
}

.empty-state {
  padding: 0.95rem;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(31, 75, 117, 0.04);
  line-height: 1.55;
}

.mono {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .page-shell::before {
    font-size: clamp(1.2rem, 4vw, 2.8rem);
    letter-spacing: 0.16em;
  }

  .hero,
  .admin-users-main,
  .workspace-grid,
  .controls-grid,
  .hero-summary-grid {
    grid-template-columns: 1fr;
  }

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

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

  .summary-card--votes,
  .summary-card--counts,
  .summary-card--margins {
    grid-column: auto;
    grid-row: auto;
  }

  .section-banner {
    align-items: flex-start;
  }

  .detail-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .admin-users-create-panel {
    position: static;
    top: auto;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 0.85rem, 1320px);
    padding-top: 0.85rem;
  }

  .page-shell::before {
    inset: 2.1rem 0 auto;
    white-space: normal;
    line-height: 1.2;
    padding: 0 0.5rem;
  }

  .site-masthead__identity,
  .topbar,
  .search-toolbar,
  .menu-drawer__header,
  .user-create-form,
  .admin-user-card__fields,
  .admin-action-grid,
  .hot-faceoff,
  .hot-metrics,
  .detail-grid,
  .candidate-grid,
  .fact-grid,
  .update-grid,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .summary-vote-row,
  .summary-margin-row,
  .summary-count-row {
    grid-template-columns: 1fr;
  }

  .summary-vote-row__value,
  .summary-margin-row__value,
  .summary-count-row__value {
    justify-self: start;
  }

  .site-masthead__identity,
  .topbar,
  .menu-drawer__header {
    display: grid;
  }

  .admin-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .site-masthead__authority {
    width: 100%;
    justify-content: flex-start;
  }

  .notice-strip {
    grid-template-columns: 1fr;
  }

  .hero-highlights,
  .map-meta {
    grid-template-columns: 1fr;
  }

  .topbar {
    top: 0.35rem;
    padding: 0.72rem 0.78rem;
  }

  .menu-drawer {
    top: 4rem;
  }

  .menu-drawer__actions {
    width: 100%;
  }

  .menu-drawer__actions .link-button,
  .menu-drawer__actions button,
  .admin-action-grid .link-button,
  .detail-actions .link-button,
  .detail-actions .table-action {
    width: 100%;
  }

  .detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-search-toolbar {
    grid-template-columns: 1fr;
  }

  .hero-search-copy {
    align-items: flex-start;
  }

  .panel-heading {
    gap: 0.45rem;
  }

  .hot-bar-row__header {
    display: grid;
  }

  .hot-bar-row__value {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .hero-copy,
  .hero-note,
  .controls-panel,
  .list-panel,
  .detail-panel,
  .stat-card,
  .section-banner,
  .menu-drawer__card,
  .site-masthead {
    padding: 0.95rem;
    border-radius: 18px;
  }

  .hero-search-shell {
    padding: 0.72rem;
    border-radius: 16px;
  }

  .site-masthead__band {
    margin: -0.95rem -0.95rem 0.8rem;
  }

  .hero-title,
  .site-title,
  .auth-title {
    max-width: none;
  }

  .search-toolbar,
  .stats-grid,
  .hero-highlights {
    grid-template-columns: 1fr;
  }

  .topbar-brand,
  .topbar-actions {
    width: 100%;
  }

  .topbar-actions {
    display: flex;
    justify-content: flex-end;
  }

  .topbar-brand strong {
    font-size: 1rem;
  }

  .menu-drawer {
    top: 4.1rem;
  }

  .menu-drawer__card {
    padding-bottom: 1rem;
  }

  .admin-user-panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .summary-card {
    padding: 0.9rem;
  }

  .summary-hover-card {
    left: 0.55rem;
    width: min(220px, calc(100vw - 1.6rem));
  }

  .hot-spotlight {
    margin-left: 0;
  }

  .hot-spotlight__panel {
    left: 0;
    right: auto;
    width: min(320px, calc(100vw - 3rem));
  }

  .hot-spotlight__panel::before {
    left: 1.05rem;
    right: auto;
  }

  .search-category-select {
    width: 100%;
  }

  .section-banner {
    gap: 0.55rem;
  }

  .panel-heading h2,
  .panel-heading h3,
  .section-banner h2 {
    font-size: 1.1rem;
  }

  .stat-card strong {
    font-size: 1.28rem;
  }

  .detail-card {
    padding: 0.82rem;
    border-radius: 16px;
  }

  .detail-title strong {
    font-size: 1.18rem;
  }

  .badge-row,
  .chip-row {
    gap: 0.4rem;
  }

  .badge,
  .chip {
    min-height: 1.9rem;
  }

  .link-button,
  .table-action,
  .pagination-link {
    min-height: 2.75rem;
  }

  .site-credit {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 760px) {
  .hero-copy,
  .hero-summary,
  .hero-summary__content,
  .detail-panel,
  .detail-content,
  .detail-card {
    overflow: visible;
  }

  .table-wrapper {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .summary-vote-row__meta {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
  }

  .summary-hover-card {
    display: none !important;
  }

  table {
    display: block;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 0.72rem;
  }

  tbody tr {
    display: grid;
    gap: 0.7rem;
    padding: 0.88rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 244, 235, 0.98));
    box-shadow: var(--shadow);
  }

  tbody tr:nth-child(even) td,
  tbody tr:hover td,
  tbody tr.selected td {
    background: transparent;
  }

  tbody tr.selected {
    border-color: rgba(31, 75, 117, 0.35);
    box-shadow: 0 18px 36px rgba(18, 50, 83, 0.14);
  }

  tbody td {
    display: grid;
    grid-template-columns: minmax(88px, 108px) minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    padding: 0;
    border-bottom: 0;
  }

  tbody td::before {
    content: attr(data-label);
    display: block;
    padding-top: 0.18rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
  }

  .results-col--booth {
    width: auto;
  }

  .results-col--booth strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.1rem;
    padding: 0.24rem 0.7rem;
    border-radius: 999px;
    background: rgba(31, 75, 117, 0.08);
    color: var(--navy-deep);
  }

  .results-col--name,
  .results-col--voter,
  .results-col--status {
    width: auto;
  }

  .table-primary {
    font-size: 1rem;
    line-height: 1.35;
  }

  .cell-ref {
    font-size: 0.82rem;
  }

  .table-status {
    gap: 0.42rem;
  }

  .table-status .badge {
    min-height: 1.8rem;
    padding: 0.24rem 0.55rem;
    font-size: 0.74rem;
  }

  .detail-title__row {
    align-items: start;
  }

  .hot-spotlight {
    width: 100%;
    margin-left: 0;
  }

  .hot-sticker {
    min-height: 2rem;
  }

  .hot-spotlight__panel {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 0.7rem;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: 0 18px 34px rgba(18, 50, 83, 0.14);
    display: none;
  }

  .hot-spotlight__panel::before {
    display: none;
  }

  .hot-spotlight[open] .hot-spotlight__panel,
  .hot-spotlight:hover .hot-spotlight__panel,
  .hot-spotlight:focus-within .hot-spotlight__panel {
    display: grid;
  }

  .hot-spotlight:not([open]) .hot-spotlight__panel {
    display: none;
  }
}
