/* Rostock-Heute.de – Layout-Redesign (Phase 5).
   Mobile First, seriös, schnell. Eigenes CSS (kein Framework).
   Schichten-Architektur: base < layout < components < utilities.
   Spätere Schichten gewinnen unabhängig von Spezifität – so bleiben
   Komponenten override-bar, ohne !important. */
@layer base, layout, components, utilities;

/* =====================================================================
   TOKENS / DESIGN-VARIABLEN
   ===================================================================== */
@layer base {
  :root {
    /* Neutrale Flächen */
    --rh-bg: #fafafa;
    --rh-surface: #ffffff;
    --rh-fg: #15191e;
    --rh-muted: #5a636c;
    --rh-border: #e3e6ea;

    /* Regionale Akzentfarbe „Ostsee-Blau" + Abstufungen */
    --rh-accent: #0a6ea8;
    --rh-accent-strong: #07527c;
    --rh-accent-soft: #e8f1f7;
    --rh-accent-contrast: #ffffff;

    /* Ressort-Nuancen (CSS-getrieben, je Ressort über data-attr/klasse) */
    --rh-ressort: var(--rh-accent);

    /* Maße */
    --rh-max: 75rem;
    --rh-gutter: clamp(1rem, 0.6rem + 1.6vw, 2rem);
    --rh-radius: 0.5rem;
    --rh-radius-lg: 0.85rem;
    --rh-measure: 68ch;          /* Lesebreite Fließtext */
    --rh-shadow: 0 1px 2px rgb(15 25 30 / 0.04), 0 4px 16px rgb(15 25 30 / 0.06);

    /* Fluide Typografie */
    --rh-step--1: clamp(0.8rem, 0.77rem + 0.15vw, 0.9rem);
    --rh-step-0: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
    --rh-step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
    --rh-step-2: clamp(1.35rem, 1.15rem + 1vw, 1.85rem);
    --rh-step-3: clamp(1.7rem, 1.3rem + 1.9vw, 2.6rem);
    --rh-step-4: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);

    /* UI- und Body-Fonts: System-Stack als Sofortrender */
    --rh-font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --rh-font-body: var(--rh-font-ui);

    /* Nutzer-Schriftgröße (Live-Strip-Umschalter, in localStorage gemerkt) */
    --rh-font-scale: 1;

    color-scheme: light dark;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --rh-bg: #0f1115;
      --rh-surface: #171a20;
      --rh-fg: #eef1f4;
      --rh-muted: #9aa4ae;
      --rh-border: #2a2f37;
      --rh-accent: #3ea0d8;
      --rh-accent-strong: #6cbce8;
      --rh-accent-soft: #16242e;
      --rh-accent-contrast: #07171f;
      --rh-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.4);
    }
  }

  *, *::before, *::after { box-sizing: border-box; }

  /* Alle rem-Größen skalieren proportional mit der Nutzer-Schriftgröße */
  html {
    -webkit-text-size-adjust: 100%;
    font-size: calc(100% * var(--rh-font-scale, 1));
    /* Platz für den sticky Header (+ Strip), damit Sprungziele/Tastatur-Fokus nicht
       darunter verschwinden (WCAG 2.4.11 Focus Not Obscured, Skip-Link #main). */
    scroll-padding-top: 5rem;
  }

  body {
    margin: 0;
    background: var(--rh-bg);
    color: var(--rh-fg);
    font-family: var(--rh-font-body);
    font-size: var(--rh-step-0);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    /* Überlange Komposita (z. B. „Meerwasserentsalzungsanlage") umbrechen statt
       die Spalte zu sprengen — greift nur, wenn das Wort sonst überliefe. */
    overflow-wrap: break-word;
  }

  /* Schöne Silbentrennung (lang=de) für Titel + Fließtext */
  h1, h2, h3, .rh-card__title, .rh-mini__title, .rh-stage__title,
  .rh-videoband__title, .lead, .article-body { hyphens: auto; }

  img, picture, svg, video { max-width: 100%; height: auto; display: block; }

  a { color: var(--rh-accent); text-underline-offset: 0.15em; }

  h1, h2, h3 { line-height: 1.18; text-wrap: balance; }
  h1 { font-size: var(--rh-step-4); margin: 0 0 0.4em; letter-spacing: -0.01em; }
  h2 { font-size: var(--rh-step-2); margin: 0 0 0.5em; }
  h3 { font-size: var(--rh-step-1); margin: 0 0 0.5em; }
  p { margin: 0 0 1rem; }

  /* Sichtbarer Tastatur-Fokus (WCAG 2.2 – kein outline:none) */
  :focus-visible {
    outline: 3px solid var(--rh-accent);
    outline-offset: 2px;
    border-radius: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.001ms !important;
      transition-duration: 0.001ms !important;
      scroll-behavior: auto !important;
    }
  }
}

/* =====================================================================
   LAYOUT (Landmarks, Container, Grids)
   ===================================================================== */
@layer layout {
  .container {
    width: 100%;
    max-width: var(--rh-max);
    margin-inline: auto;
    padding-inline: var(--rh-gutter);
  }

  /* Skip-Link „Zum Inhalt" */
  .rh-skip {
    position: absolute;
    left: 0.5rem;
    top: -3rem;
    z-index: 100;
    background: var(--rh-accent);
    color: var(--rh-accent-contrast);
    padding: 0.5rem 0.9rem;
    border-radius: var(--rh-radius);
    text-decoration: none;
    transition: top 0.15s ease;
  }
  .rh-skip:focus { top: 0.5rem; }

  /* Nur oben Abstand; der Abstand zum Footer wird allein über .site-footer margin-top
     gesteuert (sonst stapeln sich beide → Content↔Footer-Trennlinie zu groß). */
  main { display: block; padding-top: clamp(0.85rem, 0.5rem + 1.2vw, 1.75rem); }

  /* responsives Karten-Raster, container-aware */
  .rh-grid {
    display: grid;
    gap: var(--rh-gutter);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  }
}

/* =====================================================================
   COMPONENTS
   ===================================================================== */
