/* =============================================
   Compare scoped styles – Glasig (externalisiert)
   =============================================
   Namenskanon (nur neue Klassen):
     .compare-scope          · isoliert die Vergleichsseite logisch vom Rest
     .compare-container      · bündelt Inhalte im Maximalbreiten-Container
     .compare-table          · Abschnitt für Tabelle & mobile Karten (Scrollanker)
     .compare-weights-note   · Hinweistext unter den Gewichtungsreglern
     .compare-footer-copy    · kompakte Rechtszeile im Footer
   ============================================= */

/* -----------------------------------------------------------------
   1) Design Tokens – Farben, Abstände & Oberflächen
   ----------------------------------------------------------------- */
:root {
  --compare-max: 1180px;
  --compare-blue-700: #1e40af;
  --compare-blue-600: #2563eb;
  --compare-blue-500: #3b82f6;
  --compare-blue-300: #7dd3fc;
  --compare-cyan-500: #06b6d4;
  --compare-cyan-400: #22d3ee;
  --compare-accent: #2563eb;
  --compare-bg: #f7faff;
  --compare-text: #0f172a;
  --compare-glass: rgba(255, 255, 255, 0.6);
  --compare-border: rgba(2, 6, 23, 0.1);
  --compare-shadow: 0 14px 28px rgba(2, 6, 23, 0.06), 0 6px 14px rgba(2, 6, 23, 0.05);
  --compare-radius: 18px;
  --compare-gap: 18px;
  --compare-hero-grad: linear-gradient(108deg, #eaf6ff 0%, #e6f7ff 46%, #e0f2ff 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --compare-bg: #0b1220;
    --compare-text: #e5eaf5;
    --compare-glass: rgba(15, 23, 42, 0.55);
    --compare-border: rgba(148, 163, 184, 0.22);
    --compare-shadow: 0 18px 36px rgba(0, 0, 0, 0.4), 0 8px 20px rgba(0, 0, 0, 0.28);
  }
}

/* -----------------------------------------------------------------
   2) Grundgerüst – Body, Container, Typografie
   ----------------------------------------------------------------- */
html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--compare-bg);
  color: var(--compare-text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    Inter,
    'Helvetica Neue',
    Arial,
    'Noto Sans',
    'Apple Color Emoji',
    'Segoe UI Emoji';
  line-height: 1.6;
}

.compare-scope {
  isolation: isolate;
}

.compare-container {
  max-width: var(--compare-max);
  margin-inline: auto;
  padding-inline: 22px;
}

/* .compare-table – Abschnitt, der Tabelle & mobile Karten umschließt.
   Dient als Scrollanker für Navigation & Skip-Link. */
.compare-table {
  display: block;
  padding-top: 40px;
  scroll-margin-top: 88px;
}

h1 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.18;
  margin: 0 0 10px;
}

h2 {
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.22;
  margin: 0 0 10px;
}

h3 {
  font-size: clamp(17px, 1.8vw, 20px);
  margin: 0 0 8px;
}

p,
li,
label,
td,
th {
  font-size: clamp(15px, 1.05vw, 17px);
}

a {
  color: var(--compare-blue-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Skip-Link: springt direkt zur Tabelle */
.compare-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.compare-skip:focus {
  left: 16px;
  top: 10px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--compare-shadow);
}

/* -----------------------------------------------------------------
   3) Header & Navigation – Sticky Intro mit Glas-Optik
   ----------------------------------------------------------------- */
.compare-header.is-scrolled {
  box-shadow: 0 5px 14px rgba(2, 6, 23, 0.06);
}

.compare-header .compare-container {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 12px;
}

.compare-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: var(--compare-shadow);
}

.compare-title {
  font-weight: 700;
}

.compare-nav {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.compare-nav a {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.compare-nav a[aria-current='page'],
.compare-nav a:hover {
  border-color: var(--compare-border);
  background: var(--compare-glass);
}

@media (prefers-color-scheme: dark) {
  .compare-header {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.48));
  }
}

