/* ==========================================================================
   Private blog – stylesheet after the design handoff (desktop 1280 / mobile 390)
   ========================================================================== */

:root {
  color-scheme: light;
  --bg:        #f2f4f6;
  --ink:       #10161a;
  --ink-2:     #1d2328;
  --text:      #2b343a;
  --text-2:    #28323a;
  --muted:     #55616a;
  --muted-2:   #5e6a72;
  --muted-3:   #6b767e;
  --meta:      #7d8a91;
  --teal:      #0f5d6b;
  --navy:      #12303a;
  --coral:     #dc4225;
  --green:     #1ec97a;
  --chip:      #f1f3f5;
  --chip-text: #4a555c;
  --hl-y:      #ffe27a;
  --hl-g:      #b6ecc2;
  --hl-p:      #ffc2d6;
  --hl-ink-y:  #1a1a1a;
  --hl-ink-g:  #12311b;
  --hl-ink-p:  #3a1020;
  --shadow-lg: 0 16px 44px rgba(20, 40, 60, 0.12);
  --shadow-md: 0 12px 40px rgba(20, 40, 60, 0.12);
  --shadow-sm: 0 8px 24px rgba(20, 40, 60, 0.10);
  --glass:     rgba(255, 255, 255, 0.72);
  --glass-b:   rgba(255, 255, 255, 0.90);
  --sheet:     rgba(255, 255, 255, 0.96);
  /* Modal dialogs stay opaque, even if the surface preset (e.g. Milchglas) makes --panel see-through */
  --dialog-bg: #ffffff;
  --panel:     #ffffff;
  --panel-2:   #f7f9fa;
  /* Post cards stand out from the panel (homepage design 1b, 2026-10-26) */
  --karte:          #ffffff;
  --karte-schatten: 0 2px 10px rgba(30, 70, 110, 0.05);
  --karte-hover:    0 14px 30px rgba(30, 70, 110, 0.12);
  --knopf-bg:       #14303d;
  --knopf-bg-hover: #0f2a44;
  --knopf-text:     #ffffff;
  --border:    rgba(20, 40, 60, 0.13);
  --border-soft: rgba(20, 40, 60, 0.09);
  --accent-soft:   rgba(15, 93, 107, 0.09);
  --accent-soft-2: rgba(15, 93, 107, 0.16);
  --avatar-bg:   #eef3f5;
  --avatar-ring: #ffffff;
  --danger:      #b3361f;
  /* Roundings and layout width (backend → Design) */
  --radius-profile: 26px;
  --radius-panel:   26px;
  /* Maximum width of the frame, since "Aufbau" (2026-10) for every navigation –
     bars, footer and content take the same measure so they align */
  --frame-breite:   1440px;
  --reading-width:   720px;
  --split-main:      70fr;
  --split-aside:     30fr;
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  /* Accent font: chapter numbers, key sentences, tags, buttons – Design → Schriften (2026-10-26) */
  --akzent-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:      ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Label "KI-generiert" on images – sits on the subject, therefore the same in light and dark */
  --ki-hinweis-bg:   rgba(8, 12, 16, 0.62);
  --ki-hinweis-text: #fff;
  /* Typography (backend → Design → Typografie) */
  --text-size:    18px;
  --text-line:    1.72;
  --head-font:    var(--font);
  /* Title font of the H1 only (Design → Schriften); without a choice like the headings */
  --titel-font:   var(--head-font);
  --head-weight:  700;
  --head-spacing: -0.03em;
  /* Background (overridable via backend → Hintergrund) */
  --aurora:       linear-gradient(125deg, #e8f4f8, #fdeee2, #eceaf9, #f7f9f4, #e8f4f8);
  --aurora-speed: 26s;
  --blob-a:       rgba(255, 150, 90, 0.38);
  --blob-b:       rgba(80, 190, 215, 0.35);
}

/* --------------------------------------------------------------------------
   Dark mode (backend → Hintergrund): data-theme="dark" fixed,
   data-theme="auto" follows the device. Same token list twice,
   because an attribute selector and a media query can't be combined.
   -------------------------------------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #101418;
  --ink:       #eef3f6;
  --ink-2:     #e2e8ec;
  --text:      #c3cdd4;
  --text-2:    #ccd5db;
  --muted:     #98a4ac;
  --muted-2:   #909ca4;
  --muted-3:   #818e96;
  --meta:      #7d8a93;
  --teal:      #5bbccb;
  --coral:     #ff6f50;
  --chip:      #222b32;
  --chip-text: #b6c1c8;
  --hl-y:      rgba(255, 226, 122, 0.30);
  --hl-g:      rgba(182, 236, 194, 0.30);
  --hl-p:      rgba(255, 194, 214, 0.32);
  --hl-ink-y:  #eef2f5;
  --hl-ink-g:  #eef2f5;
  --hl-ink-p:  #eef2f5;
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.40);
  --glass:     rgba(23, 29, 35, 0.72);
  --glass-b:   rgba(255, 255, 255, 0.09);
  --sheet:     rgba(23, 29, 35, 0.97);
  --dialog-bg: #171d23;
  --panel:     #171d23;
  --panel-2:   #1d242b;
  --karte:          color-mix(in srgb, var(--panel-2) 94%, #ffffff 6%);
  --karte-schatten: 0 2px 10px rgba(0, 0, 0, 0.25);
  --karte-hover:    0 14px 30px rgba(0, 0, 0, 0.45);
  --knopf-bg:       #dce6ec;
  --knopf-bg-hover: #ffffff;
  --knopf-text:     #0f1a22;
  --border:    rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.08);
  --accent-soft:   rgba(91, 188, 203, 0.12);
  --accent-soft-2: rgba(91, 188, 203, 0.20);
  --avatar-bg:   #22303a;
  --avatar-ring: #171d23;
  --danger:      #ff8f75;
  --aurora:    linear-gradient(125deg, #141a20, #1d1720, #151726, #16201c, #141a20);
  --blob-a:    rgba(255, 150, 90, 0.20);
  --blob-b:    rgba(80, 190, 215, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --bg:        #101418;
    --ink:       #eef3f6;
    --ink-2:     #e2e8ec;
    --text:      #c3cdd4;
    --text-2:    #ccd5db;
    --muted:     #98a4ac;
    --muted-2:   #909ca4;
    --muted-3:   #818e96;
    --meta:      #7d8a93;
    --teal:      #5bbccb;
    --coral:     #ff6f50;
    --chip:      #222b32;
    --chip-text: #b6c1c8;
    --hl-y:      rgba(255, 226, 122, 0.30);
    --hl-g:      rgba(182, 236, 194, 0.30);
    --hl-p:      rgba(255, 194, 214, 0.32);
    --hl-ink-y:  #eef2f5;
    --hl-ink-g:  #eef2f5;
    --hl-ink-p:  #eef2f5;
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.40);
    --glass:     rgba(23, 29, 35, 0.72);
    --glass-b:   rgba(255, 255, 255, 0.09);
    --sheet:     rgba(23, 29, 35, 0.97);
    --dialog-bg: #171d23;
    --panel:     #171d23;
    --panel-2:   #1d242b;
    --karte:          color-mix(in srgb, var(--panel-2) 94%, #ffffff 6%);
    --karte-schatten: 0 2px 10px rgba(0, 0, 0, 0.25);
    --karte-hover:    0 14px 30px rgba(0, 0, 0, 0.45);
    --knopf-bg:       #dce6ec;
    --knopf-bg-hover: #ffffff;
    --knopf-text:     #0f1a22;
    --border:    rgba(255, 255, 255, 0.14);
    --border-soft: rgba(255, 255, 255, 0.08);
    --accent-soft:   rgba(91, 188, 203, 0.12);
    --accent-soft-2: rgba(91, 188, 203, 0.20);
    --avatar-bg:   #22303a;
    --avatar-ring: #171d23;
    --danger:      #ff8f75;
    --aurora:    linear-gradient(125deg, #141a20, #1d1720, #151726, #16201c, #141a20);
    --blob-a:    rgba(255, 150, 90, 0.20);
    --blob-b:    rgba(80, 190, 215, 0.18);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--coral); }
:focus-visible { outline: 3px solid rgba(15, 93, 107, 0.45); outline-offset: 3px; border-radius: 6px; }

img, video { max-width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   Aurora background (fixed, behind everything)
   -------------------------------------------------------------------------- */
.aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: var(--aurora);
  background-size: 320% 320%;
  /* Duration as longhand: var() in the animation shorthand is error-prone in Chromium */
  animation: auroraShift 26s ease-in-out infinite;
  animation-duration: var(--aurora-speed);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(22px);
  animation: auroraBlob 30s ease-in-out infinite;
}
.blob-a {
  width: 50vw; height: 50vw; min-width: 420px; min-height: 420px; max-width: 640px; max-height: 640px;
  left: -11vw; top: -21vh;
  background: radial-gradient(circle at 40% 40%, var(--blob-a), transparent 65%);
}
.blob-b {
  width: 56vw; height: 56vw; min-width: 460px; min-height: 460px; max-width: 720px; max-height: 720px;
  right: -14vw; bottom: -28vh;
  background: radial-gradient(circle at 50% 50%, var(--blob-b), transparent 65%);
  animation-duration: 38s; animation-direction: reverse;
}
@keyframes auroraShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes auroraBlob {
  0%   { transform: translate3d(0,0,0) scale(1); }
  33%  { transform: translate3d(8%, -6%, 0) scale(1.25); }
  66%  { transform: translate3d(-6%, 7%, 0) scale(0.9); }
  100% { transform: translate3d(0,0,0) scale(1); }
}
/* Animation switched off (Design → Hintergrund): stands still for everyone, including
   the cover (.aurora-deckel is a second .aurora) */
