/* SentiMonk web app — dark trading-terminal look (Nov 2026 redesign).
   One dark theme in the logo's colours: charcoal surface, orange brand
   accent (buttons, navigation, focus). Two-colour style: green = profit,
   a deeper orange = loss (owner's choice, no red), yellow for warnings.
   Polarity is never colour alone: values carry a sign, bars a direction.
   Chart pair green #0f9f6e / orange #e86a22 validated with the dataviz
   checker on --kachel (all checks pass, CVD ΔE 9.3); polarity is also shown
   by bar direction and a signed value. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(./schrift/inter-latin-wght.woff2) format('woff2');
}

:root {
  --bg: #0a0c10; --bg-glanz: #15110d; --fg: #eceef2; --kachel: #13161b; --kachel-hoch: #191d24;
  --rand: #242932; --rand-hell: #303641; --matt: #969eab;
  --akzent: #f08a3c; --akzent-hell: #f6a462; --akzent-fg: #1c0e03; --akzent-matt: rgb(240 138 60 / .12); --akzent-rand: rgb(240 138 60 / .4);
  --gut-bg: rgb(52 211 153 / .1); --gut-rand: rgb(52 211 153 / .35); --gut-fg: #4ade9f;
  --warn-bg: rgb(234 200 70 / .1); --warn-rand: rgb(234 200 70 / .35); --warn-fg: #ecd06a;
  --stop-bg: rgb(232 106 34 / .1); --stop-rand: rgb(232 106 34 / .4); --stop-fg: #f59a5c;
  --radius: 16px; --radius-klein: 10px;
  --schatten: 0 1px 0 rgb(255 255 255 / .04) inset, 0 12px 32px rgb(0 0 0 / .35);
  --schrift: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* The hidden attribute must win over any display rule (e.g. .feld { display: grid }). */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  color: var(--fg); font: 15px/1.55 var(--schrift); font-feature-settings: 'cv11', 'tnum' 0;
  background: radial-gradient(1200px 600px at 85% -10%, rgb(240 138 60 / .07), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgb(240 138 60 / .035), transparent 60%), var(--bg);
  background-attachment: fixed; -webkit-font-smoothing: antialiased;
}
a { color: var(--akzent); }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .5rem; }
h2 { font-weight: 650; letter-spacing: -.01em; }
::selection { background: rgb(240 138 60 / .32); }

.app { min-height: 100vh; padding: 16px; }
.matt { color: var(--matt); }

.karte {
  background: linear-gradient(180deg, rgb(255 255 255 / .025), transparent 40%), var(--kachel);
  border: 1px solid var(--rand); border-radius: var(--radius); padding: 22px; box-shadow: var(--schatten);
}
.karte-schmal { max-width: 28rem; margin: 10vh auto 0; }

.formular { display: grid; gap: .5rem; margin-top: 1rem; }
.formular label { font-weight: 600; }
.formular input {
  font: inherit; padding: .65rem .75rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein);
  background: var(--bg); color: var(--fg);
}
.formular input:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.formular input[aria-invalid="true"] { border-color: var(--stop-fg); }
.feld-hinweis { margin: 0; min-height: 1.2em; font-size: .9rem; color: var(--stop-fg); }

.knopf {
  font: inherit; font-weight: 600; padding: .65rem 1rem; border-radius: var(--radius-klein); border: 1px solid var(--rand-hell);
  background: var(--kachel-hoch); color: var(--fg); cursor: pointer; transition: border-color .15s, background .15s;
}
.knopf:hover { border-color: #3a4a6a; background: #1a2439; }
.knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.knopf-haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-fg); box-shadow: 0 6px 20px rgb(240 138 60 / .22); }
.knopf-haupt:hover { background: var(--akzent-hell); border-color: var(--akzent-hell); }
.knopf:disabled { opacity: .6; cursor: progress; }

.meldung { padding: .7rem .9rem; border-radius: var(--radius-klein); border: 1px solid; margin: .5rem 0 0; }
.meldung-gut { background: var(--gut-bg); border-color: var(--gut-rand); color: var(--gut-fg); }
.meldung-warn { background: var(--warn-bg); border-color: var(--warn-rand); color: var(--warn-fg); }
.meldung-stop { background: var(--stop-bg); border-color: var(--stop-rand); color: var(--stop-fg); }

