/* ==========================================================================
   Balkonakku - main.css
   Aesthetik: "Werkstatt trifft Solarpark"
   Dichte, technisch, lesbar. Keine KI-Weichzeichner.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Farben */
  --c-primary: #1a1f2e;
  --c-primary-80: #2a3142;
  --c-primary-60: #4a5162;
  --c-ink: #1a1f2e;
  --c-ink-muted: #4a5162;
  --c-ink-subtle: #6b7280;
  --c-accent: #f4c430;
  --c-accent-dark: #c99a0f;
  --c-secondary: #2b6cb0;
  --c-secondary-dark: #1e4e8c;
  --c-warn: #c53030;
  --c-good: #2f855a;
  --c-good-bg: #f0fdf4;
  --c-warn-bg: #fef2f2;
  --c-info-bg: #eff6ff;
  --c-bg: #fafafa;
  --c-surface: #ffffff;
  --c-border: #e2e8f0;
  --c-border-strong: #cbd5e1;

  /* Typografie */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-base: 1.0625rem; /* 17px */
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  /* Raster */
  --wrap: 72rem;
  --wrap-reading: 42rem;
  --gap: 1rem;
  --gap-lg: 2rem;
  --gap-xl: 3rem;

  /* Radii + Borders */
  --r-card: 8px;
  --r-btn: 4px;
  --border: 1px solid var(--c-border);
  --border-strong: 1px solid var(--c-border-strong);

  /* Shadows (sparsam, industriell) */
  --shadow-sm: 0 1px 0 rgba(26, 31, 46, 0.04), 0 1px 2px rgba(26, 31, 46, 0.04);
  --shadow-md: 0 1px 0 rgba(26, 31, 46, 0.06), 0 4px 12px rgba(26, 31, 46, 0.06);

  /* Transitions */
  --tx: 160ms ease;
}

/* --------------------------------------------------------------------------
   2. Reset + Basics
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (min-width: 768px) {
  html { font-size: var(--fs-base); }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--lh-normal);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a {
  color: var(--c-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--tx);
}
a:hover { color: var(--c-secondary-dark); }
a:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--c-primary);
  margin: 0 0 0.6em;
}
h1 { font-size: var(--fs-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-2xl); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-xl); }
p { margin: 0 0 1em; }
small { font-size: var(--fs-sm); }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: 0.95em; }
code {
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  border: 1px solid var(--c-border);
}
pre {
  background: var(--c-primary);
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: var(--r-card);
  overflow-x: auto;
  line-height: 1.55;
}
pre code { background: transparent; border: 0; padding: 0; }
hr {
  border: 0;
  border-top: 1px solid var(--c-border);
  margin: 2rem 0;
}
::selection { background: var(--c-accent); color: var(--c-primary); }

/* --------------------------------------------------------------------------
   3. Wrapper + Layout-Utilities
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.wrap--reading { max-width: var(--wrap-reading); }
@media (min-width: 768px) {
  .wrap { padding-inline: 2rem; }
}

.site-main { min-height: 60vh; padding-block: 0; }

/* --------------------------------------------------------------------------
   4. Site Header
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--c-primary);
  color: #fff;
  border-bottom: 3px solid var(--c-accent);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
}
.site-header__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.site-header__wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}
.site-header__logo:hover .logo-text { color: var(--c-accent); }
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  transition: color var(--tx);
}
.logo-tagline {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.site-header__burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
}
.site-header__burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  transition: transform var(--tx), opacity var(--tx);
}
.site-header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) {
  .site-header__burger { display: none; }
}

/* --------------------------------------------------------------------------
   5. Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
  margin: 1.5rem 0 1rem;
  font-size: var(--fs-sm);
  color: var(--c-ink-muted);
}
.breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  margin-right: 0.35rem;
  color: var(--c-ink-subtle);
}
.breadcrumb__item a {
  color: var(--c-ink-muted);
  text-decoration: none;
}
.breadcrumb__item a:hover { color: var(--c-secondary); text-decoration: underline; }
.breadcrumb__item--current { color: var(--c-ink); }

/* --------------------------------------------------------------------------
   6. Hero (Homepage)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--c-primary);
  color: #f1f5f9;
  padding: 3.5rem 0 3rem;
  overflow: hidden;
  border-bottom: 1px solid #0f131d;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(244, 196, 48, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 196, 48, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__overline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin: 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--c-accent);
}
.hero__title {
  color: #fff;
  font-size: clamp(1.875rem, 5vw, var(--fs-4xl));
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 38rem;
  margin: 0 0 1rem;
}
.hero__lede {
  max-width: 42rem;
  color: #cbd5e1;
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  margin: 0 0 2rem;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 1.25rem;
  max-width: 42rem;
}
.hero__meta-item {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}
.hero__meta-key {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero__meta-val {
  font-size: var(--fs-sm);
  color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   7. Pillar-Navigation auf der Homepage
   -------------------------------------------------------------------------- */
