/* =========================================================================
   Tonlage - Bauteile
   ========================================================================= */

/* ---------------------------------------------------------------- Raster */

/* Die Tafeln sind so hoch wie ihr Inhalt. Gleich hohe Kästen erzeugen sonst
   grosse leere Flächen, sobald zwei Spalten unterschiedlich viel tragen. */
.raster {
    display: grid;
    gap: var(--a-3);
    margin-bottom: var(--a-3);
    align-items: start;
}

.raster--breit-schmal {
    grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
}

.raster--schmal-breit {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.05fr);
}

.raster--halb {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1080px) {
    .raster--breit-schmal,
    .raster--schmal-breit,
    .raster--halb {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------------------------------------------------------------- Tafeln */

.tafel {
    background: var(--pult);
    border: 1px solid var(--glas-still);
    border-radius: var(--rund);
    padding: var(--a-4);
    min-width: 0;
}

/* Flache Tafel: kein Kasten, nur eine Haarlinie als Anfangsmarke. */
.tafel--flach {
    background: none;
    border: none;
    border-top: 1px solid var(--glas);
    border-radius: 0;
    padding: var(--a-3) 0 0;
}

.tafel-kopf {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--a-3);
    margin-bottom: var(--a-3);
    flex-wrap: wrap;
}

.tafel-kopf h2,
.tafel-kopf h3 {
    min-width: 0;
}

.tafel-frage {
    color: var(--stimme-still);
    font-size: var(--t-s);
    margin: 2px 0 0;
    max-width: 60ch;
}

/* --------------------------------------------------------------- Wellenband */

.band {
    background: linear-gradient(180deg, var(--tiefe-tief), var(--pult));
    border: 1px solid var(--glas-still);
    border-radius: 2px;
    padding: var(--a-4) var(--a-4) var(--a-3);
    margin-bottom: var(--a-3);
    position: relative;
}

.band-kopf {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--a-4);
    flex-wrap: wrap;
    margin-bottom: var(--a-3);
}

.band-titel {
    font-family: var(--schrift-anzeige);
    font-size: var(--t-2xl);
    font-stretch: 125%;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1;
}

.band-unterzeile {
    color: var(--stimme-leise);
    font-size: var(--t-s);
    margin-top: var(--a-2);
    max-width: 56ch;
}

.band-buehne {
    width: 100%;
    display: block;
    overflow: visible;
}

.band-strich {
    cursor: pointer;
    transform-box: fill-box;
    transform-origin: var(--anker, center);
}

.band-strich:hover {
    filter: brightness(1.35);
}

.band-strich:focus-visible {
    outline: 2px solid var(--stimme);
    outline-offset: 1px;
}

.band-ziellinie {
    stroke: var(--stimme-still);
    stroke-width: 1;
    stroke-dasharray: 2 5;
}

.band-achse {
    fill: var(--stimme-still);
    font-size: 10px;
    font-family: var(--schrift-text);
}

/* Der eine inszenierte Moment: das Band wird beim Laden nachgezeichnet. */
@media (prefers-reduced-motion: no-preference) {
    .band-strich {
        animation: strich-aufbauen 460ms cubic-bezier(0.2, 0.8, 0.25, 1) backwards;
        animation-delay: calc(var(--takt, 0) * 6ms);
    }
}

