@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

/* Look „Nachtwache“ (Design-Runde 25.11.): ruhiger Grund, Haarlinien, Farbe nur an Zahlen und Meldungen */
:root {
  --tinte: #0B1117;        /* Grund */
  --flaeche: #111922;      /* aufgeklappte Zeile, Felder */
  --flaeche-2: #16212B;    /* Hover, aktive Auswahl */
  --linie: rgba(214, 226, 238, 0.085);
  --linie-2: rgba(214, 226, 238, 0.16);
  --rand-feld: #4A535C;     /* Ränder von Feldern/Knöpfen: 3:1 */
  --text: #ECE8E1;         /* warmes Weiß */
  --text-2: #A3ABB3;
  --text-3: #7C868F;
  --signal: #F0810F;       /* NUR Meldungen */
  --signal-text: #1a0d00;
  --plus: #4CC38A;         /* nur Kurse */
  --minus: #F27B70;
  --a-steigt: #2FA36B; --a-heiss: #C76BE0; --a-faellt: #E35A4F; --a-erholt: #3A8EDB; --a-ruhig: #8A949C;
  --rahmen: 1120px;
  --leiste: 232px;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100dvh; overflow-x: clip;
  background: var(--tinte); color: var(--text);
  font: 400 15px/1.5 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Rahmen: Seitenleiste (Laptop), Kopf + Leiste unten (Handy) ---------- */
.seitenleiste {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--leiste); z-index: 20;
  display: flex; flex-direction: column; gap: 2px; padding: 18px 12px calc(env(safe-area-inset-bottom) + 14px);
  border-right: 1px solid var(--linie); background: var(--tinte); overflow-y: auto;
}
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.marke svg { width: 24px; height: 24px; flex: none; }
.seitenleiste .marke { padding: 4px 10px 22px; }
.sl-a {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); font-size: 15px; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.sl-a svg { width: 18px; height: 18px; flex: none; }
.sl-a:hover { color: var(--text); background: var(--flaeche); }
.sl-a[aria-current="page"] { color: var(--text); background: var(--flaeche-2); }
.sl-a .anz { margin-left: auto; color: var(--text-3); font-size: 13px; }
.zaehler { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--signal); color: var(--signal-text); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.sl-unter { display: grid; gap: 1px; margin: 2px 0 8px; }
.sl-unter .sl-a { padding: 6px 10px 6px 40px; font-size: 14px; border-radius: 0 8px 8px 0; }
.sl-unter .sl-a[aria-current="true"] { color: var(--text); background: none; box-shadow: inset 2px 0 0 var(--text); }
.sl-unter .sl-a.neu { color: var(--text-3); }
.sl-fuss { margin-top: auto; border-top: 1px solid var(--linie); padding-top: 10px; display: grid; gap: 2px; }

.kopf-handy, .tabbar { display: none; }
body.mit-rahmen { padding-left: var(--leiste); }
.haupt { max-width: calc(var(--rahmen) + 64px); margin: 0 auto; padding: 0 32px 80px; outline: none; }

