:root {
  --bg: #efe6d2;
  --paper: rgba(255, 250, 242, 0.92);
  --ink: #1f1a17;
  --muted: #5f554d;
  --line: rgba(31, 26, 23, 0.12);
  --accent: #0c4b36;
  --accent-strong: #0a3929;
  --accent-soft: #e2f0d5;
  --warm: #d78c2c;
  --danger: #8d2b18;
  --warning: #8b5e00;
  --success: #1f6a2f;
  --shadow: 0 24px 60px rgba(31, 26, 23, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(215, 140, 44, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(12, 75, 54, 0.16), transparent 24%),
    linear-gradient(180deg, #f5efe4 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-topbar {
  position: relative;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(12, 75, 54, 0.12);
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid rgba(12, 75, 54, 0.14);
  border-radius: 14px;
  background: #fffdf9;
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(12, 75, 54, 0.08);
  background: rgba(12, 75, 54, 0.05);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(12, 75, 54, 0.2);
  background: rgba(12, 75, 54, 0.1);
}

.nav-link.is-active {
  border-color: rgba(215, 140, 44, 0.22);
  background: rgba(215, 140, 44, 0.18);
  color: #6b430c;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.brand-block {
  display: grid;
  gap: 6px;
}

.brand {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 4.1rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 62ch;
}

.header-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(12, 75, 54, 0.08);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  padding: 28px;
  border: 1px solid rgba(12, 75, 54, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(12, 75, 54, 0.98) 0%, rgba(19, 92, 66, 0.96) 52%, rgba(216, 141, 44, 0.88) 100%);
  color: #fff8ef;
  box-shadow: var(--shadow);
}

.hero-compact {
  padding: 22px 24px;
}

.hero-inner {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.hero-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 3.6vw, 3.7rem);
  line-height: 1.02;
}

.hero-copy p {
  margin: 0;
  font-size: 1.07rem;
  line-height: 1.78;
}

.hero-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 248, 239, 0.14);
  border: 1px solid rgba(255, 248, 239, 0.16);
  backdrop-filter: blur(8px);
}

.hero-panel h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.hero-panel p,
.hero-panel li {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-panel ul {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  margin: 0;
}

.flash {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.6;
}

.flash-success {
  background: rgba(31, 106, 47, 0.1);
  color: var(--success);
  border-color: rgba(31, 106, 47, 0.18);
}

.flash-warning {
  background: rgba(139, 94, 0, 0.1);
  color: var(--warning);
  border-color: rgba(139, 94, 0, 0.18);
}

.flash-error {
  background: rgba(141, 43, 24, 0.1);
  color: var(--danger);
  border-color: rgba(141, 43, 24, 0.18);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 30px 0 18px;
}

.section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.section-head p {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.poll-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.poll-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.poll-card-empty {
  min-height: 220px;
}

.poll-head {
  padding: 20px 22px;
  background:
    linear-gradient(135deg, rgba(31, 26, 23, 0.95) 0%, rgba(49, 43, 38, 0.96) 100%);
  color: #fff8ef;
}

.poll-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(226, 240, 213, 0.14);
  color: #d7f1c3;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.poll-head h3 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.28;
}

.poll-head p {
  margin: 12px 0 0;
  color: rgba(255, 248, 239, 0.86);
  font-size: 0.98rem;
  line-height: 1.68;
}

.poll-body {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.poll-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(12, 75, 54, 0.08);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vote-form {
  display: grid;
  gap: 12px;
}

.vote-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(12, 75, 54, 0.12);
  border-radius: 18px;
  background: #fffdf9;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.vote-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(12, 75, 54, 0.38);
  background: #ffffff;
}

.vote-btn-label {
  text-align: left;
}

.vote-btn-arrow {
  color: var(--warm);
  font-size: 1.18rem;
  line-height: 1;
}

.vote-status {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(12, 75, 54, 0.08);
  color: var(--accent-strong);
  font-size: 0.96rem;
  line-height: 1.7;
}

.results {
  display: grid;
  gap: 12px;
}

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

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.95rem;
}

