/* ============================================================
   riester-vergleich.css – Auswahl + Matrix
   Baut auf base.css und anbieterportal.css auf.
   ============================================================ */

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

/* ============================================================
   Seitenbreite – NUR auf dieser Seite (.riat-rv-page).
   Header, Breadcrumb und Raster laufen auf gleicher Kante,
   damit die breitere Ansicht ruhig bleibt.
   ============================================================ */
.riat-rv-page .av-container {
  max-width: 1560px;
  padding-inline: 40px;      /* angenehmer Seitenrand, nicht randlos */
}

/* ---- Zurueck-Link neben dem Logo ----
   Ersetzt die fruehere Breadcrumb-Zeile. Das Logo bleibt ganz links,
   der Link sitzt direkt dahinter; die Header-Aktionen rutschen per
   margin-left:auto nach rechts (mit drei Kindern greift das
   space-between der Basisregel sonst nicht mehr wie gewuenscht). */
.riat-rv-back {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 18px; padding: 6px 10px;
  border-radius: 7px;
  font-size: 13px; font-weight: 600;
  color: var(--av-navy);
  transition: background .12s;
}
.riat-rv-back svg { flex: none; }
.riat-rv-back:hover { background: var(--av-bg-soft); text-decoration: underline; }

.riat-rv-page .av-header__actions { margin-left: auto; }

.riat-rv-grid {
  display: grid;
  /* Linkes Panel behaelt seine feste Breite – der Zugewinn geht
     komplett an den Matrixbereich rechts. */
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-block: 24px;
}

/* ============================================================
   LINKS: Konfigurationspanel
   ============================================================ */
.riat-rv-panel {
  background: var(--av-card-bg);
  border: 1px solid var(--av-card-border);
  border-radius: var(--av-radius);
  box-shadow: var(--av-card-shadow);
  padding: 18px;
  min-width: 0;
  /* 24px Eigenabstand (padding-block des Grids daruber) plus die
     Hoehe der gemeinsamen Kopfzeile aus --av-kopf-h.

     Vorher 92px, unveraendert aus dem Riestertool uebernommen -
     ein Wert, der einen alten Seitenkopf einrechnete und schon vor
     dem Kopfzeilen-Umbau 6px zu tief lag (siehe die Rechnung in
     css/vorsorge-vergleich.css bei .av-vv-panel). */
  position: sticky; top: calc(var(--av-kopf-h) + 24px);
}
.riat-rv-panel__title {
  font-size: 17px; font-weight: 700; color: var(--av-heading);
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--av-line);
}

.riat-rv-step { margin-bottom: 14px; }
.riat-rv-step__head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.riat-rv-step__no {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--av-navy); color: #fff;
  display: grid; place-items: center; flex: none;
  font-size: 12px; font-weight: 700;
}
.riat-rv-step__title {
  font-size: 14.5px; font-weight: 700; color: var(--av-heading);
  flex: 1 1 auto; min-width: 0;
}
.riat-rv-step__meta { font-size: 12px; color: var(--av-muted); flex: none; }

