/* COOKIE Schulungstool: Grundlagen. Farben und Schrift wie in den Kursvideos (Petrol, Inter).
   Alle Bereiche im Glas-Stil: Lernbereich, Kasse, Anmeldung, Verkaufs- und Link-Seite (area-*). Ausnahme: das Backend. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.66c6e4088364.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --petrol: #00738b;
  --petrol-strong: #005a6d;
  --petrol-mist: #e1f0f3;
  --petrol-line: #b8d8df;
  --ink: #0b2a31;
  --ink-soft: #4a6168;
  --line: #d5e1e4;
  --hairline: rgba(11, 42, 49, .1);
  --hairline-strong: rgba(11, 42, 49, .2);
  --surface: #ffffff;
  --page: #f5f7f8;
  --danger: #b3261e;
  --danger-mist: #fbe9e7;
  --success: #1d7a4a;

  --font: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --shadow: 0 1px 2px rgba(11, 42, 49, .06), 0 10px 28px rgba(11, 42, 49, .07);
  --gutter: clamp(16px, 4vw, 40px);
  --content: 1240px;

  /* Glasflächen: durchscheinendes Weiß mit hellem Rand über dem Farbverlauf der Seite */
  --glass: rgba(255, 255, 255, .56);
  --glass-fill: linear-gradient(135deg, rgba(255, 255, 255, .74) 0%, rgba(255, 255, 255, .44) 100%);
  --glass-strong: rgba(255, 255, 255, .8);
  --glass-hover: rgba(255, 255, 255, .74);
  --glass-edge: rgba(255, 255, 255, .78);
  --glass-tile: rgba(255, 255, 255, .58);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(6, 40, 48, .04), 0 16px 40px -22px rgba(6, 40, 48, .28);
  --glass-shadow-lift: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 4px rgba(6, 40, 48, .05), 0 28px 52px -24px rgba(6, 40, 48, .38);
  --glass-blur: blur(20px) saturate(160%);
  --panel-blur: var(--glass-blur);
  --radius-glass: 22px;
}
/* Mobil: Karten ohne Weichzeichner (der Verlauf dahinter ist ohnehin weich), nur Kopfzeile und Menüs bleiben geblurrt */
@media (max-width: 640px) {
  :root {
    --glass: rgba(255, 255, 255, .62); --glass-fill: linear-gradient(135deg, rgba(255, 255, 255, .78) 0%, rgba(255, 255, 255, .52) 100%);
    --panel-blur: none; --radius-glass: 18px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(255, 255, 255, .94); --glass-fill: rgba(255, 255, 255, .94); --glass-strong: #fff; --glass-hover: #fff; --glass-tile: rgba(255, 255, 255, .9); }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  font-feature-settings: "cv11", "ss01";
}

body:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) {
  --radius-s: 12px; --radius-m: 16px; --radius-l: 24px;
  background: #edf4f5;
}
/* Farbverlauf hinter allen Glasflächen, fest im Fenster, damit beim Scrollen nichts neu gezeichnet wird */
body:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start)::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(46rem 34rem at 0% -8%, rgba(0, 115, 139, .22), transparent 70%),
    radial-gradient(42rem 36rem at 100% 0%, rgba(98, 200, 190, .5), transparent 70%),
    radial-gradient(38rem 30rem at 28% 58%, rgba(0, 115, 139, .12), transparent 70%),
    radial-gradient(50rem 34rem at 72% 110%, rgba(255, 196, 140, .5), transparent 70%),
    radial-gradient(30rem 26rem at -6% 88%, rgba(120, 208, 196, .32), transparent 70%);
}

img, svg, video { max-width: 100%; }

a { color: var(--petrol); text-underline-offset: .18em; }
a:hover { color: var(--petrol-strong); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: var(--text-2xl); font-weight: 750; }
h2 { font-size: var(--text-xl); font-weight: 700; }
h3 { font-size: var(--text-lg); font-weight: 650; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--petrol); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .6em 1.15em;
  font: inherit; font-weight: 600; font-size: var(--text-md); line-height: 1.2;
  border: 1.5px solid transparent; border-radius: var(--radius-s);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-strong); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--petrol); border-color: var(--petrol-line); }