html[data-bewegung="aus"] .aurora,
html[data-bewegung="aus"] .blob { animation: none; }
@media (prefers-reduced-motion: reduce) {
  /* data-motion="always" (backend → Hintergrund) plays the animation despite reduced motion */
  html:not([data-motion="always"]) .aurora,
  html:not([data-motion="always"]) .blob { animation: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Desktop frame: profile box on the left (sticky), white area on the right
   -------------------------------------------------------------------------- */
.frame {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  max-width: var(--frame-breite);
  margin: 0 auto;
  min-height: 100vh;
  align-items: start;
}

.profile {
  position: sticky; top: 28px;
  height: calc(100vh - 56px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: 28px 24px;
  border-radius: var(--radius-profile);
  background: var(--glass);
  border: 1px solid var(--glass-b);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  overflow: auto;
}
.profile-top { display: flex; flex-direction: column; gap: 20px; }
.profile-ident { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.profile-text { display: flex; flex-direction: column; gap: 6px; }
.profile-name { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.profile-tagline { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* Avatar with gradient ring */
.avatar {
  position: relative; display: block; border-radius: 50%; flex: none;
  background: conic-gradient(from 210deg, #ffb067, var(--coral), #35cfd6, #ffb067);
}
a.avatar:focus-visible { border-radius: 50%; }
.avatar-lg { width: 116px; height: 116px; padding: 3px; }
.avatar-sm { width: 46px;  height: 46px;  padding: 2px; }
.avatar-inner {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: var(--avatar-bg); border: 3px solid var(--avatar-ring);
  display: flex; align-items: center; justify-content: center;
}
.avatar-sm .avatar-inner { border-width: 2px; }
.avatar-inner img, .avatar-inner video { width: 100%; height: 100%; object-fit: cover; }
.avatar-initial { font-size: 40px; font-weight: 700; color: var(--muted-2); letter-spacing: -0.02em; }
.avatar-sm .avatar-initial { font-size: 17px; }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 14px;
  font-size: 16px; font-weight: 500; color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover { background: var(--accent-soft); color: var(--teal); }
.nav a.active { background: var(--navy); color: #fff; font-weight: 600; }
.nav a.active:hover { background: var(--coral); }
/* Spacing to the name: in the side column space-between pushes the number to the
   right, in the bars at the top it stood right next to the word without it ("Blog5"). */
.nav-count { margin-inline-start: 0.45em; font-size: 13px; font-weight: 500; opacity: 0.7; }

/* Menu groups: a <details> that opens and closes without JavaScript. The
   group is not a page – its header leads nowhere, it only opens. On
   load it is closed; only the group containing the current page is open
   (layout.php sets the open attribute for that). */
.nav-group > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; border-radius: 14px;
  font-size: 16px; font-weight: 500; color: var(--text-2);
  cursor: pointer; list-style: none; user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::marker { content: ""; }
.nav-group > summary::after {
  content: "▸"; font-size: 12px; color: var(--muted-3); transition: transform 0.15s ease;
}
.nav-group[open] > summary::after { transform: rotate(90deg); }
.nav-group > summary:hover { background: var(--accent-soft); color: var(--teal); }
.nav-group-items {
  display: flex; flex-direction: column; gap: 4px;
  margin: 4px 0 2px 16px; padding-left: 8px; border-left: 1px solid var(--border);
}
.nav-group-items a { padding: 9px 14px; font-size: 15px; }

/* Notice bars (preview, style preview, maintenance mode): float at the bottom
   centre and take the highlight colour – they are meant to stand out, not look
   pretty. At the bottom, because at the top a bar already sticks depending on the style (header band is
   fixed, glass bar and two-tone sticky) and on mobile the header sits there. */
.hinweis-leisten {
  position: fixed; left: 50%; bottom: 14px; z-index: 60; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  width: max-content; max-width: calc(100% - 28px);
}
.vorschau-leiste {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 10px 18px; border-radius: 14px; font-size: 14px;
  background: var(--hl-y); color: var(--hl-ink-y);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.vorschau-leiste strong { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }
.vorschau-leiste a { margin-left: auto; color: inherit; font-weight: 600; }

/* Search (sidebar, mobile menu, search page) */
.search input {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px;
}
.search input::placeholder { color: var(--muted-3); }
.search input:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-page { display: flex; gap: 8px; max-width: 480px; margin-top: 6px; }
.search-page input { flex: 1; font-size: 15px; }
.search-page button {
  border: 0; border-radius: 12px; padding: 10px 18px; background: var(--navy); color: #fff;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.search-page button:hover { background: var(--coral); }
mark.search-hit { background: var(--hl-y); color: inherit; padding: 0 0.08em; border-radius: 3px; }

.profile-bottom { display: flex; flex-direction: column; gap: 14px; }
.rule { height: 1px; background: var(--border); }
.legal { display: flex; gap: 18px; font-size: 13px; }
.legal a { color: var(--muted-3); }
.legal a:hover { color: var(--coral); }

/* White content area */
.panel {
  position: relative;
  min-height: calc(100vh - 56px);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  /* As a token, because blocks (header image) compensate the padding negatively */
  --panel-pad-x: 56px;
  --panel-pad-top: 44px;
  padding: var(--panel-pad-top) var(--panel-pad-x) 56px;
}

/* Hide mobile elements on desktop */
.m-header, .m-legal { display: none; }
/* On desktop the bar styles switch on .m-legal (Impressum & co. at the
   end of the content, as long as there is no footer text). Here the shared
   form: centred, set apart, quiet – before, a loose link stood there on the left. */
@media (min-width: 861px) {
  .m-legal {
    justify-content: center; gap: 18px; margin-top: 40px; padding-top: 18px;
    border-top: 1px solid var(--border-soft); font-size: 13px;
  }
  .m-legal a { color: var(--muted-3); }
  .m-legal a:hover { color: var(--coral); }
}

/* --------------------------------------------------------------------------
   Layout variants (backend → Design): menu left (default), right, top
   -------------------------------------------------------------------------- */
@media (min-width: 861px) {
  .layout-right .frame { grid-template-columns: minmax(0, 1fr) 320px; }
  .layout-right .profile { order: 2; }

  /* Side column (chapter view etc.) – only if the page supplies content for it */
  .layout-aside .frame { grid-template-columns: 320px minmax(0, var(--split-main)) minmax(0, var(--split-aside)); }
  .side-panel {
    position: sticky; top: 28px; align-self: start;
    max-height: calc(100vh - 56px); overflow: auto;
    background: var(--panel); border-radius: var(--radius-panel);
    box-shadow: var(--shadow-md); padding: 26px 24px;
  }
  /* Resting position = sticky position, also for the side column: with a menu
     style that itself sticks at the top or is fixed, the column sits without
     sticking BELOW that bar – top: 28px made it jump up by the
     difference while scrolling and disappear behind the bar (found in
     the run-through 2026-09, in all three styles). The bar height is
     not fixed (wrapping with many items), so site.js measures it and
     writes --leiste-unten (glass bar, full-screen header) or --band-h;
     the fallback in var() is the height for one row. The addition is
     in each case the padding-top of the style's frame. */
  [data-menu="glas"] .side-panel     { top: calc(var(--leiste-unten, 72px) + 22px); max-height: calc(100vh - var(--leiste-unten, 72px) - 50px); }
  [data-menu="vollbild"] .side-panel { top: calc(var(--leiste-unten, 75px) + 20px); max-height: calc(100vh - var(--leiste-unten, 75px) - 48px); }
  [data-menu="band"] .side-panel     { top: calc(var(--band-h, 61px) + 12px);       max-height: calc(100vh - var(--band-h, 61px) - 40px); }

  /* Chapter view */
  .toc { display: flex; flex-direction: column; gap: 12px; }
  .toc-title { margin: 0; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--meta); }
  .toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
  .toc-list a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 9px; font-size: 14px; line-height: 1.4; color: var(--text-2); }
  .toc-count { opacity: 0.55; font-size: 12px; }
  .toc-list a:hover { background: var(--accent-soft); color: var(--teal); }
  .toc-list a.active { background: var(--navy); color: #fff; }
  .toc-h3 a { padding-left: 24px; font-size: 13px; color: var(--muted-2); }

  /* Bar with profile (style "profil", until 2026-10 the arrangement "top"):
     the profile box as a sticky bar above the content. The frame stays
     a grid so that side column and "Randlos" work as with the other bars
     – the bar spans all columns. Two rows, the second
     takes the rest: with a footer the frame is taller than its content,
     and an automatic first row would stretch the bar
     in height too. The bar keeps the spacing below itself (margin-bottom),
     hence row-gap 0 – exactly the spacing from before. */
  [data-menu="profil"] .frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; row-gap: 0; padding-top: 16px; }
  [data-menu="profil"].layout-aside .frame { grid-template-columns: minmax(0, var(--split-main)) minmax(0, var(--split-aside)); }
  /* top = padding-top of the frame, otherwise the bar slides before docking (jerk).
     z-index 30 like the other bars: beneath it lies the cover (25) with "Endet vorher". */
  [data-menu="profil"] .profile {
    grid-column: 1 / -1;
    position: sticky; top: 16px; z-index: 30; height: auto; overflow: visible;
    flex-direction: row; align-items: center; gap: 18px;
    padding: 12px 20px; margin-bottom: 24px;
  }
  [data-menu="profil"] .profile-top { flex-direction: row; align-items: center; gap: 18px; flex: 1; min-width: 0; }
  [data-menu="profil"] .profile-ident { flex-direction: row; text-align: left; gap: 12px; flex: none; }
  [data-menu="profil"] .avatar-lg { width: 52px; height: 52px; padding: 2px; }
  [data-menu="profil"] .avatar-lg .avatar-inner { border-width: 2px; }
  [data-menu="profil"] .avatar-lg .avatar-initial { font-size: 20px; }
  [data-menu="profil"] .profile-name { font-size: 17px; }
  [data-menu="profil"] .profile-tagline { display: none; }
  [data-menu="profil"] .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  [data-menu="profil"] .nav a { padding: 9px 13px; font-size: 15px; gap: 8px; }
  /* In the bar there is no room to expand downwards: the group
     becomes a panel floating above the content. The profile box already carries
     z-index and overflow: visible, otherwise it would be cut off. */
  [data-menu="profil"] .nav-group { position: relative; }
  [data-menu="profil"] .nav-group > summary { padding: 9px 13px; font-size: 15px; }
  [data-menu="profil"] .nav-group-items {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
    min-width: 210px; margin: 0; padding: 8px;
    border: 1px solid var(--glass-b); border-radius: 16px;
    background: var(--sheet); box-shadow: var(--shadow-md);
  }
  [data-menu="profil"] .nav-group-items a { padding: 9px 12px; }
  /* site.js sets this when the panel would otherwise run out of the window */
  [data-menu="profil"] .nav-group-items.nach-links { left: auto; right: 0; }
  [data-menu="profil"] .search { margin-left: auto; width: 170px; flex: none; }
  [data-menu="profil"] .profile-bottom { display: none; }
  [data-menu="profil"] .panel { min-height: 0; }
  [data-menu="profil"] .m-legal {
    display: flex; justify-content: center; gap: 16px; margin-top: 40px; font-size: 12px;
  }
  [data-menu="profil"] .m-legal a { color: var(--muted-3); }
  [data-menu="profil"] .m-legal a:hover { color: var(--coral); }
  /* Centre the content column – the white space is distributed symmetrically */
  [data-menu="profil"] .article-wrap { margin-inline: auto; }
  /* Side column below the bar: rest = sticky (bar bottom + its margin-bottom) */
  [data-menu="profil"] .side-panel { top: calc(var(--leiste-unten, 92px) + 24px); max-height: calc(100vh - var(--leiste-unten, 92px) - 52px); }
  /* Borderless (design handoff): menu column full height at the left edge, content area flush, no roundings */
  .layout-edge .frame { max-width: none; padding: 0; gap: 0; grid-template-columns: 300px minmax(0, 1fr); }
  .layout-edge .profile {
    top: 0; height: 100vh; padding: 32px 24px;
    border-radius: 0; border: 0; border-right: 1px solid var(--glass-b); box-shadow: none;
  }
  .layout-edge .panel {
    min-height: 100vh; border-radius: 0; box-shadow: none;
    --panel-pad-x: 72px;
    --panel-pad-top: 56px;
    padding: var(--panel-pad-top) var(--panel-pad-x) 72px;
  }
  /* Content centred in the wide area */
  .layout-edge .article-wrap { margin-inline: auto; }
  .layout-edge .gallery-wrap { max-width: 1100px; margin-inline: auto; }
  /* Footer runs flush instead of as a floating card */
  .layout-edge .site-footer { max-width: none; padding: 0; }
  .layout-edge .site-footer-card { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
  /* Borderless with the bar with profile: the bar runs flush across the top instead of as a column on the left.
     Comes after the .layout-edge rules – otherwise they build the 300 px column. */
  [data-menu="profil"].layout-edge .frame { grid-template-columns: minmax(0, 1fr); padding: 0; }
  /* The area only fills what remains below the bar – .layout-edge .panel
     demands 100vh, and with the bar above, every short page scrolled by
     its height. The higher specificity (style + arrangement) wins */
  [data-menu="profil"].layout-edge .panel { min-height: calc(100vh - var(--leiste-unten, 78px)); }
  [data-menu="profil"].layout-edge .profile {
    top: 0; height: auto; margin-bottom: 0; padding: 12px 28px;
    border: 0; border-bottom: 1px solid var(--glass-b);
  }
}

/* --------------------------------------------------------------------------
   Article / typography
   -------------------------------------------------------------------------- */
.article-wrap { max-width: var(--reading-width); display: flex; flex-direction: column; gap: 20px; color: var(--ink-2); }
.gallery-wrap { display: flex; flex-direction: column; gap: 24px; }

.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--meta);
}
.meta .dot { opacity: 0.8; }

.article-title, .page-title {
  margin: 0; font-size: var(--h1, 46px); line-height: 1.1; text-wrap: pretty; color: var(--ink);
  font-family: var(--titel-font); font-weight: var(--head-weight); letter-spacing: var(--head-spacing);
}
.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-sub { margin: 0; font-size: 15px; color: var(--muted-2); }
.page-intro { font-size: 16px; line-height: 1.65; margin-top: 6px; max-width: var(--reading-width); }

/* --------------------------------------------------------------------------
   Pages made of blocks (backend → Seiten → Bearbeiten)
   It is no longer the whole page that keeps the reading width; each block
   decides for itself: text stays narrow, header image/columns/row may fill the
   content area.
   -------------------------------------------------------------------------- */
/* Space between blocks: Design → Aufbau sets --baustein-abstand(-m) (2026-10-28);
   „Abstand davor: keiner“ takes it back for one block, glued to the one above */
.article-wrap.blocks { max-width: none; gap: var(--baustein-abstand, 28px); }
.blocks > .baustein.davor-keiner:not(:first-child) { margin-top: calc(var(--baustein-abstand, 28px) * -1); }
.blocks > .block-lesebreite { max-width: var(--reading-width); }
/* In the borderless layout the text is centred – the area is very wide there */
.layout-edge .blocks > .block-lesebreite { margin-inline: auto; }

/* Wrapper per block (site editor stage 3, 2026-10). Width, background,
   spacing and "auf dem Handy aus" sit here; the markup INSIDE the wrapper is the one
   from before. The default width per type (Content::BLOCK_BREITE_VORGABE) is
   exactly the old one – text in reading width, header image borderless, the rest fills the
   area –, so old pages look unchanged. */
.baustein { min-width: 0; }
.baustein.breite-lese { max-width: var(--reading-width); }
.layout-edge .baustein.breite-lese { margin-inline: auto; }
.baustein.breite-randlos { margin-inline: calc(var(--panel-pad-x) * -1); }
/* Text in a borderless wrapper stays at the content edge – only images run to the edge */
.baustein.breite-randlos:is(.b-text, .b-beitraege, .b-dateien, .b-spalten, .b-vorstellung, .b-kapitel) { padding-inline: var(--panel-pad-x); }
/* The contents fill their wrapper; the reading width is set by the wrapper, no longer by the inside */
.baustein > .block-lesebreite, .baustein > .download-list { max-width: none; }

/* Padding top and bottom (Content::BLOCK_ABSTAENDE) */
.baustein.abstand-s { padding-block: 14px; }
.baustein.abstand-m { padding-block: 26px; }
.baustein.abstand-l { padding-block: 44px; }
/* "Aufmacher": the H1 of the block as large as a lead story, lighter weight (homepage design 1b, 52 px);
   beats the mobile size of .prose h1 by specificity */
.baustein.ueberschrift-aufmacher .prose h1 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.08; font-weight: 500; letter-spacing: -0.01em; }

/* Backgrounds as ROLES, derived from the website's colours – so they fit
   every colour world and light as well as dark, without a second palette. "kontrast"
   inverts surface and text: the ground is the text colour, and for the
   contents the text tokens are set to the surface colour. That has to happen on
   the CHILDREN – if the wrapper itself changed --ink, its own
   background would already take the new value. */
.baustein[class*=" bg-"] { border-radius: 16px; padding-inline: 24px; }
.baustein.breite-randlos[class*=" bg-"] { border-radius: 0; padding-inline: var(--panel-pad-x); }
.baustein.bg-leise    { background: color-mix(in srgb, var(--ink) 5%, var(--panel)); }
.baustein.bg-warm     { background: color-mix(in srgb, #d99a2b 14%, var(--panel)); }
.baustein.bg-akzent   { background: color-mix(in srgb, var(--teal) 13%, var(--panel)); }
/* Contrast: the inverted colours are computed on the WRAPPER (where
   the page's colours still apply) and handed to the content as finished values.
   If the content itself computed --teal from --teal, the
   variable would refer to itself, would be invalid, and links would simply inherit the text colour –
   that happened, seen in the browser. */
.baustein.bg-kontrast {
  background: var(--ink);
  --k-grund: var(--ink);
  --k-schrift: var(--panel);
  --k-link: color-mix(in srgb, var(--teal) 45%, var(--panel));
  --k-akzent: color-mix(in srgb, var(--coral) 55%, var(--panel));
  --k-leise: color-mix(in srgb, var(--panel) 72%, var(--ink));
  --k-leiser: color-mix(in srgb, var(--panel) 58%, var(--ink));
  --k-kante: color-mix(in srgb, var(--panel) 22%, transparent);
}
.baustein.bg-kontrast > * {
  --ink: var(--k-schrift); --ink-2: var(--k-schrift); --text: var(--k-schrift); --text-2: var(--k-schrift);
  --muted-2: var(--k-leise); --muted-3: var(--k-leiser);
  --teal: var(--k-link); --coral: var(--k-akzent); --border: var(--k-kante); --panel: var(--k-grund);
  color: var(--k-schrift);
}
/* The link underline is otherwise fixed dark petrol – invisible on a dark ground */
.baustein.bg-kontrast .prose a { text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }

/* Placeholder for empty blocks – only in the editor's "Ansehen" layer */
.baustein-leer {
  margin: 0; padding: 18px; border: 2px dashed var(--border); border-radius: 12px;
  font-size: 14px; text-align: center; color: var(--muted-2);
}

/* Header image: it is borderless through its wrapper (.baustein.breite-randlos) – the
   negative margin sat here on the image itself until stage 3 */
.block-kopfbild {
  position: relative; overflow: hidden; margin: 0;
  background: var(--chip);
}
.block-kopfbild.ist-erster {
  margin-top: calc(var(--panel-pad-top) * -1);
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
}
.block-kopfbild img { display: block; width: 100%; height: var(--kopf-hoehe); object-fit: cover; }
.block-kopfbild.hoehe-flach  { --kopf-hoehe: 240px; }
.block-kopfbild.hoehe-mittel { --kopf-hoehe: 360px; }
.block-kopfbild.hoehe-hoch   { --kopf-hoehe: 520px; }
/* An aspect ratio instead of a fixed height: the header image then grows with the width
   (the focus point comes as object-position directly on the image) */
.block-kopfbild.hoehe-16-9 img, .block-kopfbild.hoehe-21-9 img, .block-kopfbild.hoehe-3-1 img { height: auto; }
.block-kopfbild.hoehe-16-9 img { aspect-ratio: 16 / 9; }
.block-kopfbild.hoehe-21-9 img { aspect-ratio: 21 / 9; }
.block-kopfbild.hoehe-3-1 img  { aspect-ratio: 3 / 1; }
.block-kopfbild figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 56px var(--panel-pad-x) 22px;
  /* Gradient, so the text stays readable on any subject */
  background: linear-gradient(transparent, rgba(8, 12, 16, 0.78));
  color: #fff;
}
/* In a narrower wrapper: rounded corners like the other images, tighter caption */
.baustein:not(.breite-randlos) > .block-kopfbild { border-radius: 16px; }
.baustein:not(.breite-randlos) > .block-kopfbild figcaption { padding-inline: 22px; }
.block-kopfbild figcaption strong {
  font-family: var(--titel-font); font-weight: var(--head-weight); letter-spacing: var(--head-spacing);
  font-size: 34px; line-height: 1.15;
}
.block-kopfbild figcaption span { font-size: 15px; opacity: 0.88; }

/* Post list as a block */
.block-beitraege { display: flex; flex-direction: column; gap: 18px; }
.block-beitraege .page-sub { margin: 0; }
.mehr-link { margin: 0; font-size: 15px; }
.mehr-link a { font-weight: 600; }

/* Two columns */
.block-spalten { display: grid; gap: 28px; align-items: start; }
.block-spalten.v-50-50 { grid-template-columns: 1fr 1fr; }
.block-spalten.v-60-40 { grid-template-columns: 6fr 4fr; }
.block-spalten.v-40-60 { grid-template-columns: 4fr 6fr; }
.block-spalten figure, .block-reihe figure { margin: 0; }
/* Column "Beiträge": the newest as a short list (small image on the left, title and date) */
.spalte-beitraege { display: flex; flex-direction: column; gap: 12px; }
.spalte-beitraege-titel {
  margin: 0; font-size: var(--h3, 22px); line-height: 1.3; color: var(--ink);
  font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: calc(var(--head-spacing) + 0.015em);
}
.beitrag-kurzliste { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.beitrag-kurzliste li + li { border-top: 1px solid var(--border-soft); }
.beitrag-kurzliste a { display: flex; align-items: center; gap: 14px; padding: 10px 0; color: var(--ink); text-decoration: none; }
.beitrag-kurzliste a:hover .bk-titel { color: var(--coral); }
/* more specific than .block-spalten img (full width), hence with ancestor */
.block-spalten .beitrag-kurzliste img { flex: none; width: 76px; height: 57px; object-fit: cover; border-radius: 10px; }
.bk-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bk-titel { font-weight: 600; line-height: 1.3; text-wrap: pretty; transition: color 0.15s ease; }
.bk-text time { font-size: 13px; color: var(--meta); }
.bk-alle { align-self: flex-start; font-size: 15px; font-weight: 600; color: var(--teal); text-decoration: none; }
.bk-alle:hover { color: var(--coral); }
.block-spalten img { display: block; width: 100%; height: auto; border-radius: 16px; }

/* Image row */
.block-reihe { display: grid; grid-template-columns: repeat(var(--reihe-spalten, 3), minmax(0, 1fr)); gap: 14px; }
.block-reihe img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.block-reihe a { display: block; cursor: zoom-in; }

.block-spalten figcaption, .block-reihe figcaption {
  margin-top: 7px; font-size: 13px; line-height: 1.5; color: var(--meta);
}

@media (max-width: 860px) {
  /* Name all three ratio classes: they are more specific than .block-spalten
     alone and would otherwise beat the wrap rule */
  .block-spalten,
  .block-spalten.v-50-50,
  .block-spalten.v-60-40,
  .block-spalten.v-40-60 { grid-template-columns: 1fr; gap: 20px; }
  /* "Auf dem Handy zuerst: rechte Spalte" (2026-10-16) – only the visual order,
     the markup stays left, right */
  .block-spalten.mobil-rechts-zuerst > .spalte:last-child { order: -1; }
  .block-reihe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-wrap.blocks { gap: var(--baustein-abstand-m, 22px); }
  .blocks > .baustein.davor-keiner:not(:first-child) { margin-top: calc(var(--baustein-abstand-m, 22px) * -1); }
  .block-kopfbild.hoehe-hoch { --kopf-hoehe: 360px; }
  .block-kopfbild.hoehe-mittel { --kopf-hoehe: 260px; }
  .block-kopfbild.hoehe-flach { --kopf-hoehe: 190px; }
  .block-kopfbild figcaption { padding: 40px var(--panel-pad-x) 16px; }
  .block-kopfbild figcaption strong { font-size: 24px; }
  /* First only on phones, because blocks before it are hidden there */
  .block-kopfbild.ist-erster-mobil {
    margin-top: calc(var(--panel-pad-top) * -1);
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  }
  /* "Auf Mobilgeräten ausblenden" (Erweitert) */
  .baustein.mobil-aus { display: none; }
  .baustein[class*=" bg-"]:not(.breite-randlos) { padding-inline: 16px; }
}



/* Body text */
.prose { display: flex; flex-direction: column; gap: 20px; font-size: var(--text-size); line-height: var(--text-line); color: var(--text); }
.prose > * { margin: 0; }
.prose p { text-wrap: pretty; }
/* Sizes H1–H4 as tokens (--h1 … --h4, mobile --h1-m …), calculated from
   body text, H1 slider and scale under Design → Typografie
   (Content::ueberschriftGroessen). The fallback values are "Ausgewogen" at
   18 px text and 46 px H1. The H1 in the text looks like the page title used to. */
.prose h1 { margin: 0; font-size: var(--h1, 46px); line-height: 1.1; text-wrap: pretty; color: var(--ink); font-family: var(--titel-font); font-weight: var(--head-weight); letter-spacing: var(--head-spacing); }
.prose h2 { font-size: var(--h2, 28px); line-height: 1.2; color: var(--ink); margin-top: 12px; font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: calc(var(--head-spacing) + 0.005em); }
.prose h3 { font-size: var(--h3, 22px); line-height: 1.3; color: var(--ink); margin-top: 6px; font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: calc(var(--head-spacing) + 0.015em); }
.prose h4 { font-size: var(--h4, 20px); line-height: 1.35; color: var(--ink); font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: calc(var(--head-spacing) + 0.02em); }
.prose h5, .prose h6 { font-size: var(--text-size); color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.prose blockquote {
  padding: 4px 0 4px 20px; border-left: 3px solid var(--hl-y);
  color: var(--muted); display: flex; flex-direction: column; gap: 12px;
}
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--chip); padding: 2px 6px; border-radius: 6px; }
.prose pre {
  background: var(--navy); color: #e6eef1; padding: 18px 20px; border-radius: 16px;
  overflow-x: auto; font-size: 14px; line-height: 1.6;
}
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
/* Code block with copy button (site.js) and language label (```php) */
/* The wrapper carries surface and rounding, at the top a fixed header bar for
   label and button; only the <pre> below scrolls. Before, both sat in the
   padding of the <pre>, and when scrolling the code ran underneath them.
   margin: 0 – the <pre> is no longer a direct child of .prose, the rule
   `.prose > * { margin: 0 }` doesn't apply, and the browser margin (1em)
   pushed the dark area away from under label and button (the client
   2026-10-15: button cut off). Long blocks scroll inside instead of making the
   page endlessly long; scrollbars visible on the dark ground. */
.prose .code-block {
  position: relative; padding-top: 38px; border-radius: 16px; overflow: hidden;
  background: var(--navy);
  /* The longest code line must not widen the column: without contain
     the block reported its full width to the flex boxes above, and on the
     phone the whole article became as wide as the code (2026-10-16, 756 px
     in a 375 px window). min-width: 0 isn't enough for that. Stretched, because
     a block with inline-size containment can otherwise shrink to zero. */
  contain: inline-size; align-self: stretch;
}
.prose .code-block pre {
  margin: 0; padding-top: 4px; border-radius: 0; background: none; max-height: 32em; overflow: auto;
  scrollbar-color: rgba(230, 238, 241, 0.35) transparent; scrollbar-width: thin;
}
.prose .code-block pre::-webkit-scrollbar { width: 10px; height: 10px; }
.prose .code-block pre::-webkit-scrollbar-thumb { background: rgba(230, 238, 241, 0.3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.prose .code-block pre::-webkit-scrollbar-corner { background: transparent; }
.prose .code-block[data-sprache]::before {
  content: attr(data-sprache); position: absolute; top: 10px; left: 20px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(230, 238, 241, 0.55); pointer-events: none;
}
.code-kopieren {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px; border: 1px solid rgba(230, 238, 241, 0.18); border-radius: 8px;
  background: rgba(255, 255, 255, 0.08); color: #e6eef1; font: 500 12px/1 var(--font); cursor: pointer;
  opacity: 0.75; transition: opacity 0.15s ease, background-color 0.15s ease;
}
.code-kopieren:hover, .code-kopieren:focus-visible, .code-block:hover .code-kopieren { opacity: 1; background: rgba(255, 255, 255, 0.16); }
.code-kopieren svg { width: 15px; height: 15px; }
.code-kopieren .code-kopieren-text { display: none; }
.code-kopieren.kopiert { color: #b6ecc2; border-color: rgba(182, 236, 194, 0.5); }
.code-kopieren.kopiert .code-kopieren-text { display: inline; }
.prose hr { border: 0; height: 1px; background: var(--border); }
.prose img { border-radius: 16px; }
.prose figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.prose figcaption { font-size: 14px; color: var(--muted-2); }
/* Images at their real size, scaled down only if they are wider than
   the column (img: max-width 100 %). The figure is a flex column and until
   2026-10 stretched EVERY image to column width – a 360 px wide Impressum image
   appeared enlarged 2.5 times and blurry (the client: "Ich habe das Bild
   hochgeladen und ausgewählt. Das muss dann auch richtig funktionieren").
   A width value ![Bildtext|360](…) sets the width attribute. */
.prose figure > img { align-self: flex-start; }
/* Videos (Medien → Videos, embedded like an image) */
.prose figure.video video { width: 100%; height: auto; display: block; border-radius: 16px; background: #000; }
.prose a { text-decoration: underline; text-decoration-color: rgba(15, 93, 107, 0.3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
/* Link as a button: [Text](…){knopf} (2026-10-26) */
.prose a.knopf {
  display: inline-block; padding: 12px 20px; border-radius: 10px; text-decoration: none;
  background: var(--knopf-bg); color: var(--knopf-text); font-family: var(--akzent-font); font-size: 16px; line-height: 1.3;
}
.prose a.knopf:hover { background: var(--knopf-bg-hover); color: var(--knopf-text); }
.prose-legal { font-size: 16px; line-height: 1.65; }
.prose-legal h2 { font-size: 22px; }
.prose-legal h3 { font-size: 18px; }

/* Text highlights (fallback via <mark>; transparent with the Highlight API) */
mark.hl { color: inherit; padding: 0 0.08em; border-radius: 3px; }
mark.hl-y { background: var(--hl-y); }
mark.hl-g { background: var(--hl-g); }
mark.hl-p { background: var(--hl-p); }
.has-highlight-api mark.hl { background: transparent; padding: 0; }
::highlight(yellow-pen) { background-color: var(--hl-y); color: var(--hl-ink-y); }
::highlight(green-pen)  { background-color: var(--hl-g); color: var(--hl-ink-g); }
::highlight(pink-pen)   { background-color: var(--hl-p); color: var(--hl-ink-p); }
/* In headings a highlight is a marker stroke under the lower part of the
   letters (homepage design 1b). site.js leaves these marks to CSS. */
.prose :is(h1, h2, h3, h4) mark.hl { padding: 0 0.04em; border-radius: 0; }
.prose :is(h1, h2, h3, h4) mark.hl-y { background: linear-gradient(transparent 58%, var(--hl-y) 58%); }
.prose :is(h1, h2, h3, h4) mark.hl-g { background: linear-gradient(transparent 58%, var(--hl-g) 58%); }
.prose :is(h1, h2, h3, h4) mark.hl-p { background: linear-gradient(transparent 58%, var(--hl-p) 58%); }

.article-foot { padding-top: 12px; border-top: 1px solid var(--border); font-size: 15px; }
.back::before { content: "← "; }

.empty { margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); }

/* Blog list */
.post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.post-item { display: flex; flex-direction: column; gap: 10px; padding: 26px 0; border-top: 1px solid var(--border-soft); }
.post-item:first-child { border-top: 0; padding-top: 6px; }
.post-item-title { margin: 0; font-size: 27px; line-height: 1.2; text-wrap: pretty; font-family: var(--head-font); font-weight: var(--head-weight); letter-spacing: calc(var(--head-spacing) + 0.005em); }
.post-item-title a { color: var(--ink); }
.post-item-title a:hover { color: var(--coral); }
.post-item-excerpt { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }

/* Tags (chips on posts, filter links) */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 500; color: var(--chip-text); }
.tag:hover { background: var(--accent-soft); color: var(--teal); }
.article-foot .tags { margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   Photo gallery
   -------------------------------------------------------------------------- */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--gal-cols, 3), minmax(0, 1fr)); gap: var(--gal-gap, 14px);
}
.gallery-item { display: block; border-radius: 16px; overflow: hidden; background: var(--chip); aspect-ratio: 4 / 3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-fig { margin: 0; display: grid; gap: 6px; }
.gallery-caption { font-size: 13px; line-height: 1.5; color: var(--muted-2); padding: 0 2px; }

/* Masonry: CSS columns, images in their natural aspect ratio */
.gallery--masonry { display: block; columns: var(--gal-cols, 3); column-gap: var(--gal-gap, 14px); }
.gallery--masonry li { break-inside: avoid; margin-bottom: var(--gal-gap, 14px); }
.gallery--masonry .gallery-item, .gallery--panorama .gallery-item { aspect-ratio: auto; }
.gallery--masonry .gallery-item img, .gallery--panorama .gallery-item img { height: auto; }

/* Panorama: one column, full width */
.gallery--panorama { grid-template-columns: 1fr; }
.gallery--panorama .gallery-item { border-radius: 18px; }
.gallery--panorama .gallery-caption { font-size: 14px; }

.lightbox {
  border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  background: rgba(16, 22, 26, 0.94); color: #fff;
}
.lightbox::backdrop { background: rgba(16, 22, 26, 0.6); }
.lightbox figure {
  margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px;
}
.lightbox img { max-width: min(96vw, 1600px); max-height: 82vh; width: auto; height: auto; border-radius: 10px; }
.lightbox figcaption { display: flex; gap: 14px; font-size: 14px; color: rgba(255, 255, 255, 0.8); }
.lightbox button {
  position: absolute; z-index: 1; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff;
  width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: var(--coral); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* Reading progress (2026-10-17): thin bar below the header bar. site.js
   sets top (bottom edge of the bar currently at the top), shows it only on
   long texts and fills it via scaleX – that paints without layout work.
   Colour and thickness come from Design → Beitragsliste (Content::designCss());
   without a value link colour and 3 px. Above the bars (30), below the
   full-screen menu (90); no track – it should be a line, not a slider. */
.lesefortschritt {
  position: fixed; left: 0; right: 0; top: 0; z-index: 31;
  height: var(--fortschritt-h, 3px); pointer-events: none;
}
.lesefortschritt[hidden] { display: none; }
.lesefortschritt > span {
  display: block; width: 100%; height: 100%;
  background: var(--fortschritt-farbe, var(--teal));
  transform: scaleX(0); transform-origin: 0 50%;
}

/* Label "KI-generiert" (2026-10-16): images that are marked in the media library
   as "mit KI erstellt". It sits bottom right in the nearest
   positioned box – gallery tile, header image; where the image has none
   (in the text, in a column), ki_bild() puts .ki-bild around it. The small
   preview images of the post lists don't carry it (the client 2026-10-17:
   too small there, the post itself shows it). */
.ki-bild { position: relative; display: block; max-width: 100%; }
.ki-bild > img { display: block; }
.prose figure > .ki-bild { align-self: flex-start; }
.prose :is(p, li, td) .ki-bild { display: inline-block; vertical-align: middle; }
.gallery-item { position: relative; }
.ki-hinweis {
  position: absolute; right: 8px; bottom: 8px; z-index: 1;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px 2px 6px; border-radius: 999px;
  /* Regular weight: if the font is only uploaded as regular (Lora on Live),
     the browser artificially thickened 600 – coarse at 10 px (2026-10-17) */
  font: 400 10px/1.4 var(--font); letter-spacing: 0.02em; white-space: nowrap;
  color: var(--ki-hinweis-text); background: var(--ki-hinweis-bg);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.ki-hinweis::before { content: "✦"; font-size: 9px; opacity: 0.85; }
.ki-hinweis[hidden] { display: none; }
/* Header image: the caption lies at the bottom, hence at the top */
.block-kopfbild > .ki-hinweis { top: 12px; bottom: auto; right: 12px; }
/* In the lightbox it is in the caption instead of on the image */
.lightbox .ki-hinweis { position: static; }

/* --------------------------------------------------------------------------
   Open source
   -------------------------------------------------------------------------- */
.projects { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.project { display: flex; flex-direction: column; gap: 12px; padding: 26px 0; border-top: 1px solid var(--border-soft); }
.project:first-child { border-top: 0; padding-top: 6px; }
.project-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.project-title { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--chip); font-size: 12px; color: var(--chip-text); }
.project-desc { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.project-desc a { text-decoration: underline; }
.project-links { display: flex; flex-wrap: wrap; gap: 8px; }
.project-links a {
  display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 12px;
  background: var(--accent-soft); font-size: 14px; font-weight: 600; color: var(--teal);
}
.project-links a:hover { background: var(--navy); color: #fff; }

/* --------------------------------------------------------------------------
   Mobile (≤ 860 px): fixed header + tab bar at the bottom
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .frame { display: block; padding: 0; min-height: 0; }
  .profile { display: none; }
  .side-panel { display: none; }

  .m-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    margin: calc(10px + env(safe-area-inset-top)) 12px 0; padding: 12px 14px;
    border-radius: 22px; background: var(--glass);
    border: 1px solid var(--glass-b); box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .m-ident { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .m-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
  .m-tagline { font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-menu {
    margin-left: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px;
    border: 0; background: none; cursor: pointer; border-radius: 10px;
  }
  .m-menu span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text-2); }
  .m-menu span:last-child { width: 12px; }
  .m-menu[aria-expanded="true"] span:last-child { width: 18px; }
  .m-sheet {
    position: absolute; right: 8px; top: calc(100% + 8px);
    display: flex; flex-direction: column; min-width: 180px; padding: 8px;
    border-radius: 18px; background: var(--sheet);
    border: 1px solid var(--glass-b); box-shadow: var(--shadow-sm);
  }
  .m-sheet[hidden] { display: none; }
  .m-sheet a { padding: 11px 14px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--text-2); }
  .m-sheet a:hover { background: var(--accent-soft); color: var(--teal); }
  .m-sheet a.active { background: var(--navy); color: #fff; font-weight: 600; }
  .m-sheet .nav-group > summary { padding: 11px 14px; border-radius: 12px; font-size: 15px; }
  .m-sheet .nav-group-items { margin: 2px 0 2px 12px; }
  .m-sheet .nav-group-items a { padding: 9px 12px; font-size: 14px; }
  .m-sheet-rule { height: 1px; margin: 6px 8px; background: var(--border); }

  .panel {
    display: flex; flex-direction: column;
    margin: calc(92px + env(safe-area-inset-top)) 12px 0;
    min-height: calc(100vh - 92px);
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    box-shadow: 0 -2px 30px rgba(20, 40, 60, 0.08);
    --panel-pad-x: 22px;
    --panel-pad-top: 24px;
    padding: var(--panel-pad-top) var(--panel-pad-x) calc(40px + env(safe-area-inset-bottom));
  }

  .article-wrap, .prose { gap: 14px; }
  .meta { gap: 8px; font-size: 11px; letter-spacing: 0.12em; }
  .meta-topic { display: none; }
  .article-title, .page-title, .prose h1 { font-size: var(--h1-m, 31px); line-height: 1.12; }

  /* Two px smaller on phones, but never below 16 px (Content::MOBIL_TEXT_MIN) */
  .prose { font-size: max(16px, calc(var(--text-size) - 2px)); line-height: var(--text-line); }
  .prose h2 { font-size: var(--h2-m, 22px); }
  .prose h3 { font-size: var(--h3-m, 19px); }
  .prose h4 { font-size: var(--h4-m, 17px); }
  .post-item { padding: 20px 0; }
  .post-item-title { font-size: 22px; }
  .post-item-excerpt { font-size: 15px; }
  .project-title { font-size: 21px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery--masonry { columns: 2; column-gap: 8px; }
  .gallery--masonry li { margin-bottom: 8px; }
  .gallery--panorama { grid-template-columns: 1fr; }
  .gallery-item { border-radius: 12px; }

  .m-legal {
    display: flex; justify-content: center; gap: 16px; margin-top: auto; padding-top: 40px;
    font-size: 12px;
  }
  .m-legal a { color: var(--muted-3); }
  .m-legal a:hover { color: var(--coral); }

  .lightbox button { width: 40px; height: 40px; }
  .lightbox figure { padding: 16px; }
}

@media (max-width: 400px) {
  .panel { --panel-pad-x: 18px; padding-left: var(--panel-pad-x); padding-right: var(--panel-pad-x); }
}

/* --------------------------------------------------------------------------
   Footer (Design → Fußzeile): glass bar below everything, legal links included
   -------------------------------------------------------------------------- */
.site-footer { max-width: var(--frame-breite); margin: 0 auto; padding: 0 28px 28px; }
.site-footer-card {
  display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center;
  padding: 20px 24px; border-radius: var(--radius-panel);
  background: var(--glass); border: 1px solid var(--glass-b); box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.site-footer-text { font-size: 14px; line-height: 1.6; color: var(--muted); gap: 8px; }
.site-footer .legal { display: flex; gap: 18px; font-size: 13px; }
.site-footer .legal a { color: var(--muted-3); }
.site-footer .legal a:hover { color: var(--coral); }
@media (max-width: 860px) {
  .site-footer { padding: 0 12px calc(20px + env(safe-area-inset-bottom)); margin-top: 12px; }
}

/* --------------------------------------------------------------------------
   Blog list styles (backend → Design → Blogliste)
   -------------------------------------------------------------------------- */
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tagbar .tag.active { background: var(--navy); color: #fff; }

.post-item-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.post-item--thumb { flex-direction: row; align-items: flex-start; gap: 18px; }
.post-thumb { display: block; flex: none; width: 180px; border-radius: 14px; overflow: hidden; background: var(--chip); aspect-ratio: 4 / 3; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.post-thumb:hover img { transform: scale(1.03); }

.post-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
/* Card after homepage design 1b (2026-10-26): own surface with a soft shadow,
   image inset with rounded corners, lighter title */
.post-card {
  display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 20px; border-radius: 12px;
  background: var(--karte); box-shadow: var(--karte-schatten);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--karte-hover); }
.post-card .post-thumb { width: 100%; border-radius: 8px; aspect-ratio: 4 / 3; }
.post-card-body { display: flex; flex-direction: column; gap: 8px; padding: 0 6px; }
.post-card-title {
  margin: 0; font-size: 19px; line-height: 1.3; text-wrap: pretty;
  font-family: var(--head-font); font-weight: 500; letter-spacing: calc(var(--head-spacing) + 0.01em);
}
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--coral); }
.post-card .post-item-excerpt { font-size: 14px; line-height: 1.55; }

.post-feature { display: flex; flex-direction: column; gap: 16px; margin-bottom: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--border-soft); }
.post-feature .post-thumb { width: 100%; aspect-ratio: 21 / 9; border-radius: 18px; }
.post-feature-body { display: flex; flex-direction: column; gap: 12px; }
.post-feature .post-item-title { font-size: 34px; }

.post-timeline { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; display: flex; flex-direction: column; gap: 30px; }
.post-timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--border); }
.tl-item { position: relative; display: flex; flex-direction: column; gap: 8px; }
.tl-dot { position: absolute; left: -29px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 3px solid var(--teal); box-sizing: border-box; }
.tl-title { font-size: 24px; }

@media (max-width: 640px) {
  .post-cards { grid-template-columns: 1fr; }
  .post-item--thumb { flex-direction: column; }
  .post-item--thumb .post-thumb { width: 100%; }
  .post-feature .post-item-title { font-size: 26px; }
}

/* --------------------------------------------------------------------------
   Protected pages: password prompt
   -------------------------------------------------------------------------- */
.locked-box {
  display: grid; justify-items: start; gap: 14px;
  max-width: 420px; padding: 26px 28px; border-radius: 16px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
}
.locked-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent-soft); color: var(--teal);
}
.locked-text { margin: 0; color: var(--muted); }
.locked-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--coral); }
.locked-form { display: flex; gap: 8px; width: 100%; }
.locked-form input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel); color: var(--ink); font: inherit; font-size: 15px;
}
.locked-form input:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px var(--accent-soft); }
.locked-form button {
  border: 0; border-radius: 12px; padding: 10px 18px; background: var(--navy); color: #fff;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.locked-form button:hover { background: var(--coral); }

/* --------------------------------------------------------------------------
   Download pages: curated file list
   -------------------------------------------------------------------------- */
.download-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: var(--reading-width); }
.download-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  color: var(--text-2); transition: border-color 0.15s ease, background 0.15s ease;
}
.download-link:hover { border-color: var(--teal); color: var(--text-2); background: var(--accent-soft); }
.download-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent-soft); color: var(--teal);
}
.download-text { display: grid; gap: 2px; min-width: 0; }
.download-label { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.download-note { font-size: 14px; color: var(--muted); line-height: 1.5; }
.download-meta { margin-left: auto; flex: none; font-size: 12px; letter-spacing: 0.08em; color: var(--muted-2); text-transform: uppercase; }
@media (max-width: 640px) {
  .download-link { flex-wrap: wrap; }
  .download-meta { margin-left: 52px; }
}

/* With a footer, frame and bar share the window height: on short pages
   the footer is visible without scrolling, on long ones it stands below the content */
body.has-footer { display: flex; flex-direction: column; }
body.has-footer .frame { flex: 1 0 auto; min-height: 0; width: 100%; }
body.has-footer .site-footer { width: 100%; }
@media (min-width: 861px) {
  /* Profile and area fill the (now shorter) row instead of enforcing their own 100vh */
  body.has-footer .frame { align-items: stretch; }
  body.has-footer .profile { height: auto; max-height: calc(100vh - 56px); align-self: stretch; }
  body.has-footer .panel { min-height: 0; }
  body.has-footer .side-panel { align-self: start; }
  body.has-footer.layout-edge .profile { max-height: 100vh; }
  /* The bar with profile doesn't stretch – it is a row, not a column */
  body.has-footer[data-menu="profil"] .profile { align-self: start; }
}
@media (max-width: 860px) {
  body.has-footer .frame { display: flex; flex-direction: column; }
  body.has-footer .panel { flex: 1; min-height: 0; }
}

/* Large screens: keep the white area's padding moderate */
@media (min-width: 1500px) {
  .panel { --panel-pad-x: 72px; --panel-pad-top: 52px; padding: var(--panel-pad-top) var(--panel-pad-x) 64px; }
}

/* ---------------------------------------------------------------------------
   Menu style "Vollbild" (data-menu="vollbild" on the <body>)

   Instead of the list, the menu area only holds a button; on click the items
   spread over the whole page, large and calm. Own markup, own
   CSS – a style is more than a colour.

   The block deliberately stands AT THE VERY END: `.vollmenu-nav .nav-group > summary`
   and `[data-menu="profil"] .nav-group > summary` have the same specificity, so
   the later rule wins. Further up, the group row stayed small in the
   header layout although the menu fills the screen.

   On narrow screens it stays with the ☰ menu of the header: the
   profile box including the button is hidden there anyway.
--------------------------------------------------------------------------- */
/* The slim header replaces the menu column: avatar, name, button – nothing more
   is needed, search and legal links are in the menu itself.
   Desktop only; below that the mobile header (.m-header) keeps working. */
.kopfleiste { display: none; }
@media (min-width: 861px) {
  [data-menu="vollbild"] .kopfleiste {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 14px;
    /* width: 100% is necessary, not superfluous: with a footer <body> is a
       flex column, and `margin: 0 auto` lets a flex child shrink to content width
       instead of stretching. */
    width: 100%; max-width: var(--frame-breite); margin: 0 auto; padding: 14px 28px;
    background: var(--glass); border-bottom: 1px solid var(--glass-b);
    backdrop-filter: blur(10px);
  }
  /* Without a menu column the frame only has one column – in every layout */
  [data-menu="vollbild"] .frame { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  [data-menu="vollbild"].layout-aside .frame { grid-template-columns: minmax(0, var(--split-main)) minmax(0, var(--split-aside)); }
  /* Borderless: the header then also runs across the full width */
  [data-menu="vollbild"].layout-edge .kopfleiste { max-width: none; }
  /* Impressum & co. to the end of the content – they are no longer in the sidebar after all */
  [data-menu="vollbild"] .m-legal { display: flex; }
}
.kopfleiste-ident { flex: 1; min-width: 0; }
.kopfleiste-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.kopfleiste-tagline { font-size: 13px; color: var(--muted-2); }

.nav-trigger {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: 10px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel-2); color: var(--text-2);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nav-trigger:hover { background: var(--accent-soft); color: var(--teal); border-color: var(--teal); }
.nav-trigger-icon { display: flex; flex-direction: column; gap: 4px; flex: none; }
.nav-trigger-icon span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

.vollmenu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center;
  /* `safe center` instead of `center`: with more items than room, centring would
     push the start of the list above the top edge – and no scroll gesture
     gets you back there. `safe` then aligns to the top. */
  justify-content: safe center;
  gap: 28px; padding: 72px 24px 48px; overflow: auto;
  /* Opaque, not see-through: the menu should replace the page, not overlay it */
  background: var(--bg);
}
.vollmenu[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .vollmenu { animation: vollmenu-auf 0.18s ease-out; }
  @keyframes vollmenu-auf { from { opacity: 0; } to { opacity: 1; } }
}
/* Fixed, not absolute: with a long list the close button would otherwise scroll away */
.vollmenu-zu {
  position: fixed; top: 20px; right: 24px; z-index: 1;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--panel-2); color: var(--text-2);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.vollmenu-zu:hover { background: var(--accent-soft); color: var(--coral); }

.vollmenu-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(560px, 100%); }
/* The font size also follows the window height – with many items on a
   flat screen nothing would fit on screen otherwise. */
.vollmenu-nav a,
.vollmenu-nav .nav-group > summary { font-size: clamp(19px, min(3.4vw, 4.4vh), 36px); }
.vollmenu-nav a {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 6px 20px; border-radius: 14px;
  font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-align: center;
  transition: color 0.15s ease;
}
.vollmenu-nav a:hover { color: var(--coral); }
.vollmenu-nav a.active { color: var(--teal); }
.vollmenu-nav a.active::before { content: "— "; color: var(--teal); }
.vollmenu-nav .nav-count { font-size: 0.5em; font-weight: 500; opacity: 0.6; }

/* Groups: here without indentation and without border – the triangle is enough as a sign */
.vollmenu-nav .nav-group { width: 100%; }
.vollmenu-nav .nav-group > summary {
  justify-content: center; gap: 12px; padding: 6px 20px;
  font-weight: 600; letter-spacing: -0.02em; color: var(--ink); background: none;
}
.vollmenu-nav .nav-group > summary:hover { background: none; color: var(--coral); }
.vollmenu-nav .nav-group > summary::after { font-size: 0.42em; }
.vollmenu-nav .nav-group-items {
  align-items: center; margin: 2px 0 8px; padding: 0; border-left: 0; gap: 0;
}
.vollmenu-nav .nav-group-items a { font-size: clamp(15px, min(2vw, 2.6vh), 21px); font-weight: 500; color: var(--text-2); }

.vollmenu .search { width: min(420px, 100%); }
.vollmenu-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; font-size: 14px; }
.vollmenu-legal a { color: var(--muted-2); }
.vollmenu-legal a:hover { color: var(--coral); }
/* While the menu is open, the page behind it should not scroll along */
body.vollmenu-offen { overflow: hidden; }