/* Sign-up: consent checkbox next to its text; honeypot off-screen (not display:none, some bots skip those). */
.formular .haken { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin-top: .4rem; }
.formular .haken input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: none; padding: 0; accent-color: var(--akzent); }
.formular .haken input[aria-invalid="true"] { outline: 2px solid var(--stop-fg); }
.honigtopf { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.klein-abstand { margin: 1.2rem 0 0; font-size: .95rem; }

.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* ── Dashboard frame ─────────────────────────────────────────── */
.app:has(.app-rahmen) { padding: 0; }
.app-rahmen { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; }
.seitenleiste {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: rgb(13 15 19 / .9); border-right: 1px solid var(--rand); padding: 18px 12px; backdrop-filter: blur(12px);
}
.seitenleiste .marke { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; color: var(--fg); margin: 0 8px 22px; }
.marke-logo { width: 38px; height: 38px; flex: none; }
.marke-monk { color: var(--akzent); }
.marke-zeichen { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #34d399, #0f9f6e); color: var(--akzent-fg); box-shadow: 0 4px 14px rgb(52 211 153 / .3); }
.marke-zeichen svg { width: 18px; height: 18px; }
.seitenleiste ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.seitenleiste a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--radius-klein); color: var(--matt); text-decoration: none; font-weight: 500; font-size: .94rem; transition: color .15s, background .15s; }
.seitenleiste a svg { width: 18px; height: 18px; flex: none; }
.seitenleiste a:hover { background: rgb(255 255 255 / .04); color: var(--fg); }
.seitenleiste a.aktiv { background: var(--akzent-matt); color: var(--akzent); font-weight: 600; box-shadow: inset 2px 0 0 var(--akzent); }
.nav-trenner { height: 1px; background: var(--rand); margin: 10px 8px; }
.app-haupt { padding: 18px 28px 40px; min-width: 0; max-width: 1480px; width: 100%; }
.kopfleiste { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem .75rem; margin-bottom: 16px; position: sticky; top: 0; z-index: 30; background: var(--bg); padding: .6rem 0; }
/* Notes in the header (rule breaches, link suggestions): left, the buttons stay right. */
.kopf-hinweise { flex: 1 1 18rem; display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.kopf-hinweis { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .45rem .35rem .55rem; border-radius: 999px; font-size: .85rem; text-decoration: none; color: var(--fg); border: 1px solid; max-width: 100%; transition: background .15s; }
.kopf-hinweis:hover { text-decoration: none; }
.kopf-hinweis-regelbruch { border-color: rgb(232 106 34 / .45); background: rgb(232 106 34 / .1); }
.kopf-hinweis-regelbruch:hover { background: rgb(232 106 34 / .18); }
.kopf-hinweis-verknuepfung { border-color: var(--akzent-rand); background: var(--akzent-matt); }
.kopf-hinweis-verknuepfung:hover { background: rgb(240 138 60 / .2); }
.kopf-hinweis-icon { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-size: .75rem; font-weight: 800; flex: none; }
.kopf-hinweis-regelbruch .kopf-hinweis-icon { background: var(--stop-fg); color: #1c0e03; }
.kopf-hinweis-verknuepfung .kopf-hinweis-icon { background: var(--akzent); color: var(--akzent-fg); font-size: .7rem; }
.kopf-hinweis-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kopf-hinweis-knopf { flex: none; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: rgb(255 255 255 / .08); }
/* Long e-mail addresses must not push the buttons off a phone screen. */
.kopfleiste .matt { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--kachel-hoch); border: 1px solid var(--rand-hell); font-weight: 700; font-size: .85rem; color: var(--akzent); text-transform: uppercase; }
.leiste-meldung { margin-bottom: 12px; }
@media (max-width: 860px) {
  .app-rahmen { grid-template-columns: 1fr; }
  .seitenleiste { position: static; height: auto; padding: 12px; }
  .seitenleiste .marke { margin-bottom: 10px; }
  .seitenleiste ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .seitenleiste a { padding: .4rem .6rem; }
  .seitenleiste a.aktiv { box-shadow: none; }
  .nav-trenner { display: none; }
  .app-haupt { padding: 12px 16px 32px; }
}

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 12px; margin: 12px 0; }
.karte + .karte, .raster + .karte { margin-top: 12px; }
.knopf-klein { padding: .35rem .7rem; font-size: .9rem; }
.knopf-gefahr { color: var(--stop-fg); border-color: var(--stop-rand); }
.knopf-mini { border: 0; background: none; color: var(--matt); cursor: pointer; font-size: 1rem; padding: 0 .3rem; }
.abzeichen { display: inline-block; font-size: .8rem; padding: .1rem .5rem; border-radius: 999px; background: var(--akzent-matt); color: var(--akzent); margin-left: .4rem; }
.abzeichen-matt { background: var(--rand); color: var(--matt); }
.konto-kopf { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem; }
.konto-kopf h3 { margin: 0; }
.konto-zahlen strong { font-size: 1.3rem; }
.plus { color: var(--gut-fg); }
.minus { color: var(--stop-fg); }
.asset-liste { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.asset-liste li { background: var(--bg); border: 1px solid var(--rand); border-radius: 999px; padding: .1rem .3rem .1rem .7rem; }
.asset-neu { display: flex; gap: .4rem; }
.asset-neu button { white-space: nowrap; }
.asset-neu input { flex: 1; min-width: 0; font: inherit; padding: .35rem .6rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.formular-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem 1rem; }
.feld { display: grid; gap: .25rem; align-content: start; min-width: 0; }
.feld label { font-weight: 600; font-size: .92rem; }
/* Number inputs have an intrinsic width; without min-width: 0 they overflow narrow grid columns. */
.feld input:not([type=checkbox]):not([type=radio]), .feld select, .feld textarea { width: 100%; min-width: 0; }
.feld input, .feld select, .feld textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.feld input[aria-invalid="true"], .feld select[aria-invalid="true"] { border-color: var(--stop-fg); }
.feld-info { font-size: .8rem; color: var(--matt); }
.schalter { display: inline-flex; align-items: center; gap: .3rem; color: var(--matt); }
.leer { color: var(--matt); padding: 1rem 0; }

/* ── Risk ───────────────────────────────────────────────────── */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 10px; }
.kachel { border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px 12px; background: var(--bg); }
.kachel-titel { font-size: .8rem; color: var(--matt); }
.kachel-wert { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kachel-info { font-size: .8rem; color: var(--matt); }
.feld-inline { grid-template-columns: auto minmax(10rem, 20rem); align-items: center; gap: .5rem; margin-bottom: 12px; }
.pc-zeile { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem; align-items: end; }
.pc-lots { font-size: 1.8rem; font-weight: 700; color: var(--akzent); font-variant-numeric: tabular-nums; }

/* ── Trade form ─────────────────────────────────────────────── */
fieldset { border: 1px solid var(--rand); border-radius: var(--radius); margin: .75rem 0; padding: .5rem .75rem; }
fieldset.seite { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
fieldset[aria-invalid="true"] { border-color: var(--stop-fg); }
.tag-liste { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-chip { border: 1px solid var(--rand); border-radius: 999px; padding: .15rem .6rem; background: var(--bg); cursor: pointer; }
.tag-chip:has(input:checked) { border-color: var(--akzent); background: var(--akzent-matt); }
.knopf-win { background: var(--gut-bg); border-color: var(--gut-rand); color: var(--gut-fg); min-width: 7rem; }
.knopf-loss { background: var(--stop-bg); border-color: var(--stop-rand); color: var(--stop-fg); min-width: 7rem; }

/* ── Journal ────────────────────────────────────────────────── */
.kopf-zeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
a.knopf { text-decoration: none; display: inline-block; }
.filter-zeile { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 12px 0; }
.filter-zeile select, .filter-zeile input { font: inherit; padding: .4rem .5rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.tabelle-rahmen { overflow-x: auto; margin-top: 12px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabelle th, .tabelle td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--rand); vertical-align: middle; }
.tabelle th { color: var(--matt); font-weight: 600; font-size: .82rem; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle .aktionen { white-space: nowrap; }
.tag-klein { font-size: .78rem; padding: 0 .45rem; margin-right: .2rem; }
.zeile-bearbeiten { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.zeile-bearbeiten input, .zeile-bearbeiten select { font: inherit; padding: .3rem .5rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.tracker-kopf { display: flex; justify-content: space-between; margin-bottom: .4rem; }
.balken { height: 10px; border-radius: 999px; background: var(--rand); overflow: hidden; }
.balken-fuell { height: 100%; background: var(--akzent); width: 0; }
.balken-fuell.warn { background: var(--warn-fg); }
.balken-fuell.voll { background: var(--stop-fg); }

/* ── Calendar ───────────────────────────────────────────────── */
.kal-kopf { display: flex; align-items: center; gap: .75rem; margin: 8px 0; }
.kal-kopf h2 { margin: 0; min-width: 11rem; text-align: center; }
.kalender { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; margin-top: 8px; }
.kalender th { color: var(--matt); font-size: .8rem; font-weight: 600; }
.kalender td { vertical-align: top; }
.tag-knopf { width: 100%; min-height: 4.2rem; display: grid; align-content: start; gap: 2px; text-align: left; font: inherit; padding: 6px; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel); color: var(--fg); cursor: pointer; }
.tag-nr { font-size: .8rem; color: var(--matt); }
.tag-netto { font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.tag-anzahl { font-size: .72rem; color: var(--matt); }
.tag-plus .tag-knopf { background: var(--gut-bg); border-color: var(--gut-rand); }
.tag-plus .tag-netto { color: var(--gut-fg); }
.tag-minus .tag-knopf { background: var(--stop-bg); border-color: var(--stop-rand); }
.tag-minus .tag-netto { color: var(--stop-fg); }
.tag-frei .tag-knopf { opacity: .5; background-image: repeating-linear-gradient(45deg, transparent 0 6px, var(--rand) 6px 7px); }
.tag-heute .tag-knopf { outline: 2px solid var(--akzent); }
.tag-gewaehlt .tag-knopf { box-shadow: 0 0 0 3px var(--akzent-matt); }
.kalender .woche { font-weight: 700; text-align: right; vertical-align: middle; font-variant-numeric: tabular-nums; }
.tag-trades { margin: .3rem 0; padding-left: 1.2rem; }
@media (max-width: 720px) { .tag-anzahl { display: none; } .tag-knopf { min-height: 3.2rem; padding: 4px; } .tag-netto { font-size: .72rem; } }

/* ── Tag colors (extension palette) ─────────────────────────── */
.farbe-red { border-color: #ef4444; color: #fca5a5; }
.farbe-orange { border-color: #f97316; color: #fdba74; }
.farbe-yellow { border-color: #eab308; color: #fde047; }
.farbe-green { border-color: #22c55e; color: #86efac; }
.farbe-blue { border-color: #3b82f6; color: #93c5fd; }
.farbe-purple { border-color: #a855f7; color: #d8b4fe; }
.farbe-pink { border-color: #ec4899; color: #f9a8d4; }

/* ── Charts (dataviz spec; green/red pair validated on the dark card) ── */
:root { --serie-1: #34d399; --plus: #0f9f6e; --minus: #e86a22; --gitter: #20252d; --achse: #858d9a; }
.diagramm { margin: 0; min-width: 0; }
.diagramm figcaption { font-weight: 600; margin-bottom: .4rem; }
.diagramm-flaeche { position: relative; min-width: 0; }
.diagramm-svg { width: 100%; height: auto; display: block; overflow: visible; user-select: none; }
.diagramm-svg .gitter { stroke: var(--gitter); stroke-width: 1; stroke-dasharray: 2 4; }
.diagramm-svg .nulllinie { stroke: var(--rand-hell); stroke-width: 1; }
.diagramm-svg .grundlinie { stroke: var(--achse); stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; }
.diagramm-svg .achse { fill: var(--achse); font-size: .72rem; font-variant-numeric: tabular-nums; }
.diagramm-svg .achse-hinweis { font-size: .625rem; letter-spacing: .04em; text-transform: uppercase; }
.diagramm-svg .linie { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.diagramm-svg .linie-plus { stroke: var(--serie-1); }
.diagramm-svg .linie-minus { stroke: var(--minus); }
.diagramm-svg .stop-plus { stop-color: var(--serie-1); }
.diagramm-svg .stop-minus { stop-color: var(--minus); }
.diagramm-svg .fuell-plus { stop-color: var(--serie-1); }
.diagramm-svg .fuell-minus { stop-color: var(--minus); }
.diagramm-svg .flaeche { stroke: none; }
.diagramm-svg .endpunkt { stroke: var(--kachel); stroke-width: 2; fill: var(--serie-1); }
.diagramm-svg .endpunkt-minus { fill: var(--minus); }
.diagramm-svg .halo { fill: var(--serie-1); opacity: .18; }
.diagramm-svg .halo-minus { fill: var(--minus); }
.diagramm-svg .wertschild { fill: var(--serie-1); }
.diagramm-svg .wertschild-minus { fill: var(--minus); }
.diagramm-svg .wertschild-text { fill: #04140d; font-size: .6875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.diagramm-svg .fadenkreuz { stroke: var(--achse); stroke-width: 1; stroke-dasharray: 3 3; opacity: .8; }
.diagramm-svg .trefferflaeche { fill: transparent; }
.diagramm-svg .trefferflaeche:focus { outline: none; }
.diagramm-svg .trefferflaeche:focus-visible, .diagramm-svg .balken-gruppe:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.diagramm-svg .balken-plus { fill: var(--plus); transition: opacity .12s; }
.diagramm-svg .balken-minus { fill: var(--minus); transition: opacity .12s; }
.diagramm-svg .balken-gruppe { outline: none; }
.diagramm-svg .spalte { transition: fill .12s; }
.diagramm-balken:hover .balken-gruppe path { opacity: .4; }
.diagramm-balken .balken-gruppe:hover path, .diagramm-balken .balken-gruppe:focus path { opacity: 1; }
.diagramm-balken .balken-gruppe:hover .spalte, .diagramm-balken .balken-gruppe:focus .spalte { fill: rgb(255 255 255 / .035); }
.diagramm-svg .balken-wert { font-size: .65625rem; font-weight: 600; font-variant-numeric: tabular-nums; fill: var(--matt); }
.diagramm-tip { position: absolute; top: 0; z-index: 2; transform: translateX(-50%); display: grid; gap: 1px; min-width: 7rem;
  background: rgb(27 31 38 / .96); border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); padding: .4rem .65rem;
  font-size: .8rem; pointer-events: none; white-space: nowrap; box-shadow: 0 10px 28px rgb(0 0 0 / .45); backdrop-filter: blur(6px); }
.diagramm-tip.tip-rechts { transform: translateX(calc(-100% - 12px)); }
.diagramm-tip.tip-links { transform: translateX(12px); }
.diagramm-tip .tip-kopf { color: var(--matt); font-size: .75rem; }
.diagramm-tip .tip-wert { font-size: .95rem; font-variant-numeric: tabular-nums; }
.diagramm-tip .tip-wert.plus { color: var(--gut-fg); }
.diagramm-tip .tip-wert.minus { color: var(--stop-fg); }
.diagramm-tabelle { margin-top: .35rem; font-size: .85rem; }
.diagramm-tabelle summary { cursor: pointer; color: var(--matt); font-size: .78rem; width: max-content; margin-left: auto; opacity: .75; }
.diagramm-tabelle summary:hover { opacity: 1; color: var(--fg); }
.diagramm-tabelle[open] summary { margin-bottom: .4rem; }
.diagramm-tabelle thead th:not(:first-child) { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Tabs / Pro lock / stats ───────────────────────────────── */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--rand); margin: 8px 0 12px; }
.tab { font: inherit; border: 0; background: none; padding: .5rem .9rem; border-bottom: 2px solid transparent; color: var(--matt); cursor: pointer; }
.tab.aktiv { color: var(--fg); border-bottom-color: var(--akzent); font-weight: 600; }
.pro-sperre { border-style: dashed; }
.diagramme { display: grid; gap: 1.5rem; }
#st-uebersicht { margin-bottom: 12px; }
#st-uebersicht th:not(:first-child) { text-align: right; }

/* ── Setups ─────────────────────────────────────────────────── */
.regel-liste { padding-left: 1.4rem; display: grid; gap: .25rem; }
.regel-liste li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.regel-knoepfe { white-space: nowrap; }
.knopf-mini:disabled { opacity: .3; cursor: default; }
.link-liste { display: flex; gap: .75rem; padding: 0; list-style: none; }
.coach-tipp { background: var(--akzent-matt); border-radius: var(--radius-klein); padding: .5rem .7rem; }

/* Cards inside a grid are spaced by the grid gap, not by sibling margins. */
.raster > .karte { margin-top: 0; }
/* Stand-alone selects (headers, filters) look like form fields. */
.kopf-zeile select, #coach-steuerung select, #coach-steuerung input { font: inherit; padding: .4rem .5rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }

/* ── Trading-mode checklist panel ───────────────────────────── */
.checkliste-panel { position: fixed; right: 16px; top: 64px; width: min(26rem, calc(100vw - 32px)); max-height: calc(100vh - 80px); overflow: auto; background: var(--kachel); border: 1px solid var(--rand); border-radius: var(--radius); padding: 12px 16px; box-shadow: 0 8px 24px rgb(0 0 0 / .15); z-index: 20; }
.checkliste-panel h2 { margin: 0; font-size: 1.1rem; }
.checkliste-panel select { font: inherit; width: 100%; margin: .5rem 0; padding: .4rem .5rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.checkliste { list-style: none; padding: 0; margin: .25rem 0 .75rem; display: grid; gap: 6px; }
.checkliste-panel .cl-stand { margin: .25rem 0 .4rem; }

/* ── Monte-Carlo curve bundle ───────────────────────────────── */
.diagramm-svg .kurve { fill: none; stroke-width: 1.25; vector-effect: non-scaling-stroke; opacity: .75; }
.diagramm-svg .kurve-gut { stroke: var(--plus); }
.diagramm-svg .kurve-schlecht { stroke: var(--minus); }
.diagramm-svg .kurve-offen { stroke: var(--achse); opacity: .55; }
.diagramm-svg .referenz { stroke-width: 1.25; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.diagramm-svg .referenz-gut { stroke: var(--plus); }
.diagramm-svg .referenz-schlecht { stroke: var(--minus); }
.diagramm-svg .referenz-neutral { stroke: var(--achse); }
.diagramm-svg .referenz-text { fill: var(--fg); font-weight: 600; }
.legende { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; color: var(--matt); margin: .3rem 0 0; }
.legende-eintrag::before { content: ''; display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: .35rem; background: var(--achse); }
.legende-gut::before { background: var(--plus); }
.legende-schlecht::before { background: var(--minus); }
.ampel { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .4rem; vertical-align: -1px; }
.ampel-g { background: var(--plus); } .ampel-y { background: #d29922; } .ampel-r { background: var(--minus); }

/* ── Recycle bin ────────────────────────────────────────────── */
.papierkorb-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.papierkorb-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding: .6rem 0; border-top: 1px solid var(--rand); }

/* ── Settings ───────────────────────────────────────────────── */
.haken-liste { display: grid; gap: .4rem; margin: .75rem 0; }
.haken { display: flex; gap: .45rem; align-items: baseline; cursor: pointer; }
.fenster-liste { display: grid; gap: .5rem; margin: .5rem 0; justify-items: start; }
.fenster-zeile { display: flex; align-items: center; gap: .5rem; }
.fenster-zeile input { font: inherit; padding: .4rem .5rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.feld-schmal { max-width: 12rem; }
.frage { margin-bottom: .75rem; }
.frage p { margin-top: 0; }
.leiste-hinweis p { margin: .15rem 0; }
.leiste-hinweis { margin-bottom: 1rem; }
/* Full row, never an extra implicit column (safe in a one-column grid on phones). */
.feld-breit { grid-column: 1 / -1; max-width: 24rem; }

/* ── News alerts inside the page ────────────────────────────── */
.alarm-meldungen { position: fixed; right: 16px; bottom: 16px; display: grid; gap: .5rem; z-index: 30; width: min(22rem, calc(100vw - 32px)); }
.alarm-meldung { background: var(--kachel); border: 1px solid var(--rand); border-left: 4px solid var(--akzent); border-radius: var(--radius); padding: .6rem .8rem; box-shadow: 0 8px 24px rgb(0 0 0 / .15); }
.alarm-meldung p { margin: .25rem 0 .5rem; }

/* ── News ───────────────────────────────────────────────────── */
.news-filter { display: grid; gap: .6rem; margin: .5rem 0 1rem; }
.chip-reihe { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font: inherit; font-size: .85rem; padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--rand); background: var(--bg); color: var(--matt); cursor: pointer; }
.chip.an { background: var(--akzent-matt); color: var(--fg); border-color: var(--akzent); font-weight: 600; }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.news-tag { margin-top: 1rem; }
.news-tag-kopf { font-size: .95rem; margin: 0 0 .3rem; color: var(--matt); }
.news-zeilen { list-style: none; margin: 0; padding: 0; }
.news-zeile { border-top: 1px solid var(--rand); }
.news-zeile.vorbei { opacity: .55; }
.news-knopf { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 3.2rem 2.8rem 4.6rem 1fr 1.4rem; gap: .5rem; align-items: baseline; padding: .45rem .25rem; cursor: pointer; }
.news-knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.news-zeit, .news-ccy { font-variant-numeric: tabular-nums; font-weight: 600; }
.news-imp { font-size: .8rem; display: inline-flex; align-items: center; gap: .3rem; }
.news-imp::before { content: ''; width: .6rem; height: .6rem; border-radius: 2px; background: var(--achse); }
.news-imp.imp-high::before { background: var(--minus); }
.news-imp.imp-medium::before { background: #d29922; }
.news-titel { min-width: 0; overflow-wrap: anywhere; }
.news-meta { display: block; font-size: .82rem; }
.news-alarm { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: 0 .25rem .6rem 3.7rem; }
.news-quelle { margin-top: 1rem; font-size: .85rem; }
@media (max-width: 520px) {
  .news-knopf { grid-template-columns: 3rem 2.6rem 1fr 1.2rem; }
  .news-imp { grid-column: 3; grid-row: 2; }
  .news-titel { grid-column: 3; grid-row: 1; }
  .news-alarm { padding-left: .25rem; }
}
.reality-check { position: fixed; inset: auto 16px 16px auto; width: min(24rem, calc(100vw - 32px)); background: var(--kachel); border: 1px solid var(--rand); border-top: 4px solid var(--akzent); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: 0 12px 32px rgb(0 0 0 / .2); z-index: 40; }
.reality-check h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
/* Rule breach popup ("Was ist schiefgelaufen"), bottom right like the Reality-Check. */
.regelbruch-popup { position: fixed; inset: auto 16px 16px auto; width: min(30rem, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--kachel); border: 1px solid var(--rand); border-radius: var(--radius); padding: .9rem 1rem 1rem; box-shadow: 0 16px 40px rgb(0 0 0 / .35); z-index: 41; display: grid; gap: .6rem; }
.regelbruch-popup .regelbruch-kopf { margin: 0; }
.regelbruch-popup .rb-karte { border: 0; padding: 0; background: none; }
/* Rule breaches: one card per trade */
.rb-liste { display: grid; gap: 10px; }
.rb-karte { border: 1px solid var(--rand); border-left: 3px solid var(--stop-fg); border-radius: var(--radius-klein); background: var(--bg); padding: .8rem 1rem; display: grid; gap: .55rem; }
.rb-karte.knapp { border-left-color: var(--warn-fg); }
.rb-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; }
.rb-trade { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.rb-asset { font-size: 1.15rem; font-weight: 800; letter-spacing: .01em; }
.rb-seite { font-size: .8rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; border: 1px solid currentColor; }
.rb-seite.plus { color: var(--gut-fg); }
.rb-seite.minus { color: var(--stop-fg); }
.rb-ergebnis { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rb-ergebnis.plus { color: var(--gut-fg); }
.rb-ergebnis.minus { color: var(--stop-fg); }
.rb-kopf-rechts { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.rb-meta { font-size: .8rem; color: var(--matt); }
.rb-journal { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border: 1px solid var(--akzent-rand); border-radius: 999px; background: var(--akzent-matt); color: var(--akzent); font-size: .8rem; font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.rb-journal:hover, .rb-journal:focus-visible { background: rgb(240 138 60 / .2); border-color: var(--akzent); text-decoration: none; }
.rb-journal:hover .rb-journal-pfeil { transform: translateX(2px); }
.rb-journal-pfeil { transition: transform .15s; }
.rb-hinweis { margin: 0; font-size: .75rem; color: var(--matt); }
.rb-notiz-ort { display: block; margin-top: .2rem; font-size: .72rem; font-style: normal; color: var(--matt); }
.rb-anzahl { margin: 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--stop-fg); }
.rb-regeln { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rb-regel { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: .8rem; padding: .45rem .6rem; border-radius: var(--radius-klein); background: rgb(232 106 34 / .08); }
.rb-regel.knapp { background: var(--warn-bg); }
.rb-regel-titel { font-weight: 600; }
.rb-ist { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--stop-fg); }
.rb-regel.knapp .rb-ist { color: var(--warn-fg); }
.rb-soll { font-size: .8rem; color: var(--matt); font-variant-numeric: tabular-nums; min-width: 7.5rem; text-align: right; }
.rb-antwort { display: grid; gap: .4rem; }
.rb-frage { font-weight: 600; font-size: .9rem; }
.rb-feld { width: 100%; font: inherit; font-size: .95rem; line-height: 1.5; color: var(--fg); background: var(--kachel); padding: .65rem .8rem; border: 1px solid var(--rand-hell, var(--rand)); border-radius: var(--radius-klein); resize: vertical; min-height: 4.5rem; transition: border-color .15s, box-shadow .15s; }
.rb-feld::placeholder { color: var(--matt); opacity: .8; }
.rb-feld:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-matt); }
.rb-antwort .knopfreihe { flex-wrap: wrap; align-items: center; }
.rb-notiz { margin: 0; padding: .5rem .8rem; border-left: 3px solid var(--akzent); background: var(--akzent-matt); border-radius: 0 var(--radius-klein) var(--radius-klein) 0; font-style: italic; }
@media (max-width: 560px) { .rb-regel { grid-template-columns: 1fr auto; } .rb-soll { grid-column: 1 / -1; text-align: left; min-width: 0; } }

/* ── Broker connections ─────────────────────────────────────── */
.broker-karte .konto-kopf { flex-wrap: wrap; gap: .4rem; }
.abzeichen-gut { background: var(--akzent-matt); color: var(--fg); }
.abzeichen-warn { background: var(--warn-bg); color: var(--warn-fg); }
.abzeichen-auto { margin-left: .35rem; font-size: .72rem; }
.broker-status { overflow-wrap: anywhere; }
.kopplung-code { font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; margin: .4rem 0; user-select: all; }

/* ── First steps (onboarding) ─────────────────────────────────── */
.erste-schritte { margin-bottom: 16px; border-color: var(--akzent); }
.erste-schritte h1 { font-size: 1.35rem; }
.vorlagen-wahl { border: 0; padding: 0; margin: 1rem 0 .5rem; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.vorlagen-wahl legend { font-weight: 600; margin-bottom: .5rem; padding: 0; }
.vorlage { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: start; padding: .7rem .8rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); cursor: pointer; background: var(--bg); }
.vorlage input { margin: .25rem 0 0; grid-row: span 2; }
.vorlage-titel { font-weight: 600; }
.vorlage-zeile { font-size: .88rem; }
.vorlage:has(input:checked) { border-color: var(--akzent); background: var(--akzent-matt); }
.vorlage:focus-within { outline: 2px solid var(--akzent); outline-offset: 1px; }
.schritte { padding-left: 1.3rem; margin: .4rem 0 0; }
.schritte li { margin-bottom: .35rem; }

/* ── Overview (dashboard home) ─────────────────────────────── */
.ue-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 18px; }
.ue-kopf h1 { margin: 0; }
.ue-gruss, .ue-unterzeile { margin: .15rem 0 0; font-size: .92rem; }
.ue-steuerung { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ue-steuerung .meldung { margin: 0; }
.ue-konto { font: inherit; font-weight: 600; padding: .45rem 2rem .45rem .8rem; border-radius: 999px; border: 1px solid var(--rand-hell); background: var(--kachel-hoch); color: var(--fg); }
.lizenz-pille { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid var(--rand-hell); color: var(--matt); background: var(--kachel); }
.lizenz-pille::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--warn-fg); }
.lizenz-pille.lizenz-pro { color: var(--akzent); border-color: var(--akzent-rand); background: var(--akzent-matt); }
.lizenz-pille.lizenz-pro::before { background: var(--akzent); box-shadow: 0 0 8px var(--akzent); }

.kpi-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi {
  position: relative; overflow: hidden; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--rand);
  background: linear-gradient(180deg, rgb(255 255 255 / .03), transparent 60%), var(--kachel); box-shadow: var(--schatten);
}
.kpi-titel { font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--matt); }
.kpi-zeile { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; margin-top: .35rem; }
.kpi-wert { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-info { margin-top: .3rem; font-size: .82rem; color: var(--matt); font-variant-numeric: tabular-nums; }
.kpi-wert.plus { color: var(--gut-fg); }
.kpi-wert.minus { color: var(--stop-fg); }
.kpi-wert .plus { color: var(--gut-fg); }
.kpi-wert .minus { color: var(--stop-fg); }
.kpi-titel { display: flex; align-items: center; gap: .45rem; }
.kpi-anzahl { padding: .05rem .4rem; border-radius: 999px; border: 1px solid var(--rand); font-size: .66rem; letter-spacing: 0; color: var(--fg); font-variant-numeric: tabular-nums; }
/* Narrow tiles: gauge and bar wrap under the value, so no pulling up beside the title. */
@media (max-width: 640px) {
  .kpi-zeile .winrate-anzeige { margin-top: 0; }
}
.tacho { width: 84px; height: auto; flex: none; margin-bottom: -4px; }
.tacho path { fill: none; stroke-width: 10; stroke-linecap: round; }
.tacho-spur { stroke: var(--rand); }
.tacho-plus { stroke: var(--plus); }
.tacho-minus { stroke: var(--minus); }

.ue-raster { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.ue-raster > .karte { margin: 0; }
.karte-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .5rem; }
.karte-kopf h2 { margin: 0; font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--matt); }
.karte-link { font-size: .85rem; font-weight: 600; text-decoration: none; padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--rand-hell); color: var(--matt); }
.karte-link:hover { color: var(--akzent); border-color: var(--akzent-rand); }
.ue-gross { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ue-gross.plus { color: var(--gut-fg); }
.ue-gross.minus { color: var(--stop-fg); }

.mini-kalender { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.mini-kalender th { font-size: .7rem; font-weight: 600; color: var(--matt); padding-bottom: 2px; }
.mini-kalender td { padding: 0; height: 3.9rem; }
/* Day cell: number top left, result in the middle, W/L at the bottom. */
.mini-kalender td > a, .mini-kalender .mk-zelle { display: grid; grid-template-rows: auto 1fr auto; height: 100%; padding: 3px 2px; border-radius: 8px; text-decoration: none; color: var(--fg); background: rgb(255 255 255 / .025); border: 1px solid transparent; }
.mk-nr { font-size: .66rem; color: var(--matt); line-height: 1.1; }
.mk-wert { align-self: center; text-align: center; font-size: .72rem; letter-spacing: -.02em; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-wl { text-align: center; font-size: .62rem; font-weight: 600; color: var(--matt); white-space: nowrap; overflow: hidden; letter-spacing: -.01em; }
.mini-kalender .mk-woche-kopf { color: var(--fg); }
.mini-kalender td.mk-woche { padding-left: 4px; }
.mini-kalender td.mk-woche .mk-zelle { background: rgb(255 255 255 / .05); border: 1px dashed var(--rand-hell); }
.mini-kalender td.mk-woche .mk-nr { font-weight: 600; }
.mk-woche.mk-plus .mk-zelle { border-color: rgb(52 211 153 / .4); }
.mk-woche.mk-minus .mk-zelle { border-color: rgb(232 106 34 / .45); }
.mini-kalender .mk-plus > a { background: rgb(15 159 110 / .22); border-color: rgb(52 211 153 / .3); }
.mk-plus .mk-wert { color: var(--gut-fg); }
.mini-kalender .mk-minus > a { background: rgb(232 106 34 / .16); border-color: rgb(232 106 34 / .34); }
.mk-minus .mk-wert { color: var(--stop-fg); }
.mini-kalender .mk-null > a { border-color: var(--rand-hell); }
.mini-kalender td > a:hover { filter: brightness(1.25); }
.mini-kalender td > a:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.mk-heute > a, .mk-heute .mk-zelle { box-shadow: inset 0 0 0 1.5px var(--akzent); }
.karte-fuss { display: flex; justify-content: space-between; align-items: baseline; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--rand); font-variant-numeric: tabular-nums; }

.mini-kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: .6rem; }
.mini-kennzahlen > div { display: grid; gap: .1rem; padding: .55rem .7rem; border-radius: var(--radius-klein); background: rgb(255 255 255 / .03); border: 1px solid var(--rand); font-variant-numeric: tabular-nums; }
.mini-kennzahlen span { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }

.coach-blase { position: relative; margin-top: .4rem; padding: 14px 16px; border-radius: 14px 14px 14px 4px; background: linear-gradient(135deg, rgb(240 138 60 / .12), rgb(240 138 60 / .03)); border: 1px solid var(--akzent-rand); }
.coach-blase strong { display: block; margin-bottom: .3rem; }
.coach-blase p { margin: 0; line-height: 1.5; }
.coach-fuss { font-size: .8rem; margin: .7rem 0 0; }

.ue-sitzung { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; }
.ue-sitzung h2 { margin: 0 0 .2rem; font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--matt); }
.ue-sitzung p { margin: 0; }
.ue-sitzung .knopfreihe { margin: 0; }
.ue-sitzung .meldung { flex-basis: 100%; }

@media (max-width: 1100px) { .ue-raster { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .kpi-reihe { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi-zeile { flex-wrap: wrap; }
  .tacho { width: 64px; }
  .kpi-wert { font-size: 1.3rem; }
  .mini-kalender .mk-plus > a { background: rgb(15 159 110 / .45); }
  .mini-kalender .mk-minus > a { background: rgb(232 106 34 / .34); }
  .mini-kalender { border-spacing: 2px; }
  .mini-kalender td { height: 3.4rem; }
  .mini-kalender td > a, .mini-kalender .mk-zelle { padding: 2px; }
  .mk-wert { font-size: .62rem; letter-spacing: -.02em; }
  .mk-wl { font-size: .55rem; }
  .mini-kennzahlen { grid-template-columns: 1fr; }
}
.coach-werte { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: .8rem 0 0; }
.coach-werte > div { padding: .5rem .7rem; border-radius: var(--radius-klein); background: rgb(255 255 255 / .03); border: 1px solid var(--rand); }
.coach-werte dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.coach-werte dd { margin: .1rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.formular-zeile { display: grid; gap: .5rem; }
.anmelde-tabs { margin: .6rem 0 .4rem; }
.knopf-link { justify-self: start; border: 0; background: none; padding: .15rem 0; color: var(--akzent); font: inherit; font-size: .9rem; cursor: pointer; }
.knopf-link:hover { text-decoration: underline; }
.knopf-link:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

/* ── Overview toolbar: scope switch, filters, date range ───── */
.ue-werkzeug { display: grid; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--rand); border-radius: var(--radius); background: rgb(21 24 30 / .7); }
.ue-werkzeug-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ue-filter, .ue-datum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ue-feld { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--matt); }
.ue-feld[hidden] { display: none; }
.ue-feld select, .ue-datum input { font: inherit; font-size: .9rem; color: var(--fg); padding: .4rem .6rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); min-width: 9rem; }
.ue-datum input { min-width: 0; color-scheme: dark; }
.segment { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--rand); }
.segment-knopf { font: inherit; font-size: .9rem; font-weight: 600; border: 0; border-radius: 9px; padding: .42rem .95rem; background: none; color: var(--matt); cursor: pointer; transition: background .15s, color .15s; }
.segment-knopf:hover { color: var(--fg); }
.segment-knopf.aktiv, .segment-knopf[aria-pressed="true"] { background: var(--kachel-hoch); color: var(--fg); box-shadow: inset 0 0 0 1px var(--rand-hell), 0 2px 8px rgb(0 0 0 / .3); }
.segment-knopf.aktiv { color: var(--akzent); }
.segment-knopf .abzeichen { font-size: .68rem; margin-left: .35rem; padding: .05rem .4rem; }
.segment-klein .segment-knopf { font-size: .8rem; padding: .3rem .7rem; }
.segment:focus-within { outline: none; }

/* ── Overview cards ─────────────────────────────────────────── */
.ue-bereich { display: grid; gap: 14px; }
.ue-bereich > .kpi-reihe { margin-bottom: 0; }
.ue-raster-kalender { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.ue-raster-halb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ue-gross-info { font-size: .82rem; margin-top: .1rem; }
.karte-info { font-size: .8rem; color: var(--matt); }
.klein-text { font-size: .8rem; margin: .5rem 0 0; }
.ue-equity .karte-kopf { margin-bottom: .8rem; }
.ue-diagramm-platz { min-width: 0; }
.ue-bereich .diagramm figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wt-quoten { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: .6rem; text-align: center; font-variant-numeric: tabular-nums; }
.wt-quoten > div { display: grid; gap: 1px; padding: .35rem 0; border-radius: 8px; background: rgb(255 255 255 / .03); }
.wt-quoten span { font-size: .72rem; }
.wt-quoten strong { font-size: .88rem; }
.wt-quoten .wt-anzahl { font-size: .7rem; color: var(--matt); }

.richtungen { display: grid; gap: 14px; }
.richtung { display: grid; gap: 6px; }
.richtung-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.richtung-kopf .matt { font-size: .82rem; flex: 1; }
.richtung-netto { font-variant-numeric: tabular-nums; }
.richtung-netto.plus, .zahl.plus { color: var(--gut-fg); }
.richtung-netto.minus, .zahl.minus { color: var(--stop-fg); }
.quote { height: 8px; border-radius: 999px; background: rgb(232 106 34 / .35); overflow: hidden; }
.quote-fuell { height: 100%; width: 0; border-radius: 999px 0 0 999px; background: var(--plus); box-shadow: 2px 0 0 var(--kachel); }
.richtung-fuss { font-size: .78rem; }

.ue-kennzahlen h3 { margin: 0 0 .6rem; font-size: .78rem; font-weight: 600; color: var(--fg); }
.kz-gruppen { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
.kz-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 8px; margin: 0; }
.kz { padding: .6rem .75rem; border-radius: var(--radius-klein); background: rgb(255 255 255 / .03); border: 1px solid var(--rand); }
.kz dt { font-size: .72rem; color: var(--matt); }
.kz dd { margin: .15rem 0 0; font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kz dd.minus { color: var(--stop-fg); }
.zeitraum-name { display: block; font-size: .72rem; font-weight: 400; color: var(--matt); }
.monats-kennzahlen { grid-template-columns: 1fr 1fr; margin: 0 0 .8rem; }
.monats-kennzahlen strong.plus { color: var(--gut-fg); }
.monats-kennzahlen strong.minus { color: var(--stop-fg); }
.richtung-kopf .plus { color: var(--gut-fg); font-weight: 600; }
.richtung-kopf .minus { color: var(--stop-fg); font-weight: 600; }
.kz dd.kz-info { font-size: .72rem; font-weight: 400; color: var(--matt); }
#st-uebersicht { margin: 0; }
#st-uebersicht th:not(:first-child) { text-align: right; }

@media (max-width: 1100px) { .ue-raster-halb, .ue-raster-kalender, .kz-gruppen { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .ue-werkzeug { padding: 10px; }
  .ue-werkzeug-zeile { flex-direction: column; align-items: stretch; }
  .segment { display: flex; }
  .segment-knopf { flex: 1; padding-inline: .5rem; }
  .ue-filter, .ue-datum { display: grid; grid-template-columns: 1fr; }
  .ue-datum { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .ue-feld { display: grid; grid-template-columns: 4rem 1fr; }
  .ue-feld[hidden] { display: none; }
  .ue-feld select { min-width: 0; width: 100%; }
}
.ue-equity .karte-kopf { flex-wrap: wrap; }
.diagramm-svg .spitzen-linie { fill: none; stroke: var(--achse); stroke-width: 1; stroke-dasharray: 3 3; opacity: .75; }
.diagramm-svg .dd-flaeche { fill: var(--minus); opacity: .12; stroke: none; }
.diagramm-tip .tip-fuss { color: var(--stop-fg); font-size: .75rem; font-variant-numeric: tabular-nums; }
.kpi-info .plus, .ue-gross-info .plus, .kz-info .plus { color: var(--gut-fg); font-weight: 600; }
.kpi-info .minus, .ue-gross-info .minus, .kz-info .minus { color: var(--stop-fg); font-weight: 600; }
.dd-schalter { border: 1px solid var(--rand-hell); background: var(--bg); font-size: .8rem; padding: .35rem .75rem; }
.dd-schalter[aria-pressed="true"] { color: var(--stop-fg); border-color: var(--stop-rand); background: var(--stop-bg); box-shadow: none; }
.ue-legende { margin-top: .5rem; }
.legende-linie::before { background: var(--serie-1); height: 3px; border-radius: 2px; }
.legende-hoch::before { background: none; border-top: 1px dashed var(--achse); height: 0; }
.legende-dd::before { background: rgb(232 106 34 / .22); height: 10px; border-radius: 2px; }

/* ── Accounts table (/dashboard/konten) ─────────────────────── */
.konten-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.konten-kopf h1 { margin: 0; }
.konten-zaehler { margin: .2rem 0 0; font-size: .9rem; }
.konten-werkzeug { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: 10px; margin-bottom: 10px; }
.konten-werkzeug select, .konten-werkzeug input { font: inherit; font-size: .9rem; color: var(--fg); padding: .5rem .7rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--kachel); }
.konto-neu { margin-bottom: 14px; }
.tabelle-rahmen { border: 1px solid var(--rand); border-radius: var(--radius); background: var(--kachel); overflow: hidden; box-shadow: var(--schatten); }
.konten-tabelle { width: 100%; border-collapse: collapse; font-size: .9rem; }
.konten-tabelle thead th { text-align: left; font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--matt); padding: .75rem 1rem; background: rgb(255 255 255 / .03); border-bottom: 1px solid var(--rand); white-space: nowrap; }
.konten-tabelle td { padding: .8rem 1rem; border-bottom: 1px solid var(--rand); vertical-align: middle; }
.konten-tabelle tbody tr.konto-zeile:hover { background: rgb(255 255 255 / .02); }
.konten-tabelle tr.offen { background: rgb(240 138 60 / .04); }
.konten-tabelle tr.archiviert td:not(.aktionen) { opacity: .6; }
.konten-tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.konten-tabelle th.aktionen, .konten-tabelle td.aktionen { text-align: right; white-space: nowrap; width: 1%; }
.konten-tabelle .klein { font-size: .78rem; }
.konto-name { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.konto-name .abzeichen { margin-left: 0; font-size: .7rem; }
.export-knopf { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; padding: .2rem .55rem; font-size: .78rem; }
.export-knopf svg, .icon-knopf svg { width: 16px; height: 16px; }
.konto-stand { font-weight: 700; }
.plattform { display: flex; align-items: center; gap: .6rem; }
.plattform-zeichen { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; font-size: .68rem; font-weight: 800; letter-spacing: .02em; color: #04140d; background: linear-gradient(135deg, #34d399, #0f9f6e); }
.plattform-manuell { background: var(--kachel-hoch); color: var(--matt); border: 1px solid var(--rand-hell); font-size: .9rem; }
.typ { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.status-pille { display: inline-block; font-size: .72rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; border: 1px solid var(--rand-hell); color: var(--matt); }
.status-gut { color: var(--gut-fg); border-color: var(--gut-rand); background: var(--gut-bg); }
.status-warn { color: var(--stop-fg); border-color: var(--stop-rand); background: var(--stop-bg); }
.status-pausiert { color: var(--matt); }
.icon-knopf { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-left: 4px; padding: 0; border-radius: 9px; border: 1px solid var(--rand-hell); background: var(--bg); color: var(--fg); cursor: pointer; }
.icon-knopf:hover:not(:disabled), .icon-knopf.aktiv { color: var(--akzent); border-color: var(--akzent-rand); }
.icon-knopf:disabled { opacity: .35; cursor: default; }
.konto-detail-zeile > td { background: rgb(9 11 14 / .55); padding: 14px 16px 18px; }
.konto-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.detail-block { padding: 12px 14px; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel); min-width: 0; }
.detail-block h4, .quelle-neu h4 { margin: 0 0 .6rem; font-size: .76rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--matt); }
.detail-form, .detail-frage { max-width: 60rem; }
.konto-fakten { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0 0 .8rem; font-size: .85rem; }
.konto-fakten dt { font-size: .72rem; color: var(--matt); }
.konto-fakten dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.quelle-zeile { padding: .6rem 0; border-bottom: 1px solid var(--rand); }
.quelle-zeile:first-of-type { padding-top: 0; }
.quelle-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.quelle-kopf .abzeichen { margin-left: 0; font-size: .7rem; }
.quelle-daten { margin: .2rem 0; font-size: .8rem; }
.quelle-wort { font-size: .78rem; font-weight: 600; }
.quelle-gut { color: var(--gut-fg); }
.quelle-warn { color: var(--stop-fg); }
.quelle-pausiert, .quelle-neu { color: var(--matt); }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--achse); flex: none; }
.punkt-gut { background: var(--gut-fg); box-shadow: 0 0 0 3px rgb(52 211 153 / .18); }
.punkt-warn { background: var(--stop-fg); box-shadow: 0 0 0 3px rgb(232 106 34 / .18); }
.quellen-leer { font-size: .85rem; }
.quelle-plus { margin-top: .6rem; }
form.quelle-neu { margin-top: .6rem; }

@media (max-width: 1100px) { .konto-detail { grid-template-columns: 1fr 1fr; } .konto-detail .quellen { grid-column: 1 / -1; } }
@media (max-width: 860px) {
  .konten-werkzeug { grid-template-columns: 1fr; }
  .tabelle-rahmen { border: 0; background: none; box-shadow: none; overflow: visible; }
  .konten-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .konten-tabelle, .konten-tabelle tbody, .konten-tabelle tr, .konten-tabelle td { display: block; width: auto; }
  .konten-tabelle tr.konto-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--rand); border-radius: var(--radius); background: var(--kachel); }
  .konten-tabelle tr.konto-zeile td { padding: .35rem 0; border: 0; }
  .konten-tabelle tr.konto-zeile td:first-child, .konten-tabelle tr.konto-zeile td:nth-child(2) { grid-column: 1 / -1; }
  .konten-tabelle tr.konto-zeile td:not(:first-child)::before { content: attr(data-titel); display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); margin-bottom: .1rem; }
  .konten-tabelle td.zahl, .konten-tabelle td.aktionen { text-align: left; }
  .konten-tabelle td.aktionen::before { display: none !important; }
  .konten-tabelle td.aktionen { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; width: auto; padding-top: .6rem; border-top: 1px solid var(--rand); margin-top: .3rem; }
  .konten-tabelle tr.konto-detail-zeile > td { border: 1px solid var(--rand); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); margin-top: -8px; padding: 12px; }
  .konto-detail { grid-template-columns: 1fr; }
}
/* Winrate tile: gauge with win / breakeven / loss pills (reference design).
   Compact enough to sit next to the value; wraps under it when the tile is narrower. */
.kpi-zeile:has(.winrate-anzeige) { flex-wrap: wrap; align-items: flex-start; gap: .4rem; }
/* The value sits at the same height as in the other tiles; the gauge moves up beside the title. */
.winrate-anzeige { display: grid; justify-items: center; gap: 3px; flex: none; margin-top: -1.3rem; }
.winrate-anzeige .tacho { width: 80px; margin: 0; }
.wl-pillen { display: flex; gap: 4px; }
.wl-pille { min-width: 24px; padding: .1rem .3rem; border-radius: 999px; font-size: .68rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.wl-win { color: var(--gut-fg); background: rgb(52 211 153 / .14); }
.wl-be { color: #8fb3ff; background: rgb(96 140 255 / .16); }
.wl-loss { color: var(--stop-fg); background: rgb(232 106 34 / .14); }

/* ── Day window (overview: click a day or a bar) ──────────────── */
.tages-fenster { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--rand-hell); border-radius: var(--radius); background: var(--kachel); color: var(--fg); box-shadow: 0 24px 60px rgb(0 0 0 / .6); overflow: auto; }
.tages-fenster::backdrop { background: rgb(4 5 7 / .7); backdrop-filter: blur(3px); }
.tf-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px 8px; }
.tf-titel-zeile { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.2rem; }
.tf-titel-zeile h2 { margin: 0; font-size: 1.15rem; }
.tf-netto { color: var(--matt); font-size: .95rem; }
.tf-netto strong { font-size: 1.05rem; }
.tf-netto .plus, .tf-kennzahl .plus, .tf-tabelle .plus { color: var(--gut-fg); }
.tf-netto .minus, .tf-kennzahl .minus, .tf-tabelle .minus { color: var(--stop-fg); }
.tf-zu { font-size: 1.2rem; line-height: 1; }
.tf-oben { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: center; padding: 8px 22px 16px; }
.tf-kennzahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.tf-kennzahl { display: grid; gap: 2px; }
.tf-kennzahl span { font-size: .78rem; color: var(--matt); }
.tf-kennzahl strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tf-tabelle-rahmen { margin: 0 22px; border: 1px solid var(--rand); border-radius: var(--radius-klein); overflow: auto; }
.tf-tabelle { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tf-tabelle th { text-align: left; font-size: .74rem; font-weight: 600; color: var(--matt); padding: .6rem .8rem; background: rgb(255 255 255 / .04); white-space: nowrap; }
.tf-tabelle td { padding: .65rem .8rem; border-top: 1px solid var(--rand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tf-tabelle .zahl { text-align: right; }
.tf-asset { display: inline-block; padding: .12rem .55rem; border-radius: 999px; background: var(--kachel-hoch); border: 1px solid var(--rand-hell); font-size: .8rem; }
.tf-fuss { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 18px; margin-top: 16px; border-top: 1px solid var(--rand); }
.diagramm-svg .balken-gruppe.klickbar { cursor: pointer; }
.mini-kalender td > a[aria-haspopup] { cursor: pointer; }
@media (max-width: 720px) {
  .tf-oben { grid-template-columns: 1fr; }
  .tf-kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-kopf, .tf-oben, .tf-fuss { padding-inline: 14px; }
  .tf-tabelle-rahmen { margin: 0 14px; }
  .tf-tabelle th, .tf-tabelle td { padding: .55rem .5rem; font-size: .82rem; }
  .tf-asset { padding: .08rem .4rem; font-size: .74rem; }
}
.asset-zeilen { display: grid; gap: 6px; }
.asset-zeilen li { display: grid; grid-template-columns: minmax(4.5rem, auto) 1fr auto; align-items: center; gap: 8px; border-radius: var(--radius-klein); padding: .3rem .4rem .3rem .7rem; }
.asset-name { font-weight: 600; }
.asset-setup { font: inherit; font-size: .82rem; min-width: 0; padding: .3rem .45rem; border: 1px solid var(--rand-hell); border-radius: 8px; background: var(--kachel); color: var(--fg); }

/* ── Journal (day card, calendar, day journal, trade cards) ─────── */
.jl-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.jl-kopf h1 { margin: 0; }
.jl-oben { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.jl-oben > .karte, .jl-tagesjournal { margin: 0; }
.jl-tagesjournal { margin-bottom: 14px; }
.jl-tag-navi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jl-tag-navi h2 { margin: 0 4px; font-size: 1.15rem; }
.jl-navi-rest { display: inline-flex; gap: 6px; margin-left: auto; align-items: center; }
.jl-zeitraum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.jl-zeitraum input { font: inherit; font-size: .9rem; color: var(--fg); padding: .35rem .5rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); color-scheme: dark; }
.jl-tag-zahlen { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 14px 0 6px; }
.jl-netto { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.jl-netto-wert { font-size: 2rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.jl-netto-wert.plus, .jl-tag-trenner .plus { color: var(--gut-fg); }
.jl-netto-wert.minus, .jl-tag-trenner .minus { color: var(--stop-fg); }
.jl-anteil { font-size: .85rem; font-weight: 700; padding: .15rem .55rem; border-radius: 8px; background: var(--kachel-hoch); }
.jl-anteil.plus { color: var(--gut-fg); background: var(--gut-bg); }
.jl-anteil.minus { color: var(--stop-fg); background: var(--stop-bg); }
.jl-mini { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.jl-mini > div { display: grid; gap: 3px; }
.jl-mini span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.jl-mini .wl-pille { text-transform: none; letter-spacing: 0; font-size: .74rem; }
.jl-mini strong { font-variant-numeric: tabular-nums; }
.jl-leer { margin: 1rem 0; }
.jl-tracker { margin-top: 10px; }
.jl-tag-fuss { margin-top: 10px; }
.jl-tag .diagramm figcaption, .jl-kalender .diagramm figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mk-knopf { width: 100%; font: inherit; color: var(--fg); cursor: pointer; text-align: left; }
.mini-kalender .mk-plus > .mk-knopf { background: rgb(15 159 110 / .22); border-color: rgb(52 211 153 / .3); }
.mini-kalender .mk-minus > .mk-knopf { background: rgb(232 106 34 / .16); border-color: rgb(232 106 34 / .34); }
.mini-kalender .mk-null > .mk-knopf { border-color: var(--rand-hell); }
.mini-kalender .mk-gewaehlt > .mk-knopf { box-shadow: 0 0 0 2px var(--akzent); }
.mini-kalender .mk-frei > .mk-knopf { background: repeating-linear-gradient(135deg, transparent 0 5px, rgb(255 255 255 / .04) 5px 10px); }
.mk-knopf:hover { filter: brightness(1.25); }
.mk-knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.jl-tagesjournal textarea, .trade-notiz { width: 100%; font: inherit; font-size: .92rem; line-height: 1.5; color: var(--fg); padding: .6rem .75rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); resize: vertical; }
.jl-trades-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 10px; }
.jl-trades-kopf h2 { margin: 0; }
.jl-tag-trenner { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin: 18px 0 8px; font-size: .95rem; }
.jl-notiz-auszug { flex-basis: 100%; font-weight: 400; }
.tag-palette { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: rgb(21 24 30 / .95); backdrop-filter: blur(6px); }
.tag-palette.palette-scharf { border-color: var(--akzent); }
.tag-zieh { font: inherit; font-size: .82rem; cursor: grab; color: var(--fg); }
.tag-zieh[aria-pressed="true"] { outline: 2px solid var(--akzent); outline-offset: 1px; }
.trade-karte { border: 1px solid var(--rand); border-radius: var(--radius); background: var(--kachel); padding: 12px 14px; margin-bottom: 10px; transition: border-color .15s, box-shadow .15s; }
.trade-karte.verpasst { border-style: dashed; }
.trade-karte.ziel-aktiv { border-color: var(--akzent); box-shadow: 0 0 0 3px rgb(240 138 60 / .2); }
.trade-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; }
.trade-zeit { font-weight: 700; font-variant-numeric: tabular-nums; }
.trade-kopf .plus { color: var(--gut-fg); }
.trade-kopf .minus { color: var(--stop-fg); }
.trade-kopf .abzeichen { margin-left: 0; font-size: .7rem; }
.trade-aktionen { display: inline-flex; gap: 6px; margin-left: auto; }
.trade-koerper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 10px; }
.trade-links { display: grid; gap: 10px; align-content: start; }
.trade-feld { display: grid; gap: 4px; font-size: .85rem; }
.trade-feld > span:first-child { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.trade-feld.schalter { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.trade-setup { font: inherit; font-size: .88rem; padding: .35rem .5rem; border: 1px solid var(--rand-hell); border-radius: 8px; background: var(--bg); color: var(--fg); }
.trade-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 2rem; padding: 4px; border: 1px dashed var(--rand-hell); border-radius: var(--radius-klein); }
.trade-tags .tag-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; cursor: default; }
.tag-weg { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 .1rem; font-size: .9rem; line-height: 1; }
.tag-ablage { border: 0; background: none; color: var(--matt); font: inherit; font-size: .8rem; cursor: pointer; padding: .15rem .4rem; }
.palette-scharf ~ .trade-karte .tag-ablage, .tag-ablage:hover { color: var(--akzent); }
.bilder { display: grid; gap: 8px; padding: 8px; border: 1px dashed var(--rand-hell); border-radius: var(--radius-klein); min-height: 4rem; }
.bilder:focus-visible, .bilder.ziel-aktiv { outline: 2px solid var(--akzent); outline-offset: 2px; }
.bilder-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.bilder-gross { display: grid; }
.bild { position: relative; margin: 0; }
.bild-oeffnen { display: block; padding: 0; border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; background: var(--bg); cursor: zoom-in; }
.bild-oeffnen img { display: block; width: 140px; height: 88px; object-fit: cover; }
.bilder-gross .bild-oeffnen img { width: 100%; height: auto; max-height: 520px; object-fit: contain; }
.bild-weg { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .65); color: #fff; cursor: pointer; }
.bilder-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bild-gross { padding: 0; border: 0; background: none; max-width: 96vw; max-height: 94vh; }
.bild-gross::backdrop { background: rgb(0 0 0 / .85); }
.bild-gross img { display: block; max-width: 96vw; max-height: 94vh; border-radius: 8px; }
.bild-gross-zu { position: fixed; top: 16px; right: 16px; }
@media (max-width: 1100px) { .jl-oben { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .trade-koerper { grid-template-columns: 1fr; }
  .trade-aktionen { margin-left: 0; width: 100%; }
  .jl-navi-rest { margin-left: 0; }
  .jl-netto-wert { font-size: 1.6rem; }
}
.kal-navi { display: flex; align-items: center; gap: .4rem; }
.kal-navi h2 { min-width: 9rem; text-align: center; margin: 0; }
.bilder-gross .bild, .bilder-gross .bild-oeffnen { width: 100%; }
/* Journal: list of days, day editor */
.jl-tag-liste { display: grid; gap: 8px; }
.jl-tag-zeile { display: grid; grid-template-columns: 11rem 9rem 13rem minmax(0, 1fr); align-items: center; gap: 8px 16px; width: 100%; padding: .8rem 1rem; text-align: left; font: inherit; color: var(--fg); border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel); cursor: pointer; transition: border-color .15s, background .15s; }
.jl-tag-zeile:hover { border-color: var(--rand-hell); background: var(--kachel-hoch); }
.jl-tag-zeile:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.jl-tz-datum { font-weight: 700; }
.jl-tz-netto { font-variant-numeric: tabular-nums; }
.jl-tz-netto.plus { color: var(--gut-fg); }
.jl-tz-netto.minus { color: var(--stop-fg); }
.jl-tz-trades { font-size: .85rem; color: var(--matt); }
.jl-tz-notiz { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-kalender .mk-notiz > .mk-knopf::after { content: ''; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--akzent); }
.mk-knopf { position: relative; }
.tages-editor { width: min(1100px, calc(100vw - 24px)); }
/* Day editor = main panel + error-tag panel; the dialog itself is only the frame. */
.tages-editor[open] { display: flex; gap: 14px; align-items: flex-start; max-height: calc(100vh - 48px); padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
.tages-editor.mit-tags { width: min(1374px, calc(100vw - 24px)); }
.te-haupt, .te-seite { max-height: calc(100vh - 48px); overflow: auto; border: 1px solid var(--rand-hell); border-radius: var(--radius); background: var(--kachel); box-shadow: 0 24px 60px rgb(0 0 0 / .6); }
.te-haupt { flex: 1 1 auto; min-width: 0; }
.te-seite { flex: 0 0 260px; display: grid; gap: 10px; padding: 16px; }
.te-seite[hidden] { display: none; }
.te-seite h3 { margin: 0; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--matt); }
.te-seite .tag-palette { position: static; margin: 0; padding: 0; border: 0; background: none; backdrop-filter: none; }
.te-seite .tag-palette > .matt { flex-basis: 100%; margin-bottom: 4px; line-height: 1.4; }
.te-seite .tag-palette.palette-scharf { outline: 1px solid var(--akzent); outline-offset: 6px; border-radius: 4px; }
@media (max-width: 1100px) {
  /* Narrow: tags above the day, the day scrolls below them. */
  .tages-editor[open] { flex-direction: column; align-items: stretch; gap: 8px; }
  .te-seite { order: -1; flex: 0 0 auto; max-height: 30vh; padding: 10px 12px; }
  .te-seite .tag-palette > .matt { display: none; }
  .te-haupt { flex: 1 1 auto; min-height: 0; }
}
.te-koerper { padding: 0 22px 20px; display: grid; gap: 14px; }
.te-oben { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: center; }
.te-zahlen { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.te-zahlen > div { display: grid; gap: 3px; }
.te-zahlen > div > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.te-kurve .diagramm figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.te-block { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: rgb(9 11 14 / .45); }
.te-block h3 { margin: 0; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--matt); }
.te-block textarea { width: 100%; font: inherit; font-size: .92rem; line-height: 1.5; color: var(--fg); padding: .6rem .75rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); resize: vertical; }
.te-trades-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.te-block .trade-karte { margin-bottom: 0; background: var(--kachel); }
.te-block .tag-palette { top: -1px; }
.te-kopf { position: sticky; top: 0; z-index: 4; background: var(--kachel); border-bottom: 1px solid var(--rand); padding-bottom: 12px; margin-bottom: 12px; }
@media (max-width: 860px) {
  .jl-tag-zeile { grid-template-columns: 1fr auto; }
  .jl-tz-trades, .jl-tz-notiz { grid-column: 1 / -1; }
  .te-oben { grid-template-columns: 1fr; }
  .te-koerper { padding: 0 12px 16px; }
}
.jl-woche { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .9rem; margin: 14px 0 2px; font-size: .9rem; font-weight: 600; }
.jl-woche:first-child { margin-top: 0; }
.jl-woche-nr { display: inline-grid; place-items: center; min-width: 2.2rem; padding: .1rem .45rem; border-radius: 8px; background: var(--kachel-hoch); border: 1px solid var(--rand-hell); color: var(--akzent); font-weight: 800; }
.jl-woche .plus { color: var(--gut-fg); }
.jl-woche .minus { color: var(--stop-fg); }
/* Journal: gallery button next to a day, full-size gallery */
.jl-tag-reihe { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; align-items: stretch; }
.jl-galerie-knopf { position: relative; padding: 0; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); overflow: hidden; background: var(--bg); cursor: zoom-in; }
.jl-galerie-knopf img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .15s; }
.jl-galerie-knopf:hover img { opacity: 1; }
.jl-galerie-knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.jl-galerie-zahl { position: absolute; right: 4px; bottom: 4px; min-width: 1.3rem; padding: 0 .3rem; border-radius: 999px; background: rgb(0 0 0 / .75); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; }
.galerie { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgb(4 5 7 / .96); color: var(--fg); }
.galerie[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.galerie::backdrop { background: rgb(0 0 0 / .8); }
.galerie-kopf { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.galerie-zaehler { color: var(--matt); font-variant-numeric: tabular-nums; }
.galerie-rechts { margin-left: auto; display: inline-flex; gap: 8px; }
.galerie-buehne { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 12px; min-height: 0; }
.galerie-figur { margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 8px; min-height: 0; height: 100%; }
.galerie-bild { width: 100%; height: 100%; min-height: 0; object-fit: contain; border-radius: 8px; align-self: center; }
.galerie-text { font-size: .9rem; }
.galerie-text .plus { color: var(--gut-fg); }
.galerie-text .minus { color: var(--stop-fg); }
.galerie-pfeil { width: 44px; height: 44px; font-size: 1.4rem; }
.galerie-leiste { display: flex; gap: 6px; padding: 10px 16px 14px; overflow-x: auto; justify-content: center; }
.galerie-mini { flex: none; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: .6; }
.galerie-mini img { display: block; width: 88px; height: 56px; object-fit: cover; }
.galerie-mini[aria-current="true"] { border-color: var(--akzent); opacity: 1; }
@media (max-width: 860px) {
  .jl-tag-reihe { grid-template-columns: minmax(0, 1fr) 56px; }
  .galerie-buehne { grid-template-columns: minmax(0, 1fr); }
  .galerie-pfeil { display: none; }
}
.trade-link-zeile { display: flex; gap: 6px; align-items: center; }
.trade-link { flex: 1; min-width: 0; font: inherit; font-size: .85rem; color: var(--fg); padding: .4rem .55rem; border: 1px solid var(--rand-hell); border-radius: 8px; background: var(--bg); }
.trade-link[aria-invalid="true"] { border-color: var(--stop-fg); }
.trade-link-zeile .knopf { white-space: nowrap; text-decoration: none; }
.galerie-unten { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; }
.galerie-link { text-decoration: none; }
.galerie-ohne-bild { display: grid; place-items: center; align-content: center; gap: 10px; align-self: center; width: min(520px, 90%); aspect-ratio: 16 / 9; border: 1px dashed var(--rand-hell); border-radius: var(--radius); }
.galerie-ohne-bild[hidden], .galerie-bild[hidden], .galerie-link[hidden] { display: none; }
.galerie-tv { display: grid; place-items: center; width: 100%; height: 100%; min-height: 40px; font-weight: 800; letter-spacing: .04em; color: var(--fg); background: linear-gradient(135deg, #2962ff, #1e3a8a); }
.galerie-ohne-bild .galerie-tv { width: 64px; height: 64px; border-radius: 14px; }
.galerie-mini .galerie-tv { width: 88px; height: 56px; }

/* ── Risk & Disziplin ─────────────────────────────────────────── */
.risk-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.risk-kopf h1 { margin: 0; }
.risk-kopf p { margin: .2rem 0 0; }
.risk-schritt { margin-bottom: 14px; }
.risk-schritt h2, .risk-gruppe h3 { margin: 0 0 .5rem; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--matt); }
.risk-konten { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 10px; }
.risk-konto { display: grid; gap: 2px; text-align: left; padding: .75rem .9rem; font: inherit; color: var(--fg); border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.risk-konto:hover { border-color: var(--rand-hell); }
.risk-konto.aktiv { border-color: var(--akzent); box-shadow: 0 0 0 3px rgb(240 138 60 / .15); }
.risk-konto .matt { font-size: .8rem; }
.risk-konto-kapital { font-weight: 700; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.risk-gruppe { grid-column: 1 / -1; margin-top: .6rem; padding-top: .7rem; border-top: 1px solid var(--rand); }
.risk-gruppe:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.risk-gruppe p { margin: 0 0 .2rem; font-size: .82rem; }
.risk-satz { grid-column: 1 / -1; margin: 0; padding: .55rem .75rem; border-radius: var(--radius-klein); background: var(--akzent-matt); color: var(--fg); font-size: .9rem; }
.risk-satz:empty { display: none; }
.template-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 14px; border: 1px dashed var(--rand-hell); border-radius: var(--radius-klein); }
.template-zeile select, .template-neu input { font: inherit; font-size: .88rem; color: var(--fg); padding: .35rem .55rem; border: 1px solid var(--rand-hell); border-radius: 8px; background: var(--bg); }
.template-neu { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.template-neu[hidden] { display: none; }
.kapital-leiste { display: grid; gap: 10px; }
.kl-werte { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.kl-werte > div, .kapital-leiste-einfach > div { display: grid; gap: 2px; }
.kl-werte span, .kapital-leiste-einfach span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.kl-werte strong, .kapital-leiste-einfach strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.kl-werte .plus { color: var(--gut-fg); }
.kl-werte .minus, .kl-satz .minus { color: var(--stop-fg); }
.kl-mitte { text-align: center; }
.kl-rechts { text-align: right; }
.kl-balken { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, rgb(232 106 34 / .35), rgb(255 255 255 / .06) 30%, rgb(52 211 153 / .3)); }
.kl-fuell { height: 100%; border-radius: 999px 0 0 999px; background: linear-gradient(90deg, rgb(232 106 34 / .5), var(--plus)); }
.kl-marke { position: absolute; top: -5px; width: 4px; height: 22px; margin-left: -2px; border-radius: 2px; background: var(--fg); box-shadow: 0 0 0 3px rgb(0 0 0 / .35); }
.kl-satz { margin: 0; font-size: .9rem; }
.kapital-leiste-einfach { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.disziplin-bereich { display: grid; gap: 14px; }
.disziplin-bereich > .karte { margin: 0; }
.sim-vergleich { margin-top: 14px; }
.sim-vergleich .diagramm figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sim-vergleich-tabelle .sim-aktuell { background: rgb(255 255 255 / .04); }
.sim-vergleich-tabelle .abzeichen { font-size: .68rem; margin-left: .4rem; }
.sim-vergleich-tabelle td.plus { color: var(--gut-fg); }
.sim-vergleich-tabelle td.minus { color: var(--stop-fg); }
@media (max-width: 640px) { .kl-werte { grid-template-columns: 1fr; } .kl-mitte, .kl-rechts { text-align: left; } }
.disziplin-schritte { margin: 0 0 14px; padding: .7rem .9rem .7rem 2rem; border-radius: var(--radius-klein); background: var(--akzent-matt); font-size: .9rem; line-height: 1.6; }

/* Risk: progress card, locks, winrate source */
.fortschritt { display: grid; gap: 14px; }
.fs-kopf { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.fs-prozent { font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.fs-prozent.plus { color: var(--gut-fg); }
.fs-satz { margin: 0; flex-basis: 100%; font-size: .95rem; }
/* Capital scale: "now" above, bar with zones and marks, labels below */
.fs-skala { position: relative; padding: 3.1rem 0 3.4rem; margin: 0 4px; }
.fs-balken { position: relative; height: 14px; border-radius: 999px; background: var(--rand); }
.fs-zone { position: absolute; top: 0; bottom: 0; }
.fs-zone-minus { background: rgb(232 106 34 / .16); border-radius: 999px 0 0 999px; }
.fs-zone-plus { background: rgb(52 211 153 / .13); border-radius: 0 999px 999px 0; }
.fs-fuell { position: absolute; top: 0; bottom: 0; width: 0; background: var(--gut-fg); transition: width .3s, left .3s; }
.fs-fuell.fs-minus { background: var(--stop-fg); }
.fs-strich { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--fg); opacity: .55; }
.fs-strich-floor { background: var(--stop-fg); opacity: 1; width: 3px; }
.fs-strich-ziel { background: var(--gut-fg); opacity: 1; width: 3px; }
.fs-strich-start { background: var(--fg); opacity: .9; }
.fs-strich-etappe { top: 3px; bottom: 3px; width: 2px; background: var(--fg); opacity: .3; }
.fs-strich-tag { top: -7px; bottom: -7px; width: 0; border-left: 2px dashed var(--warn-fg); background: none; opacity: 1; }
.fs-marken { position: absolute; left: 0; right: 0; bottom: 0; height: 3rem; }
.fs-marke, .fs-jetzt { position: absolute; display: grid; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fs-marke { top: 0; padding-top: .35rem; }
.fs-mitte { transform: translateX(-50%); text-align: center; }
.fs-rechts { transform: translateX(-100%); text-align: right; }
.fs-marke-titel, .fs-jetzt span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.fs-marke strong { font-size: .92rem; }
.fs-marke-info { font-size: .75rem; color: var(--matt); }
.fs-marke-floor strong { color: var(--stop-fg); }
.fs-marke-ziel strong { color: var(--gut-fg); }
.fs-jetzt { top: 0; padding: .3rem .6rem; border-radius: 8px; background: var(--kachel-hoch); border: 1px solid var(--rand-hell); box-shadow: 0 4px 14px rgb(0 0 0 / .35); }
.fs-jetzt strong { font-size: 1rem; }
.fs-jetzt.plus strong { color: var(--gut-fg); }
.fs-jetzt.minus strong { color: var(--stop-fg); }
.fs-jetzt::after { content: ""; position: absolute; bottom: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--rand-hell); }
.fs-jetzt.fs-links::after { left: 6px; margin-left: 0; }
.fs-jetzt.fs-rechts::after { left: auto; right: 6px; margin-left: 0; }
.fs-legende { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .85rem; color: var(--matt); }
.fs-legende span { display: inline-flex; align-items: center; gap: 8px; }
.fs-legende-etappe::before { content: ""; width: 2px; height: 12px; background: var(--fg); opacity: .35; }
.fs-legende-tag::before { content: ""; height: 14px; border-left: 2px dashed var(--warn-fg); }
.fs-legende-trail::before { content: ""; height: 14px; border-left: 2px solid var(--stop-fg); }
.fs-werte { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fs-wert { padding: .65rem .8rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); display: grid; gap: 2px; background: var(--bg); }
.fs-wert span { font-size: .78rem; color: var(--matt); }
.fs-wert strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .fs-werte { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fs-marke-info { display: none; } }
/* Risk: tiles in three groups, account cards, numbered setting steps */
.risk-blick { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 18px; }
.risk-blick-gruppe h3 { margin: 0; font-size: .95rem; }
.risk-blick-gruppe > p { margin: .1rem 0 .6rem; font-size: .82rem; }
.risk-blick-gruppe .kacheln { grid-template-columns: 1fr; gap: 8px; }
.kachel-risiko { border-left: 3px solid var(--stop-fg); }
.kachel-ziel { border-left: 3px solid var(--gut-fg); }
.risk-konto-aenderung { margin-left: .5rem; font-size: .8rem; font-weight: 600; }
.risk-konto-aenderung.plus { color: var(--gut-fg); }
#risk-bereich .formular-felder { counter-reset: gruppe; }
#risk-bereich .risk-gruppe:not([hidden]) { counter-increment: gruppe; }
#risk-bereich .risk-gruppe h3 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .25rem; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--fg); }
#risk-bereich .risk-gruppe h3::before { content: counter(gruppe); display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--akzent-matt); border: 1px solid var(--akzent-rand); color: var(--akzent); font-size: .85rem; font-weight: 800; }
#risk-bereich .risk-gruppe { margin-top: 1rem; padding-top: 1rem; }
#risk-bereich .risk-gruppe p { margin-left: 2.15rem; }
.template-titel { font-weight: 700; }
.karte-kopf .klein-text { margin: .2rem 0 0; }
.schloss { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: 6px; vertical-align: middle; border: 1px solid var(--rand-hell); border-radius: 6px; background: transparent; color: var(--matt); cursor: pointer; }
.schloss svg { width: 19px !important; height: 19px !important; }
.schloss:hover { border-color: var(--rand-hell); color: var(--fg); }
.schloss.zu { color: var(--akzent); border-color: var(--akzent); background: var(--akzent-matt); }
.feld-gesperrt input { opacity: .75; cursor: not-allowed; }
.wr-quelle { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.wr-quelle select { max-width: 100%; }

/* Lock next to the label; winrate source in one row */
.feld-kopf { display: flex; align-items: center; gap: 4px; }
.feld-kopf .schloss { margin-left: 2px; width: 28px; height: 28px; }
.wr-quelle { flex-wrap: wrap; }
.wr-quelle select { flex: 1; min-width: 10rem; font-size: .85rem; padding-top: .35rem; padding-bottom: .35rem; }
.wr-quelle .knopf { flex: none; }
@media (max-width: 760px) { .sim-vergleich .tabelle-rahmen { overflow-x: auto; } }
/* One lock for all risk parameters */
.schloss-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.risk-schloss { display: inline-flex; align-items: center; gap: 6px; }
.risk-schloss svg { width: 18px; height: 18px; }
.risk-schloss.zu { color: var(--akzent); border-color: var(--akzent-rand); background: var(--akzent-matt); }
.risk-gesperrt .formular input:disabled, .risk-gesperrt .formular select:disabled { opacity: .6; cursor: not-allowed; border-style: dashed; background: transparent; }
.risk-gesperrt .wr-quelle, .risk-gesperrt .template-zeile #risk-template-anwenden { display: none; }

/* Konten: ⋮ menu floats over the page (position fixed, set from the button) */
.konto-menue { position: fixed; z-index: 60; min-width: 230px; padding: 6px; display: grid; gap: 1px; background: var(--kachel-hoch); border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); box-shadow: 0 16px 40px rgb(0 0 0 / .55); }
.menue-eintrag { display: flex; align-items: center; gap: 10px; width: 100%; padding: .55rem .7rem; border: 0; border-radius: 7px; background: none; color: var(--fg); font: inherit; font-size: .9rem; text-align: left; text-decoration: none; cursor: pointer; }
.menue-eintrag svg { width: 18px; height: 18px; flex: none; color: var(--matt); }
.menue-eintrag:hover, .menue-eintrag:focus-visible { background: rgb(255 255 255 / .06); outline: none; }
.menue-eintrag.gefahr, .menue-eintrag.gefahr svg { color: var(--stop-fg); }
.menue-eintrag.gefahr:hover { background: var(--stop-bg); }
.menue-trenner { height: 1px; margin: 4px 6px; background: var(--rand); }
.konto-fenster { width: min(760px, calc(100vw - 32px)); }
.konto-fenster-inhalt { padding: 6px 22px 22px; }
.konto-fenster-inhalt .detail-block h4 { display: none; }
.konto-fenster-inhalt .formular { max-width: none; }

/* Large screens (e.g. 32" at 2560 px): the page grows with the screen —
   wider content, slightly larger type (everything in rem follows). Up to
   1800 px nothing changes. */
@media (min-width: 1800px) {
  html { font-size: 17px; }
  .app-haupt { max-width: 1720px; margin-inline: auto; }
}
@media (min-width: 2200px) {
  html { font-size: 18px; }
  .app-haupt { max-width: 2040px; padding-inline: 36px; }
  .seitenleiste a svg, .marke-zeichen svg { width: 20px; height: 20px; }
}
@media (min-width: 2900px) {
  html { font-size: 20px; }
  .app-haupt { max-width: 2480px; }
}

/* Note after a deploy (boot/versionWaechter.js). */
.update-hinweis { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: flex; align-items: center; gap: .6rem; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border: 1px solid var(--akzent-rand); border-radius: var(--radius); background: var(--kachel); color: var(--fg); box-shadow: 0 12px 32px rgb(0 0 0 / .45); font-size: .9rem; }

/* Setup notebook (/dashboard/setups): create bar on top, sidebar with the
   setups and their sections, the chosen page on the right. */
.nb-neu-leiste { margin: 0 0 12px; padding: 12px; }
.notizbuch { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 12px; align-items: start; }
.notizbuch > .karte { margin: 0; }
.nb-leiste { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding: 12px; }
.nb-suchfeld { display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); color: var(--matt); }
.nb-suchfeld svg { width: 16px; height: 16px; flex: none; }
.nb-suche { flex: 1; min-width: 0; font: inherit; font-size: .92rem; padding: .5rem 0; border: 0; background: none; color: var(--fg); }
.nb-suche:focus-visible { outline: none; }
.nb-suchfeld:focus-within { border-color: var(--akzent); }
.nb-baum, .nb-abschnitte { list-style: none; margin: 0; padding: 0; }
.nb-baum { margin-top: 10px; display: grid; gap: 2px; }
.nb-baum > .leer { padding: .5rem; }
.nb-setup-zeile { display: flex; align-items: center; gap: 2px; }
.nb-klapp { flex: none; display: grid; place-items: center; width: 26px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--matt); cursor: pointer; }
.nb-klapp svg { width: 15px; height: 15px; transition: transform .15s; }
.nb-setup.offen > .nb-setup-zeile .nb-klapp svg { transform: rotate(90deg); }
.nb-setup-name { flex: 1; min-width: 0; text-align: left; font: inherit; font-weight: 650; font-size: .95rem; padding: .35rem .4rem; border: 0; border-radius: 6px; background: none; color: var(--fg); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-setup-name.gewaehlt { color: var(--akzent); }
.nb-zahl { flex: none; font-size: .8rem; padding-right: .4rem; }
.nb-abschnitte { margin: 2px 0 6px 26px; display: grid; gap: 1px; border-left: 1px solid var(--rand-hell); padding-left: 6px; }
.nb-eintrag { width: 100%; text-align: left; font: inherit; font-size: .9rem; padding: .32rem .5rem; border: 0; border-radius: 6px; background: none; color: var(--matt); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-eintrag:hover, .nb-setup-name:hover, .nb-klapp:hover { background: var(--kachel-hoch); color: var(--fg); }
.nb-eintrag.aktiv { background: var(--akzent-matt); color: var(--akzent); font-weight: 600; }
.nb-eintrag.nb-neu { color: var(--akzent); }
.nb-eintrag:focus-visible, .nb-setup-name:focus-visible, .nb-klapp:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }

.nb-seite { min-height: 60vh; padding: 22px 26px; }
.nb-kopf { margin-bottom: 14px; }
.nb-kopf-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nb-pfad { font-size: .85rem; white-space: nowrap; }
.nb-titel { flex: 1; min-width: 10rem; font: inherit; font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; padding: .2rem .35rem; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--fg); }
.nb-titel:hover { border-color: var(--rand-hell); }
.nb-titel:focus-visible { outline: none; border-color: var(--akzent); background: var(--bg); }
.nb-setup-titel { flex: 1; margin: 0; font-size: 1.45rem; }
.nb-kopf-knoepfe { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nb-kopf-knoepfe .icon-knopf { margin: 0; }
.nb-frage { font-size: .9rem; color: var(--stop-fg); }
.nb-gefahr:hover:not(:disabled) { color: var(--stop-fg); border-color: var(--stop-rand); }
.nb-meta { display: flex; gap: 12px; margin: 4px 0 0; font-size: .82rem; }
.nb-status:empty { display: none; }
.nb-teil { margin-top: 18px; }
.nb-teil h3 { margin: 0 0 8px; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--matt); }
.nb-inhaltsliste { margin: 0 0 8px; padding-left: 1.2rem; }

.nb-text { display: block; width: 100%; min-height: 44px; font: inherit; font-size: .95rem; line-height: 1.6; color: var(--fg); padding: .5rem .6rem; border: 1px solid transparent; border-radius: var(--radius-klein); background: none; resize: none; overflow: hidden; }
.nb-text:hover { border-color: var(--rand); }
.nb-text:focus-visible { outline: none; border-color: var(--rand-hell); background: var(--bg); }
.nb-beschreibung { border-color: var(--rand); background: var(--bg); resize: vertical; overflow: auto; }

.zb-rahmen { position: relative; line-height: 0; }
.zb-rahmen img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--rand); }
.zb-ebene { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.zb-gross .zb-rahmen { width: min(96vw, 1600px); }
.zb-gross .zb-rahmen img { max-height: 94vh; object-fit: contain; }

/* Drawing editor (components/setups/zeichnung.js). */
.zeichen-dialog { width: min(1400px, 96vw); max-width: 96vw; max-height: 96vh; padding: 0; border: 1px solid var(--rand-hell); border-radius: var(--radius); background: var(--kachel); color: var(--fg); box-shadow: 0 24px 60px rgb(0 0 0 / .6); }
.zeichen-dialog::backdrop { background: rgb(0 0 0 / .8); }
.zd-leiste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--rand); }
.zd-gruppe { display: inline-flex; gap: 3px; padding-right: 10px; border-right: 1px solid var(--rand); }
.zd-gruppe .icon-knopf { margin: 0; }
.zd-leiste > .icon-knopf { margin: 0; }
.zd-farbe { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .35); }
.zd-dicke { width: 18px; border-radius: 4px; background: currentColor; }
.zd-wahl.aktiv { background: var(--akzent-matt); }
.zd-luecke { flex: 1; }
.zd-flaeche { display: grid; place-items: center; padding: 14px; overflow: auto; max-height: calc(96vh - 70px); }
.zd-rahmen { width: fit-content; max-width: 100%; }
.zd-rahmen img { width: auto; max-width: 100%; max-height: calc(96vh - 110px); }
.zd-ebene { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.zd-rahmen[data-werkzeug="text"] .zd-ebene { cursor: text; }
.zd-rahmen[data-werkzeug="radierer"] .zd-ebene { cursor: cell; }
.zd-textfeld { position: absolute; transform: translateY(-100%); min-width: 10rem; font: 600 16px/1.3 var(--schrift); padding: 2px 6px; border: 1px dashed currentColor; border-radius: 4px; background: rgb(0 0 0 / .55); line-height: 1.3; }
.zd-textfeld:focus-visible { outline: none; }

@media (max-width: 900px) {
  .notizbuch { grid-template-columns: minmax(0, 1fr); }
  .nb-leiste { position: static; max-height: 40vh; }
  .nb-seite { padding: 16px; }
  .format-leiste { position: static; }
  .fl-hinweis { display: none; }
}

/* Free page of a section: elements placed by position (components/setups/abschnitt.js). */
.fl-flaeche { position: relative; min-height: 420px; margin-top: 4px; border: 1px solid var(--rand); border-radius: var(--radius-klein); cursor: text;
  background: radial-gradient(circle, rgb(255 255 255 / .05) 1px, transparent 1.2px) 0 0 / 24px 24px, var(--bg); }
.fl-flaeche.ziel-aktiv { outline: 2px dashed var(--akzent-rand); outline-offset: 4px; }
.fl-leer { position: absolute; left: 24px; top: 20px; margin: 0; pointer-events: none; }
.fl-el { position: absolute; border-radius: 6px; }
.fl-el:focus-visible { outline: none; }
.fl-text { padding: 4px; cursor: move; }
.fl-text:hover, .fl-bild:hover { box-shadow: 0 0 0 1px var(--rand-hell); }
.fl-el.gewaehlt { box-shadow: 0 0 0 1.5px var(--akzent); }
.fl-el.fl-zieht { opacity: .85; box-shadow: 0 0 0 1.5px var(--akzent), 0 10px 30px rgb(0 0 0 / .45); }
.fl-textfeld { display: block; width: 100%; margin: 0; padding: 2px 4px; border: 0; background: none; font-family: inherit; line-height: 1.4; resize: none; overflow: hidden; cursor: text; }
.fl-textfeld:focus-visible { outline: none; }
.fl-griff { position: absolute; left: -2px; top: -22px; display: grid; place-items: center; width: 22px; height: 20px; border-radius: 5px 5px 0 0; background: var(--akzent); color: var(--akzent-fg); cursor: move; opacity: 0; touch-action: none; }
.fl-griff svg { width: 14px; height: 14px; }
.fl-rand-rechts { position: absolute; right: -4px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; touch-action: none; }
.fl-rand-rechts::after { content: ''; position: absolute; right: 2px; top: 50%; width: 4px; height: 18px; margin-top: -9px; border-radius: 2px; background: var(--akzent); opacity: 0; }
.fl-text:hover .fl-griff, .fl-el.gewaehlt .fl-griff, .fl-el.gewaehlt .fl-rand-rechts::after { opacity: 1; }
.fl-bild { cursor: move; touch-action: none; }
.fl-bild .zb-rahmen img { border-radius: 6px; }
.fl-ecke { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; border: 2px solid var(--akzent); border-radius: 3px; background: var(--kachel); cursor: nwse-resize; opacity: 0; touch-action: none; }
.fl-bild:hover .fl-ecke, .fl-el.gewaehlt .fl-ecke { opacity: 1; }
.fl-flaeche.fl-schmal { display: grid; gap: 10px; padding: 10px; cursor: default; }
.fl-schmal .fl-el { position: static; }
.fl-schmal .fl-griff, .fl-schmal .fl-rand-rechts, .fl-schmal .fl-ecke { display: none; }
.fl-schmal .fl-leer { position: static; }

/* Menu bar like a word processor, under "Setup anlegen" (components/setups/formatLeiste.js). */
.format-leiste { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 4px; margin: 0 0 12px; padding: 8px 10px; }
.fl-gruppe { display: flex; align-items: center; gap: 3px; }
.fl-trenner { width: 1px; height: 24px; margin: 0 5px; background: var(--rand-hell); }
.fl-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 6px; font: inherit; font-size: .88rem; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--fg); cursor: pointer; }
.fl-knopf svg { width: 16px; height: 16px; }
.fl-knopf:hover:not(:disabled) { background: var(--kachel-hoch); border-color: var(--rand-hell); }
.fl-knopf.aktiv { background: var(--akzent-matt); border-color: var(--akzent-rand); color: var(--akzent); }
.fl-knopf:disabled { opacity: .35; cursor: default; }
.fl-knopf:focus-visible, .fl-groesse:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.fl-breit { padding: 0 10px; font-weight: 600; }
.fl-fett { font-weight: 800; }
.fl-kursiv { font-style: italic; font-family: Georgia, serif; }
.fl-unter { text-decoration: underline; }
.fl-groesse { height: 32px; font: inherit; font-size: .88rem; padding: 0 6px; border: 1px solid var(--rand-hell); border-radius: 8px; background: var(--bg); color: var(--fg); }
.fl-groesse:disabled { opacity: .35; }
.fl-farben { display: flex; gap: 1px; }
.fl-farbe { min-width: 26px; padding: 0 4px; }
.fl-absatz { display: grid; gap: 2px; width: 16px; }
.fl-absatz i { display: block; height: 2px; border-radius: 1px; background: currentColor; }
.fl-absatz i:nth-child(2) { width: 65%; }
.fl-absatz-mitte i:nth-child(2) { justify-self: center; }
.fl-absatz-rechts i:nth-child(2) { justify-self: end; }
.fl-seite { position: relative; display: block; width: 18px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; opacity: .9; }
.fl-seite i { position: absolute; top: 2px; bottom: 2px; width: 6px; border-radius: 1px; background: currentColor; }
.fl-seite-links i { left: 2px; }
.fl-seite-mitte i { left: 50%; margin-left: -3px; }
.fl-seite-rechts i { right: 2px; }
.fl-hinweis { margin-left: auto; padding-left: 8px; font-size: .8rem; }

/* Setup summary: name with pencil, linked assets, numbered checklist, gallery. */
.nb-name { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 12rem; }
.nb-name .nb-titel { font-size: 1.45rem; }
.nb-stift { margin: 0; width: 30px; height: 30px; }
.nb-stift svg { width: 15px; height: 15px; }
.nb-assets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; font-size: .85rem; }
.nb-asset { padding: .15rem .55rem; border: 1px solid var(--akzent-rand); border-radius: 999px; background: var(--akzent-matt); color: var(--fg); }

.cl-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cl-kopf h3 { margin: 0; }
.cl-stand { font-size: .82rem; color: var(--matt); }
.cl-stand.cl-voll { color: var(--gut-fg); }
.cl-zurueck { margin-left: auto; font-size: .82rem; }
.cl-balken { height: 4px; margin: 0 0 10px; border-radius: 2px; background: var(--rand); overflow: hidden; }
.cl-balken-fuell { display: block; height: 100%; border-radius: 2px; background: var(--gut-fg); transition: width .2s; }
.cl .regel-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cl-regel { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel-hoch); transition: border-color .15s, background .15s; }
.cl-regel:hover { border-color: var(--rand-hell); }
.cl-regel.erfuellt { border-color: var(--gut-rand); background: var(--gut-bg); }
.cl-label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cl-box { flex: none; appearance: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--rand-hell); border-radius: 7px; background: var(--bg); cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.cl-box::after { content: ''; width: 7px; height: 12px; margin-top: -3px; border: solid var(--akzent-fg); border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); transition: transform .12s; }
.cl-box:checked { background: var(--gut-fg); border-color: var(--gut-fg); }
.cl-box:checked::after { transform: rotate(45deg) scale(1); }
.cl-box:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.cl-nr { flex: none; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--akzent-matt); color: var(--akzent); font-weight: 700; font-size: .85rem; }
.cl-regel.erfuellt .cl-nr { background: transparent; color: var(--gut-fg); }
.cl-text { min-width: 0; overflow-wrap: anywhere; }
.cl-regel.erfuellt .cl-text { color: var(--matt); }
.cl .regel-knoepfe { opacity: 0; transition: opacity .15s; }
.cl-regel:hover .regel-knoepfe, .cl-regel:focus-within .regel-knoepfe { opacity: 1; }
.cl-neu { align-items: center; margin-top: 8px; padding: 6px 6px 6px 10px; border: 1px dashed var(--rand-hell); border-radius: var(--radius-klein); }
.cl-neu input { border: 0; background: none; }
.cl-nr-neu { background: transparent; border: 1px dashed var(--rand-hell); color: var(--matt); }

.ga { display: grid; gap: 8px; border-radius: var(--radius-klein); }
.ga:focus-visible { outline: 2px solid var(--akzent); outline-offset: 4px; }
.ga.ziel-aktiv { outline: 2px dashed var(--akzent-rand); outline-offset: 4px; }
.ga-buehne { position: relative; display: grid; place-items: center; min-height: 200px; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); overflow: hidden; }
.ga-bild { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ga-bild img { display: block; width: 100%; max-height: 460px; object-fit: contain; }
.ga-pfeil { position: absolute; top: 50%; width: 40px; height: 40px; margin-top: -20px; border: 1px solid var(--rand-hell); border-radius: 50%; background: rgb(10 12 16 / .75); color: var(--fg); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.ga-pfeil:hover { border-color: var(--akzent); color: var(--akzent); }
.ga-zurueck { left: 10px; }
.ga-vor { right: 10px; }
.ga-zaehler { position: absolute; right: 10px; bottom: 10px; padding: .1rem .5rem; border-radius: 999px; background: rgb(10 12 16 / .75); font-size: .8rem; }
.ga-leer { display: grid; justify-items: center; gap: 6px; width: 100%; min-height: 200px; place-content: center; padding: 20px; border: 0; background: none; color: var(--fg); font: inherit; cursor: pointer; }
.ga-leer svg { width: 28px; height: 28px; color: var(--akzent); }
.ga-leiste { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.ga-mini { flex: none; width: 84px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--bg); cursor: pointer; overflow: hidden; opacity: .6; }
.ga-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ga-mini.aktiv, .ga-mini:hover { opacity: 1; border-color: var(--akzent); }
.ga-fuss { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ga-frage { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--stop-fg); }

.aw-dialog { width: min(560px, 94vw); max-height: 86vh; padding: 18px; border: 1px solid var(--rand-hell); border-radius: var(--radius); background: var(--kachel); color: var(--fg); box-shadow: 0 24px 60px rgb(0 0 0 / .6); }
.aw-dialog::backdrop { background: rgb(0 0 0 / .7); }
.aw-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aw-kopf h3 { margin: 0; }
.aw-suche { width: 100%; margin-top: 6px; font: inherit; padding: .6rem .75rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.aw-suche:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.aw-zahl { margin: 6px 0; }
.aw-info { margin: 6px 0 4px; font-size: .88rem; line-height: 1.5; color: var(--matt); }
.aw-info strong { color: var(--fg); font-weight: 600; }
.aw-maerkte { display: grid; gap: 8px; max-height: 52vh; overflow: auto; padding-right: 2px; }
.aw-teil { margin: 6px 0 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--matt); }
.aw-markt { border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); padding: .6rem .7rem; display: grid; gap: .5rem; }
.aw-markt.an { border-color: var(--akzent-rand); }
.aw-markt-kopf { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.aw-markt-name { font-size: 1rem; letter-spacing: .02em; }
.aw-markt-stand { margin-right: auto; }
.aw-alle { padding: .2rem .7rem; font-size: .78rem; }
.aw-alle.an { border-color: var(--akzent-rand); color: var(--akzent); }
.aw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aw-chip { position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem .35rem .45rem; border: 1px solid var(--rand); border-radius: 999px; background: var(--kachel); cursor: pointer; font-size: .88rem; transition: border-color .15s, background .15s; }
.aw-chip:hover { border-color: var(--rand-hell); }
.aw-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.aw-haken { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1.5px solid var(--rand-hell); display: grid; place-items: center; flex: none; }
.aw-chip.an { border-color: var(--akzent); background: var(--akzent-matt); }
.aw-chip.an .aw-haken { background: var(--akzent); border-color: var(--akzent); }
.aw-chip.an .aw-haken::after { content: "✓"; color: var(--akzent-fg); font-size: .7rem; font-weight: 900; }
.aw-chip:focus-within { outline: 2px solid var(--akzent); outline-offset: 2px; }
.aw-chip.anderes { border-style: dashed; }
.aw-konto { font-weight: 600; }
.aw-name { font-size: .8rem; }
.aw-anderes { font-size: .72rem; color: var(--warn-fg); }
.nb-name .nb-setup-titel { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* Right-click menu of the setup notebook (components/setups/kontextMenue.js). */
.km { position: fixed; z-index: 80; min-width: 220px; padding: 6px; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--kachel-hoch); box-shadow: 0 12px 32px rgb(0 0 0 / .5); display: grid; gap: 2px; }
.km-eintrag { text-align: left; font: inherit; font-size: .9rem; padding: .45rem .7rem; border: 0; border-radius: 6px; background: none; color: var(--fg); cursor: pointer; white-space: nowrap; }
.km-eintrag:hover, .km-eintrag:focus-visible { background: var(--akzent-matt); color: var(--akzent); outline: none; }
.km-gefahr { color: var(--stop-fg); }
/* Simulation: risk comparison — recommended level and own value */
.sim-vergleich-kacheln { margin-bottom: 14px; }
.kachel-empfohlen { border-color: var(--akzent-rand); background: var(--akzent-matt); }
.kachel-empfohlen .kachel-wert { color: var(--akzent); }
.diagramm-svg .balken-empfohlen .balken-plus { fill: var(--akzent); }
.diagramm-svg .balken-dein .balken-plus { stroke: var(--fg); stroke-width: 2; }
.sim-legende { display: flex; gap: 18px; margin: 4px 0 12px; }
.sim-legende span { display: inline-flex; align-items: center; gap: 6px; }
.sim-legende span::before { content: ""; width: 12px; height: 12px; border-radius: 3px; }
.sim-legende-emp::before { background: var(--akzent); }
.sim-legende-dein::before { background: var(--plus); box-shadow: inset 0 0 0 2px var(--fg); }
.sim-vergleich-tabelle .sim-empfohlen { background: var(--akzent-matt); }
.sim-vergleich-tabelle .sim-empfohlen th { color: var(--akzent); }
.risk-ueber-max { grid-column: 1 / -1; margin: 0; }

/* Compound interest: stacked columns (own money + interest) */
.diagramm-svg .stapel-basis { fill: var(--achse); opacity: .45; }
.diagramm-svg .stapel-oben { fill: var(--plus); }
.diagramm-svg .balken-gruppe:hover .stapel-oben, .diagramm-svg .balken-gruppe:focus .stapel-oben { opacity: .8; }
.stapel-legende-basis::before { background: var(--achse); opacity: .45; }
.stapel-legende-oben::before { background: var(--plus); }
.zins-anteil { margin: 4px 0 0; }
.zins-anteil-balken { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--achse); margin: 6px 0; }
.zins-anteil-balken > span { background: var(--plus); }

/* Account groups (Risk & Disziplin) */
.risk-auswahl { display: grid; gap: 10px; }
.risk-schritt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.risk-gruppe-karte { border-style: dashed; }
.risk-gruppe-karte.aktiv { border-style: solid; }
.risk-konto-gruppe { display: inline-block; margin-left: .4rem; padding: 0 .4rem; border-radius: 999px; background: var(--rand); font-size: .72rem; color: var(--fg); }
/* Total first, lightly orange, the accounts below. */
.gruppe-tabelle .gruppe-summe th, .gruppe-tabelle .gruppe-summe td { font-weight: 700; background: rgb(240 138 60 / .05); border-bottom: 1px solid rgb(240 138 60 / .22); }
/* Group tiles: "(x %)" stays on the line of its value. */
.gruppe-kacheln { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }
.gruppe-kacheln .kachel-wert { white-space: nowrap; }
.gruppe-kacheln .kachel-wert .gruppe-pct { font-size: .72em; }
.gruppe-tabelle .gruppe-summe th { color: var(--akzent); }
.gruppe-tabelle .plus { color: var(--gut-fg); }
.gruppe-tabelle .minus, .gruppe-kacheln .minus { color: var(--stop-fg); }
.gruppe-kacheln .plus { color: var(--gut-fg); }
.link-knopf { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--akzent); cursor: pointer; text-align: left; }
.link-knopf:hover { text-decoration: underline; }
.gruppe-editor-felder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
@media (max-width: 640px) { .gruppe-editor-felder { grid-template-columns: 1fr; } }

/* Rules & risk form: collapsible sections, values in one line when closed */
#risk-bereich .risk-abschnitte { display: grid; gap: 8px; grid-template-columns: 1fr; counter-reset: gruppe; }
.risk-abschnitt { border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel); }
.risk-abschnitt:not([hidden]) { counter-increment: gruppe; }
.risk-abschnitt > summary { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; padding: .6rem .85rem; cursor: pointer; list-style: none; }
.risk-abschnitt > summary::-webkit-details-marker { display: none; }
.risk-abschnitt > summary::after { content: "▸"; margin-left: auto; color: var(--matt); transition: transform .15s; }
.risk-abschnitt[open] > summary::after { transform: rotate(90deg); }
.risk-abschnitt > summary h3 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .95rem; }
.risk-abschnitt > summary h3::before { content: counter(gruppe); display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--akzent-matt); border: 1px solid var(--akzent-rand); color: var(--akzent); font-size: .78rem; font-weight: 800; }
.risk-abschnitt-wert { color: var(--matt); font-size: .85rem; font-variant-numeric: tabular-nums; }
.risk-abschnitt[open] .risk-abschnitt-wert { display: none; }
.risk-abschnitt-hilfe { margin: 0 .85rem .4rem; }
.risk-abschnitt-felder { padding: .2rem .85rem .85rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem .9rem; }

