:root {
  --ink: #231a22;
  --muted: #735e6b;
  --paper: #fffaf7;
  --line: #ead7df;
  --navy: #2d3148;
  --rose: #d85f8f;
  --gold: #b98a3a;
  --mint: #f8e7ef;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(23, 33, 47, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 247, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
}

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

.brand small,
.stat-label,
.fine-print,
.eyebrow {
  color: var(--muted);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: min(30vw, 560px, calc(100vh - 68px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #222741, var(--navy));
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  inset: 0 0 0 auto;
  width: 60%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  background: linear-gradient(90deg, #222741 36%, rgba(34, 39, 65, 0) 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(560px, 42%);
  padding: 48px clamp(22px, 4vw, 64px);
  color: var(--white);
}

.hero-content h1 {
  font-size: clamp(2.2rem, 3.6vw, 4rem);
}

.hero-content p:not(.eyebrow) {
  font-size: 1.05rem;
}

.hero-content .eyebrow {
  color: #f2d18f;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: 1.35rem;
}

.hero-content p:not(.eyebrow) {
  max-width: 600px;
  font-size: 1.15rem;
}

.eyebrow {
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: var(--white);
  background: #cf4f84;
}

.button.secondary {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.button.ghost {
  color: #b93f73;
  background: transparent;
  border-color: var(--line);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.countdown-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 24px;
  align-items: center;
  padding: 32px clamp(18px, 6vw, 78px);
  color: var(--white);
  background: var(--rose);
}

.countdown-band .eyebrow {
  color: #ffe6ed;
}

.countdown-band h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.countdown-grid div {
  min-height: 96px;
  padding: 14px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.countdown-grid strong,
.countdown-grid span {
  display: block;
}

.countdown-grid strong {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1;
}

.countdown-grid span {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mission-band {
  display: grid;
  grid-template-columns: 92px minmax(0, 900px);
  gap: 24px;
  align-items: center;
  padding: 28px clamp(18px, 6vw, 78px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.mission-band img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.mission-band p {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 700;
}

.stats-band > div {
  padding: 24px clamp(18px, 4vw, 56px);
  background: var(--white);
}

.stats-band strong {
  display: block;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.section,
.sponsor-section,
.admin-band {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.contestant-grid,
.level-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.contestant-card,
.level-card {
  min-height: 100%;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 47, 0.06);
}

.contestant-card {
  display: grid;
  gap: 14px;
}

.avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--white);
  background: var(--navy);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 800;
}

.progress {
  overflow: hidden;
  height: 9px;
  background: #ece7dd;
  border-radius: 999px;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--rose);
}

.sponsor-section {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.sponsor-panel,
.receipt-panel,
.admin-band {
  padding: clamp(20px, 4vw, 34px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

textarea {
  resize: vertical;
}

fieldset {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

legend {
  padding: 0 8px;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 800;
}

.payment-choice {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 6px;
  background: #f9e8f0;
  border-radius: 8px;
}

.choice {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.choice.active {
  background: var(--white);
  box-shadow: 0 3px 12px rgba(23, 33, 47, 0.12);
}

.summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-total strong {
  font-size: 2rem;
}

.level-card ul {
  padding-left: 18px;
  margin-bottom: 0;
  color: var(--muted);
}

.level-card strong {
  display: block;
  margin-bottom: 8px;
  color: #c2467b;
  font-size: 1.8rem;
}

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

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.impact-grid > div {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.impact-grid strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--navy);
}

.sponsor-item {
  padding: 16px;
  background: var(--mint);
  border-radius: 8px;
}

.admin-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 72px;
  background: #f7f3ec;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: var(--navy);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-page {
  background: #f5f0e7;
}

.admin-shell {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
  padding: 52px 0 80px;
}

.admin-login,
.admin-editor {
  padding: clamp(22px, 5vw, 42px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-login {
  max-width: 660px;
}

.admin-login h1,
.admin-editor h1 {
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.admin-form {
  display: grid;
  gap: 22px;
}

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

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

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: #fbf8f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-list-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  background: #fbf8f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-item textarea,
.admin-item .button {
  grid-column: 1 / -1;
}

.admin-item.compact .button {
  grid-column: auto;
  align-self: end;
}

.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(35, 26, 34, 0.55);
}

.modal-backdrop.hidden {
  display: none;
}

.modal-panel {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: clamp(20px, 4vw, 32px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-form,
.modal-actions {
  display: grid;
  gap: 16px;
}

.modal-actions {
  grid-template-columns: repeat(2, max-content);
}

.button.danger {
  color: #a21f4f;
  border-color: #efb6ca;
}

.category-block {
  margin-top: 38px;
}

.category-block:first-of-type {
  margin-top: 0;
}

.category-title {
  margin-bottom: 16px;
  color: var(--navy);
  font-size: 1.45rem;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.photo-wrap {
  position: relative;
  margin: -18px -18px 0;
}

.candidate-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid var(--line);
}

.photo-wrap .leader-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  box-shadow: 0 4px 14px rgba(23, 33, 47, 0.25);
}

.stats-band.no-goal {
  grid-template-columns: repeat(2, 1fr);
}

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

.checkbox-row input {
  width: 20px;
  min-height: 20px;
  height: 20px;
}

.photo-preview {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.avatar-photo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.leader-badge {
  padding: 5px 10px;
  color: #7a5714;
  background: #fbedcd;
  border: 1px solid #ecd9a6;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.vote-count {
  margin: 0;
  color: #c2467b;
  font-size: 1.15rem;
  font-weight: 800;
}

.vote-quick {
  grid-template-columns: repeat(4, 1fr);
}

.how-grid strong {
  font-size: 1.8rem;
}

@media (max-width: 1150px) {
  .hero {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-image {
    position: static;
    width: 100%;
    height: min(50vw, 380px);
  }

  .hero-overlay {
    display: none;
  }

  .hero-content {
    width: 100%;
    padding: 36px 22px 52px;
  }
}

@media (max-width: 920px) {
  .site-header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .stats-band,
  .countdown-band,
  .mission-band,
  .sponsor-section,
  .admin-band,
  .impact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .hero-content {
    padding: 32px 22px 46px;
  }

  .stats-band,
  .countdown-grid,
  .contestant-grid,
  .level-grid,
  .sponsor-list,
  .payment-choice,
  .admin-item {
    grid-template-columns: 1fr;
  }

  .admin-list-item,
  .modal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .list-actions,
  .modal-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .vote-quick {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-band.no-goal {
    grid-template-columns: 1fr;
  }
}
