/* ==========================================================================
   home&smart Rechner — Komponenten
   --------------------------------------------------------------------------
   Alle Bausteine, die mehr als ein Rechner braucht. Werte kommen ausschließlich
   aus tokens.css (vorher laden). Die Klassennamen sind das gemeinsame
   Vokabular aller Rechner — app.js der Rechner setzt sie (active, hidden,
   step-hint-error …), deshalb werden sie hier nicht umbenannt.

   Lebende Übersicht aller Bausteine mit allen Zuständen:
   design-system/galerie/index.html

   Ebenen (@layer, Reihenfolge in tokens.css):
     basis       — Grundstil, Schrift, Browser-Oberflächen
     komponenten — diese Datei
     rechner     — rechner.css eines einzelnen Rechners (gewinnt immer)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Symbole — gezeichnet als SVG, eingefärbt über currentColor (mask).
   Keine Unicode-Zeichen oder Emojis als Symbole verwenden.
   -------------------------------------------------------------------------- */
:root {
  --icon-pfeil-rechts: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --icon-pfeil-links: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E");
  --icon-haken: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
  --icon-haken-kreis: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.8 2.8L16 9.5'/%3E%3C/svg%3E");
  --icon-warnung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E");
  --icon-kreuz: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
  --icon-ausrufezeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v9M12 18.5h.01'/%3E%3C/svg%3E");
  --icon-stern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.2l-5.7 3.1 1.2-6.4-4.7-4.4 6.4-.8z'/%3E%3C/svg%3E");
  --icon-uhr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  --icon-gluehbirne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 18h5M10.5 21h3M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* ==========================================================================
   BASIS
   ========================================================================== */
@layer basis {
  *, *::before, *::after { box-sizing: border-box; }

  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  /* iframe-Sicherheit: in schmalen Artikel-Spalten nie horizontal scrollen */
  html, body { margin: 0; max-width: 100%; overflow-x: hidden; }

  body {
    font-family: var(--hs-schrift);
    font-size: var(--text-m);
    font-weight: var(--gewicht-normal);
    line-height: var(--zeile-normal);
    color: var(--text);
    background: var(--flaeche);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
    caret-color: var(--marke-dunkel);
    accent-color: var(--marke-dunkel);
  }

  ::selection { background: var(--marke-hell); color: var(--text); }

  h1, h2, h3, h4 {
    margin: 0;
    font-weight: var(--gewicht-betont);
    line-height: var(--zeile-eng);
    letter-spacing: var(--laufweite-ueberschrift);
    text-wrap: balance;
  }
  p { margin: 0; text-wrap: pretty; }
  small { font-size: var(--text-xs); }
  strong, b { font-weight: var(--gewicht-betont); }
  em { font-style: normal; }

  a {
    color: var(--text-marke);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
  }
  a:hover { text-decoration-thickness: 2px; }

  button, input, select, textarea { font: inherit; color: inherit; }
  button { -webkit-tap-highlight-color: transparent; }
  input::placeholder { color: var(--text-hilfe); opacity: 1; }
  input[type="number"] { font-variant-numeric: tabular-nums; }

  /* Ein Fokusbild für alles, sichtbar nur bei Tastaturbedienung */
  :focus-visible {
    outline: var(--fokus-breite) solid var(--fokus);
    outline-offset: var(--fokus-abstand);
  }

  /* SVG-Beschriftungen in Grafiken übernehmen die Hausschrift */
  svg text { font-family: var(--hs-schrift); }

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

  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }

  /* Zahlen in Ergebnissen stehen untereinander sauber */
  .zahl { font-variant-numeric: tabular-nums; }

  /* Rahmen jedes Rechners: Breite der Artikelspalte, Bezug für Container Queries */
  .app {
    max-width: var(--rechner-breite);
    margin-inline: auto;
    padding: var(--abstand-3) var(--abstand-3) var(--abstand-5);
    container: rechner / inline-size;
  }

  @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;
    }
  }
}

/* ==========================================================================
   KOMPONENTEN
   ========================================================================== */
