/* pfortis.de — Landingpage.
 *
 * Statisch, ohne Build-Schritt, ohne Drittanbieter: Schriften liegen in
 * ./fonts (DSGVO, dieselbe Überlegung wie next/font im Portal). Tokens sind
 * die aus DESIGN.md — die Seite soll wie der Vorraum des Portals wirken, nicht
 * wie eine fremde Marketing-Hülle.
 *
 * Bewegung auf dieser Seite ist immer Zustand, nie Schmuck: die Live-Strecke
 * zeigt, was im Haus passiert, die Tagesleiste folgt dem Scrollen, das Modul
 * rastet auf die Schiene, der Hausquerschnitt wandert von selbst durch die
 * Integrationen. Es gibt genau eine Ladesequenz (Hero) und keine
 * Einblende-Kaskade pro Abschnitt. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/inter-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: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/inter-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; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url(fonts/intertight-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: "Inter Tight"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url(fonts/intertight-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; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/jbmono-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: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/jbmono-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; }

:root {
  --bg: #EEF3FB;
  --surface: #FFFFFF;
  --surface-2: #F6F9FE;
  --surface-3: #EEF3FB;
  --ink: #0B2A55;
  --ink-muted: #5A6B89;
  --ink-subtle: #9AA9C4;
  --border: #E1E9F6;
  --border-strong: #C8D5EC;
  --accent: #2461E8;
  --accent-hover: #1B4FCB;
  --accent-on: #FFFFFF;
  --accent-soft: #DCE7FA;
  --accent-ink: #0B2A55;
  --success: #0F7A47;
  --success-bg: #DCF3E4;
  --warning: #8C5A0B;
  --warning-bg: #FBE9C7;
  --danger: #9C2A2A;
  --danger-bg: #FADCDC;
  /* Die Schaltschrank-Grafik ist ein Gerät und bleibt immer dunkel. */
  --night: #07101F;
  --night-2: #0F1B33;
  --night-3: #1A2747;
  --night-ink: #E6ECF8;
  --night-muted: #9AA9C4;
  /* Hervorgehobene Flächen (Schaltschrank-Abschnitt, Abschluss, „So geht's"
   * auf dem Handy): im hellen Schema weiße Karten wie alle anderen, im
   * dunklen die tiefste Fläche. Ein harter Hell-Dunkel-Bruch mitten in der
   * hellen Seite las sich wie ein Loch. */
  --deck-bg: #FFFFFF;
  --deck-ink: #0B2A55;
  --deck-strong: #0B2A55;
  --deck-muted: #5A6B89;
  --deck-tile: #F6F9FE;
  --deck-line: #E1E9F6;
  --deck-badge: #DCE7FA;
  --deck-badge-ink: #2461E8;
  --deck-glow: rgb(36 97 232 / 0.08);
  --deck-shadow: 0 8px 30px rgb(36 97 232 / 0.08), 0 1px 3px rgb(11 42 85 / 0.04);
  --night-accent-soft: rgb(77 138 255 / 0.16);
  --night-accent-ink: #BCD3FF;
  --brand-gradient: linear-gradient(135deg, #4DA3FF 0%, #1B3FD9 100%);

  --radius-sm: 10px;
  --radius-card: 18px;
  --radius-window: 24px; /* Browserfenster, Hausquerschnitt, Schaltschrank, Abschluss */
  --radius-inner: 12px;  /* Flächen in einer Karte */
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(11 42 85 / 0.04);
  --shadow-md: 0 8px 30px rgb(36 97 232 / 0.08), 0 1px 3px rgb(11 42 85 / 0.04);
  --shadow-lg: 0 24px 70px rgb(36 97 232 / 0.16), 0 2px 6px rgb(11 42 85 / 0.05);
  --shadow-xl: 0 40px 120px rgb(36 97 232 / 0.22), 0 12px 32px rgb(11 42 85 / 0.08), 0 2px 6px rgb(11 42 85 / 0.05);

  --font-body: "Inter", ui-sans-serif, sans-serif;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --nav-offset: 96px;
  --max: 1200px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: light;
}

/* Dunkles Schema. Hängt an data-theme, nicht an der Media-Query: das
 * Skript im <head> löst die Wahl (Cookie pfortis-theme, geteilt mit dem
 * Portal) und die Systemeinstellung vor dem ersten Rendern auf. Ohne
 * JavaScript bleibt die Seite hell. */
:root[data-theme="dark"] {
  --bg: #07101F;
  --surface: #0F1B33;
  --surface-2: #131F3A;
  --surface-3: #1A2747;
  --ink: #E6ECF8;
  --ink-muted: #9AA9C4;
  --ink-subtle: #6B7B98;
  --border: #1F2B45;
  --border-strong: #2C3A5C;
  --accent: #4D8AFF;
  --accent-hover: #6FA0FF;
  --accent-on: #07101F;
  --accent-soft: rgba(77, 138, 255, 0.16);
  --accent-ink: #BCD3FF;
  --success: #4CDB91;
  --success-bg: rgba(76, 219, 145, 0.12);
  --warning: #F5B454;
  --warning-bg: rgba(245, 180, 84, 0.12);
  --danger: #FF6B6B;
  --danger-bg: rgba(255, 107, 107, 0.12);
  --night: #040A15;
  --night-2: #0B1529;
  --night-3: #15213D;
  --deck-bg: #040A15;
  --deck-ink: #E6ECF8;
  --deck-strong: #FFFFFF;
  --deck-muted: #9AA9C4;
  --deck-tile: rgb(255 255 255 / 0.05);
  --deck-line: rgb(255 255 255 / 0.08);
  --deck-badge: rgb(77 138 255 / 0.16);
  --deck-badge-ink: #BCD3FF;
  --deck-glow: rgb(77 138 255 / 0.22);
  --deck-shadow: 0 8px 30px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.06);
  --shadow-md: 0 8px 30px rgb(0 0 0 / 0.35), 0 1px 3px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 24px 70px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 40px 120px rgb(0 0 0 / 0.6), 0 12px 32px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}
/* Auf dunklem Grund brauchen die beiden Nachtflächen eine Kante. */
:root[data-theme="dark"] .cabinet { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); }
:root[data-theme="dark"] .closing-card { box-shadow: var(--shadow-xl), inset 0 0 0 1px rgb(255 255 255 / 0.08); }
/* Beim Umschalten laufen keine Farbübergänge: sonst blenden hundert
 * Elemente einzeln über, statt dass die Seite umschaltet. */
.theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-offset); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  /* clip statt hidden: hidden macht body auf iOS zum Scroll-Container, dann
   * klebt der Header falsch und die Seite lässt sich oben nicht ganz zeigen. */
  overflow-x: hidden;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; }
.tnum { font-family: var(--font-mono); font-feature-settings: "tnum"; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Buttons: dieselbe Grammatik wie .btn-* im Portal ─────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--radius-sm); border: 0;
  font: 600 1rem/1 var(--font-body);
  cursor: pointer; white-space: nowrap;
  transition: background-color 120ms, color 120ms, box-shadow 160ms, transform 160ms var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-primary { background: var(--accent); color: var(--accent-on); box-shadow: 0 6px 18px rgb(36 97 232 / 0.28); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-on); box-shadow: 0 10px 26px rgb(36 97 232 / 0.34); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md); }
