/* audiSys Online-Hörtest – Gestaltung. Alles unter .ht, damit es auf fremden Seiten nichts verändert.
   Farben über Variablen anpassbar: --ht-farbe (Hauptfarbe, per data-farbe / ?farbe=), --ht-akzent. */
.ht {
  --ht-farbe: #173f64;
  --ht-auf-farbe: #ffffff;
  --ht-akzent: #95c11f;
  --ht-text: #10263b;
  --ht-grau: #546577;
  --ht-linie: #d3dbe3;
  --ht-flaeche: #ffffff;
  --ht-flaeche-2: #f3f6f9;
  --ht-gruen: #5f9e1a;
  --ht-gelb: #f2a900;
  --ht-rot: #c8312b;
  color: var(--ht-text);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 44rem;
  margin: 0 auto;
  position: relative;
}
.ht *, .ht *::before, .ht *::after { box-sizing: border-box; }
.ht p { margin: 0 0 .9em; }
.ht-karte { background: var(--ht-flaeche); border: 1px solid var(--ht-linie); padding: clamp(1.1rem, .6rem + 2.4vw, 2rem); }
.ht-karte + .ht-karte { margin-top: 1.5rem; }
.ht-schritt { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ht-grau); margin: 0 0 .4rem !important; }
.ht-titel { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.2; margin: 0 0 1rem; color: var(--ht-farbe); outline: none; }
.ht-titel:focus, .ht-titel:focus-visible { outline: none !important; box-shadow: none !important; } /* Überschrift nur Sprungziel für Screenreader */
.ht-lead { font-size: 1.08rem; }
.ht-liste { margin: 0 0 1.1rem; padding-left: 1.2rem; }
.ht-liste li { margin: .35rem 0; }
.ht-datenschutz { background: var(--ht-flaeche-2); border-left: 4px solid var(--ht-akzent); padding: .75rem 1rem; }
.ht-klein { font-size: .88rem; color: var(--ht-grau); }
.ht-reihe { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.2rem 0 1rem; }

.ht-btn {
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2;
  min-height: 48px; padding: .8rem 1.3rem; border: 0; border-radius: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none;
  touch-action: manipulation;
}
.ht-btn--haupt { background: var(--ht-farbe); color: var(--ht-auf-farbe); }
@media (hover: hover) { .ht-btn--haupt:hover { filter: brightness(.9); } }
.ht-btn--zweit { background: transparent; color: var(--ht-text); box-shadow: inset 0 0 0 1px var(--ht-farbe); }
@media (hover: hover) { .ht-btn--zweit:hover { background: var(--ht-flaeche-2); } }
.ht-btn:focus-visible, .ht-taste:focus-visible, .ht-optionen input:focus-visible + span { outline: 3px solid var(--ht-akzent); outline-offset: 2px; }
.ht-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.ht-frage { font-weight: 650; }
.ht-wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: .5rem 0 1rem; }
.ht-wahl[hidden] { display: none; }
.ht-wahl .ht-btn { width: 100%; }

/* Test */
.ht-zaehler { font-weight: 650; margin-bottom: .5rem !important; }
.ht-fortschritt { height: 6px; background: var(--ht-flaeche-2); margin-bottom: 1rem; overflow: hidden; }
.ht-fortschritt span { display: block; height: 100%; width: 0; background: var(--ht-akzent); transition: width .3s; }
.ht-hinweis { min-height: 1.6em; font-weight: 650; text-align: center; }
.ht-hinweis--hoeren { color: var(--ht-grau); }
.ht-hinweis--hoeren::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .5em; border-radius: 50%;
  background: var(--ht-akzent); vertical-align: .05em; animation: ht-puls 1s ease-in-out infinite; }
@keyframes ht-puls { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ht-hinweis--hoeren::before { animation: none; } .ht-fortschritt span { transition: none; } }
.ht-anzeige { display: flex; justify-content: center; gap: .6rem; margin: .5rem 0 1.2rem; }
.ht-anzeige span { width: 3.4rem; height: 4rem; border: 2px solid var(--ht-linie); display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--ht-flaeche); }
.ht-anzeige span.ht-aktiv { border-color: var(--ht-farbe); }
.ht-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; max-width: 22rem; margin: 0 auto; transition: opacity .2s; }
.ht-pad--warten { opacity: .45; }
.ht-taste { font: inherit; font-size: 1.6rem; font-weight: 650; min-height: 60px; border: 1px solid var(--ht-linie); border-radius: 0;
  background: var(--ht-flaeche-2); color: var(--ht-text); cursor: pointer; touch-action: manipulation; }