@layer komponenten {

  /* ------------------------------------------------------------------------
     Symbol als Element: <span class="symbol symbol-stern" aria-hidden="true">
     ------------------------------------------------------------------------ */
  .symbol, .stern {
    display: inline-block;
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    mask: var(--icon, var(--icon-stern)) center / contain no-repeat;
  }
  .stern { --icon: var(--icon-stern); color: var(--empfehlung); }
  .symbol-haken  { --icon: var(--icon-haken); }
  .symbol-info   { --icon: var(--icon-warnung); }
  .symbol-uhr    { --icon: var(--icon-uhr); }
  .symbol-pfeil  { --icon: var(--icon-pfeil-rechts); }

  /* ------------------------------------------------------------------------
     Kopf: blauer Titel-Banner mit Logo, Rechnername und Zusatz
     (Werte in tokens.css unter „Komponenten", Begründung in DESIGN.md)
     ------------------------------------------------------------------------ */
  .app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--abstand-1) var(--abstand-3);
    padding: var(--abstand-2) var(--abstand-3);
    margin-bottom: var(--abstand-3);
    background: var(--kopf-flaeche);
    border-radius: var(--radius);
    box-shadow: var(--schatten-2);
    color: var(--kopf-text);
  }
  /* Das Logo ist zweifarbig (Blau/Braun) und verschwände auf dem Blau: im Kopf weiß. */
  .app-header-logo { display: block; height: 1rem; width: auto; flex-shrink: 0; filter: brightness(0) invert(1); }
  .app-header-title {
    flex: 1 1 12rem;
    min-width: 0;
    font-size: var(--text-m);
    font-weight: var(--gewicht-normal);
    color: var(--kopf-text);
    line-height: 1.3;
  }
  .app-header-title em { font-style: normal; font-weight: var(--gewicht-betont); color: var(--kopf-text); }
  .app-header-meta {
    font-size: var(--text-xs);
    font-weight: var(--gewicht-betont);
    color: var(--kopf-text);
    background: var(--kopf-pille);
    border-radius: var(--radius-pille);
    padding: var(--abstand-0) var(--abstand-2);
    white-space: nowrap;
  }

  /* ------------------------------------------------------------------------
     Fortschritt
     ------------------------------------------------------------------------ */
  .progress {
    display: flex;
    align-items: center;
    gap: var(--abstand-2);
    margin-bottom: var(--abstand-3);
  }
  .progress-label {
    font-size: var(--text-xs);
    color: var(--text-hilfe);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .progress-label #progress-current { color: var(--text); font-weight: var(--gewicht-betont); }
  .progress-track {
    flex: 1;
    height: var(--fortschritt-hoehe);
    background: var(--flaeche-grau);
    border-radius: var(--radius-pille);
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    background: var(--marke);
    border-radius: var(--radius-pille);
    transition: width var(--dauer-mittel) var(--kurve);
  }

  /* ------------------------------------------------------------------------
     Schritt (eine Frage des Assistenten)
     ------------------------------------------------------------------------ */
  .step {
    display: flex;
    flex-direction: column;
    gap: var(--abstand-4);
    min-height: 20rem;
    padding: var(--abstand-4) var(--abstand-4) var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    box-shadow: var(--schatten-1);
    animation: hs-schritt-ein var(--dauer-mittel) var(--kurve) both;
  }
  @keyframes hs-schritt-ein {
    from { opacity: 0.4; transform: translateY(0.375rem); }
    to   { opacity: 1;   transform: none; }
  }
  .step-content { flex: 1; display: flex; flex-direction: column; gap: var(--abstand-3); }
  .step-title {
    font-size: var(--text-xl);
    line-height: 1.2;
    color: var(--text-marke);
  }
  .step-sub { max-width: 62ch; color: var(--text-gedeckt); }
  .step-sub strong { color: var(--text); }

  /* block statt flex: Hinweise mischen Text und <strong>, als Flex-Elemente
     würden die Stücke beim Umbruch in Spalten zerfallen */
  .step-hint,
  .rcfg-hint {
    display: block;
    font-size: var(--text-s);
    color: var(--text-hilfe);
  }
  .rcfg-hint { font-size: var(--text-xs); }
  .step-hint strong, .rcfg-hint strong { color: var(--text); }
  .step-hint-ok, .rcfg-hint-ok { color: var(--text); }
  .step-hint-error, .rcfg-hint-error { color: var(--signal-negativ-text); font-weight: var(--gewicht-betont); }
  .step-hint-ok::before, .rcfg-hint-ok::before,
  .step-hint-error::before, .rcfg-hint-error::before {
    content: "";
    display: inline-block;
    width: 1.125em;
    height: 1.125em;
    margin-right: var(--abstand-1);
    vertical-align: -0.2em;
    background-color: currentColor;
    mask: var(--icon-haken-kreis) center / contain no-repeat;
  }
  .step-hint-ok::before, .rcfg-hint-ok::before { color: var(--marke-dunkel); }
  .step-hint-error::before, .rcfg-hint-error::before { mask-image: var(--icon-warnung); }

  .step-input,
  .input {
    width: 100%;
    min-height: var(--eingabe-hoehe);
    padding: 0 var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--linie-eingabe);
    border-radius: var(--radius);
    font-size: var(--text-l);
    font-weight: var(--gewicht-betont);
    color: var(--text);
    font-variant-numeric: tabular-nums;
    transition: border-color var(--dauer-kurz) var(--kurve);
  }
  .step-input:hover, .input:hover { border-color: var(--text); }
  .step-input:focus, .input:focus {
    outline: var(--fokus-breite) solid var(--fokus);
    outline-offset: 1px;
    border-color: var(--marke);
  }
  .step-input.shake, .step-input[aria-invalid="true"],
  .input[aria-invalid="true"] {
    border-color: var(--signal-negativ);
  }
  .step-input.shake { animation: hs-ruetteln 300ms var(--kurve); }
  @keyframes hs-ruetteln {
    0%, 100% { transform: none; }
    25% { transform: translateX(-0.375rem); }
    75% { transform: translateX(0.375rem); }
  }

  .step-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--abstand-2);
    padding-top: var(--abstand-3);
    border-top: 1px solid var(--linie);
  }
  .step-actions .btn-back-step { margin-right: auto; }

  .time-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-0);
    margin-right: auto;
    font-size: var(--text-xs);
    color: var(--text-hilfe);
    white-space: nowrap;
  }
  .time-badge::before {
    content: "";
    width: 1em; height: 1em;
    background-color: currentColor;
    mask: var(--icon-uhr) center / contain no-repeat;
  }

  /* ------------------------------------------------------------------------
     Auswahl-Kacheln (eine Antwort aus mehreren)
     ------------------------------------------------------------------------ */
  .options {
    --spalten: 3;
    display: grid;
    grid-template-columns: repeat(var(--spalten), minmax(0, 1fr));
    gap: var(--abstand-2);
  }
  .options-2 { --spalten: 2; }
  .options-3 { --spalten: 3; }
  .options-4 { --spalten: 4; }
  .options-5 { --spalten: 5; }

  .option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-height: var(--klickflaeche);
    padding: var(--abstand-3) var(--abstand-2);
    background: var(--flaeche);
    border: 1px solid var(--linie-kraeftig);
    border-radius: var(--radius);
    color: var(--text);
    text-align: center;
    cursor: pointer;
    transition:
      border-color var(--dauer-kurz) var(--kurve),
      background-color var(--dauer-kurz) var(--kurve),
      box-shadow var(--dauer-kurz) var(--kurve);
  }
  .option:hover { border-color: var(--marke); }
  .option strong { font-size: var(--text-m); font-weight: var(--gewicht-betont); line-height: 1.25; }
  .option span { font-size: var(--text-xs); color: var(--text-hilfe); line-height: 1.3; }
  .option.active,
  .option[aria-checked="true"] {
    background: var(--auswahl-flaeche);
    border-color: var(--auswahl-rand);
    box-shadow: inset 0 0 0 1px var(--auswahl-rand);
  }
  .option.active strong { color: var(--text-marke); }
  .option.active span { color: var(--text-gedeckt); }
  .option:disabled,
  .option.option-disabled {
    pointer-events: none;  /* auch bei aria-disabled statt disabled nicht anklickbar */
    cursor: not-allowed;
    color: var(--text-hilfe);
    background: var(--flaeche);
    border-style: dashed;
    box-shadow: none;
  }

  .options-compact .option { padding: var(--abstand-2); }
  .options-compact .option strong { font-size: var(--text-l); font-variant-numeric: tabular-nums; }

  .option-icon {
    display: block;
    width: 3.5rem;
    height: 2.75rem;
    margin: 0 auto var(--abstand-0);
    color: var(--marke);
  }
  .option.active .option-icon { color: var(--marke-dunkel); }
  /* Beschriftung in Grafiken (z. B. „30°") ist Text: Boston Blue hätte nur 3,8:1 */
  .option-icon text { fill: var(--marke-dunkel); color: var(--marke-dunkel); }

  /* Schmale Spalte: Kacheln werden zu Zeilen, damit Text nicht bricht */
  @container rechner (max-width: 36rem) {
    .options-4 { --spalten: 2; }
  }
  @container rechner (max-width: 27.5rem) {
    .options:not(.options-2):not(.options-4):not(.options-5) { --spalten: 1; }
    .options:not(.options-2):not(.options-4):not(.options-5) .option {
      flex-direction: row;
      justify-content: space-between;
      gap: var(--abstand-2);
      padding: var(--abstand-2) var(--abstand-3);
      text-align: left;
    }
    .options:not(.options-2):not(.options-4):not(.options-5) .option span { text-align: right; }
    /* Grafik-Kacheln bleiben zweispaltig mit Grafik oben — als Zeile wäre
       neben der Grafik kein Platz für den Text */
    .options-icon .option { padding: var(--abstand-2) var(--abstand-1); }
    .options-icon .option-icon { width: 2.75rem; height: 2.25rem; }
    .options-icon .option strong { font-size: var(--text-s); }
    .options-icon .option span { hyphens: auto; }
  }

  /* ------------------------------------------------------------------------
     Chips (kompakte Auswahl, auch im Ergebnis-Editor)
     ------------------------------------------------------------------------ */
  .chips { display: flex; flex-wrap: wrap; gap: var(--abstand-1); }
  .chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--abstand-0);
    min-height: 2.5rem;
    padding: 0 var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--linie-kraeftig);
    border-radius: var(--radius-pille);
    font-size: var(--text-s);
    color: var(--text);
    cursor: pointer;
    transition:
      border-color var(--dauer-kurz) var(--kurve),
      background-color var(--dauer-kurz) var(--kurve),
      color var(--dauer-kurz) var(--kurve);
  }
  .chip:hover { border-color: var(--marke); }
  .chip.active,
  .chip[aria-checked="true"] {
    background: var(--auswahl-voll);
    border-color: var(--auswahl-voll);
    color: var(--text-auf-dunkel);
    font-weight: var(--gewicht-betont);
  }
  .chip:disabled { cursor: not-allowed; color: var(--text-hilfe); border-style: dashed; }
  .chip-sm { min-height: 2rem; padding: 0 var(--abstand-2); font-size: var(--text-xs); }
  .chips-lg .chip { min-height: var(--klickflaeche); padding: 0 var(--abstand-4); font-size: var(--text-m); }

  /* Empfehlung: goldener Ring + Stern-Plakette */
  .chip.is-recommended {
    border-color: var(--empfehlung);
    box-shadow: inset 0 0 0 1px var(--empfehlung);
  }
  .chip.is-recommended::after {
    content: "";
    position: absolute;
    top: -0.45rem;
    right: -0.45rem;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: var(--radius-rund);
    background: var(--empfehlung);
    box-shadow: 0 0 0 2px var(--flaeche);
  }
  .chip.is-recommended::before {
    content: "";
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    width: 0.625rem;
    height: 0.625rem;
    z-index: 1;
    background-color: var(--signal-symbol);
    mask: var(--icon-stern) center / contain no-repeat;
  }

  /* Kompass: 8 Himmelsrichtungen um ein Symbol */
  .compass {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--abstand-1);
    max-width: 25rem;
    margin-inline: auto;
  }
  .compass .chip { width: 100%; padding-inline: var(--abstand-0); white-space: nowrap; }
  .compass-center { display: flex; align-items: center; justify-content: center; color: var(--marke); }
  @container rechner (max-width: 22rem) {
    .compass .chip { font-size: var(--text-xs); }
  }

  /* ------------------------------------------------------------------------
     Umschalter: Tabs und Ja/Nein
     ------------------------------------------------------------------------ */
  .tabs,
  .toggle {
    display: flex;
    gap: 0.125rem;
    padding: 0.25rem;
    background: var(--flaeche-ruhig);
    border-radius: var(--radius-pille);
  }
  .toggle { display: inline-flex; }
  .tab,
  .toggle-btn {
    flex: 1;
    min-height: 2.5rem;
    padding: 0 var(--abstand-3);
    background: transparent;
    border: 0;
    border-radius: var(--radius-pille);
    font-size: var(--text-s);
    font-weight: var(--gewicht-betont);
    color: var(--text-gedeckt);
    cursor: pointer;
    transition: background-color var(--dauer-kurz) var(--kurve), color var(--dauer-kurz) var(--kurve);
  }
  .toggle-btn { white-space: nowrap; }
  .tab:hover, .toggle-btn:hover { color: var(--text-marke); }
  .tab.active, .tab[aria-selected="true"] {
    background: var(--flaeche);
    color: var(--text-marke);
    box-shadow: var(--schatten-1);
  }
  .toggle-btn.active, .toggle-btn[aria-pressed="true"] {
    background: var(--auswahl-voll);
    color: var(--text-auf-dunkel);
  }
  .tab-panel { display: flex; flex-direction: column; gap: var(--abstand-2); }

  .toggle-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--abstand-2) var(--abstand-3);
    padding: var(--abstand-3);
    margin-bottom: var(--abstand-2);
  }
  .toggle-label { font-weight: var(--gewicht-betont); }
  .toggle-hint { flex-basis: 100%; font-size: var(--text-s); color: var(--text-gedeckt); }
  .toggle-hint strong { color: var(--text-marke); }

  /* Veränderung gegenüber der anderen Option: +/− als Plakette */
  .delta-positive, .delta-negative {
    display: inline-block;
    padding: 0 0.4em;
    border-radius: var(--radius-pille);
    font-weight: var(--gewicht-betont);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  /* doppelte Selektoren: müssen auch gegen „.toggle-hint strong" gewinnen */
  .delta-positive, .toggle-hint .delta-positive { background: var(--signal-positiv); color: var(--signal-symbol); }
  .delta-negative, .toggle-hint .delta-negative { background: var(--signal-negativ); color: var(--text-auf-dunkel); }

  /* ------------------------------------------------------------------------
     Eingabe mit Einheit
     ------------------------------------------------------------------------ */
  .input-suffix {
    display: flex;
    align-items: stretch;
    background: var(--flaeche);
    border: 1px solid var(--linie-eingabe);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--dauer-kurz) var(--kurve);
  }
  .input-suffix:hover { border-color: var(--text); }
  .input-suffix:focus-within {
    border-color: var(--marke);
    outline: var(--fokus-breite) solid var(--fokus);
    outline-offset: 1px;
  }
  .input-suffix input,
  .input-suffix .step-input {
    flex: 1;
    min-width: 0;
    min-height: var(--eingabe-hoehe);
    padding: 0 var(--abstand-3);
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: var(--text-l);
    font-weight: var(--gewicht-betont);
    outline: none;
  }
  .input-suffix span {
    display: flex;
    align-items: center;
    padding: 0 var(--abstand-3);
    background: var(--flaeche-ruhig);
    font-size: var(--text-s);
    color: var(--text-gedeckt);
    white-space: nowrap;
  }

  /* ------------------------------------------------------------------------
     Buttons — Braun handelt, Blau orientiert
     ------------------------------------------------------------------------ */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--abstand-1);
    min-height: var(--klickflaeche);
    padding: 0 var(--abstand-4);
    border: 1px solid transparent;
    border-radius: var(--radius-pille);
    font-size: var(--text-m);
    font-weight: var(--gewicht-betont);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
      box-shadow var(--dauer-kurz) var(--kurve),
      transform var(--dauer-kurz) var(--kurve),
      background-color var(--dauer-kurz) var(--kurve);
  }
  .btn-primary {
    background: var(--handlung);
    color: var(--handlung-text);
    box-shadow: var(--schatten-1);
  }
  .btn-primary:hover:not(:disabled) { box-shadow: var(--schatten-2); transform: translateY(-1px); }
  .btn-primary:active:not(:disabled) { box-shadow: var(--schatten-1); transform: none; }
  .btn-secondary {
    background: var(--flaeche);
    color: var(--text-marke);
    border-color: var(--marke-dunkel);
  }
  .btn-secondary:hover:not(:disabled) { background: var(--flaeche-ruhig); }
  .btn-ghost { background: transparent; color: var(--text-gedeckt); }
  .btn-ghost:hover:not(:disabled) { background: var(--flaeche-ruhig); color: var(--text-marke); }
  .btn:disabled,
  .btn[aria-disabled="true"] {
    background: var(--flaeche-grau);
    border-color: transparent;
    color: var(--text-gedeckt);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
  }
  .btn[aria-busy="true"] { cursor: progress; }
  .btn-lg { width: 100%; min-height: 3.25rem; padding-block: var(--abstand-1); font-size: var(--text-l); text-wrap: balance; }
  .btn-next { min-width: 8rem; }

  /* Pfeil nach rechts: Weiter, Berechnen, zu den Produkten, Affiliate */
  .btn-next::after, .btn-calc::after, .btn-products::after,
  .btn-affiliate::after, .product-footer .btn::after, .btn-pfeil::after {
    content: "";
    flex-shrink: 0;
    width: 1.125em;
    height: 1.125em;
    background-color: currentColor;
    mask: var(--icon-pfeil-rechts) center / contain no-repeat;
    transition: transform var(--dauer-kurz) var(--kurve);
  }
  .btn:hover:not(:disabled)::after { transform: translateX(2px); }

  .btn-products { margin-block: var(--abstand-1) var(--abstand-3); }
  .btn-affiliate { width: 100%; }

  .btn-back-step {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-0);
    min-height: var(--klickflaeche);
    padding: 0 var(--abstand-2);
    background: transparent;
    border: 0;
    border-radius: var(--radius-pille);
    font-size: var(--text-s);
    font-weight: var(--gewicht-betont);
    color: var(--text-gedeckt);
    cursor: pointer;
    transition: background-color var(--dauer-kurz) var(--kurve), color var(--dauer-kurz) var(--kurve);
  }
  .btn-back-step::before {
    content: "";
    width: 1.125em;
    height: 1.125em;
    background-color: currentColor;
    mask: var(--icon-pfeil-links) center / contain no-repeat;
  }
  .btn-back-step:hover { background: var(--flaeche-ruhig); color: var(--text-marke); }
  .btn-back-top { align-self: flex-start; margin: 0 0 var(--abstand-2) calc(var(--abstand-2) * -1); }

  /* ------------------------------------------------------------------------
     Ergebnis-Kopf
     ------------------------------------------------------------------------ */
  .hero { margin-bottom: var(--abstand-3); }
  .hero h1 {
    margin-bottom: var(--abstand-2);
    font-size: var(--text-2xl);
    line-height: 1.15;
    color: var(--text-marke);
  }
  .hero h1.h2-style { font-size: var(--text-xl); }
  .hero-sub { max-width: 62ch; color: var(--text-gedeckt); }

  /* ------------------------------------------------------------------------
     Ergebnis-Zahlen
     metrics-hero > metric-hero-card            ruhige Kachel, Wert in Blau
     metric-hero-card.metric-hero-haupt         DIE eine Antwort, Fläche Blumine
     (metric-hero-savings ist der ältere Name derselben Rolle)
     ------------------------------------------------------------------------ */
  .metrics-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: var(--abstand-2);
    margin-bottom: var(--abstand-2);
  }
  .metric-hero-card {
    display: flex;
    flex-direction: column;
    gap: var(--abstand-0);
    padding: var(--abstand-3);
    background: var(--flaeche-ruhig);
    border-radius: var(--radius);
  }
  .metric-hero-value {
    order: 0;
    font-size: clamp(1.75rem, 8cqi, 2.5rem);
    font-weight: var(--gewicht-betont);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-marke);
    font-variant-numeric: tabular-nums;
  }
  /* Einheit fest aus der Skala, nicht relativ zur fließenden Zahl */
  .metric-hero-value small { font-size: var(--text-s); font-weight: var(--gewicht-normal); color: var(--text-gedeckt); letter-spacing: 0; }
  .metrics-hero-1 .metric-hero-value small { font-size: var(--text-l); }
  .metric-hero-label { margin-top: var(--abstand-1); font-size: var(--text-s); font-weight: var(--gewicht-betont); color: var(--text); }
  .metric-hero-desc { font-size: var(--text-xs); color: var(--text-gedeckt); }

  .metric-hero-card.metric-hero-haupt,
  .metric-hero-card.metric-hero-savings {
    background: var(--flaeche-ergebnis);
    color: var(--text-auf-dunkel);
  }
  .metric-hero-haupt .metric-hero-value,
  .metric-hero-savings .metric-hero-value,
  .metric-hero-haupt .metric-hero-label,
  .metric-hero-savings .metric-hero-label { color: var(--text-auf-dunkel); }
  .metric-hero-haupt .metric-hero-value small,
  .metric-hero-savings .metric-hero-value small,
  .metric-hero-haupt .metric-hero-desc,
  .metric-hero-savings .metric-hero-desc { color: var(--text-auf-dunkel-ruhig); }
  .metric-hero-haupt .metric-hero-desc strong,
  .metric-hero-savings .metric-hero-desc strong { color: var(--text-auf-dunkel); }

  /* Eine einzige Antwort: groß, über die ganze Breite */
  .metrics-hero-1 { grid-template-columns: 1fr; }
  .metrics-hero-1 .metric-hero-card { padding: var(--abstand-4); }
  .metrics-hero-1 .metric-hero-value { font-size: var(--text-zahl); }
  .metrics-hero-1 .metric-hero-desc { font-size: var(--text-s); max-width: 52ch; }

  .metrics-sub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: var(--abstand-2);
    margin-bottom: var(--abstand-3);
  }
  .metric-sub-card {
    display: flex;
    flex-direction: column;
    padding: var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
  }
  .metric-sub-value {
    font-size: var(--text-xl);
    font-weight: var(--gewicht-betont);
    line-height: 1.1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .metric-sub-value small { font-size: var(--text-xs); font-weight: var(--gewicht-normal); color: var(--text-gedeckt); }
  .metric-sub-label { margin-top: var(--abstand-1); font-size: var(--text-s); font-weight: var(--gewicht-betont); color: var(--text-marke); }
  .metric-sub-desc { margin-top: var(--abstand-0); font-size: var(--text-xs); color: var(--text-gedeckt); }
  .metric-sub-desc strong { color: var(--text); }

  /* ------------------------------------------------------------------------
     Urteil (z. B. „Speicher lohnt sich")
     ------------------------------------------------------------------------ */
  .verdict {
    --urteil-farbe: var(--marke-dunkel);
    --urteil-symbol: var(--text-auf-dunkel);
    --urteil-icon: var(--icon-haken);
    display: flex;
    align-items: flex-start;
    gap: var(--abstand-3);
    padding: var(--abstand-3);
    margin-bottom: var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--urteil-farbe);
    border-radius: var(--radius);
  }
  .verdict-green, .verdict-ok {
    --urteil-farbe: var(--signal-positiv); --urteil-symbol: var(--signal-symbol); --urteil-icon: var(--icon-haken);
  }
  .verdict-yellow, .verdict-warn {
    --urteil-farbe: var(--signal-warnung); --urteil-symbol: var(--signal-symbol); --urteil-icon: var(--icon-ausrufezeichen);
  }
  .verdict-red, .verdict-bad {
    --urteil-farbe: var(--signal-negativ); --urteil-symbol: var(--text-auf-dunkel); --urteil-icon: var(--icon-kreuz);
  }
  .verdict-icon {
    position: relative;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-rund);
    background: var(--urteil-farbe);
    font-size: 0;          /* Zeichen aus app.js ausblenden, Symbol kommt aus CSS */
    color: transparent;
  }
  .verdict-icon::before {
    content: "";
    position: absolute;
    inset: 0.5rem;
    background-color: var(--urteil-symbol);
    mask: var(--urteil-icon) center / contain no-repeat;
  }
  .verdict-headline { font-size: var(--text-xl); font-weight: var(--gewicht-betont); line-height: 1.2; color: var(--text); text-wrap: balance; }
  .verdict-sub { margin-top: var(--abstand-0); font-size: var(--text-s); color: var(--text-gedeckt); }

  /* ------------------------------------------------------------------------
     h&s-Tipp und Urteils-Box der Redaktion
     ------------------------------------------------------------------------ */
  .hs-tip {
    --tipp-farbe: var(--marke-dunkel);
    --tipp-symbol: var(--text-auf-dunkel);
    --tipp-icon: var(--icon-gluehbirne);
    display: flex;
    align-items: flex-start;
    gap: var(--abstand-2);
    padding: var(--abstand-2) var(--abstand-3);
    margin: var(--abstand-3) 0 var(--abstand-0);
    background: var(--flaeche-ruhig);
    border-radius: var(--radius);
    font-size: var(--text-s);
    color: var(--text);
  }
  .hs-tip-icon {
    position: relative;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-rund);
    background: var(--tipp-farbe);
    font-size: 0;
    color: transparent;
  }
  .hs-tip-icon::before {
    content: "";
    position: absolute;
    inset: 0.3rem;
    background-color: var(--tipp-symbol);
    mask: var(--tipp-icon) center / contain no-repeat;
  }
  .hs-tip-body > strong {
    display: block;
    margin-bottom: 0.125rem;
    font-size: var(--text-s);
    color: var(--text-marke);
  }
  .hs-tip-verdict {
    margin: var(--abstand-4) 0 var(--abstand-1);
    padding: var(--abstand-3);
    font-size: var(--text-m);
    background: var(--flaeche);
    border: 1px solid var(--tipp-farbe);
  }
  .hs-tip-verdict .hs-tip-body > strong { color: var(--text); }
  .hs-tip-verdict-good { --tipp-farbe: var(--signal-positiv); --tipp-symbol: var(--signal-symbol); --tipp-icon: var(--icon-haken); }
  .hs-tip-verdict-ok   { --tipp-farbe: var(--signal-warnung); --tipp-symbol: var(--signal-symbol); --tipp-icon: var(--icon-ausrufezeichen); }
  .hs-tip-verdict-warn { --tipp-farbe: var(--signal-negativ); --tipp-symbol: var(--text-auf-dunkel); --tipp-icon: var(--icon-warnung); }
  .hs-verdict-headline {
    display: block;
    margin: 0.125rem 0 var(--abstand-1);
    font-size: var(--text-xl);
    font-weight: var(--gewicht-betont);
    line-height: 1.2;
    color: var(--text);
    text-wrap: balance;
  }
  .hs-verdict-lead { display: block; margin-bottom: var(--abstand-1); color: var(--text); }
  .hs-verdict-body { display: block; font-size: var(--text-s); color: var(--text-gedeckt); }

  /* ------------------------------------------------------------------------
     Hinweis-Zeile mit „Warum?"-Aufklapper (z. B. optimale Speichergröße)
     ------------------------------------------------------------------------ */
  .storage-hint,
  .note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--abstand-1) var(--abstand-2);
    padding: var(--abstand-2) var(--abstand-3);
    margin-bottom: var(--abstand-2);
    background: var(--flaeche-ruhig);
    border-radius: var(--radius);
    font-size: var(--text-s);
  }
  .storage-hint-icon { display: inline-flex; color: var(--text-marke); }
  .storage-hint-text { flex: 1; min-width: 0; }
  .storage-hint-text strong { color: var(--text-marke); }
  .storage-hint-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-0);
    min-height: 2rem;
    padding: 0 var(--abstand-2);
    background: transparent;
    border: 0;
    border-radius: var(--radius-pille);
    font-size: var(--text-xs);
    font-weight: var(--gewicht-betont);
    color: var(--text-marke);
    cursor: pointer;
  }
  .storage-hint-toggle:hover { background: var(--flaeche); }
  .storage-hint-details {
    flex-basis: 100%;
    padding-top: var(--abstand-1);
    border-top: 1px dashed var(--linie-ruhig);
    color: var(--text-gedeckt);
  }
  .storage-hint-details strong { color: var(--text); }

  /* ------------------------------------------------------------------------
     Aufklapper: Zusammenfassung → Bearbeiten (Ergebnis-Editor, Konfiguration,
     Speichergröße, Methodik)
     ------------------------------------------------------------------------ */
  .result-config-wrap,
  .config-wrap {
    margin-bottom: var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .result-config-summary,
  .config-summary,
  .top-storage-size-summary,
  .methodology-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--abstand-2);
    width: 100%;
    min-height: var(--klickflaeche);
    padding: var(--abstand-2) var(--abstand-3);
    background: transparent;
    border: 0;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: background-color var(--dauer-kurz) var(--kurve);
  }
  .result-config-summary:hover,
  .config-summary:hover,
  .methodology-toggle:hover { background: var(--flaeche-ruhig); }
  .top-storage-size-summary:hover { background: var(--flaeche); }

  .result-config-summary-text,
  .config-summary-text { flex: 1; font-size: var(--text-s); color: var(--text); }
  .result-config-summary .hero-sub { max-width: none; }

  .result-config-action,
  .config-summary-action,
  .top-storage-size-summary-action {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-0);
    flex-shrink: 0;
    font-size: var(--text-s);
    font-weight: var(--gewicht-betont);
    color: var(--text-marke);
  }
  .result-config-chevron, .config-chevron, .top-storage-size-chevron,
  .methodology-chevron, .storage-hint-chevron, .trust-chevron {
    flex-shrink: 0;
    color: var(--marke);
    transition: transform var(--dauer-mittel) var(--kurve);
  }
  [aria-expanded="true"] .result-config-chevron,
  [aria-expanded="true"] .config-chevron,
  [aria-expanded="true"] .top-storage-size-chevron,
  [aria-expanded="true"] .methodology-chevron,
  [aria-expanded="true"] .storage-hint-chevron,
  [aria-expanded="true"] .trust-chevron { transform: rotate(180deg); }

  .result-config-panel,
  .config-panel {
    display: flex;
    flex-direction: column;
    gap: var(--abstand-2);
    padding: var(--abstand-1) var(--abstand-3) var(--abstand-3);
    border-top: 1px solid var(--linie);
    animation: hs-aufklappen var(--dauer-mittel) var(--kurve);
  }
  @keyframes hs-aufklappen {
    from { opacity: 0; transform: translateY(-0.25rem); }
    to   { opacity: 1; transform: none; }
  }
  .rcfg-row,
  .cfg-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--abstand-1) var(--abstand-2);
    padding-top: var(--abstand-2);
  }
  .rcfg-label,
  .cfg-label {
    min-width: 8rem;
    font-size: var(--text-s);
    font-weight: var(--gewicht-betont);
    color: var(--text);
  }
  .cfg-label-hint {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-0);
    margin-left: var(--abstand-1);
    font-size: var(--text-xs);
    font-weight: var(--gewicht-normal);
    color: var(--text-hilfe);
  }
  .rcfg-input {
    width: 7rem;
    min-height: 2.25rem;
    padding: 0 var(--abstand-2);
    background: var(--flaeche);
    border: 1px solid var(--linie-eingabe);
    border-radius: var(--radius);
    font-size: var(--text-s);
    font-weight: var(--gewicht-betont);
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .rcfg-input:focus { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 1px; border-color: var(--marke); }
  .rcfg-input-plz { width: 6.25rem; text-align: center; letter-spacing: 0.05em; }
  .rcfg-input-suffix { display: inline-flex; align-items: center; gap: var(--abstand-1); }
  .rcfg-input-suffix span { font-size: var(--text-xs); color: var(--text-gedeckt); }

  /* Speichergröße unter dem Speicher-Umschalter */
  .top-storage-size.top-storage-size-standalone { margin: 0 0 var(--abstand-3); }
  .top-storage-size {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: var(--abstand-2);
    background: var(--flaeche-ruhig);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .top-storage-size-summary-text { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--abstand-1); }
  .top-storage-label { font-size: var(--text-xs); font-weight: var(--gewicht-betont); color: var(--text-gedeckt); }
  .top-storage-size-value { font-size: var(--text-m); font-weight: var(--gewicht-betont); color: var(--text-marke); font-variant-numeric: tabular-nums; }
  .top-storage-size-panel {
    display: flex;
    flex-direction: column;
    gap: var(--abstand-1);
    padding: var(--abstand-1) var(--abstand-3) var(--abstand-3);
    border-top: 1px solid var(--linie-ruhig);
  }
  .top-storage-size-panel-hint {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-0);
    font-size: var(--text-xs);
    color: var(--text-gedeckt);
  }

  /* Plakette „Empfehlung" (Speicher, Produkte) */
  .top-storage-size-reco-badge,
  .product-badge,
  .badge-empfehlung {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-0);
    padding: 0.125rem 0.5rem;
    background: var(--empfehlung);
    border-radius: var(--radius-pille);
    font-size: var(--text-xs);
    font-weight: var(--gewicht-betont);
    line-height: 1.4;
    color: var(--empfehlung-text);
    white-space: nowrap;
  }
  .top-storage-size-reco-badge .stern,
  .product-badge .stern,
  .badge-empfehlung .stern { color: currentColor; }

  /* Schmal: Beschriftungen der Aufklapper weglassen, Pfeil bleibt */
  @container rechner (max-width: 30rem) {
    .result-config-label,
    .config-summary-label,
    .top-storage-size-summary-label,
    .storage-hint-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .rcfg-label, .cfg-label { min-width: 100%; }
    .step { padding: var(--abstand-3); }
    .app-header-meta { display: none; }
    .toggle { display: flex; width: 100%; }
    .btn-lg { font-size: var(--text-m); }
  }

  /* ------------------------------------------------------------------------
     Fläche (Karte)
     ------------------------------------------------------------------------ */
  .card {
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    box-shadow: var(--schatten-1);
  }

  /* ------------------------------------------------------------------------
     Methodik: „Wie haben wir das gerechnet?"
     ------------------------------------------------------------------------ */
  .methodology { margin: var(--abstand-3) 0; overflow: hidden; }
  .methodology-title {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-1);
    font-size: var(--text-s);
    font-weight: var(--gewicht-betont);
    color: var(--text);
  }
  .methodology-title svg { flex-shrink: 0; color: var(--marke); }
  .methodology-body {
    padding: 0 var(--abstand-3) var(--abstand-3);
    border-top: 1px solid var(--linie);
    color: var(--text-gedeckt);
  }
  .method-block { padding-top: var(--abstand-3); }
  .method-head { margin-bottom: var(--abstand-0); font-size: var(--text-s); color: var(--text); }
  .method-formula {
    display: block;
    margin: var(--abstand-0) 0 var(--abstand-1);
    padding: var(--abstand-1) var(--abstand-2);
    background: var(--flaeche-ruhig);
    border-radius: var(--radius);
    font-family: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
    font-size: var(--text-xs);
    color: var(--text-marke);
    white-space: nowrap;
    overflow-x: auto;
  }
  .method-block p { font-size: var(--text-s); }
  .method-block strong { color: var(--text); }
  .method-footer {
    margin-top: var(--abstand-3);
    padding-top: var(--abstand-2);
    border-top: 1px dashed var(--linie);
    font-size: var(--text-xs);
    color: var(--text-hilfe);
  }

  /* ------------------------------------------------------------------------
     Vertrauen: Leiste unter dem Assistenten, Block im Ergebnis, Änderungen
     ------------------------------------------------------------------------ */
  .trust-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--abstand-1) var(--abstand-4);
    padding: var(--abstand-3) var(--abstand-2) 0;
    margin-top: var(--abstand-1);
  }
  .trust-item {
    display: inline-flex;
    align-items: center;
    gap: var(--abstand-1);
    font-size: var(--text-xs);
    color: var(--text-hilfe);
  }
  .trust-item strong { color: var(--text); }
  .trust-item svg { flex-shrink: 0; width: 1rem; height: 1rem; color: var(--marke); }
  .trust-item-changelog {
    min-height: 2rem;
    padding: 0 var(--abstand-1);
    background: transparent;
    border: 0;
    border-radius: var(--radius-pille);
    cursor: pointer;
  }
  .trust-item-changelog:hover { background: var(--flaeche-ruhig); color: var(--text-marke); }
  .trust-item-changelog .trust-chevron { width: 0.625rem; height: 0.625rem; }

  .changelog-panel {
    flex-basis: 100%;
    margin-top: var(--abstand-2);
    padding: var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    box-shadow: var(--schatten-1);
    text-align: left;
  }
  .changelog-head { margin-bottom: var(--abstand-2); font-size: var(--text-s); color: var(--text); }
  .changelog-list { display: flex; flex-direction: column; gap: var(--abstand-2); margin: 0; padding: 0; list-style: none; }
  .changelog-list li {
    display: grid;
    grid-template-columns: 5.5rem 3rem 1fr;
    gap: var(--abstand-0) var(--abstand-2);
    padding-bottom: var(--abstand-2);
    border-bottom: 1px dashed var(--linie);
    font-size: var(--text-xs);
  }
  .changelog-list li:last-child { padding-bottom: 0; border-bottom: 0; }
  .changelog-date { font-weight: var(--gewicht-betont); color: var(--text-marke); font-variant-numeric: tabular-nums; }
  .changelog-version {
    align-self: start;
    padding: 0 0.4em;
    background: var(--flaeche-ruhig);
    border-radius: var(--radius-pille);
    font-weight: var(--gewicht-betont);
    color: var(--text-marke);
    text-align: center;
  }
  .changelog-text { color: var(--text-gedeckt); }
  .changelog-text strong { color: var(--text); }
  .changelog-footer {
    margin-top: var(--abstand-2);
    padding-top: var(--abstand-2);
    border-top: 1px solid var(--linie);
    font-size: var(--text-xs);
    color: var(--text-hilfe);
  }
  @container rechner (max-width: 30rem) {
    .changelog-list li { grid-template-columns: 1fr; }
    .changelog-version { justify-self: start; }
  }

  .trust-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: var(--abstand-2);
    padding: var(--abstand-3);
    margin: var(--abstand-1) 0 var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
  }
  .trust-block-item { display: flex; align-items: center; gap: var(--abstand-2); }
  .trust-block-item svg { flex-shrink: 0; width: 1.375rem; height: 1.375rem; color: var(--marke); }
  .trust-block-item strong { display: block; font-size: var(--text-s); line-height: 1.25; color: var(--text); }
  .trust-block-item span { display: block; font-size: var(--text-xs); color: var(--text-hilfe); }

  /* ------------------------------------------------------------------------
     Diagramme: Rahmen, Titel, Legende (die Grafik selbst baut der Rechner)
     ------------------------------------------------------------------------ */
  .viz-card { padding: var(--abstand-3); margin-bottom: var(--abstand-3); }
  .viz-header { display: flex; flex-direction: column; gap: var(--abstand-0); margin-bottom: var(--abstand-2); }
  .viz-title { font-size: var(--text-m); font-weight: var(--gewicht-betont); color: var(--text); }
  .viz-sub { font-size: var(--text-xs); color: var(--text-gedeckt); }
  .viz-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--abstand-1) var(--abstand-3);
    margin-top: var(--abstand-2);
    font-size: var(--text-xs);
    color: var(--text-gedeckt);
  }
  .legend-item { display: inline-flex; align-items: center; gap: var(--abstand-1); }
  .legend-dot { width: 0.625rem; height: 0.625rem; border-radius: var(--radius-rund); background: var(--reihe-1); }

  /* Reihenfarbe als Klasse — für Balkensegmente, Legendenpunkte, SVG-Flächen */
  .reihe-1 { --reihe: var(--reihe-1); }
  .reihe-2 { --reihe: var(--reihe-2); }
  .reihe-3 { --reihe: var(--reihe-3); }
  .reihe-4 { --reihe: var(--reihe-4); }
  .reihe-5 { --reihe: var(--reihe-5); }
  :is(.reihe-1, .reihe-2, .reihe-3, .reihe-4, .reihe-5):not(svg *) { background-color: var(--reihe); }
  svg :is(.reihe-1, .reihe-2, .reihe-3, .reihe-4, .reihe-5) { fill: var(--reihe); }
  .legend-val { font-weight: var(--gewicht-betont); color: var(--text); font-variant-numeric: tabular-nums; }

  /* ------------------------------------------------------------------------
     Produktempfehlungen (Karten werden von app.js erzeugt)
     ------------------------------------------------------------------------ */
  .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    gap: var(--abstand-3);
  }
  .product-card {
    display: flex;
    flex-direction: column;
    gap: var(--abstand-2);
    padding: var(--abstand-3);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    box-shadow: var(--schatten-1);
    transition: box-shadow var(--dauer-mittel) var(--kurve), transform var(--dauer-mittel) var(--kurve);
  }
  .product-card:hover { box-shadow: var(--schatten-2); transform: translateY(-2px); }
  .product-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--abstand-1);
    font-size: var(--text-xs);
    font-weight: var(--gewicht-betont);
    color: var(--text-gedeckt);
  }
  .product-brand .product-badge { margin-left: auto; }
  .retailer-logo {
    width: 1.25rem;
    height: 1.25rem;
    padding: 2px;
    object-fit: contain;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    flex-shrink: 0;
  }
  .product-badge-mini {
    background: var(--flaeche);
    color: var(--signal-negativ-text);
    box-shadow: inset 0 0 0 1px var(--signal-negativ);
  }
  .product-name { margin: 0; font-size: var(--text-l); font-weight: var(--gewicht-betont); line-height: 1.25; color: var(--text); }
  .product-type-note {
    padding: var(--abstand-1) var(--abstand-2);
    font-size: var(--text-xs);
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--signal-negativ);
    border-radius: var(--radius);
  }
  .product-specs { display: flex; flex-direction: column; gap: var(--abstand-0); margin: 0; padding: 0; list-style: none; }
  .product-specs li {
    position: relative;
    padding-left: 1.5rem;
    font-size: var(--text-s);
    color: var(--text-gedeckt);
  }
  .product-specs li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 1.05em;
    height: 1.05em;
    background-color: var(--marke);
    mask: var(--icon-haken) center / contain no-repeat;
  }
  .product-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--abstand-2);
    margin-top: auto;
    padding-top: var(--abstand-2);
    border-top: 1px solid var(--linie);
  }
  .product-price { font-size: var(--text-xl); font-weight: var(--gewicht-betont); color: var(--text); font-variant-numeric: tabular-nums; }
  .product-price small { font-size: var(--text-xs); font-weight: var(--gewicht-normal); color: var(--text-gedeckt); }
  .product-footer .btn { min-height: 2.5rem; padding: 0 var(--abstand-3); font-size: var(--text-s); }

  .empty-products {
    grid-column: 1 / -1;
    padding: var(--abstand-4);
    text-align: center;
    color: var(--text-gedeckt);
    background: var(--flaeche-ruhig);
    border: 1px dashed var(--linie-ruhig);
    border-radius: var(--radius);
  }

  /* Rechtliches und Quellen */
  .disclaimer {
    margin-top: var(--abstand-3);
    font-size: var(--text-xs);
    line-height: 1.5;
    color: var(--text-hilfe);
  }
}