/* ---------------------------------------------------------------------------
   Cover: the content ends before the menu bar

   A sticky, semi-transparent bar lets the text underneath
   shimmer through – that quickly looks like mush. With
   data-menu-inhalt="schnitt" a cover therefore lies above the content and
   below the bar.

   The cover is a SECOND .aurora: same fixing, same gradient,
   same animation duration – so pixel-identical with the real background. A
   single-colour strip would be visible wherever the gradient doesn't currently
   have the same colour, and the blobs would be cut off.

   Clipping is done via clip-path, NOT via height/overflow: the box thereby
   stays at inset: 0, gradient and blobs keep their coordinates.
   With height the gradient would be squashed and the blobs would sit elsewhere.
--------------------------------------------------------------------------- */
@media (min-width: 861px) {
  .aurora-deckel {
    /* Above the content, below the bar (which has z-index 30) */
    z-index: 25;
    /* --deckel-h is set by site.js from the real bar height; the value here
       holds until that has happened (one row of menu items). */
    clip-path: inset(0 0 calc(100% - var(--deckel-h, 78px)) 0);
    pointer-events: none;   /* otherwise the top strip would no longer be clickable */
  }
}
/* On mobile there is no header of its own – nothing covers there */
@media (max-width: 860px) {
  .aurora-deckel { display: none; }
}

