/*
 * The multi-check flow's own components (/hearing-check/full only; platform
 * spec §5.2, §7, WP6). Linked from that page's shell and nowhere else, so the
 * OHC pages never load it.
 *
 * Built on styles.css: its tokens, its type, its cards and buttons, and its
 * dvh fit (--hc-v). Nothing here adds a colour; urgency is the ink tokens plus
 * an icon and words. Every selector names one of the new classes
 * (hc-opt, hc-opt-grid, hc-checkrow, hc-checkrow-list, hc-rung, hc-checks,
 * hc-checktag, hc-urgent-panel, hc-features), so no rule here can restyle an
 * OHC screen on its own: tools/hearing-test/ohc-freeze.test.ts holds that.
 *
 * Fit: every screen but the result fits 390×664. Vertical sizes follow
 * styles.css's rule, clamp(floor, var(--hc-v) × design/8.44, design), scoped
 * to .hc-screen:not(.hc-result); floors 48 px for a tap target, 15 px for text.
 */

/* ── one-tap options ───────────────────────────────────────────────────── */

.hc-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--hc-surface);
  color: var(--hc-ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.hc-opt > svg {
  flex-shrink: 0;
  visibility: hidden;
}
.hc-opt[aria-pressed='true'] {
  background: var(--hc-accent);
  color: #FFFFFF;
}
.hc-opt[aria-pressed='true'] > svg {
  visibility: visible;
}
.hc-opt:active {
  transform: translateY(1px);
}
.hc-screen:not(.hc-result) .hc-opt {
  min-height: clamp(48px, calc(var(--hc-v) * 6.64), 56px);
  padding-block: clamp(6px, calc(var(--hc-v) * 1.18), 10px);
  font-size: clamp(17px, calc(var(--hc-v) * 2.25), 19px);
}

/* q-age: the six bands in two columns. */
.hc-opt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.hc-opt-grid .hc-opt {
  padding-inline: 16px 12px;
}
.hc-opt-grid + .hc-link[aria-pressed='true'] {
  font-weight: 800;
}

/* ── warning signs: tick-any rows, and the urgent screens ─────────────── */

.hc-checkrow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hc-checkrow[data-flag] {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 6px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--hc-surface);
  color: var(--hc-ink);
  font-size: 17px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.hc-checkrow[data-flag] > svg {
  flex-shrink: 0;
  color: var(--hc-muted);
}
.hc-checkrow[data-flag][aria-pressed='true'] {
  box-shadow: inset 0 0 0 2px var(--hc-accent);
  font-weight: 700;
}
.hc-screen:not(.hc-result) .hc-checkrow[data-flag] {
  min-height: clamp(48px, calc(var(--hc-v) * 6.64), 56px);
}
.hc-screen:not(.hc-result) .hc-checkrow-list {
  gap: clamp(6px, calc(var(--hc-v) * 0.95), 8px);
}

/* rf-urgent, rf-emergency, tn-support: the ink disc and the ink banner. */
.hc-urgent-panel .hc-disc {
  background: var(--hc-panel);
  color: #FFFFFF;
}
.hc-screen-top.hc-urgent-panel .hc-disc {
  width: clamp(60px, calc(var(--hc-v) * 9.5), 80px);
  height: clamp(60px, calc(var(--hc-v) * 9.5), 80px);
}
.hc-screen-top.hc-urgent-panel .hc-disc svg {
  width: clamp(32px, calc(var(--hc-v) * 5.2), 44px);
  height: clamp(32px, calc(var(--hc-v) * 5.2), 44px);
}
.hc-urgent-panel .hc-banner-dark {
  align-items: flex-start;
}
.hc-urgent-panel .hc-banner-dark > svg {
  margin-top: 1px;
}
/* The call line sits on the page's ground here, not in the dark card. */
.hc-urgent-panel .hc-call,
.hc-urgent-panel a.hc-call:hover {
  color: var(--hc-accent);
}
.hc-urgent-panel .hc-fineprint {
  margin-top: -4px;
}
/* A crisis number on one line: screens-full.js wraps each dashed number
   (9-8-8) in .hc-nowrap, so it never breaks as "9-" and "8-8". */
.hc-urgent-panel .hc-nowrap,
.hc-rung .hc-nowrap,
.hc-checks .hc-nowrap {
  white-space: nowrap;
}

/* ── the features sheet (buds-setup), and the link that opens it ─────────
   The link sits inside step 3's text, so it is inline at the text's size;
   its tap area reaches 48 px tall without making the line taller. */

.hc-link.hc-features {
  position: relative;
  display: inline;
  min-height: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
}
.hc-link.hc-features::after {
  content: '';
  position: absolute;
  inset: -14px -6px;
}

.hc-features .hc-tips {
  gap: 8px;
}
.hc-features .hc-tip {
  padding: 12px 14px;
}

/* ── the combined result: the rung head and "Your checks" ──────────────── */

.hc-rung {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px 22px;
  border-radius: 22px;
  background: var(--hc-surface);
  text-align: center;
}
/* One size for every rung's icon (the info drawing is 20 px by default), in the accent like the band icons. */
.hc-rung > svg {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  color: var(--hc-accent);
}
.hc-rung .hc-disc {
  width: 72px;
  height: 72px;
  background: var(--hc-panel);
  color: #FFFFFF;
}
/* Left-aligned: the combined heads run to six or seven lines, too long to read centred. */
.hc-rung .hc-summary {
  align-self: stretch;
  margin: 0;
  text-align: left;
}
/* The tappable 9-8-8 buttons under the panel. */
.hc-rung .hc-actions {
  align-self: stretch;
  margin-top: 6px;
}
.hc-rung .hc-banner-dark {
  align-self: stretch;
  align-items: flex-start;
  margin-top: 6px;
  text-align: left;
}
.hc-rung .hc-banner-dark > svg {
  margin-top: 1px;
}
.hc-rung .hc-banner-dark p {
  margin: 0;
}
.hc-rung .hc-banner-dark p + p {
  margin-top: 8px;
}

.hc-checks .hc-checkrow-list {
  gap: 0;
}
.hc-checks .hc-checkrow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}
.hc-checks .hc-checkrow + .hc-checkrow {
  border-top: 1px solid var(--hc-line);
}
.hc-checks .hc-checkrow > svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 1px;
}
.hc-checks .hc-checkrow[data-outcome='urgent'] > svg,
.hc-checks .hc-checkrow[data-outcome='info'] > svg,
.hc-checks .hc-checkrow[data-outcome='notDone'] > svg {
  color: var(--hc-ink);
}
.hc-checks .hc-row-text {
  flex-grow: 1;
  gap: 4px;
  min-width: 0;
}
.hc-checks .hc-row-title {
  font-size: 18px;
}
.hc-checks .hc-row-body {
  font-size: 16px;
  color: var(--hc-ink-3);
}
.hc-checktag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--hc-surface-2);
  color: var(--hc-ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.hc-checkrow[data-outcome='urgent'] .hc-checktag {
  background: var(--hc-panel);
  color: #FFFFFF;
}
.hc-checkrow[data-outcome='mention'] .hc-checktag,
.hc-checkrow[data-outcome='book'] .hc-checktag {
  background: var(--hc-accent-tint);
  color: var(--hc-ink);
}

/* ── the hub: compact path cards, icon beside the words, so the WHO card fits 390x664 ── */

.hc-hub .hc-mode {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: clamp(12px, calc(var(--hc-v) * 1.8), 16px) 16px;
}
.hc-hub .hc-mode-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.hc-hub .hc-mode-icon svg {
  width: 28px;
  height: 28px;
}
/* 20 px at the design's 844, 18 px on a 664 phone: there "Earbuds or headphones"
   and "Phone speaker" with its tag each keep to one line, so the hub still fits
   with M2's longer earbud line (WP7). */
.hc-hub .hc-mode-title {
  font-size: clamp(18px, calc(var(--hc-v) * 2.37), 20px);
}
.hc-hub .hc-mode-title .hc-tag {
  display: inline-block;
  margin-left: 6px;
  vertical-align: 3px;
  font-size: 13px;
}
.hc-hub .hc-mode-body {
  font-size: 16px;
}
.hc-hub .hc-mode > svg {
  flex-shrink: 0;
}

/* The hub's note for a computer (round-5 review: the screens after it talk about
   a phone). Shown only with a fine pointer on a wide screen, never on a phone. */
.hc-desk-note {
  display: none;
}
@media (pointer: fine) and (min-width: 768px) {
  .hc-hub .hc-desk-note {
    display: flex;
  }
}