/* -----------------------------------------------------------------
   4) Hero-Bereich mit Suchleiste
   ----------------------------------------------------------------- */
.compare-hero {
  /*
  background: var(--compare-hero-grad);
  border-bottom: 1px solid var(--compare-border);
  */
}

.compare-hero .compare-container {
  padding-block: 44px;
}

.compare-hero-panel {
  background: var(--compare-glass);
  border: 1px solid var(--compare-border);
  border-radius: 16px;
  box-shadow: var(--compare-shadow);
  padding: 20px;
}

/* .compare-meta – Metainformationen im Hero. */
.compare-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  opacity: 0.9;
}

/* .compare-meta-tag – Pillenanzeige innerhalb des Meta-Blocks. */
.compare-meta .compare-meta-tag {
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--compare-border);
  background: rgba(255, 255, 255, 0.6);
}

/* .compare-searchbar – Formular zur Produktsuche. */
.compare-searchbar {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

/* .compare-searchbar-field – Wrapper für das Suchinput. */
.compare-searchbar .compare-searchbar-field {
  flex: 1;
  position: relative;
}

.compare-searchbar input[type='search'] {
  width: 100%;
  padding: 12px 14px 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--compare-border);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
}

/* .compare-searchbar-icon – Lupe als Deko-Icon. */
.compare-searchbar .compare-searchbar-icon {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 16px;
  opacity: 0.65;
}

/* .compare-searchbar-clear – Button zum Zurücksetzen der Suche. */
.compare-searchbar .compare-searchbar-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
}

.compare-searchbar button[type='button'] {
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--compare-blue-500), var(--compare-cyan-500));
  color: #fff;
  font-weight: 700;
  box-shadow: var(--compare-shadow);
  cursor: pointer;
}

.compare-search-hint {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 4px;
}

/* -----------------------------------------------------------------
   5) Filter-Werkzeuge über der Tabelle
   ----------------------------------------------------------------- */
/* .compare-tools – Filterleiste oberhalb der Tabelle. */
.compare-tools {
  padding-block: 14px;
}

/* .compare-tools-panel – Container für Filterchips & Anzeige. */
.compare-tools .compare-tools-panel {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--compare-glass);
  border: 1px solid var(--compare-border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--compare-shadow);
}

.compare-chip {
  border: 1px solid var(--compare-border);
  background: #fff;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.compare-chip[aria-pressed='true'] {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  box-shadow: inset 0 0 0 2px #bfdbfe;
}

/* Segmented radio-buttons (Bauart) */
.compare-segwrap {
  display: inline-flex;
  gap: 6px;
  margin: 0 8px;
  vertical-align: middle;
}

.compare-seg {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.compare-seg input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
}

.compare-seg span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--compare-border);
  background: #f8fafc;
  font-weight: 700;
  font-size: 13px;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.compare-seg input:focus-visible + span {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.compare-seg input:checked + span {
  background: linear-gradient(135deg, var(--compare-blue-500), var(--compare-cyan-500));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.18);
}

@media (prefers-color-scheme: dark) {
  .compare-seg span {
    background: #0b1220;
  }
}

/* -----------------------------------------------------------------
   6) Vergleichstabelle – Layout, Sticky Header & Metrik-Styling
   ----------------------------------------------------------------- */
.compare-table-wrap {
  position: relative;
  overflow: auto;
  border: 1px solid var(--compare-border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow: var(--compare-shadow);
}

@media (prefers-color-scheme: dark) {
  .compare-table-wrap {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.78));
  }
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 960px;
}

caption {
  caption-side: top;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--compare-border);
}

@media (prefers-color-scheme: dark) {
  thead th {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.84));
  }
}

/* .compare-colhead-product – Sticky-Produkteinstiege im Kopf. */
.compare-transposed thead th.compare-colhead-product {
  min-width: 200px;
  box-shadow: inset 0 -2px 0 rgba(37, 99, 235, 0.25);
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--compare-border);
  vertical-align: middle;
}

tbody tr:nth-child(odd) {
  background: rgba(2, 6, 23, 0.02);
}

