/* ── Belong — Design System v3 (B1 Precision + B2 Depth) ──────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@500;700;800;900&family=Ubuntu:wght@400;500;700&family=Ubuntu+Mono:wght@400;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────────────────── */

:root {
  /* Grove Tokens · DS v3.2 (2026-09-06) — Grove v2 in Kraft: Weiß-Default +
     Forest-Rampe, Höhen-Grammatik (zwei Stufen), grün-neutrale Textrampe,
     Signalfarbe Koralle. Vorstufen: DS v3.1 (Display-Stufen, Overlay, Sage),
     DS v2.7 (E1 Grün-Trio, E2 D2-KI-Signatur), DS v2.6 (Grove-Palette,
     R1-Buttonmatrix, Motion-Stufen). Der v3.2-Block (Glass-Flächen,
     Mobil-Scale, Zähler-Badge, Ordnungskarte) steht am Dateiende.
     Der Versionsstempel steht an DREI Stellen deckungsgleich: DESIGN.md,
     static/design/tokens/colors.css und hier — der Guard test_ds_version_stamp
     vergleicht sie. Bei einem Release alle drei bewusst gemeinsam hochziehen. */
  /* Brand — Forest (structure). Grove palette: Forest/Apricot/Stone replaces Navy/Lime/Paper.
     Token NAMES kept (--navy/...) for back-compat → rebrand is a values-only edit. */
  --navy:           #0C2C2A;   /* Teal-Pine: structure / marketing panels / wordmark */
  --navy-mid:       #1E443E;   /* border/line on dark (forest-line) */
  --navy-deep:      #08201E;   /* deepest forest surface */
  --forest-panel:   #143733;   /* raised card on dark */

  /* Signature — KORALLE (Grove v2 §2 · §1.6). SIGNAL ONLY, nie Füllfläche.
     §4.3: volles Koralle als Text nur auf Forest; auf hell --coral-deep;
     auf hell sonst nur Marker/Dot/Kante. Koralle ist keine Button-Farbe.
     Muss mit tokens/colors.css deckungsgleich sein. */
  --coral:          #E0573F;
  --coral-deep:     #B93F2B;
  --coral-soft:     #F08268;
  --coral-faint:    #FBE3DC;
  --coral-border:   rgba(224,87,63,.30);
  --coral-wash:     rgba(224,87,63,.07);
  /* --lime* GESTRICHEN (auftrag-koralle-alias-aufloesung, 07.08.2026) — Begründung
     an der Definition in tokens/colors.css. --clay bleibt: unpräzise, aber ehrlich. */
  --clay:           var(--coral-deep);

  /* Surfaces — Stone, neutral-warm (no green cast) */
  --paper:          #EFEFEB;   /* app background */
  --bg:             #EFEFEB;   /* alias kept for existing rules */
  --bg1:            #F0EFE9;   /* section tint — between paper & bg2 */
  /* --bg2 / --on-dark: Werte siehe Grove-Block unten (§1.4 Cream entfaellt). */
  --stone-deep:     #E6E4DC;   /* zweite Surface-Stufe: gefüllte Hero-Kacheln, Vorlagen-Band */
  --surface:        #FFFFFF;   /* cards = pure white */

  /* Borders — firmer on light Stone */
  --border:         #DCDCD5;
  --border-mid:     #D2D2CB;
  --border-card:    rgba(12,44,42,.08); /* weiche Karten-Border auf Fotos/Surfaces */

  /* Text on light */
  --ink:            #26221E;   /* primary text on light */
  --text:           #26221E;   /* alias kept for existing rules */
  --text-secondary: #3E3A36;
  --text-muted:     #6F756B;   /* secondary / labels */
  --text-faint:     #8A8F86;

  /* Text on Forest */
  --on-dark-muted:  #8CA8A1;   /* Wert siehe Grove-Block unten */

  /* Semantic */
  --danger:         #C0392B;
  --danger-f:       #F7E2DF;

  /* Grün · Zusicherung (DS v2.7 · E1) — GENAU EIN Token-Trio (Fläche-Tint · Text ·
     Icon). „Grün = Anforderung erledigt": nur wo vorher Apricot stand + terminale
     Positiv-Zustände (Bereit für Versand, Zusage). Funktionsfarbe, nie Marken-/
     Marketing-Fläche, nie dekorativ. Muss mit tokens/colors.css deckungsgleich sein. */
  --verified:         #1A6B4A;                 /* Text + Icon (die eine Grün-Quelle) */
  --verified-surface: #DCEDE5;                 /* Fläche-Tint */
  --verified-border:  rgba(26,107,74,.25);     /* Grün-Kontur */
  /* KI-Fläche · D2-Signatur (DS v2.7 · E2) — Halbton zwischen Karten-Weiß (--surface)
     und Stone-Grund (--paper): ruhige „hier arbeitet KI"-Fläche. NIE Rein-Weiß, NIE
     voller Stone, kein Apricot-Tint. Muss mit tokens/colors.css deckungsgleich sein. */
  --surface-ki:       #F7F7F4;                 /* Stone-getöntes Off-White (D2-Fläche) */
  /* Back-compat: --success/--success-f aliasen aufs Trio — kein zweites Grün. */
  --success:        var(--verified);
  --success-f:      var(--verified-surface);

  /* Radius */
  --radius-xs:      2px;
  --radius-sm:      5px;    /* buttons / chips / inputs */
  --radius:         7px;    /* CTAs */
  --radius-lg:      12px;   /* cards / containers */
  --radius-xl:      18px;   /* marketing panels, Frame/Glass — Kai 04.09.2026: 18 (v2.6 hatte 16; Angleich an das Tokens-Bundle, R1 DS v3.1) */
  --radius-2xl:     24px;   /* Foto-Kacheln, Hero-/CTA-Karten (v2.6, R2) */

  /* Motion — v2.6 Stufen */
  --dur-fast:       0.12s;
  --dur:            0.18s;
  --dur-slow:       0.28s;
  --dur-reveal:     0.3s;
  --dur-stage:      0.6s;
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts — Schibsted Grotesk display, Ubuntu body/UI, Ubuntu Mono data/labels (final identity) */
  --font-display:   'Schibsted Grotesk', system-ui, sans-serif;
  --font-body:      'Ubuntu', -apple-system, system-ui, sans-serif;
  --font-mono:      'Ubuntu Mono', ui-monospace, monospace;

  /* Type scale */
  --text-xs:        10px;
  --text-sm:        12px;
  --text-base:      13px;
  --text-body:      14px;
  --text-label:     11px;

  /* Shadows: die frei bemessene v2.6-Stufenleiter ist mit DS v3.0 abgelöst —
     §1.3 kennt genau ZWEI Stufen (--shadow-object / --shadow-float, im
     Grove-Block unten). --shadow-sm/--shadow/--shadow-lg/--shadow-xl hängen
     dort daran. --shadow-inset ist ersatzlos entfallen: vertiefte Zonen sind
     ab Grove v2 eine --forest-mist-FLÄCHE, keine Mulde (§4.6). */
  --focus-ring:     0 0 0 2px var(--surface), 0 0 0 4px var(--navy-mid);

  /* Semantic brand aliases (FINAL naming) — prefer in new work; legacy --navy kept above */
  --forest:         var(--navy);
  --forest-deep:    var(--navy-deep);
  --forest-faint:   rgba(12,44,42,.03); /* Tint-Kreis illustrativer Icon-Discs — das Signal bleibt Signal/CTA (Kai 28.07.) */
  /* Signalfamilie: siehe --coral*-Block oben. Die Apricot-Übergangsaliasse
     (§2 „Migration") sind mit dem Grove-Release abgebaut. */
  --stone:          var(--paper);
  --signal:         var(--coral);
  --signal-hover:   var(--clay);
  --text-link:      var(--clay);

  /* Nav-Aktiv (DS v2.7 · Kai-Wort 21.07.): aktiv = Zustand, nie Apricot.
     Neutral/Forest — Cream-Marker auf Forest-Panel. Ein Token, beide Shells. */
  --nav-active-accent: var(--on-dark);

  /* ── DS v3.1 · Bewerber-App-Ergänzung (entscheid-grove-v31-bewerber-app §A)
     Spiegel von static/design/tokens/*.css — die ausführliche Begründung steht
     dort an der Definition; hier stehen dieselben Werte, weil die Jinja-Legacy-
     Seiten style.css allein laden. Beide Dateien müssen deckungsgleich sein
     (Guard: frontend/shared/ds-v31.test.js). ────────────────────────────── */

  /* Display-Stufen (§D4): drei Größen ÜBER der 10–14-px-App-Scale, Ausnahme
     für die Bewerber-App. Schibsted 700; Laufweite und Zeilenhöhe gehören zur
     Stufe. Mobilwerte in der Media-Query unter dem :root-Block. */
  --fs-display-1:       40px;
  --fs-display-2:       28px;
  --fs-display-3:       20px;
  --tracking-display-1: -0.055em;
  --tracking-display-2: -0.045em;
  --tracking-display-3: -0.025em;
  --leading-display-1:  1.03;
  --leading-display-2:  1.1;
  --leading-display-3:  1.2;

  /* Overlay (§D5): die vierte Höhenstufe, begrenzt auf fixierte Leisten und
     Sheets. Karten bleiben bei --shadow-object / --shadow-float. */
  --shadow-overlay:      0 -8px 24px rgba(12,44,42,.06);
  --shadow-overlay-down: 0 8px 24px rgba(12,44,42,.06);

  /* Sage (§H4): Kandidat #6FA090 riss die 3:1-Grenze gegen Weiß (2,96:1),
     nachgezogen auf #5D8D7C — Weiß 3,77:1, --forest-pale 3,22:1, Forest
     3,95:1. Vier Zustände, nie Button, nie Fläche > Pille, nie KI, nie Erfolg. */
  --sage:       #5D8D7C;
  --sage-faint: var(--forest-pale);

  /* Hero-Tint (§C4): VORLÄUFIG, Kai-Sichtung ausstehend; nur auf dunklen
     Hero-Karten. rgb(28,74,68) ist --forest-mid, Anteil .2 = Obergrenze. */
  --tint-hero: radial-gradient(circle at 92% 0%, rgba(28,74,68,.2), transparent 18rem);
}