@layer components {

  /* ---------- Header / Topbar ---------- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--rh-surface) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(6px);
    border-bottom: 1px solid var(--rh-border);
  }
  .site-header__bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 3.5rem;
  }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    /* flex: none verhindert, dass die Brand im Flex-Container der Header-Leiste
       gequetscht wird. Sonst wuerde der globale `img { max-width: 100% }` (Z.99)
       in einer eng gemachten Brand-Box auf die Logo-Breite durchschlagen und das
       Logo vertikal-oval rendern — passiert besonders mit AdSense-Auto-Ads im
       Header oder bei vergroesserter Schrift auf engen Viewports. */
    flex: none;
    font-weight: 700;
    font-size: var(--rh-step-1);
    color: var(--rh-accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  /* flex: none verhindert horizontales Schrumpfen im inline-flex der .brand —
     bei vergroesserter Schrift (Mobil, Brand-Text ausgeblendet) wuerde das Logo
     sonst gestaucht/oval statt rund dargestellt. */
  .brand img { width: 1.9rem; height: 1.9rem; flex: none; }
  .site-header__spacer { flex: 1 1 auto; }
  .site-header__search { display: inline-flex; align-items: center; gap: 0.4rem; }
  .site-header__search-field {
    width: 12rem;
    padding: 0.4rem 0.75rem;
    font: inherit;
    font-size: var(--rh-step--1);
    color: var(--rh-fg);
    background: var(--rh-surface);
    border: 1px solid var(--rh-border);
    border-radius: 999px;
  }
  .site-header__search-field:focus-visible {
    outline: 2px solid var(--rh-accent);
    outline-offset: 1px;
    border-color: var(--rh-accent);
  }
  .site-header__search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem; height: 2.4rem;
    flex: none;
    padding: 0;
    border: 1px solid var(--rh-border);
    border-radius: 999px;
    background: var(--rh-surface);
    color: var(--rh-fg);
    cursor: pointer;
  }
  .site-header__search-btn:hover { border-color: var(--rh-accent); color: var(--rh-accent); }

  /* ---------- Hauptnavigation ---------- */
  .rh-nav { font-size: clamp(0.88rem, 0.8rem + 0.3vw, 1rem); font-weight: 600; }
  .rh-nav__list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 0.3rem + 1vw, 1.4rem);
  }
  .rh-nav__link {
    display: inline-block;
    padding: 0.5rem 0.1rem;
    color: var(--rh-fg);
    text-decoration: none;
    white-space: nowrap;
  }
  /* Aktiv/Hover: Unterstrich dicht am Text (Offset) statt am Box-Rand → mehr Luft zum Strip. */
  .rh-nav__link:hover,
  .rh-nav__link[aria-current="page"] {
    color: var(--rh-accent);
    text-decoration: underline;
    text-decoration-color: var(--rh-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.5rem;
  }
  .rh-nav__short { display: none; }

  /* „Mehr"-Disclosure: native <details>, kein JS */
  .rh-more { position: relative; }
  .rh-more > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.5rem 0.1rem;
    color: var(--rh-fg);
    white-space: nowrap;
  }
  .rh-more > summary::-webkit-details-marker { display: none; }
  .rh-more > summary::after { content: " ▾"; color: var(--rh-muted); }
  .rh-more[open] > summary { color: var(--rh-accent); }
  .rh-more__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    min-width: 13rem;
    background: var(--rh-surface);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius);
    box-shadow: var(--rh-shadow);
    padding: 0.4rem;
    z-index: 60;
  }
  .rh-more__panel a {
    display: block;
    padding: 0.5rem 0.7rem;
    color: var(--rh-fg);
    text-decoration: none;
    border-radius: calc(var(--rh-radius) - 0.2rem);
  }
  .rh-more__panel a:hover { background: var(--rh-accent-soft); color: var(--rh-accent-strong); }
  .rh-more__sep { height: 1px; background: var(--rh-border); margin: 0.35rem 0.3rem; }

  /* Mobile-Toggle (Hamburger): CSS-only via versteckte Checkbox.
     Desktop = Hamburger aus, Leiste inline; Mobile = Hamburger an,
     Leiste als Dropdown, nur wenn die Checkbox gesetzt ist. */
  /* Rundes Icon-only (wie Suche / Schriftgröße); nur auf Mobile sichtbar */
  .rh-burger {
    display: none;
    align-items: center; justify-content: center;
    /* flex: none verhindert das Quetschen im Flex-Container — Brand mittig + Suche
       rechts üben sonst Druck auf den links sitzenden Burger aus → oval statt rund. */
    flex: none;
    width: 2.4rem; height: 2.4rem;
    cursor: pointer; user-select: none;
    border: 1px solid var(--rh-border);
    border-radius: 999px;
    background: var(--rh-surface); color: var(--rh-fg);
    font-size: 1.05rem; line-height: 1;
  }
  .rh-burger:hover { border-color: var(--rh-accent); color: var(--rh-accent); }

  @media (max-width: 52rem) {
    /* order:-1 setzt den Menü-Button links neben das Logo; Brand mittig
       (Hamburger links, Suche rechts), dafür den Desktop-Spacer ausblenden */
    .rh-burger { display: inline-flex; order: -1; }
    .site-header__spacer { display: none; }
    .site-header__search-field { display: none; } /* Mobil: nur der Such-Button (→ /suche) */
    .brand { margin-inline: auto; }
    /* Bei vergrößerter Schrift den Markentext weglassen → nur Logo (zentriert), spart Platz */
    html[data-font-enlarged] .brand span { display: none; }
    .rh-nav { display: none; }
    .rh-navtoggle:checked ~ .rh-nav {
      display: block;
      position: absolute;
      left: 0; right: 0;
      top: 100%;
      background: var(--rh-surface);
      border-bottom: 1px solid var(--rh-border);
      box-shadow: var(--rh-shadow);
      padding: 0.5rem var(--rh-gutter) 1rem;
    }
    .rh-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .rh-nav__link, .rh-more > summary { padding: 0.7rem 0; border-bottom: 1px solid var(--rh-border); }
    .rh-more__panel {
      position: static;
      border: 0; box-shadow: none; padding: 0 0 0 0.8rem;
      min-width: 0;
    }
  }

  /* Sehr schmal (< 360px): bei Normalschrift nur den Markentext (Logo weg);
     bei vergrößerter Schrift wie gehabt nur das Logo. */
  /* Logo erst ab 391px einblenden; ≤390px nur der Markentext (bei Normalschrift),
     bei vergrößerter Schrift wie gehabt nur das Logo. */
  @media (max-width: 390px) {
    .brand img { display: none; }
    html[data-font-enlarged] .brand img { display: block; }
  }
  /* Erst bei sehr schmal (≤320px) den Text verkleinern, damit er mit den Icons passt. */
  @media (max-width: 320px) {
    .brand { font-size: var(--rh-step-0); }
  }

  /* ---------- „heute in Rostock"-Live-Strip ---------- */
  .rh-strip {
    background: var(--rh-accent-soft);
    border-bottom: 1px solid var(--rh-border);
    font-size: var(--rh-step--1);
  }
  .rh-strip__inner {
    display: flex; flex-wrap: wrap;
    align-items: center; gap: 0.4rem 1.4rem;
    padding-block: 0.45rem;
    color: var(--rh-muted);
  }
  .rh-strip__item { display: inline-flex; align-items: center; gap: 0.4rem; }
  .rh-strip__label { font-weight: 700; color: var(--rh-accent-strong); }
  .rh-strip__link { color: var(--rh-accent-strong); font-weight: 700; text-decoration: none; }
  .rh-strip__link:hover { text-decoration: underline; }

  /* ---------- Footer ---------- */
  .site-footer {
    margin-top: 1.25rem;
    padding-block: 0 2rem;
    color: var(--rh-muted);
    font-size: var(--rh-step--1);
  }
  /* Trennlinie zum Footer eingerückt (im Content-Bereich, Gutter-Abstand links/rechts)
     statt randlos über die volle Viewport-Breite. */
  .site-footer > .container::before {
    content: ""; display: block;
    border-top: 1px solid var(--rh-border);
    margin-bottom: 1.5rem;
  }
  .site-footer a { color: var(--rh-muted); }
  .site-footer__nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; margin-bottom: 0.8rem; }

  /* ---------- Hero-Story (Startseite) ---------- */
  .rh-stage { margin-block: clamp(1.25rem, 0.5rem + 2vw, 2rem); }
  .rh-stage__lead {
    position: relative;
    display: grid;
    border-radius: var(--rh-radius-lg);
    overflow: hidden;
    background: var(--rh-surface);
    box-shadow: var(--rh-shadow);
    text-decoration: none;
    color: inherit;
  }
  .rh-stage__media { position: relative; }
  .rh-stage__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
  .rh-stage__body { padding: clamp(1rem, 0.6rem + 1.5vw, 1.6rem); }
  .rh-stage__kicker {
    font-size: var(--rh-step--1); font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--rh-ressort);
  }
  .rh-stage__title { font-size: var(--rh-step-2); margin: 0.05rem 0 0.4rem; }
  .rh-stage__teaser { color: var(--rh-muted); margin: 0; max-width: var(--rh-measure); }
  .rh-stage__date { font-size: 0.8rem; color: var(--rh-muted); margin-top: 0.3rem; }
  .rh-stage__link:hover .rh-stage__title { text-decoration: underline; }

  /* Container-Query: ab breitem Stage-Container Bild + Text nebeneinander.
     Bild bleibt strikt 16:9 (kein Strecken), oben ausgerichtet. */
  .rh-stage { container-type: inline-size; }
  @container (min-width: 46rem) {
    .rh-stage__lead { grid-template-columns: 1.4fr 1fr; align-items: start; }
  }

  /* ---------- „weiter wichtig"-3er-Reihe + generisches Karten-Grid ---------- */
  .rh-card-grid {
    display: grid;
    gap: var(--rh-gutter);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    margin-top: 1.25rem;
  }
  .rh-card {
    container-type: inline-size;
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius);
    overflow: hidden;
    background: var(--rh-surface);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
  }
  .rh-card:hover { box-shadow: var(--rh-shadow); }
  .rh-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
  .rh-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--rh-accent-soft); }
  .rh-card__body { padding: 0.85rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
  .rh-card__kicker {
    font-size: var(--rh-step--1); font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--rh-ressort);
  }
  .rh-card__title { font-size: var(--rh-step-1); line-height: 1.25; margin: 0; }
  .rh-card__link:hover .rh-card__title { text-decoration: underline; }
  .rh-card__teaser { font-size: var(--rh-step-0); color: var(--rh-muted); margin: 0; }
  .rh-card__date { font-size: 0.8rem; color: var(--rh-muted); margin-top: auto; padding-top: 0.3rem; }

  /* Search result card: kicker (category) left, date right, on one line. */
  .rh-card__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
  .rh-card__meta .rh-card__date { margin: 0; padding: 0; white-space: nowrap; }

  /* Sort dropdown: mobil unter dem Eingabefeld, exakt so breit wie das Feld
     (sie teilt sich mit dem Input die __fields-Spalte; der Button steht daneben). */
  .rh-search__sort-select {
    display: block; width: 100%;
    height: 2.5rem; padding: 0 0.9rem;
    font: inherit; color: var(--rh-fg); cursor: pointer;
    border: 1px solid var(--rh-border); border-radius: var(--rh-radius);
    background: var(--rh-surface);
  }
  .rh-search__sort-select:focus-visible { outline: 2px solid var(--rh-accent); outline-offset: -2px; }
  .rh-search__count { font-size: var(--rh-step--1); color: var(--rh-muted); margin: 0 0 1.25rem; }

  /* ---------- Ressort-Band (1 Lead + 3 Teaser) ---------- */
  /* container-type macht das Band selbst zur Abfrage-Basis → die @container-Regel
     unten greift jetzt (vorher war kein Container vorhanden → immer einspaltig). */
  .rh-band { margin-block: clamp(2rem, 1rem + 3vw, 3.5rem); container-type: inline-size; }
  .rh-band__head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; margin-bottom: 1rem;
    border-bottom: 3px solid var(--rh-ressort);
    padding-bottom: 0.4rem;
  }
  .rh-band__title { font-size: clamp(1.15rem, 1.0rem + 0.7vw, 1.5rem); margin: 0; color: var(--rh-fg); }
  .rh-band__more { font-size: var(--rh-step-0); font-weight: 700; text-decoration: none; white-space: nowrap; }
  .rh-band__more:hover { text-decoration: underline; }
  .rh-band__grid { display: grid; gap: var(--rh-gutter); }
  /* Ab ~Tablet-Breite (Band-Container ≥ 42rem ≈ 768px-Viewport): Lead links,
     Mini-Liste rechts. Darunter (Smartphone) einspaltig (Lead oben, Minis darunter). */
  @container (min-width: 42rem) {
    .rh-band__grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
    .rh-band__rest { display: grid; gap: 0.9rem; }
    /* Lead-Karte prominenter (größerer Titel + Teaser) als die Mini-Spalte rechts. */
    .rh-band__grid > .rh-card .rh-card__title { font-size: var(--rh-step-2); }
    .rh-band__grid > .rh-card .rh-card__teaser { font-size: var(--rh-step-0); }
  }

  /* Anzahl sichtbarer Mini-Artikel je Band-Typ. Server rendert das Maximum (1024er-
     Anzahl); schmaler werden Extras ausgeblendet. Standard (Smartphone + ~768px):
     Top 4, Videos 3, andere 5. Breit (Band-Container ≥ 58rem ≈ 1024px): Top 6, Videos 4, andere 6. */
  .rh-mini--top .rh-mini__item:nth-child(n+5),
  .rh-mini--videos .rh-mini__item:nth-child(n+4),
  .rh-mini--ressort .rh-mini__item:nth-child(n+6) { display: none; }
  @container (min-width: 58rem) {
    .rh-mini--top .rh-mini__item:nth-child(n+5),
    .rh-mini--videos .rh-mini__item:nth-child(n+4),
    .rh-mini--ressort .rh-mini__item:nth-child(n+6) { display: block; }
  }
  .rh-band__rest { display: grid; gap: var(--rh-gutter); grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }

  /* kompakte Band-Nebeneinträge: Titel links, kleines Bild rechts.
     padding-inline = Innenabstand der Lead-Karte → Titel fluchten mit deren Text. */
  .rh-mini { list-style: none; margin: 0; padding-inline: 1rem; display: grid; gap: 0.8rem; }
  /* Trenner als Oberrand ZWISCHEN den Items → unter dem letzten (auch wenn folgende
     per nth-child ausgeblendet sind) erscheint nie eine Linie. */
  .rh-mini__item + .rh-mini__item { border-top: 1px solid var(--rh-border); padding-top: 0.8rem; }
  /* flow-root umschließt den gefloateten Thumb; der Titel umfließt ihn und nutzt
     ab der Höhe des Bildes die volle Breite bis zum rechten Rand. */
  .rh-mini__link { display: flow-root; text-decoration: none; color: inherit; }
  .rh-mini__text { display: block; }
  .rh-mini__kicker {
    display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--rh-ressort); margin-bottom: 0.1rem;
  }
  .rh-mini__title { display: block; font-size: var(--rh-step-0); font-weight: 600; line-height: 1.3; }
  .rh-mini__link:hover .rh-mini__title { text-decoration: underline; }
  .rh-mini__thumb {
    float: right; width: 5.5rem; aspect-ratio: 16 / 9;
    object-fit: cover; border-radius: calc(var(--rh-radius) - 0.2rem);
    background: var(--rh-accent-soft);
    margin: 0.15rem 0 0.35rem 0.85rem;
  }

  /* schlichter Trenner (ersetzt die „Weiter wichtig"-Überschrift) */
  .rh-divider { border: 0; border-top: 1px solid var(--rh-border); margin-block: clamp(1.5rem, 1rem + 2vw, 2.5rem); }

  /* Startseiten-Abschnitt allgemein */
  .rh-section { margin-block: clamp(2rem, 1rem + 3vw, 3.5rem); }
  .rh-section__title {
    font-size: var(--rh-step-2); margin: 0 0 1rem;
    border-bottom: 3px solid var(--rh-accent); padding-bottom: 0.4rem;
  }
  /* Alias der alten Smoke-Test-Klassen, damit Bestands-Views weiter passen */
  .rh-stream { margin-block: clamp(2rem, 1rem + 3vw, 3.5rem); }
  .rh-stream__title {
    font-size: var(--rh-step-2); margin: 0 0 1rem;
    border-bottom: 3px solid var(--rh-accent); padding-bottom: 0.4rem;
  }

  /* ---------- Top-Videos (rhVideo, Klick-zum-Abspielen-Facade) ---------- */
  .rh-video-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius);
    overflow: hidden;
    background: var(--rh-surface);
    transition: box-shadow 0.15s ease;
  }
  .rh-video-card:hover { box-shadow: var(--rh-shadow); }
  .rh-video-card__play {
    position: relative; display: block; width: 100%; padding: 0; border: 0;
    cursor: pointer; background: #000; aspect-ratio: 16 / 9; overflow: hidden;
  }
  /* Absolut im 16:9-Rahmen → erzwingt die Höhe unabhängig vom 4:3-hqdefault von YouTube */
  .rh-video-card__thumb {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover; display: block;
    opacity: 0.92; transition: opacity 0.15s ease;
  }
  .rh-video-card__play:hover .rh-video-card__thumb { opacity: 1; }
  .rh-video-card__btn {
    position: absolute; inset: 0; margin: auto;
    width: 3.2rem; height: 3.2rem;
    display: grid; place-items: center;
    border-radius: 999px;
    background: rgb(0 0 0 / 0.6); color: #fff;
    font-size: 1.2rem; padding-left: 0.15rem;
    transition: background 0.15s ease;
  }
  .rh-video-card__play:hover .rh-video-card__btn { background: var(--rh-accent); }
  .rh-video-card__iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
  .rh-video-card__body { padding: 0.85rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
  .rh-video-card__title { font-size: var(--rh-step-1); line-height: 1.25; margin: 0; }
  .rh-video-card__desc { font-size: var(--rh-step--1); color: var(--rh-muted); margin: 0; }
  .rh-video-card__article { font-size: var(--rh-step--1); font-weight: 700; text-decoration: none; margin-top: 0.2rem; }
  .rh-video-card__article:hover { text-decoration: underline; }

  /* Top-Videos-Band (Startseite): große Bühne + 3 Mini, Klick lädt in die Bühne */
  .rh-videoband__media { border-radius: var(--rh-radius); overflow: hidden; background: #000; }
  .rh-videoband__caption { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.2rem; }
  .rh-videoband__title { font-weight: 700; font-size: var(--rh-step-1); line-height: 1.25; }
  .rh-videoband__mini {
    width: 100%; border: 0; background: none; padding: 0; margin: 0;
    cursor: pointer; font: inherit; color: inherit; text-align: left;
  }

  /* ---------- Schriftgrößen-Menü im Header (Icon = ein A, Dropdown-Overlay) ---------- */
  .rh-fontmenu { position: relative; }
  .rh-fontmenu > summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.4rem; height: 2.4rem;
    border: 1px solid var(--rh-border); border-radius: 999px;
    background: var(--rh-surface); color: var(--rh-fg); line-height: 1;
  }
  .rh-fontmenu > summary::-webkit-details-marker { display: none; }
  .rh-fontmenu > summary:hover,
  .rh-fontmenu[open] > summary { border-color: var(--rh-accent); color: var(--rh-accent); }
  /* Aktuelle Stufe: ein A in drei Größen/Stärken (ohne +/++) */
  .rh-fontmenu__current { font-weight: 700; }
  .rh-fontmenu[data-level="1"] .rh-fontmenu__current { font-size: 0.85rem; font-weight: 700; }
  .rh-fontmenu[data-level="2"] .rh-fontmenu__current { font-size: 1.05rem; font-weight: 800; }
  .rh-fontmenu[data-level="3"] .rh-fontmenu__current { font-size: 1.25rem; font-weight: 900; }

  /* Overlay-Panel nach unten, rechtsbündig unter dem Icon (wie das „Mehr"-Menü) */
  .rh-fontmenu__panel {
    position: absolute; right: 0; left: auto; top: calc(100% + 0.4rem);
    min-width: 11rem;
    background: var(--rh-surface); border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius); box-shadow: var(--rh-shadow);
    padding: 0.4rem; z-index: 60;
  }
  .rh-fontmenu__panel button {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    width: 100%; text-align: left; border: 0; background: none;
    padding: 0.5rem 0.7rem; border-radius: calc(var(--rh-radius) - 0.2rem);
    cursor: pointer; font: inherit; color: var(--rh-fg);
  }
  .rh-fontmenu__panel button:hover { background: var(--rh-accent-soft); color: var(--rh-accent-strong); }
  .rh-fontmenu__panel button[aria-checked="true"] { color: var(--rh-accent); }
  .rh-fontmenu__panel button[aria-checked="true"] .rh-fontmenu__word { font-weight: 800; }
  .rh-fontmenu__a { font-weight: 700; line-height: 1; min-width: 1.4rem; text-align: center; }
  .rh-fontmenu__a--1 { font-size: 0.9rem; }
  .rh-fontmenu__a--2 { font-size: 1.1rem; font-weight: 800; }
  .rh-fontmenu__a--3 { font-size: 1.4rem; font-weight: 900; }

  /* ---------- A11y: Tap-Targets & Abstände (WCAG 2.5.8 / Lighthouse) ---------- */
  .rh-tag a { padding: 0.4rem 0.8rem; }
  .rh-tags { gap: 0.55rem; }
  .site-footer__nav { gap: 0.4rem 1.4rem; }
  .site-footer__nav a { display: inline-block; padding: 0.45rem 0; }
  .rh-strip__link { padding-block: 0.3rem; }
  .rh-kicker a { display: inline-block; padding-block: 0.15rem; }

  /* ---------- Service-Module (reservierte Slots) ---------- */
  .rh-services {
    display: grid; gap: var(--rh-gutter);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    margin-block: clamp(2rem, 1rem + 3vw, 3.5rem);
  }
  .rh-service {
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius);
    background: var(--rh-surface);
    padding: 1rem 1.1rem;
    min-height: 9rem;            /* feste Höhe → kein CLS beim späteren Befüllen */
    display: flex; flex-direction: column; gap: 0.4rem;
    text-decoration: none; color: inherit;
  }
  .rh-service:hover { border-color: var(--rh-accent); }
  .rh-service__icon { font-size: 1.6rem; line-height: 1; }
  .rh-service__title { font-weight: 700; font-size: var(--rh-step-0); }
  .rh-service__hint { font-size: var(--rh-step--1); color: var(--rh-muted); margin-top: auto; }
  .rh-service__badge {
    align-self: flex-start;
    font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--rh-accent-strong);
    background: var(--rh-accent-soft);
    padding: 0.1rem 0.45rem; border-radius: 999px;
  }

  /* Werbung: AdSense Auto Ads platziert clientseitig nach Einwilligung (s. _ConsentScripts).
     Reservierte .ad-slot-Platzhalter entfernt 2026-05-26; ggf. später manuelle <ins>-Units. */

  /* ---------- Artikel / Long-Read ---------- */
  /* Zentrierte Lesespalte: Header-Text, Teaser, Hero, Body, Share & Themen teilen
     dieselbe Breite — statt ch-basierter, schriftabhängiger Einzelbreiten (Teaser
     war dadurch breiter als der Body). Bewusst nicht volle Viewport-Breite. */
  .article { max-width: 42rem; margin-inline: auto; }
  /* Eigener, sanfterer Clamp (Lesespalte ist ohnehin auf 42rem gedeckelt) — wächst
     viel weniger mit dem Viewport als --rh-step-3. text-wrap: pretty statt balance,
     damit Zeile 1 gefüllt wird (kein vorzeitiger Umbruch trotz Platz). */
  .article header h1 { font-size: clamp(1.7rem, 1.5rem + 0.8vw, 2.05rem); text-wrap: pretty; }
  .rh-article { max-width: 46rem; margin-inline: auto; }
  .lead { color: var(--rh-muted); font-size: var(--rh-step-1); max-width: var(--rh-measure); }

  .rh-kicker {
    margin: 0 0 0.25rem;
    font-size: var(--rh-step--1); font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--rh-ressort);
  }
  .rh-kicker a { color: inherit; text-decoration: none; }
  .rh-kicker a:hover { text-decoration: underline; }

  .rh-meta { color: var(--rh-muted); font-size: var(--rh-step--1); margin: 0 0 1rem; }
  .rh-byline { font-style: normal; color: inherit; }
  a.rh-byline:hover { text-decoration: underline; }

  .rh-hero { margin: 1.5rem 0; }  /* explizit 0 horizontal → kein UA-figure-Rand, volle Spaltenbreite */
  .rh-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--rh-radius); }
  .rh-hero figcaption { margin-top: 0.5rem; font-size: var(--rh-step--1); color: var(--rh-muted); }
  .rh-hero__caption + .rh-hero__credit::before { content: " · "; }

  .article-body { max-width: none; line-height: 1.7; }
  .article-body img { border-radius: var(--rh-radius); margin-block: 1.25rem; }
  .article-body p { margin: 0 0 1.1rem; }
  .article-body h2 { margin-top: 2rem; }
  .article-body h3 { margin-top: 1.8rem; }
  /* Body-Figuren ohne UA-Rand + Bildunterschrift einheitlich gestylt */
  .article-body figure { margin: 1.5rem 0; }
  .article-body figcaption { margin-top: 0.5rem; font-size: var(--rh-step--1); color: var(--rh-muted); }
  /* Import-Bilder: volle Spaltenbreite (kein 240er-Thumbnail mehr), echte Bildunterschrift */
  .rh-figure img { width: 100%; height: auto; display: block; margin: 0; border-radius: var(--rh-radius); }
  .rh-figure__caption + .rh-figure__credit::before { content: " · "; }
  .article-body blockquote {
    margin: 1.5rem 0; padding: 0.4rem 0 0.4rem 1.1rem;
    border-left: 3px solid var(--rh-accent);
    color: var(--rh-fg); font-size: var(--rh-step-1);
  }

  .rh-video { margin: 1.5rem 0; width: 100%; }
  .rh-video__frame {
    position: relative; display: block; width: 100%;
    aspect-ratio: 16 / 9; border-radius: var(--rh-radius);
    overflow: hidden; background: #000;
  }
  .rh-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .rh-video figcaption { color: var(--rh-muted); font-size: var(--rh-step--1); margin-top: 0.4rem; }

  /* Share-Bar (Artikelseite) — Überschrift „Teilen" wie „Themen", darunter Pill-Buttons.
     Reine Share-Links + Web Share API + Clipboard, keine Tracking-Skripte/-iFrames. */
  .rh-share { margin: 0; }
  /* Kompakter nativer „Teilen"-Button (Web Share API): wie ein Themen-Chip gestaltet
     (.rh-tag), sitzt direkt unter den Themen-Chips. */
  .rh-share__compact {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    margin-top: 0.6rem; padding: 0.2rem 0.7rem;
    font-size: var(--rh-step--1); line-height: 1.4; font-family: inherit; font-weight: 600;
    background: var(--rh-accent); border: 1px solid var(--rh-accent); border-radius: 999px;
    color: var(--rh-accent-contrast); cursor: pointer;
  }
  .rh-share__compact:hover { background: var(--rh-accent-strong); border-color: var(--rh-accent-strong); }
  .rh-share__compact svg { width: 1em; height: 1em; }
  /* Fallback-Abschnitt (nur ohne Web Share API): Überschrift wie „Themen" + Chips. */
  .rh-share__fallback { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rh-border); }
  .rh-share__title {
    font-size: var(--rh-step--1); font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--rh-muted); margin: 0 0 0.6rem; padding-left: 0.4rem;
  }
  .rh-share__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .rh-share__btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.4rem 0.75rem; border: 1px solid var(--rh-border); border-radius: 999px;
    background: var(--rh-surface); color: var(--rh-fg);
    text-decoration: none; font: inherit; font-size: var(--rh-step--1); font-weight: 600;
    cursor: pointer; white-space: nowrap;
  }
  .rh-share__btn:hover { border-color: var(--rh-accent); color: var(--rh-accent); }

  /* Themen-/Tag-Liste */
  .rh-topics { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rh-border); }
  .rh-topics__title {
    font-size: var(--rh-step--1); font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--rh-muted); margin: 0 0 0.6rem; padding-left: 0.4rem;
  }
  .rh-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .rh-tag {
    display: inline-block; font-size: var(--rh-step--1); line-height: 1.4;
    background: var(--rh-accent-soft); border: 1px solid var(--rh-border); border-radius: 999px;
  }
  .rh-tag a { display: inline-block; padding: 0.2rem 0.7rem; color: var(--rh-fg); text-decoration: none; }
  .rh-tag:hover { border-color: var(--rh-accent); }

  /* ---------- Artikel-Layout: Lesespalte + (Desktop) sticky Sidebar ---------- */
  /* Mobil/Tablet: Schiene stapelt unter dem Artikel, gleiche Spaltenbreite. */
  .article-aside { max-width: 42rem; margin: 2.5rem auto 0; }
  @media (min-width: 64rem) {
    .article-layout {
      display: grid;
      grid-template-columns: minmax(0, 42rem) minmax(0, 17rem);
      gap: clamp(1.5rem, 1rem + 2vw, 3rem);
      justify-content: center;
      align-items: start;
    }
    .article { max-width: none; margin-inline: 0; }
    .article-aside { max-width: none; margin: 0; position: sticky; top: 4.5rem; }
  }
  .rh-side + .rh-side { margin-top: 2rem; }
  .rh-side__head {
    margin: 0 0 0.6rem; padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--rh-accent);
    font-size: var(--rh-step--1); font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--rh-muted);
  }
  .rh-side__list { list-style: none; margin: 0; padding: 0; }
  .rh-side__item + .rh-side__item { border-top: 1px solid var(--rh-border); }
  .rh-side__link {
    display: flex; gap: 0.6rem; align-items: flex-start;
    padding: 0.6rem 0; color: var(--rh-fg); text-decoration: none;
  }
  .rh-side__thumb { flex: 0 0 auto; width: 66px; height: 44px; object-fit: cover; border-radius: var(--rh-radius); }
  .rh-side__title { font-size: var(--rh-step--1); font-weight: 600; line-height: 1.3; }
  .rh-side__link:hover .rh-side__title { color: var(--rh-accent); text-decoration: underline; text-underline-offset: 0.15em; }

  /* „Mehr zum Thema" — Related-Karten unter dem Artikeltext */
  .rh-related { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rh-border); }
  .rh-related__head {
    margin: 0 0 1rem; padding-left: 0.4rem;
    font-size: var(--rh-step--1); font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--rh-muted);
  }
  .rh-related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.1rem; }
  /* Kompakter: in „Mehr zum Thema" Kategorie + Datum weglassen (in allen Breiten). */
  .rh-related__grid .rh-card__kicker,
  .rh-related__grid .rh-card__date { display: none; }

  /* ---------- Übersichts-/Listen-Kopf (Kategorie/Thema/Autor/Alle) ---------- */
  /* Akzent-Unterstrich wie der Band-Kopf auf der Startseite. Default Ostsee-Blau;
     auf Kategorie-Seiten überschreibt eine Inline-border-bottom-color die Ressortfarbe
     (nur die Linie, nicht Kicker/Titel). */
  .page-head {
    margin-bottom: clamp(0.85rem, 0.6rem + 1vw, 1.4rem);
    padding-bottom: 0.45rem;
    border-bottom: 3px solid var(--rh-accent);
  }
  /* Listen-Titel als kompaktes Masthead-Label (klein, Versalien) — der Kicker
     darüber nennt die Art (Kategorie/Thema/…). */
  .page-head h1 {
    margin: 0.1rem 0 0;
    font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
  .page-head .lead { margin: 0.35rem 0 0; }
  .rh-overview-intro { margin-top: 0.8rem; max-width: var(--rh-measure); }
  .rh-overview-intro p { margin: 0 0 0.8rem; }
  .page-head + .rh-stage { margin-top: 0; } /* keine Doppel-Lücke zwischen Kopf und Lead */

  /* ---------- Suche ---------- */
  .rh-search { display: flex; gap: 0.5rem; margin: 0.5rem 0 0.75rem; max-width: 36rem; align-items: flex-start; }
  /* Eingabefeld + Sortier-Dropdown teilen sich diese Spalte; der Button steht rechts daneben.
     Mobil stapelt die Spalte (Dropdown = Feldbreite), ab 40rem wird sie zur Zeile. */
  .rh-search__fields { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
  /* Ab Tablet/Desktop: Eingabefeld, schmale Dropdown und Button in einer Zeile;
     die Dropdown sitzt (deutlich schmaler) zwischen Feld und Button.
     Muss NACH der column-Basisregel oben stehen, sonst überschreibt sie diese. */
  @media (min-width: 40rem) {
    /* Mehr Platz auf dem Desktop: Container breiter, damit ~50% extra Breite
       allein ins Eingabefeld fließt (Dropdown + Button bleiben inhaltsbreit). */
    .rh-search { max-width: 44rem; }
    .rh-search__fields { flex-direction: row; align-items: center; }
    .rh-search__sort-select { width: auto; flex: 0 0 auto; }
  }
  .rh-search__input {
    flex: 1 1 auto; min-width: 0;
    height: 2.5rem; padding: 0 0.9rem;
    border: 1px solid var(--rh-border); border-radius: var(--rh-radius);
    background: var(--rh-surface); color: var(--rh-fg); font: inherit;
  }
  /* Dezenter Fokus-Rahmen nach innen (statt des dicken globalen Outlines außen) */
  .rh-search__input:focus-visible {
    outline: 2px solid var(--rh-accent);
    outline-offset: -2px;
  }
  .rh-search__btn {
    flex: 0 0 auto; cursor: pointer;
    height: 2.5rem; padding: 0 1.1rem;
    border: 1px solid var(--rh-accent); border-radius: var(--rh-radius);
    background: var(--rh-accent); color: var(--rh-accent-contrast);
    font: inherit; font-weight: 700;
  }
  .rh-search__btn:hover { background: var(--rh-accent-strong); border-color: var(--rh-accent-strong); }
  .rh-search__meta { color: var(--rh-muted); font-size: var(--rh-step--1); margin: 0.3rem 0 0; }

  /* ---------- Pager (Übersichtsseiten) ---------- */
  .rh-pager {
    display: flex; align-items: center; justify-content: center;
    gap: 1.25rem; margin: 2.5rem 0 1rem;
  }
  .rh-pager__link {
    padding: 0.45rem 1rem; border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius); text-decoration: none; font-weight: 600;
  }
  .rh-pager__link:hover { border-color: var(--rh-accent); }
  .rh-pager__status { color: var(--rh-muted); font-size: var(--rh-step--1); }

  .article-list { list-style: none; padding: 0; }
  .article-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--rh-border); }
}