/* ---------------------------------------------------------------------------
   Menu style "Glasleiste" (data-menu="glas")

   Based on a template from the client (CodeFronts, Tailwind). What was adopted is
   the look, not the code: no Tailwind, no bracket values, no
   build step – the same line as with the backend colours.

   The core of the effect is three things, not just the transparency:
   backdrop-filter with SATURATION (the colours behind light up), a bright
   edge outside AND inside (that makes the surface look like a pane), and
   a deep, soft shadow downwards.

   White text needs a strong ground. `auto` therefore follows the
   appearance; 'hell'/'dunkel' override that (Content::MENU_GLAS_SCHRIFT).
--------------------------------------------------------------------------- */
[data-menu="glas"] {
  --glas-fuell: rgba(255, 255, 255, 0.55);
  --glas-kante: rgba(255, 255, 255, 0.75);
  --glas-innen: rgba(255, 255, 255, 0.55);
  --glas-text: var(--ink);
  --glas-text-2: var(--text-2);
  --glas-aktiv: rgba(255, 255, 255, 0.85);
  --glas-hover: rgba(255, 255, 255, 0.45);
}
/* Dark ground: the pane becomes a tint, the text white.
   data-theme is on the <html>, data-menu on the <body> – until 2026-10 the
   selectors required both on the same element: with "Dunkel" the rule never applied (light
   pane with light text, unreadable), with "Hell" under a dark system
   however it did. render_test pins down the pattern. */
