/* Schrift lokal ausgeliefert (DSGVO: keine Verbindung zu Google) – Manrope, SIL Open Font License */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/static/vendor/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/static/vendor/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* HELIX – Tinte & Messing. Dunkles Blau als Arbeitsfläche, Messing nur für Fokus und Aktion,
   Grün/Rot ausschließlich für Gewinn und Verlust. */
:root {
  --ink-0: #0A1220;      /* Seitengrund */
  --ink-1: #101A2B;      /* Flächen */
  --ink-2: #16233A;      /* erhöhte Flächen, Eingaben */
  --ink-3: #213252;      /* Linien kräftig */
  --line: #1C2A44;       /* Linien fein */
  --text: #E7ECF5;
  --text-2: #A8B3C7;
  --text-3: #6E7C95;
  --brass: #D9AE55;
  --brass-2: #F0CB7E;
  --brass-ink: #2A2110;
  --gain: #3DBE8B;
  --gain-bg: rgba(61, 190, 139, .12);
  --loss: #EC6870;
  --loss-bg: rgba(236, 104, 112, .12);
  --warn: #E9A23B;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;
  --rail: 208px;
  --bench: #7A88A3;
  --bench-2: #4A5875;
  --chart-grid: rgba(110,124,149,.10);
  --glow: rgba(217,174,85,.14);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink-0);
  color: var(--text);
  font: 500 14px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ Shell */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 12px; background: var(--ink-1); border-right: 1px solid var(--line);
}
.rail a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-m);
  text-decoration: none; color: var(--text-2); font-weight: 600; }
.rail a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rail a:hover { background: var(--ink-2); color: var(--text); }
.rail a.active { background: var(--ink-2); color: var(--brass-2); box-shadow: inset 2px 0 0 var(--brass); }
.rail .brand { color: var(--brass); margin-bottom: 18px; font-weight: 800; letter-spacing: .14em; font-size: 15px; }
.rail .brand svg { width: 26px; height: 26px; stroke-width: 2.4; }
.rail .brand:hover { background: none; }
.rail-foot { margin-top: auto; padding: 12px; color: var(--text-3); font-size: 12px; line-height: 1.6; }
.rail-foot strong { color: var(--text-2); font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--text-3); }
.dot.on { background: var(--gain); box-shadow: 0 0 0 3px var(--gain-bg); }
.dot.err { background: var(--loss); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px; background: var(--ink-0);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.topbar-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mode-chip { padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--warn);
  background: rgba(233, 162, 59, .12); border: 1px solid rgba(233, 162, 59, .35); }
#view { padding: 24px 28px 48px; outline: none; }

/* ------------------------------------------------------------ Primitives */
.panel { background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius-l); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-body { padding: 16px 18px; }
.panel-note { color: var(--text-3); font-size: 12.5px; }

.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: var(--radius-m); border: 1px solid transparent; cursor: pointer; font-weight: 700; white-space: nowrap;
  background: var(--ink-2); color: var(--text); }
.btn:hover { background: var(--ink-3); }
.btn.primary { background: var(--brass); color: var(--brass-ink); }
.btn.primary:hover { background: var(--brass-2); }
.btn.ghost { background: transparent; border-color: var(--ink-3); }
.btn.ghost:hover { background: var(--ink-2); }
.btn.danger { color: var(--loss); }
.btn.danger.ghost { border-color: rgba(236, 104, 112, .4); }
.btn.danger.ghost:hover { background: var(--loss-bg); }
.btn.small { height: 30px; padding: 0 11px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: progress; }

label.field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field-inline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
input, select, textarea {
  height: 36px; padding: 0 11px; border-radius: var(--radius-s); border: 1px solid var(--ink-3);
  background: var(--ink-2); color: var(--text); font-weight: 500; min-width: 0; width: 100%;
}
.field-inline select { width: auto; }
input:focus, select:focus { border-color: var(--brass); outline: none; }
input[type="date"] { color-scheme: dark; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--text-3); }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.right { text-align: right; }
details.group { border-top: 1px solid var(--line); padding-top: 12px; }
details.group summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--text-2); list-style: none; display: flex; justify-content: space-between; }
details.group summary::after { content: "+"; color: var(--text-3); }
details.group[open] summary::after { content: "–"; }
details.group[open] summary { margin-bottom: 12px; }

.seg { display: inline-flex; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 3px; gap: 2px; }
.seg button { height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: none; color: var(--text-2); cursor: pointer; font-weight: 700; font-size: 12.5px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--ink-3); color: var(--brass-2); }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { background: none; border: 0; padding: 10px 0; color: var(--text-3); font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-color: var(--brass); }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--ink-2); color: var(--text-2); }
.pill.gain { background: var(--gain-bg); color: var(--gain); }
.pill.loss { background: var(--loss-bg); color: var(--loss); }

/* ------------------------------------------------------------ Tables */
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--text-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--ink-1); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
tr.clickable { cursor: pointer; }
td.num, th.num { text-align: right; }

/* ------------------------------------------------------------ Overview */
.ov-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-bottom: 18px; }
.lead-asset { padding: 22px 24px; display: grid; gap: 8px; position: relative; overflow: hidden; }
.lead-asset .sym { color: var(--text-2); font-weight: 700; }
.lead-asset .price { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--brass-2); }
.lead-asset .chg { font-weight: 700; font-size: 15px; }
.lead-asset .spark-big { height: 120px; margin-top: 6px; }
.ov-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line); }
.ov-stats > div { background: var(--ink-1); padding: 18px 20px; display: grid; align-content: start; gap: 4px; }
.ov-stats .k { color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.ov-stats .v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile { padding: 14px 16px; border-radius: var(--radius-m); background: var(--ink-1); border: 1px solid var(--line); cursor: pointer; display: grid; gap: 2px; text-align: left; }
.tile:hover { border-color: var(--ink-3); }
.tile .t-sym { font-weight: 700; display: flex; justify-content: space-between; }
.tile .t-px { font-size: 18px; font-weight: 800; }
.tile svg { width: 100%; height: 38px; margin-top: 6px; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
.section-title h2 { margin: 0; font-size: 16px; font-weight: 700; }
.section-title a { color: var(--text-3); font-size: 13px; text-decoration: none; font-weight: 600; }
.section-title a:hover { color: var(--brass-2); }

/* ------------------------------------------------------------ Markets */
.mkt { display: grid; grid-template-columns: 260px 1fr; gap: 18px; height: calc(100vh - 66px - 72px); min-height: 560px; }
.watch { display: flex; flex-direction: column; min-height: 0; }
.watch-list { overflow: auto; flex: 1; }
.watch-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.watch-item:hover { background: var(--ink-2); }
.watch-item.on { background: var(--ink-2); box-shadow: inset 2px 0 0 var(--brass); }
.watch-item .w-sym { font-weight: 700; }
.watch-item .w-px { text-align: right; font-weight: 700; }
.watch-item .w-name, .watch-item .w-chg { font-size: 12px; }
.watch-item .w-chg { text-align: right; }
.watch-item .rm { visibility: hidden; background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 0 0 0 6px; }
.watch-item:hover .rm { visibility: visible; }
.watch-add { padding: 12px; border-top: 1px solid var(--line); position: relative; }
.suggest { position: absolute; bottom: 100%; left: 12px; right: 12px; max-height: 260px; overflow: auto; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius-m); z-index: 10; }
.suggest button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; cursor: pointer; }
.suggest button:hover { background: var(--ink-3); }

