/* ============================================================
   KPR Design System — Kosten-Preise-Ratgeber
   Modern Ratgeber style: light, professional, trust-focused
   Version: 4.0 (INIT_015 P3 redesign — blue accent, light footer)
   ============================================================ */

/* ---- Variables ---- */
:root {
  --bg: #f8f9fa;
  --white: #ffffff;
  --border: #e4e7ec;
  --border-hover: #93c5fd;
  --text: #1a1a2e;
  --text-sec: #4a5568;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-mid: #93c5fd;
  --green: #16a34a;
  --green-light: #dcfce7;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --line: #e4e7ec;
  --max: 1160px;
  --article-max: 760px;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ---- Skip link ---- */
.ds-skip {
  position: absolute; top: -100px; left: 0; z-index: 9999;
  padding: 8px 16px; background: var(--accent); color: #fff;
  font-size: .85rem; font-weight: 600; border-radius: 0 0 8px 0;
  transition: top .2s;
}
.ds-skip:focus { top: 0; }

/* ---- Topbar ---- */
.topbar {
  background: var(--accent);
  color: rgba(255,255,255,.92);
  font-size: .72rem;
  padding: .45rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  letter-spacing: .01em;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.topbar .trust-badges { display: flex; gap: 1.25rem; }
.topbar .trust-badges span { opacity: .88; }

/* ---- Header / Nav ---- */
.ds-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ds-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 2rem;
}
.ds-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.ds-brand .brand-accent { color: var(--accent); }
.ds-brand span.brand-suffix {
  font-weight: 500;
  color: var(--muted);
  font-size: .9rem;
}
.ds-nav {
  display: flex;
  gap: .15rem;
  margin-left: auto;
  align-items: center;
}
.ds-nav a {
  padding: .45rem .85rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-sec);
  transition: all .18s;
  white-space: nowrap;
}
.ds-nav a:hover { color: var(--text); background: var(--accent-light); }
.ds-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-light); font-weight: 600; }

/* Hamburger */
.ds-hamburger {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: .4rem;
  border-radius: 8px;
  transition: background .18s;
}
.ds-hamburger:hover { background: var(--accent-light); }
.ds-hamburger svg { width: 22px; height: 22px; display: block; }

/* Mobile menu */
.ds-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--white);
  flex-direction: column;
  padding: 1.5rem 1.75rem;
  gap: .25rem;
  overflow-y: auto;
}
.ds-mobile-menu.open { display: flex; }
.ds-mobile-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.75rem;
  cursor: pointer;
  margin-bottom: 1.25rem;
  padding: .3rem;
  border-radius: 8px;
  transition: background .18s;
}
.ds-mobile-close:hover { background: var(--accent-light); }
.ds-mobile-close svg { width: 24px; height: 24px; display: block; }
.ds-mobile-menu a {
  font-size: 1rem;
  font-weight: 600;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.ds-mobile-menu a:hover { color: var(--accent); }

/* ---- Page wrapper ---- */
.ds-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--muted);
  padding: 1rem 0 .5rem;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { opacity: .5; }
.breadcrumbs strong { color: var(--text-sec); font-weight: 500; }

/* ---- Article hero ---- */
.article-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 2.25rem;
  margin-bottom: 2rem;
}
.article-hero .wrap {
  max-width: var(--article-max);
  margin: 0 auto;
  padding: 0 1.75rem;
}
.article-category {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: .25rem .65rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.article-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: .85rem;
}
.article-hero .subtitle {
  font-size: 1.05rem;
  color: var(--text-sec);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1rem;
}
.meta-item {
  font-size: .78rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: .28rem .65rem;
  border-radius: 6px;
  font-weight: 500;
}

/* ---- Article content ---- */
article.wrap {
  max-width: var(--article-max);
  margin: 0 auto;
  padding: 0 1.75rem 3rem;
}
article h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.25rem 0 .75rem;
  padding-top: 1rem;
  border-top: 2px solid var(--accent-light);
}
article h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.6rem 0 .5rem;
}
article p {
  color: var(--text-sec);
  margin-bottom: 1.1rem;
  font-size: 1rem;
  line-height: 1.75;
}
article ul, article ol {
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
  color: var(--text-sec);
}
article li { margin-bottom: .45rem; line-height: 1.7; font-size: 1rem; }
article strong { color: var(--text); font-weight: 600; }

/* ---- TOC ---- */
.ds-toc {
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.ds-toc h4 {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent);
  margin-bottom: .75rem;
}
.ds-toc ul { padding-left: 1.2rem; }
.ds-toc li { margin-bottom: .3rem; }
.ds-toc a {
  font-size: .88rem;
  color: var(--accent-hover);
  font-weight: 500;
}
.ds-toc a:hover { text-decoration: underline; }