@media (hover: hover) { .ht-taste:hover { border-color: var(--ht-farbe); } }
.ht-taste:active { background: var(--ht-linie); }
.ht-taste--fn { font-size: 1.4rem; }
.ht-taste--ok { font-size: 1.15rem; background: var(--ht-flaeche); border-color: var(--ht-farbe); color: var(--ht-farbe); }
.ht-taste--ok.ht-taste--bereit { background: var(--ht-farbe); color: var(--ht-auf-farbe); }

/* Fragen */
.ht-fragen { margin: 0; }
.ht-feld { border: 0; border-top: 1px solid var(--ht-linie); margin: 0; padding: .9rem 0 1rem; min-width: 0; }
.ht-feld legend { padding: .9rem 0 .5rem; font-weight: 600; float: left; width: 100%; }
.ht-feld legend + * { clear: both; }
.ht-feld--offen legend { color: var(--ht-rot); }
.ht-optionen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ht-optionen label { position: relative; cursor: pointer; }
.ht-optionen input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ht-optionen span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .4rem; text-align: center;
  border: 1px solid var(--ht-linie); background: var(--ht-flaeche); }
.ht-optionen input:checked + span { background: var(--ht-farbe); border-color: var(--ht-farbe); color: var(--ht-auf-farbe); font-weight: 650; }
.ht-meldung { color: var(--ht-rot); font-weight: 600; min-height: 1em; margin-top: 1rem !important; }
.ht-meldung:empty { margin: 0 !important; }

/* Ergebnis */
.ht-ergebnis { display: flex; gap: 1.25rem; align-items: center; padding: 1.1rem; border: 1px solid var(--ht-linie); background: var(--ht-flaeche-2); }
.ht-ergebnis--gruen { border-left: 6px solid var(--ht-gruen); }
.ht-ergebnis--gelb { border-left: 6px solid var(--ht-gelb); }
.ht-ergebnis--rot { border-left: 6px solid var(--ht-rot); }
.ht-ergebnis p:last-child { margin-bottom: 0; }
.ht-ampel { flex: none; display: flex; flex-direction: column; gap: .4rem; padding: .55rem; background: #1d2a36; border-radius: 1.4rem; }
.ht-lampe { width: 1.9rem; height: 1.9rem; border-radius: 50%; opacity: .22; }
.ht-lampe--rot { background: var(--ht-rot); order: 1; }
.ht-lampe--gelb { background: var(--ht-gelb); order: 2; }
.ht-lampe--gruen { background: var(--ht-gruen); order: 3; }
.ht-lampe--an { opacity: 1; box-shadow: 0 0 .9rem currentColor; }
.ht-lampe--an.ht-lampe--rot { color: var(--ht-rot); }
.ht-lampe--an.ht-lampe--gelb { color: var(--ht-gelb); }
.ht-lampe--an.ht-lampe--gruen { color: var(--ht-gruen); }
.ht-ampel-text { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ht-grau); margin-bottom: .2rem !important; }
.ht-ergebnis-titel { font-size: 1.3rem; font-weight: 700; line-height: 1.25; margin-bottom: .5rem !important; }
.ht-cta { min-width: 14rem; }
.ht-details { margin: .5rem 0 1rem; font-size: .92rem; }
.ht-details summary { cursor: pointer; color: var(--ht-grau); font-weight: 600; min-height: 44px; padding-block: .6rem; touch-action: manipulation; }
.ht-details p { margin: .5rem 0 0; }
.ht-rechtlich { font-size: .85rem; color: var(--ht-grau); border-top: 1px solid var(--ht-linie); padding-top: .9rem; margin: 1rem 0 0 !important; }
.ht-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* Selbsttest-Bericht */
.ht-bericht { width: 100%; border-collapse: collapse; font-size: .85rem; display: block; overflow-x: auto; }
.ht-bericht th, .ht-bericht td { border-bottom: 1px solid var(--ht-linie); padding: .35rem .5rem; text-align: right; white-space: nowrap; }
.ht-bericht th:first-child, .ht-bericht td:first-child { text-align: left; }

@media (max-width: 480px) {
  .ht-reihe .ht-btn { flex: 1 1 100%; }
  .ht-wahl { grid-template-columns: 1fr 1fr; }
  .ht-ergebnis { align-items: flex-start; gap: .9rem; padding: .9rem; }
  .ht-ampel { padding: .4rem; }
  .ht-lampe { width: 1.4rem; height: 1.4rem; }
  .ht-anzeige span { width: 3rem; height: 3.6rem; }
}

