/* Patient tool pages: hearing test, find care, report explainer. */
.tool-body footer.site { margin-top: 0; padding: 30px 0; }
.checklist { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 34px; font-size: 17px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(47, 193, 196, 0.15); box-shadow: inset 0 0 0 2px var(--teal); }
.checklist li::after { content: ""; position: absolute; left: 7px; top: 8px; width: 8px; height: 5px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.ht-step h2 + .muted, .panel h2 + .muted { margin-top: 10px; }
.ht-msg { margin-top: 16px; min-height: 1.6em; font-weight: 600; }
.ht-msg.good { color: var(--good); }
.ht-msg.bad { color: #ffb4b4; }

.ear-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; max-width: 520px; }
.ear-btn { display: grid; place-items: center; gap: 10px; padding: 24px 12px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: 600 17px/1.2 var(--body); cursor: pointer; transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out), border-color 0.25s; }
.ear-btn:hover { background: var(--panel-2); transform: translateY(-2px); border-color: var(--teal); }
.ear-mark { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 700 22px/1 var(--display); background: rgba(47, 193, 196, 0.14); color: var(--teal); }
.ear-btn[data-ear="right"] .ear-mark { background: rgba(255, 107, 107, 0.14); color: #ff8f8f; }

.test-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 20px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #2b5ea8); transform-origin: left; transform: scaleX(0); transition: transform 0.6s var(--ease-out); }
.hear-btn {
  position: relative; display: grid; place-items: center; width: min(280px, 72vw); aspect-ratio: 1; margin: 34px auto 6px;
  border-radius: 50%; border: 0; cursor: pointer; color: var(--accent-ink); font: 700 clamp(20px, 3vw, 26px)/1.2 var(--display);
  background: radial-gradient(circle at 35% 30%, #ffb08f, var(--accent) 60%, #e86f42);
  box-shadow: 0 26px 60px -20px rgba(255, 138, 91, 0.7), inset 0 -10px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s var(--ease-out);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
}
.hear-btn:active { transform: scale(0.96); }
.hear-btn .pulse { position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(255, 138, 91, 0.5); opacity: 0; pointer-events: none; }
.hear-btn.hit .pulse { animation: hit 0.6s var(--ease-out); }
@keyframes hit { from { opacity: 1; transform: scale(0.9); } to { opacity: 0; transform: scale(1.15); } }
#test-msg { text-align: center; color: var(--muted); }

.verdict { margin-top: 18px; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.verdict h3 { font-size: clamp(20px, 2.4vw, 26px); }
.verdict p { margin-top: 10px; color: #d4e7ea; }
.verdict .asym { color: #ffe3a3; }
.verdict.v-good { border-color: rgba(87, 217, 163, 0.5); }
.verdict.v-mild { border-color: rgba(255, 200, 87, 0.5); }
.verdict.v-mod, .verdict.v-sig { border-color: rgba(255, 107, 107, 0.55); }
.ear-scores { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; font-size: 15px; color: var(--muted); }
.ear-scores b { color: var(--text); }
.audiogram { margin: 24px 0 0; }
.audiogram svg { width: 100%; height: auto; }
.audiogram figcaption { margin-top: 8px; font-size: 14px; }
.ag-grid { stroke: rgba(160, 214, 222, 0.14); }
.ag-label { fill: var(--muted); font: 500 12px var(--mono); }
.ag-zone { fill: rgba(233, 245, 246, 0.45); font: 600 11px var(--body); }
.ag-right { stroke: #ff6b6b; stroke-width: 2.4; }
.ag-left { stroke: #5aa8ff; stroke-width: 2.4; fill: none; }

/* find care */
.chat { display: grid; gap: 14px; margin-top: 22px; }
.bubble { max-width: 640px; padding: 14px 18px; border-radius: 18px; line-height: 1.5; }
.bubble.me { justify-self: end; background: rgba(47, 193, 196, 0.16); border: 1px solid rgba(47, 193, 196, 0.35); border-bottom-right-radius: 6px; }
.bubble.us { background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.typing { display: inline-flex; gap: 5px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.spec-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.spec-pills span { padding: 7px 14px; border-radius: 999px; background: rgba(47, 193, 196, 0.14); color: #c8f1f2; font-weight: 600; font-size: 14.5px; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ex-chips button { background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); border-radius: 999px; padding: 8px 14px; font: 500 14px var(--body); cursor: pointer; }
.ex-chips button:hover { background: var(--panel-2); }

/* report */
.drop { display: grid; place-items: center; gap: 10px; text-align: center; padding: 34px 20px; border-radius: 20px; border: 2px dashed var(--line-strong); background: rgba(6, 25, 44, 0.4); cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.drop:hover, .drop.over { border-color: var(--teal); background: rgba(47, 193, 196, 0.06); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.thumbs figure { margin: 0; position: relative; width: 96px; height: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(6, 25, 44, 0.85); color: #fff; cursor: pointer; }
.rtable { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
.rtable th { text-align: left; font: 600 11.5px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line-strong); }
.rtable td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rtable td.val { font-weight: 700; white-space: nowrap; }
.rtable .meaning { color: var(--muted); font-size: 14px; margin-top: 4px; }
.st { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 700 11.5px/1.4 var(--mono); letter-spacing: 0.06em; }
.st.HIGH { background: rgba(255, 107, 107, 0.16); color: #ffb0b0; }
.st.LOW { background: rgba(90, 168, 255, 0.16); color: #a9cfff; }
.st.NORMAL { background: rgba(87, 217, 163, 0.14); color: #9ff0c9; }
.st.UNKNOWN { background: var(--panel-2); color: var(--muted); }
@media (max-width: 640px) {
  .rtable thead { display: none; }
  .rtable tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .rtable td { border: 0; padding: 0; }
  .rtable td.range { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }
}

/* privacy and terms */
.legal-page { max-width: 760px; }
.legal-page h1 { font-size: clamp(30px, 4vw, 48px); margin-top: 12px; }
.legal-page .updated { color: var(--muted); margin-top: 10px; font-size: 14px; }
.legal-page h2 { font-size: 20px; margin-top: 38px; }
.legal-page p, .legal-page li { color: #d3e6e8; margin-top: 12px; }
.legal-page ul { padding-left: 20px; }

/* audiometry booth */
.booth { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center; margin-top: 18px; }
.booth-left { display: grid; justify-items: center; }
.headset { width: 200px; height: auto; }
.headset .cup rect { fill: #10283d; stroke: #2a4a63; stroke-width: 3; transition: fill 0.4s var(--ease-out), stroke 0.4s; }
.headset .cup text { fill: #6f8fa0; font: 700 18px var(--display); transition: fill 0.4s; }
.headset.on-r .cup-r rect { fill: rgba(255, 107, 107, 0.22); stroke: #ff6b6b; filter: drop-shadow(0 0 12px rgba(255, 107, 107, 0.6)); }
.headset.on-r .cup-r text { fill: #ffd0d0; }
.headset.on-l .cup-l rect { fill: rgba(90, 168, 255, 0.22); stroke: #5aa8ff; filter: drop-shadow(0 0 12px rgba(90, 168, 255, 0.6)); }
.headset.on-l .cup-l text { fill: #d6e8ff; }
.freq-read { display: grid; justify-items: center; gap: 4px; margin-top: 8px; }
.freq-read b { font: 700 28px/1 var(--display); }
.booth .hear-btn { width: min(220px, 64vw); margin-top: 22px; }
.audiogram.live { margin: 0; padding: 12px; border-radius: 18px; background: rgba(6, 25, 44, 0.5); border: 1px solid var(--line); }
.ag-now { stroke: rgba(47, 193, 196, 0.6); stroke-width: 2; }
.ag-now-l { fill: var(--teal); font-weight: 700; }
.ag-probe { fill: none; stroke-width: 2; stroke-dasharray: 3 3; }
.ag-probe.right { stroke: #ff6b6b; }
.ag-probe.left { stroke: #5aa8ff; }
.ear-score.right b { color: #ff9b9b; }
.ear-score.left b { color: #9ccaff; }
@media (max-width: 860px) { .booth { grid-template-columns: 1fr; } }

/* ear stepper */
.ear-steps { display: flex; align-items: center; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; flex-wrap: wrap; }
.ear-steps li { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.ear-steps .es-line { flex: 0 0 28px; height: 2px; background: var(--line-strong); }
.es-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--display); border: 2px solid var(--line-strong); color: var(--muted); }
.ear-steps li.now { color: var(--text); }
#es-right.now .es-dot { border-color: #ff6b6b; color: #ffd0d0; background: rgba(255, 107, 107, 0.2); }
#es-left.now .es-dot { border-color: #5aa8ff; color: #d6e8ff; background: rgba(90, 168, 255, 0.2); }
.ear-steps li.done { color: var(--good); }
.ear-steps li.done .es-dot { border-color: var(--good); background: rgba(87, 217, 163, 0.18); color: var(--good); }

/* the report card */
.report { border-radius: 20px; border: 1px solid var(--line-strong); background: rgba(6, 25, 44, 0.55); padding: clamp(18px, 3vw, 28px); }
.report-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.report-head svg { width: 46px; height: auto; }
.report-head div { display: grid; }
.report-head b { font: 700 15px var(--display); letter-spacing: 0.08em; }
.report-head span { color: var(--muted); font-size: 14px; }
.report-head time { margin-left: auto; color: var(--muted); font: 500 13px var(--mono); }
.report .verdict { margin-top: 16px; }
.ear-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ear-card { display: grid; gap: 4px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.ear-card.right { border-top: 3px solid #ff6b6b; }
.ear-card.left { border-top: 3px solid #5aa8ff; }
.ec-ear { font: 600 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ec-status { font: 700 18px/1.2 var(--display); }
.ear-card.ok .ec-status { color: var(--good); }
.ear-card.check .ec-status { color: var(--warn); }
.ec-num { color: #d4e7ea; }
.ec-num b { font-size: 20px; }
.ec-cat { color: var(--muted); font-size: 14px; }
.report-foot { margin-top: 14px; color: var(--muted); font-size: 12.5px; }
#step-follow.consult { border-color: rgba(255, 138, 91, 0.6); background: linear-gradient(180deg, rgba(255, 138, 91, 0.12), var(--panel)); }
#step-follow.consult h2 { color: #ffc2a8; }
@media (max-width: 560px) { .ear-cards { grid-template-columns: 1fr; } }

@media print {
  body { background: #fff !important; color: #111 !important; animation: none !important; }
  .env, .nav, .skip, .tool-head, .notice.danger, footer.site, .wa-float, .no-print, #step-intro, #step-check, #step-test { display: none !important; }
  .tool-page { padding: 0 !important; }
  .panel { border: 0 !important; background: none !important; padding: 0 !important; margin: 0 !important; }
  .report { border: 1px solid #999; background: #fff; color: #111; }
  .report-head span, .report-head time, .report-foot, .ec-ear, .ec-cat, .muted, .audiogram figcaption { color: #444 !important; }
  .verdict { background: #fff !important; border-color: #999 !important; }
  .verdict h3, .ec-status, .ec-num, .verdict p { color: #111 !important; }
  .ear-card { background: #fff; border-color: #bbb; }
  .ag-label, .ag-zone { fill: #333 !important; }
  .ag-grid { stroke: #ccc !important; }
  .audiogram svg rect { fill-opacity: 0.6; }
}
