/* Hinweise zu Calls und Risiken (hinweise/) – Eigentümer: Hinweise-Trupp.
   Baut auf css/seiten/recht.css auf (Body-Klasse seite-recht: Kopf, Inhaltsverzeichnis, Lesespalte, Tabellen als Karten am
   Handy). Hier nur, was die Hinweise zusätzlich haben: Abschnittsnummern, Regeln, die beiden Datentabellen, Rückfall. */

/* ---------------------------------------------------------------- Abschnitte 01–09 */
.hw-nr { display: block; margin-bottom: 8px; font: 500 14px/1 var(--mono); letter-spacing: .08em; color: var(--text-3); }
.hw-text > .hw-daten { max-width: none; }
.hw-vorspann { color: var(--text-2); }
.hw-klein { font-size: 15px; line-height: 1.5; color: var(--text-3); }
.hw-merksatz { margin-top: 1.4em; padding-left: 16px; border-left: 2px solid var(--linie-3); }
.hw-weiter { white-space: nowrap; }

/* Regeln: Mono-Nummern 01–06 wie „Über mich“, Haarlinien */
.recht-text ol.hw-regeln { list-style: none; padding: 0; counter-reset: hw-regel; border-top: 1px solid var(--linie); }
.recht-text ol.hw-regeln > li { position: relative; counter-increment: hw-regel; margin: 0; padding: 14px 0 15px 44px; border-bottom: 1px solid var(--linie); }
.recht-text ol.hw-regeln > li::before {
  content: counter(hw-regel, decimal-leading-zero); position: absolute; left: 0; top: 18px;
  font: 500 14px/1.3 var(--mono); letter-spacing: .06em; color: var(--text-3);
}
.hw-regeln strong { display: block; margin-bottom: 2px; font-family: var(--kopf); font-weight: 600; }
.recht-text ol.hw-regeln + ul { margin-top: 1.2em; }

/* ---------------------------------------------------------------- Datenteile: Laden, leer, Rückfall */
.hw-laden { color: var(--text-3); font-size: 16px; }
html:not(.js) .hw-laden { display: none; }
.hw-leer { color: var(--text-2); }
.hw-rueckfall {
  max-width: 36rem; padding: 12px 16px; border: 1px dashed var(--linie-3); border-radius: 10px;
  font-size: 16px; line-height: 1.55; color: var(--text-2);
}
.hw-rueckfall a, .hw-anzahl a { color: var(--text); text-underline-offset: .2em; }
.hw-anzahl { margin: 0 0 .6em; font-size: 15px; line-height: 1.5; color: var(--text-3); max-width: 36rem; }

/* ---------------------------------------------------------------- Tabellen (Liste und Korrekturen) */
.hw-tabelle { margin-bottom: .8em; }
.hw-tabelle table { font-size: 15px; line-height: 1.45; }
/* Ziffern gleich breit nur in Zahlenzellen – Inter macht sonst auch den Bindestrich breit („Knock - out“) */
.hw-wann, .hw-paar, .hw-erg, .hw-calls td:nth-child(4), .hw-calls td:nth-child(6), .hw-korr td:nth-child(1) { font-variant-numeric: tabular-nums; }
.hw-tabelle th { font-size: 14px; padding-right: 16px; }
.hw-tabelle td { padding: 12px 16px 12px 0; }
.recht-text .hw-tabelle a { overflow-wrap: normal; }
.hw-callnr { font-family: var(--kopf); font-weight: 600; white-space: nowrap; }
/* größere Tippfläche ohne Einfluss aufs Layout (WCAG 2.5.8: mindestens 24 px) */
.hw-calls .hw-callnr { display: inline-block; padding-block: 8px; margin-block: -8px; }
.hw-zweite { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; color: var(--text-3); font-weight: 400; font-family: var(--sans); }
.hw-wann, .hw-von { display: block; white-space: nowrap; }
.hw-trenn { display: none; }
.hw-paar { display: block; white-space: nowrap; }
.hw-paar + .hw-paar { margin-top: 4px; }
.hw-paar .hw-zweite { white-space: normal; }
.hw-wort { display: inline-block; min-width: 2.9em; font-size: 14px; color: var(--text-3); }
.hw-erg { font-weight: 600; white-space: nowrap; }
/* Tiefer Link (#liste-14): Zeile leicht hinterlegt, oben eine orange Linie – ohne die Spaltenbreiten zu ändern */
.hw-calls tbody tr:is(:target, .hw-ziel) { background: rgb(236 232 224 / .05); }
.hw-calls tbody tr:is(:target, .hw-ziel) > td { box-shadow: inset 0 2px 0 var(--orange); }
.hw-korr td:nth-child(1) { white-space: nowrap; }
.hw-korr td:nth-child(2) { min-width: 9.5em; }
.hw-korr td:nth-child(3) { min-width: 7em; }
.hw-korr td:nth-child(5) { min-width: 12em; }
.hw-alt, .hw-neu { white-space: nowrap; }
.hw-pfeil { color: var(--text-3); }
.hw-alt { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgb(236 232 224 / .35); }
.hw-neu { color: var(--text); }
.hw-ohne { color: var(--text-3); }

/* Schluss: Rechtsgrundlage und Wege weiter */
.hw-grundlagen {
  margin-top: 2.6em !important; padding-top: 1.1em; border-top: 1px solid var(--linie);
  font: 500 14px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3);
}
.hw-ende { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; margin-top: 1.4em; }
.hw-ende .hz-label { margin-right: 4px; }
.recht-text .hw-ende a.textlink { text-decoration: none; }