/* DS v3.1 · Display-Stufen auf schmalem Gerät. Schwelle 860px = SCHMAL_Q aus
   frontend/shared/breakpoints.js; eine zweite Zahl gäbe es hier nicht. */
@media (max-width: 860px) {
  :root {
    --fs-display-1: 32px;
    --fs-display-2: 24px;
    --fs-display-3: 18px;
  }
}

/* DS v3.1 · Utility-Klassen. Spiegel von static/design/base.css. */
.display-1,
.display-2,
.display-3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}
.display-1 { font-size: var(--fs-display-1); letter-spacing: var(--tracking-display-1); line-height: var(--leading-display-1); }
.display-2 { font-size: var(--fs-display-2); letter-spacing: var(--tracking-display-2); line-height: var(--leading-display-2); }
.display-3 { font-size: var(--fs-display-3); letter-spacing: var(--tracking-display-3); line-height: var(--leading-display-3); }

/* nur fixierte Leisten und Sheets — nie Karten. Basisklasse trägt
   position: fixed selbst, damit Missbrauch laut scheitert. */
.overlay-blur {
  position: fixed;
  background: rgba(255,255,255,.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.overlay-blur--unten   { position: fixed; bottom: 0; left: 0; right: 0; box-shadow: var(--shadow-overlay); }
.overlay-blur--oben    { position: fixed; top: 0; left: 0; right: 0; box-shadow: var(--shadow-overlay-down); }
.overlay-blur--klebend       { position: sticky; top: 0; box-shadow: var(--shadow-overlay-down); }
.overlay-blur--klebend-unten { position: sticky; bottom: 0; box-shadow: var(--shadow-overlay); }

/* ============================================================
   GROVE v2 · VORSCHAU-LAYER (regel-grove-v2-entwurf §2 + §3)
   ------------------------------------------------------------
   Status: ENTWURF, nicht in Kraft. Nur auf Branch seat-b/grove-v2-preview.
   Deckungsgleich mit static/design/tokens/colors.css — dort steht der
   identische Block; beide Dateien sind die zwei Token-Quellen der App
   (style.css = Alt-Jinja-Flächen, tokens/colors.css = SPA + DS-Jinja).

   Bauprinzip: letztes :root der Datei. Definiert die neuen Grove-v2-
   Tokens und biegt die Alt-Tokens per Mapping §3 auf sie um. Rückbau =
   diesen einen Block löschen. Print/PDF unberührt (§5).
   ============================================================ */
:root {
  /* — Forest-Rampe (§2) — */
  --forest-mid:        #1C4A44;   /* Hover auf Forest, Sekundär-Icon/-Text, Focus-Ring */
  --forest-pale-deep:  #DCE9E2;   /* kräftigere Tint-Fläche: Wordmark-Band, Illu-Fills */
  --forest-pale:       #E7EFEB;   /* Pills, Chips, Highlight-Cards, Selected */
  --forest-mist:       #F3F7F5;   /* Section-Tint, Zebra, Sunken, Hover */

  /* — Linien (§2): ab Grove v2 Primärtokens, --border/--border-mid hängen daran — */
  --line:              #DCE3DF;
  --line-strong:       #C7D6CF;

  /* — Neutrals hell (§2) — */
  --surface-default:   #FFFFFF;   /* Default-Seitenfläche, ersetzt Stone */

  /* — Höhen-Grammatik (§1.3): GENAU ZWEI Stufen, forest-basiert, nie Schwarz.
       erhaben·Objekt → --shadow-object (Unterlagen-/Dokument-Karten, Dashboard-
         Kacheln, CV-/Profil-Vorschauen, TalentCard — Karten, die ein DING sind)
       erhaben·Float  → --shadow-float  (Modals, Dropdowns, Popovers, Auth-Karte)
       eben·Struktur  → KEIN Schatten   (Listen, Tabellen, Formulare, Settings,
         Filterleisten trennen per 1px --line)
       vertieft·Well  → KEIN Inset, sondern --forest-mist-Fläche (Leerzonen,
         Empty States) — §4.6: flach bleibt flach.
       Ausserhalb: nur Interaktions-Mechanik (Focus-Ringe, Schalter-/Slider-
       Knöpfe). Jede solche Fundstelle trägt einen Kommentar. — */
  --shadow-object:     0 8px 20px rgba(12,44,42,.10);
  --shadow-float:      0 1px 2px rgba(12,44,42,.06), 0 14px 34px rgba(12,44,42,.12);

  /* — Auf Forest (§2): Cream entfällt als on-dark-Text — */
  --on-forest:         #FFFFFF;
  --on-forest-muted:   #B8CBC5;
  --on-forest-eyebrow: #A9C2BA;
  --on-forest-line:    rgba(255,255,255,.17);

  /* ── Mapping alt → neu (§3) ────────────────────────────────────── */
  --forest-deep:   #071F1D;                 /* war #08201E */
  --navy-deep:     var(--forest-deep);
  --paper:         var(--surface-default);  /* Seitenhintergrund: Stone → Weiß */
  --bg:            var(--surface-default);
  --bg1:           var(--forest-mist);
  --bg2:           var(--forest-mist);
  --stone-deep:    var(--forest-pale);
  --border:        var(--line);
  --border-mid:    var(--line-strong);
  /* — Textrampe (§2/§3) — grün-neutral statt warm-grau. EINE Reihe:
       --ink → --text-secondary → --muted → --text-faint. §2 nennt die dritte
       Stufe --muted; --text-muted hängt als Bestandsname daran. */
  --ink:            #152321;                /* grünstichiges Schwarz, war #26221E */
  --text:           var(--ink);
  --text-secondary: #3E4A46;                /* war #3E3A36 (warm-grau) */
  --muted:          #66736E;                /* §2-Name der dritten Stufe */
  --text-muted:     var(--muted);           /* war #6F756B */
  --text-faint:     #8A9490;                /* war #8A8F86 */

  /* KI-Fläche (§3): #F7F7F4 wäre auf Weiß-Default quasi unsichtbar
     (Preview-Befund 1) → --forest-mist. KI-Semantik trägt Kante + D2 (§4.7). */
  --surface-ki:     var(--forest-mist);

  /* Maschinen-Betriebslicht (D3 · regel-d3-ki-signatur §0). Muss mit
     static/design/tokens/colors.css deckungsgleich bleiben. HARTE EINHEGUNG:
     nur Bewegungs-/Arbeitszustände (Abschlusspuls, Shimmer-Tint,
     Betriebslicht-Punkt) — nie Text, Button, Border, statische Fläche. */
  --ki-aktiv:       #009579;

  /* Deaktiviert (regel-d3-kartentypen §7.7). Muss mit
     static/design/tokens/colors.css deckungsgleich bleiben — die Jinja-Seiten
     laden nur diese Datei. */
  --disabled-opacity: .55;

  --on-dark:       var(--on-forest);        /* Cream → Weiß */
  --on-dark-muted: var(--on-forest-muted);

  /* Höhen-Mapping: die v2.6-Stufenleiter fällt auf die zwei Grove-Stufen.
     Bestandscode mit var(--shadow-lg) o.ä. landet damit automatisch richtig;
     neue Arbeit schreibt --shadow-object / --shadow-float. */
  --shadow-sm:     var(--shadow-object);
  --shadow:        var(--shadow-object);
  --shadow-lg:     var(--shadow-float);
  --shadow-xl:     var(--shadow-float);

  /* Focus-Ring auf --forest-mid (§4.4 Inputs) statt --navy-mid. */
  --focus-accent:  var(--forest-mid);
  --focus-ring:    0 0 0 2px var(--surface), 0 0 0 4px var(--forest-mid);
}

/* ── Reset ────────────────────────────────────────────────────────────────────── */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Global focus baseline ────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--navy-mid);
  outline-offset: 2px;
}
/* Inputs use a border+shadow system instead */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

