/* Derivate-Suche · finanzen invest – Werte aus den Figma-Variablen (Datei „Derivate Suche“, V1.3) */
:root {
  --content-default: #030524;
  --content-subtle: #525469;
  --content-muted: #3d4054;
  --content-info: #2b24ff;
  --content-positive: #0f6b5d;
  --content-negative: #cc0029;
  --content-warning: #9b6019;
  --content-inverse: #ffffff;
  --text-default: #000000;
  --surface-basetint: #fbfcfe;
  --surface-vibrant: #e7fa62; /* Footer-Kante (surface/vibrant) */
  --surface-raised: #ffffff;
  --surface-subtle: #f0f2f7;
  --surface-input: #fbfcfe;
  --border-default: #ced1de;
  --action-primary: #2b24ff;
  --action-secondary: #dee7ff;
  --action-quaternary: #e1e3ed;
  --action-buy: #b4fae6;
  --action-sell: #ffe0e2;
  --blue-900: #090f60;
  --tier-platin: var(--content-subtle); /* Stufen-Tag Platin: content/subtle #525469 */
  --tier-gold: var(--content-warning); /* Stufen-Tag Gold: content/warning #9B6019 */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --card-radius: var(--radius-lg); /* semantic/card-radius: 8 px */
  --shadow-card: 0 16px 25px rgba(160, 175, 190, 0.2);
  --shadow-menu: 0 8px 28px rgba(109, 117, 143, 0.08), 0 2px 12px rgba(109, 117, 143, 0.08);
  --shadow-bar: 0 8px 14px rgba(109, 117, 143, 0.08);
  --shadow-modal: 0 8px 32px rgba(0, 0, 0, 0.15);
  --focus: 0 0 0 3px rgba(43, 36, 255, 0.35);
  --content-width: 1120px;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--content-default);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--surface-basetint); min-height: 100vh; font-size: 16px; line-height: 24px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--content-info); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-md); }

/* ------------------------------------------------------------ Kopfleiste */
.topbar { position: sticky; top: 0; z-index: 30; padding: 16px 16px 0; }
.topbar-inner {
  max-width: 1200px; margin: 0 auto; background: var(--surface-raised); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-bar); padding: 12px 40px; display: flex; align-items: center; gap: 40px;
}
.logo { display: flex; flex-direction: column; gap: 2px; width: 76px; flex: none; padding: 1px 0; }
.logo img { display: block; height: auto; }
.logo img:first-child { width: 76px; }
.logo img:last-child { width: 49px; }
.search { position: relative; flex: 1; min-width: 0; }
.search-field {
  position: relative; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--surface-input); border: 1.5px solid var(--border-default); border-radius: var(--radius-sm);
}
.search-field:focus-within { border-color: var(--content-info); }
/* Fokus-Ring auf dem äußeren Rand des Suchfelds, nicht um das eingerückte <input> */
.search-field input:focus-visible { box-shadow: none; }
.search-field:has(input:focus-visible) { box-shadow: var(--focus); }
.search-field label {
  position: absolute; left: 12px; right: 44px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--content-subtle); font-size: 16px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: top .12s, font-size .12s, transform .12s;
}
.search-field.filled label, .search-field:focus-within label { top: 3px; transform: none; font-size: 10px; line-height: 14px; }
.search-field input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 14px 0 0; height: 40px;
  font-size: 16px; line-height: 22px; color: var(--content-default); text-overflow: ellipsis;
}
/* rein dekorativ: keine Aktion, kein Hover, normaler Mauszeiger, nicht fokussierbar */
.search-icon { width: 24px; height: 24px; flex: none; display: block; pointer-events: none; cursor: default; user-select: none; }
.search-hint { margin: 6px 2px 0; font-size: 12px; line-height: 16px; color: var(--content-subtle); }
.hint-link { border: 0; background: none; padding: 0; color: var(--content-info); font: inherit; text-decoration: underline; cursor: pointer; }
.search-hint.warn { color: var(--content-warning); }

