/* Layout: feste Kopfzeile, zentrierte 1240px-Spalte, Karten nur für eigenständige Module (Chart, Scores, Tabellen) */
:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #eaeef7;
  --line: #d8deeb;
  --fg: #111a2e;
  --muted: #5b6680;
  --accent: #1d3fd6;
  --accent-soft: #e2e8ff;
  --brass: #f2b134;
  --up: #0d8a4f;
  --up-soft: #dcf3e7;
  --down: #c8333a;
  --down-soft: #fbe3e4;
  --warn: #b7791f;
  --warn-soft: #fbf0d9;
  --shadow: 0 1px 2px rgba(17, 26, 46, .06), 0 4px 16px rgba(17, 26, 46, .05);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 14px;
  --rec-buy: #5fbf8a;
  --rec-sell: #e57c5a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #121a2e; --surface-2: #1a2440; --line: #26314f; --fg: #e7ecf7; --muted: #95a1bd;
    --accent: #6f8cff; --accent-soft: #1e2a55; --brass: #f2b134; --up: #34c983; --up-soft: #12352a;
    --down: #ff6b72; --down-soft: #3b1a22; --warn: #f0b552; --warn-soft: #3a2c12; --rec-buy: #2f9e68; --rec-sell: #d9694a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #121a2e; --surface-2: #1a2440; --line: #26314f; --fg: #e7ecf7; --muted: #95a1bd;
  --accent: #6f8cff; --accent-soft: #1e2a55; --brass: #f2b134; --up: #34c983; --up-soft: #12352a;
  --down: #ff6b72; --down-soft: #3b1a22; --warn: #f0b552; --warn-soft: #3a2c12; --rec-buy: #2f9e68; --rec-sell: #d9694a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 17px; font-weight: 700; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, td.n, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: .93em; }
.muted { color: var(--muted); }
.up { color: var(--up); } .down { color: var(--down); }