/* ── Wordmark ──────────────────────────────────────────────────────────────────── */

/* Final wordmark rendered from belong-wordmark.svg via CSS mask (recolorable, monochrome).
   The literal "bel<em>o</em>ng" text stays in the HTML (a11y/SEO) but is hidden visually,
   so every existing .curriva-mark usage swaps to the real wordmark with one central edit. */
.curriva-mark {
  display: inline-block;
  font-size: 22px;                       /* per-instance font-size scales the mark */
  height: 1.05em;
  width: calc(1.05em * 3.252);           /* belong-wordmark.svg aspect ratio 4114:1265 */
  background-color: var(--navy);         /* wordmark color (Forest); recolor for dark bg */
  -webkit-mask: url('/static/belong-wordmark.svg') no-repeat left center / contain;
          mask: url('/static/belong-wordmark.svg') no-repeat left center / contain;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
}
.curriva-mark.light { background-color: var(--on-dark); }   /* cream on Forest */
.curriva-mark.large { font-size: 32px; }

/* ── App Header — B1 precision + B2 backdrop ─────────────────────────────────── */

.app-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header.static { position: static; }

/* B1's gold accent gradient — bottom edge */
.app-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--coral) 0%, var(--coral) 30%, transparent 70%);
  opacity: 0.5;
}

