/* Can You Hear It? — shared styles, matching the D-18 Listening Project letterpress look */
:root {
  --paper: #f7eee0;
  --paper-2: #eadbc0;
  --card: #fbf6ec;
  --ink: #3a2a1e;
  --ink-soft: #5c4636;
  --brown: #7a5530;
  --accent: #a8391f;
  --accent-ink: #8a2c17;
  --rule: #c9b394;
  --frame: #7a5a3a;
  --tan: #d8c6a6;
  --ok: #2f5d3a;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", "Helvetica Neue", Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.frame { border: 2px solid var(--frame); padding: 6px; background: #faf3e6; }
.frame-inner { border: 1px solid var(--rule); padding: 28px 22px 26px; }
@media (min-width: 640px) { .frame-inner { padding: 40px 48px 36px; } }

.eyebrow {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--sans); font-weight: 600; font-size: 12px;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--brown);
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
h1 {
  margin: 14px 0 6px; font-weight: 700; line-height: 1.05;
  font-size: clamp(38px, 9vw, 60px); letter-spacing: -0.01em;
}
h1 .red { color: var(--accent); }
.matchup { margin: 0; font-size: clamp(20px, 4.6vw, 26px); color: var(--ink-soft); }
.matchup b { color: var(--ink); }
h2 {
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--brown);
  margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule);
}
h3 { margin: 0; font-size: 22px; line-height: 1.2; }
p { margin: 0 0 12px; }
.lede { font-size: 19px; margin-top: 18px; }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; }
.italic { font-style: italic; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; }

.notice {
  margin: 20px 0; padding: 16px 18px; background: var(--card);
  border: 1.5px solid var(--accent);
}
.notice.calm { border-color: var(--rule); }

/* ---- questions ---- */
fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; font-size: 19px; margin-bottom: 4px; }
legend .opt { font-weight: 400; font-style: italic; color: var(--ink-soft); font-size: 16px; }
.hint { font-size: 15px; color: var(--ink-soft); margin: 0 0 10px; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choices.wide { grid-template-columns: 1fr; }
@media (min-width: 640px) { .choices.wide { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 10px 14px;
  background: var(--card); border: 1.5px solid var(--rule); color: var(--ink);
  font-size: 18px; line-height: 1.3; transition: background 0.12s, border-color 0.12s;
}
.choice:hover span { border-color: var(--brown); }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
textarea {
  width: 100%; min-height: 96px; padding: 12px; font: inherit; font-size: 17px;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--rule); resize: vertical;
}
textarea:focus-visible, input[type="text"]:focus-visible, input[type="password"]:focus-visible,
input[type="datetime-local"]:focus-visible, input[type="number"]:focus-visible, select:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 1px;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-family: var(--sans); font-weight: 600;
  font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
}
button:hover, .btn:hover { background: var(--accent-ink); color: #fff; }
button:focus-visible, .btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
button[disabled] { opacity: 0.55; cursor: progress; }
button.secondary { background: transparent; color: var(--brown); border: 1.5px solid var(--brown); }
button.secondary:hover { background: var(--brown); color: #fff; }
button.small { min-height: 40px; padding: 8px 14px; font-size: 12px; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; }
.error { color: var(--accent-ink); font-weight: 600; }

/* ---- reveal ---- */
.pair { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 560px) { .pair { grid-template-columns: 1fr 1fr; } }
.gcard { background: var(--card); border: 1.5px solid var(--rule); padding: 16px 18px; }
.gcard .tag {
  font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--accent);
}
.gcard .specs { margin: 6px 0 0; color: var(--ink-soft); font-size: 16px; }
.headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 18px 0 8px; }
.headline .num { font-weight: 700; font-size: clamp(56px, 14vw, 84px); line-height: 1; color: var(--accent); }
.headline .what { font-size: 20px; }

.bar { display: flex; height: 40px; width: 100%; border: 1px solid var(--frame); background: var(--card); overflow: hidden; }
.bar > div {
  display: flex; align-items: center; justify-content: center; min-width: 0;
  font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden;
}
.seg-a { background: var(--accent); color: #fff; }
.seg-b { background: var(--brown); color: #fff; }
.seg-n { background: var(--tan); color: var(--ink); }
.seg-ok { background: var(--accent); color: #fff; }
.seg-rev { background: var(--tan); color: var(--ink); }
.barrow { margin: 0 0 18px; }
.barrow .q { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; margin-bottom: 6px; }
.barrow .q .n { font-weight: 400; color: var(--ink-soft); font-size: 15px; white-space: nowrap; }
.legend { font-size: 15px; color: var(--ink-soft); margin-top: 6px; }
.legend b { color: var(--ink); }

.keybox { background: var(--card); border: 1px dashed var(--frame); padding: 12px 14px; word-break: break-all; }
.verify-ok { color: var(--ok); font-weight: 600; }

footer.site {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--rule);
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--brown);
}
.center { text-align: center; }
.hidden { display: none !important; }
.spinner { padding: 40px 0; text-align: center; color: var(--ink-soft); font-style: italic; }