/* =====================================================================
   UTILITIES
   ===================================================================== */
@layer utilities {
  .rh-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .rh-flow > * + * { margin-top: 1rem; }
  [hidden] { display: none !important; }
  /* Erstes Inhalts-Element nicht zusätzlich nach unten schieben (Strip → Top-Artikel).
     Bewusst in der utilities-Schicht, damit es das margin-block der Bänder (components) schlägt. */
  main > :first-child { margin-top: 0; }
}

/* Kreuzfahrt-Anlauftabelle (DB-gerendert auf den Jahresseiten) */
@layer components {
  .rh-cruise {
    max-width: var(--rh-max);
    margin: 2rem auto 0;
    padding-inline: var(--rh-gutter);
  }
  .rh-cruise__head {
    font-size: var(--rh-step-1);
    margin: 0 0 0.75rem;
  }
  .rh-cruise__count { color: var(--rh-muted); font-weight: 400; }
  .rh-cruise__scroll { overflow-x: auto; }

  .rh-cruise-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--rh-step--1);
    background: var(--rh-surface);
  }
  .rh-cruise-table th,
  .rh-cruise-table td {
    padding: 0.45rem 0.5rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rh-border);
  }
  /* Schiff/Reederei bekommt mehr Breite (weniger Umbruch), Liegeplatz/Länge
     kommt mit weniger aus; Datum & Häfen brechen nicht um. */
  .rh-cruise-table__when { white-space: nowrap; }
  /* Name + Länderkürzel + Flagge bleiben in EINER Zeile (lieber Flagge am Rand
     abgeschnitten als ein hässlicher Umbruch); nur die Reederei darf umbrechen. */
  .rh-cruise-table__ship { width: 28%; white-space: nowrap; }
  .rh-cruise-table__pier { width: 5.5rem; white-space: nowrap; }
  .rh-cruise-table thead th {
    background: var(--rh-accent-soft);
    color: var(--rh-accent-strong);
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid var(--rh-accent);
  }
  /* Jede Anlaufzeile hat eine (auf Desktop unsichtbare) Detailzeile als Geschwister,
     daher stehen die Hauptzeilen auf ungeraden Positionen; 4n+3 zebrat jede zweite. */
  .rh-cruise-table tbody tr.rh-cruise-row:nth-child(4n+3) {
    background: color-mix(in srgb, var(--rh-accent-soft) 45%, transparent);
  }
  .rh-cruise-detail { display: none; } /* nur Mobil + aufgeklappt sichtbar */
  .rh-cruise-table__flag { color: var(--rh-muted); }
  .rh-cruise-table__flagicon {
    display: inline-block;       /* überschreibt globales img{display:block} */
    width: 1.15em;
    height: auto;
    margin-left: 0.3em;
    vertical-align: -0.15em;     /* an Textgrundlinie ausrichten */
    border: 1px solid var(--rh-border);
    border-radius: 2px;
  }
  .rh-cruise-table__when time { display: block; font-variant-numeric: tabular-nums; }
  .rh-cruise-table__dep,
  .rh-cruise-table__company,
  .rh-cruise-table__len {
    display: block;
    color: var(--rh-muted);
    font-size: 0.92em;
  }
  .rh-cruise-table__name { font-weight: 600; }
  a.rh-cruise-table__name { color: var(--rh-accent-strong); text-decoration: none; }
  a.rh-cruise-table__name:hover { text-decoration: underline; }
  .rh-cruise-table__company { white-space: normal; } /* Reederei darf umbrechen */
  .rh-cruise-table__ports { white-space: nowrap; }
  .rh-cruise-table__arrow { display: block; color: var(--rh-muted); }
  /* Breit genug, dass das 130px-Thumbnail samt Zell-Padding (border-box) hineinpasst
     und nicht am rechten Tabellenrand abgeschnitten wird (gilt für alle Cruise-Tabellen). */
  .rh-cruise-table__imgcol { width: 150px; min-width: 150px; }
  .rh-cruise-table__thumb {
    display: block;
    width: 130px;
    height: 48px;
    max-width: none; /* nicht vom globalen img{max-width:100%} in der Zelle gestaucht */
    object-fit: contain;
    /* Thumbnails sind transparente PNGs (Hintergrund weggekeyt) → kein Rahmen,
       sie sitzen direkt auf der Zeilenfarbe. */
  }
  .rh-cruise__disclaimer {
    margin: 0.75rem 0 0;
    color: var(--rh-muted);
    font-size: var(--rh-step--1);
    font-style: italic;
  }

  /* Aufklapp-Spalte: nur auf schmalen Bildschirmen sichtbar (s. Media-Query). */
  .rh-cruise-table__toggle { display: none; width: 1.9rem; }
  /* + / − Kästchen wie im alten FooTable-Theme. */
  .rh-cruise-row-toggle {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    width: 1.6rem;        /* ≥24px Tap-Ziel (WCAG 2.2 AA 2.5.8) — nur mobil sichtbar */
    height: 1.6rem;
    padding: 0;
    margin-top: 0.1rem;   /* sitzt etwa auf Höhe der ersten Textzeile */
    border: 1px solid var(--rh-accent);
    border-radius: 3px;
    background: var(--rh-surface);
    color: var(--rh-accent-strong);
    cursor: pointer;
  }
  .rh-cruise-row-toggle::before,
  .rh-cruise-row-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: currentColor;
  }
  .rh-cruise-row-toggle::before { width: 0.6rem; height: 2px; }            /* waagerecht */
  .rh-cruise-row-toggle::after { width: 2px; height: 0.6rem; }             /* senkrecht → „+" */
  .rh-cruise-row.is-open .rh-cruise-row-toggle::after { display: none; }   /* aufgeklappt → „−" */

  /* Inhalt der aufgeklappten Detailzeile (Liegeplatz/Länge, Häfen, Bild). */
  .rh-cruise-detail > td {
    background: color-mix(in srgb, var(--rh-accent-soft) 35%, transparent);
  }
  .rh-cruise-detail__facts { margin: 0 0 0.4rem; }
  .rh-cruise-detail__facts > div { display: flex; gap: 0.5rem; padding: 0.1rem 0; }
  .rh-cruise-detail__facts dt {
    flex: 0 0 7rem;
    color: var(--rh-muted);
    font-weight: 600;
  }
  .rh-cruise-detail__facts dd { margin: 0; }
}

