* {
  box-sizing: border-box;
}

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-soft: #f5f5f4;
  --text: #1c1917;
  --muted: #57534e;
  --border: #e7e5e4;
  --brand: #292524;
  --brand-soft: #44403c;
  --accent: #d97706;
  --accent-soft: #fef3c7;
  --link: #b45309;
  --warning: #fff7ed;
  --warning-border: #fed7aa;
  --danger: #fff1f2;
  --danger-border: #fecdd3;
  --success: #ecfdf5;
  --success-border: #bbf7d0;
  --radius: 6px;
  --shadow: 0 4px 16px rgba(28, 25, 23, 0.10);
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Theme "sentinel": eigenstaendige typografische + strukturelle Identitaet
   - Serifen-Ueberschriften (nur System-Schriften, kein externer Font),
   Versal-Kicker, flache kantige Karten mit oberem Akzentbalken statt der
   runden Schatten-Karten des Default-Themes. Klar von "default" (poolfux)
   unterscheidbar. */
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.01em;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.hero,
.article-hero {
  border-bottom: 4px solid var(--accent);
}

button,
.button {
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-grid article,
.summary-tile {
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 0;
  box-shadow: none;
}


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

.hero,
.article-hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: white;
  padding: 42px 0 36px;
}

.hero-inner {
  display: grid;
  gap: 18px;
}

