:root {
  color-scheme: light;
  --navy: #08347b;
  --ink: #172033;
  --muted: #617089;
  --paper: #ffffff;
  --card: #ffffff;
  --line: #dbe2ec;
  --accent: #dc214e;
  --green: #198754;
  --red: #c53b4d;
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
}

.page-shell { width: min(100% - 32px, 760px); margin: 0 auto; padding: 28px 0 36px; }
.site-header, .results-heading, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header { margin-bottom: 28px; }
.brand-logo { display: block; flex: 0 1 260px; min-width: 180px; }
.brand-logo img { display: block; width: 100%; height: auto; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.site-nav a { color: var(--navy); font-size: .85rem; line-height: 1.4; }
.site-nav a:focus-visible, .about-copy a:focus-visible { outline: 3px solid #80bfff; outline-offset: 3px; }
.participation-thanks { margin: 20px 0 0; line-height: 1.5; color: var(--muted); }
.about-copy { line-height: 1.65; }
.about-copy h1 { font-size: clamp(1.8rem,5vw,2.8rem); }
.about-copy h2 { margin-top: 30px; font-size: 1.5rem; }
.about-copy p { margin: 14px 0; }
.about-copy .methodology-note { padding: 16px; background: #edf4fc; border-left: 4px solid var(--navy); border-radius: 8px; }
.brand-mark { display: flex; align-items: center; gap: 12px; color: var(--navy); line-height: 1.05; }
.brand-mark strong, .brand-mark span:last-child { display: block; }
.brand-mark strong { font-size: 1.05rem; }
.brand-mark span:last-child { font-family: Georgia, serif; font-size: 1.25rem; }
.brand-map { display: grid; place-items: center; width: 46px; height: 38px; border: 3px solid var(--navy); border-radius: 13px 8px 12px 6px; font-weight: 800; letter-spacing: .08em; }
.prototype-badge { border: 1px solid #f0b8c3; border-radius: 999px; color: var(--accent); padding: 6px 10px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.question-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 5vw, 48px); box-shadow: 0 16px 42px rgba(29, 45, 80, .08); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; color: var(--navy); font-family: Georgia, serif; font-weight: 700; line-height: 1.12; }
h1 { max-width: 640px; font-size: clamp(2rem, 6vw, 3.55rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.9rem); }
.question-meta { color: var(--muted); font-size: 1.05rem; line-height: 1.5; margin: 16px 0 30px; }
.choices { display: grid; gap: 12px; margin: 0 0 24px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label { display: flex; align-items: center; min-height: 60px; padding: 14px 18px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 1.05rem; transition: border-color .15s, background .15s, transform .15s; }
.choice label::before { content: ""; display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; margin-right: 12px; border: 2px solid #738199; border-radius: 2px; color: var(--navy); font: bold 23px/1 Georgia,serif; }
.choice label:hover { border-color: #9aaaca; transform: translateY(-1px); }
.choice input:checked + label { border-color: var(--navy); background: #f0f4fb; }
.choice input:checked + label::before { content: "✓"; border-color: var(--navy); background: white; }
.choice input:focus-visible + label, button:focus-visible { outline: 3px solid #80bfff; outline-offset: 3px; }
.primary-button { width: 100%; border: 2px solid var(--navy); border-radius: 12px; background: white; color: var(--navy); padding: 15px 18px; font: inherit; font-weight: 800; cursor: pointer; }
.primary-button:hover:not(:disabled) { background: #eef4fc; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--navy); border-radius: 8px; padding: 10px 14px; color: var(--navy); background: white; font: inherit; text-decoration: none; cursor: pointer; }
.email-entry { display: flex; gap: 8px; align-items: flex-start; }
.email-entry input { min-width: 0; }
.email-entry button { min-height: 50px; }
.share-panel { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
.share-panel h2 { font-size: 1.35rem; }
#share-message { width: 100%; box-sizing: border-box; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#share-status { line-height: 1.4; }
#share-link { width: 100%; font: inherit; padding: 12px; }
.question-list { display: grid; gap: 14px; margin: 20px 0 32px; }
.question-entry { border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.question-entry h3 { margin: 0; font-size: 1.15rem; line-height: 1.4; }
.question-entry p { color: var(--muted); line-height: 1.4; margin: 10px 0; }
.primary-button:disabled { cursor: not-allowed; opacity: .45; }
.privacy-note { margin: 14px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; text-align: center; }
.results-panel { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 30px; }
.response-count { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.bars { display: grid; gap: 18px; margin-top: 24px; }
.bar-row { display: grid; gap: 7px; }
.bar-label { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.bar-number { color: var(--muted); font-weight: 600; }
.bar-track { height: 18px; overflow: hidden; border-radius: 999px; background: #e9eef5; }
.bar-fill { height: 100%; min-width: 4px; border-radius: inherit; background: var(--red); transition: width .5s ease; }
.bar-fill.winner { background: var(--green); }
.bar-fill.tie { background: var(--green); }
.bar-fill[style*="width: 0%"] { min-width: 0; }
.local-banner { border-radius: 8px; background: #fff4d6; color: #644810; padding: 12px; font-size: .85rem; line-height: 1.4; }
.email-label { display: block; font-weight: 700; margin-bottom: 8px; }
#email-address, #email-code { width: 100%; font: inherit; padding: 14px; margin-bottom: 18px; border: 2px solid var(--line); border-radius: 10px; }
#email-code { font-size: 1.6rem; letter-spacing: .35em; font-variant-numeric: tabular-nums; }
#email-code[aria-invalid="true"] { border-color: #ad2035; margin-bottom: 8px; }
.field-error { margin: 0 0 16px; padding: 10px 12px; border-left: 4px solid #ad2035; border-radius: 4px; background: #fff0f2; color: #8b1527; font-weight: 600; line-height: 1.4; }
#resend-code { margin-right: 18px; }
#status-message { line-height: 1.5; color: var(--navy); }
#status-message.returning-notice {
  padding: 16px 18px; border: 1px solid #b7cde7; border-left: 5px solid var(--navy);
  border-radius: 10px; background: #edf4fc; font-weight: 700; font-size: 1rem;
}
.preview-link { display: inline-block; padding: 12px 0; color: var(--navy); font-weight: 700; }
.showing-results { padding: 28px 32px; }
.showing-results h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; }
.showing-results .question-meta { display: none; }
.showing-results .local-banner { padding: 8px 10px; font-size: .75rem; }
.showing-results .results-panel { margin-top: 16px; padding-top: 16px; }
.showing-results .bars { gap: 12px; margin-top: 18px; }
.showing-results .privacy-note { text-align: left; }
#results:focus { outline: none; }
.text-button { margin-top: 22px; border: 0; background: transparent; color: var(--navy); cursor: pointer; font: inherit; font-size: .85rem; text-decoration: underline; }
.site-footer { margin-top: 18px; color: var(--muted); font-size: .76rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.profile-panel { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.profile-intro { color: var(--muted); line-height: 1.5; }
.profile-fields { display: grid; gap: 18px; margin: 20px 0; }
.profile-fields label { font-weight: 700; line-height: 1.4; }
.profile-legend { font-weight: bold; font-size: 1.2rem; margin-bottom: 14px; }
.profile-fields .choices { margin-bottom: 0; }
.profile-fields select { display: block; width: 100%; min-height: 48px; margin-top: 8px; padding: 10px; border: 2px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font: inherit; }
.profile-fields select:focus-visible { outline: 3px solid #80bfff; outline-offset: 3px; }
.profile-panel .text-button { min-height: 44px; margin: 8px 18px 0 0; }
.profile-panel .privacy-note { text-align: left; }

@media (max-width: 520px) {
  .site-header { flex-direction: column; align-items: stretch; }
  .brand-logo { flex: none; width: min(100%,260px); margin: 0 auto; }
  .site-nav { justify-content: center; }
  .page-shell { width: min(100% - 20px, 760px); padding-top: 18px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
  .results-heading { align-items: flex-start; flex-direction: column; }
}
