/* ==========================================================================
   Spitex Suhrental Plus – zentrales Theme (alle Offerte-Seiten laden diese Datei)
   Quelle: Spitex Schweiz Corporate Design Manual, Version September 2026
   Farben: S. 11 (Basis, Abstufungen) und S. 22 (Webseite). Schrift: Inter (S. 10, S. 22).
   Layout-Idee: ruhige, dokumentartige Seite; ein Gradient nur im Kopfbereich.
   ========================================================================== */

:root {
  /* --- Manual-Grundfarben, S. 22 --- */
  --sx-blue: #1E5FAA;          /* Primär */
  --sx-green: #218355;         /* Sekundär (Web-Grün, nicht Print-Grün #219a62) */
  --sx-black: #383A42;         /* Text */
  --sx-white: #FFFFFF;
  --sx-slate: #4C6C93;         /* Dunkelgrau */
  --sx-blue-hover: #094372;    /* Hover Primär */
  --sx-green-hover: #0F5C36;   /* Hover Sekundär */
  --sx-ghost-hover: #DEE9F7;   /* Hover transparente Buttons */
  --sx-card: #EFF4FA;          /* Hintergrund Boxen/Cards */
  --sx-footer: #D1E0F3;        /* Hintergrund Footer */
  --sx-frame: #D1E0F3;         /* Rahmen */

  /* --- Abstufungen, S. 11 (nur für Grafiken und Verläufe) --- */
  --sx-darkblue: #094372;
  --sx-lightblue: #2d80d3;
  --sx-sky: #73ceea;           /* Sonderblau */
  --sx-darkgreen: #167244;
  --sx-lightgreen: #2cbf76;
  --sx-mint: #91f9b4;          /* Sondergrün */

  /* --- Semantische Tokens (Hell) --- */
  --bg: var(--sx-white);
  --surface: var(--sx-card);
  --fg: var(--sx-black);
  --fg-muted: var(--sx-slate);
  --heading: var(--sx-blue);
  --link: var(--sx-blue);
  --border: var(--sx-frame);
  --header-bg: rgb(255 255 255 / 0.88);
  --footer-bg: var(--sx-footer);
  --focus: var(--sx-blue-hover);
  --btn-primary-bg: var(--sx-blue);
  --btn-primary-fg: var(--sx-white);
  --btn-primary-hover: var(--sx-blue-hover);
  --btn-secondary-bg: var(--sx-green);
  --btn-secondary-fg: var(--sx-white);
  --btn-secondary-hover: var(--sx-green-hover);
  --btn-ghost-fg: var(--sx-blue);
  --btn-ghost-border: var(--sx-blue);
  --btn-ghost-hover: var(--sx-ghost-hover);
  --glass-bg: rgb(239 244 250 / 0.8);   /* S. 22: #EFF4FA, 80 %, Blur 30 px */
  --glass-fg: var(--sx-black);
  --on-accent: var(--sx-white);
  --pill-bg: var(--sx-ghost-hover);
  --pill-fg: var(--sx-blue-hover);
  --tag-r: var(--sx-darkblue);
  --tag-i: var(--sx-blue);
  --tag-a: var(--sx-slate);
  --tag-d: var(--sx-green);
  --tag-c: var(--sx-darkgreen);
  --grad-hero:
    radial-gradient(60% 90% at 96% 100%, var(--sx-mint) 0, transparent 62%),
    radial-gradient(55% 80% at 78% 10%, var(--sx-lightblue) 0, transparent 70%),
    radial-gradient(40% 70% at 100% 40%, var(--sx-sky) 0, transparent 70%),
    linear-gradient(110deg, var(--sx-darkblue) 0%, var(--sx-blue) 55%, var(--sx-lightblue) 100%);

  /* --- Typografie, S. 22 --- */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fw-light: 300;
  --fw-body: 400;               /* Empfehlung: Regular statt Light (Lesbarkeit). Manual: 300 */
  --fw-bold: 700;

  /* --- Form, S. 22 --- */
  --r-outer: 12px;              /* Cards, Boxen */
  --r-inner: 8px;               /* Buttons, Felder */
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 74rem;
  color-scheme: light;
}