.riat-rv-zaehler {
  flex: none;
  font-size: 12.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: #eef0f5; color: var(--av-muted);
}
.riat-rv-zaehler.is-active { background: #e6edfb; color: var(--av-navy); }
.riat-rv-zaehler.is-full   { background: #fdf0dc; color: #9a6511; }

.riat-rv-hint {
  font-size: 12.5px; color: var(--av-muted);
  overflow-wrap: break-word;
}

/* Gesellschafts-/Tarifliste */
.riat-rv-liste {
  max-height: 400px; overflow-y: auto;
  margin: 6px -4px 14px; padding: 0 4px;
  border-top: 1px solid var(--av-line);
}

.riat-rv-ges { border-bottom: 1px solid #f0f2f7; }
.riat-rv-ges:last-child { border-bottom: none; }

/* Kopfzeile = Auf-/Zuklapp-Schalter (Button, keine Checkbox) */
.riat-rv-ges__head {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 11px 8px;
  border: none; background: transparent; border-radius: 7px;
  font-family: inherit; text-align: left; cursor: pointer;
  transition: background .12s;
}
.riat-rv-ges__head:hover { background: var(--av-bg-soft); }

.riat-rv-ges__name {
  flex: 1 1 auto; min-width: 0;
  font-size: 14px; font-weight: 600; color: var(--av-text);
  overflow-wrap: break-word;
}
.riat-rv-ges.has-selection .riat-rv-ges__name { color: var(--av-navy); }

/* Zeigt bei ZUGEKLAPPTER Liste, dass hier etwas gewaehlt ist */
.riat-rv-ges__sel {
  flex: none;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: #e6edfb; color: var(--av-navy);
  white-space: nowrap;
}

.riat-rv-ges__count { flex: none; font-size: 11.5px; color: var(--av-muted); }
.riat-rv-ges__chev { flex: none; color: #b5bed6; transition: transform .15s; }

/* Chevron folgt dem Aufklappzustand */
.riat-rv-ges__head[aria-expanded="true"] .riat-rv-ges__chev { transform: rotate(180deg); }

.riat-rv-tarife { padding: 2px 0 8px 26px; display: grid; gap: 3px; }

/* Das hidden-Attribut wirkt nur ueber die UA-Regel [hidden]{display:none} –
   und JEDE Autoren-Regel schlaegt eine UA-Regel. Ohne die folgende Zeile
   gewinnt das display:grid oben, und der Block bleibt trotz hidden sichtbar.
   Spezifitaet (0,2,0) > (0,1,0) der Basisregel, daher kein !important noetig. */
.riat-rv-tarife[hidden] { display: none; }

.riat-rv-tarif {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px; border-radius: 7px; cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
  min-width: 0;
}
.riat-rv-tarif:hover { background: var(--av-bg-soft); }
.riat-rv-tarif.is-selected { background: #eaf1fb; border-color: #cfdff7; }
.riat-rv-tarif.is-disabled { opacity: .45; cursor: not-allowed; }
.riat-rv-tarif.is-disabled:hover { background: transparent; }

.riat-rv-tarif input { flex: none; margin-top: 2px; width: 14px; height: 14px; accent-color: #16357a; cursor: pointer; }
.riat-rv-tarif.is-disabled input { cursor: not-allowed; }
.riat-rv-tarif__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.riat-rv-tarif__name {
  font-size: 13px; font-weight: 600; color: var(--av-text);
  min-width: 0; overflow-wrap: break-word; word-break: normal;
}
.riat-rv-tarif__stand { font-size: 11px; color: var(--av-muted); }

.riat-rv-empty-search {
  padding: 14px 6px; font-size: 13.5px; color: var(--av-muted); text-align: center;
}

.riat-rv-actions { display: grid; gap: 8px; }

.riat-rv-panel__foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--av-line);
  font-size: 12px; color: var(--av-muted);
}
.riat-rv-panel__foot svg { flex: none; color: #9aa5c4; }

/* ============================================================
   RECHTS: Matrixbereich
   ============================================================ */
.riat-rv-main {
  background: var(--av-card-bg);
  border: 1px solid var(--av-card-border);
  border-radius: var(--av-radius);
  box-shadow: var(--av-card-shadow);
  padding: 22px;
  min-width: 0;
}
.riat-rv-main__title { font-size: 19px; font-weight: 700; color: var(--av-heading); }

/* Kriterien-Reiter
   margin-top an die Überschrift angepasst (vorher 18px, als darunter
   noch eine Unterzeile stand). */
.riat-rv-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 13px 0 0;
  /* Nur eine hauchzarte Grundlinie an der Grenze Reiter -> Matrix; die
     kraeftige Markierung liefert der aktive Tab. Vorher 1.5px --av-line,
     das wirkte am oberen Rand wie eine feste dunkle Trennlinie. */
  border-bottom: 1px solid #f1f3f9;
}
.riat-rv-tab {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; background: transparent;
  padding: 9px 14px; margin-bottom: -1.5px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--av-muted); cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: color .12s, border-color .12s;
  white-space: nowrap;
}
/* Icons schmuecken nur – gedaempft, damit sie den Text nicht dominieren */
.riat-rv-tab svg { flex: none; opacity: .62; transition: opacity .12s; }
.riat-rv-tab:hover svg { opacity: .85; }
.riat-rv-tab.is-active svg { opacity: 1; }

.riat-rv-tab:hover { color: var(--av-navy); }
.riat-rv-tab.is-active { color: var(--av-navy); border-bottom-color: var(--av-navy); }

/* Matrix-Scroll-Container.
   FALLE 1: overflow-x:auto laesst overflow-y auf auto rechnen -> dieser
   Wrapper IST ohnehin der Scroll-Container. Statt dagegen zu arbeiten,
   machen wir ihn bewusst zum Scroll-Container beider Achsen: max-height
   ~ Viewport (unter dem festen Seiten-Header). Der Tabellenkopf klebt
   dann relativ zu DIESEM Container (position:sticky top:0), die linke
   Kriteriumsspalte relativ dazu (left:0). Frozen-Panes in beide Richtungen. */
.riat-rv-matrixwrap {
  overflow: auto;
  /* Fallback ohne JS: grosszuegiger Abzug, damit der Pane NIE unten
     ueberlaeuft. Das Skript (paneAnpassen) misst die Oberkante zur
     Laufzeit und setzt die exakte Hoehe per inline max-height. */
  max-height: calc(100vh - 230px);
  margin-top: 4px;
  overscroll-behavior: contain;   /* Scroll-Kette bricht nicht auf die Seite durch */
}

/* table-layout:fixed -> die unten gesetzten Spaltenbreiten gelten
   verbindlich, dadurch sind die Tarifspalten exakt gleich breit. */
/* Grundgroesse der Zellenwerte. Die Spaltenkoepfe haben eigene
   font-size-Angaben und bleiben davon unberuehrt. */
.riat-rv-matrix {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px; min-width: 760px;
}

/* ---- Tarifspalten immer gleichmaessig verteilen ----
   data-av-cols wird serverseitig gesetzt (1-4). Die Kriterienspalte
   ist fix, der Rest teilt sich zu gleichen Teilen auf. */
.riat-rv-matrix[data-av-cols="1"] .riat-rv-col { width: calc(100% - 230px); }
.riat-rv-matrix[data-av-cols="2"] .riat-rv-col { width: calc((100% - 230px) / 2); }
.riat-rv-matrix[data-av-cols="3"] .riat-rv-col { width: calc((100% - 230px) / 3); }
.riat-rv-matrix[data-av-cols="4"] .riat-rv-col { width: calc((100% - 230px) / 4); }

/* Kriterienspalte: schmaler (230 statt 330). Lange Kriteriennamen duerfen
   dafuer zweizeilig umbrechen; der gewonnene Platz geht an die Tarifspalten. */
.riat-rv-matrix__corner {
  text-align: left; vertical-align: bottom;
  padding: 14px 16px;
  width: 230px;
  font-size: 11px; font-weight: 700; color: var(--av-muted);
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 2px solid var(--av-line);
  border-right: 1px solid var(--av-line);
  background: #f7f9fc;
  /* Eckzelle: oben UND links fixiert -> hoechste Ebene, damit sie
     weder von der Kopfzeile noch von der Label-Spalte ueberdeckt wird. */
  position: sticky; left: 0; top: 0; z-index: 5;
  box-shadow: 0 4px 6px -5px rgba(20, 30, 60, .12);
}

/* ============================================================
   Spaltenkopf: farbig nach POSITION + feste vertikale Zonen.
   Keine Ringe, keine Prozente.
   ============================================================ */
.riat-rv-col {
  /* sticky statt relative: bleibt Anker fuer den absoluten "x"-Button
     UND friert beim Vertikalscrollen oben ein. Deckende Farbflaeche
     (riat-rv-col--N) verhindert Durchscheinen. */
  position: sticky; top: 0; z-index: 3;
  text-align: left;
  vertical-align: top;              /* Zonen starten oben buendig */
  padding: 15px 40px 13px 22px;     /* rechts Platz fuer das "x" */
  color: #fff;
  /* Dezenter Spalt zwischen den Koepfen: helle Inline-Raender in Card-Farbe.
     Im border-collapse verschmelzen die Raender benachbarter Koepfe zu EINEM
     3px-Spalt, durch den der helle Hintergrund scheint -> jeder Tarif wirkt
     als eigene farbige Karte. background-clip haelt die Farbe im Padding-Bereich.
     Nur die Kopfzeile ist getrennt; die Datenzellen darunter bleiben bewusst
     ungetrennt (vertikale Rand-Segmente reichen nur ueber die Kopfhoehe). */
  border-left: 1.5px solid var(--av-card-bg);
  border-right: 1.5px solid var(--av-card-bg);
  background-clip: padding-box;
  /* Sehr weicher, flacher Schatten als einzige Trennung Kopf -> Zellen.
     Bewusst KEINE dunkle border-bottom mehr (siehe riat-rv-col--N).
     Der Schatten ist statisch, sieht daher im Ruhe- und Sticky-Zustand
     identisch aus -> kein sichtbarer Wechsel beim Scrollen. */
  box-shadow: 0 4px 6px -5px rgba(20, 30, 60, .12);
}

/* Tarif aus dem Vergleich entfernen */
.riat-rv-colclose {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: none; border-radius: 6px;
  background: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.riat-rv-colclose:hover {
  background: rgba(255, 255, 255, .30);
  color: #fff;
}
.riat-rv-colclose[hidden] { display: none; }

/* ---- Farbpalette nach Spaltenposition (gedeckt) ----
   Bewusst entsaettigt fuer den ruhigen B2B-Look: Saettigung auf 24-34 %
   vereinheitlicht (vorher 36-68 %, dadurch wirkte v. a. der Bernstein
   plakativ). Helligkeit 28-34 %, dadurch alle >6,7:1 Kontrast zu Weiss.
   Unterscheidbarkeit bleibt ueber den Farbton UND leicht abweichende
   Helligkeit erhalten.
   Die Farbe bleibt auf den KOPF beschraenkt, Datenzellen bleiben weiss/Zebra. */
/* Keine dunkle border-bottom mehr: die fruehere 3px-Kante erzeugte einen
   harten dunklen Strich an der Unterkante der Koepfe. Jetzt endet die
   Farbflaeche weich, der flache Schatten (riat-rv-col) traegt den Uebergang. */
.riat-rv-col--1 { background: #4d6689; }  /* marine    hsl(215,28%,42%) */
.riat-rv-col--2 { background: #685b8f; }  /* violett   hsl(255,22%,46%) */
.riat-rv-col--3 { background: #407172; }  /* petrol    hsl(182,28%,35%) */
.riat-rv-col--4 { background: #7d6440; }  /* bernstein hsl( 36,32%,37%) */

/* ---- Feste Zonen ----
   Zone 2 zeigt jetzt nur die kurze Tarifbezeichnung (Code, z. B. "ARF1UGD"),
   nicht mehr den langen Verkaufsnamen -> eine Zeile statt bis zu vier, der
   Kopf wird spuerbar niedriger. Bemessung bei 4 Spalten (engste Spalte):
     Zone 1: "Generali Deutschland" -> 2 Zeilen a 18,1px = 37px
     Zone 2: kurzer Code            -> 1 Zeile
     Zone 3: "Stand 12.2025"        -> 1 Zeile
   Name, Code und Stand liegen bei allen Spalten exakt auf einer Linie. */
.riat-rv-col__ges {
  display: block;
  min-height: 38px;
  font-size: 14.5px; line-height: 1.25; font-weight: 800; color: #fff;
  overflow-wrap: break-word; word-break: normal; hyphens: none;
}
.riat-rv-col__tarif {
  display: block;
  min-height: 18px;
  margin-top: 3px;
  font-size: 13px; line-height: 1.3; font-weight: 700;
  letter-spacing: .2px;
  color: rgba(255, 255, 255, .92);
  overflow-wrap: break-word; word-break: normal; hyphens: none;
}
.riat-rv-col__stand {
  display: block;
  min-height: 15px;
  font-size: 11.5px; line-height: 1.3; font-weight: 500;
  color: rgba(255, 255, 255, .8);
}

/* Subtiles Zebra + feine Linien: haelt die Zeile ueber die volle Breite */
.riat-rv-row:nth-child(even) { background: #fbfcfe; }
.riat-rv-row:hover { background: #f2f6fc; }

/* Kriterienspalte optisch abgesetzt (eigener Ton + Trennlinie rechts) */
.riat-rv-lbl {
  text-align: left; vertical-align: top;
  padding: 11px 16px;
  font-size: 11.5px; font-weight: 600; line-height: 1.35;
  color: var(--av-heading);
  border-bottom: 1px solid #eef1f6;
  border-right: 1px solid var(--av-line);
  position: sticky; left: 0; z-index: 1;
  background: #f7f9fc;
  overflow-wrap: break-word; word-break: normal; hyphens: none;
}
.riat-rv-row:nth-child(even) .riat-rv-lbl { background: #f3f6fb; }
.riat-rv-row:hover .riat-rv-lbl { background: #edf2fa; }

/* Textzellen: deutsche Silbentrennung.
   Reihenfolge der Umbruchstrategien:
     1. hyphens:auto  -> trennt an echten Silbengrenzen MIT Trennstrich
        (braucht die Sprachangabe – lang="de" steht am <html> und
         zusaetzlich an der Matrix selbst)
     2. overflow-wrap:break-word -> nur als letzter Ausweg, wenn ein
        unteilbares Zeichenband breiter als die Spalte ist
     3. word-break:normal -> verhindert den zeichenweisen Hartumbruch,
        der vorher "Wertsicherungskonze/pt" erzeugt hat */
.riat-rv-val {
  vertical-align: top;
  padding: 11px 20px;            /* vertikal etwas knapper, faengt 2-zeilige Kriterien ab */
  line-height: 1.45;
  border-bottom: 1px solid #eef1f6;
  border-left: 1px solid #f4f6fa;
  color: var(--av-text);
  min-width: 0;
  -webkit-hyphens: auto;
      -ms-hyphens: auto;
          hyphens: auto;
  hyphenate-limit-chars: 6 3 3;  /* erst ab 6 Zeichen trennen */
  overflow-wrap: break-word;
  word-break: normal;
}

/* Zahlen und Symbole nicht trennen */
.riat-rv-val .riat-rv-num,
.riat-rv-val .riat-rv-yes,
.riat-rv-val .riat-rv-no,
.riat-rv-val .riat-rv-leer { hyphens: none; -webkit-hyphens: none; }

/* Abschnitts-Überschrift (z. B. "Dauer 12 Jahre") */
.riat-rv-row.is-section { background: #eaf1fb !important; }
.riat-rv-sec {
  text-align: left; padding: 11px 22px;
  font-size: 11px; font-weight: 800; color: var(--av-navy);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid #d8e4f6;
}

/* Boolean-Symbole – kompakt und zurueckhaltend.
   "Ja" behaelt die positive gruene Anmutung.
   "Nein" ist ein neutrales Minus in gedaempftem Graublau statt eines
   roten Kreuzes: Es bedeutet "nicht vorhanden", keinen Fehler. */
.riat-rv-yes, .riat-rv-no {
  display: inline-grid; place-items: center;
  width: 21px; height: 21px; border-radius: 50%;
}
.riat-rv-yes { background: #e3f3e8; color: #1f7a45; }
.riat-rv-no  { background: #eef0f5; color: #5d6484; }

/* Symbol + Detailwert in EINER Zelle ("✓ 1 % – 10 %").
   flex-start, damit der Haken bei mehrzeiligem Detailtext oben bleibt. */
.riat-rv-mitdetail {
  display: flex; align-items: flex-start; gap: 8px; min-width: 0;
}
.riat-rv-mitdetail .riat-rv-yes,
.riat-rv-mitdetail .riat-rv-no { flex: none; }
/* gekuerzter Detailtext muss den Restplatz fuellen und schrumpfen duerfen */
.riat-rv-mitdetail > .riat-rv-clip,
.riat-rv-mitdetail > .riat-rv-more { flex: 1 1 auto; min-width: 0; }
.riat-rv-detail {
  min-width: 0; padding-top: 2px;
  overflow-wrap: break-word; word-break: normal;
}

.riat-rv-num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.riat-rv-leer { color: #b5bed6; }

/* .riat-rv-kein (Hinweis "Es liegt keine Beispielrechnung vor.") bekommt
   BEWUSST keine eigene Formatierung: Der Text soll sich nicht von
   "Passende Beispielrechnung liegt vor." unterscheiden. Die Klasse bleibt
   nur als Marker im Markup erhalten. */

/* ============================================================
   Lange Textwerte kuerzen
   Der volle Text steht im DOM, die Kuerzung macht line-clamp.
   ============================================================ */
.riat-rv-more { min-width: 0; }

/* Garantiemodell/Besonderheiten: nur der Info-Button, LINKSbuendig -
   auf derselben vertikalen Linie wie die Status-Symbole (Haken/Minus).
   Der volle Text bleibt als versteckte Popover-Quelle im DOM. */
.riat-rv-clip { display: flex; justify-content: flex-start; min-width: 0; }
.riat-rv-clip__txt { display: none; }

.riat-rv-more__txt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word; word-break: normal;
}
/* aufgeklappt: Kuerzung aufheben */
.riat-rv-more.is-open .riat-rv-more__txt {
  display: block;
  -webkit-line-clamp: none;
  overflow: visible;
}

/* ---- Mechanismus A: Info-Button (Dokument-Icon "file-text") ----
   Reines Icon OHNE dauerhaften Kreis. Farbe im Seitenton (#333366):
   gut sichtbar, aber ruhig, und klar von den passiven Pastell-Status-
   Symbolen (.riat-rv-yes / .riat-rv-no) abgehoben. Der 21px-Rahmen haelt
   Groesse/Achse zu den Status-Symbolen und die Klickflaeche. Als Bedien-
   element erkennbar durch dezenten Hover-Badge (helles Blau + Navy) und
   Cursor pointer. */
.riat-rv-info {
  display: inline-grid; place-items: center;
  padding: 0; border: none;
  width: 21px; height: 21px; border-radius: 6px;
  background: transparent; color: #333366;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.riat-rv-info svg { display: block; }
.riat-rv-info:hover,
.riat-rv-info:focus-visible {
  background: #eaf1fb; color: var(--av-navy);
  outline: none;
}
.riat-rv-info[hidden] { display: none; }

/* ---- Mechanismus B: "mehr anzeigen" ---- */
.riat-rv-more__btn {
  display: inline-block;
  margin-top: 3px; padding: 0;
  border: none; background: transparent;
  font-family: inherit; font-size: 11px; font-weight: 700;
  color: var(--av-navy); cursor: pointer;
  text-decoration: underline;
}
.riat-rv-more__btn:hover { color: var(--av-navy-dark); }
.riat-rv-more__btn[hidden] { display: none; }

/* ---- Popover ---- */
.riat-rv-pop {
  position: fixed; z-index: 100;
  width: min(420px, calc(100vw - 32px));
  max-height: min(60vh, 520px);
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--av-card-border);
  border-radius: var(--av-radius);
  box-shadow: 0 8px 20px rgba(20,30,60,.14), 0 24px 60px rgba(20,30,60,.20);
}
.riat-rv-pop[hidden] { display: none; }

.riat-rv-pop__head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--av-line);
}
.riat-rv-pop__titel {
  flex: 1 1 auto; min-width: 0;
  font-size: 13.5px; font-weight: 700; color: var(--av-heading);
  overflow-wrap: break-word;
}
.riat-rv-pop__sub {
  display: block; margin-top: 2px;
  font-size: 11.5px; font-weight: 500; color: var(--av-muted);
}
.riat-rv-pop__close {
  flex: none; width: 26px; height: 26px;
  display: grid; place-items: center;
  border: none; border-radius: 6px;
  background: transparent; color: var(--av-muted); cursor: pointer;
  transition: background .12s, color .12s;
}
.riat-rv-pop__close:hover { background: var(--av-bg-soft); color: var(--av-heading); }

.riat-rv-pop__body {
  padding: 14px 16px;
  overflow-y: auto;
  font-size: 12.5px; line-height: 1.55; color: var(--av-text);
  overflow-wrap: break-word; word-break: normal;
}

/* Klickfaenger zum Schliessen */
.riat-rv-popbg {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(20, 30, 60, .12);
}
.riat-rv-popbg[hidden] { display: none; }

/* Leerzustand */
.riat-rv-empty {
  display: grid; place-items: center; gap: 10px; text-align: center;
  padding: 60px 20px; color: var(--av-muted);
}
/* muss die display:grid-Regel schlagen, sonst bleibt der Leerzustand
   trotz hidden sichtbar */
.riat-rv-empty[hidden] { display: none; }
.riat-rv-empty svg { color: #c3cee3; }
.riat-rv-empty h3 { font-size: 16px; font-weight: 700; color: var(--av-heading); }
.riat-rv-empty p { font-size: 13.5px; max-width: 42ch; overflow-wrap: break-word; }

/* ============================================================
   Responsiv
   ============================================================ */
@media (max-width: 1400px) {
  .riat-rv-page .av-container { padding-inline: 28px; }
}
@media (max-width: 1100px) {
  .riat-rv-grid { grid-template-columns: 300px minmax(0, 1fr); }
  /* schmalere Kriterienspalte, damit den Tarifen mehr Platz bleibt */
  .riat-rv-matrix__corner { width: 200px; }
  .riat-rv-matrix[data-av-cols="1"] .riat-rv-col { width: calc(100% - 200px); }
  .riat-rv-matrix[data-av-cols="2"] .riat-rv-col { width: calc((100% - 200px) / 2); }
  .riat-rv-matrix[data-av-cols="3"] .riat-rv-col { width: calc((100% - 200px) / 3); }
  .riat-rv-matrix[data-av-cols="4"] .riat-rv-col { width: calc((100% - 200px) / 4); }
  .riat-rv-lbl, .riat-rv-val, .riat-rv-col, .riat-rv-matrix__corner { padding-inline: 16px; }
}
@media (max-width: 900px) {
  .riat-rv-grid { grid-template-columns: 1fr; }
  .riat-rv-panel { position: static; }
  .riat-rv-liste { max-height: 320px; }
  /* Sticky-Spalte auf schmalen Screens aufheben – sonst zu wenig Platz */
  .riat-rv-matrix__corner, .riat-rv-lbl { position: static; }
}
@media (max-width: 640px) {
  .riat-rv-page .av-container { padding-inline: 20px; }
  .riat-rv-main { padding: 16px; }
  .riat-rv-panel { padding: 14px; }
}

/* ============================================================
   Rueckweg-Leiste so breit wie Inhalt und Kopfzeile (seit Runde 4e,
   19.10.2026). Die Leiste traegt sonst .av-container mit 1200px aus
   css/base.css. Hier dieselben Werte wie .riat-rv-page .av-container oben und
   wie die Kopfzeile seit Runde 4d (css/kopfzeile.css, av-kopf-breit):
   1560px, seitlich 40px, bis 1400px 28px, bis 640px 20px. Rueckweg-Link
   damit buendig mit dem Logo, rechte Knoepfe buendig mit "Anbieterportal".
   Nur wirksam, wo .riat-rv-page steht, also nur auf Riester-Vergleich.aspx.
   ============================================================ */
body:has(.riat-rv-page) .av-kopfleiste .av-container {
  max-width: 1560px;
  padding-inline: 40px;
}
@media (max-width: 1400px) {
  body:has(.riat-rv-page) .av-kopfleiste .av-container { padding-inline: 28px; }
}
@media (max-width: 640px) {
  body:has(.riat-rv-page) .av-kopfleiste .av-container { padding-inline: 20px; }
}