:root[data-theme="dark"] [data-menu="glas"],
[data-menu="glas"][data-glas-schrift="hell"] {
  --glas-fuell: rgba(255, 255, 255, 0.10);
  --glas-kante: rgba(255, 255, 255, 0.20);
  --glas-innen: rgba(255, 255, 255, 0.25);
  --glas-text: #fff;
  --glas-text-2: rgba(255, 255, 255, 0.85);
  --glas-aktiv: rgba(255, 255, 255, 0.20);
  --glas-hover: rgba(255, 255, 255, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] [data-menu="glas"]:not([data-glas-schrift="dunkel"]) {
    --glas-fuell: rgba(255, 255, 255, 0.10);
    --glas-kante: rgba(255, 255, 255, 0.20);
    --glas-innen: rgba(255, 255, 255, 0.25);
    --glas-text: #fff;
    --glas-text-2: rgba(255, 255, 255, 0.85);
    --glas-aktiv: rgba(255, 255, 255, 0.20);
    --glas-hover: rgba(255, 255, 255, 0.14);
  }
}
/* "Immer dunkel" wins in every case – hence at the very end and with :root
   as specific as the dark rule above */
:root [data-menu="glas"][data-glas-schrift="dunkel"] {
  --glas-fuell: rgba(255, 255, 255, 0.55);
  --glas-kante: rgba(255, 255, 255, 0.75);
  --glas-innen: rgba(255, 255, 255, 0.55);
  --glas-text: var(--ink);
  --glas-text-2: var(--text-2);
  --glas-aktiv: rgba(255, 255, 255, 0.85);
  --glas-hover: rgba(255, 255, 255, 0.45);
}

