/* AkcjoPilot-Umbau Phase 5 (15.11.2026), Runde 2 Chart (15.11.2026) - Analyseseite /analyse/<id>.
   Nur geladen von analyze_neu.html (also nur bei UMBAU). Farben: Variablen unten, Hell/Dunkel folgt
   prefers-color-scheme bzw. data-theme der Seite; der Chart liest seine Farben (--c-*) von hier. */

/* ---------- Farben: umbau_farben.css (--an-* / --c-* bilden auf die Palette ab) ---------- */
body { background: var(--an-page); }
.an .panel { background: var(--an-panel); color: var(--an-text); border-color: var(--an-linie); }
.an h1, .an h2, .an h3, .an strong, .an b, .an summary, .an .kpi-value, .an .kpi-label { color: var(--an-text); }
.an a:not(.btn):not(.an-chip):not(.teilen-knopf) { color: var(--an-akz); }
.an table.data th { color: var(--an-grau); background: var(--an-chip); border-color: var(--an-linie); }
@media (hover: hover) { .an table.data tr:hover td { background: transparent; } }
.an .hint, .an .teilen-label { color: var(--an-grau); }
.an details > summary { color: var(--an-akz); }
.an table.data td { color: var(--an-text); border-color: var(--an-linie); }
.an .btn-secondary { background: var(--an-chip); color: var(--an-text); border-color: var(--an-linie2); }
.an .badge-gray { background: var(--an-chip); color: var(--an-text2); }
.an .badge-blue { background: var(--an-aktivbg); color: var(--an-aktivtext); }
.an .badge-green { background: var(--an-chip); }
.an .badge-red { background: var(--an-chip); }
.an .scorebar { border-color: var(--an-linie2); }
.an .sub, .an .page-head .sub { color: var(--an-grau); }
.an .flash-error { color: var(--k-minus); }
/* AkcjoPilot-Umbau Phase 5 (15.11.2026) - Analyseseite /analyse/<id>.
   Nur geladen von analyze_neu.html (also nur bei UMBAU). Farben/Schrift der
   Seite werden weiterverwendet; Bausteine aus umbau_basis.css (--u-*). */