.suggest {
  position: absolute; top: calc(100% + 0px); left: 0; min-width: 320px; max-width: 100%; margin: 0; padding: 8px 0; list-style: none;
  background: var(--surface-raised); border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow-menu);
  max-height: 60vh; overflow: auto; z-index: 40;
}
.suggest li { margin: 0; }
.suggest .opt {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left;
  padding: 12px 16px; font-size: 16px; line-height: 24px; color: var(--content-default);
}
.suggest .opt img { width: 24px; height: 24px; opacity: .8; flex: none; }
.suggest .opt[aria-selected="true"], .suggest .opt:hover { background: var(--surface-subtle); }
.suggest .sep { height: 1px; background: var(--surface-subtle); margin: 4px 16px; }
.suggest .opt .muted { color: var(--content-subtle); }

/* ------------------------------------------------------------ Inhalt */
.content { width: min(var(--content-width), 100% - 32px); margin: 0 auto; padding: 24px 0 40px; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface-raised); border-radius: var(--card-radius); }
.hint-card { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hint-card h1 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 600; }
.hint-card p { margin: 0; max-width: 560px; color: var(--content-subtle); font-size: 16px; line-height: 22px; }

/* Basiswert-Karte */
.ul-card { padding: 16px; display: flex; gap: 24px; align-items: flex-start; }
.ul-values { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ul-name { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; } /* ab 768 px: Kachel, Name, ISIN/WKN in einer Zeile */
.ul-logo {
  width: 28px; height: 28px; flex: none; border: 1px solid var(--border-default); border-radius: var(--radius-md);
  display: grid; place-items: center; font-size: 10px; line-height: 14px; font-weight: 500; overflow: hidden; background: var(--surface-raised);
}
.ul-name h2 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 600; min-width: 0; }
.ul-price-row { display: flex; align-items: center; gap: 24px; min-height: 45px; flex-wrap: wrap; }
.ul-price-col { display: flex; flex-direction: column; gap: 4px; }
/* Kurs in Heimatwährung mit Umrechnungskurs: „371,27 $ (1 € = 1,0850 $)“ – unter dem Kurs, bündig zur Zahl */
.ul-home { margin: 0; font-size: 14px; line-height: 20px; color: var(--content-subtle); white-space: nowrap; }
.ul-price-col.stale .ul-home { padding-left: 32px; }
.ul-price { display: flex; align-items: center; gap: 8px; }
.ul-price strong { font-size: 36px; line-height: 40px; font-weight: 800; color: var(--text-default); white-space: nowrap; }
.ul-price img { width: 24px; height: 24px; }
.ul-change { display: flex; flex-direction: column; }
.ul-change .today { font-size: 12px; line-height: 16px; color: var(--content-subtle); }
.ul-change .vals { display: flex; gap: 12px; }
.ul-change .v { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 16px; line-height: 22px; }
.ul-change .v.pos { color: var(--content-positive); }
.ul-change .v.neg { color: var(--content-negative); }
.trend { width: 16px; height: 16px; display: inline-block; background: currentColor;
  -webkit-mask: url(assets/icon-trending-up.svg) center / contain no-repeat; mask: url(assets/icon-trending-up.svg) center / contain no-repeat; }
.trend.down { transform: scaleY(-1); }
.ul-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.ul-tags-below { display: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-subtle); border-radius: var(--radius-md);
  padding: 4px 8px; font-size: 14px; line-height: 20px; }
.tag button { border: 0; background: none; padding: 0; width: 16px; height: 16px; display: grid; place-items: center; }
.tag button img { width: 16px; height: 16px; }
.ul-chart { width: 480px; flex: none; display: flex; flex-direction: column; gap: 8px; }
.ranges { display: flex; gap: 16px; flex-wrap: wrap; }
.ranges button { border: 0; background: none; padding: 2px 8px; border-radius: var(--radius-md); font-size: 14px; line-height: 20px; color: var(--content-subtle); }
.ranges button[aria-pressed="true"] { background: var(--action-secondary); color: var(--action-primary); font-weight: 500; }
.ranges button[aria-disabled="true"] { cursor: default; }
.chart-box { position: relative; height: 172px; border-radius: var(--radius-lg); display: grid; place-items: center; text-align: center;
  color: var(--content-subtle); font-size: 12px; line-height: 16px; }