tbody tr:hover td {
  background: rgba(2, 6, 23, 0.035);
}

tbody th[scope='row'] {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
  min-width: 220px;
  font-weight: 700;
}

/* .compare-table-metric – Zahlenfelder mit Verlaufsbalken. */
td.compare-table-metric {
  text-align: right;
  background:
    linear-gradient(90deg, rgba(147, 197, 253, 0.35) var(--w, 0%), rgba(147, 197, 253, 0) 0)
      padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4)) border-box;
  transition: background-size 0.2s ease;
}

tbody tr:nth-child(odd) td.compare-table-metric {
  background:
    linear-gradient(90deg, rgba(191, 219, 254, 0.35) var(--w, 0%), rgba(191, 219, 254, 0) 0)
      padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4)) border-box;
}

th[hidden],
td[hidden] {
  display: none !important;
}

#comp-table th,
#comp-table td {
  text-align: center;
}

#comp-table thead th:first-child,
#comp-table tbody th[scope='row'] {
  text-align: left;
}

th button.compare-sortline {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 10px;
}

tbody th[aria-sort='ascending'] .compare-sortline::after {
  content: '↑';
}

tbody th[aria-sort='descending'] .compare-sortline::after {
  content: '↓';
}

/* Produktsäulen: Name, Badge, Produktbild */
/* .compare-colhead – Produktsäulen mit Bild & Badge. */
.compare-colhead {
  padding: 10px 12px 12px;
  text-align: left;
  position: relative;
  border-left: 1px solid var(--compare-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.compare-colhead:first-of-type {
  border-left: none;
}

/* .compare-colhead-name – Produktname & Variante. */
.compare-colhead .compare-colhead-name {
  font-weight: 700;
  line-height: 1.2;
}

/* .compare-colhead-badge – Variante im Kopf (z. B. 60 cm). */
.compare-colhead .compare-colhead-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 12px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 1px solid rgba(2, 6, 23, 0.08);
}

.compare-colhead.compare-winner::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--compare-blue-300), var(--compare-cyan-500));
  box-shadow: 0 1px 0 rgba(34, 197, 94, 0.25);
}

/* .compare-colhead-thumb – Produktbild im Kopfbereich. */
.compare-colhead .compare-colhead-thumb {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.compare-colhead .compare-colhead-thumb img {
  width: 100%;
  max-width: clamp(160px, 20vw, 240px);
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1px solid var(--compare-border);
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.06);
  background: #fff;
  object-fit: cover;
}

@media (prefers-color-scheme: dark) {
    .compare-colhead {
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.84));
    }

    .compare-colhead .compare-colhead-badge {
      background: rgba(30, 41, 59, 0.7);
      color: #e2e8f0;
    }

    /* Produktbild im Darkmode unverändert. */
    .compare-colhead .compare-colhead-thumb img {
      background: rgba(15, 23, 42, 0.8);
    }
}

/* Zeilen-Icons für schnelle Orientierung */
tbody tr[data-row='energy'] th .compare-sortline::before {
  content: '⚡';
  margin-right: 6px;
}

tbody tr[data-row='loud'] th .compare-sortline::before {
  content: '🔉';
  margin-right: 6px;
}

tbody tr[data-row='cap'] th .compare-sortline::before {
  content: '🍽️';
  margin-right: 6px;
}

tbody tr[data-row='water'] th .compare-sortline::before {
  content: '💧';
  margin-right: 6px;
}

tbody tr[data-row='price'] th .compare-sortline::before {
  content: '💶';
  margin-right: 6px;
}

tbody tr[data-row='rating'] th .compare-sortline::before {
  content: '★';
  margin-right: 6px;
}

tbody tr[data-row='programs'] th .compare-sortline::before {
  content: '▶';
  margin-right: 6px;
}

tbody tr {
  box-shadow: inset 0 -1px 0 rgba(2, 6, 23, 0.06);
}

tr[data-row='score'] td {
  font-weight: 800;
}