.btn-secondary:hover { color: var(--ink); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 14px; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn-xs { min-height: 32px; padding: 0 12px; font-size: 0.8125rem; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ── Navigation ───────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background-color 200ms, box-shadow 200ms;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 1px 0 var(--border), 0 8px 30px rgb(36 97 232 / 0.06);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { flex: none; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.brand svg { height: 30px; width: auto; }
.nav-links { display: flex; gap: 2px; margin-left: 16px; }
.nav-links a {
  position: relative;
  color: var(--ink-muted); font-weight: 500; font-size: 0.9375rem; white-space: nowrap;
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: color 160ms, background-color 160ms;
}
.nav-links a:hover { color: var(--ink); background: var(--accent-soft); }
.nav-links a.is-active { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease-out);
}
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; margin: 0 auto; transition: transform 200ms var(--ease-out), background-color 200ms;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: none; }

/* Farbschema: drei Symbole wie Hell/Dunkel/System in den Portal-Einstellungen. */
.theme-switch {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill);
  background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border);
}
.theme-switch button {
  width: 30px; height: 30px; border: 0; border-radius: var(--radius-pill); padding: 0;
  background: transparent; color: var(--ink-muted); cursor: pointer;
  display: grid; place-items: center;
  transition: background-color 160ms, color 160ms, box-shadow 160ms;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.theme-switch svg { width: 16px; height: 16px; }
.nav-actions .theme-switch { margin-right: 8px; }
.mobile-theme { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 4px; min-height: 60px; border-bottom: 1px solid var(--border); color: var(--ink); font-weight: 500; }
.mobile-theme .theme-switch button { width: 44px; height: 44px; }

/* Ab 1120px abwärts klappt die Navigation ein: sechs Links, Farbschema und
 * zwei Knöpfe passen darunter nicht mehr in eine Zeile. */
@media (max-width: 1120px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }
  /* Auf- und Zuklappen über grid-template-rows (0fr → 1fr), nicht über
   * max-height: das Menü bekommt so exakt seine eigene Höhe. */
  .mobile-menu {
    display: grid; grid-template-rows: 0fr;
    background: var(--surface);
    transition: grid-template-rows 320ms var(--ease-out);
  }
  .mobile-menu-clip { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s 320ms; }
  .nav.is-open .mobile-menu-clip { visibility: visible; transition: visibility 0s; }
  .mobile-menu-inner { display: grid; gap: 4px; padding: 8px var(--gutter) 20px; }
  .nav.is-open { background: var(--surface); box-shadow: var(--shadow-md); }
  .nav.is-open .mobile-menu { grid-template-rows: 1fr; }
  .mobile-menu a:not(.btn) {
    color: var(--ink); font-weight: 500; padding: 12px 4px; min-height: 44px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu .btn { margin-top: 12px; }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 9vw, 120px); overflow-x: clip; }
/* Ein einziger weicher Lichtfleck hinter dem Portalfenster. Kein Raster,
 * keine Blobs: die Tiefe kommt aus dem Kartenstapel selbst. */
.hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: -8%; top: -6%; width: 62%; height: 110%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 10%, transparent), transparent 72%);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.9rem);
  font-weight: 800; line-height: 0.98; letter-spacing: -0.035em;
}
.hero h1 .line { display: block; }
.hero-lede {
  margin-top: 28px; max-width: 32em;
  font-size: clamp(1.075rem, 1.4vw, 1.2rem); line-height: 1.55; color: var(--ink-muted);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts {
  display: grid; gap: 12px; margin: 32px 0 0; padding: 0; list-style: none;
  color: var(--ink-muted); font-size: 0.9375rem;
}
.hero-facts li { display: flex; align-items: center; gap: 10px; }
.hero-facts svg { flex: none; color: var(--success); }

/* Ladesequenz: der einzige unaufgeforderte Auftritt der Seite. */
.js .intro { opacity: 0; transform: translateY(18px); }
.js.is-ready .intro {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ── Portalfenster (Hero-Visual) ──────────────────────────────────────── */
.hero-visual { position: relative; }
/* Zwei Geisterkarten dahinter: dieselbe Karte für andere Gebäude. */
.win-ghost {
  position: absolute; inset: 0; border-radius: var(--radius-window); background: var(--surface);
  box-shadow: var(--shadow-md); pointer-events: none;
  transition: transform 1100ms var(--ease-out), opacity 900ms;
}
.js .win-ghost { transform: translateY(0) scale(1); opacity: 0; }
.js.is-ready .win-ghost.g1 { transform: translateY(-16px) scale(0.955); opacity: 0.75; transition-delay: 420ms; }
.js.is-ready .win-ghost.g2 { transform: translateY(-31px) scale(0.91); opacity: 0.42; transition-delay: 520ms; }
.win {
  position: relative; z-index: 1;
  background: var(--surface); border-radius: var(--radius-window); box-shadow: var(--shadow-xl);
  overflow: visible;
}
.js .win.intro { transform: perspective(1400px) rotateY(-7deg) rotateX(3deg) translateY(24px); }
.js.is-ready .win.intro { transform: none; transition: opacity 700ms var(--ease-out), transform 1200ms var(--ease-out); }
.win-bar {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px;
  border-bottom: 1px solid var(--border); border-radius: var(--radius-window) var(--radius-window) 0 0;
  background: var(--surface-2);
}
.win-dots { display: inline-flex; gap: 6px; }
.win-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.win-url {
  flex: 1; display: flex; align-items: center; gap: 7px; justify-content: center;
  height: 26px; padding: 0 12px; border-radius: 8px; background: var(--surface);
  font: 500 0.75rem/1 var(--font-body); color: var(--ink-muted); box-shadow: var(--shadow-sm);
  max-width: 340px; margin: 0 auto; white-space: nowrap; overflow: hidden;
}
.win-url svg { width: 11px; height: 11px; color: var(--success); }
.win-body { padding: clamp(16px, 2.2vw, 24px); }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-title { font: 700 1.0625rem/1.25 var(--font-display); letter-spacing: -0.015em; }
.live-sub { font-size: 0.875rem; color: var(--ink-muted); margin-top: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px;
  border-radius: var(--radius-pill); font-size: 0.8125rem; font-weight: 600;
  background: var(--surface-3); color: var(--ink-muted); white-space: nowrap;
}
.pill-ok { background: var(--success-bg); color: var(--success); }
.pill-warn { background: var(--warning-bg); color: var(--warning); }
.pill-danger { background: var(--danger-bg); color: var(--danger); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-ok .dot, .pill-danger .dot { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.35; } }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.kpi { border-radius: var(--radius-inner); background: var(--surface-2); padding: 10px 12px; display: grid; gap: 2px; }
.kpi small { font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); }
.kpi strong { font: 700 1.25rem/1.1 var(--font-display); letter-spacing: -0.02em; font-feature-settings: "tnum"; }
.kpi strong span { font: 500 0.8125rem/1 var(--font-body); color: var(--ink-muted); margin-left: 4px; }

.chain {
  display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center; margin: 24px 0 16px;
}
.node { display: grid; justify-items: center; gap: 8px; }
.node-box {
  display: grid; place-items: center;
  width: clamp(46px, 5vw, 58px); height: clamp(46px, 5vw, 58px);
  border-radius: var(--radius-inner); background: var(--surface-2); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: box-shadow 240ms, background-color 240ms, color 240ms, transform 240ms var(--ease-out);
}
.node-box svg { width: 45%; height: 45%; }
.node.is-hot .node-box { background: var(--accent-soft); color: var(--accent); transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent); }
.node-box.is-brand { background: var(--brand-gradient); color: #fff; box-shadow: 0 8px 20px rgb(36 97 232 / 0.3); }
.node.is-hot .node-box.is-brand { box-shadow: 0 8px 20px rgb(36 97 232 / 0.3), 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent); background: var(--brand-gradient); color: #fff; }
.node-label { font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }

.wire { position: relative; height: 2px; margin: 0 8px 24px; background: repeating-linear-gradient(to right, var(--border-strong) 0 6px, transparent 6px 11px); }
.wire .pulse {
  position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--accent); opacity: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 18px var(--accent);
}

/* Die Tür: ein Rahmen, ein Blatt, das sich in die Tiefe dreht. */
.door { perspective: 260px; }
.door .node-box { background: var(--surface-2); overflow: hidden; position: relative; }
.door-leaf {
  position: absolute; inset: 7px 9px 0 9px;
  background: linear-gradient(180deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 82%, var(--accent)) 100%);
  border-radius: 3px 3px 0 0;
  transform-origin: left center; transform: rotateY(0deg);
  transition: transform 700ms var(--ease-out);
}
.door-leaf::after {
  content: ""; position: absolute; right: 5px; top: 52%; width: 4px; height: 4px; border-radius: 50%;
  background: var(--bg);
}
.door.is-open .door-leaf { transform: rotateY(-68deg); }
.door-lamp {
  position: absolute; top: 3px; right: 4px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-subtle); z-index: 1; transition: background-color 200ms, box-shadow 200ms;
}
.door.is-open .door-lamp { background: var(--success); box-shadow: 0 0 8px var(--success); }

