/* Hearing self-check v0.2.0 DRAFT (2026-11-03). All colors come from CSS variables; each site sets its own via config.theme. v2 adds words-in-noise + graph styles at the end. */
.sc-root {
  --sc-primary: #3d4f7a;
  --sc-on-primary: #ffffff;
  --sc-accent: #8a6d3b;
  --sc-bg: #f6f7f9;
  --sc-surface: #ffffff;
  --sc-ink: #1b2430;
  --sc-muted: #56606e;
  --sc-line: #d9dee5;
  --sc-tint: #eef1f7;
  --sc-ok: #1f6b3a;
  --sc-bad: #9a3412;
  --sc-warn-bg: #fff6e5;
  --sc-focus: #b4472f;
  --sc-radius: 14px;
  --sc-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", "Noto Sans Arabic", Arial, sans-serif;
  font-family: var(--sc-font);
  color: var(--sc-ink);
  line-height: 1.6;
  font-size: 1.0625rem;
  max-width: 720px;
  margin-inline: auto;
  box-sizing: border-box;
}
.sc-root *, .sc-root *::before, .sc-root *::after { box-sizing: border-box; }
.sc-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: clamp(16px, 4vw, 32px);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.sc-head { margin-block-end: 16px; }
.sc-kicker { margin: 0; font-size: .875rem; font-weight: 700; color: var(--sc-primary); letter-spacing: .01em; }
.sc-progress { margin: 4px 0 8px; font-size: .9375rem; color: var(--sc-muted); }
.sc-bar { height: 6px; background: var(--sc-tint); border-radius: 99px; overflow: hidden; }
.sc-bar span { display: block; height: 100%; width: 0; background: var(--sc-accent); transition: width .3s; }
.sc-h { font-size: clamp(1.3rem, 4.5vw, 1.6rem); line-height: 1.3; margin: 8px 0 12px; color: var(--sc-ink); }
.sc-h:focus { outline: none; }
.sc-h:focus-visible { outline: 2px dotted var(--sc-primary); outline-offset: 4px; border-radius: 4px; }
.sc-h3 { font-size: 1.15rem; margin: 20px 0 8px; }
.sc-root p { margin: 0 0 12px; }
.sc-list { margin: 0 0 14px; padding-inline-start: 1.3em; }
.sc-list li { margin-block-end: 6px; }
.sc-muted { color: var(--sc-muted); font-size: .9375rem; }
.sc-source a, .sc-root a { color: var(--sc-primary); text-decoration: underline; text-underline-offset: 2px; }
.sc-disclaimer {
  background: var(--sc-tint);
  border-inline-start: 4px solid var(--sc-primary);
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.sc-warn { background: var(--sc-warn-bg); border-radius: 8px; padding: 10px 14px; font-size: .9375rem; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.sc-nav { justify-content: space-between; border-top: 1px solid var(--sc-line); padding-top: 14px; margin-top: 20px; }
.sc-btn {
  font: inherit; font-weight: 700;
  min-height: 52px; min-width: 52px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 2px solid var(--sc-primary);
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  touch-action: manipulation;
}
.sc-primary { background: var(--sc-primary); color: var(--sc-on-primary) !important; }
.sc-secondary { background: var(--sc-surface); color: var(--sc-primary) !important; }
.sc-ghost { background: transparent; border-color: transparent; color: var(--sc-primary); padding-inline: 8px; }
.sc-btn:hover:not(:disabled) { filter: brightness(1.08); }
.sc-btn:focus-visible, .sc-key:focus-visible, .sc-root a:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: 3px; }
.sc-btn:disabled { opacity: .45; cursor: not-allowed; }
.sc-btn[aria-pressed="true"].sc-secondary { background: var(--sc-tint); }
.sc-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.sc-choice[hidden] { display: none; }
.sc-yn .sc-btn { min-height: 64px; font-size: 1.15rem; }
.sc-big { min-height: 76px !important; font-size: 1.25rem !important; }
.sc-q { font-size: clamp(1.15rem, 4vw, 1.35rem); font-weight: 600; margin: 8px 0 14px; }
.sc-q-sm { font-weight: 600; }
.sc-counter { color: var(--sc-muted); font-size: .9375rem; margin: 0 0 4px; }
.sc-ear { display: inline-block; font-weight: 800; font-size: 1.1rem; padding: 6px 14px; border-radius: 99px; background: var(--sc-tint); color: var(--sc-primary); margin-block-end: 8px; }
.sc-status { font-size: 1.1rem; font-weight: 600; min-height: 1.6em; }
.sc-feedback { font-weight: 600; min-height: 1.4em; }
.sc-ok { color: var(--sc-ok); }
.sc-bad { color: var(--sc-bad); }
.sc-slots { display: flex; gap: 10px; justify-content: center; margin: 12px 0; direction: ltr; }
.sc-slots span { width: 56px; height: 64px; border: 2px solid var(--sc-line); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; background: var(--sc-bg); }
.sc-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 360px; margin: 0 auto 8px; direction: ltr; }
.sc-key {
  font: inherit; font-size: 1.6rem; font-weight: 800; min-height: 60px;
  border-radius: 12px; border: 2px solid var(--sc-line); background: var(--sc-surface); color: var(--sc-ink); cursor: pointer;
  touch-action: manipulation;
}
.sc-key:disabled { opacity: .45; cursor: not-allowed; }
.sc-key-fn { font-size: 1rem; }
.sc-key-ok { grid-column: span 2; font-size: 1.1rem; background: var(--sc-primary); color: var(--sc-on-primary); border-color: var(--sc-primary); }
.sc-result li { margin-block-end: 10px; }
.sc-rec { font-weight: 800; font-size: 1.15rem; padding: 12px 14px; border-radius: 10px; background: var(--sc-tint); }
.sc-rec-flag { border-inline-start: 5px solid var(--sc-accent); }
.sc-why { margin-top: 8px; }
.sc-cta { margin-top: 18px; padding: 16px; border-radius: 12px; border: 2px solid var(--sc-accent); background: var(--sc-bg); }
.sc-cta .sc-h3 { margin-top: 0; }
.sc-links { padding-inline-start: 1.2em; }
.sc-links li { margin-block-end: 8px; }
.sc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 420px) {
  .sc-actions .sc-btn { flex: 1 1 100%; }
  .sc-nav .sc-btn { flex: 0 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .sc-bar span { transition: none; } }
@media print { .sc-actions, .sc-pad, .sc-bar { display: none !important; } .sc-card { box-shadow: none; } }

/* ---- v2 (2026-11-03): words in noise + illustrative tones graph ---- */
.sc-ear[hidden] { display: none; }
.sc-words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sc-words .sc-btn { font-size: 1.35rem; min-height: 72px; padding-inline: 10px; }
.sc-words:empty { display: none; }
.sc-catbox { margin: 18px 0; }
.sc-cat { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 8px 0 10px; }
.sc-cat li { text-align: center; padding: 10px 6px; border-radius: 10px; border: 2px solid var(--sc-line); color: var(--sc-muted); font-weight: 700; background: var(--sc-surface); }
.sc-cat li.sc-cat-on { color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.sc-cat li.sc-cat-on::before { content: "● "; }
.sc-cat .sc-cat-good.sc-cat-on { background: var(--sc-ok); }
.sc-cat .sc-cat-border.sc-cat-on { background: #8a5a00; }
.sc-cat .sc-cat-check.sc-cat-on { background: var(--sc-bad); }
.sc-graph { margin: 18px 0; padding: 14px; border: 1px solid var(--sc-line); border-radius: 12px; background: var(--sc-surface); }
.sc-graph .sc-h3 { margin-top: 0; }
.sc-g-caption { background: var(--sc-warn-bg); border-radius: 8px; padding: 8px 12px; font-weight: 700; font-size: .9375rem; }
.sc-g-fig { margin: 8px auto 0; max-width: 520px; }
.sc-g-ytitle { margin: 0 0 2px; font-size: .875rem; font-weight: 700; color: var(--sc-muted); }
.sc-graph-svg { display: block; width: 100%; height: auto; font-family: var(--sc-font); }
.sc-g-grid { stroke: var(--sc-line); stroke-width: 1; }
.sc-g-vgrid { stroke-dasharray: 2 4; }
.sc-g-none { fill: #f2f2f2; }
.sc-g-ylab { font-size: 12.5px; fill: var(--sc-ink); font-weight: 600; }
.sc-g-xlab { font-size: 12px; fill: var(--sc-ink); }
.sc-g-xend, .sc-g-xtitle { font-size: 11.5px; fill: var(--sc-muted); }
.sc-g-line { fill: none; stroke-width: 2; }
.sc-g-mark { fill: #fff; stroke-width: 2.6; }
.sc-g-r { stroke: #C62828; }
.sc-g-l { stroke: #1565C0; }
.sc-g-l.sc-g-line { stroke-dasharray: 6 4; }
.sc-g-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 0; margin: 6px 0 0; font-weight: 700; }
.sc-g-sym { display: inline-block; font-weight: 800; margin-inline-end: 6px; font-family: Arial, sans-serif; }
.sc-g-legend-r .sc-g-sym { color: #C62828; }
.sc-g-legend-l .sc-g-sym { color: #1565C0; }
.sc-g-details { margin-top: 10px; }
.sc-g-details summary { cursor: pointer; color: var(--sc-primary); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.sc-g-table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
.sc-g-table th, .sc-g-table td { border: 1px solid var(--sc-line); padding: 6px 8px; text-align: center; }
@media print { .sc-graph { break-inside: avoid; } .sc-g-details { display: none; } }