.header-left  { display: flex; align-items: center; gap: 20px; }
.header-right { display: flex; gap: 6px; align-items: center; }

.header-divider { width: 1px; height: 18px; background: var(--border); }

.header-context {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.header-logo img { height: 32px; width: auto; }

/* Nav links in header */
.app-header a {
  color: var(--text-muted);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
  white-space: nowrap;
}
.app-header a:hover {
  color: var(--navy);
  border-color: var(--border);
  background: var(--bg);
}
.app-header a.back-link { border-color: transparent; padding-left: 0; }
.app-header a.back-link:hover { border-color: transparent; background: none; color: var(--navy); }

/* ── B1 Monospace Tag Pill ───────────────────────────────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
}
.tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);  /* v2.6: Dot ist neutral — Apricot nur für echte Signale */
  flex-shrink: 0;
}
.tag.signal::before { background: var(--coral); }
.tag.gold { color: var(--coral); border-color: var(--coral-border); background: var(--coral-faint); }
.tag.navy { color: var(--navy); border-color: var(--border-mid); }

/* ── B1 Metrics Bar ──────────────────────────────────────────────────────────── */

.metrics-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
}

.metric {
  flex: 1;
  min-width: 120px;
  padding: 18px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.metric:first-child { padding-left: 0; }
.metric:last-child  { border-right: none; }

.metric-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.metric-val em { font-style: normal; color: var(--coral); }

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
}

/* ── B2 Bento Grid ───────────────────────────────────────────────────────────── */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.bento.cols-2 { grid-template-columns: repeat(2, 1fr); }
.bento.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Bento-Kachel = Dashboard-Kachel → Objekt-Karte (§1.3): sie repräsentiert
   ein Ding (eine Kennzahl, ein Modul), nicht eine Ordnung. Höhe konstant —
   der Hover hebt per transform, nicht per Höhenwechsel. */
.bcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-object);
  transition: transform 0.2s;
}
.bcard:hover {
  transform: translateY(-2px);
}
.bcard.wide  { grid-column: span 2; }
.bcard.tall  { grid-row: span 2; display: flex; flex-direction: column; }
.bcard.dark  { background: var(--navy); border-color: rgba(255,255,255,0.06); }

/* B2 Icon container inside bcard */
.bic {
  width: 36px; height: 36px;
  background: var(--coral-faint);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coral);
  margin-bottom: 16px;
  border: 1px solid var(--coral-border);
  flex-shrink: 0;
}
.bic.navy {
  background: rgba(12,44,42,0.07);
  border-color: rgba(12,44,42,0.12);
  color: var(--navy);
}

.bcard h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.bcard.dark h3 { color: #fff; }

.bcard p {
  font-size: var(--text-body);
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 300;
}
.bcard.dark p { color: rgba(255,255,255,0.45); }

/* B2 Quote card inside tall bcard */
.bcard-quote {
  margin-top: auto;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.bcard-quote blockquote {
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  color: var(--navy);
  line-height: 1.5;
}
.bcard-quote cite {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: normal;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ── B1 Hairline Feature Grid ────────────────────────────────────────────────── */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.feat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.fcard {
  background: var(--surface);
  padding: 28px 24px;
  transition: background 0.15s;
}
.fcard:hover { background: var(--bg2); }

/* ── Page Layout ─────────────────────────────────────────────────────────────── */

.page-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}
.page-main.narrow   { max-width: 680px; }
.page-main.wide     { max-width: 1160px; }
.page-main.centered { max-width: 540px; text-align: center; margin-top: 60px; }

.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.15;
}
.page-sub {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
  line-height: 1.65;
}

/* ── Cards ───────────────────────────────────────────────────────────────────── */

/* Grove v2 §1.3 (Border-first): auf Weiß-Default trennt die 1px-Linie.
   Schatten ist ab Grove v2 dritte Ebene (Modals, Dropdowns, Floats). */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
}

.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-header h3 {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

/* ── Form Elements ───────────────────────────────────────────────────────────── */

label {
  display: block;
  font-size: var(--text-label);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: var(--text-body);
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: auto;
  line-height: 1.5;
}
/* Grove v2 §4.4 (Inputs): Focus auf --forest-mid. Die Felder tragen schon
   Weiß + --border (→ --line), das Mapping zieht das mit. */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--forest-mid);
  box-shadow: var(--focus-ring);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; }