.log { border-radius: var(--radius-inner); background: var(--surface-2); padding: 6px 4px; }
.log-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 6px; }
.log-head .log-title { font: 600 0.8125rem/1 var(--font-body); color: var(--ink-muted); }
.log ol { list-style: none; margin: 0; padding: 0; min-height: 172px; }
.log li {
  display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 12px; border-radius: 10px; font-size: 0.875rem;
  transition: background-color 1200ms;
}
.log li.is-new { animation: row-in 600ms var(--ease-out); background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
@keyframes row-in { from { opacity: 0; transform: translateY(-10px); } }
.log time { color: var(--ink-muted); font-size: 0.8125rem; }
.log .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .who b { font-weight: 600; }
.log .who span { color: var(--ink-muted); }
.log .pill { height: 22px; font-size: 0.75rem; padding: 0 8px; }
.live-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.live-foot p { font-size: 0.8125rem; color: var(--ink-muted); max-width: 26em; }

/* Push-Meldung, die aus dem Fenster heraus aufs Handy fällt. */
.toast {
  position: absolute; left: -24px; bottom: 72px; z-index: 2;
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center;
  width: min(300px, 80%); padding: 12px 14px; border-radius: var(--radius-inner);
  background: var(--surface); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(14px) scale(0.96); pointer-events: none;
  transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-out);
}
.toast.is-on { opacity: 1; transform: none; }
.toast-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-gradient); color: #fff; }
.toast-icon svg { width: 18px; height: 18px; }
.toast b { display: block; font-size: 0.875rem; font-weight: 600; line-height: 1.25; }
.toast span { display: block; font-size: 0.75rem; color: var(--ink-muted); margin-top: 2px; }
.toast .toast-app { position: absolute; right: 12px; top: 10px; font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); }
.toast.is-danger .toast-icon { background: var(--danger-bg); color: var(--danger); }

/* ── Abschnitte ───────────────────────────────────────────────────────── */
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section.tight { padding-top: 0; }
.band { background: var(--surface); }
.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2, .h2 {
  font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 750; line-height: 1.06; letter-spacing: -0.028em;
}
.section-head p { margin-top: 20px; font-size: 1.125rem; color: var(--ink-muted); max-width: 38em; }

/* Einmalige Einblendung beim Scrollen: nur für die Bilder, die etwas zeigen. */
.js .rise { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out); }
.js .rise.is-in { opacity: 1; transform: none; }

/* ── Ein ganz normaler Dienstag (Tagesleiste) ─────────────────────────── */
.day-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.day-grid .section-head { position: sticky; top: var(--nav-offset); margin-bottom: 0; }
.day-sum { margin-top: 28px; display: grid; gap: 10px; }
.day-sum div { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.day-sum strong { font: 700 1.5rem/1 var(--font-display); letter-spacing: -0.03em; font-feature-settings: "tnum"; min-width: 2.2em; }
.day-sum span { color: var(--ink-muted); font-size: 0.9375rem; }

.day { position: relative; list-style: none; margin: 0; padding: 0; }
.day::before {
  content: ""; position: absolute; left: 5.1em; top: 12px; bottom: 12px; width: 2px;
  background: var(--border-strong); border-radius: 2px;
}
/* Die Linie hat immer ihre volle Länge und wird nur skaliert — kein Layout
 * pro Scroll-Schritt. */
.day-fill {
  position: absolute; left: 5.1em; top: 12px; width: 2px; height: 0; border-radius: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: top;
  transition: transform 240ms var(--ease-out);
}
.day li {
  position: relative; display: grid; grid-template-columns: 4.4em 20px minmax(0, 1fr); gap: 0 16px; align-items: start;
  padding: 18px 0;
}
.day time {
  font-family: var(--font-mono); font-feature-settings: "tnum"; font-size: 0.9375rem; font-weight: 600;
  color: var(--ink-muted); padding-top: 4px; transition: color 300ms;
}
.day .mark {
  width: 20px; height: 20px; border-radius: 50%; margin-top: 4px;
  background: var(--bg); box-shadow: inset 0 0 0 2px var(--border-strong);
  display: grid; place-items: center; transition: box-shadow 300ms, background-color 300ms;
}
.day .mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: transparent; transition: background-color 300ms; }
.day-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 240px); gap: 20px 24px; align-items: center;
  padding: 20px 24px; border-radius: var(--radius-inner);
  transition: background-color 300ms, box-shadow 300ms, transform 300ms var(--ease-out);
}
.day h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.day p { color: var(--ink-muted); margin-top: 6px; font-size: 1rem; }
.day li.is-now time { color: var(--accent); }
.day li.is-now .mark { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent); background: var(--surface); }
.day li.is-now .mark::after { background: var(--accent); }
.day li.is-now .day-body { background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(4px); }
.day li.is-past time { color: var(--ink); }
.day li.is-past .mark { box-shadow: inset 0 0 0 2px var(--accent); }
.day li.is-past .mark::after { background: var(--accent); }

/* Die kleinen Produktausschnitte in der Tagesleiste. */
.mini { border-radius: var(--radius-inner); background: var(--surface-2); padding: 10px 12px; font-size: 0.8125rem; display: grid; gap: 8px; min-width: 0; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-row b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row small { color: var(--ink-muted); font-size: 0.75rem; display: block; }
.mini .pill { height: 22px; font-size: 0.75rem; padding: 0 8px; }
.mini .code { font-family: var(--font-mono); letter-spacing: 0.14em; font-weight: 600; }
.mini-btn { height: 30px; border-radius: 8px; border: 0; background: var(--accent); color: var(--accent-on); font-size: 0.75rem; font-weight: 600; display: grid; place-items: center; }
.mini-btn.ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.mini-bar { height: 8px; border-radius: 4px; background: var(--surface-3); position: relative; overflow: hidden; }
.mini-bar i { position: absolute; inset: 0 auto 0 0; width: 62%; border-radius: 4px; background: var(--accent); }

/* ── Schaltschrank ────────────────────────────────────────────────────── */
.cabinet { background: var(--deck-bg); color: var(--deck-ink); box-shadow: var(--deck-shadow); border-radius: clamp(0px, 3vw, var(--radius-window)); margin: 0 clamp(0px, 1.2vw, 16px); position: relative; overflow: hidden; }
.cabinet::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--deck-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--deck-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 70% at 78% 50%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 78% 50%, #000 10%, transparent 70%);
}
.cabinet h2, .cabinet h3 { color: var(--deck-strong); }
.cabinet .section-head p { color: var(--deck-muted); }
.cabinet-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.rail-art { border-radius: var(--radius-window); background: var(--night-2); padding: clamp(16px, 2.6vw, 28px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), var(--shadow-lg); }
.rail-art svg { width: 100%; height: auto; overflow: visible; }
.rail-art .flow { stroke-dasharray: 4 7; }
.rail-art.is-in .flow { animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -22; } }
.rail-art.is-in .blink { animation: blink 1.8s steps(2, jump-none) infinite; }
.rail-art.is-in .blink-2 { animation: blink 0.9s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.rail-art .module { transform: translateY(-34px); opacity: 0; transition: transform 1000ms var(--ease-out), opacity 500ms; }
.rail-art.is-in .module { transform: none; opacity: 1; }
.rail-art .cloud { opacity: 0; transition: opacity 600ms 700ms; }
.rail-art.is-in .cloud { opacity: 1; }
.rail-caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; font-size: 0.8125rem; color: var(--deck-muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 20px 16px; margin: 0 -16px;
  border-radius: var(--radius-inner);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-inner);
  background: var(--deck-badge); color: var(--deck-badge-ink); font: 700 1.0625rem/1 var(--font-display);
}
.steps h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; }
.steps p { margin-top: 6px; color: var(--deck-muted); }
.cabinet-note {
  margin-top: 28px; padding: 16px 18px; border-radius: var(--radius-inner);
  background: var(--deck-tile); box-shadow: inset 0 0 0 1px var(--deck-line);
  display: flex; gap: 14px; align-items: flex-start; font-size: 0.9375rem; color: var(--deck-muted);
}
.cabinet-note svg { flex: none; color: var(--deck-badge-ink); margin-top: 2px; }
.cabinet-note b { color: var(--deck-strong); font-weight: 600; }