.chart-box.loading { opacity: .55; }
.chart-empty { padding: 16px; }
.chart-svg { display: block; width: 100%; height: 172px; touch-action: pan-y; }
.chart-svg:focus-visible { box-shadow: var(--focus); }
.chart-line { fill: none; stroke: var(--content-info); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--content-info); fill-opacity: .08; stroke: none; }
.chart-grid { stroke: var(--action-quaternary); stroke-width: 1; }
.chart-prev { stroke: var(--content-subtle); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-axis { fill: var(--content-subtle); font-size: 11px; font-family: inherit; }
.chart-cross { stroke: var(--content-subtle); stroke-width: 1; }
.chart-dot { fill: var(--content-info); stroke: var(--surface-raised); stroke-width: 2; }
.chart-tip { position: absolute; top: 4px; transform: translateX(-50%); pointer-events: none; display: flex; flex-direction: column; align-items: center;
  padding: 4px 8px; border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: var(--shadow-menu); white-space: nowrap; }
.chart-tip strong { font-size: 14px; line-height: 20px; color: var(--content-default); }
.chart-tip span { font-size: 12px; line-height: 16px; color: var(--content-subtle); }
.chart-tip[hidden] { display: none; }
.chart-note { margin: 0; min-height: 16px; }
.ul-card.no-quote { padding-bottom: 16px; }

/* Ergebnisse */
.results { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.results-title { margin: 0; font-size: 20px; line-height: 24px; font-weight: 600; }
/* Results Bar (Figma 206:6874): Titel links, Feedback-Link (Tertiary) rechts */
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-top: 8px; }
.feedback-link { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; border-radius: var(--radius-md); color: var(--action-primary);
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; }
.feedback-link:hover { text-decoration: underline; }
.feedback-link img { width: 24px; height: 24px; flex: none; }
.tabs { display: flex; gap: 16px; flex-wrap: wrap; }
.tabs button { height: 36px; border: 0; border-bottom: 2px solid transparent; background: none; padding: 0; font-size: 14px; line-height: 20px;
  font-weight: 500; color: var(--content-subtle); border-radius: 0; }
.tabs button[aria-selected="true"] { color: var(--content-default); border-bottom-color: var(--content-default); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.toggle { display: inline-flex; align-items: center; border: 1px solid var(--border-default); border-radius: var(--radius-pill); height: 36px; }
.toggle button { height: 34px; border: 0; background: none; padding: 0 16px; border-radius: var(--radius-pill); font-size: 14px; line-height: 20px; color: var(--content-muted); }
.toggle button[aria-pressed="true"] { background: var(--action-secondary); color: var(--action-primary); font-weight: 500; cursor: default; }
.pill { height: 36px; display: inline-flex; align-items: center; gap: 4px; padding: 0 16px; border: 1.5px solid var(--border-default);
  border-radius: var(--radius-pill); background: transparent; font-size: 14px; line-height: 20px; color: var(--content-muted); white-space: nowrap; }
.pill img { width: 16px; height: 16px; }
.pill[aria-expanded="true"] { border-color: var(--content-default); }
.pill.active { background: var(--blue-900); border-color: var(--blue-900); color: var(--content-inverse); gap: 8px; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--content-inverse); color: var(--blue-900);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; font-weight: 600; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-radius: var(--radius-pill);
  background: var(--action-secondary); color: var(--action-primary); font-size: 14px; line-height: 20px; }
.chip button { border: 0; background: none; color: inherit; width: 20px; height: 20px; margin-right: -6px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; line-height: 1; padding: 0; }
.chip button:hover { background: rgba(43, 36, 255, .12); }

.list { display: flex; flex-direction: column; gap: 16px; }
.empty { padding: 32px 24px; text-align: center; color: var(--content-subtle); background: var(--surface-raised); border-radius: var(--card-radius); }
.empty p { margin: 0; }
.empty-feedback { margin-top: 8px !important; font-size: 14px; line-height: 20px; }
.empty-feedback a { color: var(--action-primary); }
.loading { opacity: .55; transition: opacity .15s; }

/* Ergebniskarte (Product Card · V1.3) */
.label-xs { font-size: 12px; line-height: 16px; color: var(--content-subtle); } /* Design System: label-xs */
.pcard { container-type: inline-size; background: var(--surface-raised); border-radius: var(--card-radius); box-shadow: var(--shadow-card); }
.pc { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.pc-top { display: flex; margin-bottom: -8px; } /* Trefferquote links oben */
.pc-head { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; min-width: 0; }
.pc-head > * { white-space: nowrap; }
.pc-isin { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; }
.pc-isin button { border: 0; background: none; padding: 0; width: 20px; height: 20px; display: grid; place-items: center; }
.pc-spacer { width: 10px; flex: none; }
.pc-q { font-size: 14px; line-height: 20px; display: inline-flex; gap: 4px; }
.pc-q .l { color: var(--content-subtle); }
.pc-time { color: var(--content-subtle); }
.pc-src { font-size: 12px; line-height: 16px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--action-secondary); color: var(--action-primary); }
.pc-score { font-size: 12px; line-height: 16px; padding: 2px 8px; border-radius: var(--radius-sm);
  background: var(--surface-subtle); color: var(--content-muted); }
.pc-main { display: flex; align-items: center; gap: 24px; }
.pc-attrs { flex: 1; min-width: 0; display: flex; gap: 24px; }
.pc-attr { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pc-attr .l { font-size: 12px; line-height: 16px; color: var(--content-subtle); }
.pc-attr .v { font-size: 16px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-actions { display: flex; align-items: center; gap: 8px; flex: none; padding-top: 10px; } /* Platz für das Stufen-Tag oben am Banner */
.kv { width: 44px; height: 44px; border-radius: var(--radius-lg); display: grid; place-items: center; font-size: 18px; line-height: 25px; font-weight: 500; }
.kv:hover { text-decoration: none; filter: brightness(.97); }
.kv.k { background: var(--action-buy); color: var(--content-positive); }
.kv.v { background: var(--action-sell); color: var(--content-negative); }
/* Gebühren-Banner: Stufen-Tag auf dem oberen Rand, „ab 0 €“, Info-Icon mit Tooltip */
/* Order Price Badge V1.3 (Figma 200:6354): 120 px, Stufe mittig auf der Oberkante, Preis mittig (Polster oben 8 px), Info oben rechts */
.fee { position: relative; width: 120px; height: 44px; padding: 8px 4px 0; border: 1.5px solid var(--content-info); border-radius: var(--radius-md);
  display: flex; justify-content: center; align-items: baseline; gap: 4px; white-space: nowrap; }
.fee small { font-size: 10px; line-height: 14px; color: var(--content-subtle); }
.fee span.p { font-size: 16px; line-height: 24px; }
.tier { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); padding: 2px 4px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 16px; }
.tier.platin { background: var(--tier-platin); color: var(--content-inverse); }
.tier.gold { background: var(--tier-gold); color: var(--content-inverse); }
.fee-info { position: absolute; top: 1px; right: 1px; display: inline-flex; }
.fee-info-btn { border: 0; background: none; padding: 0; width: 20px; height: 20px; display: grid; place-items: center; border-radius: var(--radius-pill); }
.fee-info-btn img { width: 16px; height: 16px; }
.fee-tip { display: none; position: absolute; right: -10px; bottom: calc(100% + 10px); z-index: 30; width: 264px; padding: 8px 12px;
  white-space: normal; text-align: left; font-size: 12px; line-height: 16px; color: var(--content-inverse); background: var(--content-default);
  border-radius: var(--radius-md); box-shadow: var(--shadow-menu); }
.fee-info:hover .fee-tip, .fee-info:focus-within .fee-tip, .fee-info.open .fee-tip { display: block; }
/* Risikohinweis: einmal über der ersten Karte (Design System: body-sm-strong) */
.body-sm-strong { font-size: 14px; line-height: 20px; font-weight: 600; }
.risk { margin: 0; color: var(--content-subtle); }

/* schmale Karte (< 720 px): Kopf bricht um, Kennzahlen im Raster, K/V + Gebühr eigene Zeile (AK §9) */
@container (max-width: 719px) {
  .pc-head { flex-wrap: wrap; gap: 4px 12px; }
  .pc-spacer { display: none; }
  .pc-main { flex-direction: column; align-items: stretch; gap: 16px; }
  .pc-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px 16px; }
  .pc-actions { padding-top: 12px; }
  .fee-tip { right: auto; left: -120px; }
}

/* ------------------------------------------------------------ Popover / Dropdown / Sheet */
.pop { position: absolute; z-index: 50; background: var(--surface-raised); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal);
  padding: 16px; width: 343px; display: flex; flex-direction: column; gap: 16px; }
