@font-face {
  font-family: "Dunbar Low";
  font-style: normal;
  font-weight: 300 950;
  font-display: swap;
  src:
    local("Dunbar Low"),
    local("Dunbar Low Regular");
}

:root {
  color-scheme: light;
  --ink: #16181d;
  --muted: #667085;
  --line: #d9dee8;
  --panel: #ffffff;
  --canvas: #e5332a;
  --accent: #e5332a;
  --accent-strong: #c82018;
  --accent-soft: #fff1ef;
  --gold: #f8b133;
  --danger: #b42318;
  --danger-bg: #fee4e2;
  --notice-bg: #e8f6ef;
  --notice: #027a48;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-dunbar: "dunbar-low", "Dunbar Low", var(--font-ui);
  font-family: var(--font-ui);
}

body.public {
  font-family: var(--font-dunbar);
}

body.admin {
  font-family: var(--font-ui);
}

body.modal-open {
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(180deg, #e5332a 0%, #d9372f 100%);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: #e5332a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

body.public .topbar {
  border-bottom: 0;
  display: grid;
  justify-content: stretch;
  min-height: 64px;
  padding: 0;
  place-items: center;
}

.brand {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  display: block;
  height: 48px;
  width: auto;
}

body.public .brand img {
  height: 48px;
}

body.public .brand {
  justify-content: center;
  width: 100%;
}

.navlinks {
  align-items: center;
  display: flex;
  gap: 14px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 650;
}

.admin-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-link {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
}

.tab-link.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #c82018;
}

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

.nav-actions a {
  color: #ffffff;
  font-weight: 700;
}

.navlinks form {
  margin: 0;
}

main {
  padding: 22px 24px 34px;
}

.vote-shell {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(300px, 1260px);
  justify-content: center;
  min-height: calc(100vh - 108px);
}

.vote-shell.compact {
  grid-template-columns: minmax(180px, 280px) minmax(300px, 460px);
}

.status-shell {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: calc(100vh - 150px);
}

.cover-shell {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: calc(100vh - 150px);
  text-align: center;
}

.cover-copy {
  display: grid;
  gap: 28px;
  justify-items: center;
  max-width: 660px;
  padding: 24px;
}

.cover-copy h1 {
  color: var(--gold);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 950;
  line-height: 0.98;
  margin: 0;
  text-transform: uppercase;
}

.cover-copy p {
  color: #ffffff;
  font-size: clamp(26px, 3.1vw, 40px);
  font-weight: 950;
  line-height: 0.98;
  margin: 0;
  text-transform: uppercase;
}

.cover-socials {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  margin-top: 10px;
  width: min(100%, 560px);
}

.cover-social-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.18);
  color: #ffffff;
  display: inline-flex;
  font-family: var(--font-ui);
  gap: 14px;
  justify-content: flex-start;
  min-height: 78px;
  padding: 10px 16px;
  text-transform: none;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.cover-social-icon {
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.cover-social-icon::before {
  background: currentColor;
  content: "";
  display: block;
  height: 24px;
  width: 24px;
  -webkit-mask: var(--brand-logo) center/contain no-repeat;
  mask: var(--brand-logo) center/contain no-repeat;
}

.youtube-logo {
  --brand-logo: url("/assets/youtube-logo.svg");
  color: #ff0000;
}

.instagram-logo {
  --brand-logo: url("/assets/instagram-logo.svg");
  color: #e1306c;
}

.cover-social-text {
  display: grid;
  gap: 3px;
  line-height: 1.05;
  text-align: left;
}

.cover-social-text strong {
  font-size: 27px;
  font-weight: 950;
  letter-spacing: 0;
}

.cover-social-text small {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.9;
}

.cover-social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  transform: translateY(-2px);
}

.vote-visual {
  aspect-ratio: 1;
  background:
    linear-gradient(145deg, rgba(248, 177, 51, 0.98), rgba(255, 223, 128, 0.82)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 34%);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.18);
  display: grid;
  place-items: center;
  position: relative;
}

.ballot-mark,
.checkmark {
  background: #ffffff;
  border-radius: 18px;
  height: 58%;
  position: relative;
  width: 50%;
}

.ballot-mark::before {
  border: solid var(--accent);
  border-width: 0 9px 9px 0;
  content: "";
  height: 58px;
  left: 50%;
  position: absolute;
  top: 45%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 28px;
}

.ballot-lines {
  bottom: 17%;
  display: grid;
  gap: 12px;
  left: 18%;
  position: absolute;
  right: 18%;
}

.ballot-lines span {
  background: rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  display: block;
  height: 8px;
}

.checkmark {
  background: transparent;
}

