/* =====================================================================
   Stammbaum · Marke (Portal). Werte aus Skills/viel-liebe-design/REGELN.md (Manual v1.1).
   Die Farben kommen aus theme.js (CI v1.1: --bg-body, --bg-s1, --bg-s2, --text-primary,
   --text-secondary, --line, --kontur, --invers-*). Hier stehen sie nur als Rückfall mit
   Spezifität 0 (:where), damit theme.js immer gewinnt. Schriften liefert fonts/fonts.css.
   Rot gibt es nur im Logo. Unbounded nur ab 24 px, in Versalien.
   ===================================================================== */
:where(:root) {
  /* Rot gibt es nur im Logo (feste Datei in der Navigation), darum hier kein Rot-Token */
  /* Dunkel */
  --vl-black: #0A0708;
  --vl-ink: #141012;
  --vl-ink-2: #2A2A2A;
  --vl-ink-3: #3A3839;
  --fg-1: #F4F4F4;
  --fg-2: #B4B4AE;
  --fg-3: #8A8A84;
  /* Hell */
  --vl-bone: #F7F4F2;
  --vl-white: #FFFFFF;
  --vl-paper: #EDE8E5;
  --vl-stone: #B0ADAC;
  --vl-graphite: #5A5A56;
  --vl-graphite-2: #8A8A84;
  --vl-graphite-3: #A8A5A3;
  /* Schrift */
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Funnel Display", system-ui, sans-serif;
  /* Linien */
  --hairline-dark: 1px solid rgba(244, 244, 244, 0.12);
  --hairline-strong: 1px solid rgba(244, 244, 244, 0.20);
  --hairline-light: 1px solid rgba(10, 7, 8, 0.12);
  --hairline-contour: 1px solid #B0ADAC;
  /* Formen */
  --radius-sm: 8px;
  --radius-md: 20px;
  --radius-pill: 999px;
  /* Abstand */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  /* Bewegung */
  --ease-out: cubic-bezier(0.16, 1, 0.30, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 140ms; --dur-base: 280ms; --dur-slow: 520ms; --dur-cine: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sb-app {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; font-weight: 600; }
[hidden] { display: none !important; }
img, svg { display: block; }
.sb-icon, .sb-glyph { display: inline-block; vertical-align: middle; flex: none; }

/* Titel: Unbounded ExtraBold, Versalien, nur groß */
.sb-titel {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Kundenmodus: alles Interne weg */
body.kundenmodus [data-intern] { display: none !important; }
body:not(.kundenmodus) [data-nur-kunde] { display: none !important; }

/* Fokus sichtbar, nie rot */
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Hinweis nach Aktionen */
.sb-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: var(--invers-bg, #0A0708); color: var(--invers-fg, #F4F4F4); border: 1px solid var(--kontur, rgba(244, 244, 244, 0.20));
  font-weight: 600; font-size: var(--toast-size, var(--s-text, 17px));
  width: max-content; max-width: calc(100vw - 32px); text-align: center;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.sb-toast.an { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 719px) { .sb-toast { border-radius: 20px; } }

/* Auftritt wie auf vielliebe.de: aus der Unschärfe, 12 px nach oben */
@keyframes sb-auftritt { from { opacity: 0; filter: blur(8px); transform: translateY(12px); } to { opacity: 1; filter: blur(0); transform: none; } }
.sb-auftritt { animation: sb-auftritt var(--dur-cine) var(--ease-out) both; }

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

/* Satzspiegel: keine einzelnen Wörter in der letzten Zeile (REGELN.md, Typografie) */
h1, h2, h3, h4, .sb-titel { text-wrap: balance; }
p, li, dd, dt, figcaption, label, button, a, span { text-wrap: pretty; }

/* Suchfeld: kein browser-blaues Löschkreuz */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

/* Rückfall für die App-Namen aus theme.js (Werte Manual v1.1). theme.js (CI-Branch) setzt dieselben Namen. */
:where([data-theme="light"]) {
  --bg-body: #F7F4F2;  --bg-s1: #F7F4F2;  --bg-s2: #EDE8E5;  --bg-s3: #EDE8E5;
  --fg-1: #0A0708;  --text-primary: #0A0708;  --text-secondary: #5A5A56;  --text-tertiary: #8A8A84;
  --line: rgba(10, 7, 8, 0.12);  --border-subtle: rgba(10, 7, 8, 0.12);  --border-light: rgba(10, 7, 8, 0.12);
  --kontur: #B0ADAC;
  --btn-primary-bg: transparent;  --btn-primary-fg: #0A0708;  --btn-primary-line: #0A0708;
  --invers-bg: #0A0708;  --invers-fg: #F4F4F4;
}
/* Kein dunkles Theme: Stammbaum und Sammlung sind hell (Bauplan, REGELN.md). */