/* Suchleiste oben */
.oben { max-width: calc(var(--rahmen) + 64px); margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 16px; height: 64px; }
.suche { display: flex; align-items: center; gap: 10px; width: 380px; max-width: 100%; height: 40px; padding: 0 6px 0 14px; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--rand-feld); }
.suche:focus-within { outline: 2px solid var(--text); outline-offset: 2px; }
.suche svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.suche input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 0; font-size: 14px; height: 100%; }
.suche input::placeholder { color: var(--text-3); }
.suche button { border: 0; background: none; color: var(--text-2); font-size: 13px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.suche button:hover { background: var(--flaeche-2); color: var(--text); }
.oben .stand { margin: 0 0 0 auto; }

@media (max-width: 899px) {
  body.mit-rahmen { padding-left: 0; }
  .seitenleiste { display: none; }
  .kopf-handy {
    display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 12px;
    padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: var(--tinte); border-bottom: 1px solid var(--linie);
  }
  .kopf-handy .marke { font-size: 16px; }
  .plus-knopf { width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; background: var(--text); color: var(--tinte); border: 0; cursor: pointer; }
  .plus-knopf svg { width: 20px; height: 20px; }
  .plus-knopf[aria-expanded="true"] { background: var(--flaeche-2); color: var(--text); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--tinte); border-top: 1px solid var(--linie-2); padding: 6px 0 calc(env(safe-area-inset-bottom) + 6px);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--text-3); text-decoration: none; padding: 4px 0; position: relative; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar .zaehler { position: absolute; top: 0; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .oben { height: auto; padding: 12px 16px 4px; }
  .oben[data-handy-zu] { display: none; }
  .oben .stand { display: none; }
  .suche { width: 100%; height: 44px; }
  .suche input { font-size: 16px; }
  .haupt { padding: 0 16px calc(env(safe-area-inset-bottom) + 96px); }
}

/* ---------- Typo ---------- */
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.seiten-titel { font-size: 34px; font-weight: 400; letter-spacing: -0.025em; margin: 28px 0 8px; }
.seiten-unter { color: var(--text-2); margin: 0 0 24px; max-width: 64ch; }
.klein { font-size: 13px; color: var(--text-3); }
.gedimmt { color: var(--text-2); }
.plus { color: var(--plus); }
.minus { color: var(--minus); }
.stand { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin: 0; }
.stand svg { width: 14px; height: 14px; flex: none; }
.stand.alt { color: var(--text); }
@media (max-width: 899px) { .seiten-titel { font-size: 28px; margin-top: 18px; } }

/* Ampel-Zeichen (Form + Wort, nie Farbe allein) */
.glyph { width: 12px; height: 12px; flex: none; display: inline-block; vertical-align: -1px; }
.lage-wort { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; white-space: nowrap; }

/* ---------- Startseite: Märkte + Hinweis ---------- */
.maerkte-leiste { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.mk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 14px 24px 14px 0; min-width: 0; }
.mk + .mk { padding-left: 24px; border-left: 1px solid var(--linie); }
.mk-name { color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.mk-wert { font-size: 20px; white-space: nowrap; }
.mk-wert small { font-size: 15px; margin-left: 10px; }
.mk .mini { grid-row: 1 / span 2; grid-column: 2; width: 150px; height: 34px; }
.hinweis-zeile { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); font-size: 14px; }
.hinweis-zeile time { color: var(--text-3); white-space: nowrap; }
.hinweis-zeile a { margin-left: auto; color: var(--text-2); white-space: nowrap; text-underline-offset: 3px; text-decoration-color: var(--linie-2); }
.hinweis-zeile a:hover { color: var(--text); }
.m-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); flex: none; display: inline-block; transform: translateY(-1px); }
@media (max-width: 899px) {
  .maerkte-leiste { grid-template-columns: 1fr 1fr; margin-top: 8px; }
  .mk { grid-template-columns: 1fr; padding: 12px 12px 12px 0; }
  .mk + .mk { padding-left: 12px; }
  .mk .mini { display: none; }
  .mk-wert { font-size: 17px; }
  .mk-wert small { display: block; margin: 0; font-size: 14px; }
  .hinweis-zeile { flex-wrap: wrap; gap: 4px 10px; }
  .hinweis-zeile a { margin-left: auto; }
  .hinweis-zeile > span:not(.m-punkt) { flex-basis: 100%; order: 3; }
}