/* Group: way to the profit target per account, funded progress */

/* Compact tiles (group view) */
.kacheln-kompakt .kachel { padding: .6rem .75rem; }
.kacheln-kompakt .kachel-titel { font-size: .72rem; }
.kacheln-kompakt .kachel-wert { font-size: 1.1rem; }
.kacheln-kompakt .kachel-info { font-size: .72rem; line-height: 1.3; margin-top: .15rem; }
.gruppe-pct { font-size: .8em; font-weight: 600; }

/* "Alle Konten": one folding tile with a search field */
.risk-alle-konten { border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel); }
.risk-alle-konten > summary { display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; padding: .65rem .9rem; cursor: pointer; list-style: none; }
.risk-alle-konten > summary::-webkit-details-marker { display: none; }
.risk-alle-konten > summary::after { content: "▸"; margin-left: auto; color: var(--matt); transition: transform .15s; }
.risk-alle-konten[open] > summary::after { transform: rotate(90deg); }
.risk-alle-titel { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }
.risk-alle-aktiv { font-size: .85rem; color: var(--matt); }
.risk-alle-aktiv strong { color: var(--fg); }
.risk-alle-inhalt { display: grid; gap: 10px; padding: 0 .9rem .9rem; }
#risk-konto-suche { width: 100%; max-width: 28rem; padding: .5rem .7rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); font: inherit; }
#risk-konto-suche:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.risk-alle-anzahl { font-weight: 400; font-size: .85rem; color: var(--matt); }
.gruppe-funded { margin: 1rem 0; }
.gruppe-funded h3 { margin: 0 0 .5rem; font-size: .95rem; }


