/* The research activities (name.html, describe.html): one look for both, in the site's own terms. A player that shows
   the sound as it plays (a waveform, violet for an imagined bird and green for a recording, as everywhere on the site),
   choices as square cells joined edge to edge as in Layers. Type on the site's scale, as the Data page sets it: a 32 px
   title, a 17 px lede in the quiet ink, questions at 17 px weight 500 as the front page's card titles, and two kinds of
   small text, a cell's word at 15 px in ink and everything about it at 13 px quiet. */

body { overflow: auto; font-size: 15px; line-height: 1.55; }
.page { max-width: 640px; margin: 0 auto; padding: 32px var(--gutter) 64px; }
.page h1 { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.lede { max-width: 54ch; margin: 10px 0 24px; color: var(--ink-quiet); font-size: 17px; line-height: 1.6; }
.step[hidden] { display: none; }
.step { padding: 26px 0; border-top: 1px solid var(--rule); }
.step > p:first-child { margin-top: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.consent__head { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.kept { margin: 0 0 18px; padding: 0 0 0 18px; }
.kept li::marker { color: var(--ink-quiet); }
.fine { margin: 0 0 22px; color: var(--ink-quiet); font-size: 13px; line-height: 1.55; }
.count { margin: 0 0 16px; color: var(--ink-quiet); font-size: 13px; font-variant-numeric: tabular-nums; }
.saving { margin: 12px 0 0; color: var(--ink-quiet); font-size: 13px; }

/* Buttons: the main one filled in ink; when it can't be pressed yet, an outline (not a grey slab); the rest as text. */
.primary { padding: 12px 18px; font-size: 15px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font: inherit; text-decoration: none; cursor: pointer; }
.primary:disabled { border-color: var(--rule); background: none; color: var(--ink-quiet); cursor: default; }
.quiet { padding: 6px 0; border: 0; background: none; color: var(--ink-quiet); font: inherit; font-size: 15px; cursor: pointer; }
.quiet:hover { color: var(--ink); }
.primary, .quiet, .player__play, .choice, .trio button { touch-action: manipulation; }
.primary:focus-visible, .quiet:focus-visible, .player__play:focus-visible, .choice:focus-visible, .trio button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The player: a play button and the sound's waveform beside it, the part played so far solid. */
.player { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 16px; margin: 0 0 8px; }
.player__play { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid var(--ink-quiet); border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.player__play:hover { border-color: var(--ink); }
.player__play:disabled { opacity: 0.35; cursor: default; }
.player__play svg { width: 16px; height: 16px; fill: currentColor; }
.player__play .stop, .player__play.is-playing .play { display: none; }
.player__play.is-playing .stop { display: inline; }
.player__wave { display: block; width: 100%; height: 56px; }
.player__note { margin: 0 0 24px; color: var(--ink-quiet); font-size: 13px; }

/* Questions and their choices: joined cells, two to a row on a phone, three on a wider screen, a last cell on its own
   stretching to fill its row (as in Layers); a cell's hint under its word. "Can't tell" and "Not sure" are cells like
   the rest, so not knowing is as easy to say as any answer. */
fieldset { margin: 0 0 26px; padding: 0; border: 0; }
legend, .ask { padding: 0; margin: 0 0 12px; font-size: 17px; font-weight: 500; line-height: 1.35; }
.choices { display: flex; flex-wrap: wrap; padding: 1px 0 0 1px; }
.choice { flex: 1 0 40%; display: grid; align-content: start; gap: 3px; min-height: 56px; margin: -1px 0 0 -1px; padding: 10px 12px; border: 1px solid var(--rule); background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.choice small { color: var(--ink-quiet); font-size: 13px; line-height: 1.4; }
.choice:hover { border-color: var(--ink-quiet); position: relative; }
.choice[aria-pressed="true"] { position: relative; border-color: var(--ink); background: var(--ink); color: var(--bg); }
.choice[aria-pressed="true"] small { color: var(--bg); opacity: 0.75; }
@media (min-width: 560px) { .choice { flex-basis: 30%; } }

label { display: block; margin: 0 0 24px; font-size: 17px; font-weight: 500; line-height: 1.35; }
label span { display: block; margin-bottom: 8px; }
label em { color: var(--ink-quiet); font-style: normal; font-size: 13px; font-weight: 400; margin-left: 4px; white-space: nowrap; }
textarea, input[type="text"] { width: 100%; padding: 11px 12px; border: 1px solid var(--rule); border-radius: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; line-height: 1.45; }
textarea { min-height: 76px; resize: vertical; }
textarea:focus, input:focus { outline: none; border-color: var(--ink); }
.how { margin: -12px 0 22px; color: var(--ink-quiet); font-size: 13px; line-height: 1.55; }

/* Name a bird: clues, one at a time, and the reveal. */
.clues { display: grid; gap: 12px; margin: 0 0 8px; }
.clue { padding: 12px 14px; border: 1px solid var(--rule); }
.clue__title { margin: 0 0 6px; color: var(--ink-quiet); font-size: 13px; }
.clue p:last-child { margin: 0; }
.clue canvas { display: block; width: 100%; height: 170px; }
.clue-button { margin: 0 0 22px; }
.reveal { display: grid; grid-template-columns: 1fr 180px; gap: 18px; align-items: center; }
.reveal canvas { width: 180px; height: 135px; }
.names p { margin: 0 0 10px; line-height: 1.45; }
.names .yours { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.names .rule { font-size: 18px; }
.names i { color: var(--ink-quiet); }
.between, .aka { color: var(--ink-quiet); font-size: 14px; }
.said { margin: 16px 0 22px; padding: 0 0 0 14px; border-left: 2px solid var(--rule); color: var(--ink-quiet); font-size: 14px; line-height: 1.55; }
.said:empty { display: none; }
.others { margin: 0 0 22px; }
.others__title { margin: 0 0 8px; color: var(--ink-quiet); font-size: 13px; }
.others__list { margin: 0; padding: 0; list-style: none; }
.others__list li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.others__name { flex: 1; }
.others__votes { color: var(--ink-quiet); font-size: 13px; font-variant-numeric: tabular-nums; }
.vote { padding: 4px 10px; border: 1px solid var(--rule); background: none; color: var(--ink-quiet); font: inherit; font-size: 13px; cursor: pointer; touch-action: manipulation; }
.vote:hover { border-color: var(--ink); color: var(--ink); }
.vote.is-mine { border-color: var(--ink); background: var(--ink); color: var(--bg); }
@media (max-width: 520px) {
  .reveal { grid-template-columns: 1fr; }
  .reveal canvas { justify-self: center; }
}

/* Describe a sound: the reveal, what others said, and the odd one out. */
.answer { margin: 0 0 8px; font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.measured { margin: 0 0 18px; color: var(--ink-quiet); line-height: 1.5; }
.who { margin: 0 0 22px; font-size: 16px; }
.who small { display: block; margin-top: 4px; color: var(--ink-quiet); font-size: 13px; }
.who a { color: inherit; }
.crowd { margin: 0 0 22px; }
.crowd__title { margin: 0 0 8px; color: var(--ink-quiet); font-size: 13px; }
.crowd__sub { margin: 12px 0 4px; font-size: 13px; }
.crowd__row { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; padding: 3px 0; font-size: 14px; }
.crowd__bar { height: 8px; background: var(--rule); }
.crowd__bar i { display: block; height: 100%; background: var(--ink-quiet); }
.crowd__row.is-yours { font-weight: 500; }
.crowd__row.is-yours .crowd__bar i { background: var(--ink); }
.crowd__n { color: var(--ink-quiet); font-variant-numeric: tabular-nums; text-align: right; }
/* Three sounds as three joined cells: each a letter, a play button and its own small waveform, and under them the
   cell's "Odd one out" choice. */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 22px; padding: 1px 0 0 1px; }
.trio__sound { display: grid; grid-template-rows: auto auto auto; margin: -1px 0 0 -1px; border: 1px solid var(--rule); }
.trio__sound.is-picked { position: relative; border-color: var(--ink); }
.trio__top { display: flex; align-items: center; gap: 10px; padding: 12px 12px 4px; }
.trio__name { color: var(--ink-quiet); font-size: 13px; }
.trio .player__play { width: 40px; height: 40px; }
.trio .player__play svg { width: 13px; height: 13px; }
.trio__wave { display: block; width: calc(100% - 24px); height: 34px; margin: 6px 12px 12px; }
.trio__pick { min-height: 44px; border: 0; border-top: 1px solid var(--rule); background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.trio__pick:disabled { color: var(--ink-quiet); opacity: 0.6; cursor: default; }
.trio__pick[aria-pressed="true"] { border-top-color: var(--ink); background: var(--ink); color: var(--bg); }
