/* FX Wegweiser — Design System
   German finance media style: light, sober, rational, blue accent.
   No external fonts, no CDN, no gradients abuse. */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --bg-tile: #eef1f6;
  --ink: #14181f;
  --ink-2: #3d4553;
  --ink-3: #69707d;
  --line: #e2e6ec;
  --line-2: #d3d9e1;
  --accent: #1d4ed8;
  --accent-2: #0e7490;
  --accent-soft: #e8eefc;
  --green: #0f766e;
  --amber-bg: #fdf6e3;
  --amber-line: #e8d9a8;
  --amber-ink: #6b5410;
  --red-ink: #9a3412;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 14px rgba(16,24,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1140px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.3px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand .brand-fx { color: var(--accent); }
.nav-main { display: flex; gap: 2px; margin-left: 8px; flex: 1; }
.nav-main a {
  padding: 8px 10px; border-radius: 8px; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap;
}
.nav-main a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.nav-cta { margin-left: auto; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font-size: 18px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 8px; font-size: 15px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; transition: background .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1a43b8; text-decoration: none; color: #fff; }
.btn-ghost { background: var(--bg); color: var(--accent); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--accent-soft); text-decoration: none; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { background: var(--bg); padding: 44px 0 26px; }
.hero-inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: center; }
.hero h1 { font-size: 34px; line-height: 1.2; letter-spacing: -.6px; font-weight: 800; }
.hero h1 span { color: var(--accent); }
.hero p.lead { margin-top: 14px; font-size: 17.5px; color: var(--ink-2); max-width: 620px; }
.hero .hero-cta { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; }
.hero-facts div { display: flex; flex-direction: column; }
.hero-facts strong { font-size: 20px; color: var(--ink); }
.hero-facts span { font-size: 13.5px; color: var(--ink-3); }
.hero-visual { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.hero-visual h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-3); margin-bottom: 12px; }

/* ---------- Broker cards ---------- */
.broker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.broker-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow);
}
.broker-card .bc-top { display: flex; align-items: flex-start; gap: 12px; }
.broker-card .bc-id { min-width: 0; }
.broker-card .bc-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.broker-card .bc-logo {
  width: 52px; height: 52px; flex: 0 0 52px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.broker-card .bc-logo img { max-width: 84%; max-height: 84%; object-fit: contain; }
.broker-card .bc-name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.broker-card .bc-tag { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.broker-card .bc-meta { font-size: 13.5px; color: var(--ink-2); display: grid; gap: 5px; }
.broker-card .bc-meta b { color: var(--ink); font-weight: 700; }
.broker-card .btn { margin-top: auto; }
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; letter-spacing: .3px;
}
.badge-ad { background: var(--accent-soft); color: var(--accent); }
.badge-off { background: var(--bg-tile); color: var(--ink-3); }
.badge-rank { background: #0f766e; color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
table.cmp th, table.cmp td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.cmp th { background: var(--bg-soft); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
table.cmp tr:last-child td { border-bottom: none; }
table.cmp td.broker-cell { min-width: 170px; }
table.cmp .broker-cell-inner { display: flex; align-items: center; gap: 10px; }
table.cmp .mini-logo { width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--line); border-radius: 7px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
table.cmp .mini-logo img { max-width: 80%; max-height: 80%; object-fit: contain; }
.yes { color: var(--green); font-weight: 700; }
.no { color: var(--ink-3); }

/* ---------- Sections ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 24px; letter-spacing: -.4px; font-weight: 800; }
.section-head .more { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.bg-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Articles / prose ---------- */
.prose { max-width: 760px; }
.prose h1 { font-size: 32px; line-height: 1.22; letter-spacing: -.5px; font-weight: 800; margin-bottom: 6px; }
.prose h2 { font-size: 23px; letter-spacing: -.3px; font-weight: 800; margin: 34px 0 12px; }
.prose h3 { font-size: 18.5px; font-weight: 750; margin: 24px 0 8px; }
.prose p { margin-bottom: 14px; color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--ink-2); }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }
.prose .lead { font-size: 18.5px; color: var(--ink); }
.page-head { padding: 34px 0 6px; }
.page-head h1 { font-size: 30px; letter-spacing: -.5px; font-weight: 800; }
.page-head .sub { color: var(--ink-3); margin-top: 8px; font-size: 15.5px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 13.5px; color: var(--ink-3); padding: 14px 0 0; }
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 7px; color: var(--line-2); }

