:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --primary-soft: #eff6ff;
  --emerald: #047857;
  --emerald-soft: #ecfdf5;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); border: 0;
}

/* Topbar */
.topbar {
  background: var(--ink);
  color: #cbd5e1;
  font-size: 0.8125rem;
  padding: 6px 0;
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.region-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}
.region-pill {
  color: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #334155;
  font-weight: 600;
  font-size: 0.75rem;
}
.region-pill.active, .region-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  text-decoration: none;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9375rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--primary);
  text-decoration: none;
}
.nav-links a.btn-primary, .nav-links a.btn-primary:hover {
  color: #ffffff;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover { background: var(--primary-dark); color: #ffffff; }
.btn-emerald {
  background: var(--emerald);
  color: #ffffff;
}
.btn-emerald:hover { background: #065f46; color: #ffffff; }
.btn-outline {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { background: var(--surface-alt); }
.btn-sm { padding: 7px 13px; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

/* Main Article Layout */
main { padding: 28px 0 64px; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumbs a { color: var(--muted); }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.badge-blue { background: var(--primary-soft); color: var(--primary-dark); border-color: #bfdbfe; }
.badge-green { background: var(--emerald-soft); color: var(--emerald); border-color: #a7f3d0; }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: #fde68a; }

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); margin: 0 0 18px; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); margin: 34px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 1.15rem; margin: 22px 0 8px; }

/* Rank #0 Kurz-Fazit */
.kurz-fazit {
  background: var(--surface);
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 22px;
  box-shadow: var(--shadow);
}
.kurz-fazit-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.kurz-fazit p { margin: 0; color: var(--ink); font-weight: 500; }

/* Hero Media */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-card figcaption {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
}

/* Interactive Tool / Konfigurator Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.panel-title { margin: 0; font-size: 1.15rem; color: var(--ink); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
label.field-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}
select, input[type="text"], textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  background: #ffffff;
}
textarea { font-family: var(--font-mono); font-size: 0.84rem; min-height: 150px; }

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice-btn {
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  background: var(--surface);
  color: var(--ink);
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.choice-btn[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.preview-box {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  white-space: pre-wrap;
  margin: 12px 0;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 540px;
}
th, td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--surface-alt);
  color: var(--ink);
  font-weight: 700;
}
tr:last-child td { border-bottom: none; }

/* Pricing Section & Cards */
.mini-pricing-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.mini-tier {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  color: var(--ink);
  display: block;
}
.mini-tier:hover { border-color: var(--primary); text-decoration: none; }
.mini-tier.featured {
  background: var(--primary-soft);
  border-color: #93c5fd;
}
.mini-tier span { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.mini-tier strong { display: block; font-size: 0.98rem; color: var(--ink); font-weight: 800; }

.pricing-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 26px;
  box-shadow: var(--shadow);
}
.pricing-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 4px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
}
.price-card.featured {
  border-color: var(--primary);
  border-top: 4px solid var(--primary);
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 42%);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.14);
}
.price-val { font-size: 1.75rem; font-weight: 800; color: var(--ink); margin: 8px 0 4px; letter-spacing: -0.02em; }
.price-sub { font-size: 0.84rem; color: var(--muted); margin-bottom: 6px; }

/* Article Layout & Cards */
.article-body {
  max-width: 820px;
}
.callout {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 18px 0;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}
.callout-green { background: var(--emerald-soft); border-color: #a7f3d0; color: #064e3b; }
.callout-amber { background: var(--amber-soft); border-color: #fde68a; color: #78350f; }

.svg-diagram {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 18px 0;
  overflow-x: auto;
}

.check-list {
  padding-left: 20px;
  margin: 12px 0;
}
.check-list li { margin-bottom: 6px; }

pre.code-block {
  background: #0f172a;
  color: #f8fafc;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

/* FAQ Accordion */
.faq-list { display: grid; gap: 10px; margin: 16px 0 28px; }
details.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
}
details.faq-item summary {
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
details.faq-item p { margin: 10px 0 0; }

/* Internal Link Grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.related-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  font-weight: 600;
}
.related-card small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  color: var(--muted);
}
.related-card:hover {
  border-color: var(--primary);
  text-decoration: none;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 36px 0 76px;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.footer-grid h4 { color: #ffffff; margin: 0 0 10px; font-size: 0.95rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid a { color: #cbd5e1; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
}

/* Sticky Mobile CTA */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  z-index: 50;
  box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08);
}

@media (max-width: 960px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 12px;
  }
  .nav-links.open { display: flex; }
  .mobile-sticky-cta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
}

@media (max-width: 540px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .mini-pricing-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { font-size: 0.74rem; padding: 5px 0; }
  main { padding: 18px 0 64px; }
}