.btn-secondary:hover { border-color: var(--petrol); color: var(--petrol-strong); }
.btn-quiet { background: transparent; color: var(--ink-soft); padding-left: .5em; padding-right: .5em; }
.btn-quiet:hover { color: var(--petrol); }
.btn-large { font-size: var(--text-lg); padding: .8em 1.4em; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Schaltflächen im Glas-Stil */
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .btn {
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s, color .2s;
}
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .btn-primary {
  background: linear-gradient(135deg, #00809b 0%, var(--petrol) 50%, var(--petrol-strong) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 22px -12px rgba(0, 90, 109, .7);
}
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .btn-primary:hover {
  background: linear-gradient(135deg, #007891 0%, var(--petrol-strong) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 14px 26px -12px rgba(0, 90, 109, .8);
}
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .btn-secondary {
  background: var(--glass-strong); border: 1px solid var(--glass-edge); color: var(--petrol-strong);
  box-shadow: 0 1px 2px rgba(6, 40, 48, .05), 0 8px 18px -12px rgba(6, 40, 48, .3);
}
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .btn-secondary:hover { background: #fff; border-color: var(--petrol-line); }
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .btn-quiet { border-radius: var(--radius-s); }
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .btn-quiet:hover { background: rgba(255, 255, 255, .7); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) :is(.btn-primary, .btn-secondary):hover { transform: translateY(-1px); }
}

/* Kopfzeile: schwebende Glasleiste */
.topbar { position: sticky; top: 0; z-index: 20; padding-top: 10px; }
.topbar-inner {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 8px 8px 18px;
  background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: 18px;
  box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { height: 28px; width: auto; display: block; }
.topbar-nav { display: flex; gap: 4px; margin-left: 10px; }
.topbar-nav a {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px;
  color: var(--ink-soft); font-weight: 600; font-size: var(--text-sm); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.topbar-nav svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.topbar-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.topbar-nav a.is-active { color: var(--petrol-strong); background: #fff; box-shadow: 0 1px 2px rgba(6, 40, 48, .06), 0 6px 14px -8px rgba(6, 40, 48, .28); }
.topbar-spacer { flex: 1; }
.account { display: flex; align-items: center; gap: 4px; }
.account form { margin: 0; }
.topbar .btn-quiet, .topbar .btn-secondary { border-radius: 10px; }
.btn-logout svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Mobil: Logo links, Kurse, Suche und Abmelden als Symbole rechts */
@media (max-width: 640px) {
  .topbar { padding-top: 8px; }
  .topbar-inner { gap: 4px; min-height: 58px; padding: 6px 6px 6px 14px; border-radius: 16px; }
  .topbar-nav { order: 2; margin-left: 0; }
  .topbar-nav a { width: 44px; padding: 0; justify-content: center; }
  .topbar-nav svg { width: 20px; height: 20px; }
  .topbar-nav .nav-label, .btn-logout .btn-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .account { order: 4; }
  .btn-logout { width: 44px; padding: 0; }
  .btn-logout svg { width: 20px; height: 20px; }
}

/* Meldungen: ganze Box mit Fläche und Rahmen */
.messages { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.msg {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--petrol-line); border-radius: var(--radius-m);
  background: var(--petrol-mist); font-size: var(--text-sm);
}
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .msg {
  background: var(--glass-strong); border-color: var(--glass-edge); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--panel-blur); backdrop-filter: var(--panel-blur);
}
.msg::before {
  content: "i"; flex: none; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--petrol); color: #fff; font-weight: 700; font-size: var(--text-xs);
}
.msg-success::before { content: "✓"; }
.msg-error, :where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) .msg-error { background: rgba(251, 233, 231, .9); border-color: #f1b8b2; }
.msg-error::before { content: "!"; background: var(--danger); }

/* Fußzeile: Glasleiste, links die Rechtstexte, rechts der Absender, darunter der Hinweis.
   Breit: alles in einer Zeile auf einer Grundlinie, der Hinweis mittig. Mobil untereinander,
   Text der Links, des Absenders und des Hinweises auf einer gemeinsamen linken Kante. */
.footer { padding: 0 0 24px; margin-top: 56px; color: var(--ink-soft); font-size: var(--text-sm); }
.footer-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 24px;
  padding: 12px 22px 14px 12px; border: 1px solid var(--glass-edge); border-radius: var(--radius-glass);
  background: var(--glass); box-shadow: var(--glass-shadow);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.footer-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: calc(var(--radius-glass) - 12px);
  color: var(--ink-soft); font-weight: 500; text-decoration: none; transition: background-color .2s, color .2s;
}
.footer-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.footer-agency { margin: 0; text-align: right; }
.footer-agency a { color: var(--petrol-strong); font-weight: 650; text-decoration: none; }
.footer-agency a:hover { color: var(--petrol); text-decoration: underline; text-underline-offset: .2em; }
.footer-note {
  grid-column: 1 / -1; margin: 8px 0 0 10px; padding-top: 10px;
  border-top: 1px solid var(--hairline); font-size: var(--text-xs);
}
@media (min-width: 1200px) {
  /* Gleich breite Außenspalten und symmetrisches Padding, damit der Hinweis genau in der Mitte steht */
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; padding: 12px; }
  .footer-note { grid-area: 1 / 2; margin: 0; padding: 0; border: 0; text-align: center; }
  .footer-agency { grid-area: 1 / 3; padding-right: 10px; }
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); padding: 8px 12px 14px 8px; }
  .footer-nav a { min-height: 44px; }
  /* Absender in einer Zeile */
  .footer-agency { margin: 4px 0 0 10px; text-align: left; font-size: var(--text-xs); white-space: nowrap; }
}
/* Sehr schmale Geräte: Schrift in ganzen Pixelstufen kleiner, damit der Absender in die Karte passt */
@media (max-width: 360px) {
  .footer-nav { display: grid; grid-template-columns: repeat(2, max-content); }
  .footer-agency, .footer-note { font-size: .6875rem; }
}
@media (max-width: 335px) {
  .footer-agency, .footer-note { font-size: .625rem; }
}