.pillars {
  padding-block: 3rem 4rem;
}
.pillars__header {
  margin: 0 0 2rem;
  max-width: 48rem;
}
.pillars__overline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-secondary);
  margin: 0 0 0.5rem;
}
.pillars__title {
  font-size: var(--fs-2xl);
  margin: 0;
}
.pillars__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .pillars__list { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
.pillar-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--r-card);
  transition: transform var(--tx), box-shadow var(--tx), border-color var(--tx);
}
.pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-border-strong);
  border-left-color: var(--c-accent);
}
.pillar-card__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  color: inherit;
  text-decoration: none;
}
.pillar-card__num {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--c-border-strong);
  line-height: 1;
  transition: color var(--tx);
}
.pillar-card:hover .pillar-card__num { color: var(--c-accent-dark); }
.pillar-card__body { min-width: 0; }
.pillar-card__title {
  margin: 0 0 0.35rem;
  font-size: var(--fs-xl);
  color: var(--c-primary);
}
.pillar-card__desc {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--c-ink-muted);
  line-height: var(--lh-snug);
}
.pillar-card__arrow {
  font-size: 1.5rem;
  color: var(--c-ink-subtle);
  transition: transform var(--tx), color var(--tx);
}
.pillar-card:hover .pillar-card__arrow {
  color: var(--c-primary);
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   8. Section-List (list.html)
   -------------------------------------------------------------------------- */
.section-list {
  padding-block: 2rem 4rem;
}
.section-list__header {
  margin: 1rem 0 2.5rem;
  max-width: 42rem;
}
.section-list__overline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-secondary);
  margin: 0 0 0.5rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--c-accent);
}
.section-list__title {
  font-size: var(--fs-3xl);
  margin: 0 0 0.75rem;
}
.section-list__lede {
  color: var(--c-ink-muted);
  font-size: var(--fs-lg);
  margin: 0;
}
.section-list__intro { color: var(--c-ink-muted); }

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: 1fr 1fr 1fr; } }
.card-grid__item { margin: 0; }

.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem 1.25rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  color: inherit;
  text-decoration: none;
  height: 100%;
  transition: border-color var(--tx), transform var(--tx), box-shadow var(--tx);
  overflow: hidden;
}
.entry-card__rule {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--c-border);
  transition: background var(--tx);
}
.entry-card:hover {
  border-color: var(--c-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.entry-card:hover .entry-card__rule { background: var(--c-accent); }
.entry-card__overline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-secondary);
  margin: 0;
}
.entry-card__title {
  margin: 0;
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  color: var(--c-primary);
}
.entry-card__desc {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--c-ink-muted);
  line-height: var(--lh-snug);
  flex: 1;
}
.entry-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-secondary-dark);
}
.entry-card__cta::after {
  content: "\2192";
  transition: transform var(--tx);
}
.entry-card:hover .entry-card__cta::after { transform: translateX(3px); }

.empty-state {
  padding: 2rem;
  background: var(--c-surface);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-card);
  text-align: center;
  color: var(--c-ink-muted);
}

/* --------------------------------------------------------------------------
   9. Article (single.html)
   -------------------------------------------------------------------------- */