/* ---- Tables ---- */
.ds-table-wrap {
  overflow-x: auto;
  margin: 1.4rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: var(--white);
}
.ds-table thead { background: var(--accent); color: #fff; }
.ds-table thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .02em;
  white-space: nowrap;
}
.ds-table tbody tr { border-bottom: 1px solid var(--border); }
.ds-table tbody tr:last-child { border-bottom: none; }
.ds-table tbody tr:nth-child(even) { background: #f8f9fa; }
.ds-table tbody td {
  padding: .7rem 1rem;
  color: var(--text-sec);
  line-height: 1.5;
}
.ds-table tbody td:first-child { font-weight: 500; color: var(--text); }

/* ---- FAQ accordion ---- */
.ds-faq { display: flex; flex-direction: column; gap: .5rem; margin: 1.25rem 0; }
.ds-faq details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}
.ds-faq details[open] { box-shadow: var(--shadow-sm); border-color: var(--accent-mid); }
.ds-faq summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: .97rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: background .18s;
}
.ds-faq summary::-webkit-details-marker { display: none; }
.ds-faq summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform .2s;
}
.ds-faq details[open] summary::after { content: "−"; }
.ds-faq summary:hover { background: var(--accent-light); }
.ds-faq details p {
  padding: 0 1.25rem 1rem;
  font-size: .92rem;
  color: var(--text-sec);
  line-height: 1.7;
  margin: 0;
}

/* ---- Checklist ---- */
.ds-checklist { list-style: none; padding: 0; }
.ds-checklist li {
  padding: .55rem 0 .55rem 1.75rem;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
  color: var(--text-sec);
  line-height: 1.6;
}
.ds-checklist li::before {
  content: "☐";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1rem;
}

/* ---- Cards / Grid ---- */
.ds-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin: 1.25rem 0;
}
.ds-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: all .2s;
  color: var(--text);
}
.ds-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.ds-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .4rem;
  line-height: 1.3;
}
.ds-card p {
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.ds-card .card-price {
  display: inline-block;
  margin-top: .75rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-light);
  padding: .22rem .6rem;
  border-radius: 6px;
}

/* ---- Hero (listing pages) ---- */
.ds-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.75rem;
  max-width: var(--max);
  margin: 0 auto;
}
.ds-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: .6rem;
}
.ds-hero .ds-breadcrumb {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .75rem;
}
.ds-disclosure {
  font-size: .8rem;
  color: var(--muted);
  background: var(--amber-light);
  border-left: 3px solid var(--amber);
  padding: .65rem 1rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
  line-height: 1.55;
}

/* ---- Section wrapper ---- */
.ds-section {
  margin: 2rem 0;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.75rem;
}

/* ---- Author box ---- */
.ds-author {
  max-width: var(--article-max);
  margin: 0 auto 2rem;
  padding: 0 1.75rem;
}

/* ---- Footer — light, no dark background ---- */
.ds-footer {
  background: var(--white);
  color: var(--text-sec);
  border-top: 3px solid var(--accent);
  margin-top: 4rem;
}
.ds-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.75rem 1.5rem;
}
.ds-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.ds-footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .75rem;
}
.ds-footer-col a, .ds-footer-col p {
  display: block;
  font-size: .82rem;
  color: var(--text-sec);
  margin-bottom: .35rem;
  line-height: 1.5;
}
.ds-footer-col a:hover { color: var(--accent); }
.ds-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  color: var(--muted);
}
.ds-footer-bottom a { color: var(--text-sec); }
.ds-footer-bottom a:hover { color: var(--accent); }

/* ---- Cookie banner ---- */
.ds-cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 2rem));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 1.25rem 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.ds-cookie-banner p { font-size: .87rem; color: var(--text-sec); line-height: 1.6; }
.ds-cookie-banner a { color: var(--accent); text-decoration: underline; }
.ds-cookie-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.ds-cookie-accept {
  padding: .55rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s;
}
.ds-cookie-accept:hover { background: var(--accent-hover); }
.ds-cookie-decline {
  padding: .55rem 1.25rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.ds-cookie-decline:hover { border-color: var(--text); color: var(--text); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .ds-nav { display: none; }
  .ds-hamburger { display: block; }
  .ds-header-inner { padding: 0 1.25rem; }
  .ds-wrap, .ds-hero, .ds-section { padding-left: 1.25rem; padding-right: 1.25rem; }
  article.wrap, .ds-author { padding-left: 1.25rem; padding-right: 1.25rem; }
  .article-hero .wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
  .topbar { flex-direction: column; gap: .3rem; text-align: center; font-size: .7rem; }
  .topbar .trust-badges { justify-content: center; gap: .75rem; }
  .ds-grid { grid-template-columns: 1fr; }
  article h2 { font-size: 1.25rem; }
  .ds-footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .ds-header-inner { height: 56px; }
  article.wrap { padding: 0 1rem 2rem; }
  .article-hero .wrap { padding: 0 1rem; }
  .ds-table tbody td, .ds-table thead th { padding: .55rem .7rem; font-size: .82rem; }
  .ds-cookie-banner { padding: 1rem 1.25rem; }
}