/* Listen-Kopf, Reiter (Handy), Filter */
.listen-kopf { display: flex; align-items: baseline; gap: 12px; margin: 36px 0 14px; }
.listen-kopf h1 { font-size: 28px; }
.reiter { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--linie); margin-top: 16px; }
.reiter::-webkit-scrollbar { display: none; }
.reiter button { flex: none; border: 0; background: none; cursor: pointer; padding: 12px 0; color: var(--text-2); font-size: 16px; position: relative; }
.reiter button .anz { color: var(--text-3); margin-left: 6px; font-size: 14px; }
.reiter button[aria-selected="true"] { color: var(--text); }
.reiter button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
.filter { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--rand-feld); background: none; color: var(--text-2); font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--tinte); border-color: var(--text); font-weight: 600; }
.chip .anz { opacity: 0.7; }
.zeitraum { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--rand-feld); }
.zeitraum button { border: 0; background: none; cursor: pointer; padding: 5px 12px; border-radius: 7px; color: var(--text-2); font-size: 13px; min-width: 40px; }
.zeitraum button:hover { color: var(--text); }
.zeitraum button[aria-pressed="true"] { background: var(--text); color: var(--tinte); font-weight: 600; }
@media (max-width: 899px) {
  .listen-kopf { display: none; }
  .filter { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 12px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chip { height: 40px; }
  .zeitraum { display: flex; }
  .zeitraum button { flex: 1; padding: 8px 0; min-width: 0; min-height: 44px; }
}
@media (min-width: 900px) {
  .reiter.nur-handy { display: none; }
  .filter { position: sticky; top: 0; z-index: 5; background: var(--tinte); padding: 10px 0; margin-bottom: 0; }
}

/* ---------- Tabelle / Akkordion ---------- */
.liste { margin: 0; }
.tab-kopf, .zeile-kopf {
  display: grid; align-items: center; gap: 0 16px; padding: 0 12px 0 16px;
  grid-template-columns: minmax(200px, 2.3fr) 128px 108px 86px 140px 84px 40px 40px 40px;
}
.tab-kopf { height: 40px; font-size: 13px; color: var(--text-3); border-bottom: 1px solid var(--linie); }
.tab-kopf .r { text-align: right; }
.zeile { border-bottom: 1px solid var(--linie); }
.zeile-kopf { min-height: 64px; cursor: pointer; }
@media (hover: hover) { .zeile-kopf:hover { background: var(--flaeche); } }
.zeile { scroll-margin-top: 8px; }
@media (max-width: 899px) { .zeile { scroll-margin-top: 62px; } }
.zeile.offen { background: var(--flaeche); border-bottom-color: var(--linie-2); }
.name-block { min-width: 0; }
.wert-name { font-size: 16px; font-weight: 500; line-height: 1.25; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wert-meta { font-size: 13px; color: var(--text-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile-glyph { display: none; }
.mini { width: 140px; height: 32px; display: block; }
.kurs { text-align: right; font-size: 16px; white-space: nowrap; }
.kurs small { font-size: 12px; color: var(--text-3); margin-left: 3px; }
.prozent, .vom-hoch { text-align: right; white-space: nowrap; }
.vom-hoch { color: var(--text-2); }
.knopf-rund {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius); border: 0;
  background: none; cursor: pointer; color: var(--text-3); text-decoration: none;
}
.knopf-rund:hover { background: var(--flaeche-2); color: var(--text); }
.knopf-rund svg { width: 18px; height: 18px; }
.knopf-rund.an { color: var(--text); }
.chevron { width: 18px; height: 18px; color: var(--text-3); transition: transform 0.2s ease; }
.aufklappen { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--radius); cursor: pointer; }
.aufklappen:hover { background: var(--flaeche-2); }
.zeile.offen .chevron { transform: rotate(180deg); }
.leer-filter { padding: 24px 16px; color: var(--text-2); border-bottom: 1px solid var(--linie); }
.wenig { color: var(--text-2); text-decoration: underline dotted; text-underline-offset: 3px; }
@media (max-width: 899px) {
  .tab-kopf { display: none; }
  /* Handy: einzeilig nur Zeichen, Name, Glocke, baha-Link */
  .zeile-kopf { grid-template-columns: 14px minmax(0, 1fr) 44px 44px 32px; gap: 0 6px; min-height: 56px; padding: 0 0 0 4px; }
  .aufklappen { width: 32px; height: 44px; }
  .zeile-glyph { display: block; }
  .zeile-kopf .spalte-lage, .zeile-kopf .mini, .zeile-kopf .kurs, .zeile-kopf .prozent, .zeile-kopf .vom-hoch, .wert-meta { display: none; }
  .knopf-rund { width: 44px; height: 44px; }
  .zeile.offen { margin: 0 -16px; padding: 0 16px; }
}

/* Themen unter Branchen */
.themen-knopf { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--linie); color: var(--text-2); font-size: 14px; padding: 8px 16px 10px 16px; cursor: pointer; }
.themen-knopf .th-anz { white-space: nowrap; flex: none; }
.themen-knopf .klein { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.themen-knopf:hover { color: var(--text); }
.themen-knopf .mb-pfeil { transition: transform 0.2s; display: inline-block; }
.themen-knopf[aria-expanded="true"] .mb-pfeil { transform: rotate(90deg); }
.themen-gruppe .zeile-kopf .name-block { padding-left: 22px; position: relative; }
.themen-gruppe .zeile-kopf .name-block::before { content: ''; position: absolute; left: 4px; top: -16px; height: calc(50% + 16px); width: 10px; border-left: 1px solid var(--linie-2); border-bottom: 1px solid var(--linie-2); }
.themen-gruppe .wert-name { font-weight: 400; font-size: 15px; }
@media (max-width: 899px) { .themen-gruppe .zeile-kopf .name-block { padding-left: 18px; } }

/* ---------- Aufgeklappt ---------- */
.details { padding: 4px 16px 28px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 8px 40px; }
.details-links { min-width: 0; }
.details-kopf { margin: 6px 0 14px; }
.details-kurs { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.details-kurs .gross { font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.details-kurs .wae { font-size: 18px; color: var(--text-2); }
.details-kurs .ch { font-size: 17px; font-weight: 500; }
.details-kopf .stand { margin-top: 8px; }
.chart { height: 320px; position: relative; cursor: grab; }
.chart:active { cursor: grabbing; }
.chart-info { position: absolute; left: 8px; top: 6px; z-index: 3; font-size: 13px; color: var(--text-2); pointer-events: none; background: var(--flaeche-2); border: 1px solid var(--linie-2); padding: 4px 10px; border-radius: 8px; max-width: calc(100% - 16px); }
.chart-legende { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--text-3); margin: 10px 0 0; align-items: center; }
.chart-legende i { display: inline-block; width: 16px; height: 0; border-top: 2px dashed var(--text-3); vertical-align: middle; margin-right: 6px; }
.chart-legende i.voll { border-top-style: solid; }
.chart-legende i.punktiert { border-top-style: dotted; }
.chart-legende i.punkt-l { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--signal); }
.chart-tipp { font-size: 12px; color: var(--text-3); margin: 6px 0 0; }
.kennzahlen h3, .meldungen-block > summary .mb-titel-t { font-size: 13px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.kennzahlen h3 { margin: 14px 0 6px; }
.kz { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); align-items: baseline; }
.kz:first-of-type { border-top: 1px solid var(--linie); }
.kz-l { color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.kz-w { font-size: 15px; font-weight: 500; text-align: right; }
.kz-w.ruhig { font-weight: 400; color: var(--text-2); }
.kz-s { grid-column: 1 / -1; color: var(--text-3); font-size: 13px; }
.fragezeichen {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px;
  color: var(--text-3); border: 1px solid var(--linie-2); text-decoration: none; flex: none; position: relative;
}
.fragezeichen::after { content: ''; position: absolute; inset: -13px; } /* Tippfläche 44 px */
.fragezeichen:hover { color: var(--tinte); background: var(--text); border-color: var(--text); }
.details-unten { grid-column: 1 / -1; }
.unten { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 899px) {
  .details { grid-template-columns: 1fr; padding: 4px 0 20px; gap: 8px; }
  .details-kurs .gross { font-size: 36px; }
  .chart { height: 240px; }
  .regler button { min-height: 40px; padding: 8px 14px; }
}

/* Regler Ruhig / Wachsam */
.regler { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--tinte); border: 1px solid var(--linie); }
.regler button { border: 0; background: none; cursor: pointer; padding: 5px 12px; border-radius: 6px; color: var(--text-2); font-size: 14px; min-height: 32px; }
.regler button[aria-pressed="true"] { background: var(--flaeche-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--linie-2); }

/* Meldungen (Details + Verlauf) */
.meldungen-block { margin: 18px 0 0; border-top: 1px solid var(--linie); }
.meldungen-block > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 12px 0; font-size: 15px; }
.meldungen-block > summary::-webkit-details-marker { display: none; }
.meldungen-block .mb-titel { flex: 1; }
.meldungen-block .mb-titel .klein { margin-left: 6px; white-space: nowrap; }
.meldungen-block .mb-pfeil { transition: transform 0.2s; color: var(--text-3); }
.meldungen-block[open] .mb-pfeil { transform: rotate(90deg); }
.meldungen { list-style: none; margin: 0; padding: 0; }
.meldung { display: grid; grid-template-columns: 12px 72px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--linie); font-size: 15px; }
.meldung:last-child { border-bottom: 0; }
.meldungen-seite .meldung:last-child { border-bottom: 1px solid var(--linie); }
.meldung time { color: var(--text-3); white-space: nowrap; }
.meldung .art { font-size: 13px; color: var(--text-3); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.meldung .m-punkt { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.meldung.neu .m-punkt { background: var(--signal); box-shadow: none; }
.monat { margin: 28px 0 4px; font-size: 13px; font-weight: 500; color: var(--text-3); padding-bottom: 8px; border-bottom: 1px solid var(--linie); }
@media (max-width: 899px) {
  .meldung { grid-template-columns: 12px minmax(0, 1fr); gap: 2px 10px; }
  .meldung time { grid-column: 2; }
  .meldung > span:not(.m-punkt):not(.art) { grid-column: 2; }
  .meldung .art { grid-column: 2; }
}

/* ---------- Knöpfe + Formulare ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid var(--rand-feld); background: none; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); white-space: nowrap;
}
.knopf:hover { background: var(--flaeche-2); }
.knopf.haupt-knopf { background: var(--text); color: var(--tinte); border-color: var(--text); font-weight: 600; }
.knopf.haupt-knopf:hover { background: #fff; }
.knopf.klein-k { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.knopf.gefahr { color: var(--text); }
.knopf:disabled { opacity: 0.45; cursor: default; }
.knopf svg { width: 16px; height: 16px; }
select.knopf { appearance: auto; }
.feld { display: grid; gap: 6px; margin-bottom: 14px; }
.feld label { font-size: 14px; color: var(--text-2); }
input[type="email"], input[type="password"], input[type="text"], textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius); border: 1px solid var(--rand-feld); background: var(--flaeche);
}
.suche input[type="text"], .suche input[type="search"] { border: 0; background: none; padding: 0; border-radius: 0; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
textarea { min-height: 140px; resize: vertical; font-size: 14px; }
.fehler-text { color: var(--text); font-size: 14px; margin: 0 0 12px; padding-left: 12px; box-shadow: inset 2px 0 0 var(--text-2); }
@media (max-width: 899px) { input[type="email"], input[type="password"], input[type="text"], textarea { font-size: 16px; } }

/* Anmeldung */
.anmelden { max-width: 400px; margin: 12vh auto 0; padding: 0 4px; }
.anmelden .marke { margin-bottom: 36px; }
.anmelden h1 { font-size: 30px; font-weight: 400; margin-bottom: 6px; }
.anmelden p { color: var(--text-2); margin: 0 0 24px; }
.anmelden .knopf { width: 100%; margin-top: 6px; min-height: 44px; }

/* Einstellungen */
.abschnitt { padding: 24px 0; border-top: 1px solid var(--linie); }
.abschnitt h2 { font-size: 19px; margin-bottom: 6px; }
.abschnitt > p { color: var(--text-2); margin: 0 0 14px; max-width: 68ch; }
.anleitung { margin: 0 0 16px; padding-left: 20px; color: var(--text-2); max-width: 68ch; display: grid; gap: 4px; }
.anleitung b { color: var(--text); font-weight: 500; }
.zeilen-liste { list-style: none; margin: 0; padding: 0; }
.zeilen-liste li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linie); flex-wrap: wrap; }
.zeilen-liste li:first-child { border-top: 0; }
.schalter { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.schalter input { appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--flaeche-2); border: 1px solid var(--linie-2); position: relative; cursor: pointer; flex: none; transition: background 0.2s; }
.schalter input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform 0.2s, background 0.2s; }
.schalter input:checked { background: var(--text); border-color: var(--text); }
.schalter input:checked::after { transform: translateX(20px); background: var(--tinte); }
.tabs-import { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs-import .knopf[aria-pressed="true"] { background: var(--flaeche-2); border-color: var(--text-3); }
.imp-zeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.imp-neu { min-width: 200px; width: auto; }

/* Import-Vorschau: „In baha“ und „Gefunden“ untereinander */
.vorschau { list-style: none; margin: 12px 0; padding: 0; border-top: 1px solid var(--linie); }
.vorschau li label { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--linie); cursor: pointer; }
.vorschau li.nicht label { cursor: default; }
.vorschau li.nicht .vz-gefunden { color: var(--text-3); }
.vorschau input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--text); }
.vz { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 2px 10px; min-width: 0; font-size: 14px; }
.vz-l { color: var(--text-3); font-size: 13px; padding-top: 1px; }
.vz-eingabe { color: var(--text-2); overflow-wrap: anywhere; }
.vz-gefunden { color: var(--text); overflow-wrap: anywhere; }
.vz-gefunden b { font-weight: 500; }
.vz-kennung { color: var(--text-3); margin-left: 8px; white-space: nowrap; }
.vz-status { font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.vz-status.sicher { color: var(--text-2); }
.vz-status.pruefen { color: var(--text); font-weight: 500; }
.vz-status.nicht { color: var(--text-3); }
.vz-zusatz { grid-column: 2; font-size: 13px; color: var(--text-2); }
.vz-zusatz.warnung { color: var(--text); }
@media (max-width: 899px) {
  .vorschau li label { grid-template-columns: 22px minmax(0, 1fr); }
  .vz-status { grid-column: 2; }
  .vz { grid-template-columns: 1fr; gap: 0; }
  .vz-l { margin-top: 6px; }
  .vz-l:empty { display: none; }
  .vz-zusatz { grid-column: auto; margin-top: 2px; }
  .vz-kennung { display: block; margin-left: 0; white-space: normal; }
}
.link-feld { display: flex; gap: 8px; margin-top: 10px; }
.link-feld input { font-size: 13px; }
.leer { padding: 48px 0; color: var(--text-2); border-bottom: 1px solid var(--linie); }
.leer h2 { color: var(--text); font-size: 22px; font-weight: 400; margin-bottom: 6px; }
.leer .knopf { margin-top: 16px; }

/* ---------- Erklär-Seite: gleicher Rahmen, Text linksbündig, ~68 Zeichen ---------- */
.hilfe section { padding: 24px 0; border-top: 1px solid var(--linie); scroll-margin-top: 80px; }
.hilfe h2 { font-size: 21px; margin-bottom: 10px; }
.hilfe p, .hilfe li { color: var(--text-2); max-width: 68ch; }
.hilfe strong { color: var(--text); font-weight: 500; }
.hilfe .beispiele { padding-left: 18px; margin: 6px 0 12px; display: grid; gap: 8px; }
.hilfe .beispiele b { color: var(--text); font-weight: 500; }
.hilfe section:target, .hilfe section.ziel { box-shadow: inset 2px 0 0 var(--text); padding-left: 16px; }
.zahlen { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 12px 0; max-width: 68ch; }
.zahlen .kz-w { text-align: left; font-size: 17px; }
.ampel-def { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ampel-def li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: baseline; }
.hinweis { box-shadow: inset 2px 0 0 var(--text-2); padding-left: 16px !important; }
@media (max-width: 899px) { .zahlen { grid-template-columns: 1fr; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 84px); transform: translate(-50%, 12px); opacity: 0;
  padding: 10px 16px; border-radius: var(--radius); background: var(--flaeche-2); border: 1px solid var(--linie-2);
  font-size: 14px; z-index: 50; transition: opacity 0.2s, transform 0.2s; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.zeigen { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; left: calc(50% + var(--leiste) / 2); } }

/* Laden: Platzhalter-Zeilen in Tabellenform */
.laedt { color: var(--text-3); font-size: 13px; }
.skelett-zeile { height: 64px; border-bottom: 1px solid var(--linie); display: flex; align-items: center; padding: 0 16px; gap: 16px; }
.skelett { height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--flaeche), var(--flaeche-2), var(--flaeche)); background-size: 200% 100%; animation: schimmer 1.4s infinite; }
@keyframes schimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Runde Nutzer-Test */
.frage-box { position: absolute; z-index: 60; background: var(--flaeche-2); border: 1px solid var(--rand-feld); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; box-shadow: 0 12px 32px -12px rgba(0,0,0,.7); }
.frage-box p { margin: 0 0 8px; color: var(--text); }
.frage-box a { color: var(--text-2); font-size: 13px; text-underline-offset: 3px; }
button.fragezeichen { background: none; cursor: pointer; padding: 0; font: inherit; font-size: 11px; }
.listen-kopf .knopf-rund { align-self: center; }
.titel-form { display: flex; gap: 8px; align-items: center; }
.titel-form input { font-size: 22px; padding: 6px 10px; width: auto; min-width: 220px; }
.begruessung p { max-width: 62ch; }
.begruessung-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 14px; }
.inline-ico { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.kz-w a { color: var(--text); text-underline-offset: 3px; }
@media (max-width: 899px) {
  /* Handy-Zeile: Zeichen, Name, % im Zeitraum, Glocke, Aufklappen (baha im Aufgeklappten) */
  .zeile-kopf { grid-template-columns: 14px minmax(0, 1fr) auto 44px 36px; }
  .zeile-kopf .prozent { display: block; font-size: 15px; padding-left: 6px; }
  .zeile-kopf [data-extern] { display: none; }
  .aufklappen { width: 36px; }
  .chip, .knopf, .knopf.klein-k { min-height: 44px; }
  .regler button { min-height: 44px; }
  .begruessung-knoepfe .knopf { flex: 1 1 100%; }
}

.lage-grund { display: block; font-size: 13px; color: var(--text-3); margin-top: 1px; padding-left: 20px; }
.spalte-lage { line-height: 1.3; }
.kz-s .grund { color: var(--text); font-weight: 500; }
.toast.mit-knopf { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
.toast-knopf { background: none; border: 1px solid var(--rand-feld); color: var(--text); border-radius: 8px; padding: 6px 12px; min-height: 36px; cursor: pointer; font-weight: 600; }
.treffer-box { max-width: calc(var(--rahmen) + 64px); margin: 0 auto; padding: 4px 32px 12px; }
.treffer-box > * { max-width: 560px; }
.treffer { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--rand-feld); border-radius: var(--radius); background: var(--flaeche); max-width: 560px; }
.treffer li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--linie); }
.treffer li:last-child { border-bottom: 0; }
.treffer li > span:first-child { display: grid; min-width: 0; }
.treffer b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rueckblick { margin-top: 32px; border-top: 1px solid var(--linie); padding-top: 8px; }
.rueckblick > summary { cursor: pointer; padding: 10px 0; color: var(--text-2); }
.rueckblick .meldung { opacity: .75; }
@media (max-width: 899px) { .treffer-box { padding: 4px 16px 12px; } .treffer-box > *, .treffer { max-width: none; } }
.suche input:focus-visible { outline: none; box-shadow: none; } /* Rahmen kommt vom Feld außen */
.mk-name .klein { white-space: nowrap; }

