/* fuk-ui.css — geteiltes F&K-Design-System für alle *.schdbr.de-Werkzeuge.
   Eine Quelle für Farben, Schrift und Basis-Bausteine. Einbinden mit einer Zeile
   im <head> jedes Moduls (wie fuk-nav.js):
     <link rel="stylesheet" href="https://fuk.schdbr.de/fuk-ui.css">
   Modul-eigene Stylesheets nach dieser Zeile einbinden — sie überschreiben dann
   gezielt, wo ein Modul etwas Eigenes braucht. Siehe UNIFICATION.md (Stufe 1). */

:root {
  /* Kanonische F&K-Tokens (--fk-*): eine Wahrheit. */
  --fk-ink:        #1c1c1c;   /* Text */
  --fk-muted:      #6b6b6b;   /* Sekundärtext */
  --fk-paper:      #faf8f4;   /* Seitengrund (warmer Papierton) */
  --fk-card:       #ffffff;   /* Karten/Leisten */
  --fk-chip:       #f3efe6;   /* leichte Flächen (Code, Buttons hell) */
  --fk-line:       #e7e3da;   /* Rahmen/Trenner */
  --fk-red:        #d03334;   /* F&K-Akzent */
  --fk-red-soft:   #fbeaea;   /* Akzent-Hintergrund */
  --fk-ok:         #2e7d32;
  --fk-error:      #b3261e;
  --fk-radius:     8px;
  --fk-sans: "Source Sans 3","Source Sans Pro",-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  /* Kompat-Aliase: bestehende Module funktionieren unverändert weiter
     (buchkurier: --fg/--bg/--border/--accent …; Landing: --ink/--paper/--red …). */
  --fg: var(--fk-ink);       --muted: var(--fk-muted);
  --bg: var(--fk-paper);     --bg-alt: var(--fk-chip);
  --card: var(--fk-card);    --border: var(--fk-line);
  --accent: var(--fk-red);   --accent-light: var(--fk-red-soft);
  --ok: var(--fk-ok);        --error: var(--fk-error);   --error-light: var(--fk-red-soft);
  --ink: var(--fk-ink);      --paper: var(--fk-paper);   --line: var(--fk-line);  --red: var(--fk-red);
}

/* ---- Basis (bewusst zurückhaltend; Modul-Layouts bleiben) ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--fk-sans);
  color: var(--fk-ink);
  background: var(--fk-paper);
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; color: var(--fk-ink); }
a { color: var(--fk-red); }
hr { border: 0; border-top: 1px solid var(--fk-line); margin: 1.2em 0; }
.muted { color: var(--fk-muted); }

/* ---- Buttons ---- */
button, .fk-btn {
  font: inherit;
  padding: 0.45em 0.9em;
  border-radius: var(--fk-radius);
  border: 1px solid transparent;
  background: var(--fk-red);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.2;
}
button:disabled, .fk-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.fk-btn-light {
  background: var(--fk-card); color: var(--fk-ink); border-color: var(--fk-line);
}
.fk-btn-link {
  background: none; border: none; padding: 0; color: var(--fk-red);
  text-decoration: underline; cursor: pointer; display: inline;
}

/* ---- Formularfelder ---- */
input[type="text"], input[type="number"], input[type="email"], input[type="search"],
textarea, select {
  font: inherit;
  padding: 0.4em 0.6em;
  border: 1px solid var(--fk-line);
  border-radius: 6px;
  background: var(--fk-card);
  color: var(--fk-ink);
}

/* ---- Tabellen ---- */
table { border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.4em 0.8em;
  border-bottom: 1px solid var(--fk-line);
  vertical-align: top;
}

/* ---- Code ---- */
code {
  background: var(--fk-chip);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.95em;
}
pre { background: var(--fk-chip); padding: 0.7em 0.9em; border-radius: 6px; overflow-x: auto; }

/* ---- Karte (opt-in) ---- */
.fk-card {
  background: var(--fk-card);
  border: 1px solid var(--fk-line);
  border-radius: 12px;
  padding: 16px 18px;
}

/* Aufbau dieser Datei — die Reihenfolge ist bewusst, weil gleich
   spezifische Regeln über sie entschieden werden. Beim Ergänzen also
   in den passenden Abschnitt einsortieren statt hinten anhängen:
     Schriften · Farbwerte · Formulare · Kopfleiste · Knöpfe ·
     Karten/Tabellen · Kampagnen-Editor · Einstellungen · Statistik */
/* Spline Sans (SIL OFL), self-hosted variable font — served from our own
   origin (assets.rs), never Google's CDN. One file per subset covers the whole
   400–700 weight axis. */