.hero h1,
.article-hero h1 {
  font-size: 34px;
  line-height: 1.08;
  margin: 14px 0;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.hero-text {
  font-size: 18px;
  color: #dbeafe;
  max-width: 760px;
}

.article-byline {
  margin: 0 0 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.article-byline a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.badge,
.section-kicker,
.card-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge {
  background: rgba(255, 255, 255, 0.1);
  color: #bfdbfe;
  padding: 7px 12px;
  border-radius: 999px;
}

.section-kicker,
.card-label {
  color: var(--accent);
  margin-bottom: 8px;
}

.hero-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.button {
  display: inline-block;
  text-align: center;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--link);
  color: #ffffff;
  border-color: var(--link);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.button-primary:hover,
.button-primary:focus-visible {
  filter: brightness(0.93);
}

/* Kontext-Ausnahme: im dunklen Hero bleibt der Button weiss mit
   Markenschrift (dort waere ein Akzent-Button kontrastschwach). */
.hero .button-primary,
.article-hero .button-primary {
  background: #ffffff;
  color: var(--brand);
  border-color: #ffffff;
}

.button-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

.button-offer {
  display: block;
  background: var(--brand);
  color: white;
  margin-top: 14px;
}

.content-section,
.notice,
.article-content,
.article-block,
.cta {
  background: var(--surface);
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice {
  background: var(--warning);
  border-color: var(--warning-border);
}

.affiliate-disclosure {
  background: var(--success);
  border-color: var(--success-border);
}

.risk-section {
  background: var(--danger);
  border-color: var(--danger-border);
}

.buyer-guide {
  background: var(--accent-soft);
  border-color: #bae6fd;
}

/* DEV-062: Rechner-Kachel (Startseite) + Artikel-CTA-Block */
.article-card.tool-card {
  background: linear-gradient(135deg, var(--accent-soft, #e6f4f1), #ffffff);
  border: 2px solid var(--accent, #1f7a8c);
}
.article-card.tool-card .card-label { color: var(--accent, #1f7a8c); font-weight: 700; }
.article-card.tool-card .card-tool-link { display: inline-block; margin-top: 8px; }
.calc-cta {
  border: 2px solid var(--accent, #1f7a8c);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--accent-soft, #e6f4f1);
}
.calc-cta .button { margin-top: 6px; }
/* Schild "Empfehlung" auf Produkten, die der Betreiber selbst nutzt */
.product-box-recommended {
  border: 2px solid var(--link);
}
.product-recommendation-badge {
  display: inline-block;
  margin: 6px 0 2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--link);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Vergleichstabelle (Marktueberblick-Artikel) */
.comparison-block .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}
.comparison-table th,
.comparison-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.comparison-table thead th {
  background: var(--surface-soft);
  font-weight: 700;
  position: sticky;
  top: 0;
}
.comparison-table tbody th {
  font-weight: 700;
  white-space: nowrap;
}
.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}
.comparison-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.product-box-section {
  background: #f8fafc;
}

h2,
h3 {
  line-height: 1.2;
}

h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

h3 {
  margin: 0 0 8px;
}

p {
  color: var(--muted);
}

a {
  /* Marco-Fix 2026-08-16: Links waren in --brand (fast schwarz) und damit im
     Fliesstext nicht als Link erkennbar - jetzt kontraststarke Akzentfarbe. */
  color: var(--link);
  font-weight: 700;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.topic-pill {
  display: inline-block;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand);
  text-decoration: none;
  border: 1px solid var(--border);
}

.card-grid,
.product-grid,
.product-box-grid {
  display: grid;
  gap: 14px;
}

.article-card,
.product-card,
.product-box,
.product-empty-state,
.faq-item {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.product-box {
  background: white;
  border: 1px solid #bfdbfe;
}

.article-card p,
.product-card p,
.product-box p {
  margin-bottom: 12px;
}

.card-link {
  display: inline-block;
  margin-top: 4px;
}

.product-status {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.product-meta {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.affiliate-note {
  font-size: 13px;
  color: #64748b;
}

.affiliate-star {
  color: var(--accent);
  font-size: 16px;
  margin-left: 3px;
}

.affiliate-star-disclosure {
  background: var(--success);
  border: 1px solid var(--success-border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.footer-nav a {
  color: var(--link);
  text-decoration: underline;
}

.source-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px;
  margin: 14px 0;
  color: var(--text);
  font-size: 14px;
}

.source-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.source-box-warning {
  background: var(--warning);
  border-color: var(--warning-border);
}

.symbol-image {
  margin: 18px 0;
}

.symbol-image {
  /* DEV-029: Symbolbilder wirkten in voller Containerbreite riesig -
     zentriert und in der Breite begrenzt, damit sie dekorativ statt
     dominant sind. object-fit erhaelt das Seitenverhaeltnis (kein
     Stauchen). */
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.symbol-image img {
  display: block;
  width: 100%;
  /* DEV-031 Teil B: explizite proportionale Skalierung (Strategy-
     Vorgabe) - Bild kann nie breiter als sein Container werden und
     skaliert mit der Viewport-Breite mit. */
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border-radius: 14px;
}

.symbol-image-hero {
  /* Startseiten-Hero (1536x1024) darf etwas breiter sein als die
     quadratischen Artikelbilder, bleibt aber flach/bannerartig. */
  max-width: 760px;
}

.symbol-image-hero img {
  max-height: 260px;
}

@media (max-width: 640px) {
  .symbol-image img,
  .symbol-image-hero img {
    /* DEV-031 Teil B: auf schmalen Viewports zusaetzlich enger als die
       DEV-029-Grenze, damit das Bild dekorativ bleibt. */
    max-height: 180px;
  }
}

.symbol-image-full img {
  width: auto;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

.symbol-image figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.symbol-image-full figcaption {
  text-align: center;
}

.footnote-ref {
  font-size: 0.75em;
  line-height: 0;
}

.footnote-ref a {
  color: var(--brand);
  text-decoration: none;
  padding-left: 1px;
}

.footnote-section {
  font-size: 14px;
}

.footnote-list {
  padding-left: 20px;
  margin: 8px 0 0;
}

.footnote-list li {
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.footnote-list li:target {
  background: #fef9c3;
  border-radius: 6px;
}

.footnote-extra-label {
  margin: 14px 0 4px;
  color: var(--muted);
}

.footnote-extra-list {
  padding-left: 20px;
  margin: 0;
}

.footnote-extra-list li {
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.matching-explanation {
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  padding: 12px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 14px;
}

.guide-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.guide-steps div {
  background: white;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #bae6fd;
}

.check-list {
  padding-left: 20px;
}

.check-list li {
  margin: 8px 0;
}

.article-content {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.article-content h2,
.article-content h3 {
  letter-spacing: 0;
}

.article-block {
  box-shadow: var(--shadow);
}

.cta {
  background: var(--accent-soft);
  border-color: #bae6fd;
}

.back-link {
  margin: 22px 0;
}

footer {
  color: #64748b;
  font-size: 14px;
  padding: 24px 0;
}

.footer-inner {
  border-top: 1px solid var(--border);
}

@media (min-width: 700px) {
  .container {
    padding: 24px;
  }

  .hero,
  .article-hero {
    padding: 68px 0 58px;
  }

  .hero h1,
  .article-hero h1 {
    font-size: 48px;
  }

  .hero-actions {
    display: flex;
  }

  .content-section,
  .notice,
  .article-block,
  .cta {
    padding: 26px;
    margin: 24px 0;
  }

  .card-grid,
  .product-grid,
  .product-box-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .card-grid,
  .product-grid,
  .product-box-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Consent-Overlay: mittig, mit abgedunkeltem Hintergrund, hoher z-index -
   damit die Wahl sofort wahrgenommen wird und getroffen werden muss, bevor
   weitergelesen wird. Kein Schliessen durch Klick auf den Hintergrund. */
.consent-banner {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner-inner {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  background: var(--brand);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
}

.consent-banner-inner > * {
  flex-shrink: 0;
}

.consent-banner-inner p {
  margin: 0;
  color: inherit;
  font-size: 15px;
  line-height: 1.55;
}

.consent-banner-inner a {
  color: #fff;
  text-decoration: underline;
}

.consent-actions {
  display: flex;
  gap: 12px;
}

.consent-actions .button-consent {
  flex: 1 1 0;
}

/* DEV-047 (BANNER-AUFTRAG.md): drei Buttons gleicher Groesse auf derselben
   Ebene. "Alle akzeptieren" ist als EINZIGER gefuellt hervorgehoben
   (.button-consent-highlight); "Alle ablehnen" und "Informationen" sind
   deutlich umrandet, gleich gross, kontraststark, NICHT ausgegraut -
   Ablehnen bleibt genauso leicht erreichbar (kein Dark Pattern). */
.button-consent {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.button-consent:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.button-consent-highlight {
  background: #ffffff;
  color: var(--brand);
  border-color: #ffffff;
}

.consent-title {
  margin: 0;
  font-size: 19px;
  color: #ffffff;
}

.consent-links {
  margin: 0;
  font-size: 13px;
  text-align: center;
}

/* DEV-047: dauerhaft sichtbares Wieder-oeffnen-Icon unten links -
   oeffnet den Banner NICHT-destruktiv mit der gespeicherten Wahl. */
.consent-reopen {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.30);
}

.consent-reopen:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* DEV-045: 3-Kategorien-Auswahl (Banner-Einstellungs-Panel und
   Cookie-Einstellungen-Seite). Kein Vorankreuzen; "Notwendig" ist fest
   aktiv (checked + disabled). */
.consent-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

/* DEV-054 Fix 1.2: display:flex der Klasse schlug das hidden-Attribut
   (gleiche Spezifitaet, spaetere Autor-Regel gewinnt gegen den
   UA-Default) - die Kategorie-Checkboxen waren dadurch schon auf
   Ebene 1 des Banners sichtbar. Expliziter Override stellt das
   erwartete Verhalten wieder her. */
.consent-settings[hidden] {
  display: none;
}

.consent-category {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.consent-category input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.consent-actions {
  flex-wrap: wrap;
}

/* DEV-043: echte Betreiber-Fotos im Artikel (Human-Content). */
.article-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 14px 0;
}

.article-photo {
  margin: 0;
  flex: 1 1 220px;
  max-width: 340px;
}

.article-photo img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.article-photo figcaption {
  font-size: 13px;
  color: var(--muted, #64748b);
  margin-top: 6px;
}

/* Betreiber-Video: lokal ausgeliefert, ohne Autoplay und mit sichtbarem Hinweis. */
.article-video {
  margin: 18px 0;
}

.article-video figure {
  margin: 0;
}

.article-video video {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  border-radius: 12px;
  background: #0f172a;
}

.article-video figcaption,
.video-summary {
  font-size: 14px;
  color: var(--muted, #64748b);
  margin-top: 8px;
}

.video-notice {
  padding: 12px 14px;
  border-left: 4px solid var(--accent, #0f766e);
  background: #f0fdfa;
  color: #134e4a;
  border-radius: 8px;
}

/* DEV-042: Produktbild in der Produktbox. */
.product-image {
  margin: 12px 0;
  text-align: center;
}

.product-image img {
  max-width: 180px;
  max-height: 180px;
  width: auto;
  height: auto;
  border-radius: 8px;
  background: #fff;
}

.product-symbol-image img {
  width: 100%;
  max-width: 260px;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-symbol-image figcaption {
  margin-top: 6px;
  color: var(--muted, #64748b);
  font-size: 12px;
  line-height: 1.35;
}

/* DEV-044: kein harter Feed-Preis mehr - neutraler Hinweis am CTA-Button. */
.price-hint {
  font-size: 13px;
  color: var(--muted, #64748b);
  margin: 10px 0 4px 0;
}