/* Formulare */
label { font-weight: 600; font-size: var(--text-sm); }
input[type="email"], input[type="text"], input[type="password"], input[type="search"],
select, textarea {
  width: 100%; min-height: 44px; padding: .55em .8em;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
}
input:focus, select:focus, textarea:focus { border-color: var(--petrol); outline: none; box-shadow: 0 0 0 3px var(--petrol-mist); }
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) :is(input[type="email"], input[type="text"], input[type="password"], input[type="search"], select, textarea) {
  background-color: rgba(255, 255, 255, .72); border: 1px solid rgba(11, 42, 49, .14);
}
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) :is(input[type="email"], input[type="text"], input[type="password"], input[type="search"], textarea) { -webkit-appearance: none; appearance: none; }
:where(.area-learning, .area-shop, .area-auth, .area-sales, .area-start) :is(input, select, textarea):focus { background-color: #fff; border-color: var(--petrol); box-shadow: 0 0 0 4px rgba(0, 115, 139, .16); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: var(--text-sm); }
.field-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--petrol); }
.field-check label { font-weight: 400; }
.errorlist { list-style: none; padding: 0; margin: 0; color: var(--danger); font-size: var(--text-sm); }
.errorlist.nonfield { margin-bottom: 16px; }
.helptext { color: var(--ink-soft); font-size: var(--text-xs); }

/* Anmeldung und schmale Seiten */
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px var(--gutter); }
.auth-card {
  width: 100%; max-width: 440px; background: var(--glass-strong);
  border: 1px solid var(--glass-edge); border-radius: 28px; padding: 32px clamp(20px, 5vw, 36px);
  box-shadow: var(--glass-shadow-lift); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.auth-head { margin-bottom: 24px; }
.auth-head img { height: 32px; width: auto; }
.auth-card h1 { font-size: var(--text-xl); margin-top: 20px; }
.auth-card p { color: var(--ink-soft); }
.auth-card form p { margin-bottom: 16px; }
.auth-card form p label { display: block; margin-bottom: 6px; }
.auth-card form button { width: 100%; }
.auth-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: var(--text-sm); }
.auth-panel { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.auth-panel h2 { font-size: var(--text-lg); margin-bottom: 4px; }
.auth-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 12px; }

/* Statusanzeige einer Lektion */
.state {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--petrol-line); display: grid; place-items: center; background: var(--surface);
}
.state-started { border-color: var(--petrol); background: conic-gradient(var(--petrol) var(--p, 30%), var(--surface) 0); }
.state-done { border-color: var(--petrol); background: var(--petrol); }
.state-done::after {
  content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
}