/* Kopfzeile */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 10px 20px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--fg); font: 600 20px var(--f-display); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--accent); font-weight: 800; }
.mainnav { display: flex; gap: 4px; }
.mainnav a { color: var(--muted); font-weight: 600; padding: 7px 12px; border-radius: 9px; }
.mainnav a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.mainnav a.active { color: var(--accent); background: var(--accent-soft); }
.search { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid transparent; border-radius: 11px; padding: 0 12px; color: var(--muted); min-width: 0; }
.search:focus-within { border-color: var(--accent); background: var(--surface); }
.search input { flex: 1; border: 0; background: none; outline: none; padding: 9px 0; min-width: 0; color: var(--fg); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; z-index: 30; }
.sr-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 14px; cursor: pointer; color: var(--fg); }
.sr-item:hover, .sr-item.sel { background: var(--accent-soft); text-decoration: none; }
.sr-item .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item .meta { font-size: 12.5px; color: var(--muted); }
.sr-item .px { text-align: right; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; width: 38px; height: 38px;
  display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.icon-btn:hover { color: var(--fg); }

.build-banner { background: var(--warn-soft); color: var(--fg); text-align: center; padding: 8px 16px; font-size: 14px; }
.build-banner .bar { display: inline-block; vertical-align: middle; width: 160px; height: 6px; border-radius: 3px; background: var(--line); margin: 0 10px; overflow: hidden; }
.build-banner .bar i { display: block; height: 100%; background: var(--warn); }

.app { max-width: 1240px; margin: 0 auto; padding: 28px 20px 60px; min-height: 70vh; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.on { background: var(--brass); border-color: var(--brass); color: #2a1d00; }
.tabs { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 11px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.tabs button.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill.good { background: var(--up-soft); color: var(--up); }
.pill.bad { background: var(--down-soft); color: var(--down); }
.pill.mid { background: var(--warn-soft); color: var(--warn); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.chip { display: inline-block; font: 600 11px var(--f-mono); padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); letter-spacing: .03em; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Startseite */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 18px 0 34px; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 54ch; margin: 16px 0 24px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-search { display: flex; gap: 10px; flex-wrap: wrap; }
.dial { position: relative; aspect-ratio: 1; max-width: 360px; width: 100%; justify-self: center; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.stat { padding: 18px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .v { font: 800 32px var(--f-display); letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 14px; }
.ts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ts-card { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); }
.ts-card:hover { border-color: var(--accent); text-decoration: none; }
.ts-rank { font: 700 13px var(--f-mono); color: var(--muted); width: 22px; }
.ts-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-sub { font-size: 12.5px; color: var(--muted); }
.score-badge { font: 800 17px var(--f-display); min-width: 42px; text-align: center; padding: 4px 8px; border-radius: 9px; }
.strat-cards .card h3 { margin: 6px 0 8px; }
.strat-cards p { color: var(--muted); margin: 0 0 12px; }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--fg); }
th.sorted::after { content: " ▾"; } th.sorted.asc::after { content: " ▴"; }
th.n, td.n { text-align: right; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td .nm { font-weight: 600; color: var(--fg); max-width: 300px; overflow: hidden; text-overflow: ellipsis; display: block; }
td .sym { font-size: 12px; color: var(--muted); font-family: var(--f-mono); }
.star { border: 0; background: none; cursor: pointer; font-size: 17px; color: var(--line); padding: 0 2px; line-height: 1; }
.star.on { color: var(--brass); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; color: var(--muted); }

/* Screener */
.screener { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; align-items: start; }
.filters { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 96px); overflow: auto; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.filters input, .filters select, .field { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 10px; width: 100%; color: var(--fg); }
.range2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { font-size: 13px; padding: 5px 10px; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.check input { width: auto; }

/* Detailseite */
.stock-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.stock-head h1 { font-size: clamp(26px, 4vw, 40px); }
.stock-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); margin-top: 8px; font-size: 14px; }
.price-box { text-align: right; }
.price-box .px { font: 800 34px var(--f-display); letter-spacing: -.02em; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; position: sticky; top: 59px; z-index: 10; background: var(--bg); padding: 8px 0; border-bottom: 1px solid var(--line); }
.subnav a { color: var(--muted); font-weight: 600; padding: 6px 11px; border-radius: 8px; font-size: 14px; }
.subnav a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.chart-box { position: relative; width: 100%; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-hover { position: absolute; pointer-events: none; background: var(--fg); color: var(--bg); padding: 5px 9px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -100%); }
.axis text { fill: var(--muted); font: 11px var(--f-mono); }
.gridline { stroke: var(--line); stroke-width: 1; }
.gauge-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.gauge-card .top { display: flex; justify-content: space-between; width: 100%; align-items: center; gap: 8px; }
.gauge { width: 100%; max-width: 220px; align-self: center; }
.gauge text { font-family: var(--f-display); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; min-width: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.crit td:first-child { white-space: normal; min-width: 200px; }
.crit .rule { font-size: 12.5px; color: var(--muted); white-space: normal; min-width: 180px; }
.pts { font: 700 14px var(--f-mono); display: inline-block; min-width: 32px; text-align: center; padding: 2px 6px; border-radius: 7px; }
.pts.p1 { background: var(--up-soft); color: var(--up); }
.pts.m1 { background: var(--down-soft); color: var(--down); }
.pts.z { background: var(--surface-2); color: var(--muted); }
.fv-row { display: grid; grid-template-columns: minmax(0, 1fr) 2fr auto; gap: 12px; align-items: center; padding: 6px 0; }
.fv-bar { position: relative; height: 10px; background: var(--surface-2); border-radius: 5px; }
.fv-bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 5px; background: var(--accent); }
.fv-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--fg); }
.rating-scale { position: relative; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--up), var(--brass) 50%, var(--down)); margin: 22px 0 6px; }
.rating-scale b { position: absolute; top: -7px; width: 4px; height: 26px; border-radius: 2px; background: var(--fg); transform: translateX(-50%); }
.scale-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.summary-text { color: var(--muted); max-width: 80ch; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cmp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cmp-chip { display: inline-flex; gap: 8px; align-items: center; padding: 5px 6px 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.cmp-chip button { border: 0; background: var(--surface-2); border-radius: 50%; width: 22px; height: 22px; cursor: pointer; color: var(--muted); }
.best { background: var(--up-soft); }
.tooltip { position: fixed; z-index: 50; background: var(--fg); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 13px; max-width: 280px; pointer-events: none; }
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 10px; z-index: 60; font-weight: 600; }

@media (max-width: 980px) {
  .screener { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
  .hero { grid-template-columns: 1fr; }
  .dial { display: none; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .mainnav { order: 3; width: 100%; overflow-x: auto; }
  .search { order: 2; flex-basis: 100%; }
  .app { padding: 20px 16px 50px; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .price-box { text-align: left; }
  .subnav { top: 0; position: static; }
  .fv-row { grid-template-columns: 1fr auto; }
  .fv-row .fv-bar { grid-column: 1 / -1; order: 3; }
}

/* Analysten-Verteilung */
.rec-bar { display: flex; width: 100%; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.rec-bar span { display: flex; align-items: center; justify-content: center; color: #fff; font: 700 12px var(--f-mono); min-width: 2px; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.rec-big { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.rec-big b { font: 800 30px var(--f-display); letter-spacing: -.02em; }
.rec-trend { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; font-size: 13.5px; }
@media (max-width: 720px) {
  #s-own > .grid { grid-template-columns: 1fr !important; }
  .rec-big b { font-size: 24px; }
}

/* Konto & Pro */
.user-box { display: flex; align-items: center; gap: 8px; flex: none; }
.user-box .usage { font: 600 12.5px var(--f-mono); color: var(--muted); white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.avatar:hover { text-decoration: none; filter: brightness(1.05); }
.pro-badge { display: inline-block; font: 800 11.5px var(--f-mono); letter-spacing: .08em; padding: 4px 9px; border-radius: 7px; background: var(--brass); color: #2a1d00; }
.pro-badge:hover { text-decoration: none; }
.btn.pro-btn { background: var(--brass); border-color: var(--brass); color: #2a1d00; }
.btn.pro-btn:hover { color: #2a1d00; filter: brightness(1.06); }
.pro-lock { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center;
  background: linear-gradient(135deg, var(--surface), var(--warn-soft)); }
.pro-lock h3 { margin: 2px 0 4px; }
.pro-lock p { margin: 0; font-size: 14px; }
.pro-lock.compact { grid-template-columns: 1fr; justify-items: start; gap: 10px; }
.lock-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.limit-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 26px; }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; align-items: center; padding: 20px 0; }
.auth-card h2 { font-size: 26px; }
.field-label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.form-err { background: var(--down-soft); color: var(--down); padding: 9px 12px; border-radius: 9px; font-size: 14px; }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.check-list li { padding-left: 28px; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--up); font-weight: 800; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 860px; margin: 0 auto; align-items: stretch; }
.plan-card { display: flex; flex-direction: column; gap: 4px; padding: 26px; }
.plan-card.pro { border: 2px solid var(--brass); }
.plan-price { font: 800 40px var(--f-display); letter-spacing: -.02em; margin-top: 8px; }
.plan-list { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; flex: 1; }
.plan-list li { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: baseline; }
.plan-list li.off { color: var(--muted); }
.plan-list .yes { color: var(--up); font-weight: 800; }
.plan-list .no { color: var(--muted); }
.plan-cta { min-height: 44px; }
.notice { background: var(--surface-2); border-radius: 12px; padding: 12px 16px; margin: 0 auto 18px; max-width: 860px; font-size: 14.5px; }
.notice.good { background: var(--up-soft); color: var(--up); font-weight: 600; }
.notice.bad { background: var(--down-soft); color: var(--down); }
code { font-family: var(--f-mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
@media (max-width: 860px) {
  .auth-wrap, .price-grid { grid-template-columns: 1fr; }
  .auth-side { order: -1; }
  .pro-lock { grid-template-columns: auto minmax(0, 1fr); }
  .pro-lock .pro-btn { grid-column: 1 / -1; justify-self: start; }
  .user-box .usage { display: none; }
}

.search { min-width: 170px; }
@media (max-width: 1120px) { .user-box .usage { display: none; } .topbar-inner { gap: 14px; } .mainnav a { padding: 7px 9px; } }

/* Premium, Kursalarme, Newsletter */
.price-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1180px; }
.plan-card.premium { border: 2px solid var(--accent); }
.pro-badge.premium { background: var(--accent); color: #fff; }
.check-label { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--muted); line-height: 1.45; cursor: pointer; }
.check-label input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.alert-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.alert-form [hidden] { display: none; }
@media (max-width: 980px) { .price-grid.three { grid-template-columns: 1fr; max-width: 560px; } }
@media (max-width: 640px) { .alert-form { grid-template-columns: 1fr; } }

/* Depot, Termine, Jahresabo, Partnerlinks, Sprache */
.dep-form { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.dep-search { position: relative; width: 100%; max-width: none; padding: 0; background: none; border: 0; }
.dep-search .search-results { top: calc(100% + 4px); left: 0; right: 0; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 64px; gap: 12px; align-items: center; padding: 5px 0; font-size: 14px; }
.bar-row .bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.ev-day h3 { margin-bottom: 10px; }
.ev-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ev-row:first-of-type { border-top: 0; }
.ev-row[hidden], .ev-day[hidden] { display: none; }
.ev-bell { margin-left: auto; padding: 4px 10px; }
.interval-tabs { display: inline-flex; margin-top: 16px; }
.save { color: var(--up); font-weight: 700; }
.interval-tabs .save { font-size: 12px; margin-left: 4px; }
.trial-banner { display: inline-block; margin-top: 14px; padding: 8px 14px; border-radius: 99px; background: var(--up-soft); color: var(--up); font-weight: 700; font-size: 14px; }
.broker-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.ad-label { display: inline-block; font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; margin-left: 4px; }
.lang-btn { font: 700 12px var(--f-mono); width: auto; padding: 0 9px; }
@media (max-width: 900px) { .dep-form { grid-template-columns: 1fr 1fr; } .dep-form > :first-child { grid-column: 1 / -1; } }
.dep-search input.field { border: 1px solid var(--line); padding: 7px 10px; background: var(--surface); }

/* Musterdepot, Depot-Check, Planer, Nachrichten */
.grid.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .grid.g2 { grid-template-columns: 1fr; } }
.check-notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.check-notes li { padding: 8px 12px; border-radius: 9px; background: var(--surface-2); font-size: 14px; }
.check-notes li.good { background: var(--up-soft); } .check-notes li.bad { background: var(--down-soft); } .check-notes li.mid { background: var(--warn-soft); }
.plan-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
@media (max-width: 900px) { .plan-form { grid-template-columns: 1fr 1fr; } }
.news-list { display: grid; gap: 4px; }
.news-item { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 6px; border-top: 1px solid var(--line); color: var(--fg); align-items: start; }
.news-item:first-child { border-top: 0; } .news-item:hover { background: var(--surface-2); text-decoration: none; border-radius: 8px; }
.news-t { font-weight: 600; line-height: 1.4; } .news-m { grid-column: 2; font-size: 12.5px; }
table.lb { width: 100%; border-collapse: collapse; font-size: 14px; } table.lb td { padding: 7px 6px; border-top: 1px solid var(--line); }
table.lb tr:first-child td { border-top: 0; } table.lb tr.me td { background: var(--accent-soft); font-weight: 700; }
.mainnav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { white-space: nowrap; }

/* Community, Entdecken, Lernen, KI-Suche */
.vote-bar { height: 10px; border-radius: 5px; background: var(--down-soft); overflow: hidden; margin: 12px 0 4px; }
.vote-bar i { display: block; height: 100%; background: var(--up); }
.comm-list { display: grid; gap: 8px; margin-top: 12px; } .comm { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); line-height: 1.5; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; margin-left: 6px; padding: 0; }
.held-by { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; } .held-by[hidden] { display: none; }
a.tile { color: var(--fg); display: block; } a.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile-ico { font-size: 30px; display: block; margin-bottom: 6px; }
.quiz-q { border: 0; padding: 0; margin: 0 0 14px; } .quiz-o { display: flex; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.quiz-o.right { background: var(--up-soft); } .quiz-o.wrong { background: var(--down-soft); }
.ai-search { margin-bottom: 14px; padding: 12px 14px; }

/* Startseite, Aktien-Match */
.landing { display: grid; gap: 22px; } .land-hero { text-align: center; max-width: 820px; margin: 20px auto 6px; }
.land-hero h1 { font-size: clamp(32px, 5.5vw, 58px); line-height: 1.05; margin: 10px 0 14px; } .land-hero .lead { font-size: 18px; color: var(--muted); }
.hero-cta { justify-content: center; margin: 18px 0 8px; } .btn.big { padding: 12px 20px; font-size: 16px; }
.faq { border-top: 1px solid var(--line); padding: 10px 0; } .faq summary { cursor: pointer; font-weight: 600; } .faq p { margin: 8px 0 0; }
.match-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .match-wrap { grid-template-columns: 1fr; } }
.match-card { touch-action: pan-y; user-select: none; transition: transform .2s ease, opacity .2s ease; cursor: grab; }
.match-card.fly-right { transform: translateX(120%) rotate(12deg); opacity: 0; } .match-card.fly-left { transform: translateX(-120%) rotate(-12deg); opacity: 0; }
.match-btns { justify-content: space-between; } .match-list { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }

/* Duell, Quiz, Geschenk, Ausschluss-Filter */
.duel-picks { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-bottom: 18px; }
.duel-vs { font: 800 22px var(--f-display); color: var(--brass); text-align: center; }
.duel-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.duel-score > div { display: flex; align-items: center; gap: 12px; } .duel-score > div:first-child { justify-content: flex-end; text-align: right; }
.duel-pts { font: 800 46px var(--f-display); } .duel-table td { padding: 10px 12px; } .duel-table td:first-child { text-align: right; width: 38%; }
.duel-cat { text-align: center; color: var(--muted); font-size: 13.5px; width: 24%; } .duel-win { font-weight: 800; color: var(--up); }
.quiz-opts { display: grid; gap: 8px; } .quiz-btn { justify-content: flex-start; text-align: left; white-space: normal; }
.quiz-btn.right { background: var(--up-soft); border-color: var(--up); } .quiz-btn.wrong { background: var(--down-soft); border-color: var(--down); }
.excl { border-top: 1px solid var(--line); padding-top: 10px; } .excl summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.gift-card { text-align: center; border: 2px dashed var(--brass); } .gift-code { font: 800 32px var(--f-mono); letter-spacing: .08em; margin: 14px 0; }
.steps li { margin: 8px 0; }
@media print { .topbar, .footer, .no-print, .build-banner { display: none !important; } .app > .stack:not(.print9) > *:not(.gift-card) { display: none; } }
@media (max-width: 640px) { .duel-picks { grid-template-columns: 1fr; } .duel-pts { font-size: 34px; } }

/* Runde 7 */
.home-extra { margin-bottom: 18px; } .today-idx { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.health-list { display: grid; gap: 10px; } .health-item { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; } .health-light { font-size: 18px; }
.debt-bars { display: grid; gap: 8px; } .debt-bars > div { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.debt-bars .bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; } .debt-bars .bar i { display: block; height: 100%; background: var(--accent); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; margin-top: 6px; }
.lg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.lg-dia { display: inline-block; width: 8px; height: 8px; background: var(--brass); transform: rotate(45deg); margin-right: 6px; vertical-align: middle; }
.donut-wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; } .legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.treemap .tm-l { font: 600 13px var(--f-body, sans-serif); fill: var(--fg); } .treemap .tm-s { font: 12px var(--f-mono); fill: var(--fg); opacity: .8; }
.tilemap-wrap { overflow-x: auto; } .tile-t { font: 600 10px var(--f-mono); fill: var(--fg); pointer-events: none; }
pre.code { background: var(--surface-2); padding: 10px 12px; border-radius: 9px; overflow-x: auto; font: 12.5px/1.5 var(--f-mono); white-space: pre-wrap; word-break: break-all; }
.sheet { max-width: 900px; margin: 0 auto; } .sheet-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 10px; }
.sheet-grid, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 14px 0; } .sheet-foot { font-size: 12px; margin-top: 18px; }
@media (max-width: 700px) { .sheet-grid, .report-grid { grid-template-columns: 1fr; } }
.story { max-width: 460px; margin: 10px auto; display: grid; gap: 14px; } .story-bars { display: flex; gap: 4px; } .story-bars span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); } .story-bars span.on { background: var(--accent); }
.story-card { min-height: 420px; border-radius: 22px; padding: 40px 28px; color: #fff; background: linear-gradient(160deg, #1d3fd6, #0b155c); display: flex; flex-direction: column; justify-content: center; text-align: center; cursor: pointer; }
.story-card h1 { color: #fff; font-size: 34px; margin: 10px 0; } .story-card p { color: rgba(255,255,255,.8); font-size: 17px; } .story-ico { font-size: 64px; }
@media print { .sheet, .sheet * { color: #000 !important; } .sheet .card { box-shadow: none; } }

/* Zeitreise-Spiel */
.tt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
@media (max-width: 760px) { .tt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tt-big { font: 600 22px var(--f-mono); margin: 4px 0 2px; }
.tt-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.tt-event { border-left: 4px solid var(--brass); margin-bottom: 4px; }
.btn.tt-sm { padding: 4px 10px; font-size: 13px; } .tt-act { white-space: nowrap; }
.tt-summary { text-align: center; margin-bottom: 16px; }

/* Pflichtfunktionen */
.legal-links a { white-space: nowrap; }
.consent-wrap { max-width: 720px; margin: 16px auto 0; }
.check-label.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.check-label.consent input { margin-top: 3px; flex: none; }
.shake { animation: shake .4s; border-color: var(--down) !important; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
#privacy-card details { border-top: 1px solid var(--line); padding: 10px 0; }
#privacy-card summary { cursor: pointer; font-weight: 600; }
.btn.danger { background: var(--down); border-color: var(--down); color: #fff; }

/* Runde 9 */
.sponsor9 { display: block; position: relative; padding-top: 22px; text-decoration: none; color: inherit; }
.ad9 { position: absolute; top: 6px; left: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.wa9 { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
body.explain-on dt, body.explain-on td:first-child, body.explain-on .gauge-card h3 { text-decoration: underline dotted var(--accent); text-underline-offset: 3px; cursor: help; }
#xp-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.xp-pop { position: absolute; z-index: 60; max-width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 14px; line-height: 1.5; }
.xp-pop p { margin: 6px 0 0; }
.rt9 { font-size: 12.5px; margin-top: 2px; text-align: right; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.live-dot.on { background: var(--up); animation: pulse9 1.6s infinite; }
@keyframes pulse9 { 50% { opacity: .35; } }
.voice9 { border: 0; background: none; font-size: 18px; cursor: pointer; padding: 0 8px; opacity: .75; }
.voice9.on { opacity: 1; animation: pulse9 1s infinite; }
.coach-log { max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.msg9 { padding: 10px 14px; border-radius: 14px; max-width: 85%; line-height: 1.55; }
.msg9 p { margin: 0 0 8px; } .msg9 p:last-child { margin: 0; } .msg9 ul { margin: 4px 0 8px; padding-left: 20px; }
.msg9.user { align-self: flex-end; background: var(--accent); color: #fff; }
.msg9.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.bar9 { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar9 i { display: block; height: 100%; background: var(--accent); }
.q9 { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.q9 label { display: block; margin: 6px 0; }
.right9 { color: var(--up); font-weight: 600; }
tr.me9 td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tier9 { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tier9.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.prizes9 ul { margin: 6px 0 8px; }
.lines9 { height: 90px; background: repeating-linear-gradient(transparent 0 29px, var(--line) 29px 30px); }
.deep9 h2 { font-size: 20px; margin-bottom: 8px; }
@media print {
  .no-print, header.top, .topbar, footer, #mainnav, .site-header, .site-footer { display: none !important; }
  .deep9 .card, .sheet9, body { box-shadow: none !important; }
  .deep9 .card { break-inside: avoid; border: 1px solid #ccc; }
}
