:root {
  --ink: #20223b;
  --cream: #fffaf2;
  --paper: #ffffff;
  --yellow: #ffd45c;
  --coral: #ff6b5f;
  --coral-dark: #b8362f;
  --mint: #9fe0c3;
  --lilac: #c8b7ff;
  --tide: #8ed8e5;
  --muted: #66657a;
  --line: 2px solid var(--ink);
  --shadow: 0 6px 0 var(--ink);
  color-scheme: light;
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; background: var(--cream); color: var(--ink); }
button, a { min-height: 44px; font: inherit; color: inherit; }
button:not(:disabled), a { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 4px solid var(--coral); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 12px 16px; border: var(--line); border-radius: 10px; background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.poll-header { position: sticky; z-index: 50; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; padding: 10px clamp(14px, 4vw, 56px); border-bottom: var(--line); background: rgba(255, 250, 242, .96); backdrop-filter: blur(10px); }
.poll-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; color: inherit; text-decoration: none; }
.poll-brand svg { width: 48px; height: 48px; flex: 0 0 auto; }
.poll-brand span { display: grid; line-height: 1.05; }
.poll-brand strong { font-size: 1.02rem; }
.poll-brand small { margin-top: 5px; color: var(--muted); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.poll-header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.poll-header nav button, #rotate-options, .facilitator-actions button, .result-actions button, .result-actions a { padding: 9px 14px; border: var(--line); border-radius: 999px; background: var(--paper); font-weight: 900; }
.poll-header nav button[aria-pressed="true"] { background: var(--yellow); }

main { width: min(1480px, 100%); margin: 0 auto; }
main > section, main > aside { margin-inline: clamp(14px, 4vw, 56px); }
.eyebrow { margin: 0 0 9px; font-size: .74rem; font-weight: 950; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p, dd, dt { overflow-wrap: anywhere; }
h1 { margin: 0; max-width: 950px; font-size: clamp(2.7rem, 7vw, 6.7rem); line-height: .92; letter-spacing: -.055em; }
h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3.35rem); line-height: 1.02; letter-spacing: -.035em; }
h3 { margin: 0; line-height: 1.1; }
p { line-height: 1.55; }