/* zweiter Nutzer-Test */
.meldung.rueck { opacity: .7; }
@media (max-width: 899px) {
  .zeile-kopf .ohne-baha { display: none; }
  .aufklappen { width: 44px; }
  .zeile-kopf { grid-template-columns: 14px minmax(0, 1fr) auto 44px 44px; }
  .toast-knopf { min-height: 44px; }
  .suche button { min-height: 44px; padding: 0 12px; }
  .hinweis-zeile a { padding: 12px 0; margin: -12px 0; }
  .mk-name .klein { display: block; width: 100%; }
  .mk-name { flex-wrap: wrap; row-gap: 0; }
  .chips { padding-right: 16px; }
}

.chart-legende i.trend-l { background: var(--text-2); }

/* Push-Hinweis + Einrichten */
.push-hinweis { margin: 16px 0 4px; padding: 16px 18px; border: 1px solid var(--rand-feld); border-radius: var(--radius); background: var(--flaeche); }
.push-hinweis h2 { font-size: 17px; margin-bottom: 4px; }
.push-hinweis p { margin: 0 0 10px; color: var(--text-2); }
.push-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; }
.push-ok { margin: 16px 0 0; color: var(--text); }
.schritte { margin: 6px 0 12px; padding-left: 22px; display: grid; gap: 4px; color: var(--text-2); max-width: 68ch; }
.hilfe h3 { font-size: 15px; font-weight: 600; margin: 16px 0 4px; }