/* ---------- gemeinsam ---------- */
.an { color: var(--an-text); }
.an .pos { color: var(--an-pos); }                     /* auf Weiss 5,4:1 */
.an .neg { color: var(--an-neg); }                     /* auf Weiss 6,4:1 */
.an .hint, .an .kpi .kpi-label, .an .kpi .kpi-sub { color: var(--an-grau); }
.an .kpi-sub.pos { color: var(--an-pos); }
.an .kpi-sub.neg { color: var(--an-neg); }
/* Aenderung nie nur als Farbe: Pfeil + Vorzeichen (der Pfeil folgt den Klassen pos/neg, auch nach "Live-Kurs") */
.an .kpi-sub#kpiChange.pos::before, .ap-kl-chg.pos::before, .an .p-chg.pos::before { content: "\25B2\00a0"; font-size: .8em; }
.an .kpi-sub#kpiChange.neg::before, .ap-kl-chg.neg::before, .an .p-chg.neg::before { content: "\25BC\00a0"; font-size: .8em; }
.an .kpi-sub#kpiChange.flach::before { content: none; }
.an .kpi-sub#kpiChange { font-weight: 700; }
.an-bew-h { display: none; }
.an-live { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.an-teilen .teilen { margin: 0; }
.an-obs-form { margin: 0; }
.an-liste { list-style: none; margin: 0; padding: 0; }
.an-mehr > summary { cursor: pointer; }
.an-sperre h2 { color: var(--an-text); }
.an-sperre .an-lead { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.an-sperre .an-liste li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--an-linie2); }
.an-sperre .an-schloss { flex: none; font-size: 18px; line-height: 1.3; }
.an-sperre .an-lz { flex: 1 1 auto; min-width: 0; line-height: 1.4; }
.an-tag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 10px; background: var(--an-aktivbg); color: var(--an-aktivtext); font-size: 12px; font-weight: 700; white-space: nowrap; }
.an-sperre .an-preis { margin: 10px 0 12px; font-weight: 700; font-size: 16px; }
.an-sperre .an-knopf { display: flex; align-items: center; justify-content: center; min-height: 48px; text-align: center; }
.an-sperre .an-haupt-knopf { background: var(--k-haupt); color: var(--k-haupt-t); }
.an-sperre .an-login { margin: 4px 0 0; text-align: center; font-size: 14px; }
.an-sperre .an-login a { display: inline-block; padding: 12px 6px; font-weight: 700; }
.an-absatz { margin: 0 0 10px; line-height: 1.6; }
.an-nachbarn { margin: 12px 0 0; }
.an-nachbarn .an-nb-kopf { margin: 0 0 6px; line-height: 1.5; }
/* Weitere Werte des Index: umbrechende Chips mit gleichem Abstand, keine haengenden Trenner */
.an-nb-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.an-nb-liste li { margin: 0; padding: 0; }
.an-nb-liste a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--k-feld-rand); border-radius: 22px; background: var(--k-f1); color: var(--k-akz); line-height: 1.25; }
@media (min-width: 821px) { .an-nb-liste a { min-height: 36px; padding: 0 12px; } }
.an .an-fuss { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.an-plan .an-knopf { margin-top: 6px; }

/* ====================== Desktop (>= 821 px) ====================== */
@media (min-width: 821px) {
  .an { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: stretch; }
  .an > * { min-width: 0; }
  .an-kopf { grid-column: 1 / -1; order: 1; margin: 0; }
  .an-kopf h1 { order: 1; }
  .an-kopf .sub { order: 2; }
  .an-kopf .an-reg-lang, .an-kopf .an-obs-form { order: 3; }
  .an-kopf .an-testkauf { order: 4; display: flex; gap: 6px; align-items: center; }
  .an-kopf .an-testkauf input[type=text] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; width: 90px; }
  .an-obs { display: none; }
  .an-kurs { order: 2; } .an-k-empf { order: 3; } .an-k-52 { order: 4; } .an-k-stop { order: 5; }
  .an-chart { grid-column: 1 / -1; order: 6; }
  .an-warnung { grid-column: 1 / -1; order: 7; max-width: 820px; }
  .an-body { grid-column: 1 / -1; order: 8; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .an-links, .an-rechts, .an-pilot { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .an-teilen { grid-column: 1 / -1; order: 9; }
  /* Tabellen: Aufteilung in zwei Teile (zugeklappter Rest) bleibt in einer Spaltenflucht */
  .an-fix { table-layout: fixed; width: 100%; }
  .an-hist .c-tag { width: 17%; } .an-hist .c-msg { width: 37%; } .an-hist .c-richt { width: 17%; } .an-hist .c-r10 { width: 18%; } .an-hist .c-treffer { width: 11%; }
  .an-plz .c-platz { width: 36%; } .an-plz .c-kurs { width: 26%; } .an-plz .c-chg { width: 20%; } .an-plz .c-zeit { width: 18%; }
  .an-zwei.an-fix td:first-child { width: 62%; }
  /* Zugeklappte Bereiche stehen auf dem Desktop offen (JS setzt "open"; ohne JS zeigt moderner Browser den Inhalt trotzdem) */
  .an-js .an-mehr > summary { display: none; }
  .an-mehr:not([open])::details-content { content-visibility: visible; }
  .an-mehr > table { margin-top: 0; }
  .an-plaetze h2 .btn { float: right; font-weight: 400; }
}

/* ====================== Handy (<= 820 px) ====================== */
@media (max-width: 820px) {
  body { background: var(--an-page); }
  .an { display: flex; flex-direction: column; padding-bottom: 4px; }
  .an-body, .an-links, .an-rechts, .an-pilot { display: contents; }
  .an > .panel, .an-body .panel, .an-pilot > .panel { margin: 0 0 8px; }

  /* Reihenfolge: 1 Kopf+Kurs, 2 Chart, 3 Bewertung, 4 Signale, 5 Kennzahlen, 6 Handelsplaetze, 7 Pilot/Pro, 8 Teilen */
  .an-kopf { order: 10; } .an-kurs { order: 11; }
  .an-chart { order: 20; }
  .an-bew-h { order: 30; } .an-k-empf { order: 31; } .an-k-52 { order: 32; } .an-k-stop { order: 33; }
  .an-begr { order: 34; } .an-warnung { order: 35; }
  .an-signale { order: 40; }
  .an-kennz { order: 50; } .an-ueber { order: 55; }
  .an-plaetze { order: 60; }
  .an-plan { order: 70; } .an-wk { order: 71; } .an-sperre { order: 72; }
  .an-teilen { order: 80; }

  .an-kurs .hp-wahl summary { display: flex; align-items: center; min-height: 48px; font-size: 14px; }


  /* 3 Bewertung: Ueberschrift + drei Zeilen (Empfehlung/Wert, 52 Wochen, Stop) */
  .an-bew-h { display: block; margin: 0; padding: 14px 16px 4px; background: var(--an-panel); font-size: 16px; }
  .an-k-empf, .an-k-52, .an-k-stop { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "s v"; align-items: center; column-gap: 12px; row-gap: 0; margin: 0; padding: 9px 16px; background: var(--an-panel); border-radius: 0; border-top: 1px solid var(--an-linie); }
  .an-k-stop { margin-bottom: 8px; }
  .an-k-empf .kpi-label, .an-k-52 .kpi-label, .an-k-stop .kpi-label { grid-area: l; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 600; }
  .an-k-empf .kpi-sub, .an-k-52 .kpi-sub, .an-k-stop .kpi-sub { grid-area: s; font-size: 13px; }
  .an-k-empf .kpi-value, .an-k-52 .kpi-value, .an-k-stop .kpi-value { grid-area: v; justify-self: end; text-align: right; font-size: 19px !important; font-weight: 800; }
  .an-k-empf .kpi-value { font-size: 22px !important; }
  .an-begr { padding-top: 12px; }
  .an-begr h2 { margin-bottom: 8px; }
  .an-begr p { margin: 8px 0; font-size: 15px; line-height: 1.5; }

  /* Tabellen als dichte Zeilen, ohne Querscrollen */
  .an .panel { overflow-x: visible; }
  .an table.data.an-t { display: block; min-width: 0 !important; width: 100%; }
  .an table.data.an-t thead { display: none; }
  .an table.data.an-t tbody { display: block; }
  .an table.data.an-t tr { display: grid; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--an-linie); align-items: center; }
  .an table.data.an-t tr:last-child { border-bottom: 0; }
  .an table.data.an-t td { display: block; padding: 0; border: 0; font-size: 15px; min-width: 0; }
  @media (hover: hover) { .an table.data.an-t tr:hover td { background: transparent; } }
  .an table.data.an-t td .hint, .an table.data.an-t td.hint { font-size: 13px; }
  .an .an-t td.num { text-align: right; }
  /* Indikatoren: Name + Stimme, darunter die Erklaerung */
  .an-ind tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n s" "t t"; }
  .an-ind td.i-name { grid-area: n; } .an-ind td.i-stimme { grid-area: s; } .an-ind td.i-text { grid-area: t; font-size: 14px; line-height: 1.45; color: var(--an-text2); }
  /* Signalhistorie: Text, darunter Tag, Richtung, Ergebnis */
  .an-hist tr { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .an-hist td.h-msg { order: 1; flex: 0 0 100%; line-height: 1.4; }
  .an-hist td.h-tag { order: 2; font-size: 13px; color: var(--an-grau); }
  .an-hist td.h-richt { order: 3; }
  .an-hist td.h-r10 { order: 4; margin-left: auto; font-weight: 700; }
  .an-hist td.h-treffer { order: 5; font-weight: 700; min-width: 16px; text-align: center; }
  /* Handelsplaetze: links Platz + Zeit, rechts Kurs + Aenderung */
  .an-plz tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "p k" "z c"; }
  .an-plz td.p-platz { grid-area: p; font-weight: 600; } .an-plz td.p-kurs { grid-area: k; font-weight: 700; white-space: nowrap; }
  .an-plz td.p-zeit { grid-area: z; text-align: left; font-size: 13px; } .an-plz td.p-chg { grid-area: c; font-weight: 700; white-space: nowrap; }
  /* Zweispaltige Wertetabellen */
  .an-zwei tr { grid-template-columns: minmax(0, 1fr) auto; }
  .an-zwei td { font-size: 15px; }
  .an-drei tr { grid-template-columns: 1.2fr 1fr 1fr; }
  .an-drei thead { display: grid !important; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; padding: 0 0 4px; }
  .an-drei thead tr { display: contents; }
  .an-drei th { display: block; padding: 0; font-size: 12px; color: var(--an-grau); text-align: right; }
  .an-drei th:first-child { text-align: left; }
  .an-plaetze h2 { display: flex; align-items: center; justify-content: space-between; }
  .an-plaetze h2 .btn { min-height: 48px; min-width: 48px; padding: 0 14px; font-size: 18px; }

  /* Zugeklappte Bereiche */
  .an-mehr > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 2px; color: var(--an-akz); font-weight: 700; font-size: 15px; list-style: none; border-top: 1px solid var(--an-linie); }
  .an-mehr > summary::-webkit-details-marker { display: none; }
  .an-mehr > summary::after { content: "\25BE"; font-size: 18px; }
  .an-mehr[open] > summary::after { content: "\25B4"; }
  .an-mehr > summary:focus-visible { outline: 3px solid var(--an-akz); outline-offset: -3px; }
  .an-mehr[open] > summary { margin-bottom: 4px; }

  /* 7 Hinweisblock */
  .an-sperre { background: var(--an-sperre-bg); border: 1px solid var(--an-sperre-rand) !important; border-radius: 12px !important; margin: 8px 10px !important; padding: 16px; }
  .an-sperre h2 { font-size: 17px; margin-bottom: 6px; }
  .an-sperre .an-liste li { font-size: 15px; }
  .an-sperre .an-knopf { min-height: 52px; font-size: 16px; border-radius: 12px; }
  .an-plan .an-knopf { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 8px; }

  /* 8 Teilen */
  .an-teilen { padding: 12px 16px 14px; background: var(--an-panel); }
  .an-teilen .teilen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
  .an-teilen .teilen .hint { grid-column: 1 / -1; margin: 0; font-size: 13px; }
  .an-teilen .teilen-knopf { min-width: 0; min-height: 48px; height: 48px; font-size: 15px; border-radius: 10px; }
}