/* Variante «weich»: Seitenhintergrund #EFF4FA, Cards weiss. Muss vor den Dunkel-Blöcken stehen. */
:root[data-surface="soft"] { --bg: var(--sx-card); --surface: var(--sx-white); }
:root[data-body="light"] { --fw-body: 300; }

/* --- Dunkel: nur Manual-Farben, Dunkelblau als Grund --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--sx-darkblue);
    --surface: rgb(239 244 250 / 0.09);
    --fg: var(--sx-card);
    --fg-muted: var(--sx-footer);
    --heading: var(--sx-white);
    --link: var(--sx-sky);
    --border: rgb(209 224 243 / 0.32);
    --header-bg: rgb(9 67 114 / 0.9);
    --footer-bg: rgb(239 244 250 / 0.12);
    --focus: var(--sx-sky);
    --btn-primary-bg: var(--sx-card);
    --btn-primary-fg: var(--sx-darkblue);
    --btn-primary-hover: var(--sx-ghost-hover);
    --btn-secondary-bg: var(--sx-mint);
    --btn-secondary-fg: var(--sx-green-hover);
    --btn-secondary-hover: var(--sx-card);
    --btn-ghost-fg: var(--sx-card);
    --btn-ghost-border: var(--sx-card);
    --btn-ghost-hover: rgb(239 244 250 / 0.14);
    --pill-bg: rgb(239 244 250 / 0.16);
    --pill-fg: var(--sx-card);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--sx-darkblue);
  --surface: rgb(239 244 250 / 0.09);
  --fg: var(--sx-card);
  --fg-muted: var(--sx-footer);
  --heading: var(--sx-white);
  --link: var(--sx-sky);
  --border: rgb(209 224 243 / 0.32);
  --header-bg: rgb(9 67 114 / 0.9);
  --footer-bg: rgb(239 244 250 / 0.12);
  --focus: var(--sx-sky);
  --btn-primary-bg: var(--sx-card);
  --btn-primary-fg: var(--sx-darkblue);
  --btn-primary-hover: var(--sx-ghost-hover);
  --btn-secondary-bg: var(--sx-mint);
  --btn-secondary-fg: var(--sx-green-hover);
  --btn-secondary-hover: var(--sx-card);
  --btn-ghost-fg: var(--sx-card);
  --btn-ghost-border: var(--sx-card);
  --btn-ghost-hover: rgb(239 244 250 / 0.14);
  --pill-bg: rgb(239 244 250 / 0.16);
  --pill-fg: var(--sx-card);
  color-scheme: dark;
}

/* ============================ Basis ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: var(--fw-body);
  font-size: 1.125rem;          /* 18 px */
  line-height: 1.556;           /* 28 px */
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--sx-sky); color: var(--sx-darkblue); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Typo-Skala, S. 22 (px-Werte gelten ab Desktop, darunter proportional) */
h1, h2, h3, h4 { margin: 0; text-wrap: balance; color: var(--heading); }
h1 { font-weight: var(--fw-light); font-size: clamp(2.25rem, 1.1rem + 4.4vw, 4rem); line-height: 1.19; letter-spacing: -0.023em; }
h2 { font-weight: var(--fw-light); font-size: clamp(2rem, 1.2rem + 3.2vw, 4rem); line-height: 1.19; letter-spacing: -0.023em; }
h3 { font-weight: var(--fw-light); font-size: clamp(1.375rem, 1.1rem + 1vw, 1.625rem); line-height: 1.46; letter-spacing: -0.02em; }
h4 { font-weight: var(--fw-bold); font-size: 1.25rem; line-height: 1.55; }
p { margin: 0; max-width: 68ch; }
.lead { font-weight: var(--fw-light); font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); line-height: 1.58; max-width: 60ch; }
.eyebrow { font-size: 0.8125rem; font-weight: var(--fw-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.muted { color: var(--fg-muted); }
.small { font-size: 0.9375rem; line-height: 1.5; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875em; font-variant-numeric: tabular-nums; }

/* Sprachwechsel DE/EN */
html:not([data-lang="en"]) .en { display: none !important; }
html[data-lang="en"] .de { display: none !important; }

/* ============================ Layout ============================ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack-lg { display: flex; flex-direction: column; gap: 2.5rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.section { padding-block: clamp(2rem, 5vw, 3.5rem); display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.section + .section { border-top: 1px solid var(--border); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.grid > * { min-width: 0; }

/* ============================ Kopf ============================ */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--border);
}
/* Keine Unterstreichung im Kopf: weder bei Links noch beim aktiven Reiter */
.site-header a, .site-header a:hover, .site-header a:focus-visible { text-decoration: none; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; padding-block: 0.5rem; min-height: 3.5rem; }
/* Reihenfolge: Logo und Name links, Reiter in der Mitte, Werkzeuge rechts */
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; text-decoration: none; color: var(--fg); }
@media (min-width: 56rem) { .brand { padding-right: 1.25rem; margin-right: 0.25rem; border-right: 1px solid var(--border); align-self: stretch; } }
.brand-logo + .brand-logo { padding-left: 0.75rem; border-left: 1px solid var(--border); }
.brand-mark {
  width: 3.25rem; height: 2.25rem; flex: none; display: grid; place-items: center;
  border: 1.5px dashed var(--fg-muted); border-radius: 6px; color: var(--fg-muted);
  font-size: 0.625rem; line-height: 1.1; text-align: center; font-weight: var(--fw-bold); letter-spacing: 0.04em;
}
.brand-name { font-weight: var(--fw-bold); font-size: 1rem; line-height: 1.2; color: var(--heading); }
.brand-sub { display: block; font-weight: var(--fw-body); font-size: 0.75rem; line-height: 1.3; color: var(--fg-muted); }
.header-tools { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.header-tools a:not(.btn) { color: var(--fg); font-size: 0.9375rem; font-weight: var(--fw-bold); padding: 0.375rem 0.75rem; border-radius: var(--r-inner); }
.header-tools a:not(.btn):hover { background: var(--btn-ghost-hover); color: var(--heading); }

.tabs { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; order: 3; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 56rem) { .tabs { flex: 0 1 auto; order: 0; margin: 0; padding: 0; } }
.tab {
  appearance: none; border: 0; background: transparent; color: var(--fg); cursor: pointer;
  font: inherit; font-size: 1rem; font-weight: var(--fw-bold); white-space: nowrap;
  padding: 0.5rem 1rem; border-radius: var(--r-inner);
}
.tab:hover { background: var(--btn-ghost-hover); }
.tab[aria-selected="true"] { color: var(--pill-fg); background: var(--pill-bg); }
[role="tabpanel"][hidden] { display: none !important; }

/* ============================ Kopfbereich mit Verlauf ============================ */
.hero { position: relative; isolation: isolate; overflow: hidden; background: url("media/aurora-loop-poster.jpg") center / cover no-repeat, var(--grad-hero); color: var(--sx-white); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 82%; z-index: -2; }
/* Abdunkelung mit Manual-Dunkelblau, damit weisse Schrift immer lesbar bleibt */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(5 42 72 / 0.82) 0%, rgb(5 42 72 / 0.74) 40%, rgb(5 42 72 / 0.25) 75%, rgb(5 42 72 / 0.05) 100%); }
@media (max-width: 56rem) { .hero::before { background: rgb(5 42 72 / 0.72); } }
.hero .container { padding-block: clamp(2rem, 6vw, 4rem); display: flex; flex-direction: column; gap: 1.25rem; }
.hero-pause { align-self: flex-start; background: rgb(239 244 250 / 0.16); color: var(--sx-white); border-color: var(--sx-white); }
.hero-pause:hover { background: rgb(239 244 250 / 0.3); color: var(--sx-white); }
.hero-pause[hidden] { display: none; }
/* Überall sonst, wo der Verlauf gebraucht wird: das Standbild, ohne Bewegung */
.still-gradient { background: url("media/aurora-loop-poster.jpg") center / cover no-repeat, var(--grad-hero); }
.hero h1 { color: var(--sx-white); }
.hero .lead { color: var(--sx-white); }
.hero .eyebrow { color: var(--sx-white); opacity: 0.92; }

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.5rem 1.25rem; cursor: pointer; text-decoration: none;
  font: inherit; font-size: 1rem; font-weight: var(--fw-bold); line-height: 1.25;
  border-radius: var(--r-inner); border: 2px solid transparent; transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-fg); }