/* Tablet (25.11.) */
/* Quer mit Seitenleiste (900–1279 px): Mini-Linie und „vom Hoch“ weglassen, damit nichts abgeschnitten wird */
@media (min-width: 900px) and (max-width: 1279px) {
  .tab-kopf, .zeile-kopf { grid-template-columns: minmax(180px, 2fr) 150px 108px 86px 40px 40px 40px; gap: 0 12px; }
  .tab-kopf > :nth-child(5), .tab-kopf > :nth-child(6), .zeile-kopf .mini, .zeile-kopf .vom-hoch { display: none; }
}
/* Hochformat-Tablet (700–899 px): zusätzlich der Kurs in der Zeile */
@media (min-width: 700px) and (max-width: 899px) {
  .zeile-kopf { grid-template-columns: 14px minmax(0, 1fr) 120px 90px 44px 44px; }
  .zeile-kopf .kurs { display: block; font-size: 15px; }
}
/* Finger statt Maus: Tippflächen mindestens 44 px, auch im Laptop-Layout */
@media (pointer: coarse) {
  .sl-a { min-height: 44px; }
  .sl-unter .sl-a { min-height: 44px; }
  .suche button { min-height: 44px; }
  .hinweis-zeile a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .knopf-rund, .aufklappen { min-width: 44px; min-height: 44px; }
  .chip { min-height: 44px; }
}