/* ── Portal-Funktionen ────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.tile {
  background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-md);
  padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 24px; min-width: 0;
}
.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tile h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
.tile-head p, .tile > div > p { margin-top: 8px; color: var(--ink-muted); max-width: 32em; }
.t-7 { grid-column: span 7; }
.t-5 { grid-column: span 5; }

.mock { border-radius: var(--radius-inner); background: var(--surface-2); padding: 8px; margin-top: auto; font-size: 0.875rem; }
.mock-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 6px 10px; }
.mock-bar span { font-size: 0.8125rem; color: var(--ink-muted); }
.mock-table { width: 100%; border-collapse: collapse; }
.mock-table th { text-align: left; font-weight: 600; font-size: 0.75rem; color: var(--ink-muted); padding: 8px 10px; }
.mock-table td { padding: 10px; border-top: 1px solid var(--border); vertical-align: middle; }
.mock-table td:first-child { font-weight: 600; }
.mock-table tr.is-new { animation: row-in 600ms var(--ease-out); }
.mock-table tr.is-new td { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.mock-table tr.is-new td:first-child { border-radius: 8px 0 0 8px; }
.mock-table tr.is-new td:last-child { border-radius: 0 8px 8px 0; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; margin: 2px 4px 2px 0; border-radius: 7px; background: var(--surface-3); color: var(--ink); font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.chip-global { background: var(--brand-gradient); color: #fff; }
.code { letter-spacing: 0.12em; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.sync .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: breathe 0.9s ease-in-out infinite; }
.sync.is-done { color: var(--success); }
.sync.is-done .dot { background: var(--success); animation: none; }

.week { display: grid; gap: 7px; padding: 8px 6px; position: relative; }
.week-row { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 10px; align-items: center; font-size: 0.8125rem; color: var(--ink-muted); }
.week-track { position: relative; height: 18px; border-radius: 6px; background: var(--surface-3); }
.week-bar { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--accent); }
.week-bar.soft { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.week-axis { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 10px; font-size: 0.75rem; color: var(--ink-muted); }
.week-axis div { display: flex; justify-content: space-between; }
.week-now {
  position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--ink);
  left: 0; opacity: 0; transition: opacity 400ms;
}
.week-now::after {
  content: "jetzt"; position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font: 600 0.75rem/1 var(--font-body); color: var(--ink); background: var(--surface); padding: 3px 6px; border-radius: 6px; box-shadow: var(--shadow-sm);
}
.week-now.is-on { opacity: 1; }
.week-row.is-today span { color: var(--ink); font-weight: 600; }

.phone-row { display: flex; gap: 20px; align-items: flex-end; margin-top: auto; }
.phone {
  flex: none; width: 168px; aspect-ratio: 9 / 18.5; border-radius: 30px; padding: 7px;
  background: var(--ink); box-shadow: var(--shadow-lg);
}
.phone-screen { height: 100%; border-radius: var(--radius-window); background: var(--bg); padding: 26px 12px 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.phone-screen .ps-title { font: 700 0.9375rem/1.1 var(--font-display); letter-spacing: -0.01em; }
.phone-screen .ps-sub { font-size: 0.75rem; color: var(--ink-muted); }
.ps-door { background: var(--surface); border-radius: var(--radius-inner); padding: 10px; box-shadow: var(--shadow-md); display: grid; gap: 8px; cursor: pointer; }
.ps-door b { font-size: 0.75rem; }
.ps-open { height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-on); font-size: 0.75rem; font-weight: 600; display: grid; place-items: center; transition: background-color 200ms, transform 120ms; }
.ps-door.muted .ps-open { background: var(--surface-3); color: var(--ink); }
.ps-door.is-opening .ps-open { background: var(--success); transform: scale(0.97); }
.pass { flex: 1; min-width: 0; border-radius: var(--radius-inner); padding: 14px; background: var(--brand-gradient); color: #fff; box-shadow: var(--shadow-md); display: grid; gap: 10px; max-width: 220px; }
.pass small { font-size: 0.75rem; opacity: 0.8; display: block; }
.pass strong { font: 700 1rem/1.1 var(--font-display); }
.pass .qr { width: 64px; height: 64px; background: #fff; border-radius: 8px; padding: 6px; }
.pass .qr svg { width: 100%; height: 100%; }

.timeline { list-style: none; margin: 0; padding: 4px 6px; display: grid; }
.timeline li { display: grid; grid-template-columns: 3.4em 14px minmax(0, 1fr); gap: 12px; align-items: start; padding: 9px 4px; }
.timeline time { font-size: 0.75rem; color: var(--ink-muted); padding-top: 2px; }
.timeline .mark { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--border-strong); }
.timeline .mark.ok { background: var(--success); }
.timeline .mark.alarm { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.timeline .mark.info { background: var(--accent); }
.timeline .txt { font-size: 0.875rem; }
.timeline .txt span { display: block; color: var(--ink-muted); font-size: 0.8125rem; }
.alarm-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 4px 6px; padding: 12px; border-radius: var(--radius-inner); background: var(--danger-bg); color: var(--danger); font-size: 0.875rem; transition: background-color 300ms, color 300ms; }
.alarm-card b { color: var(--danger); display: flex; align-items: center; gap: 8px; }
.alarm-card b .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: breathe 1.6s ease-in-out infinite; }
.alarm-card button { font: 600 0.8125rem/1 var(--font-body); height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm); }
.alarm-card button:hover { background: var(--surface-2); }
.alarm-card button:active { transform: scale(0.97); }
.alarm-card button:disabled { cursor: default; background: transparent; box-shadow: none; color: var(--success); }
.alarm-card.is-acked { background: var(--success-bg); color: var(--success); }
.alarm-card.is-acked b { color: var(--success); }
.alarm-card.is-acked b .dot { animation: none; }

/* ── Integrationen ────────────────────────────────────────────────────── */
.integ { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.integ-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.integ-btn {
  position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  text-align: left; padding: 16px 20px; min-height: 56px; border: 0; border-radius: var(--radius-inner); cursor: pointer;
  background: transparent; color: var(--ink); font: inherit; overflow: hidden;
  transition: background-color 160ms, box-shadow 200ms;
}
.integ-btn:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.integ-btn .name { font: 650 1.125rem/1.25 var(--font-display); letter-spacing: -0.01em; transition: color 200ms; }
.integ-btn .desc {
  grid-column: 1 / -1; color: var(--ink-muted); font-size: 1rem;
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows 360ms var(--ease-out), opacity 300ms; opacity: 0;
}
.integ-btn .desc > span { overflow: hidden; }
.integ-btn[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-md); }
.integ-btn[aria-pressed="true"] .name { color: var(--accent); }
.integ-btn[aria-pressed="true"] .desc { grid-template-rows: 1fr; opacity: 1; }
.integ-btn .pill { height: 22px; font-size: 0.75rem; }
/* Restlaufzeit des automatischen Wechsels als dünne Linie am Kartenfuß. */
.integ-btn .timer { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; opacity: 0; }
.integ-btn[aria-pressed="true"] .timer.is-running { opacity: 1; animation: timer var(--cycle, 4200ms) linear forwards; }
@keyframes timer { to { transform: scaleX(1); } }