@keyframes strich-aufbauen {
    from {
        transform: scaleY(0.02);
        opacity: 0;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* --------------------------------------------------------------- Ablesungen */

.ablesungen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0;
    border-top: 1px solid var(--glas-still);
    margin-top: var(--a-3);
}

/* Beide Seiten der Trennlinie bekommen denselben Abstand, sonst klebt der Text
   der folgenden Ablesung an der Linie. Aussen schliesst die Reihe bündig ab. */
.ablesung {
    padding: var(--a-3) var(--a-4);
    border-right: 1px solid var(--glas-still);
    min-width: 0;
}

.ablesung:first-child {
    padding-left: 0;
}

.ablesung:last-child {
    border-right: none;
    padding-right: 0;
}

.ablesung-wert {
    font-family: var(--schrift-anzeige);
    font-size: var(--t-xl);
    font-stretch: 118%;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.ablesung-einheit {
    font-size: var(--t-s);
    font-weight: 500;
    font-stretch: 100%;
    color: var(--stimme-still);
}

.ablesung-name {
    font-size: var(--t-xs);
    color: var(--stimme-leise);
    margin-top: 6px;
}

.ablesung-fuss {
    font-size: var(--t-xs);
    color: var(--stimme-still);
    margin-top: 2px;
}

/* Die grosse Ablesung: eine einzige Zahl traegt die Seite. */
.hauptnote {
    display: flex;
    align-items: baseline;
    gap: var(--a-2);
}

.hauptnote-wert {
    font-family: var(--schrift-anzeige);
    font-size: var(--t-3xl);
    font-stretch: 125%;
    font-weight: 800;
    line-height: 0.86;
    letter-spacing: -0.035em;
}

.hauptnote-von {
    font-size: var(--t-l);
    color: var(--stimme-still);
    font-family: var(--schrift-anzeige);
    font-weight: 500;
}

/* ---------------------------------------------------------------- Notenachse */

.achse {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--a-3);
}

.achse-spur {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: var(--glas-still);
    overflow: visible;
}

.achse-fuell {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 4px;
    background: var(--eis);
}

.achse-ziel {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: var(--stimme-still);
}

.achse-wert {
    font-variant-numeric: tabular-nums;
    font-size: var(--t-s);
    color: var(--stimme-leise);
    min-width: 3.4ch;
    text-align: right;
}

/* ------------------------------------------------------------------ Status */

.stufe {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--t-xs);
    color: var(--stimme-leise);
    white-space: nowrap;
}

.stufe::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: currentColor;
    flex: 0 0 auto;
}

/* Zwei benannte Rollen statt Farbwerten direkt in der Ansicht. */
.stufe--neben {
    color: var(--neutral-3);
}

.stufe--leit {
    color: var(--eis);
}

.legende {
    display: flex;
    gap: var(--a-3);
    flex-wrap: wrap;
    align-items: center;
}

/* ---------------------------------------------------------------- Tabellen */

.tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--t-s);
}

.tabelle th {
    text-align: left;
    font-weight: 500;
    color: var(--stimme-still);
    font-size: var(--t-xs);
    padding: 0 var(--a-3) var(--a-2) 0;
    border-bottom: 1px solid var(--glas);
    white-space: nowrap;
}

.tabelle td {
    padding: 9px var(--a-3) 9px 0;
    border-bottom: 1px solid var(--glas-still);
    vertical-align: middle;
}

.tabelle .rechts,
.tabelle th.rechts {
    text-align: right;
    padding-right: 0;
}

.tabelle tbody tr:hover td {
    background: var(--pult-hoch);
}

.tabelle a {
    text-decoration: none;
    color: var(--stimme);
}

.tabelle a:hover {
    color: var(--eis-hell);
    text-decoration: underline;
}

.tabelle-huelle {
    overflow-x: auto;
}

.name-zelle {
    display: flex;
    align-items: center;
    gap: var(--a-2);
}

.initialen {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--pult-hoch);
    box-shadow: inset 0 0 0 1px var(--glas);
    display: grid;
    place-items: center;
    font-size: var(--t-xs);
    color: var(--stimme-leise);
    flex: 0 0 auto;
}

/* ------------------------------------------------------------- Diagramme */

.diagramm {
    width: 100%;
    display: block;
}

.d-gitter {
    stroke: var(--glas-still);
    stroke-width: 1;
}