input:disabled, select:disabled, textarea:disabled {
  background: var(--bg);
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.field  { display: flex; flex-direction: column; gap: 4px; }
.field-group { display: grid; gap: 16px; }
.field-group.cols-2 { grid-template-columns: 1fr 1fr; }
.field-group.cols-3 { grid-template-columns: 2fr 1fr 2fr; }

@media (max-width: 580px) {
  .field-group.cols-2,
  .field-group.cols-3 { grid-template-columns: 1fr; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */

.btn-primary {
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.btn-primary:hover  { background: var(--navy-mid); border-color: var(--navy-mid); }
.btn-primary:active { transform: scale(0.97); }
/* §7.7 Disabled-Konvention (Variante B): das GANZE Element auf
   --disabled-opacity, keine eigene Farbe. Der frühere Graustufen-Grund
   (--text-muted) war genau die Extra-Farbe, die §7.7 ausschliesst — ein
   deaktivierter Primärknopf sah dort aus wie ein anderer Knopftyp. */
.btn-primary:disabled,
.btn-primary[disabled] { opacity: var(--disabled-opacity); cursor: default; }

/* Inverse — Primary auf Forest-Flächen (v2.6 R1: Apricot ist keine Button-Farbe) */
.btn-inverse {
  background: var(--on-dark);
  border: 1px solid var(--on-dark);
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-inverse:hover  { opacity: 0.9; }
.btn-inverse:active { transform: scale(0.97); }

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-secondary:hover  { border-color: var(--navy-mid); color: var(--navy); }
.btn-secondary:active { transform: scale(0.97); }

/* Keyboard focus — all button variants */
.btn-primary:focus-visible,
.btn-inverse:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Ghost — B1's btn-ghost */
.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: var(--text-base);
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-ghost:hover  { border-color: var(--border-mid); color: var(--navy); background: var(--bg2); }
.btn-ghost:active { transform: scale(0.97); }

/* ── Fixed Bottom Action Bar ─────────────────────────────────────────────────── */

.form-actions {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 12px 40px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  z-index: 40;
}

/* ── Flash / Alerts ──────────────────────────────────────────────────────────── */

.flash-error {
  background: var(--danger-f);
  color: var(--danger);
  border: 1px solid rgba(192,57,43,0.22);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

.flash-success {
  background: var(--success-f);
  color: var(--success);
  border: 1px solid rgba(26,107,74,0.22);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

/* ── Info Boxes ──────────────────────────────────────────────────────────────── */

.info-box {
  background: var(--coral-faint);
  border: 1px solid var(--coral-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.info-box strong { color: var(--navy); }

/* ── Toggle Switches ─────────────────────────────────────────────────────────── */

.toggles { display: flex; flex-direction: column; gap: 8px; }

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--surface);
}
.toggle-row:hover { border-color: var(--border-mid); background: var(--bg); }
/* Visually hidden, but still in tab order */
.toggle-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
/* Show focus ring on the label when checkbox is keyboard-focused */
.toggle-row input[type="checkbox"]:focus-visible ~ .toggle-switch {
  outline: 2px solid var(--navy-mid);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.toggle-switch {
  width: 34px; height: 18px;
  background: var(--border-mid);
  border-radius: 9px;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.18s;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.18s;
  /* Schalter-Knopf = Interaktions-Mechanik, keine Höhenstufe (§1.3 kennt zwei).
     Schwarz-Alpha auf Forest-Alpha gezogen (Grove: nie Schwarz). */
  box-shadow: 0 1px 3px rgba(12,44,42,0.22);
}
.toggle-row input:checked ~ .toggle-switch          { background: var(--navy-mid); }
.toggle-row input:checked ~ .toggle-switch::after   { transform: translateX(16px); }

.toggle-label { display: flex; flex-direction: column; gap: 2px; }
.toggle-label strong { font-size: var(--text-base); color: var(--navy); font-weight: 600; }
.toggle-label span   { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.4; }

/* ── Segmented Control ───────────────────────────────────────────────────────── */

.seg-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--bg);
}
.seg-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  transition: background-color 0.15s, color 0.15s;
  font-family: var(--font-body);
}
.seg-tab.active            { background: var(--navy); color: #fff; }
.seg-tab:hover:not(.active) { background: var(--surface); color: var(--navy); }
/* Focus-Ring (dokumentierte Ausnahme der Höhen-Grammatik) — §4.4: --forest-mid. */
.seg-tab:focus-visible     { outline: none; box-shadow: inset 0 0 0 2px var(--forest-mid); }

/* ── Readonly Block ──────────────────────────────────────────────────────────── */

.readonly-block {
  background: var(--coral-faint);
  border: 1px solid var(--coral-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.readonly-block p     { font-size: 13px; color: var(--navy); line-height: 1.7; }
.readonly-block .label {
  font-size: 10px;
  font-weight: 500;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

/* ── Entry List (profile edit) ───────────────────────────────────────────────── */

.entry-list { display: flex; flex-direction: column; gap: 8px; }

.entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  position: relative;
  transition: border-color 0.15s;
}
.entry:hover { border-color: var(--border-mid); }

.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.entry-grid.three { grid-template-columns: 1.5fr 1fr 2fr; }
@media (max-width: 600px) {
  .entry-grid, .entry-grid.three { grid-template-columns: 1fr; }
}

.entry-field { display: flex; flex-direction: column; gap: 3px; }
.entry-field label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.entry-field input { font-size: var(--text-base); padding: 6px 10px; }

.remove-btn {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.remove-btn:hover { color: var(--danger); background: var(--danger-f); }

.add-btn {
  margin-top: 8px;
  background: none;
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 12px;
  color: var(--navy-mid);
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s, color 0.15s;
  font-family: var(--font-body);
}
.add-btn:hover { border-color: var(--coral); color: var(--coral); border-style: solid; }

/* ── Tabs (profile edit) ─────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  gap: 0;
}
.tab-btn {
  padding: 10px 24px;
  font-size: var(--text-base);
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-bottom-color 0.15s;
  font-family: var(--font-body);
  white-space: nowrap;
}
.tab-btn.active { color: var(--navy); border-bottom-color: var(--coral); }
.tab-btn:hover:not(.active) { color: var(--navy); }
/* Focus-Ring (dokumentierte Ausnahme der Höhen-Grammatik) — §4.4: --forest-mid. */
.tab-btn:focus-visible { outline: none; box-shadow: inset 0 -2px 0 var(--forest-mid); }

.tab-panel        { display: none; }
.tab-panel.active { display: block; }

/* ── Loading Overlay ─────────────────────────────────────────────────────────── */

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed; inset: 0;
  background: rgba(8,32,30,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}
.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 40px; height: 40px;
  border: 2.5px solid rgba(255,255,255,0.12);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay p     { font-size: 15px; font-weight: 600; }
.loading-overlay small { color: rgba(255,255,255,0.45); font-size: var(--text-sm); margin-top: 6px; }

/* ── Plan / Status Badges ────────────────────────────────────────────────────── */

.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  text-decoration: none;
}
.plan-pill.trial  { color: var(--text-muted); border: 1px solid var(--border); background: var(--bg); }
.plan-pill.starter { color: var(--coral); border: 1px solid var(--coral-border); background: var(--coral-faint); }
.plan-pill.pro    { color: var(--navy); border: 1px solid var(--border-mid); background: var(--bg2); }
.plan-pill.agency { color: #fff; border: 1px solid var(--navy); background: var(--navy); }

/* ── Module Cards (Dashboard) ────────────────────────────────────────────────── */

/* Modul-Kachel (Dashboard) → Objekt-Karte (§1.3): ein Modul ist ein Ding.
   Höhe konstant, Hover hebt per transform + Kante. */
.module-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-object);
  transition: transform 0.18s, border-color 0.18s;
  position: relative;
  overflow: hidden;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--coral) 0%, var(--coral) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.18s;
}
.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-mid);
}
.module-card:hover::before { opacity: 1; }
.module-card.disabled {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.3);
}
.module-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.module-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

/* ── Upgrade Banner ──────────────────────────────────────────────────────────── */

.upgrade-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.upgrade-banner::before {
  content: '';
  position: absolute;
  top: -40%; right: -5%;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224,87,63,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.upgrade-banner h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.upgrade-banner p {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.5);
}

/* ── Utilities ───────────────────────────────────────────────────────────────── */

code, .mono {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg2);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.text-muted    { color: var(--text-muted); }
.text-gold     { color: var(--coral); }
.text-navy     { color: var(--navy); }
.text-mono     { font-family: var(--font-mono); }
.text-display  { font-family: var(--font-display); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .app-header { padding: 0 20px; }
  .metrics-bar { padding: 0 20px; }
  .form-actions { padding: 12px 20px; }
  .bento { grid-template-columns: 1fr; }
  .bento.cols-2 { grid-template-columns: 1fr; }
  .bcard.wide, .bcard.tall { grid-column: auto; grid-row: auto; }
  .feat-grid { grid-template-columns: 1fr; }
  .module-card { padding: 20px; }
}

@media (max-width: 480px) {
  .page-main { padding: 24px 16px 80px; }
  .card { padding: 20px; }
}

/* ── Reduced Motion ──────────────────────────────────────────────────────────── */

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

/* ── CV Preview — Split Layout ───────────────────────────────────────────────── */

.edit-shell {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 0;
  min-height: calc(100vh - 58px);
  align-items: start;
}

.edit-form-col {
  padding: 36px 28px 120px;
  border-right: 1px solid var(--border);
  min-height: calc(100vh - 58px);
}

.edit-preview-col {
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
}

/* Mobile: hide preview panel, full-width form */
@media (max-width: 860px) {
  .edit-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .edit-form-col {
    padding: 24px 16px 100px;
    border-right: none;
    min-height: auto;
  }
  .edit-preview-col { display: none; }
}

.preview-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.preview-col-header span {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted);
}
.preview-col-header .preview-tpl-name {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--navy);
}

.cv-preview-root {
  flex: 1;
  padding: 20px 16px 32px;
  overflow: hidden;
}

/* Paper container */
.cv-preview-inner { width: 100%; }
.cv-paper-sizer   { width: 100%; overflow: hidden; }
.cv-paper-wrap    {
  width: 595px;
  transform-origin: top left;
  transition: none;
  font-family: var(--font-body);
}
/* CV-Blatt in der Vorschau = CV-Vorschau → Objekt-Karte (§1.3). Der frei
   bemessene v2.6-Doppelschatten fällt auf die eine Objekt-Stufe. */
.cv-paper {
  width: 595px;
  min-height: 842px;
  background: #fff;
  box-shadow: var(--shadow-object);
  overflow: hidden;
  position: relative;
}

/* ── Preview zoom toolbar + A4 page guides ───────────────────────── */
.cv-zoombar {
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
}
.cv-zoombar button {
  width: 26px; height: 26px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; line-height: 1; color: var(--ink);
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.cv-zoombar button:hover { border-color: var(--navy-mid); }
.cv-zoombar button[data-z="fit"] {
  width: auto; padding: 0 10px; font-family: var(--font-body);
  font-weight: 600; font-size: 11px;
}
.cv-zoom-pct { min-width: 40px; }
.cv-page-count {
  margin-left: auto; padding: 3px 9px; border-radius: var(--radius-xs);
  background: var(--bg2); color: var(--text-muted); font-weight: 500;
}
.cv-page-count.warn { background: var(--coral-faint); color: var(--navy); }

/* Stacked A4 sheets (recruiter preview) */
.cv-sheet { margin: 0 0 18px; }
.cv-sheet:last-child { margin-bottom: 0; }

.cv-page-guides { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.cv-page-line {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed rgba(192, 57, 43, 0.55);
}
.cv-page-line span {
  position: absolute; right: 0; top: 2px;
  font-family: var(--font-mono); font-size: 9px; color: var(--danger);
  background: rgba(255, 255, 255, 0.88); padding: 0 4px; border-radius: 2px;
}

/* ── Classic template ────────────────────────────────────────────── */
.pv-classic-header {
  background: var(--navy);
  padding: 20px 24px 16px;
}
.pv-classic-name {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; color: #fff;
  line-height: 1.15; letter-spacing: -0.02em;
}
.pv-classic-gold-bar { height: 4px; background: var(--coral); }

.pv-info-band {
  display: flex; background: var(--bg2);
  padding: 8px 24px; gap: 28px;
  border-bottom: 1px solid var(--border);
}
.pv-info-label {
  font-size: 6.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--text-muted); margin-bottom: 2px;
}
.pv-info-val { font-size: 8.5px; font-weight: 500; color: var(--navy); }

.pv-body { padding: 12px 24px 0; }

.pv-section { margin-bottom: 11px; }
.pv-sec-title {
  font-size: 7px; font-weight: 700; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding-left: 8px; border-left: 2.5px solid var(--coral);
  margin-top: 10px; margin-bottom: 5px; line-height: 1.5;
}
.pv-sec-rule { display: none; }

.pv-body-text { font-size: 8px; color: var(--text-secondary); line-height: 1.62; }
.pv-placeholder { color: var(--text-faint) !important; font-style: italic; }

.pv-komps-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; margin-bottom: 2px;
}
.pv-komps-row span { font-size: 7.5px; color: var(--text-secondary); line-height: 1.5; }

.pv-bullet { font-size: 8px; color: var(--text-secondary); line-height: 1.62; }

.pv-exp-item { margin-bottom: 7px; padding-bottom: 7px; border-bottom: 0.5px solid var(--bg2); }
.pv-exp-item:last-child { border-bottom: none; padding-bottom: 0; }
.pv-exp-header {
  font-size: 8.5px; font-weight: 700; color: var(--navy);
  line-height: 1.3; display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.pv-exp-zeit { font-size: 7px; color: var(--text-muted); font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.pv-exp-desc { font-size: 7.5px; color: var(--text-secondary); line-height: 1.55; margin-top: 2px; }

.pv-edu-item {
  font-size: 8px; color: var(--text-secondary); line-height: 1.55;
  margin-bottom: 4px; display: flex; justify-content: space-between;
}

.pv-footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--navy); padding: 6px 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 6.5px; color: rgba(255,255,255,0.4);
}
.pv-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--coral);
}

