/* Börsenseite – eigenständig, unabhängig vom Stil der Reiseführer */
:root {
  --bg: #f4f5f2;
  --card: #ffffff;
  --ink: #17201c;
  --muted: #66706b;
  --line: #e2e5df;
  --navy: #12302a;
  --accent: #1f7a5a;
  --up: #15803d;
  --down: #c2410c;
  --radius: 10px;
  --c0: #1f7a5a; --c1: #2f5d8a; --c2: #b7791f; --c3: #8a3f74;
  --c4: #4f8a2f; --c5: #7a5a1f; --c6: #3f7f86; --c7: #8a2f2f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.r { text-align: right; }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }
.flat { color: var(--muted); font-weight: 600; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2, .section-head h3 { margin: 0; }
.big-title { margin: 32px 0 14px; font-size: 1.5rem; }
.btn {
  font: inherit; font-size: .92rem; padding: 8px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { filter: brightness(.96); }

/* Kopf */
.top { background: var(--navy); color: #fff; padding: 18px 0; }
.top-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.top .back { color: #cfe5dc; text-decoration: none; font-size: .9rem; }
.brand h1 { font-size: 1.6rem; margin: 0; }
.brand p { margin: 0; color: #b9d3c9; }
.channel { margin-left: auto; color: #fff; border: 1px solid #ffffff55; padding: 6px 12px; border-radius: 8px; text-decoration: none; font-size: .9rem; }
.intro { max-width: 820px; margin: 22px 0; font-size: 1.05rem; }

/* Zustimmung externe Inhalte */
.consent { background: #fff7e6; border-bottom: 1px solid #f0dcae; }
.consent-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.consent p { margin: 0; flex: 1 1 420px; font-size: .9rem; }
.consent-btns { display: flex; gap: 8px; }
.ext-ph {
  height: 100%; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; padding: 12px; color: var(--muted); background: #f8f9f6; cursor: pointer;
}
.ph-price { font-size: 1.3rem; font-weight: 700; color: var(--ink); }

/* Live */
.live { background: var(--card); border: 2px solid #dc2626; border-radius: var(--radius); padding: 14px; margin: 20px 0; }
.live-head { font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #dc2626; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.live-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.live-video { aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.live-chat { min-height: 420px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.live iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Depot: Charts links (2/3), Depot rechts (1/3) */
.depot-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; margin-bottom: 20px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.chart-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tile-name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zoom { border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 0 4px; }
.zoom:hover { color: var(--accent); }
.tile-body { height: 240px; }
.tile-body .tradingview-widget-container { height: 100%; }
.chart-tile.flash { outline: 3px solid var(--accent); }

.depot-card .big { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
.label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpis { display: flex; gap: 24px; margin: 10px 0; }
.kpis div { display: flex; flex-direction: column; }

.holdings { width: 100%; border-collapse: collapse; font-size: .9rem; }
.holdings th { font-weight: 600; color: var(--muted); font-size: .78rem; text-align: left; padding: 4px 0; border-bottom: 1px solid var(--line); }
.holdings th.r { text-align: right; }
.holdings td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.holdings tr { cursor: pointer; }
.holdings tr:hover td { background: #f8f9f6; }
.h-name { display: block; font-weight: 600; }
.holdings td + td { padding-left: 8px; }
.weights { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 12px; }
.weights .w0 { background: var(--c0); } .weights .w1 { background: var(--c1); } .weights .w2 { background: var(--c2); } .weights .w3 { background: var(--c3); }
.weights .w4 { background: var(--c4); } .weights .w5 { background: var(--c5); } .weights .w6 { background: var(--c6); } .weights .w7 { background: var(--c7); }

/* Vergleichschart */
.ranges { display: flex; gap: 4px; }
.ranges button { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.ranges button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.legend button { font: inherit; font-size: .85rem; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 3px 10px; cursor: pointer; }
.legend button.off { opacity: .4; }
.legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.compare-chart { width: 100%; min-height: 280px; }
.compare-chart svg { width: 100%; height: auto; display: block; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 8px; }
.compare-table td { padding: 6px 0; border-top: 1px solid var(--line); }

/* Orderbuch */
.table-scroll { overflow-x: auto; }
.orders { width: 100%; border-collapse: collapse; font-size: .9rem; }
.orders th { text-align: left; font-size: .78rem; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.orders td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tag { font-size: .75rem; padding: 2px 8px; border-radius: 10px; background: #eef0ec; white-space: nowrap; }
.t-kauf { background: #dcfce7; color: #14532d; } .t-verkauf { background: #ffedd5; color: #7c2d12; }
.t-dividende { background: #e0f2fe; color: #0c4a6e; }

/* Videos */
.video-topic { margin-bottom: 26px; }
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.video h4 { font-size: .95rem; margin: 8px 0 4px; }
.video p { margin: 0; font-size: .85rem; color: var(--muted); }
.video-frame { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #e8ebe6; position: relative; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-frame .ext-ph { min-height: 0; }
.video-frame img.thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.play { font-size: 1.6rem; color: var(--accent); }
.video-frame .play-over {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: linear-gradient(transparent, #0004); color: #fff; font-size: 2.2rem; border: 0; width: 100%;
}

/* Ratgeber */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.article-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.article-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-body { padding: 14px; }
.article-body p { margin: 0 0 8px; font-size: .9rem; color: var(--muted); }
.more { color: var(--accent); font-weight: 600; font-size: .9rem; }
.article { max-width: 760px; padding-top: 24px; padding-bottom: 40px; }
.article-img { width: 100%; border-radius: var(--radius); margin: 10px 0 16px; }
.article .lead { font-size: 1.1rem; font-weight: 500; }
.article-text h2 { margin-top: 1.4em; }

/* Kommentare */
.comment-form { display: grid; gap: 8px; margin-bottom: 16px; max-width: 640px; }
.comment-form input, .comment-form textarea, .admin input, .admin textarea, .admin select {
  font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fff;
}
.comment-form button { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-msg { font-size: .9rem; }
.comment { padding: 10px 0; border-top: 1px solid var(--line); }
.c-text { margin-top: 2px; }

/* Fuß */
.foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 22px 0 40px; color: var(--muted); }
.disclaimer { font-size: .88rem; max-width: 820px; }

/* Vergrößerter Chart */
.modal { position: fixed; inset: 0; background: #0009; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: var(--radius); width: min(1100px, 100%); height: min(720px, 90vh); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.modal-close { border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.modal-body { flex: 1; }
.modal-body .tradingview-widget-container { height: 100%; }

/* Handy */
@media (max-width: 900px) {
  .depot-grid { grid-template-columns: 1fr; }
  .depot { order: -1; }
  .live-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .video-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .brand h1 { font-size: 1.3rem; }
  .channel { margin-left: 0; }
}

/* Feinschliff */
.holdings td.r { white-space: nowrap; }
#videos, #ratgeber { margin-bottom: 28px; }
.orders { min-width: 640px; }
@media (max-width: 520px) {
  .tile-body { height: 200px; }
  .compare-chart { min-height: 0; }
}

/* Bilder im Ratgeber-Text: klein an der Seite, am Handy volle Breite */
.article-text::after { content: ""; display: table; clear: both; }
.text-img { float: right; width: 42%; margin: 4px 0 14px 20px; }
.text-img img { width: 100%; border-radius: 8px; display: block; }
.text-img figcaption { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.article-text h2 { clear: both; }
@media (max-width: 600px) { .text-img { float: none; width: 100%; margin: 12px 0; } }

/* v0.5: größere Charts, aufgeräumte Depot-Karte */
.wrap { max-width: 1360px; }
.chart-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.chart-tile { position: relative; }
.chart-tile .zoom {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 8px;
  background: #ffffffe6; border: 1px solid var(--line); font-size: 1rem; line-height: 1; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.chart-tile .zoom:hover { color: var(--accent); border-color: var(--accent); }
.tile-body { height: 320px; padding: 4px 4px 0; }
.ph-name { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.depot-card { padding: 20px; }
.depot-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.depot-card .big { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.big-label { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.kpis { display: flex; gap: 28px; margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.kpis div { display: flex; flex-direction: column-reverse; gap: 2px; }
.kpis .kpi { font-size: 1.3rem; font-weight: 700; }
.kpis .label { text-transform: none; letter-spacing: 0; font-size: .82rem; }
@media (max-width: 520px) { .tile-body { height: 280px; } .depot-card .big { font-size: 2rem; } }

/* v0.6: Titelbild, Depot-Reiter, Investmentansatz */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.top.slim { padding: 8px 0; }
.top.slim .top-inner { justify-content: space-between; }
.top.slim .channel { margin-left: 0; padding: 4px 10px; }
.hero { background: #0b1f1b; line-height: 0; }
.hero img { width: 100%; height: auto; max-height: 520px; object-fit: cover; object-position: center 35%; display: block; max-width: 2172px; margin: 0 auto; }

.depot-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 14px; border-bottom: 2px solid var(--line); }
.depot-tab {
  font: inherit; font-weight: 700; font-size: 1.02rem; background: none; border: 0; cursor: pointer;
  padding: 10px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: var(--muted);
  display: flex; align-items: center; gap: 10px; border-radius: 8px 8px 0 0;
}
.depot-tab:hover { color: var(--ink); background: #ffffff99; }
.depot-tab.on { color: var(--ink); border-bottom-color: var(--accent); background: var(--card); }
.tab-perf { font-size: .85rem; font-weight: 600; }

.approach { border-left: 4px solid var(--accent); margin-top: 18px; }
.approach h2 { font-size: 1.45rem; margin-bottom: 8px; }
.approach .label { margin-bottom: 4px; }
.approach-text { max-width: 900px; }
.approach-text p { margin: 0 0 .7em; }
.approach-text p:last-child { margin-bottom: 0; }
.depot-panel[hidden] { display: none; }
@media (max-width: 520px) {
  .depot-tab { padding: 8px 10px; font-size: .95rem; }
  .hero img { min-height: 130px; }
}
@media (max-width: 520px) {
  .depot-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .depot-tab { white-space: nowrap; flex: 0 0 auto; }
}

/* v0.7: schmales Banner, 200 px hoch – ganzes Bild in der Mitte, Seiten unscharf aufgefüllt */
.hero { position: relative; overflow: hidden; height: 200px; background: #0b1f1b; line-height: 0; }
.hero-bg { position: absolute; inset: -24px; background: url(hero-1000.jpg) center / cover; filter: blur(20px) brightness(.5); }
.hero img { position: relative; height: 200px; width: auto; max-width: none; max-height: none; min-height: 0; margin: 0 auto; display: block; object-fit: initial; }
@media (max-width: 620px) {
  .hero { height: auto; }
  .hero-bg { display: none; }
  .hero img { width: 100%; height: auto; min-height: 0; }
}

/* Eigene Kurscharts */
.own-chart.own-ready { display: flex; flex-direction: column; padding: 14px 16px 8px; }
.own-head { padding-right: 36px; }
.own-name { font-weight: 700; font-size: .98rem; line-height: 1.3; }
.own-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.own-last { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }
.own-chg { font-size: .9rem; }
.own-ranges { display: flex; gap: 4px; margin: 8px 0 4px; }
.own-ranges button { font: inherit; font-size: .8rem; border: 0; background: none; padding: 3px 8px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.own-ranges button.on { background: #eef0ec; color: var(--ink); font-weight: 600; }
.own-plot { flex: 1; min-height: 0; }
.own-plot svg { width: 100%; height: 100%; display: block; }
.own-big { height: 100%; }
.own-big .own-last { font-size: 1.8rem; }