.checkmark::before {
  border: solid #ffffff;
  border-width: 0 16px 16px 0;
  content: "";
  height: 118px;
  left: 50%;
  position: absolute;
  top: 45%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 56px;
}

.vote-panel,
.auth-panel,
.panel,
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
}

.vote-panel,
.auth-panel {
  padding: 34px;
}

.vote-panel {
  width: 100%;
}

.vote-panel-public {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 8px 0;
}

.vote-panel-public h1 {
  color: #ffffff;
  font-size: clamp(30px, 4.2vw, 48px);
  margin-bottom: 18px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

.voted-panel {
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(42px, 6vw, 74px);
  text-align: center;
}

.status-mark {
  background: var(--gold);
  border-radius: 50%;
  height: clamp(86px, 8vw, 118px);
  margin: 0 auto clamp(26px, 3vw, 34px);
  position: relative;
  width: clamp(86px, 8vw, 118px);
}

.status-mark::before {
  border: solid #ffffff;
  border-width: 0 12px 12px 0;
  content: "";
  height: 52px;
  left: 50%;
  position: absolute;
  top: 45%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 26px;
}

.voted-panel h1 {
  font-size: clamp(42px, 5.1vw, 72px);
  line-height: 0.95;
  margin: 0 auto 24px;
  max-width: 900px;
  text-wrap: balance;
}

.voted-panel .muted {
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.22;
  margin: 0 auto;
  max-width: 720px;
  text-wrap: balance;
}

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

h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1;
  margin-bottom: 28px;
}

h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.muted,
.page-heading p {
  color: var(--muted);
}

.choices,
.candidate-list,
.form-stack {
  display: grid;
  gap: 14px;
}

.candidate-list {
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.captcha-panel {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 104px;
  padding: 18px;
}

.choice {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
}

.choice:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.choice input {
  accent-color: var(--accent);
  height: 20px;
  width: 20px;
}

.candidate-row {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.16)),
    rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 18px 44px rgba(109, 19, 14, 0.22);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
  position: relative;
}

.candidate-row::before {
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 42%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.candidate-row:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18)),
    rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.64);
}

.candidate-photo-button {
  background: transparent;
  border: 0;
  cursor: zoom-in;
  display: block;
  overflow: hidden;
  padding: 0;
  position: relative;
  z-index: 1;
}

