:root {
  --grund: #F1F3EF;
  --flaeche: #FFFFFF;
  --tinte: #1D2B2E;
  --tinte-leise: #56666A;
  --linie: #D5DCD8;
  --akzent: #0E5A61;
  --akzent-hell: #DCEBEC;
  --gut: #2F7A4C;
  --gut-hell: #E1F0E6;
  --schlecht: #A8322A;
  --schlecht-hell: #F6E2DF;
  --warn: #A86B12;
  --warn-hell: #F7EBD6;
  --schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --schrift-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r-klein: 4px;
  --r-gross: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #141C1E;
    --flaeche: #1B2528;
    --tinte: #E3EAE8;
    --tinte-leise: #9AAAA9;
    --linie: #31403F;
    --akzent: #5FB3B8;
    --akzent-hell: #1E3A3D;
    --gut: #6CC08C;
    --gut-hell: #1D3527;
    --schlecht: #E47D72;
    --schlecht-hell: #3D2220;
    --warn: #E0A855;
    --warn-hell: #3A2C17;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--tinte);
  font: 400 0.9375rem/1.5 var(--schrift);
  font-feature-settings: "tnum" 1;
}
h1, h2, h3 { font-family: var(--schrift-display); line-height: 1.2; margin: 0; }
h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.75rem; }
.leise { color: var(--tinte-leise); margin: 0.15rem 0 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Simulationsband */
.sim-band {
  background: var(--warn-hell);
  color: var(--warn);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  padding: 0.35rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Kopf */
.kopf {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 2.5rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--linie);
}
.kopf-titel { margin-right: auto; }
.kennzahlen { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin: 0; }
.kennzahlen dt { font-size: 0.75rem; color: var(--tinte-leise); }
.kennzahlen dd { margin: 0; font-size: 1.125rem; font-weight: 600; font-family: var(--schrift-display); }
.pos { color: var(--gut); }
.neg { color: var(--schlecht); }

/* Buttons und Felder */
button {
  font: inherit; cursor: pointer; border-radius: var(--r-klein);
  padding: 0.5rem 0.9rem; border: 1px solid var(--linie); background: var(--flaeche); color: var(--tinte);
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .haupt { color: #0F1A1C; } }
.leise-btn { background: transparent; }
.gefahr-btn { border-color: var(--schlecht); color: var(--schlecht); background: transparent; }
input, select {
  font: inherit; color: inherit; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--r-klein);
  padding: 0.45rem 0.55rem; width: 100%; margin-top: 0.2rem;
}
input[type="radio"], input[type="checkbox"] { width: auto; margin: 0 0.4rem 0 0; accent-color: var(--akzent); }
label { display: block; font-size: 0.8125rem; color: var(--tinte-leise); }
label input, label select { color: var(--tinte); font-size: 0.9375rem; }
.zeile { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1rem; }
.zeile input { width: auto; margin-top: 0; }
.fehler { color: var(--schlecht); background: var(--schlecht-hell); padding: 0.5rem 0.7rem; border-radius: var(--r-klein); margin: 0.75rem 0 0; }

/* Profil */
.profil { max-width: 46rem; margin: 2rem auto; padding: 0 1.25rem; }
.profil form { margin-top: 1.5rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend { font-weight: 600; margin-bottom: 0.6rem; font-family: var(--schrift-display); }
.stil label {
  display: flex; align-items: flex-start; gap: 0.25rem;
  padding: 0.75rem 0.9rem; border: 1px solid var(--linie); border-radius: var(--r-klein);
  background: var(--flaeche); margin-bottom: 0.5rem; color: var(--tinte); font-size: 0.9375rem; cursor: pointer;
}
.stil label:has(input:checked) { border-color: var(--akzent); box-shadow: inset 3px 0 0 var(--akzent); }
.stil strong { display: block; }
.stil span { color: var(--tinte-leise); }
.stil span strong { color: var(--tinte); }
.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.9rem 1.2rem; margin-bottom: 1.5rem; }
.maerkte label { display: inline-flex; align-items: center; margin: 0 1.25rem 0.4rem 0; color: var(--tinte); font-size: 0.9375rem; }
.maerkte .trenner { margin-left: 0.5rem; padding-left: 1.25rem; border-left: 1px solid var(--linie); }
.breit { grid-column: 1 / -1; }
.gefahr { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.gefahr summary { cursor: pointer; color: var(--schlecht); }
kbd { font: inherit; font-weight: 600; background: var(--flaeche); border: 1px solid var(--linie); padding: 0 0.3rem; border-radius: 3px; }

/* Cockpit */
.cockpit {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0; align-items: start; min-height: calc(100vh - 9rem);
}
.spalte-links { padding: 1.25rem; display: grid; gap: 1.75rem; }
.spalte-rechts {
  position: sticky; top: 0; align-self: stretch;
  background: var(--flaeche); border-left: 1px solid var(--linie);
  padding: 1.5rem 1.5rem 2rem; min-height: 100%;
}
@media (max-width: 860px) {
  .cockpit { grid-template-columns: 1fr; }
  .spalte-rechts { position: static; border-left: 0; border-top: 1px solid var(--linie); }
}
.block h2 { display: flex; justify-content: space-between; align-items: baseline; }

.module { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.module li {
  font-size: 0.8125rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--linie); background: var(--flaeche);
}
.module li.aktiv { border-color: var(--akzent); color: var(--akzent); background: var(--akzent-hell); }
.module li.spaeter { color: var(--tinte-leise); border-style: dashed; }
.hinweise { margin: 0.75rem 0 0; padding-left: 1.1rem; color: var(--warn); font-size: 0.8125rem; }

.tabelle-wrap { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tabelle th { text-align: left; font-weight: 600; color: var(--tinte-leise); font-size: 0.75rem; border-bottom: 1px solid var(--linie); padding: 0.4rem 0.5rem; }
.tabelle td { padding: 0.5rem; border-bottom: 1px solid var(--linie); }
.tabelle .z { text-align: right; }
.leer { color: var(--tinte-leise); font-size: 0.875rem; margin: 0.25rem 0 0; }

.order-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.8rem 1rem; }

.orderliste { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--linie); }
.orderliste li button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 1rem; text-align: left;
  border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; background: transparent; padding: 0.65rem 0.4rem;
}
.orderliste li button:hover { background: var(--akzent-hell); }
.orderliste li button[aria-current="true"] { box-shadow: inset 3px 0 0 var(--akzent); background: var(--akzent-hell); }
.orderliste .klein { color: var(--tinte-leise); font-size: 0.8125rem; }

.status { font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; white-space: nowrap; align-self: center; }
.status.laeuft { background: var(--akzent-hell); color: var(--akzent); }
.status.gut { background: var(--gut-hell); color: var(--gut); }
.status.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.status.neutral { background: var(--grund); color: var(--tinte-leise); }
.status.warn { background: var(--warn-hell); color: var(--warn); }

/* Detail und Freigabe-Strecke */
.leer-gross { color: var(--tinte-leise); padding-top: 3rem; text-align: center; }
.detail-kopf h2 { font-size: 1.25rem; margin-bottom: 0.15rem; }
.strecke { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: station; }
.strecke li {
  position: relative; padding: 0 0 1.1rem 2.6rem; counter-increment: station; color: var(--tinte-leise);
}
.strecke li::before {
  content: counter(station);
  position: absolute; left: 0; top: -0.1rem; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8125rem; font-weight: 600;
  border: 1.5px solid var(--linie); background: var(--flaeche);
}
.strecke li::after {
  content: ""; position: absolute; left: calc(0.875rem - 1px); top: 1.75rem; bottom: 0.1rem; width: 2px; background: var(--linie);
}
.strecke li:last-child::after { display: none; }
.strecke li.erreicht { color: var(--tinte); }
.strecke li.erreicht::before { content: "✓"; background: var(--akzent); border-color: var(--akzent); color: #fff; }
.strecke li.erreicht::after { background: var(--akzent); }
.strecke li.aktuell { color: var(--tinte); font-weight: 600; }
.strecke li.aktuell::before { border-color: var(--akzent); color: var(--akzent); box-shadow: 0 0 0 4px var(--akzent-hell); }
.strecke li.gestoppt { color: var(--schlecht); font-weight: 600; }
.strecke li.gestoppt::before { content: "✕"; border-color: var(--schlecht); background: var(--schlecht); color: #fff; }
.strecke .zeit { display: block; font-weight: 400; font-size: 0.75rem; color: var(--tinte-leise); }

.meldung { border-radius: var(--r-klein); padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.875rem; }
.meldung ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.meldung.gut { background: var(--gut-hell); color: var(--gut); }
.meldung.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.meldung.warn { background: var(--warn-hell); color: var(--warn); }

.aktion { border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 1rem 1.1rem; background: var(--grund); }
.aktion h3 { font-size: 0.9375rem; margin-bottom: 0.4rem; }
.aktion p { margin: 0 0 0.6rem; font-size: 0.875rem; }
.aktion .zeile { margin-top: 0.75rem; }
.aktion label.kurs { max-width: 12rem; }
.review { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-klein); padding: 0.75rem 0.9rem; margin: 0.6rem 0; white-space: pre-wrap; font-size: 0.875rem; }
.werte { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; margin: 0.6rem 0; font-size: 0.875rem; }
.werte dt { color: var(--tinte-leise); }
.werte dd { margin: 0; font-weight: 600; }
.pflicht label { display: flex; gap: 0.4rem; align-items: flex-start; color: var(--tinte); font-size: 0.875rem; margin: 0.4rem 0; }
.ablauf { font-size: 0.8125rem; color: var(--tinte-leise); }
.ablauf.knapp { color: var(--warn); font-weight: 600; }

.protokoll { margin-top: 1.75rem; font-size: 0.8125rem; }
.protokoll summary { cursor: pointer; color: var(--tinte-leise); }
.protokoll ol { padding-left: 1.1rem; }
.protokoll li { margin: 0.3rem 0; }

@media (prefers-reduced-motion: no-preference) {
  .strecke li.aktuell::before { transition: box-shadow 0.3s ease; }
  #detail.neu .strecke li.erreicht:last-of-type::before { animation: einrasten 0.35s ease-out; }
  @keyframes einrasten { from { transform: scale(0.6); } to { transform: scale(1); } }
}

/* ============================================================ Navigation und Seiten */
.hauptnav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem;
  padding: 0 1.25rem; border-bottom: 1px solid var(--linie); background: var(--flaeche);
}
.hauptnav a {
  padding: 0.7rem 0.9rem; color: var(--tinte-leise); text-decoration: none; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.hauptnav a:hover { color: var(--tinte); }
.hauptnav a[aria-current] { color: var(--akzent); border-bottom-color: var(--akzent); }
.scan-status { margin-left: auto; font-size: 0.8125rem; color: var(--tinte-leise); }
.scan-status.laeuft { color: var(--warn); font-weight: 600; }

.seite { padding: 1.25rem; max-width: 100rem; margin: 0 auto; }
.seitenkopf { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.25rem; }
.seitenkopf h2 { font-size: 1.375rem; margin: 0; }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.zwischen { font-size: 0.9375rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
.klein { font-size: 0.8125rem; }
.umschalter { display: inline-flex; border: 1px solid var(--linie); border-radius: var(--r-klein); overflow: hidden; }
.umschalter button { border: 0; border-radius: 0; background: var(--flaeche); padding: 0.45rem 0.8rem; }
.umschalter button + button { border-left: 1px solid var(--linie); }
.umschalter button[aria-pressed="true"] { background: var(--akzent); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .umschalter button[aria-pressed="true"] { color: #0F1A1C; } }

/* ============================================================ Markt */
.ampeln { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; }
.ampel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 0.85rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.75rem; align-items: center; }
.ampel .licht { grid-row: 1 / span 3; width: 0.9rem; height: 2.6rem; border-radius: 999px; background: var(--linie); }
.ampel.gruen .licht { background: var(--gut); }
.ampel.gelb .licht { background: var(--warn); }
.ampel.rot .licht { background: var(--schlecht); }
.ampel .name { font-size: 0.8125rem; color: var(--tinte-leise); }
.ampel .stand { font-family: var(--schrift-display); font-size: 1.125rem; font-weight: 600; }
.ampel .lage { font-size: 0.8125rem; }
.breite { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 0.75rem 2rem; margin-top: 1rem; }
.breite h3 { font-size: 0.8125rem; color: var(--tinte-leise); font-weight: 600; margin-bottom: 0.4rem; font-family: var(--schrift); }
.balkenzeile { display: grid; grid-template-columns: 9.5rem 1fr 3rem; gap: 0.6rem; align-items: center; font-size: 0.8125rem; margin: 0.25rem 0; }
.balken { height: 0.5rem; background: var(--linie); border-radius: 999px; overflow: hidden; }
.balken span { display: block; height: 100%; background: var(--akzent); }
.balkenzeile .z { text-align: right; font-weight: 600; }

.heatmap { position: relative; height: 30rem; margin-top: 0.6rem; background: var(--grund); }
.hm-sektor { position: absolute; border: 2px solid var(--grund); overflow: hidden; }
.hm-sektor > .titel { position: absolute; left: 0; top: 0; right: 0; height: 1.15rem; padding: 0 0.3rem; font-size: 0.6875rem; font-weight: 600; line-height: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--tinte); color: var(--grund); z-index: 1; }
.hm-kachel { position: absolute; border: 1px solid var(--grund); display: grid; place-content: center; text-align: center; overflow: hidden; text-decoration: none; color: var(--tinte); line-height: 1.15; }
.hm-kachel.stark { color: #fff; }
.hm-kachel strong { font-size: 0.75rem; display: block; }
.hm-kachel span { font-size: 0.6875rem; }
.hm-kachel:hover, .hm-kachel:focus-visible { outline: 2px solid var(--tinte); outline-offset: -2px; z-index: 2; }
@media (max-width: 700px) { .heatmap { height: 38rem; } }

.ranglisten { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; margin-top: 1.75rem; }
.ranglisten h3 { font-size: 0.9375rem; margin-bottom: 0.4rem; }
.ranglisten ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.ranglisten li a { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; padding: 0.4rem 0.2rem; border-bottom: 1px solid var(--linie); text-decoration: none; color: var(--tinte); font-size: 0.875rem; }
.ranglisten li a:hover { background: var(--akzent-hell); }
.ranglisten .sek { color: var(--tinte-leise); font-size: 0.75rem; margin-left: 0.4rem; }

/* ============================================================ Scanner */
.signalliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 0.75rem; }
.sigkarte { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--linie); border-radius: var(--r-klein); padding: 0.75rem 0.9rem; text-decoration: none; color: var(--tinte); display: block; }
.sigkarte:hover { border-color: var(--akzent); }
.sigkarte.vorteil_belegt { border-left-color: var(--gut); }
.sigkarte.nachteil_belegt { border-left-color: var(--schlecht); opacity: 0.8; }
.sigkarte .kopfzeile { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.sigkarte .sym { font-family: var(--schrift-display); font-weight: 650; font-size: 1.0625rem; }
.sigkarte .regel { font-size: 0.875rem; margin: 0.1rem 0 0.45rem; }
.sigkarte .zahlen { display: grid; grid-template-columns: repeat(3, auto); gap: 0.1rem 0.9rem; font-size: 0.8125rem; justify-content: start; }
.sigkarte .zahlen dt { color: var(--tinte-leise); }
.sigkarte .zahlen dd { margin: 0; font-weight: 600; }
.sigkarte .beleg { font-size: 0.75rem; color: var(--tinte-leise); margin: 0.5rem 0 0; }
.urteil { font-size: 0.6875rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 999px; white-space: nowrap; }
.urteil.vorteil_belegt { background: var(--gut-hell); color: var(--gut); }
.urteil.nachteil_belegt { background: var(--schlecht-hell); color: var(--schlecht); }
.urteil.kein_vorteil_belegt, .urteil.zu_wenig_faelle, .urteil.unbekannt { background: var(--warn-hell); color: var(--warn); }

.filterzeile { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; margin-bottom: 0.75rem; }
.filterzeile label { max-width: 12rem; }
.filterzeile .haken { display: inline-flex; align-items: center; color: var(--tinte); font-size: 0.875rem; padding-bottom: 0.45rem; }
.sortierbar th[data-feld] { cursor: pointer; user-select: none; white-space: nowrap; }
.sortierbar th[aria-sort="ascending"]::after { content: " ↑"; }
.sortierbar th[aria-sort="descending"]::after { content: " ↓"; }
.sortierbar tbody tr { cursor: pointer; }
.sortierbar tbody tr:hover { background: var(--akzent-hell); }
.sortierbar td.sig { font-size: 0.75rem; }
.trendmarke { font-size: 0.75rem; font-weight: 600; }

/* ============================================================ Chart */
.symbolsuche { display: inline-flex; gap: 0.35rem; }
.symbolsuche input { width: 12rem; margin: 0; }
.chart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .chart-layout { grid-template-columns: 1fr; } }
.schalter { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.schalter button { font-size: 0.8125rem; padding: 0.25rem 0.6rem; border-radius: 999px; }
.schalter button[aria-pressed="true"] { border-color: var(--akzent); background: var(--akzent-hell); color: var(--akzent); font-weight: 600; }
.schalter button .punkt { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: 0; }
.chart-rahmen { position: relative; border: 1px solid var(--linie); border-radius: var(--r-klein); background: var(--flaeche); }
.chart-flaeche { height: 38rem; }
.chart-legende { position: absolute; left: 0.6rem; top: 0.4rem; z-index: 3; font-size: 0.75rem; pointer-events: none; display: flex; flex-wrap: wrap; gap: 0.1rem 0.8rem; max-width: calc(100% - 5rem); }
.chart-legende b { font-weight: 600; }
.chart-seite h3:first-of-type { margin-top: 1.25rem; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 0.9rem 1rem; }
.karte h3 { font-size: 1.0625rem; margin-bottom: 0.15rem; }
.karte .kopfzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.karte .beleg { font-size: 0.8125rem; margin: 0.6rem 0; padding: 0.55rem 0.7rem; border-radius: var(--r-klein); background: var(--grund); }
.karte .beleg.nachteil_belegt { background: var(--schlecht-hell); color: var(--schlecht); }
.karte .beleg.vorteil_belegt { background: var(--gut-hell); color: var(--gut); }
.karte ul { margin: 0.5rem 0; padding-left: 1.1rem; font-size: 0.8125rem; }
.karte .zeile { margin-top: 0.75rem; }
.sigverlauf { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); max-height: 15rem; overflow-y: auto; }
.sigverlauf button { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; background: transparent; padding: 0.4rem 0.2rem; font-size: 0.8125rem; display: grid; grid-template-columns: 5.2rem 1fr auto; gap: 0.5rem; }
.sigverlauf button:hover, .sigverlauf button[aria-current="true"] { background: var(--akzent-hell); }
@media (prefers-color-scheme: dark) { .hm-kachel.stark { color: #0F1A1C; } }

.sigverlauf .urteil, .sigkarte .urteil { align-self: center; }
.abgewertet { margin-top: 0.9rem; }
.abgewertet summary { cursor: pointer; color: var(--tinte-leise); font-size: 0.875rem; margin-bottom: 0.6rem; }
.muster tbody tr { cursor: pointer; }
.muster tbody tr:hover { background: var(--akzent-hell); }

/* ============================================================ Meldungen, Alarme, Zeitplan */
.zeitplan-btn { margin-left: 1rem; font-size: 0.8125rem; padding: 0.25rem 0.7rem; border-radius: 999px; }
.zeitplan-btn[aria-pressed="true"] { border-color: var(--akzent); color: var(--akzent); background: var(--akzent-hell); font-weight: 600; }
.mini { font-size: 0.75rem; padding: 0.15rem 0.5rem; font-weight: 400; }
.meldungen { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); max-height: 19rem; overflow-y: auto; }
.meldungen li { display: grid; gap: 0.1rem; padding: 0.55rem 0.4rem 0.55rem 0.7rem; border-bottom: 1px solid var(--linie); border-left: 3px solid transparent; font-size: 0.875rem; }
.meldungen li.neu { border-left-color: var(--akzent); background: var(--flaeche); }
.meldungen li.art-stop { border-left-color: var(--schlecht); }
.meldungen li.art-ziel { border-left-color: var(--gut); }
.meldungen .mkopf { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--tinte-leise); }
.meldungen .art { font-weight: 600; }
.alarmliste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.alarmliste li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--linie); font-size: 0.875rem; }
.alarmliste li.erreicht { background: var(--gut-hell); }
.alarmliste .zeile { margin-top: 0; }
.alarmliste button { font-size: 0.8125rem; padding: 0.3rem 0.7rem; }
/* ============================================================ Nachrichten */
.newsliste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); max-height: 22rem; overflow-y: auto; }
.newsliste li { padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--linie); font-size: 0.8125rem; display: grid; gap: 0.2rem; }
.newsliste a { color: var(--tinte); text-decoration: none; }
.newsliste a:hover { color: var(--akzent); text-decoration: underline; }
.newsliste .meta { color: var(--tinte-leise); font-size: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.thema { font-size: 0.6875rem; padding: 0 0.4rem; border-radius: 999px; background: var(--grund); border: 1px solid var(--linie); color: var(--tinte-leise); }
.thema.zahlen, .thema.prognose { border-color: var(--warn); color: var(--warn); background: var(--warn-hell); }
#sk-news:empty { display: none; }
/* ============================================================ Hilfe, Rundgang, Begriffe */
.hilfe-btn { margin-left: 0.6rem; font-size: 0.8125rem; padding: 0.25rem 0.8rem; border-radius: 999px; font-weight: 600; }
.hilfe-btn[aria-expanded="true"] { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.hilfe-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(26rem, 100vw); background: var(--flaeche); border-left: 1px solid var(--linie);
  box-shadow: -8px 0 24px rgb(0 0 0 / 0.12); padding: 1.1rem 1.25rem 2rem; overflow-y: auto; z-index: 40; }
.hilfe-panel header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.6rem; }
.hilfe-panel h2 { margin: 0; font-size: 1.125rem; }
.hilfe-panel h3 { font-size: 0.9375rem; margin: 1.4rem 0 0.4rem; }
.hilfe-panel ol { padding-left: 1.2rem; margin: 0 0 0.9rem; font-size: 0.875rem; }
.hilfe-panel ol li { margin: 0.35rem 0; }
.hilfe-panel details { border-bottom: 1px solid var(--linie); padding: 0.35rem 0; font-size: 0.875rem; }
.hilfe-panel summary { cursor: pointer; font-weight: 600; }
.hilfe-panel details p { margin: 0.35rem 0 0.2rem; }
#wunsch-form { display: grid; gap: 0.6rem; }
#wunsch-form textarea, .tb-felder textarea { font: inherit; color: var(--tinte); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--r-klein); padding: 0.45rem 0.55rem; width: 100%; margin-top: 0.2rem; resize: vertical; }
#wunsch-liste { list-style: none; margin: 0; padding: 0; }
#wunsch-liste li { display: grid; gap: 0.15rem; padding: 0.55rem 0 0.55rem 0.6rem; border-bottom: 1px solid var(--linie); border-left: 3px solid var(--linie); }
#wunsch-liste li.st-geplant { border-left-color: var(--warn); }
#wunsch-liste li.st-erledigt { border-left-color: var(--gut); }
#wunsch-liste select { width: auto; margin: 0 0 0 0.4rem; padding: 0.15rem 0.3rem; font-size: 0.8125rem; }
#wunsch-liste .antwort { color: var(--akzent); }
.frage { font-size: 0.75rem; padding: 0 0.45rem; min-width: 1.4rem; border-radius: 999px; color: var(--akzent); border-color: var(--akzent);
  background: transparent; font-weight: 600; vertical-align: 0.1em; margin-left: 0.3rem; }