/* Kopfhörer-Prüfung (Huggins-Pitch) */
.ht-hp { display: flex; justify-content: center; gap: .8rem; margin: 1rem 0; }
.ht-hp span { width: 3.4rem; height: 3.4rem; border: 2px solid var(--ht-linie); border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 1.3rem; color: var(--ht-grau); transition: background .15s, color .15s; }
.ht-hp span.ht-hp--an { background: var(--ht-akzent); border-color: var(--ht-akzent); color: #172306; }
.ht-wahl--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ht-wahl--3 .ht-btn { font-size: 1.3rem; min-height: 56px; }
.ht-ergebnis--grau { border-left: 6px solid var(--ht-grau); }
/* Abgleich-Modus */
.ht-formular { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .6rem 1rem; align-items: center; margin: 1rem 0; }
.ht-formular select { font: inherit; min-height: 44px; padding: .3rem .5rem; border: 1px solid var(--ht-linie); background: var(--ht-flaeche); color: var(--ht-text); max-width: 100%; }
.ht-block { width: 100%; font: .78rem/1.4 ui-monospace, Consolas, monospace; padding: .6rem; border: 1px solid var(--ht-linie); background: var(--ht-flaeche-2); white-space: pre; overflow-x: auto; }
@media (max-width: 480px) { .ht-formular { grid-template-columns: 1fr; } }

.ht-ergebnis + .ht-klein { margin-top: .9rem; }

/* ---------- Feinschliff nach „apple-design“ (lokal, 22.10.2026): nur Oberfläche, Verfahren unverändert ---------- */
/* Reaktion: sofort beim Drücken, ohne 300-ms-Verzögerung; die Tipp-Hervorhebung des Browsers ersetzt der eigene Druckzustand */
.ht-btn, .ht-taste, .ht-optionen label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ht-btn { transition: transform .1s ease-out, filter .1s ease-out, background .15s; }
.ht-btn:active { transform: scale(.98); filter: brightness(.92); transition-duration: 0s; }
.ht-btn--zweit:active { background: var(--ht-flaeche-2); filter: none; }
.ht-btn[aria-disabled="true"]:active { transform: none; filter: none; }
.ht-taste { transition: transform .1s ease-out, background .1s ease-out, border-color .15s, color .15s; }
.ht-taste:active, .ht-taste.ht-taste--gedrueckt { transform: scale(.95); background: var(--ht-linie); transition-duration: 0s; }
.ht-taste--ok.ht-taste--bereit:active, .ht-taste--ok.ht-taste--bereit.ht-taste--gedrueckt { background: var(--ht-farbe); filter: brightness(.85); }
.ht-pad--warten .ht-taste:active { transform: none; background: var(--ht-flaeche-2); } /* keine Scheinrückmeldung, solange Eingaben nicht zählen */
.ht-pad--warten { transition: opacity .1s; }
.ht-optionen span { transition: background .12s, border-color .12s, color .12s, transform .1s ease-out; }
.ht-optionen label:active span { transform: scale(.97); transition-duration: 0s; }
.ht-optionen input:not(:checked) + span:hover { border-color: var(--ht-farbe); }

/* Schrittwechsel: die neue Karte blendet kurz ein (blockiert keine Eingabe, jederzeit überschreibbar) */
.ht-karte { animation: ht-rein .22s cubic-bezier(.2,.7,.3,1) both; }
@keyframes ht-rein { from { opacity: 0; transform: translateY(.4rem); } }

/* Typografie: ausgewogene Umbrüche, gleich breite Ziffern bei Zählern */
.ht-titel { letter-spacing: -.01em; text-wrap: balance; }
.ht p, .ht li { text-wrap: pretty; }
.ht-schritt, .ht-zaehler, .ht-taste, .ht-hp span { font-variant-numeric: tabular-nums; }

/* Barrierefreiheit */
@media (prefers-reduced-motion: reduce) {
  .ht-karte { animation: ht-blende .15s ease both; }   /* Blende statt Bewegung */
  .ht-btn:active, .ht-taste:active, .ht-taste.ht-taste--gedrueckt, .ht-optionen label:active span { transform: none; }
}
@keyframes ht-blende { from { opacity: 0; } }
@media (prefers-contrast: more) {
  .ht { --ht-linie: #6f7c88; --ht-grau: #2f3d4a; }
  .ht-taste, .ht-optionen span { border-width: 2px; }
}
