:root {
  color-scheme: light;
  --bg-top: #edeff2;
  --bg-bottom: #d9dde2;
  --surface: #ffffff;
  --surface-border: #d2d7dd;
  --text-main: #1e2833;
  --text-muted: #616d78;
  --accent: #18365c;
  --accent-soft: #e8eef5;
  --accent-deep: #0f2440;
  --accent-red: #8f3d46;
  --bar-bg: #d8dee6;
  --hero-bg: linear-gradient(145deg, rgba(24, 54, 92, 0.08), rgba(143, 61, 70, 0.08));
  --shadow: 0 24px 60px rgba(24, 45, 64, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Palatino Linotype", Georgia, serif;
  color: var(--text-main);
  background:
    linear-gradient(180deg, rgba(8, 16, 30, 0.28), rgba(8, 16, 30, 0.18)),
    radial-gradient(circle at top left, rgba(24, 54, 92, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(143, 61, 70, 0.18), transparent 28%),
    url("img/movoters-background-v2.png") top center / cover no-repeat fixed;
}

body.body-home {
  background:
    radial-gradient(circle at top left, rgba(24, 54, 92, 0.08), transparent 28%),
    linear-gradient(180deg, #f9fbfd, #eef3f8 58%, #f9fbfd);
}

.page-shell {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 30px 18px 56px;
}

.page-shell-home {
  width: min(100%, 1560px);
  padding: 20px 28px 56px;
}

.page-shell-admin {
  width: min(92vw, 1720px);
  padding-top: 16px;
}

.page-shell-login {
  width: min(100%, 720px);
}

.site-header {
  padding: 22px 4px 34px;
}

.site-header-home {
  padding: 0 0 24px;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.brand-logo {
  width: clamp(320px, 42vw, 520px);
  height: auto;
  display: block;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-red);
}

h1,
h2,
h3,
legend {
  margin: 0;
  font-weight: 600;
}

h1 {
  max-width: 18ch;
  font-size: clamp(2.2rem, 5.4vw, 3.45rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

h3 {
  font-size: 1.18rem;
}

.subtitle {
  margin: 0;
  max-width: 32ch;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.brand-divider {
  width: min(240px, 42vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24, 54, 92, 0.35), transparent);
}

.content-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 26px 72px rgba(5, 15, 31, 0.3);
  backdrop-filter: blur(10px);
}

.content-card-home {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.content-card-admin {
  padding: 0;
  overflow: hidden;
}

.page-shell-admin .site-header {
  padding: 8px 4px 16px;
}

.page-shell-admin .brand-lockup {
  gap: 10px;
}

.page-shell-admin .brand-divider {
  margin-top: 2px;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  border-radius: 20px;
  border: 1px solid rgba(213, 220, 230, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(15, 36, 64, 0.08);
}

.brand-logo-homebar {
  width: clamp(340px, 30vw, 470px);
}

.home-header-login {
  min-width: 136px;
  text-decoration: none;
  justify-content: center;
}

.content-card-login {
  padding: 42px;
}

.stack > * + * {
  margin-top: 22px;
}

.hero-panel {
  padding: 34px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(233, 239, 245, 0.78));
  border: 1px solid rgba(24, 54, 92, 0.14);
}

.hero-panel p {
  margin: 0;
  line-height: 1.8;
}

.home-stack {
  gap: 22px;
}

.home-page-shell {
  gap: 22px;
}

.home-hero {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 34px 36px;
  border-radius: 28px;
  border: 1px solid rgba(213, 221, 231, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.96));
  box-shadow: 0 20px 42px rgba(14, 31, 53, 0.08);
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  left: 8%;
  top: 4%;
  width: 42%;
  height: 92%;
  background: url("img/missouri-transparent-watermark.png") center left / contain no-repeat;
  opacity: 0.05;
  pointer-events: none;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 84%, rgba(24, 54, 92, 0.035), transparent 24%);
  pointer-events: none;
}

.home-kicker {
  margin: 0;
  color: var(--accent-red);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-hero p {
  margin: 0;
  max-width: 40ch;
  line-height: 1.72;
}

.home-hero-split {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(360px, 0.78fr) minmax(700px, 1.22fr);
  align-items: center;
  gap: 38px;
}

.home-hero-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 10px 0;
}

.home-hero-copy h2 {
  font-size: clamp(3.1rem, 5vw, 5rem);
  line-height: 0.88;
  color: var(--accent-deep);
}

.home-hero-summary {
  max-width: 34ch;
  font-size: 1.11rem;
  color: var(--text-muted);
}

.home-identity-line {
  display: flex;
  justify-content: center;
  padding: 2px 12px 0;
}

.home-identity-line p {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
}

.home-identity-line span {
  color: var(--accent-red);
  padding: 0 0.55rem;
}

.home-hero-visual {
  margin: 0;
  align-self: stretch;
  min-height: 100%;
  padding: 0;
  border-radius: 24px;
  border: 1px solid rgba(205, 214, 225, 0.92);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 31, 52, 0.12);
}

.home-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-value-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.home-value-card > div:last-child {
  display: grid;
  gap: 6px;
}

.home-value-icon {
  position: relative;
  flex: 0 0 auto;
}

.home-value-icon::before,
.home-value-icon::after {
  content: "";
  position: absolute;
}

.home-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-value-card {
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid rgba(214, 222, 232, 0.86);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.96), rgba(245, 248, 252, 0.92));
  box-shadow: 0 12px 28px rgba(10, 23, 42, 0.08);
}