.glasleiste { display: none; }
@media (min-width: 861px) {
  [data-menu="glas"] .glasleiste {
    /* top MUST match the margin-top, otherwise the bar slides by the difference
       at the moment of docking (jerk). The same trap as with
       [data-menu="profil"] .profile further up. */
    position: sticky; top: 16px; z-index: 30;
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    /* Exactly as wide as the content area below: subtract 2 x 28 px frame padding,
       then the edges align. A bar whose width depends on the number of
       menu items makes the page restless. */
    width: calc(100% - 56px); max-width: calc(var(--frame-breite) - 56px);
    margin: 16px auto 0; padding: 9px 12px 9px 18px;
    border-radius: 999px;
    color: var(--glas-text);
    background: var(--glas-fuell);
    box-shadow:
      0 0 0 1px var(--glas-kante),
      inset 0 0 0 1px var(--glas-innen),
      0 18px 40px -22px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
  [data-menu="glas"] .frame { grid-template-columns: minmax(0, 1fr); padding-top: 22px; }
  [data-menu="glas"].layout-aside .frame { grid-template-columns: minmax(0, var(--split-main)) minmax(0, var(--split-aside)); }
  /* Borderless: the content goes to the edges, so the bar does too */
  /* Borderless: no outer margin, so it also sticks at 0 – otherwise it would jump at the first pixel */
  [data-menu="glas"].layout-edge .glasleiste { width: 100%; max-width: none; margin-top: 0; top: 0; border-radius: 0; }
  [data-menu="glas"] .m-legal { display: flex; }

  .glas-marke { display: flex; align-items: center; gap: 10px; flex: none; color: inherit; }
  .glas-name { font-size: 13.5px; font-weight: 500; letter-spacing: 0.01em; opacity: 0.9; }
  .avatar-xs { width: 30px; height: 30px; padding: 2px; }
  .avatar-xs .avatar-inner { border-width: 2px; }
  .avatar-xs .avatar-initial { font-size: 13px; }

  /* The items: pills that only get a surface on hover */
  [data-menu="glas"] .glasleiste .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; margin-inline-start: auto; }
  [data-menu="glas"] .glasleiste .nav a,
  [data-menu="glas"] .glasleiste .nav-group > summary {
    min-height: 38px; padding: 0 15px; border-radius: 999px;
    font-size: 14.5px; font-weight: 600; color: var(--glas-text-2);
    background: none;
  }
  [data-menu="glas"] .glasleiste .nav a:hover,
  [data-menu="glas"] .glasleiste .nav-group > summary:hover { background: var(--glas-hover); color: var(--glas-text); }
  [data-menu="glas"] .glasleiste .nav a.active { background: var(--glas-aktiv); color: var(--glas-text); }
  [data-menu="glas"] .glasleiste .nav a.active:hover { background: var(--glas-aktiv); }
  [data-menu="glas"] .glasleiste .nav-count { opacity: 0.65; }

  /* Groups float as a panel below the bar – as in the "oben" layout */
  [data-menu="glas"] .glasleiste .nav-group { position: relative; }
  [data-menu="glas"] .glasleiste .nav-group-items {
    position: absolute; top: calc(100% + 10px); left: 0; z-index: 40;
    min-width: 190px; margin: 0; padding: 8px; border-left: 0; border-radius: 18px;
    background: var(--glas-fuell);
    box-shadow: 0 0 0 1px var(--glas-kante), inset 0 0 0 1px var(--glas-innen), 0 18px 40px -22px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
  [data-menu="glas"] .glasleiste .nav-group-items.nach-links { left: auto; right: 0; }
  [data-menu="glas"] .glasleiste .nav-group-items a { min-height: 34px; font-size: 14px; }

  /* The search at the far right: collapsed a magnifier, expanded a field.
     Without JavaScript data-suche is missing – then the open state applies, and the
     field simply stands there. */
  [data-menu="glas"] .glas-suche { flex: none; display: flex; align-items: center; gap: 6px; }
  .glas-lupe {
    display: none; flex: none; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0; border: 0; border-radius: 999px;
    background: none; color: var(--glas-text-2); cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  [data-menu="glas"] .glas-lupe { display: flex; }
  .glas-lupe:hover { background: var(--glas-hover); color: var(--glas-text); }
  .glas-suche[data-suche="auf"] .glas-lupe { background: var(--glas-aktiv); color: var(--glas-text); }
  [data-menu="glas"] .glas-suche input {
    width: 190px; min-height: 38px; padding: 0 16px; border-radius: 999px;
    border: 0; background: var(--glas-aktiv); color: var(--glas-text);
    font-size: 14px;
    transition: width 0.22s ease, padding 0.22s ease, opacity 0.18s ease;
  }
  [data-menu="glas"] .glas-suche input::placeholder { color: var(--glas-text-2); opacity: 0.8; }
  [data-menu="glas"] .glas-suche input:focus { outline: 2px solid var(--glas-kante); outline-offset: 2px; }
  /* Collapsed: width 0, but not display:none – otherwise there would be
     nothing to animate and the focus would go nowhere. */
  [data-menu="glas"] .glas-suche[data-suche="zu"] input {
    width: 0; padding: 0; opacity: 0; pointer-events: none;
  }
  @media (prefers-reduced-motion: reduce) {
    [data-menu="glas"] .glas-suche input { transition: none; }
  }
}

/* ------------------------------------------------------------------
   Menu style "Kopfband" (data-menu="band")

   Across the full window width, flush at the top, without profile picture – and not
   visible at the top of the page. Only when scrolling does it get a surface, edge
   and shadow. The appeal lies exactly in that: at the top nothing disturbs, and as soon as
   the text moves up, the menu is there.

   position: fixed, NOT sticky. Sticky needs a place in the flow, and
   that is exactly what there should not be here: the band lies ABOVE the content, which
   passes underneath. The resting-position-equals-sticky-position rule therefore
   doesn't apply – it never docks, it always stands.

   Instead the frame keeps the space as padding-top, otherwise the
   first paragraph at the top of the page would lie under the band.
   ------------------------------------------------------------------ */
/* Fine setting "Fläche der Leiste: Weiß" (Content::MENU_LEISTE_FLAECHE):
   the bar keeps the neutral surface even if "Farben und Flächen" gives the
   content areas a tint. The tokens are set anew on the element
   – that beats the values designCss() writes to :root. */
[data-leiste="weiss"] :is(.kopfband, .kopfleiste, .m-header),
[data-leiste="weiss"][data-menu="profil"] .profile {
  --glass: rgba(255, 255, 255, 0.94); --glass-b: rgba(255, 255, 255, 1);
  --sheet: rgba(255, 255, 255, 0.98); --border-soft: rgba(20, 40, 60, 0.09);
}
:root[data-theme="dark"] [data-leiste="weiss"] :is(.kopfband, .kopfleiste, .m-header),
:root[data-theme="dark"] [data-leiste="weiss"][data-menu="profil"] .profile {
  --glass: rgba(23, 29, 35, 0.94); --glass-b: rgba(255, 255, 255, 0.09);
  --sheet: rgba(23, 29, 35, 0.98); --border-soft: rgba(255, 255, 255, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] [data-leiste="weiss"] :is(.kopfband, .kopfleiste, .m-header),
  :root[data-theme="auto"] [data-leiste="weiss"][data-menu="profil"] .profile {
    --glass: rgba(23, 29, 35, 0.94); --glass-b: rgba(255, 255, 255, 0.09);
    --sheet: rgba(23, 29, 35, 0.98); --border-soft: rgba(255, 255, 255, 0.08);
  }
}
/* … slightly see-through: the same neutral colour with less opacity.
   Header band, header and mobile header bring the blur
   themselves; the profile bar gets it here, so the text underneath doesn't
   show through sharply. */
[data-leiste="weiss_leicht"] :is(.kopfband, .kopfleiste, .m-header),
[data-leiste="weiss_leicht"][data-menu="profil"] .profile {
  --glass: rgba(255, 255, 255, 0.74); --glass-b: rgba(255, 255, 255, 0.9);
  --sheet: rgba(255, 255, 255, 0.96); --border-soft: rgba(20, 40, 60, 0.09);
}
[data-leiste="weiss_leicht"][data-menu="profil"] .profile { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
:root[data-theme="dark"] [data-leiste="weiss_leicht"] :is(.kopfband, .kopfleiste, .m-header),
:root[data-theme="dark"] [data-leiste="weiss_leicht"][data-menu="profil"] .profile {
  --glass: rgba(23, 29, 35, 0.74); --glass-b: rgba(255, 255, 255, 0.09);
  --sheet: rgba(23, 29, 35, 0.97); --border-soft: rgba(255, 255, 255, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] [data-leiste="weiss_leicht"] :is(.kopfband, .kopfleiste, .m-header),
  :root[data-theme="auto"] [data-leiste="weiss_leicht"][data-menu="profil"] .profile {
    --glass: rgba(23, 29, 35, 0.74); --glass-b: rgba(255, 255, 255, 0.09);
    --sheet: rgba(23, 29, 35, 0.97); --border-soft: rgba(255, 255, 255, 0.08);
  }
}

.kopfband { display: none; }

@media (min-width: 861px) {
  [data-menu="band"] .kopfband {
    display: block;
    position: fixed; inset: 0 0 auto 0; z-index: 30;
    /* At the start nothing: no surface, no edge, no shadow. The text
       colour stays, it stands on the page background. */
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  }
  [data-menu="band"] .kopfband.sichtbar {
    background: var(--glass);
    border-bottom-color: var(--border-soft);
    box-shadow: 0 10px 30px -24px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
  }
  /* Inside the same width as the content below, so brand and menu align with
     the text – the band itself still runs through to the edge. */
  [data-menu="band"] .kopfband-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: 100%; max-width: var(--frame-breite); margin: 0 auto; padding: 0 28px;
    min-height: 60px;
  }
  [data-menu="band"].layout-edge .kopfband-inner { max-width: none; }
  [data-menu="band"] .kopfband-marke {
    font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
    color: var(--ink); text-decoration: none; white-space: nowrap;
  }
  [data-menu="band"] .kopfband-marke:hover { color: var(--coral); }
  /* flex-direction: row is stated here EXPLICITLY: `.nav` is a column for the
     sidebar, and the header band rule inherited that – the items
     stood stacked at the right edge, the band was 205 px tall and
     pushed the content down by exactly that much (found 2026-09 in the
     live configuration; glass bar and layout "oben" had the line). */
  [data-menu="band"] .kopfband .nav { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
  [data-menu="band"] .kopfband .nav a,
  [data-menu="band"] .kopfband .nav-group > summary { padding: 8px 12px; border-radius: 10px; font-size: 15px; }
  /* Groups float as a panel below the band – as in the "oben" layout and in the
     glass bar. Without these rules the group expanded inside the bar and its
     entries lay over the neighbours. site.js already knows the band (only
     one group open, close on click outside, nach-links at the edge). */
  [data-menu="band"] .kopfband .nav-group { position: relative; }
  [data-menu="band"] .kopfband .nav-group-items {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
    min-width: 210px; margin: 0; padding: 8px;
    border: 1px solid var(--glass-b); border-radius: 16px;
    background: var(--sheet); box-shadow: var(--shadow-md);
  }
  [data-menu="band"] .kopfband .nav-group-items.nach-links { left: auto; right: 0; }
  [data-menu="band"] .kopfband .nav-group-items a { padding: 9px 12px; }

  /* The menu column is dropped, the content gets the full width – and at the top the
     space the fixed band would otherwise cover.

     The space is MEASURED, not guessed: site.js writes the real height
     to --band-h. A fixed number would be wrong with many menu items – then
     the band wraps, gets taller, and the first paragraph would disappear
     underneath. The 61 px in var() are the fallback without JavaScript
     (min-height of the bar plus edge). It is DELIBERATELY in the var() call
     and not a separate declaration on [data-menu="band"]: that would be the
     <body>, and a variable declared there beats the one site.js writes to the
     <html> – then the measured height would have no effect. */
  [data-menu="band"] .frame { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--band-h, 61px) + 12px); }
  [data-menu="band"].layout-aside .frame { grid-template-columns: minmax(0, var(--split-main)) minmax(0, var(--split-aside)); }
  /* Impressum & co. to the end of the content – there is no sidebar. Was missing
     until 2026-10: with header band and no footer text the footer pages were
     linked nowhere on desktop. */
  [data-menu="band"] .m-legal { display: flex; }

  @media (prefers-reduced-motion: reduce) {
    [data-menu="band"] .kopfband { transition: none; }
  }
}

/* Header band on phones: the same bar as on desktop – borderless, flush at the top,
   without a surface at the top of the page –, only with ☰ instead of the menu items. Until 2026-10
   the floating card of the other styles stood here (the client: "weicht
   erheblich ab, dabei brauchen wir nur das Hamburger-Menü"). The class
   `sichtbar` is set by the same scroll handler as for the band (site.js), it also
   measures the height into --band-h – here the band is hidden and the
   header is the bar. The fallback in var() as above. */
@media (max-width: 860px) {
  [data-menu="band"] .m-header {
    margin: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    border: 0; border-bottom: 1px solid transparent; border-radius: 0;
    background: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  }
  [data-menu="band"] .m-header.sichtbar {
    background: var(--glass);
    border-bottom-color: var(--border-soft);
    box-shadow: 0 10px 30px -24px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
  }
  [data-menu="band"] .panel { margin-top: calc(var(--band-h, 67px) + 12px); }
  /* The band on desktop shows no short text – here neither */
  [data-menu="band"] .m-tagline { display: none; }

  @media (prefers-reduced-motion: reduce) {
    [data-menu="band"] .m-header { transition: none; }
  }
}

/* ===================================================================
   Menu style "Zweifarbig" – based on a template from the client
   (CodeFronts "Split Two-Tone Navbar", Tailwind). What was adopted is the
   look, not the code: a dark bar across the full width,
   brand on the left, menu centred, on the right a coloured block with the search,
   separated by a slant. The block reaches 24 px under the dark
   bar (negative margin) and is clipped via clip-path, so that
   behind the edge there is always dark.

   The colours are tokens of their own, deliberately NOT from the page's
   palette: the contrast IS the style, it should look the same in light and dark.
   Bar and block can be chosen freely (Design → Menue);
   designCss() writes the four base values (--zwei-dunkel, --zwei-akzent
   and the two text colours by brightness), everything else is derived
   here via color-mix() – so there is nothing that could be forgotten when
   changing colours. The values here are the template (fallback).
   ------------------------------------------------------------------- */
:root {
  --zwei-dunkel: #1a1a2e;
  --zwei-akzent: #f7c948;
  --zwei-hell:   #f0eeff;                   /* Text on the bar */
  --zwei-tinte:  #1a1a2e;                   /* Text on the block */
  --zwei-dunkel-2:     color-mix(in srgb, var(--zwei-dunkel), var(--zwei-hell) 9%);
  --zwei-hell-weich:   color-mix(in srgb, var(--zwei-hell) 62%, transparent);
  --zwei-hell-hover:   color-mix(in srgb, var(--zwei-hell) 8%, transparent);
  --zwei-tinte-weich:  color-mix(in srgb, var(--zwei-tinte) 12%, transparent);
  --zwei-tinte-kante:  color-mix(in srgb, var(--zwei-tinte) 28%, transparent);
}

.zweifarbig { display: none; }

@media (min-width: 861px) {
  /* Sticks at the top, opaque. Resting position = sticky position: no margin, top 0. */
  [data-menu="zwei"] .zweifarbig {
    display: block; position: sticky; top: 0; z-index: 30;
    background: var(--zwei-dunkel); color: var(--zwei-hell);
  }
  [data-menu="zwei"] .zwei-inner {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch;
    min-height: 64px; max-width: var(--frame-breite); margin: 0 auto;
  }
  [data-menu="zwei"].layout-edge .zwei-inner { max-width: none; }

  [data-menu="zwei"] .zwei-marke {
    display: flex; align-items: center; padding: 0 40px 0 28px;
    font-weight: 700; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap;
    color: var(--zwei-hell); text-decoration: none;
  }
  [data-menu="zwei"] .zwei-marke:hover { color: var(--zwei-akzent); }

  /* The items: centred, on one line (flex-direction explicitly, see header band) */
  [data-menu="zwei"] .zweifarbig .nav {
    display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 2px 4px; padding: 8px 12px;
  }
  [data-menu="zwei"] .zweifarbig .nav a,
  [data-menu="zwei"] .zweifarbig .nav-group > summary {
    padding: 8px 14px; border-radius: 8px; background: none;
    font-size: 14.5px; font-weight: 500; color: var(--zwei-hell-weich);
  }
  [data-menu="zwei"] .zweifarbig .nav a:hover,
  [data-menu="zwei"] .zweifarbig .nav-group > summary:hover { background: var(--zwei-hell-hover); color: var(--zwei-hell); }
  [data-menu="zwei"] .zweifarbig .nav a.active { color: var(--zwei-akzent); font-weight: 600; }
  [data-menu="zwei"] .zweifarbig .nav a.active:hover { background: none; }
  [data-menu="zwei"] .zweifarbig .nav-count { opacity: 0.6; }
  [data-menu="zwei"] .zweifarbig .nav-group > summary::after { color: var(--zwei-hell-weich); }

  /* Groups float as a panel below the bar – as with header band and glass bar */
  [data-menu="zwei"] .zweifarbig .nav-group { position: relative; }
  [data-menu="zwei"] .zweifarbig .nav-group-items {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
    min-width: 210px; margin: 0; padding: 8px; border: 0; border-radius: 12px;
    background: var(--zwei-dunkel-2); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.7);
  }
  [data-menu="zwei"] .zweifarbig .nav-group-items.nach-links { left: auto; right: 0; }
  [data-menu="zwei"] .zweifarbig .nav-group-items a { color: var(--zwei-hell); }

  /* The block: coloured, with a slant. margin-left -24px pushes it under the
     dark, clip-path cuts the corner – the angle always lies on dark. */
  [data-menu="zwei"] .zwei-block {
    display: flex; align-items: center; gap: 12px;
    padding: 0 32px 0 48px; margin-left: -24px;
    background: var(--zwei-akzent); color: var(--zwei-tinte);
    clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%);
  }
  /* Opacity (Content::MENU_ZWEI_DECKKRAFT): only the dark surface becomes
     see-through, always with blur – otherwise the background would determine
     the text contrast. The block stays opaque, it carries the search
     and lives from its strong colour. */
  [data-menu="zwei"][data-zwei-deckkraft="leicht"] .zweifarbig,
  [data-menu="zwei"][data-zwei-deckkraft="glas"] .zweifarbig {
    backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  }
  [data-menu="zwei"][data-zwei-deckkraft="leicht"] .zweifarbig { background: color-mix(in srgb, var(--zwei-dunkel) 84%, transparent); }
  [data-menu="zwei"][data-zwei-deckkraft="glas"] .zweifarbig { background: color-mix(in srgb, var(--zwei-dunkel) 62%, transparent); }
  [data-menu="zwei"] .zwei-suche { display: flex; align-items: center; gap: 6px; margin: 0; }
  [data-menu="zwei"] .zwei-suche input {
    width: 170px; height: 36px; padding: 0 12px; border-radius: 8px;
    border: 1.5px solid var(--zwei-tinte-kante); background: var(--zwei-tinte-weich);
    color: var(--zwei-tinte); font: inherit; font-size: 14px;
  }
  [data-menu="zwei"] .zwei-suche input::placeholder { color: var(--zwei-tinte); opacity: 0.6; }
  [data-menu="zwei"] .zwei-suche input:focus-visible { outline: 2px solid var(--zwei-dunkel); outline-offset: 2px; }
  [data-menu="zwei"] .zwei-suche button {
    display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    border: 0; border-radius: 8px; background: var(--zwei-dunkel); color: var(--zwei-hell); cursor: pointer;
  }
  [data-menu="zwei"] .zwei-suche button:hover { background: var(--zwei-dunkel-2); }

  /* Without a menu column the frame only has the content; legal links at the end of the content */
  [data-menu="zwei"] .frame { grid-template-columns: minmax(0, 1fr); padding-top: 22px; }
  [data-menu="zwei"].layout-aside .frame { grid-template-columns: minmax(0, var(--split-main)) minmax(0, var(--split-aside)); }
  [data-menu="zwei"] .m-legal { display: flex; }
  /* Side column sticks below the bar (rest = sticky; --leiste-unten is measured by site.js) */
  [data-menu="zwei"] .side-panel { top: calc(var(--leiste-unten, 64px) + 22px); max-height: calc(100vh - var(--leiste-unten, 64px) - 50px); }
}