/* Group editor: accounts with search and chips, payout target with $ | % */
.gruppe-konten { border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: .7rem .85rem .85rem; display: grid; gap: .6rem; }
.gruppe-konten legend { padding: 0 .3rem; font-weight: 600; }
.gruppe-zaehler { margin-left: .3rem; font-weight: 400; font-size: .8rem; color: var(--matt); }
.gruppe-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gruppe-chip { display: inline-flex; align-items: center; gap: 2px; padding: .25rem .6rem; border: 1px solid var(--akzent-rand); border-radius: 999px; background: var(--akzent-matt); color: var(--fg); font: inherit; font-size: .82rem; cursor: pointer; }
.gruppe-chip:hover { border-color: var(--akzent); }
#gruppe-suche { width: 100%; max-width: 26rem; }
.gruppe-konten-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 8px; max-height: 18rem; overflow: auto; padding: 2px; }
.gruppe-haken { display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-items: center; padding: .5rem .65rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel); cursor: pointer; font-weight: 400; }
.gruppe-haken:hover { border-color: var(--rand-hell); }
.gruppe-haken.an { border-color: var(--akzent); box-shadow: 0 0 0 2px rgb(240 138 60 / .15); }
.gruppe-haken input { grid-row: 1 / span 2; width: 1.05rem; height: 1.05rem; accent-color: var(--akzent); }
.gruppe-haken-name { font-weight: 600; }
.gruppe-haken .klein-text { grid-column: 2; }
.gruppe-funded-block { display: grid; gap: .8rem; padding: .8rem .85rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); }
.gruppe-payout { max-width: 24rem; }
.gruppe-ziel-eingabe { display: flex; gap: 8px; align-items: stretch; }
.gruppe-ziel-eingabe input { flex: 1; min-width: 6rem; }
.gruppe-einheit { flex: none; }
.fs-etappe-label { position: absolute; bottom: calc(3.4rem + 14px + 6px); transform: translateX(-50%); font-size: .72rem; font-weight: 600; color: var(--matt); font-variant-numeric: tabular-nums; }