[data-begriff]:not(button):not(.sim-band) { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.sim-band[data-begriff] { cursor: help; }
.begriff-karte { position: fixed; z-index: 60; max-width: 21rem; background: var(--tinte); color: var(--grund); border-radius: var(--r-gross);
  padding: 0.7rem 0.9rem; font-size: 0.8125rem; box-shadow: 0 6px 20px rgb(0 0 0 / 0.25); }
.begriff-karte p { margin: 0.3rem 0 0; }
.tour-spot { position: fixed; z-index: 50; border-radius: var(--r-gross); box-shadow: 0 0 0 9999px rgb(10 20 22 / 0.55); outline: 2px solid var(--akzent);
  pointer-events: none; }
.tour-karte { position: fixed; z-index: 51; width: min(24rem, calc(100vw - 16px)); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--r-gross); padding: 0.9rem 1rem; box-shadow: 0 10px 30px rgb(0 0 0 / 0.3); }
.tour-karte h3 { margin: 0.1rem 0 0.35rem; font-size: 1rem; }
.tour-karte p { margin: 0; font-size: 0.875rem; }
.hilfe-hinweis { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 30; background: var(--flaeche); border: 1px solid var(--akzent);
  border-radius: var(--r-gross); padding: 0.7rem 0.9rem; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; font-size: 0.875rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); max-width: calc(100vw - 2rem); }