.candidate-photo-button img {
  aspect-ratio: 1;
  background: #f2f4f7;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(109, 19, 14, 0.18);
  display: block;
  height: auto;
  image-rendering: auto;
  object-fit: cover;
  object-position: center;
  position: relative;
  transition: filter 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.candidate-photo-button:hover img {
  box-shadow: 0 12px 28px rgba(109, 19, 14, 0.22);
  filter: saturate(1.04) contrast(1.02);
}

.candidate-photo-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.candidate-info {
  align-items: center;
  align-self: center;
  display: grid;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.candidate-name {
  color: var(--ink);
  display: block;
  font-size: clamp(17px, 1.3vw, 20px);
  font-weight: 700;
  line-height: 1.15;
  min-width: 0;
  text-align: center;
}

.candidate-name-line {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.32em;
  justify-content: center;
}

.candidate-name-line span,
.candidate-name-line strong {
  display: inline;
}

.candidate-name > span:not(.candidate-name-line),
.candidate-name > strong {
  display: block;
}

.candidate-name strong {
  font-size: clamp(22px, 1.8vw, 29px);
}

.candidate-nickname {
  color: var(--gold);
  display: block;
  font-size: clamp(21px, 1.75vw, 30px);
  font-weight: 850;
  line-height: 0.96;
  margin: 2px 0 1px;
  text-shadow: 0 1px 0 rgba(22, 24, 29, 0.14);
}

.candidate-name-pair {
  display: block;
}

.candidate-name-pair .candidate-name-line > span:not(.candidate-nickname) {
  color: rgba(22, 24, 29, 0.72);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1;
}

.candidate-name-pair strong {
  font-size: clamp(18px, 1.55vw, 24px);
}

.primary,
.vote-button,
.ghost {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.vote-button {
  background: var(--gold);
  border: 1px solid var(--gold);
  box-shadow: 0 8px 18px rgba(109, 19, 14, 0.16);
  color: var(--ink);
  align-self: end;
  grid-column: 1;
  min-height: 42px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.vote-button:hover {
  background: #ffc24e;
}

.vote-modal {
  align-items: center;
  display: grid;
  inset: 0;
  justify-items: center;
  overflow: auto;
  padding: 20px;
  position: fixed;
  width: 100%;
  z-index: 20;
}

.vote-modal[hidden] {
  display: none;
}

.photo-preview {
  align-items: center;
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 20px;
  position: fixed;
  z-index: 22;
}

.photo-preview[hidden] {
  display: none;
}

.vote-modal-backdrop,
.photo-preview-backdrop {
  background: rgba(109, 19, 14, 0.52);
  inset: 0;
  position: absolute;
}

.photo-preview-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(109, 19, 14, 0.36);
  display: grid;
  gap: 12px;
  max-width: min(560px, calc(100vw - 40px));
  padding: 16px;
  position: relative;
  text-align: center;
  width: min(560px, 92vw);
  z-index: 1;
}

.photo-preview-card img {
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(109, 19, 14, 0.18);
  display: block;
  max-height: min(66vh, 620px);
  object-fit: cover;
  width: 100%;
}

.photo-preview-card strong {
  color: var(--ink);
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1;
  padding: 2px 48px 4px;
}

.photo-preview-close {
  right: 10px;
  top: 10px;
  z-index: 2;
}

.vote-modal-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(109, 19, 14, 0.34);
  display: grid;
  gap: 16px;
  max-height: calc(100dvh - 40px);
  max-width: 520px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  text-align: center;
  width: min(520px, calc(100vw - 40px));
  z-index: 1;
}

.vote-modal-card h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1;
  margin: 0 auto;
  max-width: calc(100% - 92px);
}

.vote-modal-card p {
  color: var(--muted);
  font-size: 17px;
  font-weight: 750;
  margin: 0;
}

.vote-modal-card strong {
  color: var(--ink);
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1;
}

.vote-modal-person {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.28em;
  justify-content: center;
}

.vote-modal-card .vote-modal-nickname {
  color: var(--gold) !important;
  font: inherit;
  text-shadow: 0 1px 0 rgba(22, 24, 29, 0.16);
}

.modal-warning {
  background: var(--accent-soft);
  border-radius: 8px;
  color: var(--danger) !important;
  padding: 12px;
}

.modal-close {
  align-items: center;
  background: #f2f4f7;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 28px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 40px;
}

.vote-modal-card .captcha-panel {
  background: #f8fafc;
  border-color: var(--line);
  display: grid;
  justify-items: center;
  min-height: 92px;
  overflow: hidden;
  padding: 10px;
  width: 100%;
}

.vote-modal-card .g-recaptcha {
  max-width: 100%;
  transform-origin: center top;
}

.vote-trap {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.modal-submit {
  margin-top: 0;
}

.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  margin-top: 22px;
  width: 100%;
}

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

.ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.auth-shell {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.auth-panel {
  max-width: 430px;
  width: min(100%, 430px);
}

label {
  color: #344054;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: -4px 0 0;
}

textarea {
  line-height: 1.45;
  resize: vertical;
}

.notice,
.error {
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 14px;
}

.notice {
  background: var(--notice-bg);
  color: var(--notice);
}

.error {
  background: var(--danger-bg);
  color: var(--danger);
}

.admin-grid {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 1040px;
}

.admin-grid.narrow {
  max-width: 760px;
}

.page-heading h1 {
  font-size: 42px;
  margin-bottom: 0;
}

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

.heading-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.page-heading p {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.live-badge {
  align-items: center;
  background: #ffffff;
  border: 2px solid #e5332a;
  border-radius: 999px;
  color: #b42318;
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px;
  position: relative;
  white-space: nowrap;
}

.live-badge::before {
  animation: livePulse 1s infinite;
  background: #e5332a;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(229, 51, 42, 0.58);
  content: "";
  display: block;
  height: 10px;
  width: 10px;
}

.live-badge.connected {
  background: #fff7ed;
  border-color: #f8b133;
}

.export-button {
  align-items: center;
  background: #fff7ed;
  border: 2px solid #f8b133;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(109, 19, 14, 0.16);
  color: #8a4f00;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  gap: 10px;
  justify-content: center;
  min-height: 48px;
  min-width: 150px;
  padding: 0 18px;
  white-space: nowrap;
}

.export-button span {
  background: var(--gold);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 10px;
  font-weight: 950;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-width: 42px;
  padding: 6px 8px;
}

.live-badge,
.export-button span {
  font-family: var(--font-dunbar);
}

.export-button:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 51, 42, 0.58);
  }

  70% {
    box-shadow: 0 0 0 9px rgba(229, 51, 42, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(229, 51, 42, 0);
  }
}

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

.stat {
  padding: 20px;
}

.stat span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat strong {
  font-size: 34px;
}

.panel {
  padding: 22px;
}

.mode-panel {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.mode-panel h2,
.mode-panel p {
  margin-bottom: 0;
}

.mode-panel form {
  margin: 0;
}

.settings-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.settings-head h2 {
  margin-bottom: 8px;
}

.settings-head p {
  margin-bottom: 0;
}

.toggle-row {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: row;
  gap: 10px;
  min-height: 46px;
}

.toggle-row input {
  accent-color: var(--accent);
  height: 20px;
  min-height: 0;
  width: 20px;
}

.compact-primary {
  margin-top: 0;
  min-width: 220px;
  width: auto;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.meter {
  background: #edf2f7;
  border-radius: 999px;
  height: 10px;
  min-width: 160px;
  overflow: hidden;
}

.meter span {
  background: var(--gold);
  display: block;
  height: 100%;
}

.person-cell {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 220px;
}

.person-cell img {
  border-radius: 6px;
  height: 54px;
  object-fit: cover;
  width: 54px;
}

.person-cell strong {
  display: inline;
}

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

.recent li {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 42px;
}

.recent time {
  color: var(--muted);
  font-size: 13px;
}

.empty {
  display: grid;
  min-height: 50vh;
  place-items: center;
}

.site-footer {
  align-items: center;
  color: rgba(255, 255, 255, 0.86);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 750;
  gap: 10px 18px;
  justify-content: center;
  padding: 0 24px 28px;
  text-align: center;
}

.site-footer a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.52);
  color: #ffffff;
}

.legal-shell {
  display: grid;
  justify-content: center;
}

.legal-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
  color: var(--ink);
  max-width: 980px;
  padding: clamp(28px, 5vw, 56px);
}