.house { position: sticky; top: var(--nav-offset); background: var(--surface); border-radius: var(--radius-window); box-shadow: var(--shadow-md); padding: clamp(12px, 2vw, 24px); }
.house svg { width: 100%; height: auto; overflow: visible; }
.house .ln { fill: none; stroke: var(--border-strong); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.house .fl { fill: var(--surface-2); stroke: var(--ink-muted); stroke-width: 1.75; stroke-linejoin: round; }
.house .fl-3 { fill: var(--surface-3); }
.house .earth { fill: var(--surface-3); }
.house .txt { font: 600 11px var(--font-body); fill: var(--ink-muted); }
.house .zone { transition: opacity 300ms; }
.house .zone .z-fill { fill: var(--surface); stroke: var(--ink-muted); stroke-width: 1.75; transition: fill 300ms, stroke 300ms; }
.house .zone .z-line { fill: none; stroke: var(--ink-muted); stroke-width: 1.75; stroke-linecap: round; transition: stroke 300ms; }
.house .zone.is-active .txt { fill: var(--accent); }
.house .zone .cone { fill-opacity: 0.45; stroke-dasharray: 3 3; }
.house .zone .z-dot { fill: var(--ink-muted); transition: fill 300ms; }
.house .zone .ring { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.house[data-active] .zone { opacity: 0.5; }
.house[data-active] .zone.is-active { opacity: 1; }
.house .zone.is-active .z-fill { fill: var(--accent-soft); stroke: var(--accent); }
.house .zone.is-active .z-line { stroke: var(--accent); }
.house .zone.is-active .z-dot { fill: var(--accent); }
.house .zone.is-active .ring { animation: ring 1.8s var(--ease-out) infinite; }
@keyframes ring { 0% { opacity: 0.8; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.8); } }
.house .zone.is-active .flow { stroke-dasharray: 5 6; animation: flow 1s linear infinite; }
.house-status {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border-radius: var(--radius-inner);
  background: var(--surface-2); font-size: 0.875rem; min-height: 44px;
}
.house-status b { font-weight: 600; }
.house-status span { color: var(--ink-muted); }
.house-status .pill { margin-left: auto; }

/* ── Branchen ─────────────────────────────────────────────────────────── */
.fields { display: grid; gap: 20px; }
.field {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(240px, 300px); gap: 20px clamp(24px, 4vw, 56px);
  padding: clamp(24px, 3.4vw, 40px); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-md);
  align-items: center;
}
.field h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.field-sub { font: 500 0.9375rem/1.4 var(--font-body); color: var(--ink-muted); margin-top: 8px; }
.field p { color: var(--ink-muted); font-size: 1.0625rem; }
.field ul { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.field li { font-size: 0.875rem; font-weight: 500; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.field .mini { padding: 12px; gap: 6px; }
.mini-list { display: grid; gap: 4px; }
.mini-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.mini-list b { font-weight: 600; font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list small { display: block; color: var(--ink-muted); font-size: 0.75rem; }
.mini-more { text-align: center; font-size: 0.75rem; color: var(--ink-muted); padding-top: 4px; }
.mini-group { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 8px; align-items: center; font-size: 0.75rem; }
.mini-group b { font-weight: 600; white-space: nowrap; }
.mini-group .mini-bar i { background: var(--accent); }
.mini-group .mini-bar.soft i { background: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ── Sicherheit: Datenblatt ───────────────────────────────────────────── */
/* Eine Karte: oben das Datenblatt, unten ein ruhiges Band mit drei
 * Zusatzpunkten. Die Trennlinien sind die 1px-Lücken auf --border. */
.trust-card { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-md); background: var(--border); display: grid; gap: 1px; }
.trust-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  margin: 0;
}
.trust-grid > div { background: var(--surface); padding: clamp(22px, 2.6vw, 32px); display: grid; gap: 12px; align-content: start; }
.trust-grid dt { font: 650 1.125rem/1.3 var(--font-display); letter-spacing: -0.01em; display: grid; gap: 14px; }
.trust-grid dt .ico { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.trust-grid dt svg { width: 22px; height: 22px; }
.trust-grid dd { margin: 0; color: var(--ink-muted); font-size: 1rem; }
.trust-foot { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; }
.trust-foot li {
  display: flex; align-items: center; gap: 12px; background: var(--surface-2);
  padding: 16px clamp(22px, 2.6vw, 32px); font-size: 0.875rem; line-height: 1.45; color: var(--ink-muted);
}
.trust-foot svg { flex: none; width: 20px; height: 20px; color: var(--ink-muted); }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq-grid .section-head { margin-bottom: 0; position: sticky; top: var(--nav-offset); }
.faq details { border-bottom: 1px solid var(--border-strong); }
.faq details:first-of-type { border-top: 1px solid var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: center;
  padding: 24px 0; min-height: 44px; font: 650 1.125rem/1.35 var(--font-display); letter-spacing: -0.01em;
  transition: color 160ms;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform 240ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq .answer { padding: 0 0 24px; color: var(--ink-muted); max-width: 36em; }
.faq details[open] .answer { animation: row-in 360ms var(--ease-out); }

/* ── Abschluss ────────────────────────────────────────────────────────── */
.closing { padding-bottom: clamp(56px, 8vw, 96px); }
.closing-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-window); padding: clamp(32px, 6vw, 64px);
  background: var(--deck-bg); color: var(--deck-ink); box-shadow: var(--shadow-xl);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 64px); align-items: center;
}
.closing-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 50% 70% at 85% 50%, var(--deck-glow), transparent 70%);
}
.closing-card > * { position: relative; }
.closing-card h2 { color: var(--deck-strong); font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 800; letter-spacing: -0.032em; line-height: 1.04; }
.closing-card p { margin-top: 16px; color: var(--deck-muted); font-size: 1.125rem; max-width: 34em; }
.closing-card .hero-ctas { margin-top: 28px; }
.closing-card .btn-secondary { background: var(--deck-tile); color: var(--deck-strong); box-shadow: inset 0 0 0 1px var(--deck-line); }
.closing-card .btn-secondary:hover { background: var(--deck-badge); color: var(--deck-strong); }
.path { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: path; }
.path li {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 16px 20px; border-radius: var(--radius-inner); background: var(--deck-tile); box-shadow: inset 0 0 0 1px var(--deck-line);
}
.path li::before {
  counter-increment: path; content: counter(path);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--deck-badge); color: var(--deck-badge-ink); font: 700 0.9375rem/1 var(--font-display);
}
.path li > div { min-width: 0; }
.path b { display: block; color: var(--deck-strong); font-weight: 600; font-size: 1rem; }
.path span { display: block; color: var(--deck-muted); font-size: 0.875rem; margin-top: 2px; }

.footer { padding: 48px 0 64px; color: var(--ink-muted); font-size: 0.9375rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer a { color: var(--ink-muted); display: inline-flex; min-height: 44px; align-items: center; }
.footer a:hover { color: var(--ink); }
.footer a[hidden] { display: none; }
.footer .brand svg { height: 24px; }
/* Handy: Marke und © in einer Zeile, darunter die Links in genau einer
 * Reihe, auf volle Breite verteilt. Die Mailadresse fällt hier weg; sie
 * steht im Impressum, und jeder Beratungsknopf öffnet sie ohnehin. */
@media (max-width: 640px) {
  .footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); font-size: 0.875rem; }
  .footer-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 16px; align-items: center; }
  .footer-inner > .brand { grid-row: 1; }
  .footer-inner > span { grid-row: 1; grid-column: 2; text-align: right; font-size: 0.8125rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .footer nav {
    grid-row: 2; grid-column: 1 / -1; flex-wrap: nowrap; justify-content: space-between; gap: 8px;
    margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--border-strong);
  }
  .footer nav a { white-space: nowrap; }
  .footer #legal-mail { display: none; }
}