/* ── Modern template ─────────────────────────────────────────────── */
.pv-modern { position: relative; min-height: 842px; background: #fff; }
.pv-modern-gold-top { height: 4px; background: var(--coral); }
.pv-modern-columns { display: flex; min-height: 828px; }

.pv-modern-sidebar {
  width: 208px; flex-shrink: 0;
  background: var(--navy);
  padding: 18px 15px 64px;
}
.pv-modern-name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 400; color: #fff;
  line-height: 1.28; margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.pv-modern-gold-rule { height: 2px; background: var(--coral); margin-bottom: 14px; }

.pv-sb-section { margin-bottom: 13px; }
.pv-sb-title {
  font-size: 6.5px; font-weight: 700; color: var(--coral);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 5px;
}
.pv-sb-rule { height: 0.5px; background: rgba(255,255,255,0.1); margin-bottom: 6px; }
.pv-sb-bullet { font-size: 7.5px; color: rgba(255,255,255,0.78); line-height: 1.5; margin-bottom: 3px; }

.pv-sidebar-lang { margin-bottom: 6px; }
.pv-sb-lang-name { font-size: 8px; font-weight: 600; color: #fff; line-height: 1.3; }
.pv-sb-lang-niv  { font-size: 7px; color: rgba(255,255,255,0.42); line-height: 1.3; margin-top: 1px; }

.pv-modern-main { flex: 1; padding: 16px 18px 64px; }
.pv-main-section { margin-bottom: 12px; }
.pv-main-sec-title {
  font-size: 6.5px; font-weight: 700; color: var(--coral);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px;
}
.pv-main-sec-rule { height: 0.5px; background: var(--coral); opacity: 0.35; margin-bottom: 7px; }
.pv-main-body { font-size: 8px; color: var(--text-secondary); line-height: 1.58; }

.pv-footer-modern { background: var(--navy); }

/* ── Executive template ──────────────────────────────────────────── */
.pv-executive { padding: 28px 28px 64px; min-height: 842px; position: relative; background: #fff; }
.pv-exec-header { margin-bottom: 8px; }
.pv-exec-name {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 400; color: var(--navy);
  line-height: 1.1; letter-spacing: -0.03em;
}
.pv-exec-gold-rule { height: 1.5px; background: var(--coral); margin: 10px 0 8px; }

.pv-exec-section { margin-bottom: 12px; margin-top: 14px; }
.pv-exec-sec-label {
  font-size: 6.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.11em; margin-bottom: 5px;
}
.pv-exec-sec-rule { height: 0.5px; background: var(--border-mid); margin-bottom: 9px; }
.pv-exec-body { font-size: 8.5px; color: var(--text-secondary); line-height: 1.68; }

.pv-footer-exec { background: var(--navy); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .edit-shell { grid-template-columns: 1fr; }
  .edit-preview-col { display: none; }
}

/* ── Resolve-Token — the recurring "aufbereitet von Belong" grammar ──────────── */
.resolve-token {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  display: inline-block;
  margin: 0 5px 6px 0;
}
.resolve-token.on-dark {
  color: #fff;
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  border-left-color: var(--coral);
}

/* ── Grounding-Meta-Row — closes a hero downward instead of an eyebrow on top ──── */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
}
.meta-row b { color: var(--text-secondary); font-weight: 700; }
.meta-row .dot { color: var(--coral); }
.meta-row.on-dark { color: var(--on-dark-muted); }
.meta-row.on-dark b { color: var(--on-dark); }

/* ── Metric-Bar — Ubuntu Mono numbers as substance (replaces label kickers) ──────── */
.mbar { display: flex; gap: 26px; }
.mbar .metric .n {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.mbar .metric .n em { font-style: normal; color: var(--coral); }
.mbar .metric .l {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
}
.mbar.on-dark .metric .n { color: #fff; }
.mbar.on-dark .metric .l { color: var(--on-dark-muted); }

/* ── Marketing hero (dark Navy panel, reverse-out) ────────────────────────────── */
.hero-dark { background: var(--navy); border-radius: var(--radius-lg); padding: 32px 28px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 26px; align-items: center; }
.hero-h1 { font-family: var(--font-display); font-weight: 900; font-size: 42px; line-height: 1.02; letter-spacing: -.03em; color: #fff; margin: 0 0 14px; }
.hero-h1 em { font-style: normal; color: var(--coral); }
.hero-sub { font-family: var(--font-body); font-size: 15px; color: var(--on-dark-muted); margin: 0 0 22px; max-width: 36ch; line-height: 1.5; }
.hero-ctas { display: flex; gap: 11px; align-items: center; }
.hero-visual { position: relative; min-height: 320px; }
.hero-visual canvas { display: block; width: 100%; height: 380px; }
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-h1 { font-size: 32px; }
  .hero-visual canvas { height: 260px; }
}

/* append to static/style.css if no equivalent exists */
.brand-wordmark { font-family: var(--font-display); font-weight: 900; font-size: 18px; letter-spacing: -.025em; color: var(--navy); }
.brand-wordmark.on-dark { color: #fff; }

/* ── Processing state — motif as real loading indicator ───────────────────────── */
.processing-stage { position: relative; background: var(--navy); border-radius: var(--radius-lg); overflow: hidden; }
.processing-stage canvas { display: block; width: 100%; height: 300px; }
.processing-phase { position: absolute; top: 16px; left: 20px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }

/* ============================================================
   DS v3.2 · Nachtrag (Kai-Entscheid 06.09.2026, „E1 mobil v2")
   ------------------------------------------------------------
   Spiegel von static/design/tokens/*.css + static/design/base.css.
   Die ausführliche Begründung und die Kontrastwerte stehen dort an
   der Definition; hier stehen dieselben Werte, weil die Jinja-Legacy-
   Seiten style.css allein laden. Beide Welten müssen deckungsgleich
   sein (Guard: frontend/shared/ds-v32.test.js).
   ============================================================ */
:root {
  /* Glass-Flächen: zwei Gründe, ZWEI Filter (N1). Der Blur gehört zur
     Deckkraft — Mint lässt 22 % Untergrund durch, Forest nur 14 %, und
     der dünnere Schleier braucht den weiteren Radius. Kontrast
     gerechnet: forest schlechtestenfalls 5,69:1 (über Weiß,
     --on-forest-muted), mint 5,53:1 (über Forest, --text-secondary).
     Auf Mint ist --text-muted verboten (2,96:1). Glass ist eine Fläche,
     keine dritte Höhe: die Kante macht --shadow-overlay(-down), bei
     Mint stattdessen --hairline-glass. */
  --filter-glass-forest: blur(14px) saturate(1.2);
  --filter-glass-mint:   blur(18px) saturate(1.3);
  --surface-glass-forest: color-mix(in srgb, var(--forest) 86%, transparent);
  --surface-glass-mint:   color-mix(in srgb, var(--forest-mist) 78%, transparent);
  --hairline-glass: inset 0 -1px 0 rgba(12,44,42,.12);

  /* Mobil-Scale für Sheets/Karten unter 860 px. Zweite begrenzte
     Ausnahme zur 10–14-px-App-Scale, Verwendungsorte abschließend:
     Bottom-Sheet, Interstitial-Karten, Gast-Editor mobil. Kein
     --fs-mobil-titel: das ist --fs-display-3 (20 / mobil 18 px). */
  --fs-mobil-fliess: 16px;   /* Fließtext + jedes Eingabefeld (iOS-Zoomgrenze) */
  --fs-mobil-meta:   13px;   /* Meta-/Hinweiszeile */

  /* Mobil-Maße. 14 und 10 liegen bewusst NICHT auf dem 4-px-Raster —
     Zwischenwerte für genau diese drei Flächen. */
  --tap-mobil:        48px;
  --tap-min:          44px;
  --pad-sheet-mobil:  12px;
  --pad-karte-mobil:  14px 16px;
  --gap-karten-mobil: 10px;
}

/* Glass: Grund-Modifier von .overlay-blur, nie allein. Deckend zuerst,
   Halbdeckel im @supports — ohne backdrop-filter bleibt die volle Fläche. */
.overlay-blur.glass-forest {
  background: var(--forest);
  color: var(--on-forest);
}
/* Mint tauscht den Overlay-Schatten gegen die Haarlinie (N1). */
.overlay-blur.glass-mint {
  background: var(--forest-mist);
  color: var(--ink);
  box-shadow: var(--hairline-glass);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .overlay-blur.glass-forest {
    background: var(--surface-glass-forest);
    -webkit-backdrop-filter: var(--filter-glass-forest);
    backdrop-filter: var(--filter-glass-forest);
  }
  .overlay-blur.glass-mint {
    background: var(--surface-glass-mint);
    -webkit-backdrop-filter: var(--filter-glass-mint);
    backdrop-filter: var(--filter-glass-mint);
  }
}
.overlay-blur.glass-forest .glass-sekundaer { color: var(--on-forest-muted); }
.overlay-blur.glass-mint   .glass-sekundaer { color: var(--text-secondary); }

/* Zähler-Badge: Forest zählt Dinge. 28 px sichtbar, 44 px Tapfläche. */
.badge-zaehler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  background: var(--forest-pale);
  color: var(--forest);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.badge-zaehler--tap {
  position: relative;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.badge-zaehler--tap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--tap-min);
  height: var(--tap-min);
  transform: translate(-50%, -50%);
}
.badge-zaehler--tap:active { background: var(--forest-pale-deep); }

/* Ordnungskarte: eben (kein Schatten, 1 px --line), gibt sich aber als
   Tap-Ziel zu erkennen. Erweitert .card, ersetzt es nicht. */
.card--ordnung {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--tap-mobil);
  padding: var(--pad-karte-mobil);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background var(--dur-fast) var(--ease);
}
.card--ordnung::after {
  content: '';
  margin-left: auto;
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(-45deg);
}
.card--ordnung:active { background: var(--forest-mist); }
.card--ordnung + .card--ordnung { margin-top: var(--gap-karten-mobil); }

/* „leer / + hinzufügen": gestrichelte Kante statt --disabled-opacity —
   die Karte ist tappbar, .55 würde das Gegenteil behaupten. */
.card--ordnung.card--ordnung-leer {
  background: transparent;
  border-style: dashed;
  color: var(--text-muted);
}
.card--ordnung.card--ordnung-leer::after { content: none; }