.btn-secondary:hover { background: var(--btn-secondary-hover); }
.btn-secondary:hover { color: var(--btn-secondary-fg); }
:root:not([data-theme="dark"]) .btn-secondary:hover { color: var(--sx-white); }
.btn-ghost { background: transparent; color: var(--btn-ghost-fg); border-color: var(--btn-ghost-border); }
.btn-ghost:hover { background: var(--btn-ghost-hover); }
.btn-sm { min-height: 2.25rem; padding: 0.25rem 0.875rem; font-size: 0.9375rem; }
.btn[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--btn-primary-bg); color: var(--btn-primary-fg); border-color: var(--btn-primary-bg); }

.seg { display: inline-flex; border: 2px solid var(--btn-ghost-border); border-radius: var(--r-inner); overflow: hidden; }
.seg button { appearance: none; border: 0; background: transparent; color: var(--btn-ghost-fg); font: inherit; font-size: 0.9375rem; font-weight: var(--fw-bold); padding: 0.375rem 0.875rem; cursor: pointer; min-height: 2.25rem; }
.seg button:hover { background: var(--btn-ghost-hover); }
.seg button[aria-pressed="true"]:hover { background: var(--btn-primary-hover); }

/* ============================ Cards und Panels ============================ */
.card { background: var(--surface); border-radius: var(--r-outer); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.card-line { border: 1px solid var(--border); background: transparent; }
.glass { background: var(--glass-bg); color: var(--glass-fg); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border-radius: var(--r-outer); padding: 1.5rem; }
.glass h3, .glass h4 { color: var(--sx-blue); }
.pill { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.125rem 0.625rem; border-radius: 999px; font-size: 0.8125rem; font-weight: var(--fw-bold); background: var(--pill-bg); color: var(--pill-fg); white-space: nowrap; }
.note { border-left: 4px solid var(--sx-green); background: var(--surface); padding: 0.875rem 1rem; border-radius: 0 var(--r-inner) var(--r-inner) 0; font-size: 1rem; line-height: 1.5; }
:root[data-theme="dark"] .note { border-left-color: var(--sx-mint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note { border-left-color: var(--sx-mint); } }

/* ============================ Formulare ============================ */
.field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.field label, .legend { font-size: 1rem; font-weight: var(--fw-bold); }
.input {
  width: 100%; min-height: 2.75rem; padding: 0.5rem 0.875rem; font: inherit; font-size: 1rem; color: var(--fg);
  background: var(--bg); border: 1.5px solid var(--sx-slate); border-radius: var(--r-inner);
}
:root[data-theme="dark"] .input, :root[data-theme="dark"] select.input { background: var(--sx-darkblue); border-color: var(--sx-footer); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .input { background: var(--sx-darkblue); border-color: var(--sx-footer); } }
.input:hover { border-color: var(--heading); }
.check { display: flex; gap: 0.625rem; align-items: flex-start; font-size: 1rem; line-height: 1.45; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.125rem; accent-color: var(--sx-green); flex: none; }
.form-msg { font-size: 1rem; }

/* ============================ Tabellen und Listen ============================ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-outer); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.4; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); font-weight: var(--fw-bold); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ============================ Ticker (Feiertagsgruss) ============================ */
.ticker { display: flex; align-items: center; gap: 0.75rem; background: var(--sx-blue); color: var(--sx-white); border-radius: var(--r-outer); padding: 0.5rem 0.5rem 0.5rem 1.25rem; overflow: hidden; }
:root[data-theme="dark"] .ticker { background: var(--sx-card); color: var(--sx-darkblue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ticker { background: var(--sx-card); color: var(--sx-darkblue); } }
.ticker-view { flex: 1; overflow: hidden; min-width: 0; mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); }
.ticker-track { display: inline-flex; white-space: nowrap; animation: ticker 32s linear infinite; }
.ticker-track span { padding-right: 4rem; font-weight: var(--fw-bold); }
.ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker .btn { background: transparent; color: inherit; border-color: currentColor; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ============================ Master/Detail (z. B. Stellen) ============================ */
.md { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .md { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1.5rem; } }
.md-list { display: flex; flex-direction: column; gap: 0.5rem; }
.md-item {
  appearance: none; text-align: left; font: inherit; color: var(--fg); cursor: pointer;
  background: var(--surface); border: 2px solid transparent; border-radius: var(--r-inner);
  padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.125rem; min-width: 0;
}
.md-item:hover { border-color: var(--border); }
.md-item[aria-pressed="true"] { border-color: var(--sx-green); background: var(--bg); }
:root[data-theme="dark"] .md-item[aria-pressed="true"] { border-color: var(--sx-mint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .md-item[aria-pressed="true"] { border-color: var(--sx-mint); } }
.md-item strong { font-size: 1rem; line-height: 1.35; }
.md-item span { font-size: 0.875rem; color: var(--fg-muted); }
.md-detail { background: var(--surface); border-radius: var(--r-outer); padding: clamp(1.25rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.md-detail ul { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.375rem; }

/* ============================ Fuss ============================ */
/* Fester Fuss, 15 mm hoch, immer sichtbar. Der Zurück-Knopf sitzt rechts darin (siehe theme.js). */
.site-footer {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(15mm + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; align-items: center; gap: 1rem;
  padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  background-color: var(--bg); background-image: linear-gradient(var(--footer-bg), var(--footer-bg));
  border-top: 1px solid var(--border); font-size: 0.875rem; line-height: 1.3;
}
.site-footer > .container { flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 0.25rem 1.5rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; font-size: inherit; }
.site-footer > .container::-webkit-scrollbar { display: none; }
.site-footer a { text-decoration: none; color: var(--fg); }
.site-footer a:hover { color: var(--heading); }
.site-footer .sx-back { flex: none; margin-left: auto; text-decoration: none; }
.site-footer .sx-back svg { width: 1em; height: 1em; flex: none; }
/* Platz schaffen, damit der feste Fuss nichts verdeckt */
body:has(.site-footer) { padding-bottom: calc(15mm + env(safe-area-inset-bottom, 0px)); }
html { scroll-padding-bottom: 15mm; }
@media print { .site-footer { position: static; height: auto; padding-block: 0.5rem; } body:has(.site-footer) { padding-bottom: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .ticker-track { animation: none !important; }
  .ticker-view { overflow-x: auto; }
}

/* Logo: Datei theme/media/logo.svg (oder .png) ablegen; ohne Datei erscheint der Platzhalter */
.brand-logo { height: 2.5rem; width: auto; max-width: 11rem; object-fit: contain; flex: none; }
.brand-logo[hidden] { display: none; }
/* Seiten mit breitem Hero-Text (Kennzahlen, lange Texte): gleichmässige Abdunkelung */
.hero.hero-calm::before { background: rgb(5 42 72 / 0.72); }

/* Dunkelmodus: das Logo hat schwarze Schrift und braucht eine weisse Fläche */
:root[data-theme="dark"] .brand-logo { background: var(--sx-white); padding: 0.25rem 0.5rem; border-radius: var(--r-inner); box-sizing: content-box; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background: var(--sx-white); padding: 0.25rem 0.5rem; border-radius: var(--r-inner); box-sizing: content-box; } }

/* ==========================================================================
   Mockup-Rahmen: schlanker Kopf und Fuss für die Entwurfsseiten
   (Sitemap, Einstieg, Tarife, Feedback, Verwalten, Vorher/Nachher).
   Wird von theme.js in [data-mock-header] und [data-mock-footer] gezeichnet.
   Gleiche Bausteine wie der Rest der Offerte: Reiter, Pillen, Rahmenlinie. Kein Verlauf (nur im Banner).
   ========================================================================== */
:root { --mock-h: 3.5rem; --mock-f: 2.5rem; }

.mock-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--header-bg); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border-bottom: 1px solid var(--border); }
.mock-header a, .mock-header a:hover { text-decoration: none; }
.mh { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; min-height: 3.5rem; padding-block: 0.375rem; }
.mh-brand { display: flex; align-items: center; border-radius: var(--r-inner); }
.mh-logo { display: block; height: 2.25rem; width: auto; max-width: 12rem; flex: none; object-fit: contain; }
.mh-nav { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; order: 3; flex: 1 1 100%; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 0.25rem; }
.mh-nav::-webkit-scrollbar { display: none; }
@media (min-width: 56rem) { .mh-nav { order: 0; flex: 0 1 auto; margin: 0 0 0 auto; padding: 0; } }
.mh-nav a { flex: none; display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0.25rem 0.875rem; border-radius: var(--r-inner); color: var(--fg); font-size: 0.9375rem; font-weight: var(--fw-bold); white-space: nowrap; }
.mh-nav a:hover { background: var(--btn-ghost-hover); color: var(--heading); }
.mh-nav a[aria-current="page"] { background: var(--pill-bg); color: var(--pill-fg); }
.mh-tools { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
@media (min-width: 56rem) { .mh-tools { margin-left: 0; } }
.mh .seg button { min-height: 2rem; padding: 0.125rem 0.75rem; font-size: 0.875rem; }

/* «Zur Offerte» und der Zurück-Knopf der Preisseite: schmale Pille */
.mh-back, .site-header .header-tools .back-link {
  display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2rem; padding: 0.125rem 0.75rem 0.125rem 0.5rem;
  border: 0; border-radius: 999px; background: var(--pill-bg); color: var(--pill-fg); font: inherit; font-size: 0.875rem; font-weight: var(--fw-bold); line-height: 1.2; white-space: nowrap; cursor: pointer; text-decoration: none;
}
.mh-back:hover, .site-header .header-tools .back-link:hover { background: var(--sx-blue); color: var(--sx-white); text-decoration: none; }
:root[data-theme="dark"] .mh-back:hover, :root[data-theme="dark"] .site-header .header-tools .back-link:hover { background: var(--sx-card); color: var(--sx-darkblue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mh-back:hover, :root:not([data-theme="light"]) .site-header .header-tools .back-link:hover { background: var(--sx-card); color: var(--sx-darkblue); } }
.mh-back svg { width: 0.875rem; height: 0.875rem; flex: none; }
@media (max-width: 36rem) { .mh-back .mh-back-t, .site-header .header-tools .back-link .bl-t { display: none; } .mh-back { padding-inline: 0.5rem; } }

/* Fuss: eine ruhige Zeile. Links Hinweis, rechts «gebaut von» als kleines Logo. */
.mock-footer.site-footer { height: calc(var(--mock-f) + env(safe-area-inset-bottom, 0px)); gap: 1rem; font-size: 0.8125rem; }
.mf-note { color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 40rem) { .mf-note { display: none; } }
.mf-slot { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; min-width: 0; white-space: nowrap; }
.mf-slot:empty { display: none; }
.mf-slot .btn { min-height: 1.75rem; padding: 0.0625rem 0.625rem; font-size: 0.8125rem; border: 0; background: transparent; color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; }
.mf-slot .btn:hover { background: var(--btn-ghost-hover); text-decoration: underline; }
.mf-by { flex: none; display: flex; align-items: center; margin-left: auto; padding-left: 1rem; border-left: 1px solid var(--border); border-radius: 0; opacity: 1; transition: opacity .15s; }
.mf-slot:not(:empty) + .mf-by { margin-left: 0; }
.mf-by:hover { opacity: 1; }
.mf-by img { display: block; height: 1.25rem; width: 2.27rem; max-width: none; flex: none; }
:root[data-theme="dark"] .mf-by img, :root[data-theme="dark"] .mh-logo { background: var(--sx-white); padding: 0.1875rem 0.4375rem; border-radius: var(--r-inner); box-sizing: content-box; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mf-by img, :root:not([data-theme="light"]) .mh-logo { background: var(--sx-white); padding: 0.1875rem 0.4375rem; border-radius: var(--r-inner); box-sizing: content-box; } }

/* Abstände und Höhen der Seiten an die schlanken Streifen angleichen */
html.has-mock body:has(.site-footer) { padding-bottom: calc(var(--mock-f) + env(safe-area-inset-bottom, 0px)); }
html.has-mock { scroll-padding-bottom: var(--mock-f); scroll-padding-top: var(--mock-h); }
html.has-mock .home { height: calc(100svh - var(--mock-h) - var(--mock-f)); }
@media print { .mock-footer.site-footer { position: static; height: auto; } .mock-header { position: static; } }