/* Kursfortschritt als Kette der Lektionen, gruppiert nach Modulen */
.chain { display: flex; gap: 6px; align-items: stretch; margin: 12px 0 0; padding: 0; }
.chain-module { display: flex; gap: 2px; flex: var(--n, 1) 1 0; min-width: 0; }
.chain a, .chain span {
  flex: 1 1 0; height: 12px; border-radius: 4px; background: rgba(0, 115, 139, .16); min-width: 4px;
}
.chain .is-started { background: linear-gradient(90deg, var(--petrol) 50%, rgba(0, 115, 139, .16) 50%); }
.chain .is-done { background: linear-gradient(180deg, #0a8ba6, var(--petrol)); }
.chain a:hover, .chain a:focus-visible { transform: scaleY(1.5); }
.chain .is-current { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Schmale Bildschirme: dünnere Segmente, damit auch 50 und mehr Lektionen in die Zeile passen */
@media (max-width: 640px) {
  .chain { gap: 4px; }
  .chain-module { gap: 1px; }
  .chain a, .chain span { min-width: 2px; border-radius: 2px; }
}

/* Zwei Buttons nebeneinander: gleiche Breite (die des längeren) und gleiche Höhe, schmal untereinander */
.btn-pair { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; width: fit-content; max-width: 100%; }
.btn-pair .btn { width: 100%; white-space: normal; text-align: center; }
@media (max-width: 480px) {
  .btn-pair, .auth-actions { grid-auto-flow: row; width: 100%; }
}

/* Platz für Inhalte unter festen Höhen */
.stack > * + * { margin-top: 16px; }

/* Kasse, Testzahlung, Danke-Seite */
.topbar-simple { position: static; }
.shop-main { padding-top: 32px; padding-bottom: 32px; }
.shop-main.narrow { max-width: 720px; }
.shop-title { font-size: var(--text-2xl); margin-bottom: 20px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.checkout-form, .checkout-summary, .shop-closed {
  background: var(--glass-fill); border: 1px solid var(--glass-edge); border-radius: var(--radius-l); padding: 24px clamp(18px, 4vw, 32px);
  box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--panel-blur); backdrop-filter: var(--panel-blur);
}
.checkout fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.checkout legend { font-weight: 700; font-size: var(--text-lg); margin-bottom: 14px; }
.checkout .field label { display: block; }
.has-error input, .has-error select { border-color: var(--danger); }
.bump-card {
  display: flex; gap: 14px; align-items: flex-start; cursor: pointer;
  border: 1.5px dashed var(--petrol); border-radius: var(--radius-m); background: rgba(225, 240, 243, .8); padding: 16px;
}
.bump-card input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--petrol); }
.bump-text { display: grid; gap: 4px; }
.bump-title { font-weight: 700; }
.bump-desc { color: var(--ink-soft); font-size: var(--text-sm); }
.checkout-submit { width: 100%; }
.checkout-note { color: var(--ink-soft); font-size: var(--text-sm); margin: 12px 0 0; }
.checkout-summary { position: sticky; top: 24px; }
.checkout-summary h2 { font-size: var(--text-lg); }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-md); padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.summary-phase { color: var(--petrol-strong); font-weight: 600; font-size: var(--text-sm); margin: 10px 0 0; }
.summary-points { margin: 16px 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: var(--text-sm); }
.summary-tax { color: var(--ink-soft); font-size: var(--text-xs); margin: 0; }
.summary-updates { color: var(--ink-soft); font-size: var(--text-xs); margin: 0 0 12px; }
.summary-dates { display: grid; gap: 8px; margin: 14px 0 0; }
.summary-dates div { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-sm); }
.summary-dates dt { color: var(--ink-soft); }
.summary-dates dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.checkout-account { margin: 0 0 14px; color: var(--ink-soft); font-size: var(--text-sm); overflow-wrap: anywhere; }
.test-banner {
  border: 1px solid #f0c36d; background: #fff6e0; color: #6b4a00; border-radius: var(--radius-m);
  padding: 12px 16px; font-weight: 600; font-size: var(--text-sm); margin-bottom: 20px;
}
.test-items { list-style: none; padding: 0; margin: 0 0 12px; }
.test-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.order-facts { display: grid; gap: 10px; margin: 28px 0 0; padding: 18px 20px; background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius-m); box-shadow: var(--glass-shadow); }
.order-facts div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 12px; }
.order-facts dt { color: var(--ink-soft); font-size: var(--text-sm); }
.order-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .checkout-summary { position: static; order: -1; }
}
@media (max-width: 480px) {
  .order-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.auth-hint { font-size: var(--text-sm); margin: 16px 0 0; }
.summary-line strong { white-space: nowrap; }

/* Hinweis auf die Agentur im Lernbereich (core/_agentur.html): Bild im Glasrahmen, Leistungen, zwei gleich große Buttons */
/* Steht das Bild neben dem Text, ist es mindestens so hoch wie der Text: Der Rahmen streckt sich auf die
   Zeilenhöhe, das Bild füllt ihn absolut und trägt selbst nichts zur Höhe bei */
.agency {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: stretch; gap: 8px 36px;
  margin-top: 28px; padding: 10px;
  background: linear-gradient(135deg, rgba(214, 238, 243, .9) 0%, rgba(255, 255, 255, .6) 48%, rgba(255, 228, 200, .7) 100%);
  border: 1px solid var(--glass-edge); border-radius: var(--radius-glass); box-shadow: var(--glass-shadow-lift);
  -webkit-backdrop-filter: var(--panel-blur); backdrop-filter: var(--panel-blur);
}
.dash > .agency { margin-top: 0; }
.agency-media, .agency-thumb { position: relative; display: block; min-height: 280px; }
.agency-media > img, .agency-thumb > img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  border-radius: calc(var(--radius-glass) - 10px); box-shadow: 0 18px 40px -24px rgba(6, 40, 48, .5);
}
.agency-badge {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .9);
  color: var(--ink); font-size: .8125rem; font-weight: 650; box-shadow: 0 10px 24px -12px rgba(6, 40, 48, .4);
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
}
.agency-badge img { display: block; height: 18px; width: auto; }
.agency-body { display: grid; gap: 10px; justify-items: start; align-content: center; padding: 24px 24px 24px 0; min-width: 0; }
.agency-eyebrow {
  margin: 0; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7);
  color: var(--petrol-strong); font-size: .8125rem; font-weight: 650;
}
.agency-title { margin: 4px 0 0; font-size: 1.75rem; font-weight: 750; letter-spacing: -.025em; line-height: 1.2; }
.agency-text { margin: 0; max-width: 52ch; color: var(--ink-soft); }
.agency-services { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; padding: 0; }
.agency-services li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); font-size: .8125rem; font-weight: 600;
}
.agency-services svg {
  width: 18px; height: 18px; padding: 3px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #00809b, var(--petrol-strong)); color: #fff;
  fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.agency-proof { margin: 2px 0 0; color: var(--ink-soft); font-size: .8125rem; }
.agency .btn { max-width: 100%; white-space: normal; text-align: center; }

.agency-compact { grid-template-columns: 128px minmax(0, 1fr); gap: 0 18px; }
.agency-thumb { min-height: 128px; }
.agency-compact .agency-body { gap: 6px; padding: 8px 8px 8px 0; }
.agency-compact .agency-title { margin: 0; font-size: 1.125rem; letter-spacing: -.01em; }
.agency-compact .agency-text { font-size: .9375rem; }
.agency-compact .btn { margin-top: 6px; }

@media (max-width: 860px) {
  /* Bild über dem Text: feste Bildproportion, Gesichter im oberen Drittel */
  .agency { grid-template-columns: minmax(0, 1fr); }
  .agency-media { min-height: 0; aspect-ratio: 16 / 9; }
  .agency-body { padding: 14px 12px 12px; }
  .agency-compact { grid-template-columns: 128px minmax(0, 1fr); }
  .agency-compact .agency-body { padding: 8px 8px 8px 0; }
}
@media (max-width: 480px) {
  .agency-title { font-size: 1.375rem; }
  .agency-actions { width: 100%; }
  /* Kompakte Karte: Bild neben Absender und Titel, Text und Button darunter über die ganze Breite */
  .agency-compact {
    grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "thumb eyebrow" "thumb title" "text text" "action action";
    gap: 4px 12px; padding: 12px;
  }
  .agency-compact .agency-body { display: contents; }
  .agency-compact .agency-thumb { grid-area: thumb; min-height: 76px; }
  .agency-compact .agency-thumb > img { border-radius: calc(var(--radius-glass) - 12px); }
  .agency-compact .agency-eyebrow { grid-area: eyebrow; justify-self: start; align-self: end; border-radius: 10px; }
  .agency-compact .agency-title { grid-area: title; align-self: start; font-size: 1.0625rem; }
  .agency-compact .agency-text { grid-area: text; margin-top: 8px; }
  .agency-compact .btn { grid-area: action; width: 100%; margin-top: 8px; }
}

/* Rechtstexte */
.legal { max-width: 820px; }
.legal-text { background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: var(--radius-l); padding: 28px clamp(18px, 4vw, 40px); box-shadow: var(--glass-shadow); }
.legal-text h1 { font-size: var(--text-2xl); hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 480px) { .legal-text h1 { font-size: var(--text-xl); } }
.legal-text h2 { font-size: var(--text-lg); margin-top: 28px; }
.legal-text p, .legal-text li { max-width: 70ch; overflow-wrap: anywhere; }
.legal-text ul { padding-left: 1.2em; display: grid; gap: 4px; margin: 0 0 1em; }
.legal-stand { color: var(--ink-soft); margin-bottom: 12px; }
.legal-actions { margin-bottom: 8px; }
.legal-archive { margin-top: 20px; font-size: var(--text-sm); }
.legal-archive h2 { font-size: var(--text-md); }
@media print {
  .topbar, .footer, .legal-actions, .legal-archive { display: none; }
  .legal-text { border: 0; padding: 0; box-shadow: none; background: none; }
  body.area-shop { background: #fff; }
  body::before { display: none; }
}