/* -----------------------------------------------------------------
   7) Buttons & Interaktionen
   ----------------------------------------------------------------- */
.compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--compare-blue-500), var(--compare-cyan-500));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--compare-shadow);
}

.compare-btn:hover {
  opacity: 0.96;
}

.compare-btn:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

/* -----------------------------------------------------------------
   8) Responsive Ansicht – Mobile Karten statt Tabelle
   ----------------------------------------------------------------- */
.compare-cards {
  display: none;
}

@media (max-width: 680px) {
  .compare-table-wrap {
    display: none;
  }

  .compare-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* .compare-card-panel – Mobile Kartenansicht je Modell. */
.compare-card-panel {
  background: var(--compare-glass);
  border: 1px solid var(--compare-border);
  border-radius: 16px;
  box-shadow: var(--compare-shadow);
  padding: 14px;
}

.compare-card-panel h4 {
  margin: 0 0 8px;
  font-size: clamp(18px, 2.2vw, 20px);
}

.compare-card-panel ul {
  margin: 0 0 10px 16px;
  padding: 0;
}

.compare-card-panel li {
  margin: 4px 0;
}

/* .compare-card-panel-thumb – Kartenbild pro Produkt. */
.compare-card-panel .compare-card-panel-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1px solid var(--compare-border);
  margin-bottom: 8px;
}

/* -----------------------------------------------------------------
   9) Allgemeine Sektionen & Karten für Zusatzinhalte
   ----------------------------------------------------------------- */
section {
  padding-block: 24px;
}

.compare-card {
  background: var(--compare-glass);
  border: 1px solid var(--compare-border);
  border-radius: 16px;
  box-shadow: var(--compare-shadow);
  padding: 16px;
}

.compare-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, 1fr);
}

/* -----------------------------------------------------------------
   10) Kostenrechner & Metrik-Widgets
   ----------------------------------------------------------------- */
.compare-calc {
  position: relative;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.54));
  border: 1px solid var(--compare-border);
  box-shadow: var(--compare-shadow);
}

.compare-calc::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    120deg,
    rgba(59, 130, 246, 0.35),
    rgba(147, 197, 253, 0.25),
    rgba(34, 197, 94, 0.25)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
}

.compare-calc h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compare-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compare-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--compare-border);
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.compare-calc-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.compare-calc-grid > div {
  grid-column: span 6;
}

.compare-calc-grid > div:first-child {
  grid-column: span 12;
}

.compare-calc label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 6px;
}

.compare-calc label::before {
  content: attr(data-ico);
  font-size: 16px;
  opacity: 0.8;
}

.compare-calc input[type='range'],
.compare-calc select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--compare-border);
  border-radius: 12px;
  background: #fff;
}

.compare-calc output {
  display: inline-block;
  min-width: 46px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}

.compare-calc-visual {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}

.compare-donut {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--compare-blue-600) var(--split, 180deg), #10b981 0);
  position: relative;
  box-shadow:
    0 8px 28px rgba(2, 6, 23, 0.1),
    inset 0 0 0 6px rgba(255, 255, 255, 0.7);
}

.compare-donut::after {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 2px 8px rgba(2, 6, 23, 0.05);
}

/* .compare-legend – Legende für Donut & Rechnerwerte. */
.compare-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* .compare-legend-item – Eintrag innerhalb der Legende. */
.compare-legend .compare-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--compare-border);
  background: #fff;
}

/* .compare-legend-energy – Icon für Stromwerte. */
.compare-legend .compare-legend-energy::before {
  content: '⚡';
}

/* .compare-legend-water – Icon für Wasserwerte. */
.compare-legend .compare-legend-water::before {
  content: '💧';
}

/* .compare-legend-note – ergänzender Hinweistext. */
.compare-legend .compare-legend-note {
  opacity: 0.8;
}