.chart-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chart-head { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chart-head .big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--brass-2); }
.chart-head .sym { font-size: 17px; font-weight: 800; }
.chart-head .stat { font-size: 12px; color: var(--text-3); display: grid; }
.chart-head .stat b { color: var(--text); font-weight: 700; font-size: 13px; }
.chart-tools { display: flex; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); cursor: pointer; user-select: none; }
.toggle input { width: 14px; height: 14px; accent-color: var(--brass); }
.toggle i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-area { flex: 1; min-height: 300px; position: relative; }
.osc-area { height: 130px; border-top: 1px solid var(--line); position: relative; }
.chart-legend { position: absolute; top: 8px; left: 12px; z-index: 3; font-size: 12px; color: var(--text-2); pointer-events: none; display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------ Backtest */
.bt { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.bt > *, .split > *, .mkt > * { min-width: 0; }
.bt-form { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.bt-form .panel-body { display: grid; gap: 14px; }
.strategy-desc { font-size: 12.5px; color: var(--text-3); margin: -4px 0 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.metrics > div { padding: 13px 16px; display: grid; gap: 2px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.metrics .k { font-size: 12px; color: var(--text-3); font-weight: 600; }
.metrics .v { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.metrics .headline { grid-column: span 2; }
.metrics .headline .v { font-size: 30px; }
.verdict { padding: 12px 16px; border-radius: var(--radius-m); font-size: 13px; font-weight: 600; border: 1px solid; }
.verdict.good { color: var(--gain); background: var(--gain-bg); border-color: rgba(61, 190, 139, .3); }
.verdict.mid { color: var(--warn); background: rgba(233,162,59,.1); border-color: rgba(233,162,59,.3); }
.verdict.bad { color: var(--loss); background: var(--loss-bg); border-color: rgba(236, 104, 112, .3); }
.bt-chart { height: 440px; position: relative; }
.eq-chart { height: 240px; position: relative; }
.empty { padding: 56px 24px; text-align: center; color: var(--text-3); display: grid; gap: 10px; justify-items: center; }
.empty strong { color: var(--text); font-size: 16px; }
.bar-cell { position: relative; }
.bar-cell span { position: relative; z-index: 1; }
.bar-cell::before { content: ""; position: absolute; top: 6px; bottom: 6px; right: 12px; width: var(--w, 0%); border-radius: 3px; background: var(--bar, var(--gain-bg)); }
.progress { height: 3px; background: var(--ink-2); overflow: hidden; border-radius: 2px; }
.progress::after { content: ""; display: block; height: 100%; width: 35%; background: var(--brass); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ------------------------------------------------------------ Strategies / Bots / Accounts */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: stretch; }
.card { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { margin: 0; font-size: 16px; }
.card p { margin: 0; color: var(--text-2); font-size: 13px; }
.card .params { display: flex; flex-wrap: wrap; gap: 6px; }
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.card { height: 100%; }
.split { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.bot-row td:first-child { font-weight: 700; }
.event { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.event:last-child { border: 0; }
.event.error { color: var(--loss); }
.event.success { color: var(--gain); }
.event.warn { color: var(--warn); }
.callout { padding: 12px 14px; border-radius: var(--radius-m); background: var(--ink-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; }

/* ------------------------------------------------------------ Toasts */
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 50; }
.toast { padding: 11px 16px; border-radius: var(--radius-m); background: var(--ink-2); border: 1px solid var(--ink-3); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-weight: 600; max-width: 420px; animation: pop .18s ease-out; }
.toast.error { border-color: rgba(236, 104, 112, .5); color: #FFD2D5; }
.toast.ok { border-color: rgba(61, 190, 139, .5); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1100px) {
  .bt, .split { grid-template-columns: 1fr; }
  .bt-form { position: static; max-height: none; }
  .ov-hero { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  :root { --rail: 64px; }
  .rail a span { display: none; }
  .rail .brand span { display: none; }
  .rail-foot { display: none; }
  .mkt { grid-template-columns: 1fr; height: auto; }
  .watch-list { max-height: 260px; }
  .chart-area { height: 380px; flex: none; }
  #view, .topbar { padding-left: 16px; padding-right: 16px; }
  .field-inline span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

[hidden] { display: none !important; }
details.group summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------------------ Forschung */
.lab-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lab-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--radius-l);
  background: var(--ink-1); border: 1px solid var(--line); cursor: pointer; color: var(--text); }
.lab-card strong { font-size: 16px; }
.lab-card .muted { font-size: 12.5px; line-height: 1.5; }
.lab-card:hover { border-color: var(--ink-3); }
.lab-card.on { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.lab-tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; color: var(--brass-2); }
.signal-panel { padding: 18px 20px; display: grid; gap: 14px; }
.signal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.signal-head h2 { margin: 2px 0 0; font-size: 20px; }
.alloc-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--ink-2); }
.alloc-bar span { min-width: 3px; }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-2); }
.alloc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.alloc-legend b { color: var(--text); font-weight: 700; }
.lab-params > summary { list-style: none; cursor: pointer; border-bottom: 0; }
.lab-params > summary::-webkit-details-marker { display: none; }
.lab-params[open] > summary { border-bottom: 1px solid var(--line); }
.lessons { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
.lessons li::marker { color: var(--brass); font-weight: 700; }
@media (max-width: 1100px) { .lab-pick { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Anmeldung */
.gate-err { margin: 0; min-height: 1em; color: var(--loss); font-size: 13px; font-weight: 600; }
.gate-err:empty { display: none; }

/* ------------------------------------------------------------ Benutzermenü */
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: 99px;
  background: var(--ink-2); border: 1px solid var(--line); cursor: pointer; color: var(--text); font-weight: 700; }
.user-chip:hover { border-color: var(--ink-3); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: var(--brass-ink); font-weight: 800; }
.user-drop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; display: grid; padding: 6px; z-index: 20;
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius-m); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.user-drop a, .user-drop button { text-align: left; padding: 9px 10px; border-radius: 6px; background: none; border: 0; color: var(--text); text-decoration: none; cursor: pointer; font-weight: 600; }
.user-drop a:hover, .user-drop button:hover { background: var(--ink-3); }

/* ------------------------------------------------------------ Portfolio-Bots */
.pf-card { display: grid; gap: 14px; padding: 18px; text-decoration: none; color: var(--text); }
.pf-card:hover { border-color: var(--ink-3); }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pf-stats > div { display: grid; gap: 2px; }
.pf-stats .k { font-size: 12px; color: var(--text-3); font-weight: 600; }
.pf-stats .v { font-size: 18px; font-weight: 800; }
.trial { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.trial-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--ink-2); overflow: hidden; }
.trial-bar span { display: block; height: 100%; background: var(--brass); border-radius: 3px; }
.trial-bar.big { height: 8px; margin-bottom: 16px; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-m); background: var(--ink-2); border: 1px solid var(--line); }
.check i { font-style: normal; width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--ink-3); color: var(--text-3); }
.check.ok i { background: var(--gain-bg); color: var(--gain); }
.check.bad i { background: var(--loss-bg); color: var(--loss); }
.check div { display: grid; gap: 2px; font-size: 13px; }
.check .muted { font-size: 12px; }
@media (max-width: 820px) {
  .pf-stats, .checks { grid-template-columns: 1fr 1fr; }
  .user-name { display: none; }
}
@media (max-width: 1240px) {
  .topbar-tools { flex-wrap: nowrap; gap: 8px; }
  .topbar-tools .field-inline > span, .mode-chip { display: none; }
  .topbar-tools .btn { padding: 0 12px; }
}
@media (max-width: 1000px) { .user-name { display: none; } }

/* ================================================================ v0.4/v0.8: öffentlicher Bereich */
#site { --site-max: 1360px; --gut: clamp(16px, 4vw, 56px); min-height: 100vh; display: flex; flex-direction: column; background: var(--ink-0); }
#site .fine a, #site .sec-lead a, #site .plan-note a, .stat .sd a { color: var(--brass-2); }
.site-head { position: sticky; top: 0; z-index: 30; transition: background-color .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.site-head.scrolled { background: color-mix(in srgb, var(--ink-0) 80%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.site-head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: calc(var(--site-max) + 2 * var(--gut)); margin: 0 auto; padding: 16px var(--gut); }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--brass); text-decoration: none; font-weight: 800; letter-spacing: .14em; font-size: 15px; }
.site-brand svg { width: 28px; height: 28px; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.site-brand:hover svg { transform: rotate(180deg); }
.site-nav { display: flex; gap: 6px; align-items: center; }
.nav-link { position: relative; color: var(--text-2); text-decoration: none; font-weight: 700; font-size: 13.5px; padding: 8px 10px; transition: color .2s; }
.nav-link::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 1.5px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }
.site-main { flex: 1; width: 100%; }
.site-main.narrow { max-width: 820px; margin: 0 auto; padding: 8px var(--gut) 64px; }
.site-foot { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--ink-1) 55%, var(--ink-0)); color: var(--text-3); font-size: 13px; }
.site-foot-in { max-width: calc(var(--site-max) + 2 * var(--gut)); margin: 0 auto; padding: 44px var(--gut) 36px; display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-brand { display: grid; gap: 12px; align-content: start; max-width: 46ch; }
.site-foot nav { display: grid; gap: 9px; align-content: start; }
.site-foot nav b { color: var(--text); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.site-foot a { color: var(--text-2); text-decoration: none; transition: color .2s; }
.site-foot a:hover { color: var(--brass-2); }

/* Abschnitte laufen über die volle Breite, der Inhalt bleibt in --site-max */
.site-sec { position: relative; padding: clamp(56px, 7vw, 104px) max(var(--gut), calc((100% - var(--site-max)) / 2)); border-top: 1px solid var(--line); }
.site-main.narrow .site-sec { padding-inline: 0; }
.band-alt { background: linear-gradient(180deg, color-mix(in srgb, var(--ink-1) 75%, transparent), color-mix(in srgb, var(--ink-1) 25%, transparent)); }
.site-sec h2 { margin: 0 0 18px; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.kicker { margin: 0 0 10px; color: var(--brass-2); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sec-lead { color: var(--text-2); max-width: 68ch; margin: -2px 0 30px; line-height: 1.65; font-size: 15.5px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--brass-2); font-weight: 700; text-decoration: none; margin-bottom: 22px; }
.link-arrow .arr, .btn .arr { width: 16px; height: 16px; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.link-arrow:hover .arr, .btn:hover .arr { transform: translateX(3px); }
.btn.big { height: 48px; padding: 0 22px; font-size: 15px; gap: 8px; display: inline-flex; align-items: center; }
.fine { color: var(--text-3); font-size: 12.5px; line-height: 1.55; margin: 0; }

/* Hero */
.hero { margin-top: -72px; padding-top: calc(72px + clamp(28px, 4vw, 64px)); padding-bottom: clamp(48px, 6vw, 88px); border-top: 0; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero::before { background: radial-gradient(1100px 520px at 78% 8%, var(--glow), transparent 64%), radial-gradient(700px 420px at 4% 96%, color-mix(in srgb, var(--brass) 7%, transparent), transparent 70%); }
.hero::after { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px; opacity: .45; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 35%, #000, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 70% 35%, #000, transparent 75%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 72px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 22px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink-1) 70%, transparent);
  color: var(--text-2); font-size: 12.5px; font-weight: 700; }
.hero h1 { margin: 0; font-size: clamp(40px, 5.4vw, 88px); line-height: 1.0; letter-spacing: -.045em; font-weight: 800; max-width: 12ch; text-wrap: balance; }
.hero .lead { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: var(--text-2); max-width: 50ch; margin: 24px 0 30px; font-weight: 500; }
.hero-cta { gap: 10px; }
.trust-row { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.trust-row li { display: inline-flex; align-items: center; gap: 8px; }
.ico { width: 18px; height: 18px; fill: none; stroke: var(--brass); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hero-chart { margin: 0; position: relative; }
.hero-chart-ph { height: 340px; display: grid; place-items: center; }
.helix-svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.helix-svg .g { stroke: var(--line); stroke-width: 1; }
.helix-svg .gl, .helix-svg .yl { fill: var(--text-3); font-size: 11px; font-weight: 600; }
.helix-svg .yl { text-anchor: middle; }
.helix-svg .ln { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.helix-svg .ln.s { stroke: var(--brass); stroke-width: 2.6; filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--brass) 35%, transparent)); }
.helix-svg .ln.b { stroke: var(--bench); stroke-width: 1.4; }
.helix-svg.mini .ln.s { stroke-width: 2; filter: none; }
.helix-svg .ga { stop-color: var(--brass); stop-opacity: .22; }
.helix-svg .gb { stop-color: var(--brass); stop-opacity: 0; }
.helix-svg .cx { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.helix-svg .cs { fill: var(--brass-2); stroke: var(--ink-0); stroke-width: 2; }
.helix-svg .cb { fill: var(--bench); stroke: var(--ink-0); stroke-width: 2; }
.lc-wrap { position: relative; }
.lc-tip { position: absolute; top: -6px; transform: translateY(-100%); pointer-events: none; display: grid; gap: 2px; padding: 8px 11px; border-radius: 8px;
  background: color-mix(in srgb, var(--ink-2) 92%, transparent); border: 1px solid var(--ink-3); box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); font-size: 12.5px; white-space: nowrap; }
.lc-tip .d { color: var(--text-3); font-weight: 700; font-size: 11.5px; }
.lc-tip .s, .lc-tip .b { display: flex; align-items: center; gap: 7px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lc-tip i { width: 10px; height: 3px; border-radius: 2px; }
.lc-tip .s i { background: var(--brass); }
.lc-tip .b { color: var(--text-2); font-weight: 700; }
.lc-tip .b i { background: var(--bench); }
.lc-empty { padding: 28px 0; }
.hero-chart figcaption { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; font-size: 13.5px; color: var(--text-2); }
.hero-chart .lg::before, .lg-dot { content: ""; display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.hero-chart .lg.s::before, .lg-dot.s { background: var(--brass); }
.hero-chart .lg.b::before, .lg-dot.b { background: var(--bench); height: 2px; }
.lg-dot.b { margin-left: 12px; }
.hero-chart .lg b { color: var(--text); margin-right: 6px; }
.hero-chart .fine { flex-basis: 100%; }

/* Kennzahlen-Band */
.stats-sec { padding-block: clamp(36px, 4vw, 56px); background: color-mix(in srgb, var(--ink-1) 60%, var(--ink-0)); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: grid; gap: 4px; align-content: start; padding: 4px clamp(14px, 2vw, 28px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .sv { font-size: clamp(32px, 3.4vw, 52px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .sv.loss { color: var(--loss); }
.stat .sk { font-weight: 800; font-size: 14px; }
.stat .sd { color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.stats-note { margin-top: 26px; max-width: 90ch; }

/* Live-Bilanz-Vorschau */
.live-teaser { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.live-card { display: grid; gap: 12px; padding: 18px 18px 14px; border-radius: var(--radius-l); background: var(--ink-1); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s; }
.live-card:hover { transform: translateY(-3px); border-color: var(--ink-3); box-shadow: 0 22px 44px -28px var(--glow); }
.lc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lc-head > span:first-child { display: grid; gap: 2px; }
.lc-head small { color: var(--text-3); font-size: 12px; font-weight: 600; }
.lc-ret { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lc-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--text-3); font-size: 12px; font-weight: 600; }

/* Ablauf */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); counter-reset: st; }
.steps li { counter-increment: st; display: grid; gap: 8px; align-content: start; position: relative; padding-top: 48px; }
.steps li::before { content: counter(st); position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--brass); color: var(--brass-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--ink-0); z-index: 1; transition: background-color .3s, color .3s; }
.steps li:hover::before { background: var(--brass); color: var(--brass-ink); }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 16px; left: 44px; right: -18px; height: 1px; background: linear-gradient(90deg, var(--brass), var(--ink-3)); transform-origin: left; transition: transform 1s cubic-bezier(.2,.8,.2,1) .25s; }
.js-motion .steps li:not(.in)::after { transform: scaleX(0); }
.steps b { font-size: 16.5px; }
.steps span { color: var(--text-2); line-height: 1.65; font-size: 14.5px; }
.steps.compact { grid-template-columns: 1fr; gap: 18px; }
.steps.compact li { padding: 0 0 0 46px; }
.steps.compact li::after { display: none; }
.steps a { color: var(--brass-2); }

/* Vorteile */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--radius-l); background: var(--ink-1); border: 1px solid var(--line);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s; }
.feature:hover { transform: translateY(-3px); }
.feature .ico { width: 26px; height: 26px; padding: 8px; box-sizing: content-box; border-radius: 10px; background: color-mix(in srgb, var(--brass) 10%, transparent); }
.feature h3 { margin: 6px 0 0; font-size: 17px; }
.feature p { margin: 0; color: var(--text-2); line-height: 1.6; font-size: 14.5px; }

/* Licht unter dem Zeiger (Karten) */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brass) 70%, transparent), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .35s; }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brass) 7%, transparent), transparent 60%); opacity: 0; transition: opacity .35s; }
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* Jahre */
.years-legend { display: flex; gap: 22px; font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.years-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.years-legend .s::before { background: var(--brass); }
.years-legend .b::before { background: var(--bench-2); }
.years { display: grid; gap: 10px; max-width: 1040px; }
.year { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: center; }
.year .y { font-weight: 800; font-size: 15px; display: grid; }
.year .y small { color: var(--text-3); font-weight: 600; font-size: 11.5px; }
.bars { display: grid; gap: 4px; }
.bar { display: flex; align-items: center; gap: 10px; height: 18px; }
.bar i { display: block; height: 100%; border-radius: 3px; min-width: 2px; width: var(--w); transition: width 1s cubic-bezier(.2,.8,.2,1) calc(var(--i, 0) * 70ms); }
.js-motion .years:not(.in) .bar i { width: 0; }
.bar.s i { background: var(--brass); }
.bar.b i { background: var(--bench-2); height: 12px; }
.bar.neg i { background: var(--loss); }
.bar.b.neg i { background: rgba(236,104,112,.55); }
.bar b { font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; transition: opacity .4s calc(.5s + var(--i, 0) * 70ms); }
.js-motion .years:not(.in) .bar b { opacity: 0; }
.bar.s b { color: var(--text); }
#yearsNote { margin-top: 20px; max-width: 90ch; }

/* Bewertungen */
.rating-sum { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--text-2); font-size: 13px; }
.rating-sum b { font-size: 28px; color: var(--text); letter-spacing: -.02em; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 16px; height: 16px; fill: var(--ink-3); }
.stars svg.on { fill: var(--brass); }
.stars svg.half { fill: url(#none); fill: color-mix(in srgb, var(--brass) 55%, var(--ink-3)); }
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.review { margin: 0; display: grid; gap: 12px; align-content: start; padding: 22px; border-radius: var(--radius-l); background: var(--ink-1); border: 1px solid var(--line); }
.review blockquote { margin: 0; color: var(--text); line-height: 1.6; font-size: 14.5px; }
.review figcaption { display: grid; gap: 2px; font-size: 13px; }
.review figcaption span { color: var(--text-3); font-size: 12px; }
.review-note { margin-top: 22px; max-width: 100ch; }

/* Tarife */
.plan-note { margin: 16px 0 0; color: var(--text-2); font-size: 13px; }
.plan { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
#site .plan:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -32px var(--glow); }

/* Warteliste */
.wait { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.wait .sec-lead { margin-bottom: 0; }
.wait-form { display: grid; gap: 10px; }
.wait-row { display: flex; gap: 8px; }
.wait-row input { height: 48px; font-size: 15px; flex: 1; }
.wait-row .btn { height: 48px; padding: 0 22px; }
.wait-msg { margin: 0; font-weight: 700; font-size: 13.5px; min-height: 1.4em; }

ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 12px; color: var(--text-2); line-height: 1.6; }
ul.plain li::marker { color: var(--brass); }
ol.plain-ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }
.site-sec.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 88px); }
.faq { display: grid; }
.faq details { border-bottom: 1px solid var(--line); padding: 15px 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; transition: color .2s; }
.faq summary:hover { color: var(--brass-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brass); font-weight: 800; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] p { animation: pop .3s ease; }
.faq p { color: var(--text-2); margin: 10px 0 0; line-height: 1.6; }
.faq a, .legal a, .fine a, .check-line a, .callout a { color: var(--brass-2); }

/* Abschluss */
.final-cta { border-top: 0; padding-top: 0; }
.final { text-align: center; display: grid; gap: 14px; justify-items: center; padding: clamp(36px, 5vw, 72px) 24px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(600px 260px at 50% 0%, var(--glow), transparent 70%), var(--ink-1); }
.final h2 { margin: 0; }
.final p { margin: 0 0 8px; color: var(--text-2); max-width: 52ch; }

/* Live-Bilanz-Seite */
.page-head { border-top: 0; padding-bottom: 24px; }
.page-head h1 { margin: 0 0 18px; font-size: clamp(34px, 4.4vw, 64px); letter-spacing: -.04em; line-height: 1.04; }
.rules { display: flex; flex-wrap: wrap; gap: 10px; }
.rules span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--ink-1); color: var(--text-2); font-size: 13px; font-weight: 600; }
#bilanzList { display: grid; gap: 20px; padding-top: 32px; }
.bil { display: grid; gap: 16px; padding: clamp(18px, 2vw, 28px); border-radius: var(--radius-l); background: var(--ink-1); border: 1px solid var(--line); }
.bil-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bil-head h2 { margin: 0 0 4px; font-size: 22px; }
.bil-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.bil-stats > div { background: var(--ink-1); padding: 12px 14px; display: grid; gap: 2px; }
.bil-stats .k { color: var(--text-3); font-size: 12px; font-weight: 600; }
.bil-stats .v { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bil-stats .muted { font-size: 12px; }

/* Anmeldung, Formulare */
.auth-card { width: min(440px, 100%); margin: 24px auto; display: grid; gap: 14px; padding: 30px; border-radius: var(--radius-l);
  background: var(--ink-1); border: 1px solid var(--line); }
.auth-card.wide-card { width: min(600px, 100%); }
.auth-card h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.auth-card > p.muted { margin: -6px 0 6px; }
.auth-card textarea { height: auto; padding: 9px 11px; resize: vertical; }
.check-line { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: 13px; color: var(--text-2); align-items: start; }
.check-line input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brass); }
.radio-set { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.radio-set legend { padding: 0; margin-bottom: 6px; }
.receipt { white-space: pre-wrap; font: 500 12.5px/1.6 ui-monospace, Menlo, Consolas, monospace; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; margin: 0; color: var(--text-2); }

.legal { line-height: 1.7; color: var(--text-2); padding-bottom: 20px; }
.legal h1 { color: var(--text); font-size: 34px; letter-spacing: -.03em; margin: 12px 0 24px; }
.legal h2 { color: var(--text); font-size: 17px; margin: 30px 0 8px; }
.legal p { margin: 0 0 10px; max-width: 72ch; }
.legal .ph { color: var(--warn); font-weight: 700; }
.form-muster { border: 1px dashed var(--ink-3); border-radius: var(--radius-m); padding: 16px 18px; margin-top: 10px; }
.callout.warn { border-color: rgba(233,162,59,.4); color: var(--warn); background: rgba(233,162,59,.08); }
.callout.bad { border-color: rgba(236,104,112,.4); color: #FFD2D5; background: var(--loss-bg); }

/* Einblenden beim Scrollen (nur mit Bewegung; ohne JS oder mit „Bewegung reduzieren“ sofort sichtbar) */
.js-motion .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js-motion .rv.in { opacity: 1; transform: none; }
.js-motion .rv:nth-child(2) { transition-delay: .07s; }
.js-motion .rv:nth-child(3) { transition-delay: .14s; }
.js-motion .rv:nth-child(4) { transition-delay: .21s; }
.js-motion .rv:nth-child(5) { transition-delay: .28s; }
.js-motion .rv:nth-child(6) { transition-delay: .35s; }
.js-motion .feature.rv.in, .js-motion .live-card.rv.in, .js-motion .review.rv.in { transition-delay: 0s; transition-duration: .3s; }

@media (min-width: 1700px) {
  #site { --site-max: 1480px; }
  .hero h1 { font-size: 92px; }
}
@media (max-width: 1100px) {
  .features { grid-template-columns: 1fr 1fr; }
  .bil-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-sec.two, .wait { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2)::after { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 24px 0; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 600px) {
  .steps, .features { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .year { grid-template-columns: 64px 1fr; gap: 10px; }
  .auth-card { padding: 22px; }
  .bil-stats { grid-template-columns: 1fr 1fr; }
  .wait-row { flex-direction: column; }
  .site-foot-in { grid-template-columns: 1fr; gap: 24px; }
  .stat { padding: 0 12px; }
  .stat .sv { font-size: 30px; }
  .hero-cta .btn.big { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 400px) { .hide-xs { display: none; } }
@media print {
  .site-head, .site-foot, #toasts, .receipt + .row { display: none !important; }
  #site, body { background: #fff !important; color: #000 !important; }
  .auth-card { border: 0; background: none; }
  .receipt { color: #000; background: none; }
}

/* ================================================================ v0.4: App */
.rail-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.rail a { position: relative; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brass); color: var(--brass-ink);
  font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.app-foot { display: flex; gap: 18px; flex-wrap: wrap; padding: 18px 28px 26px; border-top: 1px solid var(--line); margin-top: auto; font-size: 12.5px; }
.app-foot a { color: var(--text-3); text-decoration: none; }
.app-foot a:hover { color: var(--brass-2); }
.btn.danger-solid { background: var(--loss); color: #2A0E10; }
.btn.danger-solid:hover { background: #F28A90; }
.lab-pick { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

#modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-back { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink-0) 80%, transparent); }
.modal-card { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px; border-radius: var(--radius-l);
  background: var(--ink-1); border: 1px solid var(--ink-3); box-shadow: 0 30px 90px rgba(0,0,0,.5); animation: pop .16s ease-out; outline: none; }
.modal-card.wide { width: min(640px, 100%); }
.modal-card h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.01em; }
.modal-card p.muted { line-height: 1.6; margin: 0 0 6px; }
.modal-actions { justify-content: flex-end; margin-top: 18px; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.tour-dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--ink-3); }
.tour-dots span.on { background: var(--brass); }
.qr { background: #fff; border-radius: 10px; padding: 10px; width: 220px; margin: 4px auto; }
.qr svg { display: block; width: 100%; height: auto; }
code.secret { display: block; margin-top: 8px; padding: 10px; border-radius: 6px; background: var(--ink-2); font-size: 13px; letter-spacing: .06em; word-break: break-all; color: var(--text); }
code { font-size: 12.5px; }

.switch { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--ink-3); position: relative; cursor: pointer; border: 0; padding: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .15s; }
.switch input:checked { background: var(--brass); }
.switch input:checked::after { transform: translateX(16px); background: var(--brass-ink); }

.grid-acc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.sys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.sys-wide { grid-column: 1 / -1; }
.sys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.sys-grid > div { display: grid; gap: 4px; align-content: start; }
.sys-grid .k { font-size: 12px; color: var(--text-3); font-weight: 600; }
.sys-grid b { font-size: 15px; }
.meter { height: 6px; border-radius: 3px; background: var(--ink-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--gain); }
.meter.hot span { background: var(--warn); }
.drop { display: grid; place-items: center; padding: 26px 16px; border: 1.5px dashed var(--ink-3); border-radius: var(--radius-m); cursor: pointer; text-align: center; color: var(--text-2); }
.drop:hover, .drop.on { border-color: var(--brass); color: var(--text); background: rgba(217,174,85,.05); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--brass); outline-offset: 2px; }
.help { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.help > :nth-child(2) { grid-row: span 2; }
.gloss { margin: 0; display: grid; gap: 4px; }
.gloss dt { font-weight: 800; margin-top: 10px; }
.gloss dt:first-child { margin-top: 0; }
.gloss dd { margin: 0; color: var(--text-2); line-height: 1.55; }
@media (max-width: 1100px) { .grid-acc, .sys, .help { grid-template-columns: 1fr; } .help > :nth-child(2) { grid-row: auto; } }
@media (max-width: 820px) { .badge { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; } .app-foot { padding-left: 16px; } .sys-grid { grid-template-columns: 1fr; } }
.rail .rail-foot a { display: inline; padding: 0; color: var(--text-2); font-weight: 600; }
.rail .rail-foot a:hover { background: none; color: var(--brass-2); }

/* ================================================================ v0.4.1: Designs (nur Farben) */
:root[data-theme="onyx"] {
  --ink-0: #09090A; --ink-1: #121214; --ink-2: #1A1A1D; --ink-3: #2A2A2F; --line: #202024;
  --text: #F3EFE6; --text-2: #BCB5A6; --text-3: #7E786C; --brass: #E4B860; --brass-2: #F5D58F; --brass-ink: #221804;
  --bench: #8A857B; --bench-2: #4D4A44; --chart-grid: rgba(180,170,150,.07); --glow: rgba(228,184,96,.16);
}
:root[data-theme="nord"] {
  --ink-0: #081417; --ink-1: #0E1D21; --ink-2: #14272D; --ink-3: #21414A; --line: #18323A;
  --text: #E3F2F2; --text-2: #A2C3C6; --text-3: #6A8D92; --brass: #4FD1C5; --brass-2: #8EEBE1; --brass-ink: #04211E;
  --gain: #5FD38D; --loss: #F2737B; --bench: #7C9BA1; --bench-2: #3E5C63; --chart-grid: rgba(120,170,175,.09); --glow: rgba(79,209,197,.15);
}
:root[data-theme="amethyst"] {
  --ink-0: #0E0A19; --ink-1: #151026; --ink-2: #1D1634; --ink-3: #2E2550; --line: #231C3E;
  --text: #EEEAF8; --text-2: #B6ADD2; --text-3: #7D7499; --brass: #B794F6; --brass-2: #D7C4FF; --brass-ink: #1C0F35;
  --bench: #8E86A8; --bench-2: #4A4266; --chart-grid: rgba(160,140,210,.09); --glow: rgba(183,148,246,.16);
}
:root[data-theme="glut"] {
  --ink-0: #120C0A; --ink-1: #1A1210; --ink-2: #241915; --ink-3: #3A2A22; --line: #2C1F19;
  --text: #F6EDE7; --text-2: #C9B4A8; --text-3: #8E776A; --brass: #F08A4B; --brass-2: #FFB384; --brass-ink: #2A1104;
  --gain: #4FC48E; --loss: #F2606B; --bench: #9C8679; --bench-2: #574238; --chart-grid: rgba(200,150,120,.08); --glow: rgba(240,138,75,.16);
}
:root[data-theme="papier"] {
  color-scheme: light;
  --ink-0: #F3F5F8; --ink-1: #FFFFFF; --ink-2: #EEF1F5; --ink-3: #D3DAE4; --line: #E2E7EE;
  --text: #0F1828; --text-2: #3C495E; --text-3: #6A778D; --brass: #A8761A; --brass-2: #8A5E0E; --brass-ink: #FFFFFF;
  --gain: #13895A; --gain-bg: rgba(19,137,90,.10); --loss: #C83A45; --loss-bg: rgba(200,58,69,.09); --warn: #B26B00;
  --bench: #8A95A8; --bench-2: #C3CBD8; --chart-grid: rgba(60,80,110,.08); --glow: rgba(168,118,26,.12);
}
:root[data-theme="papier"] .panel, :root[data-theme="papier"] .tile, :root[data-theme="papier"] .lab-card { box-shadow: 0 1px 2px rgba(15,24,40,.05), 0 6px 24px -12px rgba(15,24,40,.12); }
:root[data-theme="papier"] .toast.error { color: var(--loss); }
:root[data-theme="papier"] input[type="date"] { color-scheme: light; }
/* Farbübergang nur während eines Designwechsels (sonst kostet er bei jedem Scrollen/Neuzeichnen Leistung) */
html.theming, html.theming * { transition: background-color .35s ease, border-color .35s ease, color .35s ease !important; }

/* ---------- Moderne Details: Flächen, Licht, Bewegung */
body { background: var(--ink-0); }
.shell::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 520px; pointer-events: none; z-index: 0;
  background: radial-gradient(900px 420px at 85% -120px, var(--glow), transparent 70%); }
.shell { position: relative; }
.shell > * { position: relative; z-index: 1; }
.panel { background: linear-gradient(180deg, color-mix(in srgb, var(--ink-1) 100%, #fff 1.5%), var(--ink-1)); }
.rail a { transition: background-color .2s, color .2s; }
.rail a.active { box-shadow: none; }
.rail a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass);
  animation: railIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes railIn { from { transform: scaleY(.2); opacity: 0; } }
.btn { transition: background-color .18s, transform .12s, box-shadow .2s, border-color .2s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { box-shadow: 0 6px 22px -10px var(--brass); }
.btn.primary:hover { box-shadow: 0 10px 28px -10px var(--brass); }
.tile, .pf-card, .lab-card, .help-topic { transition: transform .22s cubic-bezier(.2,.8,.2,1), border-color .22s, box-shadow .22s; }
.tile:hover, .pf-card:hover, .help-topic:hover { transform: translateY(-2px); border-color: var(--ink-3); box-shadow: 0 14px 34px -22px var(--glow), 0 8px 24px -18px rgba(0,0,0,.5); }

/* Seitenwechsel: ein einziger, kurzer Auftritt */
#view.enter > * { animation: viewIn .45s cubic-bezier(.2,.8,.2,1) both; }
#view.enter > *:nth-child(2) { animation-delay: .05s; }
#view.enter > *:nth-child(3) { animation-delay: .1s; }
#view.enter > *:nth-child(n+4) { animation-delay: .14s; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }

/* Live-Kurse */
.flash-up { animation: flashUp 1s ease-out; }
.flash-down { animation: flashDown 1s ease-out; }
@keyframes flashUp { 0% { color: var(--gain); text-shadow: 0 0 18px var(--gain-bg); } }
@keyframes flashDown { 0% { color: var(--loss); text-shadow: 0 0 18px var(--loss-bg); } }
.live-chip { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 800;
  color: var(--gain); background: var(--gain-bg); }
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-out infinite; }
.live-chip.off { color: var(--text-3); background: var(--ink-2); }
.live-chip.off i { animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* Laufband (Startseite) */
.tape { overflow: hidden; border-block: 1px solid var(--line); margin: 0 0 8px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tape-track { display: flex; gap: 38px; width: max-content; padding: 12px 0; animation: tape 60s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; gap: 10px; align-items: baseline; font-size: 13.5px; white-space: nowrap; }
.tape-item b { font-weight: 800; }
.tape-item .px { color: var(--text-2); font-variant-numeric: tabular-nums; }
@keyframes tape { to { transform: translateX(-50%); } }

/* Design-Auswahl */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-opt { display: grid; gap: 10px; padding: 10px; border-radius: var(--radius-m); border: 1.5px solid var(--line); background: var(--ink-2); cursor: pointer; text-align: left; color: var(--text); font-weight: 700; font-size: 13px; }
.theme-opt:hover { border-color: var(--ink-3); }
.theme-opt.on { border-color: var(--brass); }
.theme-opt .sw { display: flex; height: 44px; border-radius: 7px; overflow: hidden; }
.theme-opt .sw span:nth-child(1) { flex: 3; } .theme-opt .sw span:nth-child(2) { flex: 2; } .theme-opt .sw span:nth-child(3) { flex: 1; }
.acc-wide { grid-column: 1 / -1; }

/* ---------- Forschung (v0.4.1) */
.lab-seg { display: flex; flex-wrap: wrap; width: 100%; padding: 4px; gap: 4px; }
.lab-seg button { flex: 1 1 150px; height: auto; padding: 9px 14px; display: grid; gap: 1px; text-align: left; border-radius: 8px; }
.lab-seg button b { font-size: 14px; color: var(--text); }
.lab-seg button small { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.lab-seg button.on { background: var(--ink-3); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brass) 55%, transparent); }
.lab-seg button.on small { color: var(--brass-2); }
.lab-about { color: var(--text-2); margin: 12px 2px 18px; max-width: 95ch; line-height: 1.6; font-size: 13.5px; }
.lab-top { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2.1fr); gap: 18px; }
.today-body { display: flex; gap: 20px; align-items: center; padding: 18px; flex-wrap: wrap; }
.donut-wrap { position: relative; width: 168px; flex: none; }
.donut { width: 168px; height: 168px; display: block; }
.donut circle { transition: stroke-dasharray .6s ease; }
.donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-c b { font-size: 24px; letter-spacing: -.02em; }
.donut-c span { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.alloc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; flex: 1; min-width: 130px; }
.alloc-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; font-size: 13.5px; }
.alloc-list i { width: 10px; height: 10px; border-radius: 3px; }
.alloc-list span { color: var(--text-2); font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-content: start; }
.kpi { padding: 16px; border-radius: var(--radius-l); background: var(--ink-1); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.kpi .k { font-size: 12.5px; color: var(--text-3); font-weight: 700; }
.kpi .v { font-size: 27px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .v.good { color: var(--brass-2); }
.kpi .vs { display: grid; gap: 4px; }
.kpi .vs span { height: 5px; border-radius: 3px; background: var(--ink-2); overflow: hidden; }
.kpi .vs i { display: block; height: 100%; border-radius: 3px; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.kpi .vs i.s, .kpi-legend i.s, .legend-inline .s::before { background: var(--brass); }
.kpi .vs i.b, .kpi-legend i.b, .legend-inline .b::before { background: var(--bench); }
@keyframes grow { from { transform: scaleX(0); } }
.kpi .hint { font-size: 12px; color: var(--text-3); }
.kpi-legend { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--text-2); }
.kpi-legend i { display: inline-block; width: 10px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--text-2); }
.legend-inline .s::before, .legend-inline .b::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
.legend-inline b { color: var(--text); }
.osc-label { position: absolute; left: 12px; top: 6px; z-index: 3; font-size: 11.5px; color: var(--text-3); font-weight: 600; pointer-events: none; }
.lab-bottom { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
.ybars { width: 100%; height: auto; display: block; }
.ybars .g { stroke: var(--line); } .ybars .zero { stroke: var(--ink-3); }
.ybars .tl { fill: var(--text-3); font-size: 10.5px; text-anchor: end; font-weight: 600; }
.ybars .xl { fill: var(--text-2); font-size: 11px; text-anchor: middle; font-weight: 700; }
.ybars rect.s { fill: var(--brass); } .ybars rect.b { fill: var(--bench-2); }
.ybars rect.neg.s { fill: var(--loss); } .ybars rect.neg.b { fill: color-mix(in srgb, var(--loss) 50%, var(--ink-2)); }
.ybars rect { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; transform-box: fill-box; transform-origin: bottom; }
.ybars rect.neg { transform-origin: top; }
@keyframes rise { from { transform: scaleY(0); } }
.timeline { display: grid; gap: 0; max-height: 360px; overflow: auto; }
.tl-row { display: grid; grid-template-columns: 86px 14px 1fr; gap: 10px; align-items: start; padding: 7px 0; position: relative; }
.tl-row:not(:last-child)::after { content: ""; position: absolute; left: 102px; top: 22px; bottom: -8px; width: 1px; background: var(--ink-3); }
.tl-date { font-size: 12.5px; color: var(--text-3); padding-top: 3px; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brass); margin: 6px 0 0 2px; box-shadow: 0 0 0 3px var(--ink-1); }
.tl-coins { display: flex; flex-wrap: wrap; gap: 5px; }
.coin-chip { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--ink-2); border: 1px solid var(--line); color: var(--text-2); }
.coin-chip b { color: var(--text); }
@media (max-width: 1240px) { .lab-top { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .kpis { grid-template-columns: 1fr 1fr; } .lab-bottom { grid-template-columns: 1fr; } }

/* ---------- Hilfe (v0.4.1) */
.help2 { display: grid; gap: 18px; }
.help-search input { height: 50px; font-size: 16px; padding: 0 18px; border-radius: var(--radius-l); background: var(--ink-1); border: 1px solid var(--line); }
.help-search input:focus { border-color: var(--brass); box-shadow: 0 0 0 4px var(--glow); }
.help-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.help-topic { text-align: left; padding: 16px 18px; border-radius: var(--radius-l); background: var(--ink-1); border: 1px solid var(--line); color: var(--text); cursor: pointer; display: grid; gap: 4px; }
.help-topic b { font-size: 15px; }
.help-topic span { font-size: 12.5px; color: var(--text-3); }
.help-topic.on { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 8%, var(--ink-1)); }
.help-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.help-faq details { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.help-faq details:first-child { border-top: 0; }
.help-faq details:last-child { border-bottom: 0; }
.help-faq details[open] { background: color-mix(in srgb, var(--ink-2) 50%, transparent); }
.help-foot { border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 13px; }
@media (max-width: 1000px) { .help-topics { grid-template-columns: 1fr 1fr; } .help-cols { grid-template-columns: 1fr; } }

/* ---------- Leistung: Bereiche außerhalb des Bildschirms nicht vorab zeichnen */
.lab-bottom, .help-cols, #secLog { content-visibility: auto; contain-intrinsic-size: auto 600px; }
.panel, .tile, .kpi { contain: layout paint; }
.eq-chart, .chart-area, .osc-area { contain: strict; }
.chart-area { contain: size layout paint; }
.tape-track { will-change: transform; }

/* ================================================================ v0.5: Anpassung */
:root[data-density="kompakt"] { font-size: 13px; }
:root[data-density="kompakt"] body { font-size: 13px; }
:root[data-density="kompakt"] #view { padding: 16px 20px 32px; }
:root[data-density="kompakt"] .panel-head { padding: 10px 14px; }
:root[data-density="kompakt"] .panel-body { padding: 12px 14px; }
:root[data-density="kompakt"] td, :root[data-density="kompakt"] th { padding: 6px 10px; }
:root[data-density="kompakt"] .split, :root[data-density="kompakt"] .lab-top, :root[data-density="kompakt"] .lab-bottom, :root[data-density="kompakt"] .stack { gap: 12px; }
:root[data-fontsize="gross"] body { font-size: 15.5px; }
:root[data-fontsize="gross"] .fine, :root[data-fontsize="gross"] .muted { font-size: 14px; }
:root[data-corners="eckig"] { --radius-s: 2px; --radius-m: 3px; --radius-l: 4px; }
:root[data-corners="eckig"] .btn, :root[data-corners="eckig"] .pill, :root[data-corners="eckig"] .user-chip { border-radius: 3px; }
:root[data-motion="aus"] *, :root[data-motion="aus"] *::before, :root[data-motion="aus"] *::after { animation: none !important; transition: none !important; }
:root[data-glow="aus"] .shell::before { display: none; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; margin-top: 16px; }
.opt-grid .seg { width: 100%; }
.opt-grid .seg button { flex: 1; }

/* ================================================================ v0.5: Tarife */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan { display: grid; gap: 14px; align-content: start; padding: 24px; border-radius: var(--radius-l); background: var(--ink-1); border: 1px solid var(--line); position: relative; }
.plan.featured { border-color: color-mix(in srgb, var(--brass) 60%, var(--line)); box-shadow: 0 20px 50px -30px var(--glow); }
.plan h3 { margin: 0; font-size: 18px; }
.plan .price { font-size: 38px; font-weight: 800; letter-spacing: -.03em; }
.plan .price small { font-size: 14px; color: var(--text-3); font-weight: 600; letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--text-2); font-size: 14px; }
.plan li::before { content: "✓"; color: var(--brass); font-weight: 800; margin-right: 10px; }
.plan .tag { position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 800; color: var(--brass-2); }
.plan.current { outline: 2px solid var(--brass); outline-offset: -2px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { text-transform: uppercase; }
.test-note { font-size: 12.5px; color: var(--warn); }
.code-pill { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .04em; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.hide-s{} @media (max-width:600px){.hide-s{display:none}}
.checkout .co-head { display: flex; justify-content: space-between; align-items: center; }
.checkout .co-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checkout .co-line.total { font-size: 16px; border-bottom: 0; }
.checkout .co-line.total b { font-size: 20px; }

/* Rollen-Kennzeichen, Bot-Vorlagen, Besitzer-Hinweis */
.pill.role-premium { background: color-mix(in srgb, var(--brass) 14%, var(--ink-2)); color: var(--brass-2); }
.pill.role-ultra { background: linear-gradient(135deg, var(--brass), var(--brass-2)); color: var(--brass-ink); }
.pill.role-admin { background: var(--ink-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tpl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tpl-card { display: grid; gap: 12px; align-content: start; padding: 18px; }
.tpl-card.off { opacity: .72; }
.tpl-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.tpl-switch input { accent-color: var(--brass); width: 16px; height: 16px; margin: 0; }
.owner-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.owner-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); opacity: .7; }

/* ======================================================= v0.7: Handy-Ansicht */
@media (max-width: 600px) {
  .topbar { position: static; flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; }
  .topbar h1 { font-size: 17px; }
  .topbar-tools { flex-wrap: wrap; justify-content: flex-end; min-width: 0; margin-left: auto; }
  .topbar-tools select { max-width: 140px; }
  #view, .topbar { padding-left: 12px; padding-right: 12px; }
  .seg, .tabs { flex-wrap: wrap; max-width: 100%; }
  .tabs { gap: 0 18px; }
}

/* v0.8: „Bewegung reduzieren“ (System) schaltet auch die Startseiten-Animationen ab */
@media (prefers-reduced-motion: reduce) {
  .js-motion .rv { opacity: 1 !important; transform: none !important; }
  .spot::before, .spot::after { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* v0.8: Raster-Spalten dürfen schmaler als breite Tabellen werden (sonst seitliches Scrollen auf dem Handy) */
.split > *, .sys > *, .grid-acc > *, .help > * { min-width: 0; }
@media (max-width: 1100px) { .bt, .split, .grid-acc, .sys, .help { grid-template-columns: minmax(0, 1fr); } }
.star-pick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick span { font-size: 30px; line-height: 1; color: var(--ink-3); cursor: pointer; transition: color .15s, transform .15s; }
.star-pick label:hover span, .star-pick label:hover ~ label span, .star-pick input:checked ~ span, .star-pick label:has(input:checked) ~ label span { color: var(--brass); }
.star-pick label:hover span { transform: scale(1.12); }
.star-pick input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
.rev-adm { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rev-adm:last-of-type { border-bottom: 0; }
.form-muster p { overflow-wrap: anywhere; }