/* ── Responsiv ────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .field { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .field .mini { grid-column: 1 / -1; }
  .day-body { grid-template-columns: minmax(0, 1fr); }
  .day-body .mini { max-width: 320px; }
}
@media (max-width: 1000px) {
  .hero-grid, .cabinet-grid, .integ, .day-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .house, .day-grid .section-head, .faq-grid .section-head { position: static; }
  .integ .house { order: -1; }
  .t-7, .t-5 { grid-column: span 12; }
  .closing-card { grid-template-columns: minmax(0, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-foot { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { margin-top: 12px; }
  .win-ghost { display: none; }
  .day-grid .section-head { margin-bottom: 8px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hide-sm { display: none !important; }
  /* Hero auf dem Handy: Headline, ein kurzer Satz, eine Aktion, dann sofort
   * das Portalfenster. Die drei Fakten rücken unter das Fenster, damit der
   * erste Bildschirm zeigt statt aufzählt. Die linke Spalte löst sich dafür
   * per display: contents in ihre Kinder auf. */
  .hero { padding-top: 24px; padding-bottom: 56px; }
  .hero-grid { gap: 28px; }
  .hero-grid > div:first-child { display: contents; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3rem); }
  .hero-lede { margin-top: -8px; font-size: 1rem; line-height: 1.5; }
  .hero-ctas { margin-top: -4px; gap: 4px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-ctas .btn-secondary { background: transparent; box-shadow: none; color: var(--accent); }
  .hero-ctas .btn-secondary:hover { transform: none; color: var(--accent-hover); }
  .hero-visual { margin-top: 0; }
  .hero-facts { order: 10; margin: 0; gap: 10px; font-size: 0.9375rem; }
  .hero-facts li { align-items: flex-start; }
  .hero-facts svg { margin-top: 3px; }
  .win-body { padding: 14px; }
  .kpis { gap: 8px; margin-top: 14px; }
  .kpi { padding: 8px 10px; }
  .kpi strong { font-size: 1.0625rem; }
  .chain { margin: 18px 0 14px; }
  .node-label { font-size: 0.6875rem; }
  .wire { margin: 0 3px 24px; }
  /* Protokollzeilen bleiben einzeilig; wer abschneidet, schneidet den Ort ab. */
  .log li { grid-template-columns: 3.6em minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; font-size: 0.8125rem; }
  .log ol { min-height: 152px; }
  .live-foot { margin-top: 12px; }
  .live-foot p { font-size: 0.8125rem; }
  /* Die Push-Meldung legt sich wie ein Banner oben aufs Fenster. */
  .toast { left: 8px; right: 8px; width: auto; bottom: auto; top: -10px; transform: translateY(-14px) scale(0.96); }
  .toast.is-on { transform: none; }
  .phone-row { flex-wrap: wrap; }
  .pass { max-width: none; }
  .field { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .rail-caption { flex-direction: column; gap: 4px; }
  .day::before, .day-fill { left: 4.05em; }
  .day li { grid-template-columns: 3.4em 20px minmax(0, 1fr); gap: 0 10px; }
  .day time { font-size: 0.8125rem; }
  .day-body { padding: 14px 14px; }
  .day li.is-now .day-body { transform: none; }
  .win-url { max-width: none; font-size: 0.6875rem; }
  .steps li { margin: 0; padding: 16px 0; }
  /* Alles Klickbare bekommt unter 640px die 44px-Trefferfläche, auch die
   * kleinen Knöpfe in den Attrappen. */
  .btn, .alarm-card button { min-height: 44px; }
  .btn-xs { padding: 0 14px; }
}

/* ── Handy-Fassung ─────────────────────────────────────────────────────
 * Unter 640px zeigt die Seite eigenes Markup (.v-mob) statt der
 * Desktop-Fassung (.v-desk). Jeder Abschnitt ist eine Überschrift, ein
 * kurzer Satz und eine Grafik, die etwas vorführt: die Signalkette im
 * Hero, das Modul, das auf die Schiene rastet, fünf Szenen zum Wischen,
 * ein Portal-Bildschirm, der seine Werkzeuge zeigt, der Hausquerschnitt.
 *
 * Animationen laufen mit `both` und enden im Grundzustand des Elements.
 * Die globale reduced-motion-Regel kürzt sie auf 0 — dann steht sofort
 * das Endbild da, nichts bleibt unsichtbar. */
@media (min-width: 641px) { .v-mob { display: none !important; } }
@media (max-width: 640px) {
  .v-desk { display: none !important; }

  .m-sec { padding: 56px 0; }
  .m-band { background: var(--surface); }
  .m-sec h2, .m-closing h2 {
    font-size: 2rem; font-weight: 800; line-height: 1.06; letter-spacing: -0.032em;
  }
  .m-lede { margin-top: 10px; font-size: 1rem; line-height: 1.5; color: var(--ink-muted); }
  .m-ctas { display: grid; gap: 4px; margin-top: 24px; }
  .m-ctas .btn { width: 100%; }
  .m-link {
    display: flex; align-items: center; justify-content: center; min-height: 44px;
    font-weight: 600; font-size: 1rem;
  }

  /* ── Hero ── */
  .m-hero { position: relative; padding: 36px 0 52px; overflow-x: clip; }
  .m-hero::after {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    right: -30%; top: 34%; width: 120%; height: 66%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%);
  }
  .m-h1 { font-size: clamp(2.5rem, 12vw, 3.1rem); font-weight: 800; line-height: 1; letter-spacing: -0.035em; }
  .m-h1 span { display: block; }
  .m-h1 span + span { margin-top: 4px; }
  .m-hero .m-lede { margin-top: 16px; font-size: 1.0625rem; }

  .m-live {
    position: relative; margin-top: 52px; padding: 16px; border-radius: var(--radius-card);
    background: var(--surface); box-shadow: var(--shadow-lg);
  }
  .m-live-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 2px 0; }
  .m-live-head b { display: block; font: 700 1.125rem/1.2 var(--font-display); letter-spacing: -0.01em; }
  .m-live-head div span { display: block; font-size: 0.8125rem; color: var(--ink-muted); margin-top: 2px; }
  .m-chain { margin: 20px 0 6px; }
  .m-chain .node-box { width: 46px; height: 46px; }
  .m-chain .wire { margin: 0 4px 24px; }
  .m-log { list-style: none; margin: 4px 0 0; padding: 4px 8px; border-radius: var(--radius-inner); background: var(--surface-2); min-height: 166px; }
  .m-log li {
    display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; gap: 10px; align-items: center;
    padding: 9px 0; border-top: 1px solid var(--border);
  }
  .m-log li:first-child { border-top: 0; }
  .m-log li.is-new { animation: m-row 600ms var(--ease-out) both; }
  .m-log time { font-size: 0.8125rem; color: var(--ink-muted); }
  .m-log b { display: block; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-log small { display: block; font-size: 0.8125rem; color: var(--ink-muted); line-height: 1.3; }
  .m-log .pill { height: 24px; font-size: 0.75rem; padding: 0 10px; }
  .m-open { width: 100%; margin-top: 12px; }
  /* Die Push-Meldung fällt wie ein Banner oben auf die Karte. */
  .m-push {
    position: absolute; z-index: 2; left: 10px; right: 10px; top: -44px;
    display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center;
    padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xl);
    opacity: 0; transform: translateY(-12px) scale(0.96); pointer-events: none;
    transition: opacity 260ms, transform 420ms var(--ease-out);
  }
  .m-push.is-on { opacity: 1; transform: none; }
  .m-push-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-gradient); color: #fff; }
  .m-push-ico svg { width: 18px; height: 18px; }
  .m-push.is-danger .m-push-ico { background: var(--danger-bg); color: var(--danger); }
  .m-push b { display: block; font-size: 0.875rem; font-weight: 600; line-height: 1.25; }
  .m-push small { display: block; font-size: 0.8125rem; color: var(--ink-muted); }

  /* ── So geht's: die Schaltschrank-Grafik ── */
  .m-rail { margin: 24px 0 0; padding: 14px 12px 10px; border-radius: var(--radius-card); background: var(--surface-2); }
  .m-rail svg { width: 100%; height: auto; overflow: visible; }
  .mr-rail { fill: var(--border-strong); }
  .mr-box { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
  .mr-strip { fill: var(--surface-3); }
  .mr-t { fill: var(--ink); font: 600 15px var(--font-body); }
  .mr-t-lg { font: 700 19px var(--font-display); }
  .mr-t-sm { font: 400 13px var(--font-body); fill: var(--ink-muted); }
  .mr-ok { fill: var(--success); }
  .mr-off { fill: var(--border-strong); }
  .mr-wire { stroke: var(--border-strong); stroke-width: 3; stroke-linecap: round; fill: none; }
  .mr-flow { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; fill: none; stroke-dasharray: 4 7; }
  .js .m-rail:not(.is-in) .mr-module, .js .m-rail:not(.is-in) .mr-cloud, .js .m-rail:not(.is-in) .mr-flow { opacity: 0; }
  .m-rail.is-in .mr-module { animation: m-drop 900ms var(--ease-out) 300ms both; }
  .m-rail.is-in .mr-cloud { animation: m-fade 600ms ease 1100ms both; }
  .m-rail.is-in .mr-flow { animation: m-fade 400ms ease 1000ms both, flow 1.2s linear 1000ms infinite; }
  .m-rail.is-in .mr-blink { animation: blink 1.8s steps(2, jump-none) infinite; }
  .m-rail.is-in .mr-blink-2 { animation: blink 0.9s steps(2, jump-none) 1200ms infinite; }
  .m-steps3 { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; counter-reset: ms; }
  .m-steps3 li { padding: 12px 10px; border-radius: var(--radius-inner); background: var(--surface-2); }
  .m-steps3 li::before {
    counter-increment: ms; content: counter(ms);
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; margin-bottom: 8px;
    background: var(--accent-soft); color: var(--accent); font: 700 0.8125rem/1 var(--font-display);
  }
  .m-steps3 b { display: block; font-size: 0.9375rem; font-weight: 600; }
  .m-steps3 span { display: block; margin-top: 2px; font-size: 0.8125rem; line-height: 1.35; color: var(--ink-muted); }
  .m-offline { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 0.9375rem; font-weight: 500; }
  .m-offline svg { width: 20px; height: 20px; flex: none; color: var(--success); }

  /* ── Dienstag: Szenen zum Wischen ── */
  .m-day {
    list-style: none; margin: 24px 0 0; padding: 4px var(--gutter) 20px;
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .m-day::-webkit-scrollbar { display: none; }
  .m-day:focus-visible { outline-offset: -2px; }
  .m-day > li {
    flex: 0 0 80%; scroll-snap-align: start;
    padding: 12px 12px 18px; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-md);
  }
  .m-day time { display: block; margin: 16px 6px 0; font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
  .m-day h3 { margin: 4px 6px 0; font-size: 1.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
  .m-day p { margin: 4px 6px 0; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-muted); }
  .m-scene {
    height: 136px; padding: 14px; border-radius: var(--radius-inner); background: var(--surface-2);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; overflow: hidden;
  }
  .m-dots { display: flex; justify-content: center; gap: 6px; }
  .m-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--border-strong); transition: width 300ms var(--ease-out), background-color 300ms; }
  .m-dots i.is-on { width: 20px; background: var(--accent); }

  /* 07:40 – die Ziffern tippen sich ein, die Gültigkeit läuft ab. */
  .ms-digits { display: flex; gap: 8px; }
  .ms-digits span {
    width: 40px; height: 48px; border-radius: 10px; display: grid; place-items: center;
    background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border);
    font: 600 1.5rem/1 var(--font-mono); color: var(--ink);
  }
  .ms-until { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
  .ms-until small { font-size: 0.75rem; color: var(--ink-muted); }
  .ms-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
  .ms-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transform-origin: left; transform: scaleX(0.35); }
  .is-active .ms-digits span { animation: m-pop 420ms var(--ease-out) both; }
  .is-active .ms-digits span:nth-child(2) { animation-delay: 150ms; }
  .is-active .ms-digits span:nth-child(3) { animation-delay: 300ms; }
  .is-active .ms-digits span:nth-child(4) { animation-delay: 450ms; }
  .is-active .ms-bar i { animation: m-drain 2400ms ease-in-out 900ms both; }

  /* 09:15 – die alte Karte wird gesperrt, die neue gleitet herein. */
  .ms-card, .ms-alarm {
    width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
    padding: 9px 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.875rem;
  }
  .ms-card b, .ms-alarm b { font-weight: 600; }
  .ms-a, .ms-b { grid-column: 2; grid-row: 1; justify-self: end; }
  .m-scene .pill { height: 24px; font-size: 0.75rem; padding: 0 10px; }
  .ms-a { opacity: 0; }
  .ms-old b { color: var(--ink-muted); text-decoration: line-through; }
  .is-active .ms-old .ms-a { animation: m-out 300ms ease 700ms both; }
  .is-active .ms-old .ms-b { animation: m-pop 360ms var(--ease-out) 700ms both; }
  .is-active .ms-old b { animation: m-strike 300ms ease 700ms both; }
  .is-active .ms-new { animation: m-slide 560ms var(--ease-out) 1200ms both; }

  /* 11:02 – die Glocke läutet, bis jemand quittiert. */
  .ms-bell {
    position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
    background: var(--success-bg); color: var(--success);
  }
  .ms-bell svg { width: 26px; height: 26px; transform-origin: 50% 15%; }
  .ms-bell i { position: absolute; inset: 0; border-radius: 16px; box-shadow: 0 0 0 2px var(--danger); opacity: 0; }
  .is-active .ms-bell { animation: m-calm 300ms ease 2300ms both; }
  .is-active .ms-bell svg { animation: m-ring 700ms ease-in-out 3 both; }
  .is-active .ms-bell i { animation: ring 1.1s var(--ease-out) 2; }
  .is-active .ms-alarm .ms-a { animation: m-show-hide 2600ms ease both; }
  .is-active .ms-alarm .ms-b { animation: m-pop 360ms var(--ease-out) 2300ms both; }

  /* 14:30 – die Mail fliegt, der Code landet beim Gast. */
  [data-scene="mail"] .m-scene, [data-scene="count"] .m-scene { flex-direction: row; gap: 18px; }
  .ms-mail { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
  .ms-mail svg { width: 24px; height: 24px; }
  .ms-guest { padding: 12px 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-md); text-align: center; }
  .ms-guest small { display: block; font-size: 0.75rem; color: var(--ink-muted); }
  .ms-guest .code { font-size: 1.375rem; font-weight: 600; letter-spacing: 0.12em; }
  .is-active .ms-mail { animation: m-fly 900ms var(--ease-out) 200ms both; }
  .is-active .ms-guest { animation: m-pop 420ms var(--ease-out) 1000ms both; }

  /* 17:55 – der Tag als Balken, die Zahl zählt hoch. */
  .ms-chart { display: flex; align-items: flex-end; gap: 6px; height: 72px; }
  .ms-chart i { width: 12px; height: var(--h); border-radius: 4px; background: color-mix(in srgb, var(--accent) 35%, transparent); transform-origin: bottom; }
  .ms-chart i:nth-child(3) { background: var(--accent); }
  .ms-count b { display: block; font: 800 2rem/1 var(--font-display); letter-spacing: -0.02em; }
  .ms-count small { display: block; margin-top: 4px; font-size: 0.75rem; color: var(--ink-muted); }
  .is-active .ms-chart i { animation: m-grow 600ms var(--ease-out) both; }
  .is-active .ms-chart i:nth-child(2) { animation-delay: 80ms; }
  .is-active .ms-chart i:nth-child(3) { animation-delay: 160ms; }
  .is-active .ms-chart i:nth-child(4) { animation-delay: 240ms; }
  .is-active .ms-chart i:nth-child(5) { animation-delay: 320ms; }
  .is-active .ms-chart i:nth-child(6) { animation-delay: 400ms; }
  .is-active .ms-chart i:nth-child(7) { animation-delay: 480ms; }

  /* ── Portal: ein Bildschirm, vier Werkzeuge ── */
  .m-app { margin-top: 22px; padding: 12px; border-radius: var(--radius-card); background: var(--surface-2); }
  .m-app-tabs { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 4px; border-radius: 12px; background: var(--surface-3); }
  .m-app-tabs button {
    min-height: 44px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
    font-weight: 600; font-size: 0.875rem; color: var(--ink-muted); transition: background-color 160ms, color 160ms;
  }
  .m-app-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
  .m-app-timer { position: absolute; left: 10px; right: 10px; bottom: -6px; height: 2px; border-radius: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; opacity: 0; }
  .m-app-timer.is-running { opacity: 1; animation: timer 3800ms linear forwards; }
  .m-app-panel { padding: 16px 4px 4px; min-height: 230px; display: flex; flex-direction: column; }
  .m-app-panel[hidden] { display: none; }
  .m-app-panel > p { margin-top: auto; padding-top: 14px; font-size: 0.9375rem; color: var(--ink-muted); }
  .m-app-panel:not([hidden]) > :first-child { animation: m-row 420ms var(--ease-out) both; }
  .mp-rows { display: grid; gap: 6px; }
  .mp-rows > div {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm);
  }
  .mp-rows b { display: block; font-size: 0.9375rem; font-weight: 600; }
  .mp-rows small { display: block; font-size: 0.8125rem; color: var(--ink-muted); }
  .mp-rows .pill, .mp-alarm .pill { height: 24px; font-size: 0.75rem; padding: 0 10px; }
  .mp-sync, .mp-done { grid-column: 2; grid-row: 1; justify-self: end; }
  .mp-sync { opacity: 0; }
  .m-app-panel:not([hidden]) .mp-new { animation: m-slide 520ms var(--ease-out) 500ms both; }
  .m-app-panel:not([hidden]) .mp-sync { animation: m-show-hide 1700ms ease 600ms both; }
  .m-app-panel:not([hidden]) .mp-done { animation: m-pop 360ms var(--ease-out) 2200ms both; }
  .mp-week { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 10px 8px; align-items: center; }
  .mp-week span { font-size: 0.8125rem; font-weight: 600; color: var(--ink-muted); }
  .mp-week i, .mf-groups i { position: relative; height: 12px; border-radius: 6px; background: var(--surface-3); }
  .mp-week i::after, .mf-groups i::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: var(--l); width: var(--w);
    border-radius: 6px; background: var(--accent); transform-origin: left;
  }
  .mp-week i.soft::after, .mf-groups i.soft::after { background: color-mix(in srgb, var(--accent) 40%, transparent); }
  .m-app-panel:not([hidden]) .mp-week i::after, .m-field:not([hidden]) .mf-groups i::after { animation: m-bar 700ms var(--ease-out) both; }
  .mp-week i:nth-of-type(2)::after, .mf-groups i:nth-of-type(2)::after { animation-delay: 90ms !important; }
  .mp-week i:nth-of-type(3)::after, .mf-groups i:nth-of-type(3)::after { animation-delay: 180ms !important; }
  .mp-week i:nth-of-type(4)::after, .mf-groups i:nth-of-type(4)::after { animation-delay: 270ms !important; }
  .mp-week i:nth-of-type(5)::after { animation-delay: 360ms !important; }
  .mp-week i:nth-of-type(6)::after { animation-delay: 450ms !important; }
  .mp-phone-row { display: flex; gap: 14px; align-items: center; justify-content: center; }
  .mp-phone {
    width: 48%; padding: 16px 12px 14px; border-radius: 22px; background: var(--surface);
    box-shadow: inset 0 0 0 3px var(--ink), var(--shadow-md);
  }
  .mp-phone small, .mp-pass small { display: block; font-size: 0.75rem; opacity: 0.75; }
  .mp-phone b, .mp-pass b { display: block; font-size: 0.9375rem; font-weight: 700; }
  .mp-btn {
    display: grid; place-items: center; margin-top: 12px; min-height: 38px; border-radius: 10px;
    background: var(--success); color: #fff; font-size: 0.8125rem; font-weight: 600;
  }
  .m-app-panel:not([hidden]) .mp-btn { animation: m-press 1300ms ease 600ms both; }
  .mp-pass {
    width: 42%; padding: 14px 12px; border-radius: 14px; background: var(--brand-gradient); color: #fff;
    box-shadow: 0 12px 30px rgb(27 63 217 / 0.3);
  }
  .mp-pass .tnum { display: block; margin-top: 10px; font-size: 1.125rem; font-weight: 600; letter-spacing: 0.12em; }
  .m-app-panel:not([hidden]) .mp-pass { animation: m-tilt 700ms var(--ease-out) 300ms both; }
  .mp-alarm {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 12px; border-radius: 12px; background: var(--danger-bg); color: var(--danger);
  }
  .mp-alarm b { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 600; }
  .mp-alarm .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: breathe 1.2s ease-in-out infinite; }
  .mp-ack { padding: 7px 12px; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 0.8125rem; font-weight: 600; box-shadow: var(--shadow-sm); }
  .mp-tl { list-style: none; margin: 10px 0 0; padding: 0; }
  .mp-tl li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 8px; padding: 7px 4px; font-size: 0.875rem; border-top: 1px solid var(--border); }
  .mp-tl li:first-child { border-top: 0; }
  .mp-tl time { color: var(--ink-muted); font-size: 0.8125rem; }
  .m-app-panel:not([hidden]) .mp-tl li { animation: m-row 420ms var(--ease-out) both; }
  .m-app-panel:not([hidden]) .mp-tl li:nth-child(2) { animation-delay: 120ms; }
  .m-app-panel:not([hidden]) .mp-tl li:nth-child(3) { animation-delay: 240ms; }

  /* ── Integrationen: Hausquerschnitt, Blättern mit ‹ › oder Antippen ──
   * Grafik, Leiste und Punkte passen zusammen auf einen Bildschirm. */
  .m-house { position: static; margin-top: 20px; padding: 12px; overflow: hidden; }
  .m-house svg { display: block; width: 100%; height: min(300px, 38svh); overflow: hidden; }
  .m-house .zone { cursor: pointer; }
  .m-house .zone .ring { stroke-width: 2.5; }
  .m-house-status {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 4px;
    margin-top: 10px; padding: 4px; border-radius: var(--radius-inner); background: var(--surface-2); min-height: 64px;
  }
  .m-house-status > div { text-align: center; min-width: 0; }
  .m-house-status b { display: block; font-size: 1rem; font-weight: 700; color: var(--accent); }
  .m-house-status span { display: block; font-size: 0.8125rem; line-height: 1.35; color: var(--ink-muted); }
  .m-house-status.is-swap > div { animation: m-row 380ms var(--ease-out) both; }
  .m-hs-btn {
    width: 44px; height: 44px; border: 0; border-radius: 10px; cursor: pointer;
    display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
  }
  .m-hs-btn svg { width: 20px; height: 20px; }
  .m-house-dots { margin-top: 12px; }

  /* ── Branchen ── */
  .m-tabs {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
    margin-top: 22px; padding: 4px; border-radius: 12px; background: var(--surface-3);
  }
  html:not(.js) .m-tabs { display: none; }
  .m-tabs button {
    min-height: 44px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
    font-weight: 600; font-size: 0.9375rem; color: var(--ink-muted); transition: background-color 160ms, color 160ms;
  }
  .m-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md); }
  .m-field { margin-top: 16px; }
  .m-field[hidden] { display: none; }
  .m-field h3 { margin-top: 16px; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; }
  .m-field h3 + p { margin-top: 2px; color: var(--ink-muted); }
  .mf-vis { padding: 12px; border-radius: var(--radius-card); background: var(--surface-2); min-height: 168px; }
  .m-field:not([hidden]) .mf-vis > * { animation: m-row 420ms var(--ease-out) both; }
  .m-field:not([hidden]) .mf-vis > :nth-child(2) { animation-delay: 100ms; }
  .m-field:not([hidden]) .mf-vis > :nth-child(3) { animation-delay: 200ms; }
  .mf-list { display: grid; gap: 6px; }
  .mf-list > div {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm);
  }
  .mf-list b { display: block; font-size: 0.9375rem; font-weight: 600; }
  .mf-list small { display: block; font-size: 0.8125rem; color: var(--ink-muted); }
  .mf-vis .pill { height: 24px; font-size: 0.75rem; padding: 0 10px; }
  .mf-hotel { display: grid; align-content: center; gap: 16px; }
  .mf-hotel-head, .mf-hotel-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .mf-hotel-head b { font-weight: 700; }
  .mf-hotel .code { font-size: 1.375rem; font-weight: 600; letter-spacing: 0.12em; }
  .mf-stay { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
  .mf-stay small { font-size: 0.8125rem; color: var(--ink-muted); }
  .mf-stay div { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
  .mf-stay i { display: block; height: 100%; width: 34%; border-radius: 5px; background: var(--accent); transform-origin: left; }
  .m-field:not([hidden]) .mf-stay i { animation: m-bar 900ms var(--ease-out) 300ms both; }
  .mf-groups { display: grid; grid-template-columns: 6.6em minmax(0, 1fr); gap: 14px 10px; align-content: center; }
  .mf-groups span { font-size: 0.8125rem; font-weight: 600; }

  /* ── Sicherheit: die Symbole zeichnen sich ── */
  .m-trust { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .m-trust li {
    display: flex; flex-direction: column; gap: 12px; min-height: 104px; padding: 16px 14px;
    border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-md);
    font-size: 0.9375rem; font-weight: 600; line-height: 1.3;
  }
  .m-trust svg { width: 28px; height: 28px; color: var(--accent); }
  .m-trust path { stroke-dasharray: 1; }
  .js .m-trust path { stroke-dashoffset: 1; }
  .m-trust.is-in path { animation: m-draw 1000ms var(--ease-out) 300ms both; }
  .m-trust.is-in li:nth-child(2) path { animation-delay: 420ms; }
  .m-trust.is-in li:nth-child(3) path { animation-delay: 540ms; }
  .m-trust.is-in li:nth-child(4) path { animation-delay: 660ms; }
  .m-trust.is-in li:nth-child(5) path { animation-delay: 780ms; }
  .m-trust.is-in li:nth-child(6) path { animation-delay: 900ms; }

  .m-faq { margin-top: 20px; }
  .m-faq summary { padding: 18px 0; font-size: 1.0625rem; gap: 16px; }
  .m-faq .answer { padding-bottom: 18px; font-size: 0.9375rem; }

  .m-closing { padding-top: 40px; padding-bottom: 32px; }
  .m-closing .closing-card { padding: 28px 22px; }
  .m-closing .closing-card p { font-size: 1rem; }

  /* Mitlaufender Knopf, mit Platz für die Home-Leiste. */
  .m-bar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 -8px 30px rgb(11 42 85 / 0.08);
    transform: translateY(110%); visibility: hidden;
    transition: transform 320ms var(--ease-out), visibility 0s 320ms;
  }
  .m-bar.is-on { transform: none; visibility: visible; transition: transform 320ms var(--ease-out), visibility 0s; }
  .m-bar .btn { width: 100%; }
  .nav.is-open ~ #m-main .m-bar { visibility: hidden; }
}

