/* ==========================================================================
   Paddy Prompt Studio — hearing test
   Layers on /blog/style.css and /tools/shared/tool-common.css.
   ========================================================================== */

.ht [hidden] { display: none !important; }
.ht-challenge {
  margin: 0 0 0.9rem; padding: 0.6rem 0.9rem; border-radius: 12px; text-align: center;
  background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3); color: #fde68a; font-weight: 600;
}
.ht-setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.8rem; }
.ht-vol-row { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem; align-items: center; gap: 0.6rem; }
.ht-vol-out { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85rem; text-align: right; }
.ht.loud .ht-vol-out { color: #fcd34d; }
.ht-loud-warn { display: none; margin: 0.35rem 0 0; font-size: 0.78rem; color: #fcd34d; }
.ht.loud .ht-loud-warn { display: block; }
.ht-intro { margin: 0.9rem 0 0; text-align: center; color: var(--text-muted); font-size: 0.92rem; }
.ht-start-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 0.9rem; }
.ht-start { min-width: 15rem; min-height: 54px; font-size: 1.05rem; border-radius: 14px; }

/* Setup vs. test view */
.ht-test { display: none; }
.ht[data-step="test"] .ht-test { display: block; }
.ht[data-step="test"] .ht-setup { display: none; }

.ht-stage { text-align: center; padding: 0.4rem 0 0.2rem; }
.ht-step-num { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--indigo); font-weight: 700; }
.ht-progress { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); margin: 0.6rem auto 1rem; max-width: 26rem; overflow: hidden; }
.ht-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #818cf8, #22d3ee); transition: width 0.3s ease; }

/* The "speaker" that pulses while a tone plays */
.ht-orb {
  position: relative; width: 9.5rem; height: 9.5rem; margin: 0 auto 0.9rem; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(129, 140, 248, 0.35), rgba(15, 18, 32, 0.9) 70%);
  border: 1px solid var(--border);
}
.ht-orb::before, .ht-orb::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, 0.5); opacity: 0;
}
.ht.beeping .ht-orb::before { animation: ht-ring 0.85s ease-out infinite; }
.ht.beeping .ht-orb::after { animation: ht-ring 0.85s ease-out 0.42s infinite; }
@keyframes ht-ring { from { transform: scale(0.9); opacity: 0.9; } to { transform: scale(1.35); opacity: 0; } }
.ht-freq {
  margin: 0; font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 800; color: #fff;
  font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1; font-variant-numeric: tabular-nums;
}
.ht-question { margin: 0 0 0.8rem; font-weight: 700; color: #fff; font-size: 1.1rem; }
.ht-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; max-width: 30rem; margin: 0 auto; }
.ht-answers button { min-height: 58px; font-size: 1.02rem; }
.ht-no { background: rgba(251, 113, 133, 0.1) !important; border-color: rgba(251, 113, 133, 0.45) !important; color: #fecdd3 !important; }
.ht-test-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.7rem; }

/* Result card */
.ht-result {
  margin-top: 1rem; padding: 1.2rem 1rem; text-align: center; border-radius: 18px;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.2), rgba(8, 145, 178, 0.14));
  border: 1px solid rgba(129, 140, 248, 0.4);
}
.ht-res-label { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: #a5b4fc; }
.ht-res-big { margin: 0.3rem 0 0; font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 800; font-size: clamp(2.4rem, 9vw, 3.4rem); line-height: 1; color: #fff; }
.ht-res-age { display: inline-block; margin: 0.6rem 0 0; padding: 0.25rem 0.8rem; border-radius: 999px; background: rgba(34, 211, 238, 0.15); color: #a5f3fc; font-weight: 700; }
.ht-res-say { margin: 0.7rem auto 0; max-width: 34rem; color: var(--text-muted); }
.ht-share { margin: 0.9rem auto 0; max-width: 34rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-soft); font-size: 0.85rem; color: var(--text); text-align: left; word-break: break-word; }
.ht-res-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.8rem; }

@media (max-width: 640px) {
  .ht-start { width: 100%; }
  .ht-orb { width: 8rem; height: 8rem; }
}