.compare-calc-result {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.compare-calc-metric {
  grid-column: span 3;
  background: var(--compare-glass);
  border: 1px solid var(--compare-border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--compare-shadow);
}

.compare-calc-metric span {
  opacity: 0.8;
  font-size: 13px;
}

.compare-calc-metric strong {
  display: block;
  font-size: clamp(18px, 2.4vw, 26px);
}

/* -----------------------------------------------------------------
   11) Gewichtungs-UI unter der Tabelle
   ----------------------------------------------------------------- */
/* .compare-weights-preset – Preset-Button für Gewichtung. */
.compare-weights-preset {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--compare-border);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.compare-weights-preset[aria-pressed='true'],
.compare-weights-preset.active {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  box-shadow: inset 0 0 0 2px #bfdbfe;
}

/* .compare-weights-grid – Grid für Beschriftung & Slider. */
.compare-weights .compare-weights-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-top: 8px;
}

/* .compare-weights-row – Zeilencontainer für Slider. */
.compare-weights .compare-weights-row {
  grid-column: span 6;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--compare-border);
  border-radius: 12px;
  background: #fff;
}

.compare-weights .compare-weights-row label {
  font-weight: 700;
}

.compare-weights .compare-weights-row input[type='range'] {
  grid-column: 1/3;
  background: #eff8ff;
  border: 1px solid var(--compare-border);
  border-radius: 5px;
}

.compare-weights .compare-weights-row output {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

/* .compare-weights-presets – Gruppe der Preset-Buttons. */
.compare-weights .compare-weights-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* .compare-weights-note – erläuternder Text zur Gewichtungslogik.
   Wird unterhalb der Regler angezeigt und erklärt Neulingen das UI. */
.compare-weights-note {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.8;
}

@media (max-width: 980px) {
  .compare-calc-grid > div,
    .compare-weights .compare-weights-row {
    grid-column: span 12;
  }
}

/* -----------------------------------------------------------------
   12) Footer & Utility-Elemente
   ----------------------------------------------------------------- */
footer.compare-footer {
  padding-block: 20px;
  border-top: 1px solid var(--compare-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55));
  backdrop-filter: saturate(120%) blur(6px);
}

/* .compare-footer-copy – Rechtszeile im Footer. */
.compare-footer-copy {
  font-size: 14px;
  opacity: 0.72;
}

.compare-footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* .compare-footer-legal – Linkliste mit Pflichtseiten. */
.compare-footer .compare-footer-legal {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.compare-footer .compare-footer-legal a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}

.compare-footer .compare-footer-legal a:focus-visible,
.compare-footer .compare-footer-legal a:hover {
  border-color: var(--compare-border);
  background: var(--compare-glass);
}

@media (prefers-color-scheme: dark) {
  footer.compare-footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.52));
  }
}

.compare-to-top {
  position: fixed;
  right: 16px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--compare-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  box-shadow: var(--compare-shadow);
  color: #0f172a;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 120;
}

.compare-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.compare-to-top:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.compare-to-top span {
  font-size: 18px;
  line-height: 1;
}

@media (prefers-color-scheme: dark) {
  .compare-to-top {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
    color: #e5e7eb;
  }
}

/* Utility-Helfer */
#emptyNote {
  display: none;
  margin-top: 8px;
}

/* .compare-util-ml-auto – Utility für automatischen linken Abstand. */
.compare-util-ml-auto {
  margin-left: auto;
}

.compare-calc-note {
  margin-top: 8px;
  opacity: 0.85;
}

/* -----------------------------------------------------------------
   13) Globale Accessibility- und Print-Regeln
   ----------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .compare-header,
  .compare-hero,
  .compare-tools,
  .compare-extra,
  .compare-to-top,
  footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  h1 {
    margin-bottom: 6px;
  }

  .compare-table-wrap {
    border: none;
  }
}

@media (prefers-color-scheme: dark) {
  tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.03);
  }

  tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05);
  }

  .compare-calc {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.54));
  }

  .compare-weights .compare-weights-row {
    background: rgba(15, 23, 42, 0.7);
  }

  .compare-legend .compare-legend-item {
    background: rgba(15, 23, 42, 0.7);
  }

  .compare-donut::after {
    background: rgba(15, 23, 42, 0.85);
  }
}

