@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #fafafa;
  --surface: #f1f2ef;
  --input: #ffffff;
  --ink: #252922;
  --muted: #6a7067;
  --line: #dee2db;
  --input-line: #c3c9bf;
  --accent: #58684e;
  --accent-soft: #eef1e9;
  --selection: #dbe4d2;
  --button-bg: #434d3d;
  --button-ink: #ffffff;
  --error: #a04233;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171817;
  --surface: #20231f;
  --input: #1d201c;
  --ink: #f1eee6;
  --muted: #abaca4;
  --line: #343733;
  --input-line: #50554c;
  --accent: #d8a15d;
  --accent-soft: #322b20;
  --selection: #5b4730;
  --button-bg: #d8a15d;
  --button-ink: #171817;
  --error: #e8a08d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
::selection { background: var(--selection); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: 5px; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }
svg { display: block; }
.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; }
.page-shell { width: min(1100px, calc(100% - 96px)); margin: auto; }
.skip-link { position: absolute; left: 20px; top: -90px; z-index: 10; padding: 12px 20px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 12px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; text-decoration: none; white-space: nowrap; font: 25px/1 var(--serif); letter-spacing: -.8px; }
.brand-period, .footer-brand span { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 29px; font-size: 13px; color: var(--muted); }
.header-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.header-nav a:hover { color: var(--accent); }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 11px; background: none; border: none; border-radius: 50%; color: var(--ink); transition: background .18s ease; }
.theme-toggle:hover { background: var(--surface); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-icon-dark { display: block; }
.theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-icon-light { display: block; }

.poem-section { max-width: 980px; margin: 0 auto; padding: 33px 0 21px; }
.section-topline { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 21px; color: var(--muted); }
.section-topline h2, .word-count { font: 400 12px/1.6 var(--sans); }
.topline-dot { color: var(--input-line); }
.poem-reading { min-width: 0; }
.poem-text { max-width: 900px; margin: 0 auto; color: var(--ink); font: 400 clamp(50px, 4.8vw, 64px)/1.43 var(--serif); letter-spacing: -1.7px; text-align: center; text-wrap: pretty; overflow-wrap: anywhere; }
.poem-word { transition: color .2s ease; }
.poem-word.is-latest { color: var(--accent); }
.poem-word.is-new-word { animation: new-word 700ms ease-out 1 both; }
.poem-space { display: inline-block; width: .8em; height: .84em; margin-left: .13em; border-bottom: 1px solid var(--accent); vertical-align: -.02em; opacity: .5; }
.poem-empty { max-width: 690px; margin: 0 auto; padding: 14px 0 19px; text-align: center; }
.poem-empty h3 { font: 400 42px/1.35 var(--serif); letter-spacing: -1.1px; }
.poem-empty p { max-width: 540px; margin: 14px auto 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.poem-reading-controls { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; column-gap: 16px; row-gap: 4px; margin-bottom: 17px; }
.poem-range-note { color: var(--muted); font-size: 12px; }
.poem-range-note:empty { display: none; }
.text-button { min-height: 36px; padding: 5px 0; border: none; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--input-line); }
.text-button:hover { color: var(--accent); text-decoration-color: currentColor; }
.text-button span { margin-left: 9px; }
.poem-toggle { color: var(--ink); }
.poem-reading.is-expanded .poem-text { max-width: 780px; font-size: clamp(28px, 3.3vw, 40px); line-height: 1.6; letter-spacing: -.65px; text-align: left; }
.poem-reading.is-expanded .poem-reading-controls { max-width: 780px; margin: 0 auto 19px; justify-content: flex-start; }
.poem-toolbar { display: flex; justify-content: center; align-items: center; gap: 28px; padding-top: 18px; }
.still-becoming { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.living-dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
.share-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 6px 0; background: none; border: none; color: var(--muted); font-size: 12px; }
.share-button:hover { color: var(--accent); }
.share-button svg { width: 14px; height: 14px; }
.share-feedback { margin-top: 5px; color: var(--accent); text-align: center; font-size: 12px; overflow-wrap: anywhere; }
.share-feedback:empty { display: none; }

.participation-section { max-width: 980px; margin: 0 auto; padding: 25px 0 43px; border-top: 1px solid var(--line); }
.participation-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.participation-heading h2 { font: 400 27px/1.25 var(--serif); letter-spacing: -.6px; }
.day-meta { display: flex; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.eyebrow-separator { color: var(--input-line); }
.day-clock { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 8px; text-align: right; }
.day-clock > p:first-child { color: var(--muted); font-size: 12px; }
.countdown { font: 400 19px/1.5 var(--serif); letter-spacing: .35px; font-variant-numeric: tabular-nums; }
.clock-footnote { grid-column: 1 / -1; color: var(--muted); font-size: 11px; line-height: 1.5; }
.participation-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 54px; align-items: start; }
.suggestion-panel, .voting-panel { min-width: 0; }
#word-form label { display: block; margin-bottom: 10px; font-size: 13px; line-height: 1.5; }
.word-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.word-input-wrap { position: relative; min-width: 0; }
#word-input { width: 100%; height: 49px; min-width: 0; padding: 11px 60px 11px 14px; border: 1px solid var(--input-line); border-radius: 2px; background: var(--input); color: var(--ink); font: 21px/1.3 var(--serif); }
#word-input::placeholder { color: var(--muted); font-style: italic; font-size: 20px; }
#word-input:disabled { opacity: .65; }
#word-input[aria-invalid="true"] { border-color: var(--error); }
.input-count { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: var(--muted); font: 11px/1 var(--sans); pointer-events: none; }
.primary-button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-width: 81px; min-height: 49px; padding: 10px 16px; border: 1px solid var(--button-bg); border-radius: 2px; background: var(--button-bg); color: var(--button-ink); font-size: 13px; line-height: 1.3; white-space: nowrap; transition: background .18s ease, border-color .18s ease; }
.primary-button:hover:not(:disabled) { filter: brightness(1.08); }
.primary-button:disabled { opacity: .5; }
.primary-button > span:last-child { font-size: 16px; line-height: 1; }
.field-hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.field-error { color: var(--error); font-size: 13px; }
.field-error:not(:empty) { margin-top: 9px; }
.participation-note { margin-top: 13px; color: var(--muted); font-size: 12px; }
.suggestion-saved { display: flex; align-items: center; gap: 10px; padding-top: 13px; }
.saved-check { color: var(--accent); font-size: 18px; }
.suggestion-saved p:first-child { font-size: 13px; }
.suggestion-saved p:last-child { margin-top: 2px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.candidates-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-bottom: 10px; }
.candidates-heading h3 { font: 400 13px/1.5 var(--sans); }
.candidates-heading > span { color: var(--muted); font-size: 12px; }
.candidates-empty { padding: 10px 0 8px; border-top: 1px solid var(--line); }
.candidates-empty p:first-child { font: 400 21px/1.4 var(--serif); }
.candidates-empty p:last-child { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.candidate-list { display: grid; list-style: none; margin: 0; padding: 0; }
.candidate { min-width: 0; }
.candidate:first-child .word-choice { border-top: 1px solid var(--line); }
.word-choice { --vote-share: 0%; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 50px; padding: 11px 9px; border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); text-align: left; overflow: hidden; transition: background .18s ease; }
.word-choice::before { content: ""; position: absolute; inset: auto auto 0 0; height: 1px; width: var(--vote-share); background: var(--input-line); transition: width .4s ease; }
.word-choice:hover:not(:disabled) { background: var(--surface); }
.word-choice[aria-pressed="true"] { background: var(--accent-soft); }
.word-choice[aria-pressed="true"]::before { background: var(--accent); }
.word-choice:disabled { opacity: .65; }
.word-choice[aria-pressed="true"]:disabled { opacity: 1; }
.candidate-main { display: flex; flex-wrap: wrap; align-items: baseline; min-width: 0; gap: 2px 9px; }
.candidate-word { font: 400 23px/1.25 var(--serif); letter-spacing: -.3px; overflow-wrap: anywhere; }
.candidate-tag { color: var(--accent); font-size: 11px; }
.candidate-side { display: flex; align-items: center; gap: 12px; flex-shrink: 0; color: var(--muted); }
.candidate-votes { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vote-circle { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--input-line); border-radius: 50%; font-size: 11px; line-height: 1; }
.word-choice[aria-pressed="true"] .vote-circle { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.vote-note { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.action-feedback, .action-error { font-size: 13px; }
.action-feedback:not(:empty), .action-error:not(:empty) { margin-top: 16px; padding: 11px 14px; border-left: 2px solid var(--accent); background: var(--surface); }
.action-feedback { color: var(--ink); }
.action-error { color: var(--error); }
.day-close-note { margin-top: 14px; color: var(--accent); font-size: 13px; }
.verification-area { max-width: 420px; margin-top: 17px; }
.verification-label { margin-bottom: 8px; color: var(--muted); font-size: 12px; }

.eyebrow { font: 500 11px/1.6 var(--sans); letter-spacing: 1.35px; text-transform: uppercase; color: var(--muted); }
.how-section { max-width: 980px; margin: 0 auto; padding: 35px 0 40px; border-top: 1px solid var(--line); }
.how-title { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.how-title h2 { font: 400 27px/1.3 var(--serif); letter-spacing: -.55px; }
.how-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; padding: 0; margin: 25px 0 0; list-style: none; }
.how-index { display: block; margin-bottom: 8px; color: var(--muted); font: italic 19px/1.4 var(--serif); }
.how-steps h3 { font: 400 21px/1.4 var(--serif); letter-spacing: -.25px; }
.how-steps p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.history-section { display: grid; grid-template-columns: 1fr 1.6fr; gap: 54px; max-width: 980px; margin: 0 auto; padding: 43px 0; border-top: 1px solid var(--line); }
.history-intro h2 { margin-top: 13px; font: 400 29px/1.25 var(--serif); letter-spacing: -.6px; }
.history-intro > p:last-child { max-width: 250px; margin-top: 13px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.history-content { min-width: 0; }
.history-empty { padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.history-empty p { font: italic 23px/1.4 var(--serif); }
.history-empty span { display: block; margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.history-row:first-child { border-top: 1px solid var(--line); }
.history-date { color: var(--muted); font-size: 12px; }
.history-word { font: 400 23px/1.3 var(--serif); overflow-wrap: anywhere; }
.history-result { color: var(--muted); font-size: 12px; white-space: nowrap; }
.history-row.quiet .history-word { color: var(--muted); font-style: italic; font-size: 19px; }
.history-more { margin-top: 12px; }
.faq-section { display: grid; grid-template-columns: 1fr 1.6fr; gap: 54px; max-width: 980px; margin: 0 auto; padding: 43px 0 53px; border-top: 1px solid var(--line); }
.faq-title h2 { margin-top: 13px; font: 400 29px/1.3 var(--serif); letter-spacing: -.6px; }
.faq-list { min-width: 0; }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; font-size: 13px; line-height: 1.6; }
summary::-webkit-details-marker { display: none; }
summary > span { color: var(--muted); font-size: 20px; font-weight: 300; line-height: 1; flex-shrink: 0; transition: transform .18s ease; }
details[open] summary > span { transform: rotate(45deg); }
details p { padding: 0 25px 18px 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0 31px; border-top: 1px solid var(--line); }
.footer-brand { font: 400 21px/1.3 var(--serif); letter-spacing: -.5px; text-decoration: none; }
.site-footer p { color: var(--muted); font: italic 14px/1.5 var(--serif); }
.site-footer > a:last-child { color: var(--muted); font-size: 12px; text-decoration: none; }
.site-footer > a:last-child span { margin-left: 7px; color: var(--accent); }
.connection-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 10px 14px; border-left: 2px solid var(--accent); background: var(--surface); }
.connection-notice p { font-size: 13px; }
.connection-notice button { flex-shrink: 0; }
.no-script { position: fixed; inset: auto 0 0; z-index: 20; padding: 18px; background: var(--ink); color: var(--paper); text-align: center; font-size: 14px; }
@keyframes new-word { from { opacity: .15; } to { opacity: 1; } }

@media (max-width: 1000px) {
  .page-shell { width: calc(100% - 64px); }
  .poem-section { padding-top: 29px; }
  .poem-text { max-width: 780px; font-size: clamp(44px, 5.5vw, 55px); letter-spacing: -1.3px; }
  .participation-grid { gap: 33px; }
  .day-clock { grid-template-columns: auto; }
  .day-clock > p:first-child { font-size: 11px; }
  .clock-footnote { grid-column: auto; }
  .how-steps { gap: 27px; }
  .history-section, .faq-section { gap: 35px; }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 16px; }
  .page-shell { width: calc(100% - 40px); }
  .site-header { min-height: 68px; gap: 15px; }
  .brand { font-size: 23px; letter-spacing: -.7px; }
  .header-nav { gap: 19px; font-size: 12px; }
  .theme-toggle { width: 40px; height: 44px; padding: 11px 9px; margin-right: -9px; }
  .theme-toggle svg { width: 19px; height: 19px; }
  .poem-section { padding: 25px 0 18px; }
  .section-topline { justify-content: flex-start; gap: 8px; margin-bottom: 19px; }
  .section-topline h2, .word-count { font-size: 11px; }
  .poem-text { font-size: clamp(32px, 7.9vw, 38px); line-height: 1.47; letter-spacing: -.85px; text-align: left; }
  .poem-empty { max-width: none; padding: 8px 0 11px; text-align: left; }
  .poem-empty h3 { font-size: 32px; line-height: 1.4; letter-spacing: -.75px; }
  .poem-empty p { margin: 12px 0 0; font-size: 13px; line-height: 1.8; }
  .poem-reading-controls { justify-content: flex-start; column-gap: 13px; margin-bottom: 13px; }
  .poem-range-note, .poem-toggle { font-size: 12px; }
  .poem-reading.is-expanded .poem-text { font-size: 28px; line-height: 1.55; letter-spacing: -.5px; }
  .poem-reading.is-expanded .poem-reading-controls { margin-bottom: 15px; }
  .poem-toolbar { justify-content: space-between; gap: 15px; padding-top: 13px; }
  .still-becoming, .share-button { font-size: 11px; }
  .share-feedback { text-align: left; font-size: 12px; }
  .participation-section { padding: 21px 0 30px; }
  .participation-heading { gap: 17px; margin-bottom: 20px; }
  .participation-heading h2 { font-size: 25px; }
  .day-meta { max-width: 200px; column-gap: 6px; margin-top: 7px; font-size: 11px; }
  .day-clock { flex-shrink: 0; max-width: 137px; }
  .day-clock > p:first-child { font-size: 10px; }
  .countdown { font-size: 20px; letter-spacing: .2px; }
  .clock-footnote { font-size: 10px; }
  .participation-grid { display: block; }
  #word-input { height: 50px; font-size: 22px; }
  #word-input::placeholder { font-size: 21px; }
  .primary-button { min-width: 84px; min-height: 50px; }
  .participation-note { margin-top: 10px; }
  .voting-panel { margin-top: 25px; }
  .candidates-heading { margin-bottom: 9px; }
  .word-choice { min-height: 52px; }
  .candidate-word { font-size: 23px; }
  .vote-note { margin-top: 9px; }
  .how-section { padding: 28px 0 31px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.1px; }
  .how-title { display: block; }
  .how-title h2 { margin-top: 9px; font-size: 26px; }
  .how-steps { display: block; margin-top: 21px; }
  .how-steps li { position: relative; padding-left: 35px; margin-top: 22px; }
  .how-index { position: absolute; left: 0; top: 0; font-size: 18px; }
  .how-steps h3 { font-size: 21px; }
  .how-steps p { margin-top: 6px; font-size: 13px; }
  .history-section, .faq-section { display: block; padding: 31px 0; }
  .history-intro h2, .faq-title h2 { margin-top: 9px; font-size: 27px; }
  .history-intro h2 br { display: none; }
  .history-intro > p:last-child { max-width: none; margin-top: 10px; }
  .history-content, .faq-list { margin-top: 22px; }
  .history-row { grid-template-columns: 88px minmax(0, 1fr) auto; gap: 12px; }
  .history-date, .history-result { font-size: 11px; }
  .history-word { font-size: 22px; }
  .history-empty p { font-size: 22px; }
  .site-footer { flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; padding: 22px 0 25px; }
  .site-footer p { font-size: 13px; }
  .site-footer > a:last-child { width: 100%; font-size: 11px; }
  .connection-notice { align-items: flex-start; gap: 11px; padding: 10px 12px; }
  .connection-notice p { font-size: 12px; }
}

@media (max-width: 380px) {
  .page-shell { width: calc(100% - 32px); }
  .brand { font-size: 22px; }
  .header-nav { gap: 13px; }
  .section-topline { gap: 6px; }
  .section-topline h2, .word-count { font-size: 10px; }
  .poem-text { font-size: 32px; }
  .poem-empty h3 { font-size: 29px; }
  .participation-heading { gap: 12px; }
  .participation-heading h2 { font-size: 23px; }
  .day-meta .eyebrow-separator { display: none; }
  .day-meta time { width: 100%; }
  .day-clock { max-width: 125px; }
  .countdown { font-size: 19px; }
  .primary-button { min-width: 76px; padding: 10px 12px; }
  #word-input { padding-left: 12px; }
  .input-count { right: 10px; }
  .candidate-side { gap: 9px; }
  .history-row { grid-template-columns: 83px minmax(0, 1fr) auto; gap: 8px; }
  .history-date, .history-result { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  :root, html[data-theme="light"], html[data-theme="dark"] { color-scheme: light; --paper: #fff; --ink: #222; --muted: #666; --line: #ddd; --accent: #4d5e45; }
  body { background: white; }
  .header-nav, .participation-section, .how-section, .history-section, .faq-section, .site-footer, .share-button, .share-feedback, .poem-reading-controls, .connection-notice, .skip-link { display: none; }
  .page-shell { width: 100%; }
  .site-header { min-height: 65px; }
  .poem-section { padding-top: 30px; }
  .poem-text, .poem-reading.is-expanded .poem-text { max-width: none; font-size: 27px; line-height: 1.6; }
  .poem-space { display: none; }
}