/* Kreuzfahrt-Tabelle auf Smartphones: bleibt eine echte Tabelle (Ankunft/Abfahrt +
   Schiff/Reederei sichtbar); Liegeplatz/Länge, Häfen und Bild sind ausgeblendet und
   klappen pro Zeile per +/−-Button als Detailzeile auf (Nachbau des alten FooTable-
   Verhaltens). An .is-enhanced gekoppelt: ohne JS bleibt die volle scrollbare Tabelle. */
@layer components {
  @media (max-width: 600px) {
    .rh-cruise-table.is-enhanced .rh-cruise-table__toggle { display: table-cell; }
    .rh-cruise-table.is-enhanced .rh-cruise-table__detail { display: none; }
    .rh-cruise-table.is-enhanced .rh-cruise-row.is-open + .rh-cruise-detail { display: table-row; }
    .rh-cruise-table.is-enhanced .rh-cruise-table__ship { width: auto; }
    .rh-cruise-detail__facts dt { flex-basis: 6rem; }
  }

  /* Jahresseiten-Layout: Inhalt + Sidebar (nur Desktop, sonst gestapelt) */
  .cruise-layout {
    max-width: var(--rh-max);
    margin-inline: auto;
    padding-inline: var(--rh-gutter);
  }
  .cruise-main { min-width: 0; }
  /* Tabelle füllt die Hauptspalte (Layout-Container liefert Breite/Padding). */
  .cruise-main .rh-cruise {
    max-width: none;
    margin: 1.5rem 0 0;
    padding-inline: 0;
  }
  .cruise-aside { margin-top: 1.5rem; }

  /* Sidebar erst ab 75rem (= --rh-max): die breite Anlauftabelle braucht mehr
     Platz als ein Artikel-Textfluss, der schon ab 64rem mit Sidebar funktioniert.
     Darunter einspaltig mit voller Tabellenbreite (sonst rechts abgeschnitten). */
  @media (min-width: 75rem) {
    .cruise-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 19rem;
      gap: 2.5rem;
      align-items: start;
    }
    .cruise-aside {
      margin-top: 0;
      position: sticky;
      top: 4.5rem;
    }
  }

  /* Anlaufkalender-Auswahl (Jahr-Dropdown in der Sidebar) */
  .rh-cruise-archive {
    width: 100%;
    padding: 0.5rem 0.6rem;
    font: inherit;
    color: var(--rh-fg);
    background: var(--rh-surface);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius);
  }
  .rh-cruise-archive:focus-visible {
    outline: 2px solid var(--rh-accent);
    outline-offset: 1px;
  }
  .rh-side__text { margin: 0; font-size: var(--rh-step--1); }
  .rh-side__text a { color: var(--rh-accent-strong); text-decoration: none; }
  .rh-side__text a:hover { text-decoration: underline; }

  /* Schiff-Detailseite: Schiffsdaten-Tabelle aus dem WP-Body (id="cruisedata"). */
  .rh-ship .article-body #cruisedata {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: var(--rh-step--1);
  }
  .rh-ship .article-body #cruisedata td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--rh-border);
    vertical-align: top;
  }
  .rh-ship .article-body #cruisedata tr:nth-child(odd) {
    background: color-mix(in srgb, var(--rh-accent-soft) 40%, transparent);
  }
  .rh-ship .article-body #cruisedata td:first-child {
    width: 11rem;
    color: var(--rh-muted);
    white-space: nowrap;
  }

  /* Fotogalerie: responsives Thumbnail-Raster. */
  .rh-gallery { margin: 2rem 0 0; }
  .rh-gallery__head { font-size: var(--rh-step-1); margin: 0 0 0.75rem; }
  .rh-gallery__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
  }
  .rh-gallery__cell { margin: 0; }
  .rh-gallery__item {
    display: block;
    border-radius: var(--rh-radius);
    overflow: hidden;
    background: var(--rh-surface);
    border: 1px solid var(--rh-border);
  }
  .rh-gallery__item img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
  }
  .rh-gallery__item:hover img { transform: scale(1.04); }
  .rh-gallery__item:focus-visible { outline: 2px solid var(--rh-accent); outline-offset: 2px; }

  /* Native <dialog>-Lightbox: Großbild + Bildunterschrift + Vor/Zurück. */
  .rh-lightbox {
    width: min(96vw, 1200px);
    max-width: 96vw;
    max-height: 94vh;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .rh-lightbox::backdrop { background: rgba(0, 0, 0, 0.82); }
  .rh-lightbox__figure { margin: 0; text-align: center; }
  .rh-lightbox__img {
    max-width: 100%;
    max-height: 84vh;
    object-fit: contain;
    border-radius: var(--rh-radius);
    background: #000;
  }
  .rh-lightbox__caption {
    margin-top: 0.6rem;
    color: #fff;
    font-size: var(--rh-step--1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  }
  .rh-lightbox__caption[hidden] { display: none; }
  .rh-lightbox__close,
  .rh-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    line-height: 1;
  }
  .rh-lightbox__nav { width: 3rem; height: 3rem; font-size: 1.8rem; }
  .rh-lightbox__prev { left: 0.3rem; }
  .rh-lightbox__next { right: 0.3rem; }
  .rh-lightbox__close {
    top: 0.4rem;
    right: 0.4rem;
    transform: none;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.6rem;
  }
  .rh-lightbox__nav:hover,
  .rh-lightbox__close:hover { background: rgba(0, 0, 0, 0.7); }
  .rh-lightbox__nav:focus-visible,
  .rh-lightbox__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

  /* Eckdaten-Box (Schiffsindex: kleinstes/größtes Schiff …) */
  .rh-cruise-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin: 1.5rem 0;
    padding: 0.9rem 1.1rem;
    background: color-mix(in srgb, var(--rh-accent-soft) 45%, transparent);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius);
  }
  .rh-cruise-facts > div { display: flex; flex-direction: column; }
  .rh-cruise-facts dt { color: var(--rh-muted); font-size: var(--rh-step--1); }
  .rh-cruise-facts dd { margin: 0; font-weight: 600; }

  /* Schiffsindex: Suchfeld + sortierbare Spalten */
  .rh-shipindex__controls { margin: 0 0 0.75rem; }
  .rh-shipindex__search {
    width: 100%;
    max-width: 22rem;
    padding: 0.5rem 0.7rem;
    font: inherit;
    color: var(--rh-fg);
    background: var(--rh-surface);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius);
  }
  .rh-shipindex__search:focus-visible { outline: 2px solid var(--rh-accent); outline-offset: 1px; }
  .rh-shipindex .rh-num { text-align: right; white-space: nowrap; }
  .rh-shipindex th.rh-sort { cursor: pointer; user-select: none; }
  .rh-shipindex th.rh-sort::after { content: " ↕"; color: var(--rh-muted); font-size: 0.85em; }
  .rh-shipindex th.rh-sort[aria-sort="ascending"]::after { content: " ↑"; color: var(--rh-accent-strong); }
  .rh-shipindex th.rh-sort[aria-sort="descending"]::after { content: " ↓"; color: var(--rh-accent-strong); }
  .rh-shipindex__empty { margin: 1rem 0; color: var(--rh-muted); font-style: italic; }
  /* Reederei bleibt auch auf Mobil sichtbar (2. Spalte), wird aber abgeschnitten
     statt umbrochen (Span mit ellipsis). */
  .rh-shipindex__company { white-space: nowrap; }
  .rh-shipindex__company span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }
  @media (max-width: 600px) {
    .rh-shipindex .rh-shipindex__company span { max-width: 40vw; }
  }

  /* „Alle Anläufe"-Link unter der Übersichts-Tabelle */
  .rh-cruise__more { margin: 0.75rem 0 0; font-size: var(--rh-step--1); }
  .rh-cruise__more a { color: var(--rh-accent-strong); text-decoration: none; }
  .rh-cruise__more a:hover { text-decoration: underline; }

  /* FAQ (Schiffsindex + Übersicht) */
  .rh-faq { margin: 2rem 0 0; }
  .rh-faq > h2 { font-size: var(--rh-step-1); margin: 0 0 0.75rem; }
  .rh-faq__item {
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius);
    margin-bottom: 0.5rem;
    background: var(--rh-surface);
  }
  .rh-faq__item summary {
    cursor: pointer;
    padding: 0.7rem 0.9rem;
    font-weight: 600;
  }
  .rh-faq__item summary:focus-visible { outline: 2px solid var(--rh-accent); outline-offset: -2px; }
  .rh-faq__item p { margin: 0; padding: 0 0.9rem 0.8rem; color: var(--rh-fg); }

  /* Startseite: „Themenseiten"-Block (fließend, ohne Sidebar) */
  .rh-topicpages__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }
  .rh-topicpages__list a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--rh-surface);
    border: 1px solid var(--rh-border);
    border-radius: 999px;
    color: var(--rh-accent-strong);
    text-decoration: none;
    font-size: var(--rh-step--1);
  }
  .rh-topicpages__list a:hover { border-color: var(--rh-accent); background: var(--rh-accent-soft); }
}
