:root {
  --bg-1: #f4f8f8;
  --bg-2: #dcebec;
  --ink: #112127;
  --ink-soft: #3d555c;
  --accent: #0f8f87;
  --accent-dark: #0a5e58;
  --danger: #c1482f;
  --line: #c9d9db;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(15, 143, 135, 0.16), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(17, 33, 39, 0.10), transparent 45%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
  color: var(--ink-soft);
}

.shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(17, 33, 39, 0.08);
  backdrop-filter: blur(8px);
  background: rgba(244, 248, 248, 0.75);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 16px;
}

.brand {
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

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

.voter-identity {
  background: rgba(15, 143, 135, 0.12);
  border: 1px solid rgba(15, 143, 135, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink);
  font-weight: 600;
}

.voter-identity .church {
  color: var(--ink-soft);
  font-weight: 500;
}

.menu a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: 180ms ease;
}

.menu a:hover {
  background: rgba(15, 143, 135, 0.12);
  color: var(--ink);
}

.page-body {
  padding: 38px 0 60px;
}

.hero,
.page-header {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.page-header.compact {
  margin-bottom: 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: var(--accent-dark);
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 24px rgba(17, 33, 39, 0.04);
}

.mobile-priority {
  border-radius: 24px;
}

.stack {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

textarea {
  resize: vertical;
}

.btn {
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.option {
  width: 100%;
  background: #eef7f7;
  color: var(--ink);
  border: 1px solid #c5dfdf;
}

.btn.btn-sm {
  padding: 7px 10px;
  font-size: 0.9rem;
}

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

.table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.history-table th,
.history-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
}

.history-table th {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
}

.result-head {
  display: grid;
  gap: 4px;
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.result-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfefe;
}

.total {
  color: var(--ink);
  font-weight: 600;
}

.ok {
  color: var(--accent-dark);
  font-weight: 600;
}

.alert {
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid;
}

.alert.success {
  color: #0c5548;
  background: #e6f8f2;
  border-color: #9bdcc5;
}

.alert.error {
  color: #742716;
  background: #ffece8;
  border-color: #f2b0a3;
}

.mt-3 {
  margin-top: 14px;
}

.footer {
  border-top: 1px solid rgba(17, 33, 39, 0.08);
  padding: 16px 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .three-columns,
  .two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(1120px, 94vw);
  }

  .topbar-inner {
    min-height: 62px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 0;
  }

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

  .page-body {
    padding-top: 22px;
  }

  .card.mobile-priority {
    padding: 16px;
    box-shadow: 0 8px 18px rgba(17, 33, 39, 0.06);
  }
}