/* Layout idea: a newspaper front page reduced to one question at a time.
   Ink on paper, one press-red accent for the single thing to do next. */
:root {
  --paper: #f6f7f9;
  --card: #ffffff;
  --ink: #101828;
  --soft: #5b6475;
  --rule: #d5d9e2;
  --accent: #c8102e;
  --accent-ink: #ffffff;
  --picked: #101828;
  --picked-ink: #ffffff;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0d1117; --card: #171c26; --ink: #eef1f6; --soft: #a0a9ba; --rule: #2e3646;
    --accent: #ff5a6e; --accent-ink: #160307; --picked: #eef1f6; --picked-ink: #0d1117;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.45; }

.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px;
  padding: 14px 20px 10px; border-bottom: 3px double var(--ink);
  max-width: 760px; margin: 0 auto;
}
.brand { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .01em; }
.brand b { font-weight: 700; }
.edition { color: var(--soft); font-size: .85rem; font-style: italic; }

.progress { max-width: 760px; margin: 0 auto; height: 4px; background: var(--rule); }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }

main { max-width: 760px; margin: 0 auto; padding: 28px 20px 48px; display: flex; flex-direction: column; gap: 20px; }
h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.12; margin: 0; text-wrap: balance; font-weight: 700; }
h2 { font-family: var(--font-display); font-size: 1.2rem; margin: 0; }
p { margin: 0; }
.help { color: var(--soft); }
.step { color: var(--soft); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choice {
  display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%;
  padding: 14px 16px; border: 2px solid var(--rule); border-radius: 12px; background: var(--card);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.choice small { font-weight: 400; color: var(--soft); font-size: .88rem; }
.choice:hover { border-color: var(--ink); }
.choice[aria-pressed="true"] { background: var(--picked); border-color: var(--picked); color: var(--picked-ink); }
.choice[aria-pressed="true"] small { color: var(--picked-ink); opacity: .8; }
.choice:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible, .link:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

.topic-group { border-top: 1px solid var(--rule); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .choice { width: auto; padding: 9px 14px; border-radius: 999px; font-weight: 500; }

input[type="text"], textarea {
  width: 100%; padding: 13px 14px; border: 2px solid var(--rule); border-radius: 12px;
  background: var(--card); color: var(--ink); font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.btn {
  padding: 13px 22px; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent);
  color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer;
}
.btn.quiet { background: transparent; border-color: var(--rule); color: var(--ink); font-weight: 600; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: none; padding: 4px 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

.error { color: var(--accent); font-weight: 600; }

.summary { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; }
.summary-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 6px 16px; padding: 14px 16px; border-top: 1px solid var(--rule); align-items: baseline; }
.summary-row:first-child { border-top: none; }
.summary-row dt { font-family: var(--font-display); font-weight: 700; }
.summary-row dd { margin: 0; }
@media (max-width: 560px) {
  .summary-row { grid-template-columns: 1fr auto; }
  .summary-row dd { grid-column: 1 / -1; grid-row: 2; }
}
.note { border-left: 4px solid var(--accent); padding: 4px 0 4px 14px; color: var(--soft); }
@media (prefers-reduced-motion: reduce) { .progress-bar { transition: none; } }