.pop h3 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 600; }
.pop .sub { margin: 4px 0 0; color: var(--content-subtle); font-size: 16px; line-height: 22px; }
.pop .group-label { font-size: 14px; line-height: 20px; color: var(--content-subtle); margin: 0 0 8px; }
.qpills { display: flex; flex-wrap: wrap; gap: 8px; }
.qpill { height: 36px; padding: 0 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-default); background: transparent;
  font-size: 14px; line-height: 20px; color: var(--content-muted); }
.qpill[aria-pressed="true"] { background: var(--action-secondary); border-color: var(--action-secondary); color: var(--action-primary); font-weight: 500; }
.field { position: relative; height: 44px; background: var(--surface-input); border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); }
.field:focus-within { border-color: var(--content-info); }
.field label { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--content-subtle);
  font-size: 14px; line-height: 22px; transition: top .12s, font-size .12s, transform .12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field.filled label, .field:focus-within label { top: 3px; transform: none; font-size: 10px; line-height: 14px; }
.field input { width: 100%; height: 100%; border: 0; outline: none; background: transparent; padding: 14px 12px 0; font-size: 14px; }
.fields { display: flex; flex-direction: column; gap: 16px; }
.btn-primary { height: 44px; border: 0; border-radius: var(--radius-pill); background: var(--action-primary); color: var(--content-inverse);
  font-size: 14px; line-height: 22px; font-weight: 500; width: 100%; }
