/* Hearing range check: the set-up steps, the tone being played with its two
   answer buttons, the result, and the ladder of 33 tones. Site tokens only. */
.ht-disclaimer { max-width: 780px; }
.ht-k { margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.ht-h { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.ht-n { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 600 14px/1 var(--f-body); }

.ht-setup { display: grid; gap: 22px; }
.ht-block { display: grid; gap: 12px; }
.ht-block > p { margin: 0; max-width: 70ch; }
.ht-opts { display: flex; flex-wrap: wrap; gap: 14px 28px; }

.ht-run { display: grid; gap: 14px; justify-items: start; }
.ht-progress { margin: 0; color: var(--muted); font-weight: 500; }
.ht-freq { display: flex; align-items: baseline; gap: 8px; margin: 0; font: 600 clamp(56px, 12vw, 104px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.ht-freq .u { font: 500 22px/1 var(--f-body); color: var(--muted); }
.ht-playing { display: flex; align-items: center; gap: 10px; min-height: 1.6em; margin: 0; font-weight: 500; }
.ht-answer button { min-width: 190px; }
.ht-answer kbd, .ht-run .quiet kbd { margin-left: 2px; color: var(--ink); }

.ht-result { display: grid; gap: 14px; }
.ht-verdict { margin: 0; max-width: 70ch; font-size: 17px; }

/* The ladder: a cell per tone. A mark (✓, ✕, –) joins the colour, so the
   state never rests on colour alone. */
.ht-ladder-wrap { display: grid; gap: 4px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ht-ladder-wrap > .ht-k { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.ht-key { white-space: nowrap; }
.ht-ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ht-cell { display: grid; justify-items: center; gap: 3px; padding: 6px 2px 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); color: var(--muted); font: 500 12px/1.2 var(--f-mono); }
.ht-cell-m { min-height: 15px; font: 700 14px/1.1 var(--f-body); }
.ht-cell.is-heard { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); color: var(--ok); }
.ht-cell.is-missed { border-color: color-mix(in srgb, var(--crit) 35%, transparent); background: var(--crit-soft); color: var(--crit); }
.ht-cell.is-current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--panel); color: var(--ink); }
.ht-cell.is-skipped, .ht-cell.is-untested { border-style: dashed; background: transparent; }

@media (max-width: 520px) {
  .ht-answer { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .ht-answer button { min-width: 0; }
}
