:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --ink: #172126;
  --muted: #5d6a70;
  --line: #d9e1e5;
  --teal: #1f5fd1;
  --teal-dark: #1746a2;
  --yellow: #d92d3a;
  --red: #d92d3a;
  --graphite: #263238;
  --danger: #b3261e;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

.poll-page {
  background: #ffffff;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 58%, var(--red) 100%);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 15px;
}

.nav a {
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 68px));
  display: grid;
  align-items: center;
  overflow: hidden;
}

.entry-hero {
  min-height: calc(100vh - 68px);
  place-items: center;
}

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

.hero-media {
  background-image: url("assets/survey-hero.png");
  background-size: cover;
  background-position: center right;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(245, 247, 248, 0.96) 0%, rgba(245, 247, 248, 0.84) 38%, rgba(245, 247, 248, 0.28) 72%, rgba(245, 247, 248, 0.04) 100%);
}

.hero-content {
  position: relative;
  width: min(680px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  padding: 42px 0 96px;
}

.entry-content {
  position: relative;
  display: grid;
  place-items: center;
  width: min(520px, calc(100% - 36px));
  padding: 56px 0 86px;
}

.entry-panel {
  display: grid;
  justify-items: center;
  width: 100%;
  padding: clamp(28px, 5vw, 44px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(217, 225, 229, 0.88);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(23, 33, 38, 0.12);
  text-align: center;
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(40px, 6.1vw, 74px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: #304047;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

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

.entry-panel .hero-actions {
  width: 100%;
  margin-top: 26px;
}

.entry-button {
  width: 100%;
  min-height: 58px;
  font-size: 18px;
}

.entry-note {
  max-width: 390px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.poll-shell {
  width: min(456px, 100%);
  margin: 0 auto;
  padding: 20px 20px;
}

.poll-form {
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.poll-form h1 {
  max-width: 100%;
  margin: -6px 0 0;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
}

.poll-form .eyebrow {
  margin: 0;
}

.poll-form .lead {
  max-width: 100%;
  margin: 6px 0 8px;
  color: #687589;
  font-size: 18px;
  line-height: 1.55;
}

.poll-card {
  display: grid;
  gap: 7px;
  padding: 10px 13px;
  background: #f8fbff;
  border: 1px solid #d4e0ee;
  border-radius: 8px;
}

.poll-card legend {
  float: left;
  width: 100%;
  margin: 0 0 6px;
  color: #172136;
  font-size: 16px;
  line-height: 1.38;
  font-weight: 800;
}

.poll-card legend + * {
  clear: both;
}

.answer-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.answer-toggle label {
  position: relative;
  display: block;
}

.answer-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.answer {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid #c8d6e6;
  border-radius: 8px;
  background: #fff;
  color: #27364d;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.answer-toggle input:focus-visible + .answer {
  outline: 3px solid rgba(31, 95, 209, 0.2);
  outline-offset: 2px;
}

.answer-toggle input:checked + .answer.yes {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.answer-toggle input:checked + .answer.no {
  background: #bd241d;
  border-color: #bd241d;
  color: #fff;
}

.poll-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 0;
}

.poll-card .error:empty {
  display: none;
}

.poll-actions .button {
  min-height: 51px;
  width: 100%;
  font-size: 17px;
}

.poll-actions .cancel {
  background: #edf2f7;
  border-color: #d7e0ea;
}

.poll-form .form-status,
.poll-form .entry-note {
  text-align: center;
  justify-self: center;
}

.thanks-shell {
  display: grid;
  width: min(456px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 20px;
  place-items: center;
}

.thanks-card {
  display: grid;
  justify-items: center;
  width: 100%;
  padding: 34px 22px;
  background: #f8fbff;
  border: 1px solid #d4e0ee;
  border-radius: 8px;
  text-align: center;
}

.thanks-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 42px;
  line-height: 1;
}

.thanks-card h1 {
  max-width: 100%;
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.thanks-card .lead {
  max-width: 350px;
  margin: 14px 0 24px;
  color: #687589;
  font-size: 18px;
  line-height: 1.55;
}

.admin-page {
  min-height: 100vh;
  background: #f3f6fb;
  color: #172136;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-form {
  display: grid;
  gap: 14px;
  width: min(380px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(23, 33, 56, 0.1);
}

.login-form h1 {
  max-width: 100%;
  font-size: 28px;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 168px;
  padding: 18px 16px;
  background: #111827;
  color: #fff;
}

.admin-sidebar strong {
  display: block;
  margin-bottom: 28px;
  font-size: 15px;
}

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

.admin-sidebar a {
  color: #d9e3f5;
  font-size: 14px;
  text-decoration: none;
}

.admin-sidebar a[aria-current="page"] {
  color: #fff;
  font-weight: 800;
}

.admin-main {
  margin-left: 168px;
  padding: 24px 20px;
}

.admin-head h1 {
  max-width: 100%;
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.admin-head p {
  margin: 0 0 24px;
  color: #6a7588;
  font-size: 13px;
}

.admin-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e4eaf2;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.event-pill {
  display: inline-flex;
  margin: 0 0 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e4f8e9;
  color: #208344;
  font-size: 11px;
  font-weight: 800;
}

.admin-table strong,
.admin-table small {
  display: block;
}

.admin-table small {
  margin-top: 4px;
  color: #59677a;
  line-height: 1.35;
}

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

.link-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 33, 56, 0.06);
}

.link-card h2 {
  margin: 0 0 8px;
  color: #172136;
  font-size: 18px;
  line-height: 1.25;
}

.link-card p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.5;
}

.link-card a {
  display: block;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  background: #eef5ff;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--teal);
  color: #fff;
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line);
  color: var(--graphite);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(1120px, calc(100% - 36px));
  margin: -50px auto 0;
  position: relative;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.survey-head {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 90px) 0 28px;
}

.survey-head h1 {
  max-width: 900px;
  font-size: clamp(38px, 5vw, 64px);
}

.survey-head .lead {
  max-width: 680px;
}

.survey-head + .stats {
  margin-top: 0;
}

.stats div {
  display: grid;
  gap: 6px;
  padding: 24px;
  background: var(--surface);
}

.stats strong {
  font-size: 24px;
}

.stats span,
.intro p,
.topic-list p,
.faq p,
.footer {
  color: var(--muted);
  line-height: 1.6;
}

.content-grid,
.topics,
.faq {
  width: min(1120px, calc(100% - 36px));
  margin: 82px auto 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.intro {
  position: sticky;
  top: 100px;
}

.survey-form {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(23, 33, 38, 0.08);
}

.survey-form.poll-form {
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label,
legend {
  color: #233138;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c9d4d9;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(31, 95, 209, 0.18);
  border-color: var(--teal);
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.check,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  color: #2c3c43;
}

.check input,
.consent input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
  flex: 0 0 auto;
}

.rating {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 8px;
}

.rating label {
  position: relative;
}

.rating input {
  position: absolute;
  opacity: 0;
}

.rating span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid #c9d4d9;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.rating input:checked + span {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.submit {
  width: 100%;
}

.error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--teal-dark);
  font-weight: 750;
}

.topics {
  display: grid;
  gap: 28px;
}

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

.topic-list article {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--yellow);
  border-radius: 8px;
}

.faq {
  margin-bottom: 82px;
}

details {
  border-top: 1px solid var(--line);
  background: transparent;
}

details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  padding: 20px 0;
  font-weight: 800;
  cursor: pointer;
}

details p {
  margin: 0 0 20px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(18px, 5vw, 64px);
  background: #ffffff;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(245, 247, 248, 0.98) 0%, rgba(245, 247, 248, 0.9) 48%, rgba(245, 247, 248, 0.4) 100%);
  }

  .hero-content {
    width: min(100% - 36px, 640px);
    margin: 0 auto;
  }

  h1 {
    max-width: 11ch;
  }

  .stats,
  .content-grid,
  .topic-list,
  .split,
  .footer {
    grid-template-columns: 1fr;
  }

  .content-grid {
    display: grid;
  }

  .intro {
    position: static;
  }

  .footer {
    display: grid;
  }

  .admin-sidebar {
    position: static;
    width: auto;
  }

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

  .admin-main {
    margin-left: 0;
  }

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

@media (max-width: 520px) {
  .hero-actions,
  .button {
    width: 100%;
  }

  .rating {
    grid-template-columns: repeat(5, minmax(40px, 1fr));
  }
}