.d-ziellinie {
    stroke: var(--stimme-still);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.d-achsentext {
    fill: var(--stimme-still);
    font-size: 10px;
    font-family: var(--schrift-text);
}

.d-wertetext {
    fill: var(--stimme-leise);
    font-size: 10px;
    font-family: var(--schrift-text);
    font-variant-numeric: tabular-nums;
}

.d-linie {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.d-punkt {
    stroke: var(--pult);
    stroke-width: 2;
}

/* --------------------------------------------------------------- Matrix */

.matrix {
    border-collapse: separate;
    border-spacing: 2px;
    font-size: var(--t-s);
    width: 100%;
}

.matrix th {
    font-weight: 500;
    color: var(--stimme-leise);
    font-size: var(--t-xs);
    padding: var(--a-1) var(--a-2);
    text-align: left;
    vertical-align: bottom;
}

.matrix td {
    padding: 10px var(--a-2);
    text-align: right;
    border-radius: 3px;
    font-variant-numeric: tabular-nums;
    color: var(--stimme);
}

.matrix .summe {
    background: none;
    color: var(--stimme-leise);
    box-shadow: inset 0 0 0 1px var(--glas-still);
}

/* ------------------------------------------------------------------ Chips */

.chips {
    display: flex;
    gap: var(--a-1);
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--glas);
    color: var(--stimme-leise);
    font-size: var(--t-xs);
    text-decoration: none;
    background: none;
    cursor: pointer;
}

.chip:hover {
    background: var(--pult-hoch);
    color: var(--stimme);
}

.chip[aria-pressed="true"],
.chip[aria-current="true"] {
    background: var(--pult-hoch);
    color: var(--stimme);
    border-color: var(--eis);
}

/* ------------------------------------------------------------ Hinweisfeld */

.hinweis {
    color: var(--stimme-leise);
    font-size: var(--t-s);
    border-left: 2px solid var(--glas);
    padding-left: var(--a-3);
}

.leer {
    color: var(--stimme-still);
    font-size: var(--t-s);
    padding: var(--a-4) 0;
}

/* --------------------------------------------------------- Datenfarbklassen */

.s-verfehlt { fill: var(--verfehlt); }
.s-knapp    { fill: var(--knapp); }
.s-ziel     { fill: var(--ziel); }
.s-eis      { fill: var(--eis); }

.l-eis      { stroke: var(--eis); }
.l-neutral-1 { stroke: var(--neutral-1); }
.l-neutral-2 { stroke: var(--neutral-2); }
.l-neutral-3 { stroke: var(--neutral-3); }

.f-neutral-1 { fill: var(--neutral-1); }
.f-neutral-2 { fill: var(--neutral-2); }
.f-neutral-3 { fill: var(--neutral-3); }

/* ------------------------------------------------------------------ Fahne */

.fahne {
    position: fixed;
    z-index: 60;
    pointer-events: none;
    background: var(--tiefe-tief);
    color: var(--stimme);
    border: 1px solid var(--glas);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: var(--t-xs);
    line-height: 1.45;
    max-width: 300px;
    box-shadow: var(--schatten);
    transform: translate(-50%, calc(-100% - 12px));
}

.fahne strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.achse-fuell.a-verfehlt { background: var(--verfehlt); }
.achse-fuell.a-knapp    { background: var(--knapp); }
.achse-fuell.a-ziel     { background: var(--ziel); }

.st-verfehlt::before { background: var(--verfehlt); }
.st-knapp::before    { background: var(--knapp); }
.st-ziel::before     { background: var(--ziel); }

/* ------------------------------------------------------------ Achsenliste */

.achsen-liste {
    display: grid;
    gap: var(--a-3);
}

.achsen-zeile {
    display: grid;
    grid-template-columns: minmax(120px, 0.85fr) minmax(0, 1.4fr);
    align-items: center;
    gap: var(--a-3);
}

.achsen-name {
    font-size: var(--t-s);
    color: var(--stimme);
    display: flex;
    align-items: baseline;
    gap: var(--a-2);
    min-width: 0;
}

.achsen-name a {
    color: inherit;
    text-decoration: none;
}

.achsen-name a:hover {
    color: var(--eis-hell);
    text-decoration: underline;
}

.achsen-anzahl {
    font-size: var(--t-xs);
    color: var(--stimme-still);
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .achsen-zeile {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--a-1);
    }
}