.home-value-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 54, 92, 0.08), rgba(143, 61, 70, 0.08));
  border: 1px solid rgba(205, 214, 225, 0.96);
}

.home-value-icon-integrity::before {
  inset: 12px;
  border: 2px solid var(--accent);
  border-radius: 11px;
}

.home-value-icon-integrity::after {
  width: 18px;
  height: 2px;
  background: var(--accent-red);
  left: 17px;
  top: 25px;
  box-shadow: 0 -7px 0 rgba(24, 54, 92, 0.46), 0 7px 0 rgba(24, 54, 92, 0.46);
}

.home-value-icon-ballot::before {
  width: 24px;
  height: 28px;
  border: 2px solid rgba(24, 54, 92, 0.34);
  border-radius: 8px;
  left: 13px;
  top: 12px;
}

.home-value-icon-ballot::after {
  width: 18px;
  height: 10px;
  border-left: 4px solid var(--accent-red);
  border-bottom: 4px solid var(--accent-red);
  transform: rotate(-45deg);
  left: 18px;
  top: 18px;
}

.home-value-icon-civic::before {
  width: 24px;
  height: 20px;
  border: 2px solid var(--accent);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  left: 13px;
  top: 17px;
}

.home-value-icon-civic::after {
  width: 30px;
  height: 2px;
  background: var(--accent-red);
  left: 11px;
  top: 15px;
  box-shadow: 0 8px 0 rgba(24, 54, 92, 0.34);
}

.home-value-icon-missouri::before {
  width: 27px;
  height: 34px;
  background: linear-gradient(180deg, var(--accent), #274c7a);
  clip-path: polygon(22% 0, 88% 0, 86% 16%, 100% 22%, 84% 40%, 88% 62%, 72% 82%, 48% 100%, 16% 88%, 0 58%, 10% 38%, 4% 16%);
  left: 13px;
  top: 9px;
}

.home-value-icon-missouri::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  left: 25px;
  top: 20px;
}

.home-value-card h3,
.home-disclosure-panel h3 {
  font-size: 1.05rem;
}

.home-value-card p,
.home-disclosure-panel p,
.home-footer-summary p {
  margin: 0;
  line-height: 1.65;
}

.home-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.home-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 251, 0.92));
  box-shadow: 0 10px 24px rgba(15, 36, 64, 0.06);
}

.home-card p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.home-note {
  border-style: dashed;
}

.compliance-page {
  gap: 20px;
}

.compliance-hero {
  text-align: center;
}

.compliance-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin: 0;
}

.compliance-card {
  padding: 26px;
}

.compliance-card p {
  margin: 10px 0 0;
  line-height: 1.72;
}

.home-media-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.home-media-card {
  margin: 0;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(24, 54, 92, 0.16);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(233, 239, 245, 0.94));
  box-shadow: 0 16px 34px rgba(15, 36, 64, 0.08);
}

.home-media-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.home-card-spotlight {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(236, 243, 249, 0.94));
}