/* ============================================================ Tagebuch, Namen, ISIN */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin: 0; }
.kacheln > div { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 0.75rem 0.9rem; display: grid; gap: 0.1rem; }
.kacheln dt { font-size: 0.75rem; color: var(--tinte-leise); }
.kacheln dd { margin: 0; font-family: var(--schrift-display); font-size: 1.25rem; font-weight: 600; }
.tb-trades { display: grid; gap: 0.75rem; }
.tb-trade { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--linie); border-radius: var(--r-klein); padding: 0.8rem 1rem; }
.tb-trade.plus { border-left-color: var(--gut); }
.tb-trade.minus { border-left-color: var(--schlecht); }
.tb-trade.offen { border-left-color: var(--akzent); }
.tb-trade header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; align-items: baseline; }
.tb-trade h4 { margin: 0; font-size: 1rem; font-family: var(--schrift-display); }
.tb-trade .erg { font-weight: 600; }
.tb-trade .signaltext { color: var(--tinte-leise); margin: 0.3rem 0 0; }
.tb-felder { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.75rem 1rem; margin-top: 0.6rem; align-items: start; }
.tb-felder fieldset { margin: 0; }
.tb-felder legend { font-size: 0.8125rem; color: var(--tinte-leise); font-weight: 400; font-family: var(--schrift); margin-bottom: 0.3rem; }
.tb-felder fieldset label { display: inline-flex; align-items: center; color: var(--tinte); margin-right: 0.8rem; font-size: 0.875rem; }
@media (max-width: 800px) { .tb-felder { grid-template-columns: 1fr; } }
.sigkarte .firma { margin: 0; font-size: 0.8125rem; color: var(--tinte-leise); }
.sigkarte .firma:empty { display: none; }
.isinform { display: flex; gap: 0.4rem; align-items: flex-end; margin-top: 0.9rem; }
.isinform label { flex: 1; }
#sk-termin:empty { display: none; }
/* ============================================================ Darstellung: Modus, Akzent, Kursfarben, Schrift */
:root { --auf-akzent: #fff; --kerze-auf: var(--gut); --kerze-ab: var(--schlecht); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) { --auf-akzent: #0F1A1C; } }
:root[data-theme="hell"] { color-scheme: light; --auf-akzent: #fff;
  --grund: #F1F3EF; --flaeche: #FFFFFF; --tinte: #1D2B2E; --tinte-leise: #56666A; --linie: #D5DCD8; --akzent: #0E5A61; --akzent-hell: #DCEBEC;
  --gut: #2F7A4C; --gut-hell: #E1F0E6; --schlecht: #A8322A; --schlecht-hell: #F6E2DF; --warn: #A86B12; --warn-hell: #F7EBD6; }
:root[data-theme="dunkel"] { color-scheme: dark; --auf-akzent: #0F1A1C;
  --grund: #141C1E; --flaeche: #1B2528; --tinte: #E3EAE8; --tinte-leise: #9AAAA9; --linie: #31403F; --akzent: #5FB3B8; --akzent-hell: #1E3A3D;
  --gut: #6CC08C; --gut-hell: #1D3527; --schlecht: #E47D72; --schlecht-hell: #3D2220; --warn: #E0A855; --warn-hell: #3A2C17; }
.haupt, .umschalter button[aria-pressed="true"], .hilfe-btn[aria-expanded="true"] { color: var(--auf-akzent); }
:root[data-akzent] { --akzent-hell: color-mix(in srgb, var(--akzent) 15%, var(--flaeche)); }
:root[data-akzent="blau"] { --akzent: #1F5FBF; }
:root[data-akzent="violett"] { --akzent: #6541B8; }
:root[data-akzent="bernstein"] { --akzent: #9A5B00; }
:root[data-akzent="gruen"] { --akzent: #2B7044; }
:root[data-theme="dunkel"][data-akzent="blau"] { --akzent: #84B2F5; }
:root[data-theme="dunkel"][data-akzent="violett"] { --akzent: #B39DF0; }
:root[data-theme="dunkel"][data-akzent="bernstein"] { --akzent: #E3A84A; }
:root[data-theme="dunkel"][data-akzent="gruen"] { --akzent: #7CC796; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"])[data-akzent="blau"] { --akzent: #84B2F5; }
  :root:not([data-theme="hell"])[data-akzent="violett"] { --akzent: #B39DF0; }
  :root:not([data-theme="hell"])[data-akzent="bernstein"] { --akzent: #E3A84A; }
  :root:not([data-theme="hell"])[data-akzent="gruen"] { --akzent: #7CC796; }
}
:root[data-kerzen="blauorange"] { --kerze-auf: #1F6FB5; --kerze-ab: #C8641A; }
:root[data-theme="dunkel"][data-kerzen="blauorange"] { --kerze-auf: #6FB1E8; --kerze-ab: #F0A25A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"])[data-kerzen="blauorange"] { --kerze-auf: #6FB1E8; --kerze-ab: #F0A25A; } }
:root[data-kerzen] .pos { color: var(--kerze-auf); }
:root[data-kerzen] .neg { color: var(--kerze-ab); }
:root[data-schrift="gross"] { font-size: 112.5%; }
.darstellung-panel { position: fixed; top: 9.5rem; right: 1.25rem; z-index: 45; width: min(21rem, calc(100vw - 2rem)); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 0.9rem 1rem 1rem; box-shadow: 0 10px 30px rgb(0 0 0 / 0.2); }
.darstellung-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.darstellung-panel h2 { margin: 0; font-size: 1.0625rem; }
.darstellung-panel fieldset { margin: 0.7rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; }
.darstellung-panel legend { font-size: 0.8125rem; color: var(--tinte-leise); font-weight: 600; font-family: var(--schrift); width: 100%; margin-bottom: 0.25rem; }
.darstellung-panel label { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--tinte); font-size: 0.875rem; }
.darstellung-panel input[type="radio"] { width: auto; margin: 0; }
.farbwahl::after { content: ""; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 1px solid var(--linie); }
.farbe-petrol::after { background: #0E5A61; } .farbe-blau::after { background: #1F5FBF; } .farbe-violett::after { background: #6541B8; }
.farbe-bernstein::after { background: #9A5B00; } .farbe-gruen::after { background: #2B7044; }
/* ============================================================ Ansicht Aktuell */
.tb-felder input[type="radio"] { width: auto; margin: 0 0.3rem 0 0; }
.aktuell-streifen { margin: 1rem 0 0; padding: 0.6rem 0.9rem; background: var(--akzent-hell); border-left: 3px solid var(--akzent);
  border-radius: var(--r-klein); font-size: 0.875rem; }
.akt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 2rem; align-items: start; }
@media (max-width: 1050px) { .akt-layout { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.chips button { font-size: 0.8125rem; padding: 0.25rem 0.7rem; border-radius: 999px; }
.chips button[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); font-weight: 600; }
.chips .anz { opacity: 0.75; font-variant-numeric: tabular-nums; margin-left: 0.15rem; }
.akt-suche { display: block; max-width: 24rem; margin-bottom: 0.5rem; }
.newstag h4, .termintag h4 { margin: 1.1rem 0 0.3rem; font-size: 0.9375rem; font-family: var(--schrift-display); display: flex; gap: 0.6rem; align-items: baseline;
  position: sticky; top: 0; background: var(--grund); padding: 0.3rem 0; z-index: 1; }
.newstag h4 .leise, .termintag h4 .leise { font-weight: 400; font-size: 0.8125rem; }
.newstag ul, .termintag ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.newstag li { display: grid; grid-template-columns: 3rem 5.5rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.45rem 0.4rem 0.45rem 0.6rem;
  border-bottom: 1px solid var(--linie); border-left: 3px solid transparent; font-size: 0.875rem; }
.newstag li.wichtig { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn-hell) 45%, transparent); }
.newstag li.meins { border-left-color: var(--akzent); }
.newstag .uhr { color: var(--tinte-leise); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.newstag .wert { font-weight: 600; color: var(--akzent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.newstag .wert.markt { color: var(--tinte-leise); font-weight: 400; }
.newstag .text a { color: var(--tinte); text-decoration: none; }
.newstag .text a:hover { color: var(--akzent); text-decoration: underline; }
.newstag .thema { margin-left: 0.35rem; }
.meinmarke { font-size: 0.6875rem; padding: 0 0.4rem; border-radius: 999px; background: var(--akzent); color: var(--auf-akzent); margin-left: 0.35rem; white-space: nowrap; }
.termintag li { display: grid; gap: 0.1rem; padding: 0.45rem 0.4rem 0.45rem 0.6rem; border-bottom: 1px solid var(--linie); border-left: 3px solid transparent; font-size: 0.875rem; }
.termintag.nah li { border-left-color: var(--warn); }
.termintag li.meins { border-left-color: var(--akzent); background: var(--akzent-hell); }
.termintag a { color: var(--tinte); text-decoration: none; }
.termintag a:hover strong { color: var(--akzent); }
.termintag .meinmarke { justify-self: start; margin-left: 0; }
#akt-mehr { margin-top: 1rem; }
@media (max-width: 640px) { .newstag li { grid-template-columns: 3rem minmax(0, 1fr); } .newstag .wert { grid-column: 2; } .newstag .text { grid-column: 1 / -1; } }
/* ============================================================ Ansicht Taktgeber */
.kat-geldpolitik { --kat: var(--akzent); } .kat-konjunktur { --kat: var(--warn); } .kat-unternehmen { --kat: #7A5BC0; }
.kat-mechanik { --kat: var(--tinte-leise); } .kat-saison { --kat: var(--gut); } .kat-ohne_termin { --kat: #8A7A6A; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tg-naechste { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; }
.tg-karte { display: grid; gap: 0.2rem; padding: 0.85rem 1rem; background: var(--flaeche); border: 1px solid var(--linie); border-top: 4px solid var(--kat);
  border-radius: var(--r-gross); text-decoration: none; color: var(--tinte); }
.tg-karte:hover { border-color: var(--kat); }
.tg-karte .tg-wann { font-family: var(--schrift-display); font-size: 1.25rem; font-weight: 600; color: var(--kat); }
.tg-karte .tg-mehr { font-size: 0.8125rem; color: var(--akzent); font-weight: 600; margin-top: 0.3rem; }
#tg-kategorien button i, .tg-titel i { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--kat); margin-right: 0.4rem; }
.tg-band { display: grid; grid-template-columns: repeat(12, minmax(5.2rem, 1fr)); gap: 0; border: 1px solid var(--linie); border-radius: var(--r-gross);
  background: var(--flaeche); overflow-x: auto; }
.tg-monat { padding: 0.5rem 0.4rem 0.7rem; border-right: 1px solid var(--linie); display: flex; flex-direction: column; gap: 0.25rem; min-height: 9rem; }
.tg-monat:last-child { border-right: 0; }
.tg-monat.aktuell { background: var(--akzent-hell); }
.tg-monat h4 { margin: 0 0 0.25rem; font-size: 0.8125rem; font-family: var(--schrift-display); text-align: center; }
.tg-chip { display: flex; align-items: baseline; gap: 0.3rem; font-size: 0.75rem; padding: 0.15rem 0.35rem; border-radius: var(--r-klein); text-decoration: none;
  color: var(--tinte); border-left: 3px solid var(--kat); background: color-mix(in srgb, var(--kat) 12%, var(--flaeche)); white-space: nowrap; overflow: hidden; }
.tg-chip:hover { background: color-mix(in srgb, var(--kat) 28%, var(--flaeche)); }
.tg-chip .tag { font-variant-numeric: tabular-nums; font-weight: 700; }
.tg-chip.g1 { opacity: 0.7; }
.tg-chip.g3 { font-weight: 600; }
.tg-chip.vorbei { opacity: 0.45; }
.tg-chip sup { color: var(--tinte-leise); }
.tg-faktor { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--kat); border-radius: var(--r-klein); margin-bottom: 0.6rem;
  scroll-margin-top: 1rem; }
.tg-faktor.hervor { outline: 2px solid var(--akzent); outline-offset: 2px; }
.tg-faktor > summary { cursor: pointer; padding: 0.7rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; align-items: baseline; }
.tg-titel { font-weight: 600; font-family: var(--schrift-display); }
.tg-inhalt { padding: 0 1rem 1rem; display: grid; gap: 1rem; }
.tg-text p { margin: 0 0 0.4rem; max-width: 60rem; }
.tg-baum { display: grid; grid-template-columns: auto 1fr; gap: 0 1.5rem; align-items: center; }
.tg-ereignis { padding: 0.8rem 1rem; border-radius: var(--r-gross); background: var(--kat); color: #fff; font-weight: 600; font-family: var(--schrift-display);
  text-align: center; max-width: 9rem; }
.tg-zweige { display: grid; gap: 0.5rem; border-left: 2px solid var(--kat); padding-left: 0; }
.tg-zweig { display: grid; grid-template-columns: minmax(11rem, 17rem) 1fr; gap: 1rem; align-items: center; position: relative; padding-left: 1.5rem; }
.tg-zweig::before { content: ""; position: absolute; left: 0; top: 50%; width: 1.2rem; border-top: 2px solid var(--kat); }
.tg-wenn { background: var(--grund); border: 1px solid var(--linie); border-radius: var(--r-klein); padding: 0.5rem 0.7rem; display: grid; gap: 0.1rem; }
.tg-wenn span { font-size: 0.8125rem; color: var(--tinte-leise); }
.tg-wirkung { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tg-wirkung li { font-size: 0.8125rem; padding: 0.2rem 0.55rem; border-radius: 999px; border: 1px solid var(--linie); background: var(--grund); white-space: nowrap; }
.tg-wirkung .pf { margin-right: 0.35rem; font-size: 0.75rem; letter-spacing: -0.1em; }
.tg-wirkung li.auf { border-color: var(--kerze-auf); color: var(--kerze-auf); background: color-mix(in srgb, var(--kerze-auf) 10%, var(--flaeche)); }
.tg-wirkung li.ab { border-color: var(--kerze-ab); color: var(--kerze-ab); background: color-mix(in srgb, var(--kerze-ab) 10%, var(--flaeche)); }
.tg-wirkung li.neutral { color: var(--tinte-leise); }
.tg-achten ul, .tg-termine ul { margin: 0.3rem 0 0; padding-left: 1.2rem; font-size: 0.875rem; }
.tg-achten li, .tg-termine li { margin: 0.25rem 0; }
@media (max-width: 760px) { .tg-baum { grid-template-columns: 1fr; gap: 0.6rem; } .tg-ereignis { max-width: none; } .tg-zweig { grid-template-columns: 1fr; gap: 0.4rem; } }
.akt-markt { list-style: none; margin: 0 0 0.5rem; padding: 0; border-top: 1px solid var(--linie); }
.akt-markt li { display: grid; gap: 0.1rem; padding: 0.45rem 0.4rem 0.45rem 0.6rem; border-bottom: 1px solid var(--linie); border-left: 3px solid var(--kat); font-size: 0.875rem; }
.akt-markt a { color: var(--tinte); text-decoration: none; }
.akt-markt a:hover { color: var(--akzent); }
#markt-takt { margin-top: 0.5rem; }

/* ============================================================ Short-Signale, Defensiv-Modus */
.shortmarke { font-size: 0.6875rem; padding: 0 0.45rem; border-radius: 999px; background: var(--tinte); color: var(--grund); font-weight: 600; margin-left: 0.4rem; }
.sigkarte.short { border-style: dashed; }
#sc-schwaeche { align-self: flex-end; font-size: 0.875rem; }
#scanner-defensiv { margin-bottom: 0.5rem; }

/* Verlust belegt: gleiche Darstellung wie Nachteil belegt */
.sigkarte.verlust_belegt { border-left-color: var(--schlecht); opacity: 0.8; }
.urteil.verlust_belegt { background: var(--schlecht-hell); color: var(--schlecht); }
.karte .beleg.verlust_belegt { background: var(--schlecht-hell); color: var(--schlecht); }

/* ============================================================ Bereiche je Profil: fertig, teilweise, offen */
.module li.fertig, .module li.teilweise { border-color: var(--akzent); background: var(--akzent-hell); padding: 0; }
.module li.teilweise { border-style: dashed; }
.module li.offen { color: var(--tinte-leise); border-style: dashed; }
.module li a { display: block; padding: 0.15rem 0.7rem; color: var(--akzent); text-decoration: none; border-radius: 999px; }
.module li a:hover { text-decoration: underline; }
.module .teil { font-size: 0.6875rem; opacity: 0.8; margin-left: 0.2rem; }

/* ============================================================ Langfristig und Zeitmaschine */
#rb-ziele input, #rb-ziele select { margin-top: 0; }
#rb-ziele td:first-child input { max-width: 12rem; }
#rb-ziele td:first-child span { display: block; }
#iv-liste tr.waehlbar { cursor: pointer; }
#iv-liste tr.waehlbar:hover { background: var(--akzent-hell); }
#lf-tabs { margin-bottom: 0.5rem; }
.zm { margin-top: 1rem; }
.zm h3 { margin: 0; font-size: 1rem; }
.zm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 0.75rem; margin-top: 0.5rem; }
.zm-form .breit { grid-column: 1 / -1; }
.zm-balken { display: grid; grid-template-columns: 7rem 1fr 3rem; gap: 0.5rem; align-items: center; font-size: 0.8125rem; margin: 0.2rem 0; }
.zm-balken div { background: var(--grund); border-radius: 3px; height: 0.7rem; overflow: hidden; }
.zm-balken i { display: block; height: 100%; }
.zm-balken i.auf { background: var(--kerze-auf); } .zm-balken i.ab { background: var(--kerze-ab); } .zm-balken i.neutral { background: var(--tinte-leise); }
.zm-balken b { text-align: right; font-variant-numeric: tabular-nums; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 0.85em; background: var(--grund); padding: 0.05rem 0.3rem; border-radius: 3px; }

/* ============================================================ Scanner-Werte pflegen */
#uni-block { margin: 1.25rem 0 0.75rem; }
#uni-block .filterzeile { margin-top: 0.5rem; }
#uni-treffer tr.neben { opacity: 0.6; }
#uni-treffer button { font-size: 0.8125rem; padding: 0.25rem 0.7rem; }
#chart-uni { margin: 0.2rem 0 0; }
#chart-uni button { margin-left: 0.4rem; }

/* ============================================================ Indexgruppen */
#ig-block { margin: 0 0 0.75rem; }
.ig-gruppen { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0.5rem 0; }
.ig-gruppen label { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--tinte); font-size: 0.875rem; }
.ig-gruppen input { width: auto; margin: 0; }
.ig-liste { list-style: none; margin: 0.3rem 0 0.8rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.2rem 1rem; }
.ig-liste li { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; }
.ig-liste input { width: auto; margin: 0; }
.ig-liste select { width: auto; margin: 0; padding: 0.1rem 0.3rem; font-size: 0.8125rem; }

/* ============================================================ Seitenleiste */
.rahmen { display: flex; align-items: flex-start; }
.rahmen > main { flex: 1; min-width: 0; }
.hauptnav { flex: 0 0 13rem; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: 0.75rem 0.6rem 1rem;
  border-bottom: 0; border-right: 1px solid var(--linie); position: sticky; top: 0; max-height: 100vh; overflow-y: auto; align-self: stretch; }
.hauptnav[hidden] { display: none; }
.navgruppe { display: flex; flex-direction: column; margin-bottom: 0.9rem; }
.navtitel { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tinte-leise); padding: 0.2rem 0.6rem; }
.hauptnav a { padding: 0.4rem 0.6rem; border-bottom: 0; margin: 0; border-left: 3px solid transparent; border-radius: 0 var(--r-klein) var(--r-klein) 0; font-weight: 500; }
.hauptnav a:hover { background: var(--grund); }
.hauptnav a[aria-current] { border-left-color: var(--akzent); background: var(--akzent-hell); border-bottom-color: transparent; font-weight: 600; }
.navfuss { display: flex; flex-direction: column; gap: 0.4rem; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--linie); }
.navfuss .scan-status { margin: 0; padding: 0 0.3rem; }
.navfuss .scan-status:empty { display: none; }
.navfuss button { margin: 0; width: 100%; white-space: normal; text-align: left; border-radius: var(--r-klein); }
:root[data-nav="zu"] .hauptnav { display: none; }
@media (max-width: 900px) {
  .rahmen { flex-direction: column; }
  .hauptnav { flex: none; flex-direction: row; flex-wrap: wrap; position: static; max-height: none; width: 100%; border-right: 0; border-bottom: 1px solid var(--linie); gap: 0.2rem 0.8rem; }
  .navgruppe { flex-direction: row; flex-wrap: wrap; align-items: center; margin: 0; }
  .navfuss { flex-direction: row; flex-wrap: wrap; border-top: 0; padding-top: 0; margin: 0; }
  .navfuss button { width: auto; }
}
.darstellung-panel { top: 5rem; }

/* ============================================================ Raster aus Fenstern */
.raster-leiste { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.raster-versteckt { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-right: auto; }
.raster-versteckt button { font-size: 0.75rem; padding: 0.15rem 0.6rem; border-radius: 999px; border-style: dashed; }
.raster { position: relative; }
.w-fenster { position: absolute; display: flex; flex-direction: column; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross);
  overflow: hidden; transition: left 0.15s, top 0.15s, width 0.15s, height 0.15s; }
.w-fenster.zieht { transition: none; z-index: 5; border-color: var(--akzent); box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); }
@media (prefers-reduced-motion: reduce) { .w-fenster { transition: none; } }
.w-kopf { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0.4rem 0.3rem 0.8rem; cursor: grab;
  border-bottom: 1px solid var(--linie); background: var(--grund); user-select: none; touch-action: none; flex: none; }
.w-kopf:active { cursor: grabbing; }
.w-kopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
.w-titel { font-size: 0.8125rem; font-weight: 600; font-family: var(--schrift-display); }
.w-zu { border: 0; background: transparent; padding: 0 0.4rem; font-size: 1.1rem; line-height: 1; color: var(--tinte-leise); }
.w-zu:hover { color: var(--schlecht); }
.w-inhalt { flex: 1; min-height: 0; overflow: auto; padding: 0.7rem 0.8rem; }
.w-griff { position: absolute; right: 0; bottom: 0; width: 1.1rem; height: 1.1rem; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, var(--tinte-leise) 50%, var(--tinte-leise) 60%, transparent 60%, transparent 72%, var(--tinte-leise) 72%, var(--tinte-leise) 82%, transparent 82%); opacity: 0.6; }
.w-griff:hover { opacity: 1; }
.raster-schmal { height: auto !important; display: grid; gap: 0.75rem; }
.raster-schmal .w-fenster { position: static; width: auto !important; height: auto !important; }
.raster-schmal .w-griff { display: none; }
.raster-schmal .w-kopf { cursor: default; }
/* Inhalte, die bisher eine eigene Höhe hatten, füllen jetzt ihr Fenster */
[data-widget="chart"] .w-inhalt { display: flex; flex-direction: column; overflow: hidden; padding: 0.5rem 0.6rem 0.3rem; }
[data-widget="chart"] .chart-rahmen { flex: 1; min-height: 0; }
[data-widget="chart"] .chart-flaeche { height: 100%; }
[data-widget="chart"] #chart-hinweis { margin: 0.25rem 0 0; flex: none; }
.raster-schmal [data-widget="chart"] .chart-flaeche { height: 28rem; }
.w-inhalt .newsliste { max-height: none; border-top: 0; }
.w-inhalt #signalkarte .karte { border: 0; padding: 0; background: transparent; }
.w-inhalt .zm { margin-top: 0; }
.w-inhalt .werte { margin-top: 0; }
.menue-btn { align-self: center; font-size: 0.8125rem; padding: 0.3rem 0.7rem; }
.kopf-titel { margin-right: auto; }

/* ============================================================ Anmeldung */
.anmeldung { max-width: 26rem; margin: 3rem auto; padding: 1.5rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); }
.anmeldung h2 { margin: 0 0 0.3rem; font-size: 1.375rem; }
.anmeldung form { display: grid; gap: 0.9rem; margin-top: 1rem; }
.anmeldung form[hidden] { display: none; }
body:has(#ansicht-anmeldung:not([hidden])) .hilfe-hinweis { display: none; }