/* There for screen readers and search engines, not on screen (e.g. the
   H1 of a page without a visible title) */
.nur-vorlesen {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Logo instead of profile picture (Profil → Logo, 2026-10) ----------
   The logo keeps its shape: scaled by height, the width follows;
   if it gets too wide, object-fit: contain keeps the proportions. */
.logo-link { display: inline-flex; align-items: center; flex: none; max-width: 100%; }
.logo { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; }
.logo-bild { display: block; width: auto; max-width: 100%; object-fit: contain; }
.logo-gross .logo-bild  { height: 84px; max-width: 240px; }
.logo-mittel .logo-bild { height: 40px; max-width: 200px; }
.logo-klein .logo-bild  { height: 34px; max-width: 150px; }
.logo-leiste .logo-bild { height: 30px; max-width: 170px; }
/* Profil → Logo → size "Groß": for logos with several lines or small
   type. The bars stay as tall as otherwise (44 px fit into the 64 px
   of Zweifarbig); where a bar sizes itself to its content, site.js measures
   its height anyway (--leiste-unten, --band-h). */
[data-logo="gross"] .logo-gross .logo-bild  { height: 120px; max-width: 280px; }
[data-logo="gross"] .logo-mittel .logo-bild { height: 52px; max-width: 320px; }
[data-logo="gross"] .logo-klein .logo-bild  { height: 46px; max-width: 200px; }
[data-logo="gross"] .logo-leiste .logo-bild { height: 44px; max-width: 300px; }
.kopfband-marke, .zwei-marke { display: inline-flex; align-items: center; gap: 10px; }
/* Light or dark version depending on appearance … */
.logo-dunkel { display: none; }
:root[data-theme="dark"] .logo-hell { display: none; }
:root[data-theme="dark"] .logo-dunkel { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .logo-hell { display: none; }
  :root[data-theme="auto"] .logo-dunkel { display: block; }
}
/* … except on surfaces with their own brightness (Zweifarbig, glass bar with
   fixed text colour). Same specificity as the rules above, hence after them. */
:root .logo-auf-hell .logo-hell { display: block; }
:root .logo-auf-hell .logo-dunkel { display: none; }
:root .logo-auf-dunkel .logo-hell { display: none; }
:root .logo-auf-dunkel .logo-dunkel { display: block; }

/* ---------- Rubriken (2026-10) ----------
   A fixed palette, light and dark tuned per colour (text on chip ≥ 7 : 1),
   so whatever a Rubrik is coloured, it stays readable. Used on the site and
   in the backend (Rubriken und Tags, editor, post list). */
:root {
  --rubrik-gruen-bg: #d7f0dd; --rubrik-gruen-fg: #1d4a2c;
  --rubrik-blau-bg: #d9e6fb; --rubrik-blau-fg: #1c3a66;
  --rubrik-ocker-bg: #f6e7c4; --rubrik-ocker-fg: #5a4110;
  --rubrik-rose-bg: #f8d9e3; --rubrik-rose-fg: #5a1f35;
  --rubrik-violett-bg: #e6ddf8; --rubrik-violett-fg: #3d2a6b;
  --rubrik-petrol-bg: #d3eef0; --rubrik-petrol-fg: #134a4f;
  --rubrik-orange-bg: #fbe0cc; --rubrik-orange-fg: #6a3210;
  --rubrik-grau-bg: #e6e9ee; --rubrik-grau-fg: #333d4a;
  --these-bg: #12324f; --these-text: #ffffff; --these-label: #9fc0e0; --these-link: #b6ecc6;
}
:root[data-theme="dark"] {
  --rubrik-gruen-bg: #1f3a28; --rubrik-gruen-fg: #b8e8c5;
  --rubrik-blau-bg: #1f2f4d; --rubrik-blau-fg: #c3d6f7;
  --rubrik-ocker-bg: #3d3118; --rubrik-ocker-fg: #f1d898;
  --rubrik-rose-bg: #432430; --rubrik-rose-fg: #f5c4d5;
  --rubrik-violett-bg: #2f2648; --rubrik-violett-fg: #d8ccf5;
  --rubrik-petrol-bg: #183b3e; --rubrik-petrol-fg: #b3e3e6;
  --rubrik-orange-bg: #45291a; --rubrik-orange-fg: #f6c9a8;
  --rubrik-grau-bg: #2b313b; --rubrik-grau-fg: #d4dae3;
  --these-bg: #223a55; --these-text: #f1f5f9; --these-label: #a9c6e4; --these-link: #b6ecc6;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --rubrik-gruen-bg: #1f3a28; --rubrik-gruen-fg: #b8e8c5;
    --rubrik-blau-bg: #1f2f4d; --rubrik-blau-fg: #c3d6f7;
    --rubrik-ocker-bg: #3d3118; --rubrik-ocker-fg: #f1d898;
    --rubrik-rose-bg: #432430; --rubrik-rose-fg: #f5c4d5;
    --rubrik-violett-bg: #2f2648; --rubrik-violett-fg: #d8ccf5;
    --rubrik-petrol-bg: #183b3e; --rubrik-petrol-fg: #b3e3e6;
    --rubrik-orange-bg: #45291a; --rubrik-orange-fg: #f6c9a8;
    --rubrik-grau-bg: #2b313b; --rubrik-grau-fg: #d4dae3;
    --these-bg: #223a55; --these-text: #f1f5f9; --these-label: #a9c6e4; --these-link: #b6ecc6;
  }
}
.rubrik {
  display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--rb-bg, var(--chip)); color: var(--rb-fg, var(--chip-text));
  font-size: 12.5px; line-height: 1.6; font-weight: 600; letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap;
}
a.rubrik:hover { color: var(--rb-fg); filter: brightness(0.96); }
.rubrik.farbe-gruen { --rb-bg: var(--rubrik-gruen-bg); --rb-fg: var(--rubrik-gruen-fg); }
.rubrik.farbe-blau { --rb-bg: var(--rubrik-blau-bg); --rb-fg: var(--rubrik-blau-fg); }
.rubrik.farbe-ocker { --rb-bg: var(--rubrik-ocker-bg); --rb-fg: var(--rubrik-ocker-fg); }
.rubrik.farbe-rose { --rb-bg: var(--rubrik-rose-bg); --rb-fg: var(--rubrik-rose-fg); }
.rubrik.farbe-violett { --rb-bg: var(--rubrik-violett-bg); --rb-fg: var(--rubrik-violett-fg); }
.rubrik.farbe-petrol { --rb-bg: var(--rubrik-petrol-bg); --rb-fg: var(--rubrik-petrol-fg); }
.rubrik.farbe-orange { --rb-bg: var(--rubrik-orange-bg); --rb-fg: var(--rubrik-orange-fg); }
.rubrik.farbe-grau { --rb-bg: var(--rubrik-grau-bg); --rb-fg: var(--rubrik-grau-fg); }
.meta .rubrik { margin-right: 6px; }
/* Short meta line of a card: Rubrik and date in normal case (homepage design 1b) */
.meta.meta-karte { gap: 8px; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 400; }
.meta.meta-karte .rubrik { margin-right: 0; padding: 2px 9px; font-size: 13px; font-weight: 400; line-height: 1.4; }