.an .badge-green { color: var(--an-pos); }
.an .badge-red { color: var(--an-neg); }
.an-kurs .hp-wahl summary b { margin-left: 4px; }
@media (max-width: 820px) {
  .an .an-teilen .kopie-knopf { margin: 0; min-width: 0; }
  .hp-wahl li a, .hp-wahl li > span { display: flex; align-items: center; min-height: 48px; }
  .an-sperre .an-login a, .an-chart .chart-legend a, .an .an-fuss a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 4px; }
  .an-sperre .an-login a { padding: 0 8px; }
}
@media (max-width: 820px) {
  .an > .panel.an-k-empf, .an > .panel.an-k-52 { margin: 0 !important; }
  .an > .panel.an-k-stop { margin: 0 0 8px !important; }
  .an .an-teilen .teilen-knopf.kopie-knopf { width: auto; min-width: 0; height: 48px; padding: 0 9px; }
}



/* ====================== Runde 2: Kopf, Kurs, Chart ====================== */

/* ---------- Kopf: Chips (ISIN kopieren, Beobachten, Alarm) ---------- */
.an-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; margin: 2px 0 0; }
.an-chip { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; min-height: 44px; margin: 0; padding: 0 14px; border: 1.5px solid var(--an-linie2); border-radius: 22px;
  background: var(--an-panel); color: var(--an-akz); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; opacity: 1; width: auto; height: auto; vertical-align: middle; }