/* Aufgeklappter Wert (Lukas 25.11.: „schaut eng aus“): bis 1279 px Diagramm volle Breite, Kennzahlen darunter zweispaltig; ab 1280 px 2/3 zu 1/3 */
@media (min-width: 900px) and (max-width: 1279px) {
  .details { grid-template-columns: minmax(0, 1fr); }
  .kennzahlen { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .kennzahlen h3 { grid-column: 1 / -1; }
  .kennzahlen .kz:nth-of-type(2) { border-top: 1px solid var(--linie); }
}
@media (min-width: 1280px) {
  .details { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
}

/* Tablet hochkant (700–1024 px, Hochformat; Lukas 25.11.: „hochkant ist komisch“): Diagramm höher, Kennzahlen zweispaltig, Kopf kompakter */
@media (min-width: 700px) and (max-width: 1024px) and (orientation: portrait) {
  .details { grid-template-columns: minmax(0, 1fr); padding: 4px 8px 24px; }
  .chart { height: clamp(320px, 45vh, 560px); }
  .details-kopf { margin: 4px 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
  .details-kurs .gross { font-size: 34px; }
  .details-kopf .stand { margin-top: 0; }
  .kennzahlen { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .kennzahlen h3 { grid-column: 1 / -1; }
  .kennzahlen .kz:nth-of-type(2) { border-top: 1px solid var(--linie); }
}

/* Marke TICKR (25.11., Variante T2) */
.marke { gap: 11px; }
.marke .marke-zeichen { width: 44px; height: 26px; flex: none; }
.marke-text { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.marke-text b { font-size: 21px; font-weight: 650; letter-spacing: 0.09em; color: var(--text); }
.marke-text small { font-size: 11.5px; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.kopf-handy .marke-text small { display: none; }
.marke-gross .marke-zeichen { width: 56px; height: 33px; }
.marke-gross .marke-text b { font-size: 28px; }
.marke-gross .marke-text small { font-size: 13px; }