@keyframes m-row { from { opacity: 0; transform: translateY(-10px); } }
@keyframes m-fade { from { opacity: 0; } }
@keyframes m-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes m-pop { from { opacity: 0; transform: scale(0.5) translateY(8px); } 70% { opacity: 1; transform: scale(1.06); } }
@keyframes m-drop {
  0% { opacity: 0; transform: translateY(-80px); }
  55% { opacity: 1; transform: translateY(5px); }
  75% { transform: translateY(-3px); }
}
@keyframes m-drain { from { transform: scaleX(1); } }
@keyframes m-strike { from { color: var(--ink); text-decoration-color: transparent; } }
@keyframes m-slide { from { opacity: 0; transform: translateX(48px); } }
@keyframes m-calm { from { background: var(--danger-bg); color: var(--danger); } }
@keyframes m-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-5deg); } }
@keyframes m-show-hide { 0% { opacity: 0; } 12%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes m-fly {
  0% { opacity: 0; transform: translate(-110px, 26px) rotate(-18deg) scale(0.7); }
  60% { opacity: 1; transform: translate(6px, -6px) rotate(4deg) scale(1.05); }
}
@keyframes m-grow { from { transform: scaleY(0); } }
@keyframes m-bar { from { transform: scaleX(0); } }
@keyframes m-press {
  0%, 30% { background: var(--accent); transform: none; }
  40% { background: var(--accent); transform: scale(0.92); }
  55% { background: var(--success); transform: scale(1.04); }
  100% { background: var(--success); transform: none; }
}
@keyframes m-tilt { from { opacity: 0; transform: translateY(24px) rotate(8deg); } }
@keyframes m-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .intro, .js .rise, .rail-art .module, .rail-art .cloud { opacity: 1 !important; transform: none !important; }
  .js .win-ghost.g1 { opacity: 0.75 !important; transform: translateY(-16px) scale(0.955) !important; }
  .js .win-ghost.g2 { opacity: 0.42 !important; transform: translateY(-31px) scale(0.91) !important; }
  .integ-btn .timer { display: none; }
}