.result-head strong {
  font-size: 0.98rem;
}

.result-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 26, 23, 0.08);
}

.result-bar-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--warm) 0%, #f2bd62 100%);
}

.result-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.admin-note {
  margin-top: 28px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.72);
}

.admin-note h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.admin-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
}

.link-btn,
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(12, 75, 54, 0.14);
  background: #fffdf9;
  color: var(--accent-strong);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

.link-btn-muted {
  background: rgba(31, 26, 23, 0.05);
  color: var(--ink);
}

.action-btn {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff8ef;
  cursor: pointer;
}

.admin-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  margin-top: 24px;
}

.admin-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.admin-card-wide {
  align-content: start;
}

.admin-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  line-height: 1.08;
}

.admin-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head-tight {
  margin: 0;
}

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

.field {
  display: grid;
  gap: 8px;
}

.fieldset-reset {
  margin: 0;
  padding: 0;
  border: 0;
}

.fieldset-reset legend,
.field span {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(12, 75, 54, 0.12);
  border-radius: 16px;
  background: #fffdf9;
  color: var(--ink);
  cursor: pointer;
}

.checkbox-card input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.checkbox-card span {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(12, 75, 54, 0.14);
  border-radius: 16px;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.vote-btn:focus,
.menu-toggle:focus,
.nav-link:focus,
.link-btn:focus,
.action-btn:focus {
  outline: 3px solid rgba(215, 140, 44, 0.26);
  outline-offset: 2px;
}

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

.admin-list-item {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(31, 26, 23, 0.08);
  background: rgba(255, 255, 255, 0.66);
}

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

.admin-list-head strong {
  font-size: 1rem;
  line-height: 1.5;
}

.admin-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(12, 75, 54, 0.06);
}

.option-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(215, 140, 44, 0.14);
  color: #7e4f09;
  font-size: 0.82rem;
  font-weight: 800;
}

.footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
  text-align: center;
}

code {
  padding: 0.1em 0.38em;
  border-radius: 8px;
  background: rgba(31, 26, 23, 0.08);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 22px, 1120px);
    padding: 18px 0 40px;
  }

  .site-topbar {
    padding: 14px;
    border-radius: 20px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(31, 26, 23, 0.08);
  }

  .site-topbar.is-open .site-nav {
    display: grid;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    min-height: 48px;
    border-radius: 16px;
  }

  .masthead {
    align-items: flex-start;
  }

  .hero {
    padding: 22px;
    border-radius: 24px;
  }

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

  .poll-grid {
    grid-template-columns: 1fr;
  }

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

  .poll-body,
  .poll-head,
  .admin-card {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: calc(100% - 14px);
    padding: 12px 0 28px;
  }

  .brand {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
    line-height: 0.98;
  }

  .tagline,
  .hero-copy p,
  .hero-panel p,
  .hero-panel li,
  .section-head p,
  .vote-status,
  .result-note,
  .admin-card p {
    font-size: 0.96rem;
  }

  .header-chip,
  .meta-pill,
  .option-pill {
    letter-spacing: 0.04em;
  }

  .site-topbar,
  .hero,
  .poll-card,
  .admin-card,
  .admin-note {
    border-radius: 22px;
  }

  .hero,
  .poll-head,
  .poll-body,
  .admin-card,
  .admin-note {
    padding: 16px;
  }

  .site-topbar {
    padding: 12px;
  }

  .hero-copy h2 {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
    line-height: 1.04;
  }

  .poll-head h3 {
    font-size: 1.16rem;
  }

  .vote-btn,
  .menu-toggle,
  .link-btn,
  .action-btn {
    min-height: 54px;
    padding: 15px 16px;
  }

  .result-head,
  .admin-list-head,
  .top-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-head span,
  .admin-list-head .meta-pill {
    width: 100%;
  }

  .link-btn,
  .nav-link,
  .top-actions .link-btn-muted {
    width: 100%;
  }
}