.article { padding-block: 2rem 4rem; }
.article__header {
  margin: 1rem 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--c-border);
}
.article__overline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-secondary);
  margin: 0 0 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--c-accent);
}
.article__title {
  font-size: clamp(1.875rem, 4vw, var(--fs-3xl));
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
.article__lede {
  font-size: var(--fs-lg);
  color: var(--c-ink-muted);
  margin: 0 0 1rem;
  line-height: var(--lh-normal);
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: var(--fs-sm);
  color: var(--c-ink-subtle);
  font-family: var(--font-mono);
}
.article__author::before { content: "\00b7\00a0"; }

/* --------------------------------------------------------------------------
   10. Prose (Content body)
   -------------------------------------------------------------------------- */
.prose {
  font-size: 1rem;
  line-height: var(--lh-relaxed);
  color: var(--c-ink);
}
@media (min-width: 768px) { .prose { font-size: var(--fs-base); } }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2em;
  font-size: var(--fs-2xl);
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--c-border);
}
.prose h3 {
  margin-top: 1.8em;
  font-size: var(--fs-xl);
}
.prose h4 {
  margin-top: 1.6em;
  font-size: var(--fs-lg);
}
.prose a { color: var(--c-secondary); }
.prose a:hover { color: var(--c-secondary-dark); }
.prose strong { color: var(--c-primary); font-weight: 700; }
.prose ul, .prose ol {
  padding-left: 1.4em;
  margin: 0 0 1em;
}
.prose ul li, .prose ol li { margin-bottom: 0.4em; }
.prose ul li::marker { color: var(--c-accent-dark); }
.prose blockquote {
  margin: 1.5em 0;
  padding: 0.5em 1.25em;
  border-left: 4px solid var(--c-accent);
  background: #fffbea;
  color: var(--c-ink);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img {
  border-radius: var(--r-card);
  border: 1px solid var(--c-border);
  margin: 1.5em 0;
}
.prose figure { margin: 1.5em 0; }
.prose figcaption {
  margin-top: 0.5em;
  font-size: var(--fs-sm);
  color: var(--c-ink-subtle);
  text-align: center;
  font-family: var(--font-mono);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: var(--fs-sm);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.prose th, .prose td {
  padding: 0.65em 0.85em;
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.prose tr:last-child td { border-bottom: 0; }
.prose tr:nth-child(even) td { background: #f8fafc; }

/* --------------------------------------------------------------------------
   11. Komponenten: Buttons + CTAs
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--tx), color var(--tx), border-color var(--tx), transform var(--tx);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--c-accent);
  color: var(--c-primary);
  border-color: var(--c-accent-dark);
}
.btn--primary:hover { background: #fbd04f; color: var(--c-primary); }
.btn--secondary {
  background: var(--c-primary);
  color: #fff;
}
.btn--secondary:hover { background: var(--c-primary-80); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-border-strong);
}
.btn--ghost:hover { border-color: var(--c-primary); }

/* Sections 12-14 (product-card, compare-table, pros-cons) removed in Plan 2
   polish-pass — superseded by sections 22-24 with matching shortcode markup. */

/* --------------------------------------------------------------------------
   15. Komponenten: FAQ-Accordion (details)
   -------------------------------------------------------------------------- */
.faq { margin: 1.5em 0; }
.faq details {
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-surface);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.faq details[open] {
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--c-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--c-ink-subtle);
  transition: transform var(--tx), color var(--tx);
}
.faq details[open] summary::after {
  content: "\2212";
  color: var(--c-accent-dark);
}
.faq summary:hover { background: #f8fafc; }
.faq details > *:not(summary) {
  padding: 0 1.25rem 1rem;
  color: var(--c-ink-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

/* --------------------------------------------------------------------------
   16. Komponenten: Affiliate-Disclosure
   -------------------------------------------------------------------------- */
.affiliate-disclosure {
  padding: 0.85rem 1rem 0.85rem 3rem;
  background: var(--c-info-bg);
  border: 1px solid #dbeafe;
  border-left: 4px solid var(--c-secondary);
  border-radius: var(--r-btn);
  margin: 1.25em 0;
  font-size: var(--fs-sm);
  color: var(--c-primary);
  line-height: var(--lh-snug);
  position: relative;
}
.affiliate-disclosure::before {
  content: "i";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-secondary);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   17. Komponenten: Warning / Good Callouts
   -------------------------------------------------------------------------- */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--r-card);
  border: 1px solid var(--c-border);
  margin: 1.25em 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}
.callout--warn { background: var(--c-warn-bg); border-color: #fecaca; border-left: 4px solid var(--c-warn); }
.callout--good { background: var(--c-good-bg); border-color: #bbf7d0; border-left: 4px solid var(--c-good); }
.callout--info { background: var(--c-info-bg); border-color: #dbeafe; border-left: 4px solid var(--c-secondary); }

/* --------------------------------------------------------------------------
   18. Mega-Menu (desktop nav + mobile drawer)
   -------------------------------------------------------------------------- */
.mega-menu {
  width: 100%;
  display: none;
}
.mega-menu[data-open="true"] { display: block; }
@media (min-width: 900px) {
  .mega-menu {
    display: block;
    width: auto;
    flex: 1 1 auto;
  }
}
.mega-menu__list {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
@media (min-width: 900px) {
  .mega-menu__list {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 1.75rem;
    padding: 0;
  }
}
.mega-menu__item {
  position: relative;
}
.mega-menu__link {
  display: inline-block;
  padding: 0.5rem 0.25rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  transition: color var(--tx), border-color var(--tx);
}
.mega-menu__link:hover,
.mega-menu__link:focus-visible {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}
.mega-menu__link--accent {
  color: var(--c-primary);
  background: var(--c-accent);
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  font-weight: 700;
}
.mega-menu__link--accent:hover,
.mega-menu__link--accent:focus-visible {
  background: #ffd54a;
  color: var(--c-primary);
  border-bottom-color: transparent;
}
.mega-menu__dropdown {
  display: none;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 2px solid var(--c-accent);
  margin: 0.25rem 0 0.5rem;
}
.mega-menu__item:hover .mega-menu__dropdown,
.mega-menu__item:focus-within .mega-menu__dropdown {
  display: block;
}
@media (min-width: 900px) {
  .mega-menu__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 640px;
    background: var(--c-surface);
    color: var(--c-primary);
    border: 1px solid var(--c-border);
    border-top: 2px solid var(--c-accent);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 0;
  }
  .mega-menu__item:hover .mega-menu__dropdown,
  .mega-menu__item:focus-within .mega-menu__dropdown {
    display: grid;
  }
}
.mega-menu__col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  color: var(--c-secondary);
  margin: 0 0 0.5rem;
}
.mega-menu__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-menu__col li { margin-bottom: 0.35rem; }
.mega-menu__col a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
}
@media (min-width: 900px) {
  .mega-menu__col a { color: var(--c-primary); }
}
.mega-menu__col a:hover,
.mega-menu__col a:focus-visible {
  color: var(--c-secondary);
  text-decoration: underline;
}
.mega-menu__col--feature { display: flex; align-items: flex-end; }
.mega-menu__all {
  display: inline-block;
  color: var(--c-accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  font-weight: 700;
}
@media (min-width: 900px) {
  .mega-menu__all { color: var(--c-secondary); }
}
.mega-menu__all:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   19. Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 4rem;
  background: var(--c-primary);
  color: #94a3b8;
  padding: 2.5rem 0 1.5rem;
  border-top: 3px solid var(--c-accent);
}
.site-footer__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.site-footer__col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--c-accent);
  margin: 0 0 0.75rem;
}
.site-footer__col p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #cbd5e1;
}
.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
}
.site-footer a:hover { color: var(--c-accent); text-decoration: underline; }
.site-footer__legal {
  max-width: 72rem;
  margin: 2rem auto 0;
  padding: 1.25rem 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: #64748b;
}
.site-footer__legal p { margin: 0; }

/* --------------------------------------------------------------------------
   20. Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--c-ink-muted); }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   21. Affiliate Link (Plan 2)
   -------------------------------------------------------------------------- */
.aff-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.1rem 0;
}
.aff-link__btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color var(--tx), color var(--tx), border-color var(--tx);
}
.aff-link__btn--primary {
  background: var(--c-accent);
  color: var(--c-primary);
  border-color: var(--c-accent);
}
.aff-link__btn--primary:hover { background: #ffd54a; }
.aff-link__btn--secondary {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-border);
}
.aff-link__btn--secondary:hover {
  background: var(--c-primary);
  color: #fff;
}
.aff-link__note {
  font-size: 0.75rem;
  color: var(--c-ink-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.shortcode-error {
  color: var(--c-warn);
  background: #fff5f5;
  border: 1px solid var(--c-warn);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   22. Product Card (Plan 2)
   -------------------------------------------------------------------------- */
.product-card {
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  background: var(--c-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.product-card__head {
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 0.75rem;
}
.product-card__overline {
  margin: 0;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-secondary);
}
.product-card__title {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--c-primary);
}
.product-card__specs {
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .product-card__specs { grid-template-columns: 1fr 1fr; }
}
.product-card__specs .spec {
  display: flex;
  flex-direction: column;
  border-bottom: 1px dashed var(--c-border);
  padding-bottom: 0.3rem;
}
.product-card__specs dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-ink-muted);
  font-family: var(--font-mono);
}
.product-card__specs dd {
  margin: 0.1rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-primary);
}
.product-card__specs small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-ink-muted);
  font-family: var(--font-mono);
}
.product-card__features {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.product-card__features li {
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  background: #f0f4f7;
  color: var(--c-primary);
  border-radius: 4px;
  font-family: var(--font-mono);
}
.product-card__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--c-border);
  padding-top: 1rem;
}
.product-card__updated {
  margin-left: auto;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--c-ink-muted);
}