/* Progress header: sum (+ %) / goal; share of the goal in the "Jetzt" bubble */
.risk-stand-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.fs-kopf .fs-summe { font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fs-summe.plus { color: var(--gut-fg); }
.fs-summe.minus { color: var(--stop-fg); }
.fs-kopf .fs-prozent { font-size: 1.05rem; font-weight: 700; line-height: 1.1; }
.fs-prozent.minus { color: var(--stop-fg); }
.fs-ziel-text { font-size: 1rem; color: var(--matt); font-variant-numeric: tabular-nums; }
.fs-jetzt-anteil { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--gut-fg); }
/* "Jetzt" bubble grows upwards and stays in front of the bar */
.fs-skala { padding-top: 4.4rem; }
.fs-jetzt { top: auto; bottom: calc(3.4rem + 14px + 8px); z-index: 2; }
.fs-etappe-label { z-index: 1; }
.risk-alle-konten > summary .klein-text { margin: 0; }
.risk-alle-konten > summary > * { line-height: 1.3; }

/* Simulation: two cards with sliders */
.sim-gruppen { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 14px; }
.sim-gruppe { border: 1px solid var(--rand); border-radius: var(--radius); background: var(--kachel); padding: 1.1rem 1.2rem 1.2rem; display: grid; gap: .5rem; align-content: start; }
.sim-gruppe h3 { margin: 0 0 .3rem; font-size: 1rem; }
.sim-gruppe-felder { display: grid; gap: 1.1rem; }
.sim-gruppe .feld { display: grid; gap: .45rem; }
.regler-kopf { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.regler-kopf label { font-size: .9rem; }
.regler-wert { padding: .15rem .55rem; border-radius: 999px; background: var(--akzent-matt); border: 1px solid var(--akzent-rand); color: var(--akzent); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feld-regler { grid-template-columns: minmax(0, 1fr) 5.5rem; column-gap: 1rem; align-items: center; }
.feld-regler .regler-kopf, .feld-regler .feld-info, .feld-regler .feld-hinweis { grid-column: 1 / -1; }
.feld-regler input[type=number] { padding: .35rem .5rem; text-align: right; font-variant-numeric: tabular-nums; }
.feld input.regler { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; padding: 0; margin: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, var(--akzent) 0 var(--fuell, 0%), var(--rand-hell) var(--fuell, 0%) 100%); }
.feld input.regler::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--akzent); box-shadow: 0 2px 6px rgb(0 0 0 / .45); transition: transform .1s; }
.feld input.regler::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--akzent); box-shadow: 0 2px 6px rgb(0 0 0 / .45); }
.feld input.regler::-moz-range-track { background: transparent; }
.feld input.regler:hover::-webkit-slider-thumb, .feld input.regler:active::-webkit-slider-thumb { transform: scale(1.12); }
.feld input.regler:focus-visible { outline: 2px solid var(--akzent); outline-offset: 4px; }
/* Result tiles: same size, fill the width */
.sim-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 10px; }
.sim-stats .kachel { padding: .7rem .85rem; }
.sim-stats .kachel-titel { font-size: .75rem; }
.sim-stats .kachel-wert { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-stats .kachel-info { font-size: .75rem; }
.sim-erwartung { margin: -.3rem 0 0; font-size: .85rem; color: var(--matt); }
.sim-erwartung.plus strong { color: var(--gut-fg); }
.sim-erwartung.minus strong { color: var(--stop-fg); }

/* Rules & risk: every input on the same line — one-line labels; the risk
   sentence sits next to the risk field, the winrate source next to the trades */
.risk-abschnitt-felder { align-items: start; }
.risk-abschnitt-felder .feld > label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.risk-abschnitt-felder .risk-satz { grid-column: auto / span 2; align-self: start; margin-top: calc(.92rem * 1.4 + .25rem); display: flex; align-items: center; min-height: 2.45rem; }
.risk-abschnitt-felder .risk-wr-zelle .wr-quelle { margin-top: 0; flex-wrap: nowrap; }
.risk-abschnitt-felder .risk-wr-zelle select { min-width: 0; flex: 1; font-size: inherit; padding: .5rem .6rem; }
@media (max-width: 640px) { .risk-abschnitt-felder .risk-satz { grid-column: 1 / -1; margin-top: 0; } }

/* Handbuch */
.handbuch { display: grid; gap: 14px; }
.handbuch-modi { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 12px; }
.handbuch-modus { border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: .9rem 1rem; background: var(--bg); }
.handbuch-modus h3 { margin: 0 0 .4rem; font-size: 1rem; color: var(--akzent); }
.handbuch-modus p { margin: 0 0 .5rem; font-size: .9rem; line-height: 1.5; }
.handbuch-beispiel { color: var(--matt); font-size: .85rem !important; }
.handbuch-begriffe { display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: .55rem 1.2rem; margin: 0; }
.handbuch-begriffe dt { font-weight: 700; }
.handbuch-begriffe dd { margin: 0; color: var(--fg); font-size: .9rem; line-height: 1.5; }
@media (max-width: 640px) { .handbuch-begriffe { grid-template-columns: 1fr; } .handbuch-begriffe dd { margin-bottom: .4rem; } }
.fs-etappe-label.fs-links { transform: none; }
.fs-etappe-label.fs-rechts { transform: translateX(-100%); }
.fs-oben-floor { color: var(--stop-fg); font-size: .8rem; }
.fs-oben-ziel { color: var(--gut-fg); font-size: .8rem; }
.risk-versteckt { display: none !important; }
.risk-einheit .segment { align-self: start; }
.risk-einheit .segment { justify-self: start; width: auto; }
.fs-etappe-label { white-space: nowrap; }
.sim-zu-viel { color: var(--warn-fg); }

/* Simulation: pass rate first, risk unit, max-risk hint */
.sim-passrate { display: grid; gap: .2rem; margin: .8rem 0; padding: 1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--rand); background: var(--kachel); }
.sim-passrate-g { border-color: rgb(52 211 153 / .45); background: linear-gradient(135deg, rgb(52 211 153 / .1), transparent 60%), var(--kachel); }
.sim-passrate-y { border-color: rgb(250 204 21 / .45); }
.sim-passrate-r { border-color: var(--akzent-rand); background: linear-gradient(135deg, var(--akzent-matt), transparent 60%), var(--kachel); }
.sim-passrate-titel { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--matt); }
.sim-passrate-wert { font-size: 2.6rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.sim-passrate-g .sim-passrate-wert { color: var(--gut-fg); }
.sim-passrate-y .sim-passrate-wert { color: var(--warn-fg); }
.sim-passrate-r .sim-passrate-wert { color: var(--stop-fg); }
.sim-passrate-info { font-size: .8rem; color: var(--matt); }
.sim-versteckt { display: none !important; }
.sim-einheit { display: flex !important; align-items: center; justify-content: space-between; gap: .6rem; }
.sim-max-hinweis { margin: -.4rem 0 0; font-size: .82rem; color: var(--warn-fg); }
.sim-max-hinweis:empty { display: none; }
.sim-ueber-max .regler-wert { background: rgb(250 204 21 / .12); border-color: rgb(250 204 21 / .5); color: var(--warn-fg); }
.sim-ueber-max input.regler { background: linear-gradient(to right, var(--warn-fg) 0 var(--fuell, 0%), var(--rand-hell) var(--fuell, 0%) 100%) !important; }
.sim-rechnet { margin: .6rem 0 0; font-size: .85rem; color: var(--akzent); }

/* Compound interest: three cards, a big end capital, roomy tiles */
.zins-gruppen { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)) !important; }
.zins-oben { display: grid; grid-template-columns: minmax(16rem, 1.2fr) 2fr; gap: 12px; margin: 1rem 0; align-items: stretch; }
@media (max-width: 760px) { .zins-oben { grid-template-columns: 1fr; } }
.sim-hero { display: grid; gap: .25rem; align-content: center; padding: 1.1rem 1.3rem; border-radius: var(--radius); border: 1px solid var(--rand); background: var(--kachel); }
.sim-hero.plus { border-color: rgb(52 211 153 / .45); background: linear-gradient(135deg, rgb(52 211 153 / .1), transparent 60%), var(--kachel); }
.sim-hero.minus { border-color: var(--akzent-rand); }
.sim-hero-titel { font-size: .85rem; color: var(--matt); }
.sim-hero-wert { font-size: 2.3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sim-hero.plus .sim-hero-wert { color: var(--gut-fg); }
.sim-hero-info { font-size: .85rem; color: var(--matt); }
.zins-kacheln { align-content: stretch; }
/* Roomier stat tiles (simulation, compound interest, comparison) */
.sim-stats { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)) !important; gap: 12px !important; }
.sim-stats .kachel, .sim-vergleich-kacheln .kachel { padding: .95rem 1.1rem !important; display: grid; gap: .3rem; align-content: start; }
.sim-stats .kachel-titel, .sim-vergleich-kacheln .kachel-titel { font-size: .8rem !important; }
.sim-stats .kachel-wert { font-size: 1.45rem !important; }
.sim-stats .kachel-info, .sim-vergleich-kacheln .kachel-info { font-size: .8rem !important; line-height: 1.45; }
.sim-vergleich-kacheln { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)) !important; gap: 12px !important; }
.sim-uebernehmen { justify-self: start; margin-top: .4rem; }
.kachel-empfohlen .frage { margin-top: .5rem; }