.legal-panel h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 0.98;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.legal-panel h2 {
  color: var(--accent);
  font-size: clamp(23px, 2.4vw, 32px);
  line-height: 1.05;
  margin: 34px 0 14px;
  text-transform: uppercase;
}

.legal-panel h3 {
  font-size: 20px;
  line-height: 1.18;
  margin: 24px 0 8px;
}

.legal-panel p,
.legal-panel li {
  color: #344054;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.62;
}

.legal-panel p {
  margin-bottom: 14px;
}

.legal-panel ul,
.legal-panel ol {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding-left: 22px;
}

@media (max-width: 1180px) {
  .candidate-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .candidate-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .navlinks {
    flex-wrap: wrap;
  }

  .admin-tabs {
    width: 100%;
  }

  .nav-actions {
    justify-content: flex-end;
    width: 100%;
  }

  main {
    padding: 24px 16px;
  }

  .vote-shell,
  .vote-shell.compact,
  .status-shell {
    gap: 22px;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .vote-visual {
    justify-self: center;
    max-width: 260px;
    width: 72vw;
  }

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

  .candidate-name {
    font-size: 18px;
  }

  .candidate-name strong {
    font-size: 23px;
  }

  .vote-panel,
  .voted-panel,
  .auth-panel,
  .panel {
    padding: 22px;
  }

  .vote-panel-public {
    padding: 0;
  }

  .voted-panel {
    padding: 36px 22px;
  }

  .status-mark {
    height: 88px;
    width: 88px;
  }

  .status-mark::before {
    border-width: 0 9px 9px 0;
    height: 38px;
    width: 19px;
  }

  h1,
  .page-heading h1 {
    font-size: 34px;
  }

  .heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .heading-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    width: 100%;
  }

  .voted-panel h1 {
    font-size: clamp(34px, 10vw, 42px);
    line-height: 0.98;
  }

  .voted-panel .muted {
    font-size: 19px;
    max-width: 440px;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .mode-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .cover-socials {
    grid-template-columns: 1fr;
    width: min(100%, 420px);
  }

  .cover-social-text strong {
    font-size: 24px;
  }

  .cover-social-link {
    min-height: 72px;
  }

  .toggle-row {
    justify-content: flex-start;
  }

  .compact-primary {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .vote-modal {
    padding: 12px;
  }

  .vote-modal-card {
    gap: 12px;
    max-height: calc(100dvh - 24px);
    padding: 22px 16px 18px;
    width: calc(100vw - 24px);
  }

  .vote-modal-card h2 {
    font-size: clamp(24px, 8vw, 30px);
    max-width: calc(100% - 56px);
  }

  .vote-modal-card p {
    font-size: 15px;
  }

  .vote-modal-card strong {
    font-size: clamp(27px, 10vw, 38px);
  }

  .modal-close {
    right: 10px;
    top: 10px;
  }

  .vote-modal-card .captcha-panel {
    padding: 8px 0;
  }

  .candidate-row {
    text-align: center;
  }

  .candidate-info {
    justify-content: center;
  }

  .candidate-name {
    text-align: center;
  }
}

@media (max-width: 360px) {
  .vote-modal-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .vote-modal-card .g-recaptcha {
    transform: scale(0.88);
  }

  .vote-modal-card .captcha-panel {
    margin-bottom: -8px;
    min-height: 82px;
  }

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

@media (max-width: 330px) {
  .vote-modal-card .g-recaptcha {
    transform: scale(0.82);
  }
}