/* --------------------------------------------------------------------------
   23. Pros/Cons (Plan 2)
   -------------------------------------------------------------------------- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (min-width: 640px) {
  .pros-cons { grid-template-columns: 1fr 1fr; }
}
.pros-cons__col {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--c-border);
}
.pros-cons__col--pro {
  background: #f0fdf4;
  border-left: 4px solid var(--c-good);
}
.pros-cons__col--con {
  background: #fef2f2;
  border-left: 4px solid var(--c-warn);
}
.pros-cons__title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.pros-cons__col--pro .pros-cons__title { color: var(--c-good); }
.pros-cons__col--con .pros-cons__title { color: var(--c-warn); }
.pros-cons__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.pros-cons__list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.pros-cons__col--pro .pros-cons__list li::before {
  content: "+";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--c-good);
}
.pros-cons__col--con .pros-cons__list li::before {
  content: "-";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--c-warn);
}

/* --------------------------------------------------------------------------
   24. Comparison Table (Plan 2)
   -------------------------------------------------------------------------- */
.compare-wrap {
  margin: 2rem 0;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--c-border);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 560px;
}
.compare thead th {
  position: sticky;
  top: 0;
  background: var(--c-primary);
  color: #fff;
  padding: 0.75rem;
  text-align: left;
  font-size: 0.9rem;
  z-index: 1;
}
.compare tbody th {
  padding: 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-ink-muted);
  font-family: var(--font-mono);
  background: #fafafa;
  border-top: 1px solid var(--c-border);
  text-align: left;
  font-weight: 500;
}
.compare tbody td {
  padding: 0.75rem;
  border-top: 1px solid var(--c-border);
  font-weight: 600;
  color: var(--c-primary);
}
.compare__win {
  background: #f0fdf4;
  color: var(--c-good);
}
.compare__win::before {
  content: "\2713 ";
  color: var(--c-good);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   25. Compatibility Matrix (Plan 2)
   -------------------------------------------------------------------------- */
.matrix-widget {
  margin: 2rem 0 3rem;
}
.matrix-widget__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f0f4f7;
  border-radius: 8px;
  border-left: 4px solid var(--c-secondary);
}
.matrix-widget__label {
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.matrix-widget__controls select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  min-width: 200px;
}
.matrix-widget__reset {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--c-border);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}
.matrix-widget__reset:hover { background: var(--c-primary); color: #fff; }
.matrix-widget__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}
.matrix-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.matrix-table thead th {
  background: var(--c-primary);
  color: #fff;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.matrix-table__inv { white-space: nowrap; }
.matrix-table__inv--active {
  background: var(--c-accent);
  color: var(--c-primary);
}
.matrix-table tbody th {
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--c-primary);
  background: #fafafa;
  border-top: 1px solid var(--c-border);
  white-space: nowrap;
}
.matrix-table tbody td {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--c-border);
  text-align: center;
}
.matrix-cell--ja { background: #f0fdf4; color: var(--c-good); font-weight: 700; }
.matrix-cell--mit_adapter { background: #fef3c7; color: #92400e; font-weight: 600; }
.matrix-cell--nein { background: #fef2f2; color: var(--c-warn); font-weight: 600; }
.matrix-table__row--incompat {
  opacity: 0.35;
}
.matrix-widget__note {
  margin-top: 0.75rem;
  color: var(--c-ink-muted);
}

/* --------------------------------------------------------------------------
   26. Decision Tree Widget (Plan 2)
   -------------------------------------------------------------------------- */
.dtree {
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-secondary);
  background: #fafcff;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
}
.dtree__title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--c-primary);
}
.dtree__question {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--c-primary);
}
.dtree__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .dtree__options { flex-direction: row; flex-wrap: wrap; }
}
.dtree__option,
.dtree__restart {
  padding: 0.6rem 1rem;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-primary);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  text-align: left;
  transition: background var(--tx), color var(--tx), border-color var(--tx);
}
.dtree__option:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
}
.dtree__restart {
  margin-top: 1rem;
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.dtree__restart:hover { background: #000; }
.dtree__result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-secondary);
  font-family: var(--font-mono);
  margin: 0;
}
.dtree__result-title {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.3rem;
  color: var(--c-primary);
}
.dtree__result-summary {
  margin: 0 0 1rem;
  color: var(--c-ink-muted);
  line-height: 1.5;
}
.dtree__result-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   27. Article Body + TOC + FAQ + Related (Plan 3)
   -------------------------------------------------------------------------- */