/* Simulation: source bar (account, winrate source, take over) */
.sim-quelle-leiste { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 14px 0 16px; padding: .8rem .95rem; border: 1px solid var(--rand); border-radius: var(--radius); background: linear-gradient(180deg, var(--kachel-hoch), var(--kachel)); }
.leisten-feld { display: grid; gap: .3rem; min-width: 11rem; font-weight: 400; }
.leisten-titel { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--matt); }
.leisten-titel svg { width: 14px; height: 14px; }
.leisten-auswahl { position: relative; display: block; }
.leisten-auswahl::after { content: ""; position: absolute; right: .8rem; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-right: 2px solid var(--matt); border-bottom: 2px solid var(--matt); transform: rotate(45deg); pointer-events: none; }
.leisten-auswahl select { -webkit-appearance: none; appearance: none; width: 100%; font: inherit; font-weight: 600; padding: .55rem 2.2rem .55rem .8rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.leisten-auswahl select:hover { border-color: var(--akzent-rand); }
.leisten-auswahl select:focus-visible { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px rgb(240 138 60 / .2); }
.leisten-knopf { display: inline-flex; align-items: center; gap: .5rem; padding: .58rem 1rem; font: inherit; font-weight: 700; color: var(--akzent); background: var(--akzent-matt); border: 1px solid var(--akzent-rand); border-radius: var(--radius-klein); cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.leisten-knopf svg { width: 16px; height: 16px; transition: transform .4s; }
.leisten-knopf:hover { border-color: var(--akzent); background: rgb(240 138 60 / .2); }
.leisten-knopf:hover svg { transform: rotate(180deg); }
.leisten-knopf:active { transform: translateY(1px); }
.leisten-knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
@media (max-width: 640px) { .leisten-feld { flex: 1 1 100%; } .leisten-knopf { flex: 1 1 100%; justify-content: center; } }

/* Templates on Risk & Disziplin: same bar as the simulation */
.template-zeile.sim-quelle-leiste { margin: 0 0 14px; border-style: solid; }
.template-feld { min-width: 14rem; flex: 1 1 14rem; max-width: 22rem; }
.leisten-knopf:disabled, .leisten-icon:disabled { opacity: .45; cursor: not-allowed; }
.leisten-icon { display: inline-grid; place-items: center; width: 2.45rem; height: 2.45rem; padding: 0; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); cursor: pointer; transition: border-color .15s, color .15s; }
.leisten-icon svg { width: 17px; height: 17px; }
.leisten-icon:hover:not(:disabled) { border-color: var(--akzent); color: var(--akzent); }
.leisten-icon-gefahr:hover:not(:disabled) { border-color: var(--stop-fg); color: var(--stop-fg); }
.leisten-knopf-neu { margin-left: auto; color: var(--fg); background: var(--bg); border-color: var(--rand-hell); }
.leisten-knopf-neu:hover { color: var(--akzent); }
.template-info { flex-basis: 100%; margin: -.2rem 0 0; font-size: .8rem; color: var(--matt); }
.template-info:empty { display: none; }
.template-neu { flex-basis: 100%; display: grid; gap: .7rem; margin-top: .3rem; padding: .9rem 1rem; border: 1px solid var(--akzent-rand); border-radius: var(--radius-klein); background: var(--bg); }
.template-neu[hidden] { display: none; }
.template-neu h3 { margin: 0; font-size: .95rem; }
.template-editor-felder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .8rem 1rem; }
@media (max-width: 640px) { .template-editor-felder { grid-template-columns: 1fr; } .leisten-knopf-neu { margin-left: 0; } }
.template-beschreibung-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.template-werte-zeile { font-size: .88rem; }
.asset-name { display: grid; gap: 1px; }
.asset-anzahl { font-weight: 400; font-size: .75rem; }

/* Asset search (auto-sync accounts) */
.asset-suche { display: grid; gap: .45rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--rand); }
.asset-suche-titel { font-size: .85rem; font-weight: 600; }
.asset-suche-feld { width: 100%; font: inherit; padding: .55rem .8rem; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.asset-suche-feld:focus-visible { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px rgb(240 138 60 / .2); }
.asset-familie:empty { display: none; }
.asset-vorschlaege { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 6px; }
.asset-vorschlag { width: 100%; display: grid; gap: 1px; text-align: left; padding: .45rem .65rem; font: inherit; color: var(--fg); background: var(--kachel); border: 1px solid var(--rand); border-radius: var(--radius-klein); cursor: pointer; transition: border-color .15s; }
.asset-vorschlag:hover:not(:disabled) { border-color: var(--akzent); }
.asset-vorschlag.schon { opacity: .5; cursor: default; }
/* Charts: loss zone below the start line, lightly hatched */
.diagramm-svg .muster-minus { stroke: var(--stop-fg); stroke-width: 1.5; opacity: .22; }
.diagramm-svg .verlustzone { pointer-events: none; }
/* Link from a table row into the journal; the trade it opens is marked */
.tabelle-link { color: var(--akzent); font-weight: 600; white-space: nowrap; text-decoration: none; }
.tabelle-link:hover { text-decoration: underline; }
.diagramm-tabelle .plus { color: var(--gut-fg); }
.diagramm-tabelle .minus { color: var(--stop-fg); }
.tabelle-blaettern { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: .6rem; }
.tabelle-blaettern[hidden] { display: none; }
.tabelle-blaettern .leisten-icon { font-size: 1.2rem; font-weight: 700; }
.trade-tabelle .leer-zeile th, .trade-tabelle .leer-zeile td { border-color: transparent; }
/* Fixed columns: paging does not change the width either */
.trade-tabelle table { table-layout: fixed; width: 100%; }
.trade-tabelle thead th:nth-child(1) { width: 3rem; }
.trade-tabelle thead th:nth-child(2) { width: 8rem; }
.trade-tabelle thead th:nth-child(3) { width: 7rem; }
.trade-tabelle thead th:nth-child(5) { width: 7.5rem; }
.trade-tabelle td, .trade-tabelle th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Journal: bell for linking the same trade on two accounts */
.vk-box { position: relative; display: inline-flex; }
.vk-glocke { position: relative; display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--rand); background: var(--kachel); color: var(--matt); cursor: pointer; transition: color .15s, background .15s, border-color .15s, box-shadow .15s; }
.vk-glocke:not(.aktiv) { opacity: .6; }
.vk-glocke:not(.aktiv):hover { opacity: 1; color: var(--fg); }
.vk-glocke.aktiv { color: var(--akzent); border-color: var(--akzent); background: var(--akzent-matt); box-shadow: 0 0 0 0 rgb(240 138 60 / .55); animation: vk-leuchten 1.8s ease-out infinite; }
.vk-glocke.aktiv svg { animation: vk-wackeln 3.6s ease-in-out infinite; transform-origin: 50% 10%; }
.vk-glocke.aktiv:hover { background: rgb(240 138 60 / .22); }
.vk-zahl { position: absolute; top: -4px; right: -4px; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: var(--akzent); color: var(--akzent-fg); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
@keyframes vk-leuchten { 0% { box-shadow: 0 0 0 0 rgb(240 138 60 / .5); } 70% { box-shadow: 0 0 0 10px rgb(240 138 60 / 0); } 100% { box-shadow: 0 0 0 0 rgb(240 138 60 / 0); } }
@keyframes vk-wackeln { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(14deg); } 88% { transform: rotate(-12deg); } 92% { transform: rotate(8deg); } 96% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .vk-glocke.aktiv, .vk-glocke.aktiv svg { animation: none; } }
.vk-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 35; width: min(34rem, calc(100vw - 32px)); background: var(--kachel); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: 0 16px 40px rgb(0 0 0 / .35); padding: .9rem 1rem 1rem; display: grid; gap: .7rem; }
.vk-panel-kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.vk-panel-kopf h3 { margin: 0; font-size: 1rem; }
.vk-panel > p { margin: 0; }
.vk-vorschlag { border: 1px solid var(--rand); border-left: 3px solid var(--akzent); border-radius: var(--radius-klein); background: var(--bg); padding: .7rem .8rem; display: grid; gap: .6rem; }
.vk-meta { margin: 0; font-size: .8rem; color: var(--matt); }
.vk-setup { color: var(--akzent); font-weight: 700; }
.vk-paar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; }
.vk-gleich { font-size: 1.2rem; font-weight: 800; color: var(--matt); }
.vk-trade { display: grid; gap: .15rem; padding: .5rem .6rem; border-radius: var(--radius-klein); background: var(--kachel); border: 1px solid var(--rand); min-width: 0; }
.vk-konto { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.vk-zeile { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.vk-asset { font-size: 1.05rem; }
.vk-zeit { font-size: .8rem; color: var(--matt); font-variant-numeric: tabular-nums; }
.vk-pnl { font-weight: 800; font-variant-numeric: tabular-nums; }
.vk-pnl.plus { color: var(--gut-fg); }
.vk-pnl.minus { color: var(--stop-fg); }
.vk-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 560px) { .vk-paar { grid-template-columns: 1fr; } .vk-gleich { display: none; } }
/* Trade card: linked to the same trade on another account */
.trade-verknuepft { display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: .8rem; padding: .15rem .55rem; border-radius: 999px; border: 1px solid var(--akzent-rand); background: var(--akzent-matt); }
.trade-verknuepft a { color: var(--akzent); font-weight: 700; }
.trade-trennen { font-size: .75rem; margin-left: .2rem; }

/* Handbook: links to the tool that is explained; contents; jump target */
.handbuch-zu { display: inline-flex; align-items: center; gap: .1rem; padding: .12rem .55rem; border: 1px solid var(--akzent-rand); border-radius: 999px; background: var(--akzent-matt); color: var(--akzent); font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; vertical-align: baseline; }
.handbuch-zu:hover { background: rgb(240 138 60 / .2); text-decoration: none; }
.handbuch-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 0; }
.handbuch-inhalt { margin-bottom: 14px; }
.handbuch-inhalt h2 { margin: 0 0 .5rem; font-size: 1.05rem; }
.handbuch-toc { margin: 0; padding-left: 1.4rem; display: grid; gap: .35rem; columns: 2 18rem; column-gap: 2rem; }
.handbuch-toc > li { break-inside: avoid; font-weight: 700; }
.handbuch-toc > li::marker { color: var(--akzent); }
.handbuch-toc a { color: var(--fg); text-decoration: none; }
.handbuch-toc a:hover { color: var(--akzent); text-decoration: underline; }
.handbuch-toc ul { list-style: none; margin: .25rem 0 .4rem; padding: 0 0 0 .2rem; display: flex; flex-wrap: wrap; gap: .25rem .4rem; font-weight: 400; }
.handbuch-toc ul a { display: inline-block; padding: .1rem .5rem; border: 1px solid var(--rand); border-radius: 999px; font-size: .78rem; color: var(--matt); }
.handbuch-toc ul a:hover { border-color: var(--akzent); color: var(--akzent); text-decoration: none; }
.handbuch-punkte { margin: .2rem 0 .6rem; padding-left: 1.2rem; display: grid; gap: .35rem; }
.sprung-ziel { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: var(--radius-klein); transition: outline-color .6s; }