/* ------------------------------------------------------------- Anrufliste */

.anrufliste {
    display: grid;
    gap: 0;
}

.anrufliste a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: baseline;
    gap: var(--a-3);
    padding: 10px 0;
    border-bottom: 1px solid var(--glas-still);
    text-decoration: none;
    color: var(--stimme);
}

.anrufliste a:last-child {
    border-bottom: none;
}

.anrufliste a:hover {
    color: var(--eis-hell);
}

.anrufliste .note {
    font-family: var(--schrift-anzeige);
    font-weight: 700;
    font-stretch: 112%;
    font-variant-numeric: tabular-nums;
    font-size: var(--t-l);
    line-height: 1;
}

.anrufliste .zeit {
    color: var(--stimme-still);
    font-size: var(--t-xs);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.anrufliste .wer {
    font-size: var(--t-s);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.n-verfehlt { color: var(--verfehlt); }
.n-knapp    { color: var(--knapp); }
.n-ziel     { color: var(--ziel); }

/* ------------------------------------------------------------ Vergleich */

.vergleich-liste {
    display: grid;
    gap: var(--a-3);
}

.vergleich-zeile {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(0, 1.7fr) 3.6rem 3.6rem 4rem;
    align-items: center;
    gap: var(--a-3);
    font-size: var(--t-s);
}

.vergleich-name {
    min-width: 0;
}

.vergleich-spur {
    position: relative;
    height: 18px;
}

.vergleich-grund {
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
    height: 2px;
    background: var(--glas-still);
}

.vergleich-strecke {
    position: absolute;
    top: 8px;
    height: 2px;
    background: var(--glas);
}

.vergleich-punkt {
    position: absolute;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    transform: translateX(-50%);
}

.vp-vorher {
    background: var(--neutral-2);
}

.vp-jetzt {
    background: var(--eis);
    box-shadow: 0 0 0 2px var(--pult);
}

.vergleich-ziel {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 1px;
    background: var(--stimme-still);
}

.vergleich-wert {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--stimme-leise);
}

.vergleich-wert.jetzt {
    color: var(--stimme);
}

.vergleich-delta {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.d-besser { color: var(--ziel); }
.d-schlechter { color: var(--verfehlt); }
.d-gleich { color: var(--stimme-still); }

@media (max-width: 760px) {
    .vergleich-zeile {
        grid-template-columns: minmax(0, 1fr) 3.4rem 3.4rem 4rem;
    }

    .vergleich-name {
        grid-column: 1 / -1;
    }

    .vergleich-spur {
        grid-column: 1 / -1;
    }
}

/* -------------------------------------------------------- Kleine Verläufe */

.kleine-verlaeufe {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--a-4);
}

.kleiner-verlauf h3 {
    font-size: var(--t-s);
    font-weight: 600;
    margin-bottom: var(--a-2);
}

.kleiner-verlauf .zusatz {
    font-size: var(--t-xs);
    color: var(--stimme-still);
    display: block;
    margin-top: 2px;
}

/* ------------------------------------------------------------ Gegenüber */

.gegenueber {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--a-4);
    align-items: end;
}

.gegenueber-block .marke-zeile {
    font-size: var(--t-xs);
    color: var(--stimme-leise);
    margin-bottom: var(--a-2);
}