.compliance-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.home-disclosure-panel {
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid rgba(213, 220, 230, 0.9);
  background: linear-gradient(180deg, rgba(249, 251, 253, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 24px rgba(15, 36, 64, 0.05);
}

.home-disclosure-panel p {
  color: var(--text-muted);
}

.home-footer {
  display: grid;
  gap: 6px;
  padding: 0 4px;
  text-align: center;
}

.home-footer-brand {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent-deep);
}

.home-footer-copy {
  margin: 0;
  color: var(--text-muted);
}

.home-footer-built {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.95rem;
}

.home-footer-legal {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.survey-form,
.responses-list {
  display: grid;
  gap: 18px;
}

.survey-meta {
  display: grid;
  gap: 20px;
}

.page-counter {
  margin: 0 0 8px;
  color: var(--accent-red);
  font-size: 0.95rem;
  font-weight: 700;
}

.confidential-label {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.progress-track {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: var(--bar-bg);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(17, 56, 82, 0.1);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-red));
}

.survey-copy p {
  margin: 0;
  line-height: 1.8;
  font-size: 1.18rem;
}

.time-estimate {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-weight: 600;
}

.matrix-list {
  display: grid;
  gap: 18px;
}

label,
fieldset {
  display: grid;
  gap: 10px;
  font-size: 1.02rem;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #c8cfd7;
  padding: 15px 16px;
  font: inherit;
  color: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

fieldset {
  border: 1px solid #d2d7dd;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(250, 252, 254, 0.92), rgba(255, 255, 255, 0.98));
}

.inline-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-option input {
  width: auto;
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid #d3dde5;
  border-radius: 14px;
  background: #fdfefe;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.option-card input {
  width: auto;
  margin-top: 3px;
}

.option-card:hover {
  border-color: rgba(24, 54, 92, 0.38);
  box-shadow: 0 10px 24px rgba(24, 54, 92, 0.08);
  transform: translateY(-1px);
}

button {
  border: none;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  min-height: 62px;
  letter-spacing: 0.01em;
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(24, 54, 92, 0.16);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.btn {
  width: auto;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 11px;
  box-shadow: none;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(180deg, #f6f8fa, #e8edf2);
  color: #1f2f42;
  border: 1px solid #c8d2dd;
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #eef3f8, #dde7f0);
  box-shadow: none;
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(180deg, #a6454f, #7f2f38);
  color: #fff;
}

.btn-danger:hover {
  background: linear-gradient(180deg, #b34e59, #8a333d);
}

.btn[disabled],
.btn.is-busy,
button[disabled] {
  cursor: wait;
  opacity: 0.85;
  transform: none;
  box-shadow: none;
}

button:hover {
  background: linear-gradient(180deg, #274c7a, #162a45);
  box-shadow: 0 18px 34px rgba(24, 54, 92, 0.2);
  transform: translateY(-1px);
}

.center-copy {
  text-align: center;
}

.completion-copy {
  max-width: 44ch;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1.08rem;
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.secondary-link,
a {
  color: var(--accent);
}

.dashboard-grid {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.summary-grid-strong {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.summary-grid-results {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-card,
.dashboard-section,
.response-card,
.funnel-card {
  padding: 22px;
  border: 1px solid rgba(214, 222, 232, 0.88);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.94), rgba(255, 255, 255, 0.92));
  min-width: 0;
}

.summary-card-strong {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 18px 36px rgba(15, 36, 64, 0.08);
}

.summary-card-results {
  min-height: 112px;
  padding: 18px;
  box-shadow: 0 10px 22px rgba(15, 36, 64, 0.05);
}

.summary-card-value {
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--accent-deep);
}

.summary-card-label {
  margin-top: 8px;
  color: var(--text-muted);
}

.summary-card-label-strong {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}

.section-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.export-progress-note {
  margin: 0;
  color: var(--accent-red);
  font-size: 0.88rem;
  line-height: 1.5;
}

.report-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.report-grid-large {
  gap: 18px;
}

.report-card {
  box-shadow: 0 12px 28px rgba(24, 45, 64, 0.05);
  min-width: 0;
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-row {
  display: grid;
  gap: 10px;
}

.result-label-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.98rem;
}

.chart-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--bar-bg);
  overflow: hidden;
}

.chart-bar-large {
  height: 18px;
}

.chart-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-red));
}

.admin-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 720px;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px;
  border-right: 1px solid var(--surface-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(236, 242, 248, 0.78));
  backdrop-filter: blur(10px);
}

.admin-sidebar-title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: var(--accent-deep);
}

.admin-sidebar-note {
  margin: 0 0 14px;
  color: var(--text-muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 12px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.admin-nav-link.is-active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.admin-nav-link-quiet {
  margin-top: 12px;
  color: var(--accent-red);
}

.admin-main {
  padding: 18px 22px 22px;
  min-width: 0;
}

.admin-version-stamp {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(24, 54, 92, 0.12);
  color: var(--text-muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(245, 247, 250, 0.88), rgba(255, 255, 255, 0.98));
}

.filter-toolbar label {
  gap: 8px;
  font-size: 0.94rem;
}

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.filter-actions .secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.funnel-card-muted {
  background: linear-gradient(180deg, #f6f7f8, #ffffff);
}

.exports-panel p {
  margin: 0;
  line-height: 1.7;
}

.manual-token-form {
  display: grid;
  gap: 18px;
}

.data-tools-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.data-tools-result {
  border-color: rgba(24, 54, 92, 0.16);
}

.data-tools-result-error {
  border-color: rgba(143, 61, 70, 0.25);
  background: linear-gradient(180deg, rgba(143, 61, 70, 0.06), #ffffff);
}

.download-frame {
  width: 0;
  height: 0;
  border: 0;
  position: absolute;
}

.token-link-panel {
  gap: 18px;
}

.token-link-value {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(24, 54, 92, 0.14);
  background: var(--accent-soft);
  color: var(--accent-deep);
  overflow-wrap: anywhere;
}

.copy-link-button {
  width: auto;
  min-height: 48px;
  padding: 12px 18px;
}

.population-actions {
  align-items: center;
}

.population-panel {
  display: grid;
  gap: 14px;
}

.populations-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.population-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 30px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.status-badge.is-active {
  background: rgba(21, 112, 63, 0.12);
  color: #1b6c42;
  border: 1px solid rgba(21, 112, 63, 0.28);
}

.status-badge.is-archived {
  background: rgba(96, 111, 126, 0.12);
  color: #4a5d71;
  border: 1px solid rgba(96, 111, 126, 0.24);
}

.population-metrics-inline {
  margin: 0;
  font-size: 0.9rem;
  color: #3f4e5e;
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.population-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.population-metric-grid p {
  margin: 0;
  display: grid;
  gap: 2px;
  font-size: 0.9rem;
}

.population-metric-grid span {
  color: var(--accent-deep);
  font-weight: 700;
}

.population-panel-archived {
  background: linear-gradient(180deg, rgba(247, 249, 252, 0.98), rgba(255, 255, 255, 0.92));
}

.button-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.inline-details {
  margin: 0;
}

.inline-details summary {
  list-style: none;
}

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

.inline-details[open] summary {
  margin-bottom: 10px;
}

.create-population-details {
  width: auto;
}

.create-population-panel {
  width: min(100%, 460px);
}

.population-details-panel {
  width: min(100%, 880px);
  max-height: 300px;
  overflow: auto;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #d4dde8;
  background: #fafcff;
  display: grid;
  gap: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.settings-grid p {
  margin: 0;
  font-size: 0.9rem;
}

.details-actions {
  margin-top: 2px;
}

.compact-form {
  display: inline-block;
}

.compact-form button {
  width: auto;
  min-height: 44px;
  padding: 10px 14px;
}

.compact-form-block h4 {
  margin: 0;
}

.compact-three-col {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.manual-record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.record-add-details {
  display: grid;
  gap: 14px;
}

.record-add-details summary {
  list-style: none;
}

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

.record-add-details[open] summary {
  margin-bottom: 12px;
}

.compact-four-col {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.records-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #d8e1ec;
  border-radius: 12px;
}

.records-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 2000px;
}

.records-table th,
.records-table td {
  border-bottom: 1px solid #e1e6ed;
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
}

.builder-layout,
.poll-review-layout,
.results-sections-grid {
  display: grid;
  gap: 18px;
}

.poll-review-layout-compact {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: start;
}

.builder-create-card,
.results-toolbar-card,
.poll-review-card {
  box-shadow: 0 18px 40px rgba(13, 26, 45, 0.12);
}

.deployment-card-grid,
.results-card-grid,
.poll-review-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.deployment-card {
  display: grid;
  gap: 16px;
}

.deployment-card-qa {
  background: linear-gradient(180deg, rgba(247, 249, 252, 0.94), rgba(255, 255, 255, 0.92));
}

.deployment-details-panel,
.filter-chip-panel {
  max-height: none;
}

.deployment-actions .compact-form {
  display: inline-block;
}

.poll-review-selector {
  margin-bottom: 0;
}

.poll-review-header {
  margin-bottom: 18px;
}

.poll-selector-card {
  max-width: 520px;
}

.poll-edit-form {
  gap: 14px;
}

.poll-edit-actions {
  align-items: end;
}

.poll-review-accordion {
  display: grid;
  gap: 12px;
}

.poll-page-accordion {
  border: 1px solid rgba(214, 222, 232, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.poll-page-accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--accent-deep);
}

.poll-page-accordion summary::-webkit-details-marker {
  display: none;
}

.poll-page-accordion-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
}

.compact-choice-list {
  gap: 6px;
  font-size: 0.92rem;
}

.compact-review-stack {
  gap: 12px;
}

.compact-review-item {
  gap: 10px;
}

.review-page-card,
.review-item {
  display: grid;
  gap: 14px;
}

.review-item-stack {
  display: grid;
  gap: 16px;
}

.choice-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.results-toolbar {
  gap: 16px;
}

.results-deployment-field {
  max-width: 520px;
}

.results-deployment-field-wide {
  max-width: 640px;
}

.results-meta-card {
  padding: 16px 18px;
}

.results-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.results-meta-row p {
  margin: 0;
  font-size: 0.92rem;
}

.results-chip-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip-group {
  margin: 0;
}

.filter-chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d2dbe5;
  background: rgba(248, 250, 252, 0.96);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  width: auto;
}

.filter-chip-option:hover {
  border-color: rgba(24, 54, 92, 0.28);
  background: rgba(240, 244, 248, 0.98);
}

.filter-chip-option.is-selected {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  border-color: rgba(15, 36, 64, 0.6);
}

.results-filter-actions {
  justify-content: flex-end;
}

.results-compact-card {
  padding: 18px;
}

.results-empty-state {
  text-align: center;
  font-size: 1.1rem;
}

.compact-result-list {
  gap: 10px;
}

.results-table-compact {
  min-width: 1100px;
}

.records-table th {
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: #f6f9fc;
  z-index: 2;
}

.records-table td {
  white-space: nowrap;
}

.table-actions {
  display: grid;
  gap: 8px;
}

.table-actions button {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
}

.records-pagination {
  justify-content: flex-end;
  align-items: center;
  margin-top: 12px;
}

.home-stack {
  gap: 22px;
}

.compliance-page .home-card {
  padding: 28px;
}

.compliance-page p,
.compliance-page li {
  font-size: 1rem;
}

.compliance-page .home-hero {
  padding: 34px;
}

.raw-json-box {
  border: 1px solid #d7dee7;
  border-radius: 14px;
  background: #f8fbfe;
  padding: 14px;
}

.raw-json-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.login-shell,
.login-card {
  display: grid;
  gap: 22px;
}

.login-error {
  padding: 14px 16px;
  border-radius: 14px;
}

.login-error {
  background: rgba(143, 61, 70, 0.12);
  color: #6f2730;
}

dl {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr;
  gap: 8px 12px;
}

dt {
  color: var(--text-muted);
}

dd {
  margin: 0;
}

@media (max-width: 960px) {
  .page-shell-admin {
    width: 100%;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar,
  .admin-main {
    padding: 20px;
  }

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

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

  .compact-three-col,
  .summary-grid-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-sections-grid,
  .poll-review-layout,
  .poll-review-layout-compact {
    grid-template-columns: 1fr;
  }

  .home-hero-split,
  .home-trust-strip,
  .home-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-hero-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .content-card {
    padding: 22px;
    border-radius: 22px;
  }

  .content-card-admin {
    padding: 0;
  }

  .page-shell {
    padding: 20px 14px 40px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-logo {
    width: min(76vw, 360px);
  }

  .brand-logo-homebar {
    width: min(66vw, 300px);
  }

  .home-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-divider {
    width: min(220px, 62vw);
  }

  h1 {
    max-width: none;
  }

  .admin-heading,
  .admin-actions,
  .section-header,
  .result-label-row,
  .filter-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .compact-four-col {
    grid-template-columns: 1fr;
  }

  .compact-three-col,
  .summary-grid-results,
  .population-metric-grid {
    grid-template-columns: 1fr;
  }

  .home-footer-nav {
    flex-direction: column;
    align-items: center;
  }

  .home-hero-split,
  .home-trust-strip,
  .home-footer-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-copy h2 {
    font-size: clamp(2.25rem, 10vw, 3.2rem);
  }

  .home-hero-visual img {
    min-height: 260px;
  }

  dl {
    grid-template-columns: 1fr;
  }
}