/* Labels (journal tab and trade cards). Colours: no red — orange is loss. */
.lf-orange { --lf: #f08a3c; } .lf-bernstein { --lf: #e8a33d; } .lf-gelb { --lf: #ecd06a; } .lf-gruen { --lf: #4ade9f; } .lf-tuerkis { --lf: #2dd4bf; }
.lf-blau { --lf: #60a5fa; } .lf-indigo { --lf: #818cf8; } .lf-violett { --lf: #a78bfa; } .lf-rosa { --lf: #f0abfc; } .lf-grau { --lf: #9ca3af; }
.label-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .6rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--lf) 55%, transparent); background: color-mix(in srgb, var(--lf) 12%, transparent); color: var(--lf); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.label-punkt { width: .45rem; height: .45rem; border-radius: 50%; background: var(--lf); flex: none; }
.label-knopf { cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; opacity: .55; filter: saturate(.6); transition: opacity .15s, filter .15s, background .15s; }
.label-knopf:hover { opacity: .9; }
.label-knopf.an { opacity: 1; filter: none; background: color-mix(in srgb, var(--lf) 22%, transparent); }
.labels-karte { display: grid; gap: .8rem; }
.labels-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.labels-kopf h2 { margin: 0; }
.labels-kopf p { margin: .2rem 0 0; }
.labels-leiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.labels-leiste input[type=search] { flex: 1 1 16rem; font: inherit; padding: .5rem .7rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.labels-leiste select { font: inherit; padding: .45rem .5rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.labels-alle { font-size: .88rem; }
.labels-stand { margin: 0; }
.labels-tabelle td, .labels-tabelle th { vertical-align: middle; }
.label-kategorie th, .label-kategorie .label-aktionen { background: rgb(240 138 60 / .07); border-top: 1px solid rgb(240 138 60 / .2); border-bottom: 1px solid rgb(240 138 60 / .2); }
.label-kategorie th { font-weight: 700; padding-top: .7rem; padding-bottom: .5rem; box-shadow: inset 3px 0 0 var(--akzent); }
.label-kategorie .label-kat-name { color: var(--akzent); }
.label-kat-name { margin-right: .5rem; }
.label-badge { display: inline-block; margin-right: .4rem; padding: .05rem .45rem; border-radius: 999px; border: 1px solid var(--rand); font-size: .7rem; font-weight: 600; color: var(--matt); }
.label-badge-coach { border-color: var(--akzent-rand); color: var(--akzent); }
.label-auf { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.label-system { font-size: .7rem; color: var(--matt); border: 1px solid var(--rand); border-radius: 4px; padding: 0 .3rem; }
.label-aktionen { text-align: right; white-space: nowrap; width: 1%; }
.label-aktionen .icon-knopf { margin-left: .2rem; }
.icon-gefahr:hover { color: var(--stop-fg); border-color: var(--stop-fg); }
.label-zeile.auf td { background: rgb(255 255 255 / .02); }
.label-details td { background: rgb(255 255 255 / .02); }
.label-trades { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.label-trades li { display: grid; grid-template-columns: 6.5rem 1fr auto auto; gap: .8rem; align-items: center; font-size: .88rem; }
.label-dialog { width: min(440px, 94vw); padding: 18px; border: 1px solid var(--rand-hell); border-radius: var(--radius); background: var(--kachel); color: var(--fg); box-shadow: 0 24px 60px rgb(0 0 0 / .6); }
.label-dialog::backdrop { background: rgb(0 0 0 / .7); }
.label-dialog-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.label-dialog-kopf h3 { margin: 0; }
.label-felder { display: grid; gap: .8rem; }
.label-feld { display: grid; gap: .35rem; font-size: .88rem; font-weight: 600; }
.label-feld input[type=text], .label-feld select { font: inherit; font-weight: 400; padding: .5rem .65rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); }
.label-dialog-knoepfe { justify-content: flex-end; margin-top: 1rem; }
.farb-wahl { display: flex; flex-wrap: wrap; gap: .45rem; }
.farb-punkt { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid transparent; background: var(--lf); cursor: pointer; box-shadow: inset 0 0 0 2px var(--kachel); }
.farb-punkt.an { border-color: var(--fg); }
.trade-labels .trade-label-liste { display: grid; gap: .35rem; }
.trade-label-reihe { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.trade-label-kat { font-size: .75rem; color: var(--matt); min-width: 6.5rem; }
.trade-label-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
@media (max-width: 600px) { .label-trades li { grid-template-columns: 1fr auto; } }

/* Labels: header row a little highlighted; rules badges; templates */
.labels-tabelle thead th { background: rgb(255 255 255 / .05); color: var(--matt); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--rand-hell); }
.label-regel { font-size: .68rem; padding: 0 .35rem; border-radius: 4px; border: 1px dashed var(--rand-hell); color: var(--matt); }
.label-regeln { display: grid; gap: .4rem; padding: .6rem .7rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); font-size: .88rem; }
.label-regeln-titel { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.vorlagen-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; padding: .6rem .7rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); }
.vorlagen-titel { font-weight: 700; font-size: .9rem; }
.vorlagen-liste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; flex: 1; }
.vorlage { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .3rem .25rem .7rem; border: 1px solid var(--rand); border-radius: 999px; background: var(--kachel); font-size: .85rem; }
.vorlage-labels { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.vorlage-labels .label-chip { font-size: .7rem; padding: .05rem .4rem; }
.vorlage-auswahl { display: grid; gap: .5rem; max-height: 50vh; overflow: auto; font-weight: 400; }
.vorlage-knopf { font: inherit; font-size: .8rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; border: 1px solid var(--akzent-rand); background: var(--akzent-matt); color: var(--akzent); cursor: pointer; }
.vorlage-knopf:hover { background: rgb(240 138 60 / .22); }
.vorlage-knopf.an { border-color: var(--rand); background: none; color: var(--matt); cursor: default; }
.jl-kopf-rechts { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: flex-end; }

/* Journal: the week below — days with their trades, labels and "Setup" on the row */
.jl-wochen-navi { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.jl-wochen-navi h2 { margin: 0; font-size: 1.15rem; }
.jl-woche-summe { margin-left: .4rem; font-size: .92rem; }
.jl-woche-liste { display: grid; gap: 12px; }
.jl-wtag { border: 1px solid var(--rand); border-radius: var(--radius); background: var(--kachel); overflow: hidden; }
.jl-wtag-kopf { width: 100%; border: 0; border-bottom: 1px solid var(--rand); border-radius: 0; background: rgb(255 255 255 / .03); }
.jl-wtag-kopfreihe { display: flex; align-items: stretch; border-bottom: 1px solid var(--rand); background: rgb(255 255 255 / .03); }
.jl-wtag-kopfreihe .jl-wtag-kopf { flex: 1; border-bottom: 0; background: none; }
.jl-wtag-kopfreihe .jl-galerie-knopf { margin: .35rem .6rem .35rem 0; width: 3.4rem; height: 2.2rem; flex: none; align-self: center; }
.jl-wtag-kopfreihe .jl-galerie-zahl { right: 2px; bottom: 2px; font-size: .62rem; min-width: 1rem; }
.jl-trades { display: grid; }
.jl-trade { display: grid; grid-template-columns: 3.4rem minmax(5rem, 8rem) 4.2rem minmax(14rem, auto) 1fr auto auto 2.2rem; align-items: center; gap: .7rem; padding: .55rem .9rem; border-top: 1px solid var(--rand); }
.jl-trade:first-child { border-top: 0; }
.jl-trade:hover { background: rgb(255 255 255 / .02); }
.jl-trade.offen { background: rgb(240 138 60 / .07); }
.jl-trade-zeit { font-variant-numeric: tabular-nums; color: var(--matt); font-size: .85rem; }
.jl-trade-asset { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; font-weight: 700; color: var(--fg); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.jl-trade-asset:hover, .jl-trade:hover .jl-trade-asset { color: var(--akzent); }
.jl-trade:hover { background: rgb(255 255 255 / .035); }
.jl-trade.offen { cursor: default; }
.icon-knopf:disabled { opacity: .35; cursor: default; }
.jl-trade-ergebnis { font-variant-numeric: tabular-nums; text-align: right; }
.jl-trade-ergebnis.plus { color: var(--gut-fg); }
.jl-trade-ergebnis.minus { color: var(--stop-fg); }
.jl-trade-labels { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; min-width: 0; }
.label-mini { font-size: .72rem; padding: .08rem .45rem; }
.jl-label-knopf { font: inherit; font-size: .75rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; border: 1px dashed var(--rand-hell); background: none; color: var(--matt); cursor: pointer; }
.jl-label-knopf:hover, .jl-trade.offen .jl-label-knopf { border-style: solid; border-color: var(--akzent); color: var(--akzent); }
.jl-trade-setup { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border: 1px solid var(--rand); border-radius: 999px; font-size: .8rem; font-weight: 600; cursor: pointer; user-select: none; }
.jl-trade-setup:has(input:checked) { border-color: var(--gut-rand); background: var(--gut-bg); color: var(--gut-fg); }
.jl-trade-setup input { width: 15px; height: 15px; accent-color: var(--gut-fg); margin: 0; }
.jl-trade-link { font-size: .75rem; }
.jl-trade-oeffnen { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--rand); background: var(--bg); color: var(--fg); cursor: pointer; }
.jl-trade-oeffnen:hover { border-color: var(--akzent); color: var(--akzent); }
.jl-trade-auswahl { padding: .6rem .9rem .8rem 4.3rem; background: rgb(240 138 60 / .03); border-top: 1px dashed var(--akzent-rand); }
@media (max-width: 760px) {
  .jl-trade { grid-template-columns: 3rem 1fr auto auto; }
  .jl-trade-labels { grid-column: 1 / -1; order: 5; }
  .jl-trade-setup { order: 6; }
  .jl-trade-oeffnen { order: 7; }
  .jl-trade-auswahl { padding-left: .9rem; }
}

/* Small screenshots in the trade row (max 3) */
.jl-trade-bilder { display: inline-flex; gap: 4px; }
.jl-mini-bild { position: relative; width: 3rem; height: 2rem; padding: 0; border: 1px solid var(--rand-hell); border-radius: 5px; overflow: hidden; background: var(--bg); cursor: zoom-in; }
.jl-mini-bild img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.jl-mini-bild:hover { border-color: var(--akzent); }
.jl-mini-bild:hover img { opacity: 1; }
.jl-mini-mehr { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(0 0 0 / .55); color: #fff; font-size: .72rem; font-weight: 800; }
@media (max-width: 760px) { .jl-trade-bilder { order: 5; } }

/* Short note in the middle of the screen (journal: setup on/off) */
.mitte-hinweis { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 60; display: flex; align-items: center; gap: .7rem; width: min(30rem, calc(100vw - 32px)); padding: .8rem .9rem .8rem 1rem; border-radius: var(--radius); border: 1px solid var(--akzent); background: var(--kachel); box-shadow: 0 20px 50px rgb(0 0 0 / .5); font-size: .92rem; animation: mitte-ein .18s ease-out; }
.mitte-hinweis > span:nth-child(2) { flex: 1; line-height: 1.45; }
.mitte-hinweis-icon { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--gut-bg); color: var(--gut-fg); font-weight: 800; flex: none; }
.mitte-hinweis.verknuepft .mitte-hinweis-icon { background: var(--akzent-matt); }
@keyframes mitte-ein { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .mitte-hinweis { animation: none; } }


/* Day view (journal): header, one row of figures, four tabs — quiet and clear */
.te-neu .te-kopf { align-items: center; }
.te-kopf-rechts { display: flex; align-items: center; gap: .5rem; }
.te-frei { font-size: .8rem; }
.te-frei.an { border-color: var(--akzent); color: var(--akzent); background: var(--akzent-matt); }
.te-zahlen-reihe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--rand); border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.te-zahl { background: var(--bg); padding: .65rem .85rem; display: grid; gap: .15rem; }
.te-zahl span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--matt); }
.te-zahl strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.te-zahl strong.plus { color: var(--gut-fg); }
.te-zahl strong.minus { color: var(--stop-fg); }
.te-tabs { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
.te-tabs .segment-knopf { justify-content: center; }
.te-tab-inhalt { display: grid; gap: 1rem; }
.te-feld { display: grid; gap: .4rem; }
.te-feld-titel { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--matt); }
.te-feld-titel small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.te-text { width: 100%; font: inherit; font-size: .95rem; line-height: 1.55; color: var(--fg); background: var(--bg); padding: .7rem .85rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); resize: vertical; transition: border-color .15s, box-shadow .15s; }
.te-text:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-matt); }
.te-text::placeholder { color: var(--matt); opacity: .75; }
.te-trade-liste { display: grid; gap: 8px; }
.te-trade { border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); overflow: hidden; }
.te-trade.auf { border-color: var(--akzent-rand); }
.te-trade-zeile { width: 100%; display: grid; grid-template-columns: 3.2rem minmax(4rem, 7rem) 4rem minmax(14rem, auto) 1fr 1.2rem; align-items: center; gap: .7rem; padding: .6rem .8rem; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.te-trade-zeile:hover { background: rgb(255 255 255 / .03); }
.te-trade-zeile.auf { background: rgb(240 138 60 / .05); border-bottom: 1px dashed var(--akzent-rand); }
.te-trade-zeit { color: var(--matt); font-size: .85rem; font-variant-numeric: tabular-nums; }
.te-trade-ergebnis { text-align: right; font-variant-numeric: tabular-nums; }
.te-trade-ergebnis.plus { color: var(--gut-fg); }
.te-trade-ergebnis.minus { color: var(--stop-fg); }
.te-trade-labels { display: flex; flex-wrap: wrap; gap: .25rem; min-width: 0; }
.te-trade-pfeil { color: var(--matt); text-align: center; }
.te-trade .trade-karte { border: 0; border-radius: 0; margin: 0; background: none; }
.te-trade-neu { justify-content: flex-end; }
.te-termine { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.te-termin { display: grid; grid-template-columns: 3.2rem 2.8rem 1fr auto; gap: .6rem; align-items: center; padding: .45rem .7rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); font-size: .9rem; }
.te-termin-zeit { font-variant-numeric: tabular-nums; color: var(--matt); }
.te-termin-land { font-weight: 700; font-size: .8rem; }
.te-termin-stufe { font-size: .72rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; }
.te-termin-hoch .te-termin-stufe { color: var(--akzent); background: var(--akzent-matt); }
.te-termin-mittel .te-termin-stufe { color: var(--warn-fg); background: var(--warn-bg); }
.bilder-zaehler { margin-left: auto; }
@media (max-width: 640px) {
  .te-zahlen-reihe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .te-tabs { grid-template-columns: repeat(2, 1fr); }
  .te-trade-zeile { grid-template-columns: 3rem 1fr auto 1.2rem; }
  .te-trade-zeile .rb-seite, .te-trade-labels { display: none; }
}

/* Day view: same size in every tab — the content scrolls, the window does not jump */
.te-neu .te-haupt { height: min(1060px, calc(100vh - 24px)); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.te-neu .te-koerper { flex: 1 1 auto; min-height: 0; overflow: auto; align-content: start; }
.tages-editor.te-neu { width: min(980px, calc(100vw - 24px)); }
/* Day note editor: toolbar + formatted text */
.ne { display: grid; gap: .45rem; }
.ne-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: .3rem .4rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); }
.ne-knopf { min-width: 2rem; height: 2rem; padding: 0 .45rem; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--fg); font: inherit; font-size: .9rem; cursor: pointer; display: inline-grid; place-items: center; }
.ne-knopf:hover { background: rgb(255 255 255 / .06); border-color: var(--rand); }
.ne-knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.ne-groesse { font-weight: 700; font-size: .8rem; }
.ne-groesse.nf-gross { font-size: .92rem; }
.ne-groesse.nf-sehrgross { font-size: 1.02rem; }
.ne-farb-knopf { min-width: 1.7rem; }
.ne-farbe { width: .95rem; height: .95rem; border-radius: 50%; display: block; background: currentColor; }
.ne-farbe-standard { background: var(--fg); }
.ne-trenner { width: 1px; height: 1.2rem; background: var(--rand); margin: 0 .3rem; }
.ne-text { min-height: 16rem; padding: .8rem .95rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--bg); color: var(--fg); font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; transition: border-color .15s, box-shadow .15s; }
.ne-text:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-matt); }
.ne-text.leer::before { content: attr(data-platzhalter); color: var(--matt); opacity: .75; pointer-events: none; }
.ne-text ul, .ne-text ol { margin: .3rem 0; padding-left: 1.4rem; }
.nf-gross { font-size: 1.2em; }
.nf-sehrgross { font-size: 1.5em; font-weight: 700; }
.nf-f-orange { color: #f08a3c; } .nf-f-gruen { color: #4ade9f; } .nf-f-blau { color: #60a5fa; } .nf-f-gelb { color: #ecd06a; } .nf-f-violett { color: #a78bfa; } .nf-f-grau { color: #9ca3af; }

/* Favourites: star in the labels table and the filter button; search in the picker */
.label-stern { width: 1.7rem; height: 1.7rem; margin-right: .4rem; border: 0; background: none; color: var(--matt); font-size: 1.05rem; line-height: 1; cursor: pointer; border-radius: 50%; vertical-align: middle; }
.label-stern:hover { color: var(--akzent); background: var(--akzent-matt); }
.label-stern.an { color: var(--akzent); }
.labels-favoriten.an { border-color: var(--akzent); color: var(--akzent); background: var(--akzent-matt); }
.label-such-zeile { display: grid; gap: .4rem; margin-top: .2rem; }
.label-suche { font: inherit; font-size: .85rem; padding: .4rem .65rem; border: 1px solid var(--rand); border-radius: 999px; background: var(--bg); color: var(--fg); max-width: 22rem; }
.label-suche:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-matt); }
.label-treffer:empty { display: none; }
.label-x { margin-left: .1rem; opacity: .7; }

/* Trade card: the "Setup" switch at the bottom right (like the week list) */
.trade-fuss { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--rand); }
.trade-fuss-text { margin: 0; font-size: .8rem; color: var(--matt); line-height: 1.45; max-width: 46rem; }
.trade-fuss-text strong { color: var(--fg); }