.btn-primary:hover { filter: brightness(1.08); }

.dd { position: absolute; z-index: 50; width: 280px; padding: 8px 0; background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-menu); }
.dd .item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 12px 16px 12px 48px;
  font-size: 16px; line-height: 24px; position: relative; color: var(--content-default); }
.dd .item:hover { background: var(--surface-subtle); }
.dd .item[aria-checked="true"]::before { content: ''; position: absolute; left: 18px; top: 50%; width: 12px; height: 7px; margin-top: -6px;
  border-left: 2px solid var(--content-info); border-bottom: 2px solid var(--content-info); transform: rotate(-45deg); }
.dd .sheet-title { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(3, 5, 36, 0.4); z-index: 45; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--content-default); color: var(--content-inverse);
  padding: 10px 16px; border-radius: var(--radius-lg); font-size: 14px; line-height: 20px; box-shadow: var(--shadow-modal); }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1100px) { .ul-chart { width: 400px; } }
@media (max-width: 767px) {
  .topbar { padding: 16px 16px 0; }
  .topbar-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 16px; }
  .ul-card { flex-direction: column; }
  .ul-chart { width: 100%; }
  .ul-price strong { font-size: 30px; line-height: 40px; }
  /* unter 768 px: Name, Kurs, Tagesveränderung („Heute“ links daneben), ISIN/WKN ganz unten */
  .ul-tags-inline { display: none; }
  .ul-tags-below { display: flex; }
  .ul-price-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ul-change { flex-direction: row; align-items: center; gap: 8px; }
  .ul-home { white-space: normal; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .filters > * { flex: none; }
  .pop { width: auto; left: 16px !important; right: 16px; }
  /* Dropdowns als Bottom-Sheet (Figma Mobile) */
  .dd { position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 16px 0 24px; max-height: 75vh; overflow: auto; }
  .dd .sheet-title { display: block; margin: 0 16px 8px; font-size: 20px; line-height: 24px; font-weight: 600; }
  .suggest { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ------------------------------------------------------------ Footer (web-components-footer, Rebranding) */
/* 64 px Abstand zum Inhalt: 40 px Innenabstand unten von .content + 24 px */
.site-footer { margin-top: 24px; background: var(--surface-basetint); border-bottom: 8px solid var(--surface-vibrant); }
.sf-inner { width: min(var(--content-width), 100% - 32px); margin: 0 auto; padding: 64px 0; display: flex; gap: 40px; align-items: flex-start; }
.sf-brand { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.sf-logo { display: block; width: 234px; height: auto; max-width: 100%; }
.sf-brand-text { display: flex; flex-direction: column; gap: 40px; }
.sf-copy { margin: 0; font-size: 14px; line-height: 20px; color: var(--content-muted); overflow-wrap: anywhere; }
.sf-apps { display: flex; flex-direction: column; gap: 16px; }
.sf-apps-title { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--content-default); }
.sf-app-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-app { height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 20px; border-radius: var(--radius-pill);
  background: var(--action-secondary); border: 1.5px solid var(--border-default); color: var(--text-default);
  font-size: 16px; line-height: 24px; font-weight: 500; white-space: nowrap; text-decoration: none; }
a.sf-app:hover { text-decoration: none; filter: brightness(.98); }
.sf-app-icon { width: 24px; height: 24px; flex: none; position: relative; background: #fff; border-radius: var(--radius-md); overflow: hidden; }
.sf-app-icon img { position: absolute; inset: 12% 16.67%; width: 66.66%; height: 76%; object-fit: contain; }
.sf-cols { display: flex; gap: 40px; flex: none; }
.sf-col { width: 264px; display: flex; flex-direction: column; gap: 16px; }
.sf-col-title { margin: 0; font-size: 20px; line-height: 24px; font-weight: 600; color: var(--content-default); }
.sf-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.sf-link { font-size: 14px; line-height: 20px; color: var(--content-muted); text-decoration: none; overflow-wrap: anywhere; }
a.sf-link:hover { text-decoration: underline; color: var(--content-default); }
.sf-pending { cursor: default; }
/* Tablet: Spalten unter den Logo-Block */
@media (max-width: 1023px) {
  .sf-inner { flex-direction: column; }
  .sf-cols { flex-wrap: wrap; }
}
/* Mobil (Figma „Footer · invest · Mobile“, 375 px): alles untereinander, 40/16 px Innenabstand */
@media (max-width: 767px) {
  .sf-inner { width: 100%; padding: 40px 16px; gap: 40px; }
  .sf-cols { flex-direction: column; gap: 40px; width: 100%; }
  .sf-col { width: 100%; }
}

/* ------------------------------------------------------------ Feedback-Agent (feedback-agent.js) */
button.feedback-link { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; }
button.feedback-link:disabled { cursor: default; color: var(--content-positive); text-decoration: none; }
.fb-link { border: 0; background: none; padding: 0; font: inherit; color: var(--action-primary); text-decoration: underline; cursor: pointer; }
.fb-agent { position: fixed; right: 24px; bottom: 24px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  width: 340px; max-width: calc(100vw - 32px); animation: fb-in .32s cubic-bezier(.2, .9, .3, 1.3) both; }
.fb-agent.fb-leaving { animation: fb-out .22s ease-in both; }
.fb-bubble { position: relative; width: 100%; padding: 16px 16px 14px; background: var(--surface-raised); color: var(--content-default);
  border-radius: 16px 16px 4px 16px; box-shadow: var(--shadow-modal); border: 1.5px solid var(--border-default); }
.fb-bubble::after { /* Spitze zur Figur */ content: ''; position: absolute; right: 30px; bottom: -9px; width: 16px; height: 16px; background: var(--surface-raised);
  border-right: 1.5px solid var(--border-default); border-bottom: 1.5px solid var(--border-default); transform: rotate(45deg); }
.fb-close { position: absolute; top: 4px; right: 6px; width: 32px; height: 32px; border: 0; background: none; font-size: 22px; line-height: 1;
  color: var(--content-subtle); border-radius: var(--radius-pill); cursor: pointer; }
.fb-body { display: flex; flex-direction: column; gap: 10px; padding-right: 20px; }
.fb-say, .fb-q, .fb-sentence, .fb-survey { margin: 0; font-size: 14px; line-height: 20px; }
.fb-big { font-size: 18px; line-height: 24px; font-weight: 600; }
.fb-q { font-weight: 600; }
.fb-sentence { color: var(--content-subtle); font-style: italic; overflow-wrap: anywhere; }
.fb-thumbs { display: flex; gap: 8px; }
.fb-thumb { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-default); background: var(--surface-raised); font: inherit; font-size: 18px; cursor: pointer;
  transition: transform .12s, background .12s; }
.fb-thumb span { font-size: 14px; }
.fb-thumb:hover { background: var(--action-secondary); transform: translateY(-1px) scale(1.03); }
.fb-text { width: 100%; resize: vertical; min-height: 88px; padding: 10px 12px; border: 1.5px solid var(--border-default); border-radius: 12px;
  font: inherit; font-size: 14px; line-height: 20px; background: var(--surface-input); }
.fb-text:focus { outline: none; border-color: var(--content-info); }
.fb-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.fb-count { margin-right: auto; font-size: 12px; color: var(--content-subtle); }
.fb-send, .fb-skip { height: 36px; padding: 0 16px; border-radius: var(--radius-pill); font: inherit; font-size: 14px; cursor: pointer; }
.fb-send { border: 0; background: var(--action-primary); color: var(--content-inverse); font-weight: 500; }
.fb-skip { border: 1.5px solid var(--border-default); background: none; color: var(--content-muted); }
.fb-send:disabled, .fb-skip:disabled, .fb-thumb:disabled { opacity: .55; cursor: default; }
.fb-survey a { color: var(--action-primary); font-weight: 500; }
/* Bot */
.fb-bot { margin-right: 8px; overflow: visible; filter: drop-shadow(0 6px 10px rgba(9, 15, 96, .18)); }
.fb-bot-head { fill: var(--surface-vibrant); stroke: var(--blue-900); stroke-width: 2.5; }
.fb-bot-face { fill: var(--surface-raised); }
.fb-bot-eye { fill: var(--blue-900); transform-box: fill-box; transform-origin: center; animation: fb-blink 4s infinite; }
.fb-bot-mouth { fill: none; stroke: var(--blue-900); stroke-width: 2.5; stroke-linecap: round; }
.fb-bot-stroke { stroke: var(--blue-900); stroke-width: 2.5; stroke-linecap: round; }
.fb-bot-antenna { fill: var(--action-primary); animation: fb-glow 1.6s ease-in-out infinite; }
.fb-bot-arm { fill: none; stroke: var(--blue-900); stroke-width: 3; stroke-linecap: round; transform-origin: 80px 58px; opacity: 0; }
.fb-agent[data-mood="hello"] .fb-bot { animation: fb-bob 1.6s ease-in-out 2; }
.fb-agent[data-mood="think"] .fb-bot { transform: rotate(-8deg); transition: transform .3s; }
.fb-agent[data-mood="think"] .fb-bot-eye { transform: translateY(-2px) scaleY(.8); animation: none; }
.fb-agent[data-mood="think"] .fb-bot-mouth { d: path('M42 63 Q48 61 54 63'); }
.fb-agent[data-mood="happy-small"] .fb-bot { animation: fb-hop .5s ease-out 1; }
.fb-agent[data-mood="happy"] .fb-bot { animation: fb-hop .55s ease-out 2; }
.fb-agent[data-mood="happy"] .fb-bot-arm { opacity: 1; animation: fb-wave .5s ease-in-out 4; }
.fb-agent[data-mood="happy"] .fb-bot-mouth { d: path('M39 59 Q48 70 57 59'); }
/* Konfetti in Markenfarben */
.fb-confetti { position: absolute; right: 44px; bottom: 60px; width: 0; height: 0; pointer-events: none; }
.fb-confetti i { position: absolute; width: 8px; height: 8px; border-radius: 2px; animation: fb-pop 1.1s ease-out var(--d) both; }
.fb-confetti i.c0 { background: var(--surface-vibrant); }
.fb-confetti i.c1 { background: var(--action-primary); }
.fb-confetti i.c2 { background: var(--action-buy); }
@keyframes fb-in { from { opacity: 0; transform: translateY(24px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fb-out { to { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes fb-bob { 50% { transform: translateY(-6px) rotate(4deg); } }
@keyframes fb-hop { 40% { transform: translateY(-14px); } 70% { transform: translateY(0) scaleY(.94); } }
@keyframes fb-wave { 50% { transform: rotate(-28deg); } }
@keyframes fb-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes fb-glow { 50% { opacity: .45; } }
@keyframes fb-pop { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), -120px) rotate(320deg); opacity: 0; } }
@media (max-width: 767px) {
  .fb-agent { right: 16px; left: 16px; bottom: 16px; width: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-agent, .fb-agent *, .fb-agent .fb-bot { animation: none !important; transition: none !important; }
  .fb-agent[data-mood="happy"] .fb-bot-arm { opacity: 1; }
}
.fb-privacy { margin: -4px 0 0; font-size: 12px; line-height: 16px; color: var(--content-subtle); }
.fb-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------ KO-Grafik (ko-scale.js) */
.ko-scale { position: relative; width: 100%; height: 94px; margin-top: -4px; }
.ko-svg { display: block; width: 100%; height: 94px; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.ko-svg:focus-visible { box-shadow: var(--focus); border-radius: var(--radius-md); }
.ko-axis { stroke: var(--border-default); stroke-width: 2; }
.ko-zone { fill: var(--content-negative); fill-opacity: .08; }
.ko-premium { fill: var(--action-secondary); stroke: var(--content-info); stroke-width: 1; stroke-opacity: .5; }
.ko-mark-ko { stroke: var(--content-negative); stroke-width: 2.5; stroke-linecap: round; }
.ko-mark-strike { stroke: var(--content-default); stroke-width: 2; stroke-linecap: round; }
.ko-cross { stroke: var(--content-subtle); stroke-width: 1; stroke-dasharray: 2 2; }
.ko-text { font-size: 11px; font-family: inherit; fill: var(--content-subtle); }
.ko-lbl-ko { fill: var(--content-negative); font-weight: 600; }
.ko-lbl-price { fill: var(--content-info); font-weight: 600; }
.ko-lbl-ul { fill: var(--content-default); font-weight: 600; }
.ko-lbl-cap { fill: var(--content-subtle); }
.ko-lbl-cap-paper { fill: var(--content-info); }
.ko-lbl-cap-ko { fill: var(--content-negative); }
.ko-tri-paper { fill: var(--content-info); }
.ko-tri-ul { fill: var(--content-default); }
.ko-tip { position: absolute; bottom: calc(100% - 4px); transform: translateX(-50%); z-index: 20; pointer-events: none; display: flex; flex-direction: column;
  gap: 2px; padding: 6px 10px; border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: var(--shadow-menu);
  font-size: 12px; line-height: 16px; color: var(--content-subtle); white-space: nowrap; }
.ko-tip strong { color: var(--content-default); font-weight: 600; }
.ko-tip-note { font-size: 11px; color: var(--content-subtle); font-style: italic; }
.ko-tip[hidden] { display: none; }

/* ------------------------------------------------------------ Letzter bekannter Kurs (Markt geschlossen) */
.closed-note { margin: 0; display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: var(--card-radius);
  background: #fff4e0; border: 1.5px solid var(--content-warning); color: var(--content-default); font-size: 14px; line-height: 20px; }
.closed-note img { flex: none; margin-top: 0; }
.pc-top { gap: 8px; flex-wrap: wrap; align-items: center; }
.pc-top[hidden], .pc-closed[hidden] { display: none; }
.pc-closed { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--radius-sm); background: #fff4e0; color: var(--content-warning); border: 1px solid var(--content-warning); }
.ul-stale { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--content-warning); }

/* KO-Grafik: zwei Rasterungen (oben Preis des Papiers, unten Basiswert) */
.ko-tickmark { stroke: var(--content-subtle); stroke-width: 1; }
.ko-tickmark-paper { stroke: var(--content-info); }
.ko-tick { font-size: 10.5px; font-family: inherit; fill: var(--content-subtle); }
.ko-tick-paper { fill: var(--content-info); }
.ko-tick-zero { fill: var(--content-info); font-weight: 600; }
.ko-tickmark-zero { stroke: var(--content-info); stroke-width: 1.5; }
.ko-cap { font-size: 10px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; fill: var(--content-subtle); }
