:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f3efe6;
  --text: #1d1b16;
  --muted: #6b665a;
  --border: #e7e1d3;
  --gold: #b8862b;
  --gold-strong: #8f6516;
  --gold-soft: #f6ecd6;
  --ok: #2f8f4e;
  --bad: #b3402f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(60,45,10,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --surface: #1d1b16;
    --surface-2: #25221b;
    --text: #f2eee4;
    --muted: #a49d8c;
    --border: #2f2c24;
    --gold: #d9a845;
    --gold-strong: #e8bd62;
    --gold-soft: #2b2416;
    --ok: #5cbf7a;
    --bad: #e07a68;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--gold-strong); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.gold { color: var(--gold-strong); }
.up { color: var(--ok); }
.down { color: var(--bad); }
[hidden] { display: none !important; }

/* Header & Navigation */
header.site { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 50; }
header.site .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { font-weight: 800; font-size: 1.3rem; text-decoration: none; color: var(--text); letter-spacing: -.02em; flex-shrink: 0; }
.logo span { color: var(--gold); }
.mainnav { display: flex; align-items: center; gap: 4px; flex: 1; }
.mainnav > a, .dd > button { color: var(--text); text-decoration: none; font: inherit; font-size: .95rem; padding: 8px 10px;
  border-radius: 8px; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.mainnav > a:hover, .dd > button:hover, .dd.open > button { background: var(--surface-2); }
.dd { position: relative; }
.dd > button::after { content: "▾"; font-size: .7em; margin-left: 4px; color: var(--muted); }
.dd-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.dd.open .dd-menu { display: block; }
.dd-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .93rem; }
.dd-menu a:hover { background: var(--surface-2); }
.header-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.header-cta .price-badge .small { display: none; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font: inherit; color: var(--text); cursor: pointer; }

.price-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px;
  background: var(--gold-soft); font-size: .9rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47,143,78,.2); flex-shrink: 0; }
.dot.off { background: var(--muted); box-shadow: none; }

.crumbs { font-size: .85rem; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 36px 0 12px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.15; margin: 14px 0 12px; letter-spacing: -.02em; }
.hero .lead { color: var(--muted); max-width: 720px; font-size: 1.12rem; margin: 0; }
.hero.home h1 { font-size: clamp(2rem, 5vw, 3.1rem); }

/* Layout */
.section { margin: 44px 0; }
.section > h2, .section-head h2 { font-size: 1.5rem; letter-spacing: -.01em; margin: 0 0 14px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.tile { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--gold); transform: translateY(-1px); }
.tile .ico { font-size: 1.6rem; }
.tile strong { display: block; margin: 6px 0 2px; }
.tile span { color: var(--muted); font-size: .9rem; }
.tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; vertical-align: middle; background: var(--gold-soft); color: var(--gold-strong); }
.tag.ad { background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.tag.ok { background: rgba(47,143,78,.12); color: var(--ok); }

.step-no { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold-soft); color: var(--gold-strong); font-weight: 700; margin-bottom: 8px; }

/* Text / Ratgeber */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin: 36px 0 10px; letter-spacing: -.01em; }
.prose h3 { font-size: 1.12rem; margin: 26px 0 8px; }
.prose li { margin: 4px 0; }
.prose table { margin: 16px 0; }
.prose [data-widget] { margin: 24px 0; }
.prose .calc { grid-template-columns: 1fr; }
.prose .calc .card { position: static; }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.with-aside aside { position: sticky; top: 84px; display: grid; gap: 16px; }
.callout { background: var(--gold-soft); border-radius: 12px; padding: 14px 16px; margin: 18px 0; }
.callout > :first-child { margin-top: 0; } .callout > :last-child { margin-bottom: 0; }
.toc a { display: block; padding: 3px 0; text-decoration: none; font-size: .92rem; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
th { font-size: .82rem; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.table-scroll { overflow-x: auto; }

/* Formulare */
label { display: block; font-size: .85rem; color: var(--muted); margin: 12px 0 6px; }
select, input, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; }
textarea { min-height: 110px; resize: vertical; }
select:focus, input:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -9999px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--muted); margin-top: 12px; }
.check input { width: auto; margin-top: 3px; }
.form-msg { margin-top: 12px; font-size: .92rem; }
.form-msg.ok { color: var(--ok); } .form-msg.err { color: var(--bad); }