/* Image field: right-click › paste area */
.bild-einfuegen { flex: 1; min-width: 10rem; padding: .45rem .7rem; border: 1px dashed var(--rand-hell); border-radius: var(--radius-klein); color: var(--matt); font-size: .82rem; cursor: context-menu; caret-color: transparent; user-select: none; outline: none; }
.bild-einfuegen:hover, .bild-einfuegen:focus { border-color: var(--akzent); color: var(--fg); background: var(--akzent-matt); }
.bilder-fuss { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* Day view: the opened trade — clean and calm */
.te-trade .trade-karte { padding: .9rem 1rem 1rem; }
.trade-kopf-kompakt { justify-content: flex-end; padding-bottom: .7rem; margin-bottom: .2rem; border-bottom: 1px solid var(--rand); }
.te-trade .trade-koerper { margin-top: .8rem; gap: 1.2rem; }
.te-trade .trade-links { gap: .9rem; }
.te-trade .trade-labels > span:first-child { display: none; }
.te-trade .trade-label-kat { min-width: 5.5rem; }
.te-trade .bilder { border-style: dashed; padding: .6rem; }
.te-trade .bild-einfuegen { border: 0; padding: .35rem .5rem; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.te-trade-r { color: var(--matt); font-size: .8rem; font-variant-numeric: tabular-nums; }
/* Day view: the figures, tabs and content never shrink — the body scrolls instead */
.te-neu .te-koerper { grid-auto-rows: max-content; }

/* Trade result: amount · R · (%) with clear spacing */
.tw { display: inline-flex; align-items: baseline; gap: .7rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tw-betrag { min-width: 6.5rem; text-align: right; }
.tw.plus .tw-betrag { color: var(--gut-fg); }
.tw.minus .tw-betrag { color: var(--stop-fg); }
.tw-r { min-width: 3.4rem; color: var(--fg); font-size: .85rem; font-weight: 600; }
.tw-pz { color: var(--matt); font-size: .82rem; }
.tw.plus .tw-pz { color: color-mix(in srgb, var(--gut-fg) 70%, var(--matt)); }
.tw.minus .tw-pz { color: color-mix(in srgb, var(--stop-fg) 70%, var(--matt)); }

/* Calendar: "Kein Handelstag" = grey crossed-out ✕; week column green / orange like the days */
.mk-x { display: block; text-align: center; font-size: 1.05rem; font-weight: 300; color: var(--matt); opacity: .55; text-decoration: line-through; text-decoration-thickness: 1px; line-height: 1; margin-top: .15rem; }
.mini-kalender td.mk-kein .mk-zelle, .mini-kalender td.mk-kein > a, .mini-kalender td.mk-kein > button { background: rgb(255 255 255 / .015); }
.mini-kalender td.mk-kein .mk-nr { opacity: .6; }
.mini-kalender td.mk-woche.mk-plus .mk-zelle { background: rgb(15 159 110 / .22); border: 1px solid rgb(52 211 153 / .35); }
.mini-kalender td.mk-woche.mk-minus .mk-zelle { background: rgb(232 106 34 / .16); border: 1px solid rgb(232 106 34 / .38); }

/* Setup-only trades (missed): blue rows, so it is clear they do not touch the account */
.jl-trade.nur-setup { background: rgb(96 165 250 / .07); box-shadow: inset 3px 0 0 #60a5fa; }
.jl-trade.nur-setup:hover { background: rgb(96 165 250 / .11); }
.te-trade-zeile.nur-setup { background: rgb(96 165 250 / .07); box-shadow: inset 3px 0 0 #60a5fa; }
.jl-nur-setup { font-size: .7rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; color: #60a5fa; border: 1px solid rgb(96 165 250 / .45); white-space: nowrap; }
/* Week list: the day line — sum (%) R · trades W/L · comment (cut with …) */
.jl-wtag-kopf { display: flex; align-items: center; gap: 1rem; text-align: left; min-width: 0; }
.jl-wtag-kopf .jl-tz-datum { min-width: 7rem; }
.jl-wtag-kopf .jl-tz-trades { white-space: nowrap; color: var(--matt); font-size: .88rem; }
.jl-wtag-kopf .jl-tz-notiz { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-tag .tw-betrag { min-width: 0; }
.jl-trade-notiz { flex: 1 1 8rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--matt); font-size: .85rem; max-width: 32rem; }
.jl-trade-labels { flex-wrap: nowrap; overflow: hidden; }

/* Week list: one fixed grid for the day line and the trade rows — values,
   "+ Labels" and notes stand exactly under each other. The three parts of the
   result (amount, %, R) are grid cells of their own (display: contents). */
.jl-woche-liste { --jl-spalten: 3rem 6.5rem 4.2rem 7.4rem 5.4rem 4.4rem 19rem minmax(0, 1fr); --jl-luecke: .75rem; }
.jl-trade { grid-template-columns: var(--jl-spalten) auto auto; gap: var(--jl-luecke); padding: .5rem .9rem; cursor: pointer; }
.jl-trade .tw, .jl-wtag-kopf .tw { display: contents; }
.jl-trade .tw-betrag, .jl-wtag-kopf .tw-betrag { min-width: 0; text-align: right; white-space: nowrap; }
.jl-trade .tw-pz, .jl-wtag-kopf .tw-pz { white-space: nowrap; }
.jl-trade .tw-r, .jl-wtag-kopf .tw-r { min-width: 0; white-space: nowrap; }
.jl-trade .tw-verpasst .tw-betrag { text-align: right; font-weight: 400; }
.jl-trade-labels { display: flex; align-items: center; gap: .3rem; min-width: 0; overflow: hidden; flex-wrap: nowrap; }
.jl-trade-labels .label-chip { flex: none; }
.jl-trade-notiz { max-width: none; flex: none; }
.jl-wtag-kopf { display: grid !important; grid-template-columns: var(--jl-spalten); gap: var(--jl-luecke); align-items: center; padding: .55rem .9rem; }
.jl-wtag-kopf .jl-tz-datum { grid-column: span 3; min-width: 0; }
.jl-wtag-kopf .jl-tz-trades { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .jl-woche-liste { --jl-spalten: 2.8rem 5.5rem 3.8rem 6.6rem 5rem 4rem 7rem minmax(0, 1fr); --jl-luecke: .5rem; }
}
@media (max-width: 760px) {
  .jl-trade { grid-template-columns: 2.8rem 1fr auto auto; }
  .jl-trade .tw { display: inline-flex; grid-column: 1 / -1; }
  .jl-trade-notiz { display: none; }
  .jl-wtag-kopf { grid-template-columns: 1fr auto; }
  .jl-wtag-kopf .jl-tz-datum { grid-column: auto; }
  .jl-wtag-kopf .tw { display: inline-flex; }
  .jl-wtag-kopf .jl-tz-trades, .jl-wtag-kopf .jl-tz-notiz { display: none; }
}
/* Day view rows: the same fixed columns */
.te-trade-zeile { grid-template-columns: 3rem 6.5rem 4.2rem 7.4rem 5.4rem 4.4rem minmax(0, 1fr) 1.2rem !important; gap: .75rem; }
.te-trade-zeile .tw { display: contents; }
.te-trade-zeile .tw-betrag { text-align: right; white-space: nowrap; }
.te-trade-zeile .tw-pz, .te-trade-zeile .tw-r { white-space: nowrap; }
@media (max-width: 640px) {
  .te-trade-zeile { grid-template-columns: 2.8rem 1fr auto 1.2rem !important; }
  .te-trade-zeile .tw { display: inline-flex; }
}

/* Day view: only if it really does not fit, a thin, quiet scrollbar */
.te-neu .te-koerper { scrollbar-width: thin; scrollbar-color: var(--rand-hell) transparent; }
.te-neu .te-koerper::-webkit-scrollbar { width: 6px; }
.te-neu .te-koerper::-webkit-scrollbar-thumb { background: var(--rand-hell); border-radius: 3px; }
.te-neu .te-koerper::-webkit-scrollbar-track { background: transparent; }

/* Week list: day lines very lightly orange */
.jl-wtag-kopfreihe { background: rgb(240 138 60 / .045); border-bottom-color: rgb(240 138 60 / .16); }
.jl-wtag-kopfreihe .jl-wtag-kopf:hover { background: rgb(240 138 60 / .04); }

/* Setup-only (missed) trade opened in the day view: blue, not orange */
.te-trade.nur-setup { border-color: rgb(96 165 250 / .3); }
.te-trade.nur-setup.auf { border-color: rgb(96 165 250 / .6); }
.te-trade.nur-setup .te-trade-zeile.auf { background: rgb(96 165 250 / .08); border-bottom-color: rgb(96 165 250 / .45); }
.te-trade.nur-setup .trade-kopf-kompakt { border-bottom-color: rgb(96 165 250 / .25); }

/* Image strip: keeps its height while loading (no jumping) */
.bilder { min-height: 3.6rem; }

/* Figures from MetaTrader in an opened synced trade (prices, SL/TP, costs, R …). */
.trade-mt { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .1rem .9rem; margin: 0 0 .9rem; padding: .7rem .8rem;
  background: var(--kachel-hoch); border: 1px solid var(--rand); border-radius: var(--radius-klein); }
.trade-mt-zelle { min-width: 0; padding: .25rem 0; }
.trade-mt dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--matt); margin: 0; }
.trade-mt dd { margin: .1rem 0 0; font-variant-numeric: tabular-nums; font-size: .9rem; overflow-wrap: anywhere; }
.broker-stand p { margin: .25rem 0 0; font-size: .85rem; }
.hinweis-warn { color: var(--warn-fg); }
/* Ø Gewinn/Verlust tile (TradeZella "Avg win/loss"): number left, bar right with both averages under it. */
.kpi-rr .kpi-zeile { align-items: center; gap: 1.1rem; }
.rr-balken-box { flex: 1; min-width: 8rem; }
.rr-balken { display: flex; gap: 3px; height: 9px; }
.rr-balken > span { border-radius: 99px; }
.rr-balken-gewinn { background: var(--gut-fg); flex: none; }
.rr-balken-verlust { flex: 1; background: var(--stop-fg); }
.rr-balken-werte { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 600; margin-top: .35rem; font-variant-numeric: tabular-nums; }
/* Flip switch */
.kipp { position: relative; display: inline-flex; align-items: center; gap: .5rem; margin-top: .55rem; cursor: pointer; user-select: none; font-size: .8rem; color: var(--matt); }
.kipp-eingabe { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kipp-bahn { position: relative; width: 34px; height: 19px; border-radius: 99px; background: var(--rand-hell); transition: background .2s; flex: none; }
.kipp-knopf { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--fg); box-shadow: 0 1px 3px rgb(0 0 0 / .4); transition: transform .2s; }
.kipp-eingabe:checked + .kipp-bahn { background: var(--akzent); }
.kipp-eingabe:checked + .kipp-bahn .kipp-knopf { transform: translateX(15px); }
.kipp-eingabe:focus-visible + .kipp-bahn { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }
.kipp-eingabe:checked ~ .kipp-text { color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .kipp-bahn, .kipp-knopf { transition: none; } }
/* Journal › Ausreißer */
.ar-knopf.aktiv { color: var(--akzent); }
.ar-kopf { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.ar-kopf h2 { margin: 0 0 .3rem; }
.ar-kopf p { margin: 0; max-width: 46rem; }
.ar-schalter { display: inline-flex; gap: .45rem; align-items: center; cursor: pointer; white-space: nowrap; }
.ar-woche { margin-top: 1.1rem; }
.ar-woche h3 { font-size: .95rem; margin: 0 0 .4rem; }
.ar-liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rand); border-radius: var(--radius-klein); }
.ar-zeile + .ar-zeile { border-top: 1px solid var(--rand); }
.ar-zeile label { display: grid; grid-template-columns: auto 8rem minmax(6rem, 1fr) 7rem 5rem auto; gap: .7rem; align-items: center; padding: .55rem .8rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.ar-zeile.raus { opacity: .55; }
.ar-betrag { text-align: right; }
.ar-r { text-align: right; }
@media (max-width: 640px) { .ar-zeile label { grid-template-columns: auto 1fr auto auto; } .ar-markt, .ar-r { display: none; } }
.tw-r-fehlt { color: var(--warn-fg); font-weight: 600; }
.trade-rr-box { border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel-hoch); padding: .75rem .9rem .8rem; margin-bottom: .8rem; }
.trade-rr-titel { margin: 0 0 .55rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--akzent); }
.trade-rr-label { display: block; font-size: .8rem; color: var(--matt); margin-bottom: .3rem; }
.trade-rr-eingabefeld { display: inline-flex; align-items: center; border: 1px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--bg); padding: 0 .7rem 0 .2rem; transition: border-color .15s; }
.trade-rr-eingabefeld:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-matt); }
.trade-rr-eingabefeld.fehlt { border-color: var(--warn-rand); }
.trade-rr-eingabe { width: 5.5rem; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 1.35rem; font-weight: 700; padding: .35rem .5rem; font-variant-numeric: tabular-nums; color: var(--fg); outline: none; }
.trade-rr-einheit { font-weight: 700; color: var(--matt); font-size: 1.05rem; }
.trade-rr-hinweis { margin: .4rem 0 0; font-size: .78rem; }
.rr-gut { color: var(--gut-fg); } .rr-matt { color: var(--matt); } .rr-warn { color: var(--warn-fg); }
.trade-rr-wert { display: flex; gap: .7rem; align-items: baseline; }
.trade-rr-wert strong { font-size: 1.35rem; }
.jl-kopf-links { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.jl-kopf-links h1 { margin: 0; }

/* Journal: gear next to Konto | Setup */
.jl-zahnrad { position: relative; }
.jl-zahnrad > summary { list-style: none; margin: 0; color: var(--matt); }
.jl-zahnrad > summary::-webkit-details-marker { display: none; }
.jl-zahnrad[open] > summary, .jl-zahnrad > summary:hover { color: var(--akzent); border-color: var(--akzent); }
.jl-zahnrad-feld { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 300px; max-width: calc(100vw - 32px); padding: .9rem 1rem; border: 1px solid var(--rand); border-radius: 12px; background: var(--kachel-hoch); box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.jl-zahnrad-feld p { margin: .55rem 0 0; font-size: .8rem; }
.jl-zahnrad-feld .kipp { color: var(--fg); font-size: .88rem; }
/* Journal setup view without trades: a readable explanation */
.jl-setup-leer { max-width: 760px; margin: 1.6rem auto; padding: 1.3rem 1.5rem; border: 1px dashed var(--rand); border-radius: 14px; font-size: 1.02rem; line-height: 1.55; }
.jl-setup-leer h3 { margin: 0 0 .6rem; font-size: 1.2rem; }
.jl-setup-leer p { margin: .45rem 0; }
.jl-rr-fehlt { margin-left: .6rem; font-size: .85rem; }
.tw-rr-knopf { padding: .05rem .45rem; border: 1px solid var(--warn-fg); border-radius: 999px; background: transparent; font: inherit; font-size: .78rem; cursor: pointer; }
.tw-rr-knopf:hover { background: rgba(240, 190, 60, .12); }
/* Outliers by month */
.ar-monat { margin-top: 1.4rem; }
.ar-monat-titel { font-size: 1.08rem; margin: 0 0 .2rem; padding-bottom: .35rem; border-bottom: 1px solid var(--rand); }

/* Dashboard: trade time scatter */
.diagramm-svg .punkt { stroke: var(--bg); stroke-width: 1; opacity: .85; transition: opacity .12s; }
.diagramm-svg .punkt-plus { fill: var(--plus); }
.diagramm-svg .punkt-minus { fill: var(--minus); }
.diagramm-svg .punkt-null { fill: var(--matt); }
.diagramm-svg .punkt:hover, .diagramm-svg .punkt:focus { opacity: 1; stroke: var(--fg); outline: none; }
.ue-zeit-wahl { position: relative; }
.ue-zeit-wahl > summary { list-style: none; margin: 0; color: var(--matt); }
.ue-zeit-wahl > summary::-webkit-details-marker { display: none; }
.ue-zeit-wahl[open] > summary, .ue-zeit-wahl > summary:hover { color: var(--akzent); border-color: var(--akzent); }
.ue-zeit-feld { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; padding: .7rem .85rem; border: 1px solid var(--rand); border-radius: 12px; background: var(--kachel-hoch); box-shadow: 0 12px 32px rgba(0,0,0,.45); display: grid; gap: .45rem; font-size: .88rem; }
.ue-zeit-feld label { display: flex; gap: .5rem; align-items: center; cursor: pointer; }
.ue-kopf-rechts { display: inline-flex; align-items: center; gap: .5rem; }
.ar-nav { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; }
.ar-nav-text { font-weight: 600; font-variant-numeric: tabular-nums; }
/* Trade panel: slides in from the right, full screen on a phone. */
.tp { margin: 0 0 0 auto; padding: 0; width: min(560px, 100vw); height: 100dvh; max-height: 100dvh; max-width: 100vw; border: 0; border-left: 1px solid var(--rand-hell);
  background: var(--kachel); color: var(--fg); box-shadow: -24px 0 60px rgb(0 0 0 / .5); display: none; flex-direction: column; overflow: hidden; }
.tp[open] { display: flex; animation: tp-rein .18s ease-out; }
.tp::backdrop { background: rgb(0 0 0 / .45); }
@keyframes tp-rein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tp[open] { animation: none; } }
.tp-kopf { padding: 1rem 1.1rem .6rem; border-bottom: 1px solid var(--rand); }
.tp-zeile { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.tp-zeile h2 { margin: 0; font-size: 1.2rem; }
.tp-abzeichen { display: inline-flex; gap: .3rem; align-items: center; }
.tp-abzeichen .abzeichen { margin-left: 0; font-size: .74rem; }
.tp-ab-plus { background: var(--gut-bg); color: var(--gut-fg); }
.tp-ab-minus { background: var(--stop-bg); color: var(--stop-fg); }
.tp-zu { margin-left: auto; font-size: 1.3rem; }
.tp-setup { margin: .5rem 0 0; font-size: .9rem; }
.tp-setup .durch { text-decoration: line-through; color: var(--matt); }
.tp-zeiten { margin: .25rem 0 0; font-size: .82rem; }
.tp-netto { margin-top: .75rem; padding: .7rem .9rem; border: 1px solid var(--rand); border-left: 4px solid var(--rand-hell); border-radius: var(--radius-klein); background: var(--kachel-hoch); }
.tp-netto.plus { border-left-color: var(--gut-fg); }
.tp-netto.minus { border-left-color: var(--stop-fg); }
.tp-netto-titel { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--matt); }
.tp-netto > strong { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; margin: .1rem 0 .35rem; }
.tp-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.tp-chip { font-size: .78rem; padding: .15rem .55rem; border: 1px solid var(--rand); border-radius: 999px; color: var(--matt); }
.tp-tabs { margin: .7rem 1.1rem .2rem; display: flex; }
.tp-tabs .segment-knopf { flex: 1; }
.tp-koerper { flex: 1; overflow-y: auto; padding: .8rem 1.1rem 1.2rem; }
.tp-koerper .trade-karte { border: 0; padding: 0; background: none; box-shadow: none; display: flex; flex-direction: column; gap: .9rem; }
.tp-koerper .trade-mt { display: block; padding: .2rem .9rem; }
.tp-koerper .trade-mt-zelle { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .5rem 0; border-bottom: 1px solid var(--rand); }
.tp-koerper .trade-mt-zelle:last-child { border-bottom: 0; }
.tp-koerper .trade-mt dt { font-size: .8rem; text-transform: none; letter-spacing: 0; }
.tp-koerper .trade-mt dd { margin: 0; text-align: right; }
.tp-konto { font-size: .82rem; margin: .4rem 0 0; }
.tp-setup-zeile { display: flex; gap: .7rem; align-items: flex-start; }
.tp-setup-zeile p { margin: 0; }
.tp-koerper .trade-notiz { width: 100%; min-height: 9rem; }
.tp-fuss { padding: .7rem 1.1rem; border-top: 1px solid var(--rand); display: flex; justify-content: flex-start; }
@media (max-width: 600px) { .tp { width: 100vw; border-left: 0; } }
.tf-klickbar { cursor: pointer; }
.tf-klickbar:hover td { background: var(--kachel-hoch); }
.tf-trade-knopf { font-variant-numeric: tabular-nums; }
/* Labels tab of the trade panel */
.lk { display: flex; flex-direction: column; gap: 1.1rem; }
.lk-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--rand); }
.lk-kopf h3 { margin: 0; font-size: 1.05rem; }
.lk-kopf p { margin: .15rem 0 0; }
.lk-verwalten { color: var(--akzent); font-weight: 600; font-size: .86rem; text-decoration: none; white-space: nowrap; padding: .3rem .6rem; border-radius: 8px; }
.lk-verwalten:hover { background: var(--akzent-matt); }
.lk-verwalten-unten { align-self: flex-start; font-weight: 500; color: var(--matt); padding-left: 0; }
.lk-verwalten-unten:hover { background: none; color: var(--fg); }
.lk-kat-kopf { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; cursor: pointer; }
.lk-kat-name { font-weight: 650; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--matt); }
.lk-eins { font-size: .68rem; padding: .05rem .45rem; border-radius: 999px; background: var(--rand); color: var(--matt); }
.lk-box { position: relative; }
.lk-feld { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .4rem 2rem .4rem .45rem; min-height: 2.75rem; cursor: text;
  border: 1px solid var(--rand); border-radius: 12px; background: var(--kachel-hoch); transition: border-color .15s, box-shadow .15s, background .15s; position: relative; }
.lk-feld:hover { border-color: var(--rand-hell); }
.lk-feld.offen, .lk-feld:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-matt); }
.lk-feld.offen { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.lk-suche { flex: 1; min-width: 7rem; border: 0; outline: 0; background: none; color: var(--fg); font: inherit; font-size: .9rem; padding: .25rem .3rem; }
.lk-suche::placeholder { color: var(--matt); }
.lk-pfeil { position: absolute; right: .8rem; top: 50%; width: .45rem; height: .45rem; border-right: 2px solid var(--matt); border-bottom: 2px solid var(--matt); transform: translateY(-70%) rotate(45deg); transition: transform .15s; pointer-events: none; }
.lk-feld.offen .lk-pfeil { transform: translateY(-30%) rotate(-135deg); }
.lk-gewaehlt { background: color-mix(in srgb, var(--lf) 26%, transparent); border-color: color-mix(in srgb, var(--lf) 70%, transparent); color: var(--fg); padding: .2rem .2rem .2rem .55rem; }
.lk-x { border: 0; background: none; color: inherit; font: inherit; font-size: .95rem; line-height: 1; cursor: pointer; width: 1.25rem; height: 1.25rem; display: inline-grid; place-items: center; border-radius: 999px; opacity: .7; }
.lk-x:hover, .lk-x:focus-visible { opacity: 1; background: rgb(255 255 255 / .14); }
.lk-liste { list-style: none; margin: 0; padding: .3rem; max-height: 15rem; overflow-y: auto; border: 1px solid var(--akzent); border-top: 0;
  border-radius: 0 0 12px 12px; background: var(--kachel-hoch); box-shadow: 0 14px 30px rgb(0 0 0 / .35); }
.lk-option { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.lk-option:hover, .lk-option.aktiv { background: rgb(255 255 255 / .06); }
.lk-option.an { color: var(--fg); font-weight: 600; }
.lk-option-name { flex: 1; }
.lk-haken { color: var(--lf); font-weight: 700; width: 1rem; text-align: center; }
.lk-nichts { padding: .55rem .6rem; color: var(--matt); font-size: .88rem; }
.lk .label-knopf.an { outline: 2px solid var(--lf); outline-offset: 1px; }
/* While a window (trade panel, day, gallery …) is open the page behind it does not scroll. */
html:has(dialog:modal) { overflow: hidden; }
html { scrollbar-gutter: stable; }
.tp-koerper, .tages-fenster, .lk-liste { overscroll-behavior: contain; }
/* Setup tab: reached RR, potential, calculator — kept quiet */
.srr { display: flex; flex-direction: column; gap: .75rem; padding: .9rem 1rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--kachel-hoch); }
.srr-label { font-size: .8rem; font-weight: 600; color: var(--matt); }
.srr-kopf { display: flex; flex-direction: column; gap: .35rem; }
.srr-zeile { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.srr-potenzial { color: var(--matt); font-size: .92rem; font-variant-numeric: tabular-nums; }
.srr-hinweis { margin: -.2rem 0 0; font-size: .78rem; color: var(--matt); }
.srr-rechner { display: flex; flex-direction: column; gap: .55rem; padding-top: .75rem; border-top: 1px solid var(--rand); }
.srr-rechner-kopf { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.srr-titel { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--matt); }
.srr-felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.srr-pot { grid-template-columns: 1fr; }
.srr-feld { display: flex; flex-direction: column; gap: .2rem; padding: .45rem .6rem; border: 1px solid var(--rand); border-radius: 10px; background: var(--bg); cursor: text; }
.srr-feld:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-matt); }
.srr-feld-titel { display: flex; align-items: baseline; gap: .4rem; font-size: .72rem; font-weight: 600; color: var(--matt); }
.srr-feld.minus .srr-feld-titel { color: var(--stop-fg); }
.srr-feld.plus .srr-feld-titel { color: var(--gut-fg); }
.srr-info { font-weight: 400; }
.srr-wert { display: flex; align-items: baseline; gap: .35rem; }
.srr-eingabe { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--fg); font: inherit; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0; }
.srr-einheit { font-size: .8rem; color: var(--matt); }
.srr-zurueck { margin-left: auto; font-size: .72rem; font-weight: 500; }
.srr-fuss { display: flex; justify-content: flex-end; }
.srr-ergebnis { font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Trade panel › Notizen */
.tn { display: flex; flex-direction: column; gap: .9rem; }
.tn-umschalter { display: flex; }
.tn-umschalter .segment-knopf { flex: 1; }
.tn .ne-text { min-height: 8rem; }
.tn-tag { display: flex; flex-direction: column; gap: .7rem; }
.tn-tag-kopf { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.tn-tag > p { margin: -.4rem 0 0; }
.tn-sterne { display: inline-flex; gap: .15rem; }
.tn-stern { border: 0; background: none; font-size: 1.45rem; line-height: 1; padding: .1rem; cursor: pointer; color: var(--rand-hell); transition: color .12s, transform .12s; }
.tn-stern.an { color: #f5b942; }
.tn-stern:hover { transform: scale(1.12); }
.tn-sterne:hover .tn-stern { color: #f5b942; }
.tn-sterne .tn-stern:hover ~ .tn-stern { color: var(--rand-hell); }
.bild-zeichnen .bild-oeffnen { cursor: crosshair; }
.bild-zeichnen .zb-rahmen { position: relative; }
.bild-tv { white-space: nowrap; }
.srr-fehler { margin: -.3rem 0 0; font-size: .8rem; color: var(--stop-fg); }
.srr-update { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem .7rem; border: 1px solid var(--warn-fg); border-radius: 10px; background: var(--warn-bg); }
.srr-update p { margin: 0; font-size: .82rem; color: var(--warn-fg); }