.article {
  padding: 2rem 0 4rem;
}
.article-header { margin-bottom: 1.5rem; }
.article-header__overline {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  color: var(--c-secondary);
}
.article-header__title {
  margin: 0.25rem 0 0.75rem;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--c-primary);
}
@media (min-width: 768px) {
  .article-header__title { font-size: 2.5rem; }
}
.article-header__lede {
  font-size: 1.15rem;
  color: var(--c-ink-muted);
  margin: 0 0 1rem;
  max-width: 42rem;
}
.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}
.article-header__meta-item {
  display: inline-flex;
  gap: 0.4rem;
}
.meta-key {
  color: var(--c-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.meta-val { color: var(--c-primary); font-weight: 600; }

.article-hero {
  margin: 2rem 0;
}
.article-hero img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--c-border);
}
.article-hero figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  text-align: center;
}

.article-toc {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: #f0f4f7;
  border-left: 4px solid var(--c-secondary);
  border-radius: 8px;
}
.article-toc__title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-secondary);
}
.article-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.article-toc li { margin-bottom: 0.25rem; }
.article-toc li li { margin-left: 1rem; }
.article-toc a {
  color: var(--c-primary);
  text-decoration: none;
  font-size: 0.95rem;
}
.article-toc a:hover { color: var(--c-secondary); text-decoration: underline; }