@media (hover: hover) { .an-chip:hover { background: var(--an-chip); text-decoration: none; } }
.an-chip:focus-visible { outline: 3px solid var(--an-akz); outline-offset: 2px; }
.an-chip .an-ico { font-size: 16px; line-height: 1; }
.an-chip-kopie { color: var(--an-text); font-weight: 600; }
.an-chip-kopie svg { width: 16px; height: 16px; flex: none; opacity: .75; }
.an-chip-l { font-size: 12px; font-weight: 700; color: var(--an-grau); letter-spacing: .02em; }
.an-chip-v { font-variant-numeric: tabular-nums; font-size: 14px; }
.an-chip-ok { font-size: 13px; font-weight: 700; color: var(--an-pos); }
.an-chip-ok:empty { display: none; }
.an-chip-kopie.fertig { border-color: var(--an-pos); background: var(--an-panel); color: var(--an-text); }
.an-obs-form { display: inline-flex; margin: 0; }
.an-obs-form .an-chip { background: var(--an-panel); }

/* ---------- Kurs: gross links, Aenderung rechts, Stand-Zeile ---------- */
.an-kz { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.an-kz .kpi-value { font-size: 32px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; min-width: 0; overflow-wrap: anywhere; }
.an-kz-r { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.an-kz-r .kpi-sub#kpiChange { font-size: 24px; line-height: 1.15; font-weight: 800; }
.an-kz-abs { font-size: 13px; line-height: 1.4; color: var(--an-grau); }
.an-stand { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; margin-top: 4px; }
.an-stand-t { flex: 1 1 190px; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--an-grau); }
.an-stand .btn { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; background: var(--an-chip); color: var(--an-akz); border: 1.5px solid var(--an-linie2); border-radius: 22px; }
.an-kopf .an-testkauf .btn { background: var(--k-haupt); color: var(--k-haupt-t); }
.an .an-sperre .an-haupt-knopf { background: var(--k-haupt); color: var(--k-haupt-t); }
.an .hp-wahl summary, .an .hp-wahl summary b { color: var(--an-text); }
@media (min-width: 821px) {
  .an-kz .kpi-value { font-size: 28px; }
  .an-kz-r .kpi-sub#kpiChange { font-size: 20px; }
  .an-kopf .an-chips { order: 5; }
  .an-chips { margin-top: 6px; }
}

/* ---------- Chart eingebettet ---------- */
.an-chart { padding: 12px 14px 10px; }
.an-chart-h { margin: 0 0 4px; font-size: 16px; }
.an-info { box-sizing: border-box; min-height: 52px; padding: 2px 2px 6px; display: flex; flex-direction: column; justify-content: center; }
.an-info1 { font-size: 16px; line-height: 24px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.an-i-lab { margin-right: 8px; }
.an-info2 { font-size: 13px; line-height: 20px; color: var(--an-grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.an-i-w.pos { color: var(--an-pos); } .an-i-w.neg { color: var(--an-neg); }
.an-chartbox { position: relative; height: 320px; background: var(--c-bg); border-radius: 8px; overflow: hidden; }
@media (min-width: 821px) { .an-chartbox { height: 540px; } }
#chart.chart-box { position: absolute; inset: 0; width: 100%; height: 100% !important; min-height: 0; }
#chart:focus-visible { outline: 3px solid var(--an-akz); outline-offset: -3px; }
.an-zoomhint { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--an-chip); color: var(--an-grau); font-size: 17px; line-height: 1; pointer-events: none; z-index: 3; box-shadow: 0 0 0 1px var(--an-linie2); }
html:not(.an-gross) #chart, html:not(.an-gross) #chart * { touch-action: pan-y !important; }
html.an-gross #chart, html.an-gross #chart * { touch-action: none !important; }
#chart { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
@media (min-width: 821px) { html:not(.an-gross) #chart canvas { cursor: zoom-in; } html.an-gross #chart canvas { cursor: crosshair; } }

/* Ladezustand: dezente Flaeche, kein leeres Loch; beim Wechsel bleibt die alte Kurve, oben nur ein schmaler Balken */
.an-skel { position: absolute; inset: 0; display: none; pointer-events: none; opacity: .7;
  background: linear-gradient(100deg, var(--an-chip) 20%, var(--an-aktivbg) 45%, var(--an-chip) 70%); background-size: 220% 100%; animation: an-glanz 1.6s ease-in-out infinite; }
.an-lade-t { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: none; text-align: center; font-size: 14px; color: var(--an-grau); pointer-events: none; }
.an-chartbox.laedt .an-skel, .an-chartbox.laedt .an-lade-t { display: block; }
.an-wbar { position: absolute; left: 0; right: 0; top: 0; height: 3px; overflow: hidden; display: none; pointer-events: none; z-index: 4; }
.an-wbar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--an-akz); animation: an-balken 1s ease-in-out infinite; }
.an-chartbox.wechselt .an-wbar { display: block; }
.an-fehler { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; background: var(--an-panel); color: var(--an-text); z-index: 5; }
.an-chartbox.fehler .an-fehler { display: flex; }
.an-fehler .btn { min-height: 44px; padding: 0 18px; background: var(--k-haupt); color: var(--k-haupt-t); }
@keyframes an-glanz { 0% { background-position: 120% 0; } 100% { background-position: -100% 0; } }
@keyframes an-balken { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .an-skel, .an-wbar::after { animation: none; } }

/* Zeitraum-Leiste: eine Zeile, waagerecht wischbar, aktiver Zeitraum = Rahmen + fett + Balken (nicht nur Farbe) */
.an-leisten { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; margin-top: 8px; align-items: center; }
.an-lg { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 2px 0; }
.an-lg::-webkit-scrollbar { display: none; }
.an-l-r { grid-column: 1 / -1; }
.an-lg button { position: relative; flex: 0 0 auto; box-sizing: border-box; min-width: 48px; min-height: 44px; padding: 0 14px; border: 2px solid transparent; border-radius: 10px;
  background: var(--an-chip); color: var(--an-text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; scroll-snap-align: center; white-space: nowrap; }
.an-lg button.active { background: var(--an-aktivbg); color: var(--an-aktivtext); border-color: var(--an-akz); font-weight: 800; }
.an-lg button.active::after { content: ""; position: absolute; left: 28%; right: 28%; bottom: 4px; height: 3px; border-radius: 2px; background: var(--an-akz); }
.an-lg button:focus-visible { outline: 3px solid var(--an-akz); outline-offset: 1px; }
@media (max-width: 820px) { html:not(.an-gross) .an-l-t, html:not(.an-gross) .an-l-i { display: none; } }
@media (min-width: 821px) {
  .an-leisten { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
  .an-lg { overflow: visible; }
  .an-lg button { min-height: 38px; min-width: 40px; padding: 0 12px; font-size: 14px; }
  .an-lg button.active::after { bottom: 3px; }
}
.an-tipp { display: none; }
.an-chart .chart-legend { font-size: 12.5px; line-height: 1.4; color: var(--an-grau); }
.an-chart .chart-legend .gesperrt { color: var(--an-grau); }
@media (max-width: 820px) { .an-leg-ind { display: none; } #chartWrap .an-fsrow { justify-content: stretch !important; } #chartWrap .an-fsrow .btn { width: 100%; justify-content: center; } }
#fsBtn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; background: var(--an-chip); color: var(--an-akz); border: 1.5px solid var(--an-linie2); }

/* ---------- Grossansicht: fuellt den Bildschirm ---------- */
.an-gkopf { display: none; }
.an-zu { display: none; }
html.an-gross, html.an-gross body { overflow: hidden; overscroll-behavior: none; }
html.an-gross #chartWrap { position: fixed; inset: 0; z-index: 2147483000; margin: 0 !important; display: flex; flex-direction: column; box-sizing: border-box; height: 100vh; height: 100dvh;
  background: var(--an-panel); color: var(--an-text); overscroll-behavior: contain;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
html.an-gross .an-gkopf { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px 8px 4px 14px; border-bottom: 1px solid var(--an-linie); }
.an-gk-n { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.an-gk-n b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-gk-n span { font-size: 12px; color: var(--an-grau); }
.an-gk-k { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; font-variant-numeric: tabular-nums; }
.an-gk-kurs { font-size: 17px; font-weight: 800; }
.an-gk-chg { font-size: 13px; font-weight: 700; }
.an-gk-chg.pos { color: var(--an-pos); } .an-gk-chg.neg { color: var(--an-neg); }
.an-gk-chg.pos::before { content: "\25B2\00a0"; font-size: .8em; } .an-gk-chg.neg::before { content: "\25BC\00a0"; font-size: .8em; }
html.an-gross .an-zu { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; box-sizing: border-box; min-height: 48px; min-width: 48px; padding: 0 16px; margin: 0;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--an-knopf-text); background: var(--an-knopf); border: 0; border-radius: 24px; cursor: pointer; }
html.an-gross .an-zu[hidden] { display: inline-flex; }
html.an-gross .an-zu:focus-visible { outline: 3px solid var(--an-akz); outline-offset: 2px; }
html.an-gross .an-chart-h, html.an-gross .chart-legend, html.an-gross .an-fsrow, html.an-gross .an-zoomhint { display: none !important; }
html.an-gross .an-info { padding: 4px 14px 2px; min-height: 52px; }
html.an-gross #chartHint { margin: 0 14px 4px !important; }
html.an-gross .an-chartbox { flex: 1 1 auto; height: auto; min-height: 120px; margin: 0 6px; border-radius: 0; }
html.an-gross .an-leisten { margin: 0; padding: 6px 8px 8px; border-top: 1px solid var(--an-linie); }
html.an-gross .an-tipp { display: block; position: absolute; left: 50%; bottom: 128px; max-width: 92%; transform: translateX(-50%); padding: 8px 14px; border-radius: 18px; background: var(--tipp-bg, var(--an-text)); color: var(--tipp-t, var(--an-panel)); box-shadow: 0 0 0 1px var(--tipp-rand, transparent);
  font-size: 13px; line-height: 1.3; text-align: center; opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 6; }
html.an-gross .an-tipp.zeigen { opacity: .94; }
/* Querformat / niedriger Bildschirm: alles in schmale Zeilen */
@media (max-height: 520px) and (orientation: landscape) {
  html.an-gross .an-gkopf { min-height: 48px; padding-top: 0; padding-bottom: 0; }
  html.an-gross .an-zu { min-height: 48px; }
  html.an-gross .an-info { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 6px 16px; min-height: 34px; padding-top: 2px; padding-bottom: 0; }
  html.an-gross .an-info1 { flex: none; max-width: 55%; line-height: 22px; font-size: 15px; }
  html.an-gross .an-info2 { flex: 1 1 auto; min-width: 0; line-height: 22px; }
  html.an-gross .an-leisten { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 12px; padding: 4px 8px; }
  html.an-gross .an-leisten::-webkit-scrollbar { display: none; }
  html.an-gross .an-lg { overflow: visible; flex: none; }
  html.an-gross .an-lg button { min-height: 44px; }
  html.an-gross .an-tipp { bottom: 64px; }
}
@media (min-width: 821px) { html.an-gross .an-lg button { min-height: 40px; } html.an-gross .an-leisten { display: flex; flex-wrap: wrap; } }

/* ---------- Handy: Kopf, Kurs und Chips als zusammenhaengende Kopfflaeche ---------- */
@media (max-width: 820px) {
  .an .an-kopf { display: contents; }
  .an-kopf h1 { order: 10; margin: 0; padding: 14px 16px 2px; background: var(--an-panel); font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
  .an-kopf .an-reg-lang { display: none; }
  .an-kopf .sub { order: 10; padding: 0 16px 8px; background: var(--an-panel); font-size: 13px; line-height: 1.5; color: var(--an-grau); flex: none; }
  .an-kurs { order: 11; border-radius: 0; margin: 0 !important; padding: 0 16px 8px; background: var(--an-panel); gap: 0; }
  .an-kurs .kpi-label { display: none; }
  .an-chips { order: 12; margin: 0 0 8px; padding: 2px 16px 14px; background: var(--an-panel); flex: none; }
  .an-kopf .an-testkauf { order: 13; flex: none; display: flex; gap: 8px; align-items: center; margin: 0 0 8px; padding: 10px 16px; background: var(--an-panel); }
  .an-kopf .an-testkauf input[type=text] { flex: 1 1 auto; min-width: 0; height: 48px; font-size: 16px; padding: 0 12px; border: 2px solid var(--an-linie2); border-radius: 10px; background: var(--an-chip); color: var(--an-text); }
  .an-kopf .an-testkauf .btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; font-size: 15px; font-weight: 700; border-radius: 24px; }
  .an-kurs .hp-wahl { margin: 0; }
  .an-kurs .hp-wahl summary { display: flex; align-items: center; min-height: 48px; font-size: 14px; }
  .an-chart { padding: 10px 12px 8px; }
  .an-chart-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
  #chartWrap { margin: 0; }
}
@media (max-width: 820px) {
  .an-kopf .an-testkauf { order: 13; }
}

/* ====================== Runde 3 (Reste): Analyse-Kopf am Handy in einer Zeile, Ocena-Zeile, Fragezeichen ====================== */
.an-t-kurz { display: none; }
.an-ocena { display: none; }
.an-kz { flex-wrap: wrap; }
.an-kz .kpi-value { white-space: nowrap; overflow-wrap: normal; }   /* Kurs bricht nie um ("119,9" / "0 zł") */
.an-kz-r { white-space: nowrap; }
.an-stand .hp-wahl { position: relative; flex: none; margin: 0; }
.an-stand .hp-wahl summary { list-style: none; cursor: pointer; }
.an-stand .hp-wahl summary::-webkit-details-marker { display: none; }
.an-stand .hp-wahl .hp-pop { position: absolute; z-index: 40; right: 0; top: 100%; width: max-content; min-width: 220px; max-width: min(320px, calc(100vw - 32px)); padding: 6px 12px 8px; background: var(--an-panel); border: 1px solid var(--an-linie2); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.an-stand .hp-wahl .hp-pop ul { margin: 0; padding: 0; list-style: none; }

/* Fragezeichen: ein Satz Erklaerung + Link zur Methodik */
.an-h { display: inline; }
.an-h-b { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; margin: 0 0 0 6px; padding: 0; vertical-align: middle; border: 1.5px solid var(--an-linie2); border-radius: 50%; background: var(--an-chip); color: var(--an-akz); font: inherit; font-size: 13px; font-weight: 800; line-height: 1; cursor: pointer; }
.an-h-b::before { content: ""; position: absolute; inset: -11px; }                 /* Tippflaeche 44 x 44 */
.an-h-b:focus-visible { outline: 3px solid var(--an-akz); outline-offset: 2px; }
.an-h-b[aria-expanded="true"] { background: var(--an-aktivbg); color: var(--an-aktivtext); }
.an-h-t { position: absolute; z-index: 35; left: 12px; right: 12px; margin-top: 6px; padding: 10px 12px; background: var(--an-panel); color: var(--an-text); border: 1px solid var(--an-linie2); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); font-size: 13.5px; font-weight: 400; line-height: 1.45; text-transform: none; letter-spacing: 0; text-align: left; white-space: normal; }
.an-h-t[hidden] { display: none; }
.an-h-t a { display: inline-block; margin-top: 2px; color: var(--an-akz); font-weight: 700; }
.an-k-empf, .an-k-stop, .an-plan { position: relative; }

@media (max-width: 820px) {
  .an-t-lang { display: none; }
  .an-t-kurz { display: inline; }
  .an-kopf h1 { padding-top: 10px; }
  .an-kopf .sub { padding-bottom: 4px; }
  .an-kurs { padding-bottom: 4px; }
  .an-kz .kpi-value { font-size: 30px; }
  .an-ocena { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; padding: 0; font-size: 15px; color: var(--an-text); text-decoration: none; }
  .an a.an-ocena:not(.btn):not(.an-chip):not(.teilen-knopf) { color: var(--an-text); }
  .an-ocena b.pos { color: var(--an-pos); } .an-ocena b.neg { color: var(--an-neg); }
  .an-ocena .an-oc-s { color: var(--an-grau); }
  .an-ocena .an-oc-p { margin-left: auto; font-size: 22px; line-height: 1; color: var(--an-akz); }
  #bewertung { scroll-margin-top: 112px; }
  html { scroll-padding-bottom: 96px; }                 /* Ziele, die in die Ansicht gescrollt werden, liegen nicht hinter der unteren Leiste */
  /* Zeile: Kurs-Zeitangabe | Boerse | Aktualisieren */
  .an-stand { flex-wrap: nowrap; gap: 6px; margin-top: 0; align-items: center; }
  .an-stand-t { flex: 1 1 0; font-size: 12.5px; line-height: 1.35; }
  .an-stand .hp-wahl summary { display: flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 13px; border: 1.5px solid var(--an-linie2); border-radius: 22px; background: var(--an-chip); white-space: nowrap; }
  .an-stand .hp-wahl summary .an-b-lbl { display: none; }
  .an-stand .hp-wahl summary b { margin-left: 0; max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
  .an-stand .btn#liveBtn { flex: none; width: 44px; min-width: 44px; padding: 0; justify-content: center; font-size: 20px; }
  /* Chips in einer Zeile: ISIN (Text + Kopier-Symbol), Beobachten, Alarm */
  .an-chips { flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; margin: 0; }
  .an-chip { padding: 0 10px; gap: 4px; font-size: 14px; }
  .an-chip-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* "ISIN"/"WKN": am Handy nur für Screenreader (Knopf hat aria-label), sonst reicht die Zeile nicht für alle drei Knöpfe */
  .an-chip-kopie { position: relative; }
  .an-chip-v { font-size: 13.5px; }
  .an-chip .an-ico { font-size: 15px; }
  .an-h-t { left: 16px; right: 16px; }
  .an-chart { padding-top: 6px; }
}