/* Sequenzielle Rampe der Matrix. Die Textfarbe kippt dort, wo der Kontrast es verlangt. */
.r-0 { background: none; box-shadow: inset 0 0 0 1px var(--glas-still); color: var(--stimme-still); }
.r-1 { background: var(--rampe-1); color: var(--tinte-1); }
.r-2 { background: var(--rampe-2); color: var(--tinte-2); }
.r-3 { background: var(--rampe-3); color: var(--tinte-3); }
.r-4 { background: var(--rampe-4); color: var(--tinte-4); }
.r-5 { background: var(--rampe-5); color: var(--tinte-5); }
.r-6 { background: var(--rampe-6); color: var(--tinte-6); }

.matrix tbody th {
    text-align: left;
    vertical-align: middle;
    color: var(--stimme);
    font-size: var(--t-s);
    font-weight: 400;
    white-space: normal;
}

.matrix tfoot td,
.matrix tfoot th {
    color: var(--stimme-leise);
    background: none;
    box-shadow: none;
    border-top: 1px solid var(--glas);
}

.matrix-huelle {
    overflow-x: auto;
}

/* ---------------------------------------------------------- Zeitstrahl */

.zeitstrahl {
    display: flex;
    gap: 3px;
    align-items: flex-start;
}

.zeitstrahl-balken {
    height: 36px;
    border-radius: 4px;
}

.zs-klingeln { background: var(--neutral-1); }
.zs-warten { background: var(--neutral-2); }
.zs-gespraech { background: var(--eis); }
.zs-halten { background: var(--neutral-3); }

/* ----------------------------------------------------------- Prüfliste */

.pruefliste {
    display: grid;
}

.pruefpunkt {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--a-3);
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--glas-still);
}

.pruefpunkt:last-child {
    border-bottom: none;
}

.pruefzeichen {
    font-family: var(--schrift-anzeige);
    font-weight: 700;
    font-size: var(--t-s);
    line-height: 1.4;
}

.pruefzeichen.ja { color: var(--ziel); }
.pruefzeichen.nein { color: var(--verfehlt); }

.pruefurteil {
    font-size: var(--t-xs);
    color: var(--stimme-leise);
    white-space: nowrap;
}

/* -------------------------------------------------------------- Angaben */

.angaben {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--a-3) var(--a-4);
}

.angabe dt {
    font-size: var(--t-xs);
    color: var(--stimme-still);
    margin-bottom: 2px;
}

.angabe dd {
    margin: 0;
    font-size: var(--t-s);
}

.protokoll {
    font-size: var(--t-m);
    line-height: 1.6;
    color: var(--stimme);
    border-left: 2px solid var(--eis);
    padding-left: var(--a-3);
    max-width: 62ch;
}

/* -------------------------------------------------------------- Bericht */

.berichtkopf {
    border-bottom: 1px solid var(--glas);
    padding-bottom: var(--a-4);
    margin-bottom: var(--a-4);
}

.berichtkopf h1 {
    font-size: var(--t-2xl);
    font-stretch: 125%;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: var(--a-2);
}

.berichtzeile {
    display: flex;
    gap: var(--a-4);
    flex-wrap: wrap;
    color: var(--stimme-leise);
    font-size: var(--t-s);
}

.fazit {
    font-size: var(--t-l);
    line-height: 1.5;
    max-width: 62ch;
    font-family: var(--schrift-anzeige);
    font-weight: 400;
    font-stretch: 106%;
}

.abschnitt {
    margin-bottom: var(--a-5);
}

.abschnitt > h2 {
    margin-bottom: var(--a-3);
    padding-bottom: var(--a-2);
    border-bottom: 1px solid var(--glas-still);
}

/* ------------------------------------------------ Nachbesserungen Layout */

.achsen-name {
    flex-wrap: wrap;
}

.achsen-zusatz {
    flex-basis: 100%;
    font-size: var(--t-xs);
    color: var(--stimme-still);
    font-variant-numeric: tabular-nums;
}