.article-body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--c-primary);
}
.article-body h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--c-accent);
  padding-bottom: 0.4rem;
}
.article-body h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.25rem;
}
.article-body p { margin: 0 0 1rem; }
.article-body ul, .article-body ol { margin: 0 0 1rem 1.5rem; }
.article-body li { margin-bottom: 0.35rem; }
.article-body a {
  color: var(--c-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover { color: var(--c-primary); }
.article-body figure { margin: 1.5rem 0; }
.article-body figure img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--c-border);
}
.article-body figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  text-align: center;
}
.article-body blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--c-secondary);
  background: #f0f4f7;
  font-style: italic;
  color: var(--c-primary);
}

.article-faq {
  margin: 3rem 0 2rem;
  padding: 1.5rem;
  background: #fafafa;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}
.article-faq__title {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}
.faq-item {
  border-bottom: 1px solid var(--c-border);
  padding: 0.75rem 0;
}
.faq-item:last-child { border-bottom: 0; }
.faq-item__q {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  padding-right: 2rem;
  position: relative;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.4rem;
  color: var(--c-secondary);
}
.faq-item[open] .faq-item__q::after { content: "−"; }
.faq-item__a {
  margin-top: 0.5rem;
  color: var(--c-ink-muted);
  line-height: 1.6;
}
.faq-item__a p { margin: 0 0 0.5rem; }
.faq-item__a p:last-child { margin: 0; }

.article-related {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: #fafcff;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: 8px;
}
.article-related__title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--c-secondary);
}
.article-related__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.article-related__list li { margin-bottom: 0.35rem; }
.article-related__list a {
  color: var(--c-primary);
  text-decoration: none;
  font-weight: 600;
}
.article-related__list a:hover { color: var(--c-secondary); }

.article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  font-family: var(--font-mono);
}