/* ---------- Homepage building blocks (2026-10) ---------- */
/* A column may hold several elements below each other */
.block-spalten .spalte { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.block-spalten.ausr-mitte { align-items: center; }
.block-spalten.ausr-unten { align-items: end; }
/* Heading of a post list with the link to all posts on the right; no margin of its own, .block-beitraege spaces with gap */
.block-titelzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.block-titelzeile h2 { margin: 0; font-size: var(--h3, 21px); }
.block-titelzeile a { font-size: 15px; font-weight: 600; color: var(--teal); text-decoration: none; white-space: nowrap; }
.block-titelzeile a:hover { color: var(--coral); }
/* Exactly three cards: one row of three */
.post-cards.post-cards--drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .post-cards.post-cards--drei { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .post-cards.post-cards--drei { grid-template-columns: 1fr; } }
/* Archive: date and title per line */
.post-archiv { list-style: none; margin: 0; padding: 0; }
.post-archiv a { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--border-soft); color: var(--ink); text-decoration: none; }
.post-archiv time { font-family: var(--mono); font-size: 12.5px; color: var(--meta); }
.post-archiv span { font-size: 17px; line-height: 1.35; }
.post-archiv a:hover span { color: var(--coral); }
@media (max-width: 860px) {
  .post-archiv a { grid-template-columns: 1fr; gap: 2px; }
}
/* "These zum Mitdenken": a dark card with a quote */
.these { margin: 0; padding: 28px; border-radius: 16px; background: var(--these-bg); color: var(--these-text); display: flex; flex-direction: column; gap: 14px; }
.these-label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--these-label); }
.these blockquote { margin: 0; font-family: var(--head-font, inherit); font-size: 22px; line-height: 1.4; font-style: italic; }
.these-link { font-size: 14px; font-weight: 600; color: var(--these-link); text-decoration: none; }
.these-link:hover { text-decoration: underline; color: var(--these-link); }
/* Rubrik tiles with the number of posts */
.rubrik-kacheln { display: flex; flex-direction: column; gap: 12px; }
.rubrik-kacheln ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rubrik-kacheln .rubrik { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; font-size: 16px; white-space: normal; }
.rk-zahl { font-family: var(--mono); font-size: 13px; font-weight: 400; }

/* ---------- About page: introduction and chapters (2026-10-26) ---------- */
/* Introduction: round portrait beside the opening text */
.vorstellung { display: flex; align-items: center; gap: 28px; }
.vorstellung > .ki-bild, .vorstellung > .vorstellung-bild { flex: none; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; }
.vorstellung-bild, .vorstellung .ki-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vorstellung .prose { min-width: 0; }
.vorstellung .prose h1 { margin: 0 0 8px; font-size: clamp(32px, 3.6vw, 44px); font-weight: 600; }
.vorstellung .prose h1 + p { font-size: 20px; color: var(--text-2); }

/* Chapter: number and title on the left, text on the right. Each chapter is a
   block of its own; equal columns make consecutive ones read as one grid. */
.kapitel { display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: 48px; }
.baustein.b-kapitel + .baustein.b-kapitel { margin-top: 12px; }
.baustein.b-vorstellung + .baustein.b-kapitel,
.baustein.b-kapitel + .baustein.b-kapitel:has(.kapitel-fussnote) { margin-top: 20px; }
.kapitel-label { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; font-family: var(--akzent-font); }
.kapitel-nr { font-size: 13px; font-weight: 600; color: var(--teal); }
.kapitel-label h2 { margin: 0; font-family: var(--akzent-font); font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.kapitel-inhalt { min-width: 0; }
.kapitel-inhalt.hat-bild { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; align-items: start; }
.kapitel-text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
/* Chapter text at least 18 px, as in the design – a smaller base size elsewhere stays */
.kapitel:not(.kapitel-fussnote) .prose { font-size: max(var(--text-size, 18px), 18px); line-height: 1.75; }
.kapitel-etiketten { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--akzent-font); font-size: 16px; }
.kapitel-etiketten li { padding: 7px 14px; border-radius: 999px; background: var(--rubrik-gruen-bg); color: var(--rubrik-gruen-fg); }
.kapitel-bild { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.kapitel-bild img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.kapitel-bild figcaption { font-size: 14px; font-style: italic; color: var(--muted-2); }
/* Key sentence (### in a chapter) and closing sentence (a paragraph bold as a whole) */
.kapitel .prose h3 {
  margin: 0; font-family: var(--akzent-font); font-size: clamp(28px, 3vw, 38px); line-height: 1.15;
  font-weight: 700; letter-spacing: -0.01em; color: var(--ink);
}
.kapitel .prose p.betont { font-size: 22px; line-height: 1.5; font-weight: 600; color: var(--ink); text-wrap: balance; }
/* Highlights in a chapter are a marker stroke, as in headings (site.js leaves them to CSS) */
.kapitel .prose mark.hl { padding: 0 0.04em; border-radius: 0; }
.kapitel .prose mark.hl-y { background: linear-gradient(transparent 58%, var(--hl-y) 58%); }
.kapitel .prose mark.hl-g { background: linear-gradient(transparent 58%, var(--hl-g) 58%); }
.kapitel .prose mark.hl-p { background: linear-gradient(transparent 58%, var(--hl-p) 58%); }
/* Footnote: no number, small label, dashed line above, smaller italic text */
.kapitel-fussnote { border-top: 1px dashed var(--border); padding-top: 24px; }
.kapitel-marke { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--rubrik-ocker-fg); }
.kapitel-fussnote .prose { font-size: 16px; line-height: 1.65; font-style: italic; color: var(--muted); }

@media (max-width: 860px) {
  .vorstellung { flex-direction: column; align-items: flex-start; gap: 18px; }
  .kapitel { grid-template-columns: 1fr; row-gap: 10px; }
  .kapitel-inhalt.hat-bild { grid-template-columns: 1fr; }
  .kapitel-bild { max-width: 260px; }
}

/* Post in the magazine view (2026-11-21, draft "D" of the client; Design →
   Beitragsliste → Beitragsansicht). Title and standfirst lie on the title
   image, the chapters sit in a card on the left that sticks below the bar,
   the chapter headings carry their number, key sentences (==…== on a line of
   their own) become a break, and at the end come the previous and the next
   post. The scrim over the image stays dark in both appearances: it sits on
   a photo, not on the page. */
.beitrag-magazin {
  --bm-scrim: rgba(8, 24, 46, 0.92);
  --bm-scrim-mitte: rgba(8, 24, 46, 0.78);
  --bm-karte-breite: 260px;
  display: flex; flex-direction: column; gap: 36px; color: var(--ink-2);
}
.bm-aufmacher {
  position: relative; overflow: hidden; border-radius: var(--radius-panel, 26px);
  min-height: 480px; display: flex; align-items: flex-end; background: #0c2a4a;
  width: 100%; max-width: calc(var(--bm-karte-breite) + 44px + var(--reading-width)); margin-inline: auto;
}
.bm-bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bm-aufmacher > .ki-hinweis { top: 14px; right: 14px; bottom: auto; }
.bm-kopf {
  position: relative; width: 100%; display: flex; flex-direction: column; gap: 14px;
  padding: 150px clamp(24px, 5vw, 52px) clamp(26px, 4vw, 44px);
  background: linear-gradient(to top, var(--bm-scrim) 0%, var(--bm-scrim-mitte) 50%, rgba(8, 24, 46, 0) 100%);
}
.bm-aufmacher.ohne-bild { min-height: 0; }
.bm-aufmacher.ohne-bild .bm-kopf { padding-top: clamp(32px, 5vw, 56px); background: none; }
.bm-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #d6e2ee;
}
.bm-textsorte {
  padding: 3px 10px; border-radius: 6px; background: #ffffff; color: #0c2a4a; font-weight: 600; letter-spacing: 0.08em;
}
.bm-meta .rubrik { letter-spacing: 0.02em; text-transform: none; }
.bm-angaben { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.beitrag-magazin .bm-titel { margin: 0; max-width: 900px; color: #ffffff; text-wrap: balance; }
.bm-vorspann {
  margin: 0; max-width: 720px; font-size: calc(var(--text-size) + 3px); line-height: 1.5; color: #e3ebf3;
}

.bm-raster {
  display: grid; grid-template-columns: minmax(0, var(--reading-width)); justify-content: center;
  gap: 44px; align-items: start;
}
.mit-kapiteln .bm-raster { grid-template-columns: var(--bm-karte-breite) minmax(0, var(--reading-width)); }
.bm-text { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* Chapter card: sticks below the bar (--leiste-unten comes from site.js) */
.bm-kapitel {
  position: sticky; top: calc(var(--leiste-unten, 0px) + 20px);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 20px;
  padding: 20px 18px; font-size: 15px; line-height: 1.35;
}
.bm-kapitel-stand { margin: 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.bm-kapitel-balken { height: 6px; border-radius: 3px; background: var(--border); margin: 10px 0 16px; overflow: hidden; }
.bm-kapitel-balken > span {
  display: block; height: 100%; width: 100%; border-radius: 3px; background: var(--coral);
  transform: scaleX(0); transform-origin: 0 50%;
}
.bm-kapitel-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.bm-kapitel-liste a {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none;
}
.bm-kapitel-liste a:hover { background: var(--panel); color: var(--ink); }
.bm-punkt {
  flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  border: 2px solid var(--border); box-sizing: border-box;
}
.bm-nr { flex: none; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.bm-kapitel-liste a.gelesen { color: var(--muted); }
.bm-kapitel-liste a.gelesen .bm-punkt { border: 0; background: var(--teal); }
.bm-kapitel-liste a[aria-current="true"] { background: var(--panel); color: var(--ink); font-weight: 600; }
.bm-kapitel-liste a[aria-current="true"] .bm-punkt { border-color: var(--coral); }
.bm-kapitel-liste a[aria-current="true"] .bm-nr { color: var(--coral); }
.bm-kapitel-kopf { display: none; }

/* Chapter headings with their number; the level is the highest one the post uses */
.beitrag-magazin .prose[data-kapitel-ebene] { counter-reset: bm-kapitel; }
.beitrag-magazin .prose[data-kapitel-ebene="2"] > h2,
.beitrag-magazin .prose[data-kapitel-ebene="3"] > h3,
.beitrag-magazin .prose[data-kapitel-ebene="4"] > h4 {
  counter-increment: bm-kapitel; display: flex; align-items: baseline; gap: 14px;
}
.beitrag-magazin .prose[data-kapitel-ebene="2"] > h2::before,
.beitrag-magazin .prose[data-kapitel-ebene="3"] > h3::before,
.beitrag-magazin .prose[data-kapitel-ebene="4"] > h4::before {
  content: counter(bm-kapitel, decimal-leading-zero);
  flex: none; font-size: 1.25em; line-height: 1; font-weight: 700; color: var(--coral);
}
.beitrag-magazin .prose :is(h2, h3, h4)[id] { scroll-margin-top: calc(var(--leiste-unten, 0px) + 24px); }

/* Key sentence: a highlight on a line of its own becomes a break */
.beitrag-magazin .prose p.merksatz {
  margin: 10px 0; padding: 24px 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--border);
  text-align: center; text-wrap: balance;
  font-family: var(--head-font); font-size: calc(var(--text-size) * 1.55); line-height: 1.25; font-weight: 600; color: var(--ink);
}
/* The highlight in it is a marker stroke, as in headings (site.js leaves it to CSS) */
.beitrag-magazin .prose p.merksatz mark.hl { padding: 0 0.04em; border-radius: 0; color: inherit; }
.beitrag-magazin .prose p.merksatz mark.hl-y { background: linear-gradient(transparent 58%, var(--hl-y) 58%); }
.beitrag-magazin .prose p.merksatz mark.hl-g { background: linear-gradient(transparent 58%, var(--hl-g) 58%); }
.beitrag-magazin .prose p.merksatz mark.hl-p { background: linear-gradient(transparent 58%, var(--hl-p) 58%); }

/* Read on: the previous and the next post */
.bm-weiter { margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
.bm-weiter-titel { margin: 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.bm-weiter-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.bm-weiter-karte {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--ink-2); text-decoration: none;
}
.bm-weiter-karte:hover { border-color: var(--teal); }
.bm-neuer { text-align: right; }
.bm-weiter-bild { position: relative; display: block; }
.bm-weiter-bild > img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.bm-weiter-inhalt { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 18px; }
.bm-richtung { font-size: 14px; font-weight: 600; color: var(--teal); }
.bm-weiter-name { font-family: var(--head-font); font-size: 19px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.bm-weiter-angaben { font-size: 13px; color: var(--muted); }
.bm-alle { align-self: center; padding: 10px 16px; font-size: 15px; font-weight: 600; }

@media (max-width: 860px) {
  .beitrag-magazin { gap: 24px; }
  /* On the phone the title sits below the image – on it there would be no room */
  .bm-aufmacher { min-height: 0; flex-direction: column; align-items: stretch; }
  .bm-bild { position: static; height: auto; aspect-ratio: 16 / 9; }
  .bm-kopf { padding: 20px 20px 24px; background: #0c2a4a; }
  .mit-kapiteln .bm-raster, .bm-raster { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* Chapter card: a bar that opens; without script the list just stays open */
  .bm-kapitel { position: static; padding: 4px 6px; }
  .bm-kapitel.klappbar .bm-kapitel-kopf {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 44px; padding: 8px 10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  }
  .bm-kapitel.klappbar .bm-stand-gross { display: none; }
  .bm-kapitel.klappbar .bm-kapitel-balken { margin: 0 10px 8px; }
  .bm-kapitel.klappbar:not(.offen) .bm-kapitel-liste { display: none; }
  .bm-pfeil { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; transition: transform 0.15s; }
  .bm-kapitel.offen .bm-pfeil { transform: rotate(-135deg); margin-top: 4px; }
  .beitrag-magazin .prose p.merksatz { font-size: calc(var(--text-size) * 1.3); }
}