/* Nur die letzte Spalte schliesst buendig ab, sonst kleben Zahl und Text aneinander. */
.tabelle .rechts,
.tabelle th.rechts {
    text-align: right;
    padding-right: var(--a-3);
}

.tabelle td:last-child,
.tabelle th:last-child {
    padding-right: 0;
}

/* Der Zeitstrahl bleibt massstabsgetreu, die Beschriftung steht darunter. */
.zeitstrahl-legende {
    display: flex;
    flex-wrap: wrap;
    gap: var(--a-2) var(--a-4);
    margin-top: var(--a-3);
}

.zeitstrahl-legende .stufe {
    color: var(--stimme);
}

.zl-klingeln::before { background: var(--neutral-1); }
.zl-warten::before { background: var(--neutral-2); }
.zl-gespraech::before { background: var(--eis); }
.zl-halten::before { background: var(--neutral-3); }

.zeitstrahl-legende .dauer {
    color: var(--stimme-leise);
    font-variant-numeric: tabular-nums;
}

.berichtkopf {
    flex: 1 1 420px;
}


/* Bei kleiner Stichprobe wird das Band schmaler statt hoeher. */
.band-buehne {
    margin-inline: auto;
}

/* Briefkopf des Berichts: das Logo trägt die Seite auch auf Papier. */
.briefkopf {
    display: inline-flex;
    margin-bottom: var(--a-3);
}

.briefkopf img {
    height: 40px;
    width: auto;
    display: block;
}

/* ===================================================== Abstände und Rollen

   Alles, was vorher als Inline-Stil in den Ansichten stand, hat hier einen
   Namen bekommen. Die Ansichten tragen damit nur noch Struktur.
   ===================================================================== */

/* Die flache Tafel folgt immer auf etwas, deshalb bringt sie den Abstand mit. */
.tafel--flach {
    margin-top: var(--a-4);
}

.tafel--flach > h3 + * {
    margin-top: var(--a-3);
}

.band h3 {
    margin-bottom: var(--a-3);
}

.band-kopf .chips {
    margin-top: var(--a-3);
}

/* Der letzte Block einer Seite oder einer Tafel schliesst bündig ab. */
.raster:last-child,
.tafel:last-child,
.band:last-child,
.abschnitt:last-child,
.raster > .abschnitt,
.tafel > .raster:last-child {
    margin-bottom: 0;
}

.hauptnote-wert.wert--neben {
    color: var(--neutral-3);
}

.ablesungen--nackt {
    border-top: none;
    margin-top: 0;
}

.hinweis--abgesetzt {
    margin-top: var(--a-4);
}

.tabellen-hinweis {
    caption-side: top;
    text-align: left;
    color: var(--stimme-still);
    font-size: var(--t-s);
    padding: 0 0 var(--a-3);
}

.matrix th.rechts,
.matrix td.rechts,
.matrix tfoot td {
    text-align: right;
}

.empfehlungen {
    color: var(--stimme-leise);
    font-size: var(--t-s);
    max-width: 66ch;
    margin: 0;
    padding-left: var(--a-4);
    display: grid;
    gap: var(--a-2);
}

/* Verweise in der Matrix tragen dieselbe Handschrift wie in den Tabellen:
   ruhig im Fliesstext, erst beim Zeigen hervorgehoben. */
.matrix a {
    color: inherit;
    text-decoration: none;
}

.matrix a:hover {
    color: var(--eis-hell);
    text-decoration: underline;
}

/* Die Summenzeile braucht eine Trennung nach oben, nicht das Verschwinden
   der Linie unter der letzten Datenzeile. */
.tabelle tbody tr:last-child td {
    border-bottom: none;
}

.tabelle tfoot td,
.tabelle tfoot th {
    border-top: 1px solid var(--glas);
    border-bottom: none;
    padding-top: var(--a-3);
}

.tabelle tbody:has(+ tfoot) tr:last-child td {
    border-bottom: 1px solid var(--glas-still);
}