.btn { display: inline-block; background: var(--gold); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font: inherit;
  font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--gold-strong); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.small { padding: 7px 13px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { display: block; width: 100%; }

/* Rechner & Angebote */
.calc { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.calc .card { position: sticky; top: 84px; }
.kpis { display: grid; gap: 4px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.kpi { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kpi span { color: var(--muted); }
.kpi strong { font-size: 1.25rem; }
.offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.offer { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.offer.sponsored { border-color: var(--gold); background: var(--gold-soft); }
.offer-name { font-weight: 600; }
.offer-name a { color: inherit; text-decoration: none; } .offer-name a:hover { text-decoration: underline; }
.offer-meta { font-size: .82rem; color: var(--muted); }
.offer-price { text-align: right; }
.payout { font-weight: 700; font-size: 1.15rem; }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; font: inherit; font-size: .88rem; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }

/* Händler */
.dealer { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: center; }
.dealer h3 { margin: 0 0 2px; font-size: 1.05rem; }
.dealer h3 a { color: inherit; text-decoration: none; }
.stars { color: var(--gold); letter-spacing: 1px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

/* Suche */
.search { position: relative; }
.search-row { display: flex; gap: 8px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 4px; z-index: 20; }
.suggest a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.suggest a:hover, .suggest a.active { background: var(--surface-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 99px; text-decoration: none; color: var(--text); font-size: .9rem; background: var(--surface); }
.chips a:hover { border-color: var(--gold); }
.chips a .muted { font-size: .8rem; }
.collapsible.collapsed > :nth-child(n+13) { display: none; }

/* Chart */
.chart-wrap { position: relative; }
.chart { width: 100%; height: 280px; display: block; }
.chart .grid line { stroke: var(--border); }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2; }
.chart .area { fill: var(--gold); opacity: .12; }
.chart .cursor { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: .85rem; box-shadow: var(--shadow); white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.stat span { display: block; font-size: .8rem; color: var(--muted); }
.stat strong { font-size: 1.05rem; }

/* Foto */
.drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 28px; text-align: center; cursor: pointer; background: var(--surface); }
.drop:hover, .drop.over { border-color: var(--gold); background: var(--gold-soft); }
.drop img { max-height: 260px; border-radius: 10px; margin-top: 12px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* FAQ */
details.faq { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin: 10px 0; }
details.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--gold); font-weight: 700; }
details.faq[open] summary::after { content: "–"; }
details.faq > div { padding: 0 16px 14px; }
details.faq > div > :first-child { margin-top: 0; }
.helpful { font-size: .82rem; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.helpful button { font: inherit; font-size: .82rem; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 6px; padding: 2px 10px; cursor: pointer; }

/* News */
.news-item { display: block; text-decoration: none; color: var(--text); }
.news-item h3 { margin: 4px 0; font-size: 1.05rem; }
.news-item:hover h3 { color: var(--gold-strong); }

/* Footer */
footer.site { border-top: 1px solid var(--border); padding: 36px 0 40px; margin-top: 56px; font-size: .9rem; color: var(--muted); background: var(--surface); }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
footer.site h4 { color: var(--text); margin: 0 0 10px; font-size: .95rem; }
footer.site a, footer.site .linklike { display: block; color: var(--muted); text-decoration: none; padding: 2px 0; font: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
footer.site a:hover, footer.site .linklike:hover { color: var(--text); }
.disclaimer { font-size: .8rem; color: var(--muted); }

/* Dialog */
dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; max-width: 460px; width: calc(100% - 32px);
  background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* Chat */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; border-radius: 99px; padding: 12px 18px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.chat-panel { position: fixed; right: 20px; bottom: 80px; width: 360px; max-width: calc(100vw - 32px); height: 500px; max-height: calc(100vh - 120px);
  z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.2);
  display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-head strong { font-size: .95rem; }
.chat-head button { font: inherit; font-size: .8rem; background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; cursor: pointer; color: var(--text); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: .92rem; white-space: pre-wrap; }
.msg.bot { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--gold); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.chat-form input { padding: 9px 11px; }

/* Cookie */
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 70; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.18); font-size: .9rem; }
.cookie p { margin: 0 0 10px; }

@media (max-width: 1200px) {
  .header-cta .price-badge { display: none; }
}
@media (max-width: 960px) {
  .mainnav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 8px 16px 16px; max-height: calc(100vh - 64px); overflow-y: auto; }
  .mainnav.open { display: flex; }
  .dd-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .menu-toggle { display: block; }
  .header-cta .price-badge { display: none; }
  .with-aside { grid-template-columns: 1fr; }
  .with-aside aside { position: static; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  .calc .card { position: static; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .offer { grid-template-columns: 1fr auto; }
  .offer .btn { grid-column: 1 / -1; }
  .form-row { grid-template-columns: 1fr; }
  .chat-panel { right: 16px; bottom: 76px; }
  .chat-fab { right: 16px; bottom: 16px; }
}