/* Unter 1280 px stehen die Calls als Karten – die Tabelle braucht gut 870 px, sonst müsste sie seitlich scrollen.
   Kopfzeile: links Call, Zeit und Autor, rechts der Stand. Darunter die Angaben mit Spaltennamen in einer Reihe
   (5 Spalten); am Handy in 2 Spalten. So bleibt jede Karte kurz, und nichts fällt weg. */
@media (max-width: 1279px) {
  .hw-calls { overflow: visible; }
  .hw-calls thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hw-calls table, .hw-calls tbody { display: block; width: 100%; }
  .hw-calls tr {
    display: grid; gap: 14px 20px; padding: 16px 0 18px; border-bottom: 1px solid var(--linie);
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .7fr) minmax(0, 1.35fr) minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-areas: "call call call stand stand" "instr richt kurs sz bis";
  }
  .hw-calls tbody tr:first-child { border-top: 1px solid var(--linie-2); }
  .hw-calls td { display: block; width: auto; margin: 0 !important; padding: 0; border: 0; }
  .hw-calls td:nth-child(1) { grid-area: call; font-weight: 400; }
  .hw-calls td:nth-child(2) { grid-area: instr; }
  .hw-calls td:nth-child(3) { grid-area: richt; }
  .hw-calls td:nth-child(4) { grid-area: kurs; }
  .hw-calls td:nth-child(5) { grid-area: sz; }
  .hw-calls td:nth-child(6) { grid-area: bis; }
  .hw-calls td:nth-child(7) { grid-area: stand; }
  .hw-calls td:first-child .hw-callnr { font-size: 17px; }
  .hw-calls td:first-child .hw-zweite { display: inline; margin-left: .7em; }
  .hw-calls td:first-child .hw-wann, .hw-calls td:first-child .hw-von, .hw-calls td:first-child .hw-trenn { display: inline; white-space: pre; }
  .hw-calls td:first-child .hw-wann, .hw-calls td:first-child .hw-von { white-space: nowrap; }
  .hw-calls td + td[data-label]::before { content: attr(data-label); display: block; font: 600 14px/1.4 var(--sans); color: var(--text-3); margin-bottom: 2px; }
  /* Stand rechts in der Kopfzeile: Wort klein davor, darunter der Grund */
  .hw-calls td.hw-stand { justify-self: end; text-align: right; }
  .hw-calls td.hw-stand[data-label]::before { display: inline; margin: 0 .6em 0 0; }
  .hw-calls tbody tr:is(:target, .hw-ziel) { box-shadow: inset 0 2px 0 var(--orange); }
  .hw-calls tbody tr:is(:target, .hw-ziel) > td { box-shadow: none; }
}

/* Korrekturen unter 1280 px ebenfalls als Karten: Datum, Bezug, Feld, alt → neu in einer Reihe, die Begründung darunter. */
@media (max-width: 1279px) {
  .hw-korr { overflow: visible; }
  .hw-korr thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hw-korr table, .hw-korr tbody { display: block; width: 100%; }
  .hw-korr tr {
    display: grid; gap: 12px 20px; padding: 14px 0 16px; border-bottom: 1px solid var(--linie);
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.7fr);
    grid-template-areas: "datum bezug feld aend" "grund grund grund grund";
  }
  .hw-korr tbody tr:first-child { border-top: 1px solid var(--linie-2); }
  .hw-korr td { display: block; width: auto; margin: 0 !important; padding: 0; border: 0; min-width: 0 !important; white-space: normal !important; }
  .hw-korr td:nth-child(1) { grid-area: datum; font-family: var(--sans); font-weight: 400; }
  .hw-korr td:nth-child(2) { grid-area: bezug; }
  .hw-korr td:nth-child(3) { grid-area: feld; }
  .hw-korr td:nth-child(4) { grid-area: aend; }
  .hw-korr td:nth-child(5) { grid-area: grund; }
  .hw-korr td[data-label]::before { content: attr(data-label); display: block; font: 600 14px/1.4 var(--sans); color: var(--text-3); margin-bottom: 2px; }
}

@media (max-width: 760px) {
  .hw-calls tr { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "call stand" "instr richt" "kurs kurs" "sz bis"; gap: 12px 16px; }
  .hw-calls td:first-child .hw-zweite { display: block; margin: 3px 0 0; }
  .hw-calls td:first-child .hw-wann, .hw-calls td:first-child .hw-von { display: block; }
  .hw-calls td:first-child .hw-trenn { display: none; }
  .hw-calls td.hw-stand[data-label]::before { display: block; margin: 0 0 2px; }
  .hw-paar { white-space: normal; }
}

@media (max-width: 640px) {
  .hw-tabelle table { font-size: 16px; }
  /* Korrekturen: Datum und Bezug nebeneinander; Feld, Änderung (alt → neu) und Begründung darunter */
  .hw-korr tr { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "datum bezug" "feld feld" "aend aend" "grund grund"; gap: 10px 16px; }
  .recht-text ol.hw-regeln > li { padding-left: 38px; }
  .hw-grundlagen { letter-spacing: .02em; }
}

@media print {
  .hw-ende, .hw-laden { display: none !important; }
  .hw-tabelle td, .hw-zweite, .hw-grundlagen, .hw-nr { color: #000 !important; }
}