@font-face { font-family: 'Spline Sans'; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url('/assets/spline-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
  U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
  U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Spline Sans'; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url('/assets/spline-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
  U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
  U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* App tokens: airy light, Lotus-garden palette (coral/brown/mint/purple),
   Spline Sans. Overrides the --fk-* vars from fuk-ui.css; the file is untouched. */
:root { --rm-max: 1000px;
  --fk-sans: 'Spline Sans', 'Source Sans 3', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  /* Grayscale-first: the chrome is neutral so the user's colourful designs are
     what carries colour (à la Adobe/Blender/Houdini). Interactive ink is near-
     black; the ONE reserved accent --st-go (neon lime) is for terminal CTAs and
     live-status only. --fk-red maps to ink, so every button/link goes monochrome. */
  --st-accent: #101214; --st-accent-dark: #000; --st-accent-soft: #eceef0;
  /* CTA lime — exact values from the approved automation mockup (--go/--go2/
     --go-line/--go-ink): a vivid top-to-bottom gradient with a defining hairline,
     dark-green ink. Drives .go, the tier switch, progress bars and the live chip. */
  --st-go: #cdf24e; --st-go-2: #a8e51e; --st-go-line: #9ad313; --st-go-ink: #1c2606; --st-danger: #dc2626;
  --st-ink: #101214; --st-tile: #f4f5f2;
  --st-body: #2b2f36; --st-muted: #6a717b; --st-faint: #9aa1aa; --st-step: #3a3f47;
  --fk-red: var(--st-accent); --fk-red-soft: var(--st-accent-soft);
  --fk-paper: #fafafa; --fk-chip: #f1f2f4; --fk-line: #e6e7ea; }
/* ══ FORMULARE ═══════════════════════════════════════════════════ */
/* fuk-ui.css stylt text/number/email/search — password und url fehlen dort.
   Ohne url sah ausgerechnet „Bild-Link" nach rohem Browser-Feld aus, direkt
   neben dem gestylten Suchfeld von „Bild ersetzen". */
input[type=password], input[type=url] { font: inherit; padding: .4em .6em;
  border: 1px solid var(--fk-line, #e7e3da); border-radius: 6px;
  background: var(--fk-card, #fff); color: var(--fk-ink, #222); }
/* Formulare strikt top-down: jedes Element bricht um, Label über Feld. */
main.rm form label { display: block; margin: .9rem 0 .3rem; font-weight: 600;
  font-size: .88rem; color: #444; }
main.rm form label:first-child { margin-top: 0; }
main.rm form input[type=text], main.rm form input[type=email],
main.rm form input[type=password], main.rm form input[type=url],
main.rm form textarea, main.rm form select {
  display: block; width: 100%; box-sizing: border-box; }
main.rm form button[type=submit] { margin-top: 1rem; }
/* ══ RÜCKMELDUNG (Knopf unten links) ═════════════════════════════ */
/* Unten LINKS mit Absicht: rechts unten sitzt in Mail-Clients und bei uns die
   Vorschau, und wer etwas melden will, soll nicht zwischen beidem wählen. */
.fb { position: fixed; left: 16px; bottom: 16px; z-index: 70; }
.fb-toggle { display: inline-flex; align-items: center; gap: .4rem; font: inherit;
  font-size: .85rem; font-weight: 600; padding: .5em .9em; border-radius: 999px;
  border: 1px solid var(--fk-line, #e2edeb); background: #fff; color: #51686c;
  box-shadow: 0 6px 18px rgba(16,18,20,.12); cursor: pointer; }
.fb-toggle:hover { border-color: var(--st-ink, #101214); color: var(--st-ink, #101214); }
.fb-panel { position: absolute; left: 0; bottom: 3.1rem; width: min(360px, 88vw);
  background: #fff; border: 1px solid var(--fk-line, #e2edeb); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16,18,20,.22); padding: .8rem .9rem; }
.fb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.fb-x { font: inherit; background: none; border: 0; cursor: pointer; color: #51686c; padding: 0 .2rem; }
.fb-panel textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .9rem;
  padding: .5em .6em; border: 1px solid var(--fk-line, #e2edeb); border-radius: 8px; }
.fb-actions { display: flex; gap: .5rem; margin-top: .55rem; }
.fb-actions button { font-size: .85rem; }
.fb-target { margin: 0 0 .4rem; font-size: .8rem; color: #51686c; }
.fb-status { margin: .45rem 0 0; min-height: 1.1em; }
/* Beim Zeigen: Fadenkreuz und ein Rahmen um das Element unter dem Zeiger. */
body.fb-picking, body.fb-picking * { cursor: crosshair !important; }
.fb-highlight { outline: 2px solid var(--st-accent, #0d7d80) !important; outline-offset: 1px; }

/* ══ ARTIKELAUSWAHL (Fenster im Editor) ══════════════════════════ */
/* Eigene Feldregeln: die Formularregeln oben greifen nur für text/email/url,
   ein Zahlenfeld nahm sonst seine Standardbreite und lief über sein Label
   hinaus — das Kästchen „nur mit Bild" lag dann auf dem Feld „bis €". */
#pick-win label { display: block; margin: 0; font-weight: 600; font-size: .78rem; color: #444; }
#pick-win input, #pick-win select { display: block; width: 100%; box-sizing: border-box;
  margin: .2rem 0 0; }
#pick-win input[type=checkbox] { display: inline-block; width: auto; margin: 0; }
#pick-win .pick-bar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; }
#pick-win .pick-bar .grow { flex: 1 1 15rem; }
#pick-win .pick-bar .schmal { flex: 0 0 6rem; }
#pick-win .pick-bar .mittel { flex: 0 0 12rem; }
#pick-win .pick-bar .haken { display: flex; align-items: center; gap: .35rem; font-weight: 400;
  white-space: nowrap; padding-bottom: .45rem; }
#pick-win .pick-bar button { flex: 0 0 auto; }
/* Kacheln gleich hoch, damit die Reihen nicht ausfransen. */
#pick-hits { align-items: stretch; }
#pick-hits .kachel { display: flex; flex-direction: column; gap: .4rem;
  border: 1px solid var(--fk-line, #e6e7ea); border-radius: 10px; padding: .5rem;
  cursor: pointer; font-size: .82rem; background: #fff; }
#pick-hits .kachel img, #pick-hits .kachel .kein-bild { width: 100%; height: 110px; border-radius: 6px;
  object-fit: contain; background: #f6f7f8; display: block; }
#pick-hits .kachel .kein-bild { display: flex; align-items: center; justify-content: center;
  color: #9fb0b2; font-size: .75rem; background: #f0f2f3; }
#pick-hits .kachel.an { border-color: var(--st-accent, #0d7d80); background: var(--st-accent-soft, #dcf2ef); }
#pick-hits .kachel .zeile { display: flex; gap: .4rem; align-items: flex-start; }

/* ══ KOPFLEISTE & NAVIGATION ═════════════════════════════════════ */
/* App-Kopfleiste (Mint Studio): heller, fast weißer Balken statt dunkel; Logo
   in dunkler Kachel, Pillen-Navigation mit weicher Aktiv-Pille. */
.rm-head { background: rgba(255,255,255,.9); border-bottom: 1px solid var(--fk-line, #e2edeb); }
.rm-head .inner { max-width: none; margin: 0; padding: 14px 40px;
  display: flex; align-items: center; gap: 28px; }
.rm-head .logo { display: flex; align-items: center; gap: 9px; font-weight: 700;
  font-size: 17px; line-height: 1; text-transform: lowercase;
  color: var(--st-ink, #101416); text-decoration: none; letter-spacing: .02em; }
.rm-head .logo .tile { display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 8px; background: var(--st-tile, #3f4f54);
  box-shadow: 0 1px 4px rgba(16,18,20,.22), 0 0 0 1px rgba(16,18,20,.05); }
.rm-head .logo svg { width: 24px; height: 24px; }
/* Handy: nur die Kachel (das „e."), der Markenname kostet dort zu viel Platz. */
@media (max-width: 640px) { .rm-head .logo .brand { display: none; } .rm-head .logo { gap: 0; } }
/* Bereichswahl + Konto: inline auf dem Desktop, hinter ☰ auf dem Handy. */
.rm-head { position: relative; }
.rm-head .menu-btn { display: none; }
.rm-head .head-tools { display: flex; align-items: center; }
@media (max-width: 640px) {
  .rm-head .menu-btn { display: inline-flex; align-items: center; justify-content: center;
    font: inherit; font-size: 1.05rem; line-height: 1; width: 34px; height: 32px; margin: 0;
    padding: 0; cursor: pointer; color: var(--st-ink, #17181c); background: #eef1f1;
    border: 1px solid var(--fk-line, #e2edeb); border-radius: 7px; }
  .rm-head .head-tools { display: none; }
  .rm-head.menu-open .head-tools { display: flex; flex-direction: column; align-items: stretch;
    gap: .7rem; position: absolute; top: calc(100% + 4px); right: 8px; z-index: 80;
    min-width: 220px; background: #fff; border: 1px solid var(--fk-line, #e2edeb);
    border-radius: 10px; padding: .8rem; box-shadow: 0 14px 34px rgba(0,0,0,.18); }
  /* Im Panel: Bereichswahl volle Breite, Konto direkt aufgeklappt (ohne Chip). */
  .rm-head.menu-open .head-tools form { margin: 0 !important; display: block !important; }
  .rm-head.menu-open .head-tools select { width: 100%; }
  .rm-head.menu-open .acct > summary { display: none; }
  .rm-head.menu-open .acct-menu { position: static; min-width: 0; border: 0; box-shadow: none; padding: 0; }
}
/* One line, never wrapped: a wrapped nav is what made the header look broken at
   anything below fullscreen. When the labels no longer fit, JS in layout.html
   adds .nav-icons and the header falls back to icons only (titles keep it
   readable on hover). */
.rm-head nav { display: flex; gap: 4px; flex: 1; flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.rm-head.nav-icons nav a { padding-left: 9px; padding-right: 9px; }
.rm-head.nav-icons nav a .lbl { display: none; }
/* Handy: Icons-only GARANTIERT per Media Query — die JS-Messung (scrollWidth)
   ist auf echten Geräten nicht verlässlich (Font-Timing, Back-Forward-Cache,
   Zoom). Die Messung bleibt nur für schmale Desktop-Fenster oberhalb 640px. */
@media (max-width: 640px) {
  .rm-head nav a { padding-left: 9px; padding-right: 9px; }
  .rm-head nav a .lbl { display: none; }
  /* Desktop-Polster (40px Rand, 28px Lücken) fressen auf 390px ~136px — enger,
     damit alle sechs Icons wirklich sichtbar sind statt abgeschnitten. */
  .rm-head .inner { padding: 10px 12px; gap: 10px; }
}
.rm-head nav a { display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; color: var(--st-muted, #51686c);
  font-size: 14px; padding: 6px 13px; border-radius: 8px; }
.rm-head nav a svg { width: 17px; height: 17px; opacity: .75; }
.rm-head nav a:hover { background: var(--fk-chip, #fbe8e4); color: var(--st-ink); }
.rm-head nav a.aktiv { color: #fff; background: var(--st-ink, #17181c); font-weight: 600; }
.rm-head nav a.aktiv svg { opacity: 1; }
/* ══ KNÖPFE ══════════════════════════════════════════════════════ */
/* Reserved CTA: the ONE terminal action per flow (send, publish). Neon-lime
   gradient + dark ink — the only saturated colour the chrome ever shows. */
/* THE primary/terminal CTA: a slight top-to-bottom green gradient with a defining
   darker-green hairline (the border is what makes it read as crisp and pressable).
   One per context; secondary actions use .btn-light. Recorded design decision. */
.go, button.go, a.go { background: linear-gradient(180deg, var(--st-go,#cdf24e), var(--st-go-2,#a8e51e));
  color: var(--st-go-ink,#1c2606) !important; border: 1px solid var(--st-go-line,#9ad313);
  font-size: 13px; font-weight: 600; border-radius: 9px; padding: .42rem .8rem; line-height: 1.1;
  display: inline-flex; align-items: center; gap: 6px; }
.go:hover, button.go:hover { filter: brightness(.98); }
.go svg { width: 18px; height: 18px; }
/* Secondary/light button — the DEFAULT for editor actions, so each card keeps a
   single prominent button (dark Speichern / the lime .go) and the rest stay calm.
   Shares the .go metrics so a [secondary][primary] pair is exactly the same size. */
button.btn-light, a.btn-light, .btn-light {
  background: var(--fk-chip, #f1f2f4) !important; color: var(--fk-ink, #222) !important;
  border: 1px solid var(--fk-line, #e6e7ea); font-size: 13px; font-weight: 600; border-radius: 9px;
  padding: .42rem .8rem; line-height: 1.1; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; }
.btn-light:hover { filter: brightness(.97); }
.btn-light svg { width: 17px; height: 17px; }
/* Same metrics, white ground: for buttons that sit ON a chip-coloured panel
   (the AI box), where .btn-light would blend into its own background. */
button.btn-white, a.btn-white, .btn-white {
  background: #fff !important; color: var(--fk-ink, #222) !important;
  border: 1px solid var(--fk-line, #d9dade); font-size: 13px; font-weight: 600; border-radius: 9px;
  padding: .42rem .8rem; line-height: 1.1; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; }
.btn-white:hover { filter: brightness(.97); }
/* Editor action groups: a small caption ABOVE a left-aligned row of buttons, so
   every group lines up at the card's left edge regardless of label width (the
   old inline labels made each row start at a different x). */
.act-group { margin-top: .85rem; }
.act-group > .cap { display: block; margin: 0 0 .35rem; font-size: .76rem;
  font-weight: 600; letter-spacing: .01em; color: var(--st-muted, #6a717b); }
.act-cell { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
/* The editor's primary actions sit bottom-right (cancel left, save right). */
.au-actions { justify-content: flex-end; }
/* Submit buttons in an action row must NOT inherit the lone-submit top margin
   (main.rm form button[type=submit]) — otherwise a submit button sits lower than
   a sibling link in the same row. Higher specificity so it wins. */
main.rm .act-cell button[type="submit"] { margin-top: 0; }
/* Same for a badge row (lists, tags): each badge and each add/remove control is
   its own form, so without this the submit buttons drop below the badges. */
main.rm .listen-cell button[type="submit"] { margin-top: 0; }
/* Icon button: bordered/ghost square for row actions (delete, edit). Muted by
   default; danger variant only reddens on hover, so lists stay calm. */
.ico-btn { display: inline-grid; place-items: center; width: 34px; height: 30px;
  padding: 0; margin: 0; background: #fff; color: var(--st-muted,#6a717b);
  border: 1px solid var(--fk-line,#e6e7ea); border-radius: 8px; cursor: pointer; }
.ico-btn:hover { background: var(--fk-chip,#f1f2f4); color: var(--st-ink,#17181c); }
.ico-btn.danger:hover { background: #fef2f2; color: #dc2626; border-color: #f3c9c9; }
.ico-btn svg { width: 17px; height: 17px; }
/* Status chip: neutral by default; .live uses the reserved lime (sent / running),
   .danger the error red. Uppercase micro-label like the reference in-transit pill. */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .045em; line-height: 1;
  padding: .28rem .5rem; border-radius: 999px; background: var(--fk-chip,#f1f2f4);
  color: var(--st-muted,#6a717b); border: 1px solid var(--fk-line,#e6e7ea); }
.chip.live { background: var(--st-go,#c4f43b); color: var(--st-go-ink,#1c2606); border-color: var(--st-go-2,#a8e51e); }
.chip.danger { background: #fef2f2; color: var(--st-danger,#dc2626); border-color: #f3c9c9; }
.rm-head .konto { font-size: 13px; color: var(--st-faint, #7b8f92); }
.rm-head .konto a { color: var(--st-accent, #0d7d80); font-weight: 600; text-decoration: none; }
/* Account pill + dropdown (native <details>): initials pill, menu = email + Abmelden. */
.acct { position: relative; }
.acct > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 12px; border-radius: 999px; background: var(--st-accent-soft, #eceef0);
  color: var(--st-ink, #101214); font-weight: 700; font-size: 12px; letter-spacing: .03em;
  border: 1px solid rgba(16,18,20,.10); user-select: none; }
.acct > summary::-webkit-details-marker, .acct > summary::marker { display: none; }
.acct > summary { list-style-type: none; }
.acct > summary:hover { background: #e3e6e9; }
.acct[open] > summary { box-shadow: 0 0 0 2px rgba(16,18,20,.10); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; z-index: 40;
  background: #fff; border: 1px solid var(--fk-line, #e2edeb); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16,18,20,.16); padding: .45rem; display: flex; flex-direction: column; gap: .15rem; }
.acct-email { font-size: 12px; color: var(--st-faint, #7b8f92); padding: .2rem .35rem .4rem;
  border-bottom: 1px solid var(--fk-line, #eceef0); margin-bottom: .2rem; word-break: break-all; }
.acct-menu a { display: flex; align-items: center; gap: .4rem; color: var(--st-ink, #101214); font-weight: 600;
  font-size: 13px; text-decoration: none; padding: .4rem .35rem; border-radius: 7px; }
.acct-menu a:hover { background: var(--st-accent-soft, #eceef0); }
/* Bereichswahl: dieselbe Pille wie das Konto-Dropdown direkt daneben. Der
   native Select-Pfeil bleibt als Dropdown-Affordance erhalten. */
.space-pill { box-sizing: border-box; height: 32px; padding: 0 10px 0 12px;
  border-radius: 999px; background: var(--st-accent-soft, #eceef0);
  color: var(--st-ink, #101214); font-weight: 700; font-size: 12px;
  letter-spacing: .03em; border: 1px solid rgba(16,18,20,.10); cursor: pointer; }
.space-pill:hover { background: #e3e6e9; }
main.rm { max-width: var(--rm-max); margin: 56px auto 72px; padding: 0 32px; }
/* ══ KARTEN, TABELLEN, ABZEICHEN ═════════════════════════════════ */
.rm-card { background: #fff; border: 1px solid var(--fk-line, #e7e3da);
  border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
.rm-flash { border-left: 3px solid var(--st-danger, #dc2626); background: #fef2f2;
  padding: .6rem .9rem; margin-bottom: 1rem; font-size: .92rem; }
.rm-flash.ok { border-color: #3a7d44; background: #f3f9f4; }
/* Toasts: fixe, eingeschobene Benachrichtigungen (JS: window.stkToast). */
.stk-toasts { position: fixed; top: 16px; right: 16px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.stk-toast { background: var(--st-ink, #101416); color: #fff; padding: .7rem 1rem;
  border-radius: 8px; box-shadow: 0 10px 34px rgba(16,20,22,.30); font-size: .9rem;
  line-height: 1.4; opacity: 0; transform: translateX(120%);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.8,.2,1); }
.stk-toast.show { opacity: 1; transform: translateX(0); }
.stk-toast.ok { background: #1f7a4d; }
.stk-toast.err { background: var(--st-danger, #dc2626); }
.rm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .rm-grid2 { grid-template-columns: 1fr; } }
table.rm { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.rm th, table.rm td { text-align: left; padding: .45rem .5rem;
  border-bottom: 1px solid var(--fk-line, #e7e3da);
  /* One centerline per row: text, chips, selects and the row's icon buttons
     align horizontally even when a cell (e.g. Listen) wraps taller. */
  vertical-align: middle; }
/* The Listen cell: chips + add-select + button on one flex line (wrapping),
   centered — instead of per-element micro-margins at different offsets. */
.listen-cell { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
/* Schmale Schirme: eine zu breite Tabelle scrollt in sich, statt die ganze
   Seite quer scrollbar zu machen (App-Gefühl). Der tbody übernimmt dabei die
   Tabellenrolle und behält die volle Kartenbreite; border-collapse erbt er. */
@media (max-width: 860px) {
  table.rm { display: block; overflow-x: auto; }
  table.rm > tbody { display: table; width: 100%; }
}
table.rm th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: #888; }
.rm-hint { font-size: .82rem; color: #888; }
.rm-kbd { font-family: ui-monospace, monospace; background: var(--fk-chip, #f0eef6);
  padding: .1rem .35rem; border: 1px solid var(--fk-line, #e7e3da); }
.rm-badge { display: inline-block; font-size: .72rem; padding: .1rem .45rem;
  border: 1px solid var(--fk-line, #e7e3da); border-radius: 2px; color: #666; }
.rm-badge.rot { color: var(--st-danger, #dc2626); border-color: var(--st-danger, #dc2626); }
/* Kampagnen: linke Leiste mit bestehenden Kampagnen + breiter Hauptteil. */
main.rm:has(.rm-cols) { max-width: 1160px; }
/* Editor-Seite (3 Spalten): breiter, damit die mittlere Bearbeiten-Fläche mehr Platz hat. */
main.rm:has(.rm-cols-ed) { max-width: 1360px; }
.rm-cols { display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: 1rem; align-items: start; }
/* minmax(0,1fr) wie in der Desktop-Spalte: bei 1fr wäre das Minimum die
   Inhaltsbreite, und ein nowrap-Betreff schöbe die Spalte übers Handy hinaus. */
@media (max-width: 860px) { .rm-cols { grid-template-columns: minmax(0, 1fr); } }
.rm-side { background: #fff; border: 1px solid var(--fk-line, #e4e1ee);
  padding: .5rem; }
.rm-side h3 { margin: .3rem .5rem .5rem; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .05em; color: #888; }
.rm-side a.eintrag, .rm-side a.neu { display: block; padding: .45rem .6rem;
  text-decoration: none; color: var(--fk-ink, #222); border-left: 3px solid transparent; }
.rm-side a.neu { color: var(--st-accent, #0d7d80); font-weight: 600; }
.rm-side a.eintrag:hover, .rm-side a.neu:hover { background: var(--fk-chip, #f0eef6); }
.rm-side a.eintrag.aktiv { background: var(--st-accent-soft, #dcf2ef);
  border-left-color: var(--st-accent, #0d7d80); }
.rm-side .betreff { display: block; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font-size: .9rem; }
.rm-side .meta { font-size: .74rem; color: #888; }
#editor { background: #fff; border: 1px solid var(--fk-line, #e7e3da);
  border-radius: 6px; padding: 14px 16px; min-height: 260px; max-height: 460px;
  overflow-y: auto; font-size: 15px; line-height: 1.55; color: #222; }
#editor:focus { outline: 2px solid var(--fk-red, #d03334); outline-offset: -1px; }
#editor h2 { font-size: 20px; margin: 18px 0 6px; }
#body-src { font-family: ui-monospace, monospace; font-size: .82rem; min-height: 260px; }
/* Baukasten: Palette (Bausteine, linke Leiste) + Canvas (Blöcke) + Drop-Platzhalter. */
.bk-bar { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 .4rem; }
.bk-bar button { font-size: .85rem; padding: .28rem .62rem; margin: 0; background: #fff;
  color: #17262a; border: 1px solid var(--fk-line, #e2edeb); border-radius: 5px; cursor: pointer; font-weight: 600; }
.bk-bar button:hover { background: var(--st-accent-soft, #dcf2ef);
  border-color: var(--st-accent, #0d7d80); color: var(--st-accent, #0d7d80); }
.bk-bar button.active { background: var(--st-accent, #0d7d80); border-color: var(--st-accent, #0d7d80); color: #fff; }
.bk-bar button:active { background: var(--st-accent, #0d7d80); color: #fff; }
/* ══ KAMPAGNEN-EDITOR ════════════════════════════════════════════ */
.bk-pal { display: flex; flex-direction: column; gap: .35rem; }
.bk-item { position: relative; display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem;
  border: 1px solid var(--fk-line, #e2edeb); border-radius: 7px; background: #fff; cursor: grab; }
.bk-item:hover { border-color: var(--st-accent, #0d7d80); background: #f4fbfa; }
.bk-item .th { flex: none; width: 36px; height: 26px; border-radius: 4px; background: #eef3f3;
  display: grid; place-items: center; }
.bk-item .nm { font-size: .8rem; }
/* Hover-Hinweis ohne Verzögerung: Bausteine sind ziehbar/klickbar.
   display:none statt visibility:hidden — ein unsichtbarer Tooltip nimmt sonst
   Layoutbreite ein und gibt der Seite auf dem Handy einen Quer-Scroll. */
.bk-item::after { content: 'In die Mail ziehen oder klicken'; position: absolute; left: calc(100% + 8px);
  top: 50%; transform: translateY(-50%); z-index: 40; white-space: nowrap; pointer-events: none;
  background: #101416; color: #fff; font-size: .72rem; padding: .25rem .5rem; border-radius: 5px;
  display: none; }
.bk-item:hover::after { display: block; }
/* Im Editor zeigt das SEITENVERHÄLTNIS die Wahrheit, nicht die Pixelhöhe:
   die feste Höhe ist auf die 536px Mail-Innenbreite gerechnet, die Leinwand
   hier ist schmaler — mit fester Höhe würde jedes Quadrat hochkant wirken. */
#canvas img.e-img[data-ar] { height: auto !important; }
#canvas { min-height: 320px; border: 1px dashed var(--fk-line, #e2edeb); border-radius: 8px;
  padding: 12px; background: #fff; -webkit-hyphens: auto; hyphens: auto; }
/* No `.empty` centering: the canvas always holds the locked imprint block, and a
   grid/centered canvas makes every block shrink-to-fit instead of spanning the
   width (which is what the mail does). The hint below stands in for it. */
.blk { position: relative; border: 1px solid transparent; border-radius: 6px; margin: 0 0 6px; }
.blk:hover { border-color: var(--fk-line, #e2edeb); }
.blk.blk-selected { border-color: var(--st-accent, #0d7d80); box-shadow: 0 0 0 2px var(--st-accent-soft, #dcf2ef); }
.blk-tools { position: absolute; top: 3px; right: 3px; display: none; gap: 3px; z-index: 2; }
/* NUR die eigenen Tools (Kind-Kombinator!): mit Nachfahren-Selektor zeigte ein
   Hover über dem Spalten-Container die Werkzeuge ALLER verschachtelten Bausteine
   gleichzeitig — vier ▲▼✕-Reihen über Bildern und Titeln. */
.blk:hover > .blk-tools { display: flex; }
.blk-tools button, .blk-handle { font: inherit; font-size: .72rem; line-height: 1;
  border: 1px solid var(--fk-line, #e2edeb); background: #fff; border-radius: 5px;
  padding: 3px 6px; cursor: pointer; color: #51686c; }
.blk-handle { cursor: grab; }
.blk-tools .ai { color: var(--st-accent, #0d7d80); }
/* Placeholder line when the canvas holds no real blocks (imprint stays put). */
.canvas-hint { padding: 2rem 1rem; text-align: center; color: #9fb0b2; font-size: .9rem; }
/* Spalten-Container: Zellen sind Mini-Canvases für verschachtelte Bausteine. */
.blk-sub { margin: 0 0 4px; }
.blk-sub .blk-tools button, .blk-sub .blk-handle { font-size: .62rem; padding: 2px 4px; }
.blk-sub > .blk-body { padding: 2px 2px; }
/* Leere Zelle bleibt greifbares Drop-Ziel statt auf 0 Höhe zu kollabieren. */
#canvas .blk-cols td:not(:has(.blk))::after {
  content: '+ Baustein hierher ziehen'; display: block; padding: 1.2rem .4rem;
  text-align: center; color: #b6c3c5; font-size: .72rem;
  border: 1px dashed var(--fk-line, #e2edeb); border-radius: 6px; }
.bk-drop.bk-drop-cell { padding: .3rem; font-size: .7rem; }
.bk-drop.bk-drop-cell .th { display: none; }
/* Impressum: locked mandatory footer block — kept last, styled via the cog only.
   Its tools (lock badge + cog) stay visible so its stylability is discoverable. */
.blk-locked { border-top: 1px dashed var(--fk-line, #e2edeb); border-radius: 0; margin-top: 10px; cursor: pointer; }
.blk-locked > .blk-tools { display: flex; }
/* Full-bleed like the sent mail, where the footer background spans the whole card. */
.blk-locked .blk-body { padding: 4px 0; }
.blk-locked .blk-lock { font-size: .72rem; line-height: 1; padding: 3px 5px; color: #9fb0b2; cursor: default; }
/* Per-Baustein-KI: kleine Prompt-Zeile, klappt oben im Baustein auf. */
.blk-ai { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 4px 8px 0;
  padding: .35rem .45rem; background: var(--st-accent-soft, #dcf2ef); border-radius: 6px; }
.blk-ai .blk-ai-q { flex: 1; min-width: 160px; margin: 0; font-size: .8rem; padding: .28rem .45rem; }
.blk-ai button { font: inherit; font-size: .78rem; margin: 0; padding: .28rem .6rem; cursor: pointer;
  border: 1px solid var(--fk-line, #e2edeb); border-radius: 5px; background: #fff; color: #17262a; }
.blk-ai .blk-ai-go { border-color: var(--st-accent, #0d7d80); color: var(--st-accent, #0d7d80); font-weight: 600; }
.blk-ai .blk-ai-note { font-size: .74rem; color: #51686c; }
.blk-body { padding: 4px 8px; }
.blk-body [contenteditable]:focus { outline: 2px solid var(--st-accent, #0d7d80); outline-offset: 2px; }
.e-img { cursor: pointer; }
.bk-drop { border: 2px dashed var(--st-accent, #0d7d80); background: var(--st-accent-soft, #dcf2ef);
  border-radius: 8px; display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem;
  margin: 6px 0; color: var(--st-accent, #0d7d80); }
.bk-drop .th { flex: none; width: 44px; height: 32px; border-radius: 5px; background: #fff;
  display: grid; place-items: center; border: 1px solid var(--st-accent, #0d7d80); }
.bk-drop .nm { font-weight: 600; font-size: .85rem; }
/* Theme-Farbe im Editor: die Bausteine tragen inline {{accent}}/{{accent_soft}}
   (ungültig im Browser → verworfen); diese Klassen zeigen die Farbe live via
   der auf dem Canvas gesetzten --acc/--acc-soft. Im Mail füllt der Server. */
/* background-COLOR (not the shorthand) so an inline background-image — the
   header's striped option — still shows in the editor instead of being reset. */
.bk-acc-bg { background-color: var(--acc, #0d7d80) !important; }
.bk-acc-soft { background-color: var(--acc-soft, #dcf2ef) !important; }
/* Property-Editor: eigene rechte Spalte der Editor-Seite (drittes Grid-Feld
   neben linker Leiste + Bearbeiten-Karte). Auf Handy als Bottom-Sheet-Overlay. */
/* Narrower rails than before (was 240/300): on a 2/3-width window the middle
   column is where the work happens, and 80px back is a visible difference. */
.rm-cols-ed { grid-template-columns: 200px minmax(0, 1fr) 260px; }
/* Die Bausteine-Leiste bleibt beim Scrollen oben stehen: lange Mails wachsen
   nach unten, und wer einen Baustein ans Ende ziehen will, soll die Palette
   nicht erst wieder hochholen muessen. Die Kampagnenliste darueber scrollt weg. */
.bk-box { position: sticky; top: 12px; margin-top: 1rem;
  max-height: calc(100vh - 24px); overflow-y: auto; }
/* .rm-cols setzt align-items:start; ohne Strecken waere die linke Spalte nur
   so hoch wie ihr Inhalt, und sticky haette keinen Weg zum Mitlaufen. */
.rm-cols-ed > :first-child { align-self: stretch; }
#prop-editor { position: sticky; top: 12px; align-self: start;
  background: #fff; border: 1px solid var(--fk-line, #e2edeb); border-radius: 8px;
  padding: 10px 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
#prop-head-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#prop-head-bar strong { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #51686c; }
#prop-close { display: none; font: inherit; background: #fff; border: 1px solid var(--fk-line, #e2edeb);
  border-radius: 5px; padding: 2px 8px; cursor: pointer; color: #51686c; }
.prop-hint { color: #9fb0b2; font-size: .85rem; padding: .8rem .2rem; line-height: 1.5; }
.prop-sect { padding: .3rem .1rem; }
.prop-label { display: block; font-size: .72rem; font-weight: 600; color: #666; margin: .55rem .1rem .15rem; }
/* Bild-Optionen: vertikal gestapelt, kleine weiße Outline-Buttons. */
.img-props input { width: 100%; box-sizing: border-box; }
/* Eine Checkbox ist kein Textfeld: volle Breite schob „Schlagschatten" von
   seinem Kästchen weg. */
.img-props input[type=checkbox] { width: auto; }
/* Datei-Auswahl als Knopf: das native Eingabefeld („Browse… / No file
   selected") passt in keine Oberfläche. Das Feld ist versteckt, das Label
   trägt exakt die Optik der übrigen Panel-Knöpfe (z. B. „Schließen"). */
.prop-file { display: inline-block; font: inherit; font-size: .75rem; padding: .3rem .5rem;
  margin: 0; cursor: pointer; background: #fff; color: #17262a;
  border: 1px solid var(--fk-line, #e2edeb); border-radius: 5px; }
.prop-file input[type="file"] { display: none; }
.img-props button { font: inherit; font-size: .75rem; padding: .3rem .5rem; margin: 0; cursor: pointer;
  background: #fff; color: #17262a; border: 1px solid var(--fk-line, #e2edeb); border-radius: 5px; }
.img-props button:hover { border-color: var(--st-accent, #0d7d80); color: var(--st-accent, #0d7d80); }
/* Kleine Gruppen-Überschrift im Eigenschaften-Panel (Hintergrund / Größe / …). */
.prop-group { margin: .8rem 0 .25rem; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #8a9a9d; border-top: 1px solid var(--fk-line, #e2edeb);
  padding-top: .5rem; }
.prop-sect > .prop-group:first-child { margin-top: .2rem; border-top: 0; padding-top: 0; }
/* Zweispaltiges Raster für die Header-Regler; die Labels tragen ihre Beschriftung
   über dem Feld, damit auch in der schmalen rechten Spalte alles lesbar bleibt. */
.head-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: .4rem .5rem; align-items: end; }
.head-grid > label { margin: 0; font-size: .74rem; color: #51686c; }
.head-grid > label > select, .head-grid > label > input { width: 100%; margin: .1rem 0 0; }
/* Farbfeld: [Picker][Hex/RGB-Eingabe][▾-Popover mit gespeicherten Farben]. */
.colf { margin: .1rem 0 0; position: relative; }
.colf-row { display: flex; gap: .25rem; align-items: center; }
.colf-row input[type=color] { flex: none; width: 30px; height: 26px; padding: 0; margin: 0;
  border: 1px solid var(--fk-line, #e2edeb); border-radius: 5px; background: none; cursor: pointer; }
.colf-hex { flex: 1; min-width: 0; margin: 0 !important; font-family: ui-monospace, monospace;
  font-size: .74rem; padding: .18rem .3rem; text-transform: lowercase; }
.colf-more { flex: none; font: inherit; font-size: .72rem; line-height: 1; margin: 0; cursor: pointer;
  padding: .26rem .3rem; background: #fff; color: #51686c; border: 1px solid var(--fk-line, #e2edeb);
  border-radius: 5px; }
.colf-more:hover { border-color: var(--st-ink, #101214); color: var(--st-ink, #101214); }
.colf-pop { position: absolute; z-index: 70; top: calc(100% + 3px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--fk-line, #e2edeb); border-radius: 8px;
  padding: .5rem; box-shadow: 0 10px 26px rgba(0,0,0,.16); }
.colf-sw { display: flex; flex-wrap: wrap; gap: 5px; }
.colf-none { font-size: .72rem; color: #9fb0b2; }
.colf-cell { position: relative; display: inline-block; }
.colf-chip { width: 20px; height: 20px; padding: 0; margin: 0; cursor: pointer; border-radius: 5px;
  border: 1px solid rgba(0,0,0,.18); display: block; }
/* ×-Badge zum Entfernen: erscheint beim Hover über dem Chip. */
.colf-del { position: absolute; top: -6px; right: -6px; width: 14px; height: 14px; padding: 0;
  display: none; place-items: center; font-size: 10px; line-height: 1; cursor: pointer;
  background: var(--st-ink, #101214); color: #fff; border: 0; border-radius: 50%; }
.colf-cell:hover .colf-del { display: grid; }
.colf-save { display: block; width: 100%; font: inherit; font-size: .74rem; line-height: 1;
  margin: .45rem 0 0; cursor: pointer; padding: .3rem .42rem; background: #fff; color: #51686c;
  border: 1px solid var(--fk-line, #e2edeb); border-radius: 5px; }
.colf-save:hover { border-color: var(--st-ink, #101214); color: var(--st-ink, #101214); }
.img-sizes { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.img-sizes button { width: 100%; }
#prop-editor #img-panel, #prop-editor #head-panel { margin: 0 !important; }
@media (max-width: 860px) {
  .rm-cols-ed { grid-template-columns: minmax(0, 1fr); }
  .bk-box { position: static; max-height: none; }
  #prop-editor { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; z-index: 60;
    max-height: 78vh; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.22);
    transform: translateY(105%); transition: transform .22s ease; }
  #prop-editor.open { transform: translateY(0); }
  #prop-close { display: block; }
}
/* Übersicht (Mint Studio Option 1a): Eyebrow + Titel, zwei Statistik-Karten,
   'So funktioniert's' mit drei nummerierten Schritten. */
.st-eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--st-accent, #0d7d80); }
.st-title { margin: 0 0 40px; font-size: 34px; font-weight: 600; letter-spacing: -.01em;
  color: var(--st-ink, #101416); }
.st-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 720px) { .st-stats { grid-template-columns: 1fr; } }
.st-stat, .st-how { background: #fff; border: 1px solid var(--fk-line, #e2edeb);
  border-radius: 14px; padding: 28px 30px; }
.st-stat .lbl { font-size: 13px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--st-faint, #7b8f92); margin-bottom: 14px; }
.st-stat .row { display: flex; align-items: baseline; gap: 10px; }
.st-stat .num { font-size: 52px; font-weight: 700; line-height: 1; color: var(--st-ink, #101416); }
.st-stat .cap { font-size: 15px; color: var(--st-muted, #51686c); }
.st-stat .cta { display: inline-block; margin-top: 22px; font-size: 14px; font-weight: 600;
  color: var(--st-accent, #0d7d80); text-decoration: none; }
.st-stat .cta:hover { color: var(--st-accent-dark, #0a6467); }
.st-how h3 { margin: 0 0 20px; font-size: 16px; font-weight: 600; color: var(--st-ink, #101416); }
.st-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 720px) { .st-steps { grid-template-columns: 1fr; } }
.st-step { display: flex; gap: 12px; }
.st-step .n { flex: none; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 99px; background: var(--st-accent-soft, #dcf2ef); color: var(--st-accent, #0d7d80);
  font-size: 13px; font-weight: 700; }
.st-step p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--st-step, #3c5054); }
.st-step a { color: var(--st-accent, #0d7d80); }
.st-note { margin: 20px 0 0; font-size: 13px; color: var(--st-faint, #7b8f92); }

/* Utilities + small shared classes replacing the recurring inline styles.
   Single-property utilities carry !important so they always win — the same
   contract as the inline styles they replace. */
.m0 { margin: 0 !important; }
.mt0 { margin-top: 0 !important; }
.mb0 { margin-bottom: 0 !important; }
.w100 { width: 100% !important; }
.tar { text-align: right !important; }
.flex1 { flex: 1 !important; }
.ovx { overflow-x: auto !important; }
.rm-slim { max-width: 480px; margin: 3rem auto; }
/* Die Einstellungs-Abschnitte tragen inzwischen Tabellen (Shop-Artikel, Keys,
   Bereiche) und mehrspaltige Formulare; 620px waren dafür zu eng. Fließtexte
   darin bleiben über ihre eigene max-width lesbar. */
/* ══ EINSTELLUNGEN ═══════════════════════════════════════════════ */
.rm-sec { max-width: 960px; scroll-margin-top: 1rem; }
.rm-sec > p.rm-hint { max-width: 70ch; }
.chipbox { background: var(--fk-chip, #f0eef6); border: 1px solid var(--fk-line, #e4e1ee);
  border-radius: 8px; padding: .4rem .9rem .7rem; margin: .6rem 0; }
/* Property-editor: full-width field + compact label row */
.pe-in { width: 100%; margin: .1rem 0 0; }
.pe-in.h32 { height: 32px; }
.pe-lbl { margin: 0; font-size: .78rem; }
.pe-lbl-row { margin: 0; font-size: .78rem; display: flex; align-items: center; gap: .35rem; }

/* ============ Automationen (Regeln + Stufen) ============ */
.num { font-variant-numeric: tabular-nums; }
.au-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.au-seg { display: inline-flex; background: var(--fk-chip,#f1f2f4); border: 1px solid var(--fk-line,#e6e7ea); border-radius: 10px; padding: 3px; gap: 2px; }
.au-seg button { font: inherit; font-size: 13px; font-weight: 600; color: var(--st-muted,#6b727c); cursor: pointer; border: 0; background: transparent; padding: .34rem .85rem; border-radius: 7px; }
.au-seg button[aria-selected="true"] { background: var(--fk-card,#fff); color: var(--fk-ink,#17181c); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.au-toolbar { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap; }
/* Vorlagen: a grey dropdown next to "＋ Neue Regel" that opens the editor
   pre-filled. Native <details> — no JS needed to open, AU_JS closes on
   outside click. */
.au-tpl-menu { position: relative; display: inline-block; }
.au-tpl-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.au-tpl-menu > summary::-webkit-details-marker { display: none; }
.au-caret { font-size: 10px; color: var(--st-faint,#9aa1aa); }
.au-tpl-menu[open] .au-caret { transform: rotate(180deg); display: inline-block; }
.au-tpl-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 19rem;
  background: var(--fk-card,#fff); border: 1px solid var(--fk-line,#e6e7ea); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20,20,25,.14); padding: .35rem; display: flex; flex-direction: column; }
.au-tpl-list a { display: flex; flex-direction: column; gap: .1rem; text-decoration: none;
  padding: .5rem .65rem; border-radius: 8px; }
.au-tpl-list a:hover { background: var(--fk-chip,#f1f2f4); }
.au-tpl-list b { font-size: 13.5px; color: var(--fk-ink,#17181c); }
.au-tpl-list span { font-size: 11.5px; color: var(--st-muted,#6b727c); }

.au-empty { text-align: center; padding: 2.4rem 1.5rem; }
.au-empty h3 { font-size: 16px; }
.au-empty p { max-width: 52ch; margin: .4rem auto 0; }
.au-flowmark { width: 46px; height: 46px; margin: 0 auto .8rem; border-radius: 12px; display: grid; place-items: center;
  background: var(--fk-chip,#f1f2f4); color: var(--st-muted,#6b727c); }
.au-flowmark svg { width: 24px; height: 24px; }

.au-rules { display: flex; flex-direction: column; gap: .8rem; }
.au-rule { background: var(--fk-card,#fff); border: 1px solid var(--fk-line,#e6e7ea); border-radius: 12px;
  padding: .85rem 1rem; display: flex; align-items: center; gap: .7rem; box-shadow: 0 1px 2px rgba(20,20,25,.04); }
/* Aktiv/Pausiert toggle: a real switch (track + sliding knob), lime when on. */
.au-switch { box-sizing: border-box; position: relative; width: 38px; height: 22px; flex: none;
  border-radius: 999px; border: 1px solid var(--fk-line,#e6e7ea); background: var(--fk-chip,#f1f2f4);
  padding: 0; margin: 0; cursor: pointer; transition: background .15s, border-color .15s; }
.au-switch .au-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(20,20,25,.28); transition: left .15s; }
.au-switch.on { background: linear-gradient(180deg, var(--st-go,#cdf24e), var(--st-go-2,#a5cc22)); border-color: var(--st-go-line,#8db31d); }
.au-switch.on .au-knob { left: 18px; }
.au-state { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--st-faint,#9aa1aa); }
.au-state.on { color: #5f8a12; }
.au-state.done { color: var(--st-muted,#6b727c); }
/* Campaign-scope (scheduled send) marker + its send time. */
.au-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--st-muted,#6b727c); background: var(--fk-chip,#f1f2f4); border: 1px solid var(--fk-line,#e6e7ea);
  border-radius: 6px; padding: .14rem .4rem; }
.au-when { font-size: 12px; color: var(--st-muted,#6b727c); font-variant-numeric: tabular-nums; }
.au-name { font-weight: 650; font-size: 14.5px; }

/* Stufen-Leiter */
.au-ladder { display: flex; flex-direction: column; gap: 0; max-width: 640px; }
.au-up { display: grid; place-items: center; height: 30px; color: var(--st-faint,#9aa1aa); }
.au-rung { background: var(--fk-card,#fff); border: 1px solid var(--fk-line,#e6e7ea); border-radius: 12px; box-shadow: 0 1px 2px rgba(20,20,25,.04);
  padding: .85rem 1rem; display: grid; grid-template-columns: auto 1fr auto auto; gap: .2rem 1rem; align-items: center; }
.au-medal { width: 34px; height: 34px; border-radius: 9px; grid-row: 1 / 3; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.au-medal.base { background: var(--fk-chip,#f1f2f4); color: var(--st-muted,#6b727c); box-shadow: inset 0 0 0 1px var(--fk-line,#e6e7ea); }
.au-medal.m1 { background: #9aa3ad; }
.au-medal.m2 { background: linear-gradient(160deg,#e6b84e,#c98f22); }
.au-medal.m3 { background: linear-gradient(160deg,#2b2d33,#0c0d10); box-shadow: inset 0 0 0 1px #3a3d45; }
.au-tname-form { grid-column: 2; grid-row: 1; margin: 0; }
/* Inline-editable tier name: reads as text, reveals a field on hover/focus. */
.au-tname-input { font-weight: 700; font-size: 15px; font-family: inherit; color: inherit;
  width: 100%; max-width: 22ch; border: 1px solid transparent; background: transparent;
  border-radius: 7px; padding: .18rem .4rem; margin: -.18rem -.4rem; }
.au-tname-input:hover { border-color: var(--fk-line,#e6e7ea); }
.au-tname-input:focus { outline: none; border-color: var(--st-go-line,#8db31d); background: var(--fk-card,#fff);
  box-shadow: 0 0 0 3px rgba(165,204,34,.18); }
.au-cond { grid-column: 2; color: var(--st-muted,#6b727c); font-size: 12.5px; }
.au-count { grid-column: 3; grid-row: 1 / 3; text-align: right; }
.au-tdel { grid-column: 4; grid-row: 1 / 3; display: grid; place-items: center; margin: 0; }
.au-add-tier { display: flex; gap: .5rem; align-items: center; max-width: 640px; margin: .9rem 0 0; }
.au-add-tier input { flex: 1; }
.au-settings { max-width: 640px; }
.au-set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.1rem; }
.au-set-grid label { display: flex; flex-direction: column; gap: .3rem; font-size: 13px; font-weight: 600; color: var(--st-muted,#6b727c); }
/* Force every field (number AND time) to stack full-width under its label, so
   the row of controls lines up (time inputs were rendering inline, narrow). */
.au-set-grid input { font: inherit; display: block; width: 100%; box-sizing: border-box; margin: 0; }
@media (max-width: 520px) { .au-set-grid { grid-template-columns: 1fr; } }
.au-count b { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.au-count span { display: block; font-size: 11px; color: var(--st-faint,#9aa1aa); text-transform: uppercase; letter-spacing: .04em; }
.au-bar { grid-column: 2 / 4; height: 5px; border-radius: 3px; background: var(--fk-chip,#f1f2f4); overflow: hidden; margin-top: .3rem; }
.au-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--st-go-2,#a5cc22), var(--st-go,#b8e02e)); border-radius: 3px; }
@media (max-width: 560px) { .au-cond { grid-column: 1 / -1; } }

/* Automationen: Regel-Lesekarten + Editor-Zeilen */
.au-rule-card { background: var(--fk-card,#fff); border: 1px solid var(--fk-line,#e6e7ea); border-radius: 12px; box-shadow: 0 1px 2px rgba(20,20,25,.04); overflow: hidden; }
.au-rule-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-bottom: 1px solid var(--fk-line,#eef0f2); }
a.au-name { font-weight: 650; font-size: 14.5px; color: var(--fk-ink,#17181c); text-decoration: none; }
a.au-name:hover { text-decoration: underline; }
.au-flex { flex: 1; }
/* Header actions share one height so the Bearbeiten button and the trash icon
   line up (Bearbeiten was auto-height, the icon a fixed 30px → they didn't). */
.au-rule-head .au-sm { font-size: .78rem; height: 32px; padding: 0 .7rem; }
.au-rule-head .au-del-btn { height: 32px; width: 34px; }
/* The toggle + trash live in tiny forms, so the global lone-submit top margin
   (main.rm form button[type=submit]) pushed them BELOW the name/Bearbeiten row.
   Same for the tier ladder's delete + add-tier rows. Kill it in these rows. */
main.rm .au-rule-head button[type="submit"],
main.rm .au-tdel button[type="submit"],
main.rm .au-add-tier button[type="submit"] { margin-top: 0; }
.au-logic { padding: .7rem .9rem .85rem; display: grid; grid-template-columns: max-content 1fr; gap: .45rem .8rem; align-items: start; }
.au-kw { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--st-faint,#9aa1aa); padding-top: .24rem; }
.au-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.au-cond-chip, .au-act-chip { display: inline-flex; align-items: center; font-size: 13px; border-radius: 8px; padding: .26rem .55rem; border: 1px solid var(--fk-line,#e6e7ea); background: var(--fk-chip,#f1f2f4); }
.au-act-chip { background: color-mix(in srgb, var(--st-go,#b8e02e) 13%, var(--fk-card,#fff)); border-color: color-mix(in srgb, var(--st-go,#b8e02e) 34%, var(--fk-line,#e6e7ea)); }
.au-join { font-size: 11px; font-weight: 700; color: var(--st-faint,#9aa1aa); letter-spacing: .04em; }
/* A/B result panel on a rule with a send_ab action. */
.au-ab { border-top: 1px solid var(--fk-line,#eef0f2); padding: .6rem .9rem .7rem; }
.au-ab-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; flex-wrap: wrap; }
.au-ab-lbl { font-size: 12.5px; font-weight: 700; color: var(--st-muted,#6b727c); }
.au-ab-split { font-size: 11.5px; color: var(--st-faint,#9aa1aa); }
.au-ab-win { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #4d7010;
  background: color-mix(in srgb, var(--st-go,#cdf24e) 20%, #fff); border-radius: 5px; padding: .12rem .4rem; }
.au-ab-pending { font-size: 11.5px; color: var(--st-faint,#9aa1aa); }
.au-ab-row { display: flex; align-items: center; gap: .7rem; font-size: 13px; padding: .3rem .4rem; border-radius: 7px; }
.au-ab-row.win { background: color-mix(in srgb, var(--st-go,#cdf24e) 10%, transparent); }
.au-ab-var { font-weight: 700; width: 1.2rem; color: var(--fk-ink,#17181c); }
.au-ab-name { flex: 1; min-width: 0; color: var(--st-muted,#6b727c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-ab-metric { font-size: 12.5px; color: var(--st-muted,#6b727c); font-variant-numeric: tabular-nums; }
.au-ab-metric b { color: var(--fk-ink,#17181c); font-weight: 700; }
.au-ab-sent { font-size: 11.5px; color: var(--st-faint,#9aa1aa); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .au-ab-name { display: none; } }
/* Campaign A/B panel (creation form + status view on the campaign page). */
.ab-rows { display: flex; flex-direction: column; gap: .3rem; margin-top: .5rem; }
.ab-row { display: flex; align-items: center; gap: .7rem; font-size: 13px; padding: .35rem .5rem; border-radius: 7px; }
.ab-row.win { background: color-mix(in srgb, var(--st-go,#cdf24e) 10%, transparent); }
.ab-var { font-weight: 700; width: 1.2rem; }
.ab-subject { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-winner { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #4d7010;
  background: color-mix(in srgb, var(--st-go,#cdf24e) 20%, #fff); border-radius: 5px; padding: .12rem .4rem; flex: none; }
.ab-nums { color: var(--st-muted,#6b727c); font-size: 12.5px; font-variant-numeric: tabular-nums; flex: none; }
/* Variant rows: input + remove ✕ on one line; A is the readonly champion. */
.ab-vline { display: flex; gap: .4rem; align-items: center; }
main.rm form .ab-vline input { flex: 1; width: auto; margin: 0; }
main.rm form .ab-vline input[readonly] { background: var(--fk-chip,#f1f2f4); color: var(--st-muted,#6b727c); cursor: default; }
.ab-del { flex: none; cursor: pointer; color: var(--st-faint,#9aa1aa); border: 0; background: transparent; font-size: 14px; line-height: 1; padding: .3rem; border-radius: 6px; }
.ab-del:hover { color: var(--fk-ink,#17181c); background: var(--fk-chip,#f1f2f4); }
.ab-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem 1rem; margin-top: .8rem; align-items: end; }
.ab-opts label { display: flex; flex-direction: column; gap: .3rem; font-size: 13px; font-weight: 600; color: var(--st-muted,#6b727c); }
/* Neutralise the global form-label margins (label:first-child would un-indent
   only the FIRST column and shift it upwards vs. its siblings). */
main.rm form .ab-opts label { margin: 0; }
main.rm form .ab-opts input, main.rm form .ab-opts select { width: 100%; margin: 0; }
@media (max-width: 560px) { .ab-opts { grid-template-columns: 1fr; } }
/* Per-rule activity log (collapsible). Reads the ledger + cursors. */
.au-log { border-top: 1px solid var(--fk-line,#eef0f2); }
.au-log > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem;
  padding: .55rem .9rem; font-size: 12.5px; color: var(--st-muted,#6b727c); user-select: none; }
.au-log > summary::-webkit-details-marker { display: none; }
.au-log > summary::before { content: "▸"; font-size: 10px; color: var(--st-faint,#9aa1aa); transition: transform .12s; }
.au-log[open] > summary::before { transform: rotate(90deg); }
.au-log-lbl { font-weight: 700; letter-spacing: .02em; }
.au-log-counts { color: var(--st-faint,#9aa1aa); font-variant-numeric: tabular-nums; }
.au-log-body { padding: 0 .9rem .7rem; display: flex; flex-direction: column; gap: .3rem; }
.au-log-row { display: flex; align-items: center; gap: .6rem; font-size: 13px; }
.au-log-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  border-radius: 5px; padding: .12rem .4rem; flex: none; }
.au-log-badge.ok { background: color-mix(in srgb, var(--st-go,#b8e02e) 20%, #fff); color: #4d7010; }
.au-log-badge.blocked { background: #fef3c7; color: #92600a; }
.au-log-badge.error { background: #fee2e2; color: #b42318; }
.au-log-badge.waiting { background: var(--fk-chip,#f1f2f4); color: var(--st-muted,#6b727c); }
.au-log-who { color: var(--fk-ink,#17181c); }
.au-log-detail { color: var(--st-muted,#6b727c); font-size: 12px; }
.au-log-when { margin-left: auto; color: var(--st-faint,#9aa1aa); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Editor */
.au-edit-grid { display: grid; grid-template-columns: max-content 1fr; gap: .7rem .9rem; align-items: start; margin-top: 1rem; }
.au-edit-grid > .au-kw { padding-top: .5rem; }
/* Dry-run preview row in the editor. */
.au-preview { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; flex-wrap: wrap; }
.au-preview-out { font-size: 13px; color: var(--st-muted,#6b727c); }
.au-erow { display: flex; flex-wrap: nowrap; gap: .4rem; align-items: center; margin-bottom: .45rem; }
/* Higher specificity than main.rm form select{width:100%} so editor controls stay inline. */
main.rm form .au-erow select, main.rm form .au-erow input.val { font: inherit; font-size: 13px; color: var(--fk-ink,#17181c); background: var(--fk-card,#fff); border: 1px solid var(--fk-line,#e6e7ea); border-radius: 8px; padding: .32rem .5rem; display: inline-block; width: auto; max-width: 22rem; }
main.rm form .au-erow .au-type { min-width: 11rem; }
main.rm form .au-erow input.val { width: 5rem; }
/* Operands take the middle and wrap INTERNALLY (e.g. A/B's two campaign pickers)
   so the row never wraps the × onto its own line. */
.au-operands { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; flex: 0 1 auto; min-width: 0; }
.au-op { font-size: 12.5px; color: var(--st-muted,#6a717b); }
.au-erow .x { flex: none; cursor: pointer; color: var(--st-faint,#9aa1aa); border: 0; background: transparent; font-size: 14px; line-height: 1; padding: .25rem; border-radius: 6px; align-self: center; }
.au-erow .x:hover { color: var(--fk-ink,#17181c); background: var(--fk-chip,#f1f2f4); }
.add-inline { font-size: 12.5px; font-weight: 600; color: var(--st-muted,#6a717b); background: transparent; border: 1px dashed var(--fk-line,#dfe1e4); border-radius: 8px; padding: .3rem .6rem; cursor: pointer; }
.add-inline:hover { color: var(--fk-ink,#17181c); border-color: var(--st-muted,#6a717b); }
@media (max-width: 560px) { .au-logic, .au-edit-grid { grid-template-columns: 1fr; } .au-edit-grid > .au-kw { padding-top: 0; } .au-erow { flex-wrap: wrap; } }
/* ══ STATISTIK ═══════════════════════════════════════════════════ */
/* Klick-Map auf der Statistik: ein Balken je geklicktem Link. */
.click-map { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.cm-row { display: grid; grid-template-columns: 1fr auto auto; gap: .2rem .8rem; align-items: center; }
.cm-link { grid-column: 1; font-size: 13.5px; color: var(--fk-ink,#17181c); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-link:hover { text-decoration: underline; }
.cm-camp { grid-column: 2; font-size: 12px; color: var(--st-muted,#6b727c); text-decoration: none;
  max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-n { grid-column: 3; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.5rem; text-align: right; }
.cm-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--fk-chip,#f1f2f4); overflow: hidden; }
.cm-bar > i { display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--st-go-2,#a8e51e), var(--st-go,#cdf24e)); }
@media (max-width: 560px) { .cm-camp { display: none; } }
.ai-preset { font: inherit; font-size: 12px; cursor: pointer; margin: 0;
  padding: .22rem .55rem; border-radius: 999px; border: 1px solid var(--fk-line,#e6e7ea);
  background: var(--fk-card,#fff); color: var(--st-muted,#6b727c); }
.ai-preset:hover { border-color: var(--st-go-line,#9ad313); color: var(--fk-ink,#17181c); }
/* Kleiner Dreh-Indikator für Hintergrundläufe (Shop-Abruf). */
.rm-spin { vertical-align: -1px; width: 13px; height: 13px; border: 2px solid var(--fk-line, #d9dade);
  border-top-color: #6b7280; border-radius: 50%; display: inline-block;
  animation: rm-spin 0.8s linear infinite; flex: none; }
@keyframes rm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rm-spin { animation: none; } }
/* Unterabschnitt innerhalb einer Einstellungs-Karte: eine Karte kann mehrere
   zusammengehörige Schritte tragen (Shop-Anbindung), ohne dass daraus lauter
   gleichrangige Karten im Seitenfluss werden. */
.st-sub { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--fk-line, #e6e7ea); }
.st-sub > h4 { margin: 0 0 .45rem; font-size: .92rem; font-weight: 700; color: var(--st-ink, #101214); }
/* Aufklappbare Liste: 200 Artikel dürfen die Seite nicht fluten. */
.st-fold > summary { cursor: pointer; font-size: .85rem; font-weight: 600;
  color: var(--st-body, #2b2f36); padding: .3rem 0; }
.st-fold > summary:hover { color: var(--st-ink, #101214); }
/* Einstellungen: die Seite trägt inzwischen Tabellen und mehrspaltige Formulare
   (Shop, Bereiche, API). Der 1000px-Rahmen der übrigen Seiten wird ihr zu eng,
   also darf sie nach rechts wachsen — die Leseweite der Fließtexte bleibt über
   max-width an den Absätzen begrenzt. */
main.rm:has(.st-wide) { max-width: 1320px; }
/* Abschnitts-Überschrift mit Symbol: dasselbe Symbol wie in der Seitenleiste,
   damit man beim Scrollen wiedererkennt, wo man ist. */
.st-h { display: flex; align-items: center; gap: .5rem; }
.st-h svg { width: 17px; height: 17px; opacity: .55; flex: none; }
/* Abschnitts-Navigation der Einstellungen. Klebend nur, solange sie WIRKLICH
   neben dem Inhalt steht: sobald der Flex-Container umbricht, liegt sie in
   einer eigenen Zeile über dem Inhalt — und eine klebende Leiste schiebt sich
   dann beim Scrollen über die Karten und verdeckt sie. Genau so verschwand
   auf dem Handy der halbe Shop-Abschnitt. */
.st-nav { flex: 0 0 190px; align-self: flex-start; background: #fff;
  border: 1px solid var(--fk-line, #e7e3da); border-radius: 10px; padding: .4rem; }
@media (min-width: 760px) { .st-nav { position: sticky; top: 1rem; } }
/* Schmal: als waagerechte Leiste über dem Inhalt, damit sie nicht eine halbe
   Bildschirmhöhe frisst. */
@media (max-width: 759px) {
  .st-nav { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: .25rem; }
  .st-nav a.st-side { flex: 0 0 auto; }
}
/* Kleiner Knopf in Tabellenzeilen (widerrufen, wechseln, entfernen). Vorher
   stand dieselbe Deklaration in fünf leicht verschiedenen Fassungen inline in
   den Templates — mal .7rem, mal .72rem, mal .75rem, jedes Mal anderes Padding. */
main.rm .btn-xs, main.rm button.btn-xs {
  font: inherit; font-size: .75rem; padding: .15rem .5rem; margin: 0;
  line-height: 1.3; border-radius: 7px; }

/* ══ HOVER: LIME-GLOW ════════════════════════════════════════════
   Der Akzent war bisher CTAs und Live-Status vorbehalten (siehe :root).
   Auf Wunsch zeigt er jetzt auch, worüber die Maus steht — bewusst leise:
   ein Hauch Fläche und ein weicher Schein, keine zweite Randfarbe, damit
   die graue Grundhaltung erhalten bleibt und der Knopf der Blickfang bleibt.
   Eine Fläche pro Ebene reagiert: verschachtelte Karten glühen nicht doppelt. */
.rm-card, .st-sub, table.rm td { transition: box-shadow .16s ease, border-color .16s ease, background-color .16s ease; }

.rm-card:hover {
  border-color: var(--st-go, #cdf24e);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--st-go, #cdf24e) 24%, transparent),
              0 8px 30px color-mix(in srgb, var(--st-go-2, #a8e51e) 20%, transparent); }
/* Immer nur EINE Fläche antwortet: steht die Maus über einer Zeile, einem
   Unterabschnitt oder einer inneren Karte, tritt die umgebende Karte zurück.
   Sonst leuchtet beim Überfahren einer Zeile die halbe Seite mit. */
.rm-card:has(.rm-card:hover),
.rm-card:has(.st-sub:hover),
.rm-card:has(table.rm tr:hover td) { border-color: var(--fk-line, #e6e7ea); box-shadow: none; }
/* Dieselbe Regel eine Ebene tiefer: die API-Key-Tabelle steht in einem
   Unterabschnitt, sonst leuchten Zeile und Abschnitt gemeinsam. */
.st-sub:has(table.rm tr:hover td) { background: transparent;
  border-top-color: var(--fk-line, #e6e7ea); box-shadow: none; }

.st-sub:hover { background: color-mix(in srgb, var(--st-go, #cdf24e) 7%, transparent);
  border-top-color: color-mix(in srgb, var(--st-go, #cdf24e) 60%, var(--fk-line, #e6e7ea));
  box-shadow: 0 0 22px color-mix(in srgb, var(--st-go-2, #a8e51e) 16%, transparent); }

/* Zeilen: border-collapse macht einen Schatten am <tr> unzuverlässig, also
   liegt er an den Zellen. Kopfzeilen haben nur <th> und bleiben damit ruhig. */
table.rm tr:hover td { background: color-mix(in srgb, var(--st-go, #cdf24e) 11%, transparent);
  border-bottom-color: color-mix(in srgb, var(--st-go, #cdf24e) 55%, var(--fk-line, #e6e7ea)); }
table.rm tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--st-go, #cdf24e); }

@media (prefers-reduced-motion: reduce) {
  .rm-card, .st-sub, table.rm td { transition: none; }
}
/* Ein einzelner Bereich wird nur benannt, nicht gewechselt: gleiche Pille wie
   der Wechsler, aber ohne Klick-Anmutung. */
.space-solo { display: inline-flex; align-items: center; margin-right: .7rem;
  cursor: default; }
.space-solo:hover { background: var(--st-accent-soft, #eceef0); }

.ld { color: var(--fk-ink, #222); }
.ld section { padding: 4.5rem 1.2rem; }
.ld .wrap { max-width: 1080px; margin: 0 auto; }
/* Hero photo (self-hosted envelopes flat-lay) with a left→right white wash so
   the ink text stays fully readable and the photo shows through on the right. */
.ld-hero { background:
  linear-gradient(90deg, rgba(250,250,250,.97) 0%, rgba(250,250,250,.9) 40%, rgba(250,250,250,.3) 100%),
  url('/assets/hero-envelopes.webp') center/cover no-repeat, #fafafa; }
.ld-hero .wrap { display: grid; grid-template-columns: 1fr; gap: 3rem;
  align-items: center; }
.ld-hero .wrap > div:first-child { max-width: 44rem; }
.ld-hero h1 { font-size: clamp(2.6rem, 6vw, 4.3rem); line-height: 1.05;
  letter-spacing: -.02em; margin: 0 0 1.2rem; color: var(--st-ink,#17181c); }
.ld-hero h1 em { font-style: normal; background: linear-gradient(180deg, transparent 62%, var(--st-go,#c4f43b) 62%); }
.ld-sub { font-size: 1.15rem; line-height: 1.65; color: var(--st-muted, #6a717b);
  max-width: 34rem; margin: 0 0 2rem; }
.ld-cta { display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, var(--st-go,#c4f43b), var(--st-go-2,#a8e51e));
  color: var(--st-go-ink,#1c2606); font-weight: 700; font-size: 1.05rem;
  padding: .9rem 1.8rem; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--st-go-2,#a8e51e); }
.ld-cta:hover { filter: brightness(1.05); }
.ld-cta svg { width: 19px; height: 19px; }
.ld-cta2 { margin-left: 1.2rem; color: var(--st-ink, #17181c);
  font-weight: 600; text-decoration: none; }
.ld-cta2:hover { text-decoration: underline; }
.ld-note { font-size: .85rem; color: var(--st-faint, #9aa1aa); margin-top: 1rem; }
/* Marken-Visual: das Logo-Tile (Mark 1b) groß, mit Wortmarke. */
.ld-brand { text-align: center; }
.ld-logo { width: min(300px, 70%); margin: 0 auto;
  filter: drop-shadow(0 22px 55px rgba(20,20,22,.20)); }
.ld-wordmark { margin-top: 1.4rem; font-weight: 700; font-size: 1.9rem;
  letter-spacing: .02em; text-transform: lowercase; color: var(--st-ink, #17181c); }
.ld-band { background: var(--st-ink, #17181c); color: #fff; }
.ld-band .wrap { display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; text-align: center; }
@media (max-width: 720px) { .ld-band .wrap { grid-template-columns: 1fr; } }
.ld-band strong { display: block; font-size: 2rem; letter-spacing: -.01em; }
.ld-band span { color: rgba(255,255,255,.7); font-size: .95rem; }
.ld h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -.01em;
  margin: 0 0 .6rem; }
.ld .lead { color: var(--st-muted, #51686c); font-size: 1.05rem; margin: 0 0 2.6rem;
  max-width: 40rem; }
.ld-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 980px) { .ld-features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ld-features { grid-template-columns: 1fr; } }
.ld-feature { background: #fff; border: 1px solid var(--fk-line, #e6e7ea); border-radius: 16px;
  padding: 1.5rem 1.4rem; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
/* Every feature icon wears the brand lime (per Johann 2026-08-04); the "Neu"
   tiles are marked by the badge alone. */
.ld-feature .ic { width: 42px; height: 42px; border-radius: 11px;
  background: var(--st-go, #c4f43b); color: var(--st-go-ink,#1c2606);
  border: 1px solid var(--st-go-2,#a8e51e);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.ld-feature .ic svg { width: 22px; height: 22px; }
.ld-feature h3 { margin: 0 0 .5rem; font-size: 1.08rem; display: flex; align-items: center; gap: .5rem; }
.ld-feature p { margin: 0; color: var(--st-muted, #6a717b); font-size: .93rem; line-height: 1.6; }
.ld-new { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  background: var(--st-go,#c4f43b); color: var(--st-go-ink,#1c2606); border-radius: 999px; padding: .16rem .42rem; }
.ld-flex { background: #f4f4f5; }
.ld-flex .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; }
@media (max-width: 880px) { .ld-flex .wrap { grid-template-columns: 1fr; } }
.ld-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.ld-steps li { counter-increment: s; padding: .55rem 0 .55rem 3rem;
  position: relative; color: var(--st-step, #3c5054); line-height: 1.5; }
.ld-steps li::before { content: counter(s); position: absolute; left: 0;
  top: .45rem; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--st-ink, #17181c); color: #fff;
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ld-code { background: var(--st-ink, #17181c); color: #e6e6e6; border-radius: 14px;
  padding: 1.3rem 1.4rem; font-family: ui-monospace, monospace;
  font-size: .82rem; line-height: 1.7; overflow-x: auto; white-space: pre; }
.ld-chips { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.ld-chips span { background: #fff; border: 1px solid var(--fk-line, #e6e7ea);
  border-radius: 999px; padding: .3rem .85rem; font-size: .82rem; color: var(--st-muted, #6a717b); }
/* Datenschutz-Band: dunkel wie das Zahlen-Band, damit das Selbst-Hosting-
   Versprechen als eigenes Statement heraussticht statt in den Karten unterzugehen. */
/* Self-hosted starfield behind the privacy promise — washed so the text leads. */
.ld-priv { background:
  linear-gradient(180deg, rgba(16,18,20,.72) 0%, rgba(16,18,20,.5) 50%, rgba(16,18,20,.78) 100%),
  url('/assets/stars.webp') center/cover no-repeat, var(--st-ink, #17181c);
  color: #fff; }
.ld-priv .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 880px) { .ld-priv .wrap { grid-template-columns: 1fr; } }
.ld-priv h2 { color: #fff; }
.ld-priv p { color: rgba(255,255,255,.78); line-height: 1.65; }
.ld-priv em { color: var(--st-go, #b8e02e); font-style: normal; font-weight: 700; }
.ld-priv-list { list-style: none; margin: 0; padding: 0; }
.ld-priv-list li { position: relative; padding: .55rem 0 .55rem 2.1rem;
  color: rgba(255,255,255,.78); line-height: 1.55; font-size: .95rem; }
.ld-priv-list li::before { content: '✓'; position: absolute; left: 0; top: .5rem;
  width: 1.35rem; height: 1.35rem; border-radius: 50%; font-size: .8rem; font-weight: 700;
  background: var(--st-go, #b8e02e); color: var(--st-go-ink, #101214);
  display: flex; align-items: center; justify-content: center; }
.ld-priv-list b { display: flex; align-items: center; gap: .45rem; color: #fff; }
.ld-priv-list b svg { width: 16px; height: 16px; opacity: .85; flex: none; }
/* Heading icon (the binary mark after "Kein Byte von Dritten"). */
.ld-hic { display: inline-flex; vertical-align: -3px; margin-left: .2rem; color: #fff; }
.ld-hic svg { width: 26px; height: 26px; }
.ld-trust { text-align: center; font-size: .95rem; color: var(--st-muted, #6a717b);
  padding: 2.2rem 1.2rem !important; border-top: 1px solid var(--fk-line, #e6e7ea);
  border-bottom: 1px solid var(--fk-line, #e6e7ea); background: #fff; }
.ld-trust b { color: var(--st-ink, #17181c); }
.ld-start { background:
  radial-gradient(50% 60% at 50% 0%, rgba(196,244,59,.14), transparent 70%),
  #fafafa; }
.ld-start .karten { max-width: 760px; margin: 0 auto; }
/* Formulare der Landing: gleiche Top-Down-Regeln wie in der App
   (dort an main.rm gebunden). */
.ld form label { display: block; margin: .9rem 0 .3rem; font-weight: 600;
  font-size: .88rem; color: #444; }
.ld form label:first-child { margin-top: 0; }
.ld form input { display: block; width: 100%; box-sizing: border-box; }
.ld form button[type=submit] { margin-top: 1rem; }
.ld-foot { text-align: center; color: var(--st-faint, #7b8f92); font-size: .85rem;
  padding: 2rem 1rem 2.6rem; }