.poll-hero { position: relative; isolation: isolate; min-height: 570px; margin-inline: 0; padding: clamp(56px, 8vw, 110px) clamp(14px, 4vw, 56px) 54px; overflow: hidden; background: var(--ink); color: var(--paper); }
.poll-hero::after { position: absolute; z-index: -2; inset: auto -8vw -270px auto; width: min(650px, 80vw); aspect-ratio: 1; border: 90px solid rgba(159, 224, 195, .12); border-radius: 50%; content: ""; }
.hero-orbits { position: absolute; z-index: -1; top: 60px; right: clamp(24px, 7vw, 120px); width: min(300px, 31vw); aspect-ratio: 1; border: 2px solid rgba(255,255,255,.22); border-radius: 50%; transform: rotate(-22deg) scaleY(.48); }
.hero-orbits span { position: absolute; width: 28px; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 50%; background: var(--mint); }
.hero-orbits span:nth-child(1) { top: -14px; left: 46%; }
.hero-orbits span:nth-child(2) { right: -14px; bottom: 38%; background: var(--coral); }
.hero-orbits span:nth-child(3) { bottom: -12px; left: 24%; width: 22px; background: var(--yellow); }
.hero-lede { max-width: 760px; margin: 24px 0 36px; color: #e5e3f1; font-size: clamp(1.05rem, 2vw, 1.35rem); }
.poll-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 1000px; margin: 0; }
.poll-facts div { padding: 16px; border: 1px solid rgba(255,255,255,.3); border-radius: 15px; background: rgba(255,255,255,.08); }
.poll-facts dt { color: var(--mint); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.poll-facts dd { margin: 6px 0 0; font-weight: 900; }

.truth-strip { position: relative; z-index: 3; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-top: -28px; padding: 20px 22px; border: var(--line); border-radius: 18px; background: var(--yellow); box-shadow: var(--shadow); }
.truth-strip > span { display: grid; width: 48px; aspect-ratio: 1; place-items: center; border: var(--line); border-radius: 50%; background: var(--paper); font-size: 1.7rem; font-weight: 900; }
.truth-strip h2 { font-size: 1.1rem; letter-spacing: 0; }
.truth-strip p { margin: 6px 0 0; font-size: .88rem; }
.truth-strip a { display: inline-grid; place-items: center; padding: 10px 14px; border: var(--line); border-radius: 999px; background: var(--paper); font-weight: 900; text-align: center; text-decoration: none; }

.proposal, .ballot, .transparency, .next-step { padding-block: clamp(70px, 9vw, 120px); }
.section-heading, .ballot-heading, .results-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 32px; }
.section-heading > p, .ballot-heading > div > p:last-child, .results-heading > div > p { max-width: 560px; margin: 12px 0 0; color: var(--muted); }
.proposal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.proposal-grid article { padding: 24px; border: var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 4px 0 var(--ink); }
.proposal-grid article:nth-child(2) { background: #f1ecff; }
.proposal-grid article:nth-child(3) { background: #e5f8ef; }
.proposal-grid article > span { display: inline-block; margin-bottom: 32px; padding: 6px 9px; border: 2px solid currentColor; border-radius: 999px; font-size: .69rem; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.proposal-grid p { margin-bottom: 0; }

.ballot { margin-inline: 0; padding-inline: clamp(14px, 4vw, 56px); background: #edf8f5; border-block: var(--line); }
.ballot-heading h2 { max-width: 940px; }
.concept-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 32px); }
.concept-card { min-width: 0; }
.concept-choice { position: relative; width: 100%; height: auto; padding: 0; overflow: hidden; border: 3px solid var(--ink); border-radius: 22px; background: var(--paper); box-shadow: 0 6px 0 var(--ink); text-align: left; transition: transform .16s ease, box-shadow .16s ease; }
.concept-choice:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--ink); }
.concept-choice[aria-pressed="true"] { outline: 7px solid var(--yellow); outline-offset: 2px; }
.concept-choice img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-bottom: var(--line); background: #e5e3da; }
.concept-number { position: absolute; z-index: 2; top: 12px; left: 12px; display: grid; width: 46px; aspect-ratio: 1; place-items: center; border: var(--line); border-radius: 50%; background: var(--paper); font-weight: 950; }
.ai-badge { position: absolute; z-index: 2; top: 14px; right: 12px; max-width: calc(100% - 84px); padding: 7px 9px; border: 1px solid var(--ink); border-radius: 999px; background: rgba(32,34,59,.92); color: var(--paper); font-size: .64rem; font-weight: 900; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.concept-copy { display: grid; min-height: 180px; padding: 20px 20px 18px; }
.concept-copy small { color: var(--coral-dark); font-size: .71rem; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.concept-copy strong { margin: 6px 0 10px; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1; letter-spacing: -.03em; }
.concept-copy > span { color: var(--muted); line-height: 1.45; }
.select-mark { display: block; margin: 0 20px 20px; padding: 10px; border: var(--line); border-radius: 999px; background: var(--cream); font-weight: 950; text-align: center; }
.concept-choice[aria-pressed="true"] .select-mark { background: var(--yellow); }
.concept-card > details { margin: 13px 5px 0; border: var(--line); border-radius: 14px; background: var(--paper); }
.concept-card summary { min-height: 44px; padding: 12px 14px; font-weight: 900; cursor: pointer; }
.concept-card details > div { padding: 2px 16px 16px; border-top: 1px solid #d5d4de; }
.concept-card details h3 { margin-top: 16px; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.concept-card details p, .concept-card details li { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.concept-card details ul { padding-left: 20px; }

.facilitator-bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; margin-top: 54px; padding: clamp(22px, 4vw, 38px); border: var(--line); border-radius: 22px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.facilitator-bar h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
.facilitator-bar p { margin: 8px 0 12px; color: #dbdae6; }
.facilitator-bar output { display: inline-block; padding: 8px 11px; border: 1px solid #77778a; border-radius: 8px; color: var(--mint); font: 900 .8rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.facilitator-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; max-width: 390px; }
.facilitator-actions button { color: var(--ink); }
.primary { background: var(--coral) !important; }
.primary:disabled { opacity: .48; cursor: not-allowed; }

.results { margin: 50px clamp(14px, 4vw, 56px) 0; padding: clamp(25px, 5vw, 52px); border: var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.results-heading { align-items: center; }
.results h2:focus { outline: none; }
.total-block { display: grid; min-width: 130px; padding: 16px; border: var(--line); border-radius: 16px; background: var(--yellow); text-align: center; }
.total-block strong { font-size: 3rem; line-height: .9; }
.total-block span { font-weight: 900; }
.total-block small { margin-top: 6px; }
.result-list { display: grid; gap: 12px; }
.result-row { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(160px, 3fr) 64px; align-items: center; gap: 16px; }
.result-row > span { display: grid; }
.result-row small { margin-top: 3px; color: var(--muted); }
.bar-track { height: 18px; overflow: hidden; border: var(--line); border-radius: 999px; background: #eeeef2; }
.bar-track i { display: block; height: 100%; background: var(--mint); }
.result-row output { font-weight: 950; text-align: right; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.result-actions a { display: inline-grid; place-items: center; text-align: center; text-decoration: none; }
.adult-handoff { background: var(--mint) !important; }
.handoff-note { max-width: 760px; margin: 16px 0 0; color: var(--muted); font-size: .86rem; }
.online-status { max-width: 900px; margin: 18px 0 0; padding: 14px 16px; border: 2px solid #8b8998; border-radius: 12px; background: var(--cream); font-weight: 800; line-height: 1.5; }
.online-status[data-kind="working"] { background: #fff7d9; }
.online-status[data-kind="success"] { border-color: #17684f; background: #e5f8ef; color: #12523f; }
.online-status[data-kind="error"] { border-color: var(--coral-dark); background: #fff0ee; color: var(--coral-dark); }
.danger-text { border-color: var(--coral-dark) !important; color: var(--coral-dark); }

.transcript-list { display: grid; gap: 12px; }
.transcript { border: var(--line); border-radius: 16px; background: var(--paper); }
.transcript summary { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 12px; min-height: 62px; padding: 10px 16px; list-style: none; cursor: pointer; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary > span { display: grid; width: 40px; aspect-ratio: 1; place-items: center; border: var(--line); border-radius: 50%; background: var(--mint); font-size: .75rem; font-weight: 950; }
.transcript summary small { color: var(--muted); font-weight: 900; }
.transcript[open] summary { border-bottom: var(--line); }
.transcript-body { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; padding: 22px; }
.transcript-body h3 { margin: 0 0 8px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.transcript-body p { margin: 0 0 22px; }
.transcript pre { margin: 0; padding: 16px; overflow: auto; border: 1px solid #c7c6d0; border-radius: 12px; background: #f5f4f0; white-space: pre-wrap; font: .78rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.hash { margin-top: 14px !important; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; overflow-wrap: anywhere; }

.next-step { margin-bottom: 80px; padding-inline: clamp(24px, 6vw, 80px); border: var(--line); border-radius: 24px; background: var(--lilac); box-shadow: var(--shadow); }
.next-step h2 { max-width: 880px; }
.next-step ol { max-width: 820px; margin: 28px 0 0; padding-left: 24px; }
.next-step li { margin: 12px 0; padding-left: 8px; line-height: 1.5; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px clamp(14px, 4vw, 56px); border-top: var(--line); background: var(--ink); color: var(--paper); }
footer p { margin: 0; }
footer a { display: inline-grid; place-items: center; color: var(--paper); font-weight: 900; }

.ink-preview { --cream: #fff; --paper: #fff; --yellow: #fff; --coral: #fff; --mint: #fff; --lilac: #fff; --tide: #fff; --coral-dark: #20223b; --muted: #4b4b4b; }
.ink-preview .concept-choice img { filter: grayscale(1) contrast(1.08); }
.ink-preview .poll-hero, .ink-preview .facilitator-bar, .ink-preview footer { background: #fff; color: var(--ink); }
.ink-preview .hero-lede, .ink-preview .facilitator-bar p { color: #333; }
.ink-preview .poll-facts div { border-color: var(--ink); background: #fff; }
.ink-preview .poll-facts dt, .ink-preview .facilitator-bar output { color: var(--ink); }
.ink-preview .ai-badge { border-color: #fff; background: var(--ink); color: #fff; }
.small-text { font-size: 90%; }
.large-text { font-size: 118%; }
.parent-poll-invite { margin: 26px 0 0; padding: 18px 20px; border: var(--line); border-radius: 16px; background: var(--yellow); box-shadow: 0 3px 0 var(--ink); }
.parent-poll-invite a { font-weight: 950; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 960px) {
  .concept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poll-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .truth-strip { grid-template-columns: auto 1fr; }
  .truth-strip a { grid-column: 2; justify-self: start; }
  .proposal-grid { grid-template-columns: 1fr; }
  .facilitator-bar { grid-template-columns: 1fr; }
  .facilitator-actions { justify-content: flex-start; max-width: none; }
  .transcript-body { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .poll-header { position: relative; align-items: flex-start; }
  .poll-brand small { display: none; }
  .poll-header nav { max-width: 190px; }
  .poll-header nav button { width: 100%; padding-inline: 10px; font-size: .72rem; }
  .poll-hero { min-height: auto; padding-top: 60px; }
  .hero-orbits { opacity: .45; }
  .poll-facts { grid-template-columns: 1fr 1fr; }
  .truth-strip { grid-template-columns: 1fr; margin-top: 16px; }
  .truth-strip > span { display: none; }
  .truth-strip a { grid-column: 1; justify-self: stretch; }
  .section-heading, .ballot-heading, .results-heading { display: grid; align-items: start; gap: 18px; }
  .ballot-heading > button { justify-self: start; }
  .concept-grid { grid-template-columns: 1fr; }
  .concept-copy { min-height: auto; }
  .ai-badge { font-size: .58rem; }
  .result-row { grid-template-columns: 1fr 56px; }
  .result-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .transcript summary { grid-template-columns: 45px 1fr; }
  .transcript summary small { grid-column: 2; }
  footer { display: grid; }
}

@media print {
  .poll-header, .truth-strip, .facilitator-bar, .results, footer { display: none !important; }
  body { background: #fff; }
  .poll-hero { min-height: auto; padding: 24px; background: #fff; color: #000; }
  .hero-lede { color: #000; }
  .poll-facts div { border-color: #000; background: #fff; }
  .poll-facts dt { color: #000; }
  .proposal, .ballot, .transparency { margin: 0; padding: 24px; border: 0; background: #fff; }
  .concept-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .concept-choice { border: 1px solid #000; box-shadow: none; }
  .concept-choice img { filter: grayscale(1); }
  .ai-badge, .select-mark, .concept-card details { display: none; }
  .concept-copy { min-height: 120px; padding: 10px; }
  .transparency, .next-step { display: none; }
}