/* ---------- Broker page ---------- */
.broker-hero { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; background: var(--bg); display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: center; margin-bottom: 24px; }
.broker-hero .bh-logo { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
.broker-hero .bh-logo img { max-width: 86%; max-height: 86%; object-fit: contain; }
.broker-hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.broker-hero .bh-sub { color: var(--ink-3); margin-top: 4px; font-size: 14.5px; }
.broker-hero .bh-cta { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.spec-item { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; }
.spec-item dt { font-size: 12.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; }
.spec-item dd { font-size: 15px; font-weight: 700; margin-top: 3px; color: var(--ink); }
.notice {
  border: 1px solid var(--amber-line); background: var(--amber-bg); color: var(--amber-ink);
  border-radius: var(--radius); padding: 13px 16px; font-size: 14.5px; line-height: 1.6; margin: 16px 0;
}
.notice a { color: var(--amber-ink); text-decoration: underline; }
.risk-note {
  border: 1px solid var(--line-2); background: var(--bg-soft); border-radius: var(--radius);
  padding: 14px 16px; font-size: 13.5px; color: var(--ink-3); line-height: 1.55;
}

/* ---------- Info / article cards ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.info-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.info-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.info-card p { font-size: 14.5px; color: var(--ink-2); flex: 1; }
.info-card a.arrow { font-size: 14px; font-weight: 700; margin-top: 10px; display: inline-block; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.strength-list li::marker { color: var(--green); }
.limit-list li::marker { color: var(--red-ink); }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; background: var(--bg); }
.faq summary { font-weight: 700; cursor: pointer; font-size: 15.5px; }
.faq details p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }

/* ---------- TOC / Quellen ---------- */
details.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 18px 0; background: var(--bg-soft); font-size: 14.5px; }
details.toc summary { font-weight: 700; cursor: pointer; color: var(--ink-2); }
details.toc ol { margin: 10px 0 0 18px; }
details.toc li { margin-bottom: 5px; }

/* ---------- Sticky mobile CTA (affiliate pages only) ---------- */
.sticky-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(16,24,40,.08);
  padding: 10px 16px; align-items: center; gap: 12px;
}
.sticky-cta .btn { flex: 1; margin: 0; }
@media (max-width: 768px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 64px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); margin-top: 46px; padding: 40px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: 14px; font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; font-size: 14px; }
.footer-grid a { color: var(--ink-2); }
.footer-grid a:hover { color: var(--accent); }
.footer-disclosure { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.footer-bottom { margin-top: 18px; font-size: 13px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-main {
    display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: 10px 20px 16px; flex-direction: column; gap: 4px;
    box-shadow: var(--shadow);
  }
  .nav-main.open { display: flex; }
  .nav-main a { padding: 11px 12px; font-size: 16px; }
  .nav-cta { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  /* comparison table -> stacked cards (German mobile UX: no compressed mini-table) */
  .table-wrap { overflow: visible; border: none; background: transparent; margin: 0; }
  table.cmp { min-width: 0; display: block; }
  table.cmp thead { display: none; }
  table.cmp tbody { display: block; }
  table.cmp tr {
    display: block; background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 8px 14px; margin-bottom: 12px;
    box-shadow: var(--shadow);
  }
  table.cmp td { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: right; }
  table.cmp tr:last-child td { border-bottom: none; }
  table.cmp td::before { content: attr(data-label); font-weight: 700; font-size: 13px; color: var(--ink-3); text-align: left; flex: 0 0 40%; }
  table.cmp td.broker-cell { display: flex; justify-content: flex-start; }
  table.cmp td.broker-cell::before { display: none; }
  table.cmp td:last-child { border-bottom: none; display: flex; justify-content: flex-end; }
  table.cmp td:last-child::before { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 26px; }
  .hero p.lead { font-size: 16px; }
  .prose h1 { font-size: 25px; }
  .section-head h2 { font-size: 21px; }
  .broker-hero { grid-template-columns: 72px 1fr; padding: 18px; }
  .broker-hero .bh-logo { width: 72px; height: 72px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
