/* byte & board · Instrumententafel
   Gemeinsames Stylesheet für alle Seiten. Farben als Variablen, Dunkel ist die Grundeinstellung,
   Hell über [data-theme="hell"] (gesetzt vom Inline-Skript im <head>). */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/plex-mono-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #040B0D;
  --tile: #0A181C;
  --line: #142A31;
  --text: #E6F4F5;
  --sec: #B0C9CC;
  --muted: #86A3A8;
  --accent: #45DCE6;
  --accent-text: #45DCE6;
  --rail: #45DCE6;
  --on-accent: #040B0D;
  --warm: #F5B54A;
  --warm-text: #F5B54A;
  --chip: #0E2026;
  --chip-border: #28474F;
  --chip-dot: #3F5F66;
  --pin: #86A3A8;
  --cap-bg: #040B0D;
  --cap-text: #B0C9CC;
  --grid-line: #142A31;
  --btn-border: #28474F;
  --input-bg: #040B0D;
  --input-border: #28474F;
  --bar-soft: #1E3A42;
  --nav-active: #11262C;
  --abr-color: #45DCE6;
  --abr-balken: transparent;

  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Archivo', system-ui, sans-serif;
  --radius: 22px;
  --gap: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  /* Kacheln wie Bauteile: Lichtkante oben, Tiefe darunter */
  --tiefe: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 0 rgba(0, 0, 0, 0.35);
  --licht: rgba(255, 255, 255, 0.022);
  --koernung: url('../assets/koernung.webp');
}
:root[data-theme="hell"] {
  color-scheme: light;
  --bg: #E9EDEC;
  --tile: #FFFFFF;
  --line: #D3DADB;
  --text: #0E1416;
  --sec: #3B474D;
  --muted: #56636A;
  --accent: #2BD3E6;
  --accent-text: #00707F;
  --rail: #0A8FA3;
  --on-accent: #0E1416;
  --warm: #D98A1A;
  --warm-text: #9A5B00;
  --chip: #0E1416;
  --chip-border: #0E1416;
  --chip-dot: #3A4549;
  --pin: #56636A;
  --cap-bg: #FFFFFF;
  --cap-text: #3B474D;
  --grid-line: #E1E6E7;
  --btn-border: #B9C3C6;
  --input-bg: #F2F4F3;
  --input-border: #B9C3C6;
  --bar-soft: #C9D6D8;
  --nav-active: #E3EEEF;
  --abr-color: #0E1416;
  --abr-balken: #2BD3E6;
  --tiefe: inset 0 1px 0 #FFFFFF, 0 1px 2px rgba(14, 20, 22, 0.05), 0 12px 32px -20px rgba(14, 20, 22, 0.22);
  --licht: rgba(255, 255, 255, 0);
}

/* ── Grundlagen ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg) var(--koernung) repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, .spruch, .h-xs { text-wrap: balance; }
p, li { text-wrap: pretty; }
h1, h2, h3, .wide { text-rendering: optimizeLegibility; font-kerning: normal; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--rail); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px 56px; }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.01em; }
.label-accent { font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.sec { color: var(--sec); }
.muted { color: var(--muted); }
.accent-text { color: var(--accent-text); }

/* Überschriften: breit, schwer, eng */
.wide { font-family: var(--sans); font-stretch: 112%; font-weight: 800; letter-spacing: -0.015em; }
.h-hero { font-size: clamp(40px, 15.5cqi, 96px); line-height: .9; letter-spacing: -0.028em; }
.h-xl { font-size: clamp(40px, 14cqi, 96px); line-height: .86; letter-spacing: -0.028em; }
.h-l { font-size: clamp(40px, 5.6vw, 68px); line-height: .92; letter-spacing: -0.024em; }
.h-m { font-size: clamp(30px, 10cqi, 54px); line-height: .95; letter-spacing: -0.02em; }
.h-s { font-size: clamp(30px, 3.4vw, 42px); line-height: 1; }
.h-xs { font-size: 28px; line-height: 1.05; font-stretch: 110%; font-weight: 800; }
.dim { color: var(--muted); }
.abrechnen { position: relative; z-index: 0; color: var(--abr-color); }
.abrechnen::after { content: ''; position: absolute; left: 0; right: 0; bottom: -0.08em; height: 0.26em; background: var(--abr-balken); transform: scaleX(var(--balken, 1)); transform-origin: left center; z-index: -1; }
.h-hero .zeile { display: block; }
.h-hero .zeile > span { display: inline-block; }

/* ── Logo ── */
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.logo svg.marke { width: 66px; height: 32px; flex: none; }
.logo .wort { font-family: var(--mono); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.logo .wort b, .amp { color: var(--accent-text); font-weight: inherit; }

/* ── Navigation ── */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 0; position: relative; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-family: var(--mono); font-size: 13px; }
.nav-links a { color: var(--sec); transition: color 0.2s ease; }
.nav-links a.leise { color: var(--muted); }
.nav-links a.knopf { color: var(--on-accent); }
.nav-links a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--rail); }
.menu-knopf { display: none; }
.theme-knopf {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  background: transparent; color: var(--sec); border: 1px solid var(--btn-border); border-radius: 999px;
  font-family: var(--mono); font-size: 12px; cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 0.2s ease, color 0.2s ease;
}
.theme-knopf svg { width: 16px; height: 16px; }

/* ── Knöpfe ── */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font-family: var(--sans); font-weight: 700; font-size: 16px;
  transition: transform 160ms var(--ease-out), filter 0.2s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.knopf:active, .theme-knopf:active, .menu-knopf:active { transform: scale(0.97); }
.knopf.klein { min-height: 44px; padding: 0 18px; border-radius: 10px; font-size: 15px; }
.knopf.gross { min-height: 56px; padding: 0 28px; }
.knopf.rahmen { background: transparent; color: var(--text); border: 1px solid var(--btn-border); }
.knopf.leise { background: transparent; color: var(--sec); border: 1px solid var(--btn-border); font-family: var(--mono); font-size: 13px; font-weight: 500; }
.knopf:disabled { opacity: .55; cursor: default; }
.link-linie { font-family: var(--mono); font-size: 14px; border-bottom: 2px solid var(--rail); padding-bottom: 3px; transition: color 0.2s ease; }

/* ── Kacheln und Raster ── */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.r2 { grid-row: span 2; }
.kachel {
  container-type: inline-size; position: relative; background: var(--tile) linear-gradient(180deg, var(--licht), transparent 42%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-width: 0; box-shadow: var(--tiefe);
}
.kachel.p-l { padding: 44px; }
.kachel.p-m { padding: 36px 40px; }
.kachel.cyan { background: var(--accent); color: var(--on-accent); border: 0; }
.kopfzeile { display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 12px; }
.kopfzeile .kenn { color: var(--muted); }
.stapel { display: flex; flex-direction: column; }
.zwischen { justify-content: space-between; }
.g8 { gap: 8px; } .g14 { gap: 14px; } .g18 { gap: 18px; } .g24 { gap: 24px; } .g30 { gap: 30px; }

.foto { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; min-height: 230px; background: var(--tile); box-shadow: var(--tiefe); }
.foto::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); pointer-events: none; }
picture { display: contents; }
.foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.foto .plakette {
  position: absolute; left: 16px; top: 16px; background: var(--cap-bg); color: var(--cap-text);
  border-radius: 8px; padding: 6px 10px; font-family: var(--mono); font-size: 11px;
}
.foto .plakette.unten { top: auto; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 14px; font-size: 12px; color: var(--text); }

/* Kopf-Foto: Zustand des Geräts als schmale Leiste am unteren Rand (Messen. Steuern. Vernetzen.) */
.foto .marke-demo.oben { position: absolute; top: 16px; right: 16px; background: var(--cap-bg); }
.geraet-status {
  position: absolute; left: 16px; right: 16px; bottom: 16px; margin: 0; z-index: 1;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--tile) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.7);
}
.geraet-status > div { padding: 10px 14px; min-width: 0; display: grid; gap: 2px; }
.geraet-status > div + div { border-left: 1px solid var(--line); }
.geraet-status dt { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.geraet-status dd { margin: 0; display: flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 800; font-stretch: 112%; font-size: 15px; letter-spacing: -0.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.geraet-status .punkt { width: 7px; height: 7px; }

.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.punkt.warm { background: var(--warm); }
.punkt.ring { background: transparent; border: 2px solid var(--rail); width: 10px; height: 10px; }
.marke-demo { border: 1px solid var(--warm); color: var(--warm-text); border-radius: 4px; padding: 2px 7px; font-family: var(--mono); font-size: 12px; }

/* ── Startseite: Kopf ── */
.kopf { min-height: 540px; justify-content: space-between; gap: 32px; }
.kopf p { max-width: 360px; font-size: 18px; color: var(--sec); }
.kopf-fuss { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.foto.hoch { min-height: 540px; }

.status-liste { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.status-liste li { display: flex; justify-content: space-between; gap: 12px; }
.status-liste li > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.status-liste .wert { font-family: var(--mono); color: var(--sec); }

.chip-gross { display: flex; align-items: center; }
.chip-gross svg { width: 132px; height: 64px; }
.spruch { font-stretch: 110%; font-weight: 800; font-size: 30px; line-height: 1.05; }
.person { display: flex; align-items: center; gap: 14px; }
.person img { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.person b { display: block; font-size: 16px; }

/* Leitung (Leistungen) */
.leitung { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--rail); }
.leitung li { padding: 30px 22px 0 0; display: flex; flex-direction: column; gap: 8px; position: relative; }
.leitung li::before {
  content: ''; position: absolute; left: 0; top: -8px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--rail); background: var(--tile);
}
.leitung li:last-child::before { width: 16px; height: 16px; top: -9px; background: var(--accent); }
.leitung h3 { font-stretch: 108%; font-weight: 700; font-size: clamp(20px, 2vw, 25px); line-height: 1.15; }
.leitung p { font-size: 15px; color: var(--sec); }

/* Ablauf */
.ablauf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ablauf li { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.ablauf li:last-child { border-top: 2px solid var(--rail); padding-top: 13px; }
.ablauf b { font-size: 18px; }
.ablauf span:last-child { font-size: 14px; color: var(--sec); }
.region svg { width: 100%; height: 120px; }

/* Projekt */
.aufgaben { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aufgaben li { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.aufgaben b { font-size: 18px; }
.aufgaben li > span:last-child, .aufgaben .mehr .stapel > span:last-child { font-size: 14px; color: var(--sec); }
/* Die letzte Karte sagt: das oben sind Beispiele. Gestrichelt, über die ganze Breite, mit Weg zur Anfrage */
.aufgaben .mehr { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; background: transparent; border: 1.5px dashed var(--btn-border); }
.aufgaben .mehr .stapel { gap: 6px; }
.punkte-liste { display: flex; flex-direction: column; gap: 8px; font-stretch: 108%; font-weight: 700; font-size: 20px; }
.punkte-liste li { display: flex; align-items: center; gap: 12px; }

/* Demo */
.reiter { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.reiter button {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: transparent; color: var(--sec);
  font-family: var(--mono); font-size: 13px; font-weight: 600; cursor: pointer;
}
.reiter button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.demo-feld { display: flex; flex-direction: column; gap: 28px; }
.demo-oben { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px; align-items: end; }
.demo-oben.oben { align-items: start; }
.demo-oben.streck { align-items: stretch; }
.demo-oben > .links { grid-column: span 4; }
.demo-oben > .links.breit { grid-column: span 5; }
.demo-oben > .rechts { grid-column: span 8; min-width: 0; }
.demo-oben > .rechts.schmal { grid-column: span 7; }
.messwert { font-stretch: 112%; font-weight: 800; font-size: clamp(64px, 8vw, 96px); line-height: .85; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.messwert small { font-size: .4em; color: var(--muted); }
.zellen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.zelle { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.zelle b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kurve { width: 100%; height: 190px; display: block; }

/* Demo Messen: Kühlraum. Tür, Kälte und Zeiger hängen an --tuer, --luft und --zeiger (bab.js),
   beim Scrollen setzt bewegung.js die Werte. Alles hat festen Platz, nichts schiebt die Seite. */
.demo-oben.kuehl { align-items: stretch; }
.demo-oben.kuehl > .kuehlraum { grid-column: span 3; }
.demo-oben.kuehl > .links { grid-column: span 4; align-self: end; }
.demo-oben.kuehl > .rechts { grid-column: span 5; align-self: end; }
.kuehlraum {
  --kr-innen: #020809; --kr-licht: rgba(69, 220, 230, 0.32); --kr-blatt: #12262c; --kr-blatt-hell: #1c363d; --kr-kante: #2a454c; --kr-regal: #1d3a41;
  position: relative; min-height: 290px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 70%, var(--tile)));
}
:root[data-theme="hell"] .kuehlraum { --kr-innen: #CBD8DA; --kr-licht: rgba(10, 143, 163, 0.28); --kr-blatt: #E4EAEA; --kr-blatt-hell: #FFFFFF; --kr-kante: #B4C1C3; --kr-regal: #A9BBBE; }
.kr-bild { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 4 / 5; max-width: 100%; transform: translateX(-50%); }
.kr-bild::after { content: ''; position: absolute; left: 4%; right: 4%; bottom: 13%; border-top: 1px solid var(--kr-kante); }
.kr-rahmen { position: absolute; left: 12%; width: 44%; top: 14%; bottom: 13%; border: 3px solid var(--kr-kante); border-bottom: 0; border-radius: 4px 4px 0 0; perspective: 600px; }
.kr-innen { position: absolute; inset: 0; background: var(--kr-innen); overflow: hidden; }
.kr-innen::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 0%, var(--kr-licht), transparent 70%); opacity: var(--tuer, 0); }
.kr-innen i { position: absolute; left: 8%; right: 8%; height: 0; border-top: 2px solid var(--kr-regal); }
.kr-innen i::before, .kr-innen i::after { content: ''; position: absolute; bottom: 2px; border: 1.5px solid var(--kr-regal); border-radius: 2px; }
.kr-innen i::before { left: 8%; width: 30%; height: 14px; }
.kr-innen i::after { right: 10%; width: 22%; height: 10px; }
.kr-innen i:nth-child(1) { top: 30%; } .kr-innen i:nth-child(2) { top: 56%; } .kr-innen i:nth-child(3) { top: 82%; }
.kr-tuer {
  position: absolute; inset: 0; transform-origin: 0 50%; transform: rotateY(calc(var(--tuer, 0) * -70deg));
  background: linear-gradient(100deg, var(--kr-blatt-hell), var(--kr-blatt) 70%); border: 1px solid var(--kr-kante); border-radius: 2px;
}
.kr-tuer::after { content: ''; position: absolute; inset: 0; background: #000; opacity: calc(var(--tuer, 0) * 0.45); }
.kr-schild { position: absolute; left: 50%; top: 9%; transform: translateX(-50%); padding: 3px 6px; border: 1px solid var(--kr-kante); border-radius: 4px; font: 600 8.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.kr-griff { position: absolute; right: 9%; top: 40%; width: 5px; height: 22%; border-radius: 3px; background: var(--kr-kante); box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.12); }
.kr-luft { position: absolute; left: 14%; width: 58%; bottom: 13.5%; height: 9%; overflow: visible; fill: none; stroke: var(--rail); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: calc(var(--luft, 0) * 0.42); transform: translateX(calc(var(--luft, 0) * 22%)); }
.kr-luft path { vector-effect: non-scaling-stroke; }
.kr-kabel { position: absolute; left: 56%; width: 8%; top: 41%; border-top: 2px solid var(--kr-kante); }
.kr-sensor { position: absolute; left: 64%; width: 30%; top: 33%; padding: 7% 6% 6%; border: 1px solid var(--kr-kante); border-radius: 9px; background: var(--tile); box-shadow: 0 10px 18px -12px rgba(0, 0, 0, 0.6); transition: border-color 0.3s; }
.kr-sensor svg { display: block; width: 100%; height: auto; }
.kr-name { display: block; margin-top: 4px; font: 600 8px/1 var(--mono); color: var(--muted); }
.kr-led { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--rail); transition: background-color 0.3s, box-shadow 0.3s; }
.kuehlraum.warm .kr-led { background: var(--warm); box-shadow: 0 0 8px var(--warm); }
.kuehlraum.warm .kr-sensor { border-color: var(--warm); }
.kuehlraum .meldung.push {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; visibility: hidden; opacity: 0;
  font-size: 13.5px; line-height: 1.35; border-color: var(--warm); background: color-mix(in srgb, var(--tile) 88%, transparent);
  backdrop-filter: blur(10px); box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.8);
}
.foto-gross { min-height: 500px; }

.terminal { background: var(--chip); border: 1px solid var(--chip-border); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.terminal .kopfzeile { color: #86A3A8; font-size: 11px; }
.terminal .led { width: 9px; height: 9px; border-radius: 50%; background: #45DCE6; }
.terminal .led.warm { background: var(--warm); }
.anzeige { background: #02080A; border: 1px solid var(--chip-border); border-radius: 10px; padding: 18px; min-height: 80px; display: flex; flex-direction: column; justify-content: center; gap: 6px; font-family: var(--mono); }
.anzeige b { font-size: 17px; font-weight: 600; color: #45DCE6; }
.anzeige span { font-size: 13px; color: #86A3A8; }
.nfc { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; color: #86A3A8; }
.maschinen { display: flex; flex-direction: column; gap: 10px; }
.maschinen li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 66px; padding: 12px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
}
.maschinen li.waehlbar { border-color: var(--rail); }
.maschinen b { display: block; font-size: 17px; }
.zustand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.zustand.warm { color: var(--warm-text); }

.geraete li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) 64px; gap: 6px 20px; align-items: center; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.geraete .ort { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.geraete .wert { font-family: var(--mono); font-weight: 600; color: var(--accent-text); }
/* Beim Senden des Berichts leuchtet jede Zeile kurz auf (bewegung.js setzt --abtast) */
.geraete li { position: relative; }
.geraete li::before { content: ''; position: absolute; inset: 1px -8px; border-radius: 8px; background: var(--accent); opacity: calc(var(--abtast, 0) * 0.14); pointer-events: none; }

/* Monatsbericht: Knopf und Bestätigung liegen übereinander, die Fläche ist in jedem Zustand gleich hoch */
.bericht { display: grid; justify-items: start; align-items: start; }
.bericht > * { grid-area: 1 / 1; }
.bericht .knopf { position: relative; overflow: hidden; isolation: isolate; }
.bericht .fuellung { position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--on-accent) 16%, transparent); transform: scaleX(0); transform-origin: left center; }
.bericht-karte { justify-self: stretch; display: flex; align-items: center; gap: 12px; padding: 8px 14px; line-height: 1.3; border: 1px solid var(--rail); border-radius: 12px; background: var(--bg); visibility: hidden; opacity: 0; }
html:not(.bw-an) .bericht-karte { transition: opacity 0.25s ease; }
.bericht-karte svg { flex: none; width: 30px; height: 38px; overflow: visible; }
.bericht-karte b { display: block; font-size: 15px; margin-bottom: 3px; }
.pdf-blatt { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; }
.pdf-zeile { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 12; }
.pdf-haken circle { fill: var(--accent); }
.pdf-haken path { fill: none; stroke: var(--on-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bericht.gesendet .knopf { visibility: hidden; }
.bericht.gesendet .bericht-karte { visibility: visible; opacity: 1; }

/* Webseiten-Referenz */
.browser { border-radius: 12px 12px 0 0; overflow: hidden; border: 1px solid var(--line); border-bottom: 0; margin-right: 110px; }
.browser .leiste { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--cap-bg); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.browser .leiste i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser img { width: 100%; height: 340px; object-fit: cover; object-position: top; }
.referenz { padding: 22px 22px 0; position: relative; overflow: hidden; min-height: 400px; }
.referenz .handy { position: absolute; right: 22px; bottom: 22px; width: 150px; height: 300px; object-fit: cover; object-position: top; border: 6px solid #0E1416; border-radius: 22px; }

/* Wege */
.weg { min-height: 190px; justify-content: space-between; gap: 18px; }
.weg .h-xs + span { font-family: var(--mono); font-size: 14px; color: var(--accent-text); }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: 7px; font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 0; }
.feld input, .feld textarea, .eingabe {
  width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px;
  padding: 14px; color: var(--text); font-family: var(--sans); font-size: 16px; min-height: 50px;
}
.feld textarea { resize: vertical; min-height: 130px; }
.feld input:focus, .feld textarea:focus, .eingabe:focus { outline: 2px solid var(--rail); outline-offset: 1px; border-color: var(--rail); }
.formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.formular .voll { grid-column: 1 / -1; }
.formular-hinweis { font-size: 13px; color: var(--muted); }
.formular-hinweis a { color: var(--sec); text-decoration: underline; text-underline-offset: 2px; }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.meldung { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: var(--bg); }
.meldung.fehler { border-color: var(--warm); }
.meldung.ok { border-color: var(--rail); }
.meldung:empty { display: none; }
.kontakt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; }

/* Fußzeile */
.fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fuss nav { display: flex; gap: 20px; }
.fuss a { min-height: 32px; display: inline-flex; align-items: center; }
.fuss a[aria-current="page"] { color: var(--text); }

/* ── Textseiten (Impressum, Datenschutz) ── */
.text-artikel { display: flex; flex-direction: column; gap: 34px; }
.text-artikel section { display: flex; flex-direction: column; gap: 14px; }
.text-artikel section + section { padding-top: 30px; border-top: 1px solid var(--line); }
.text-artikel h2 { font-stretch: 110%; font-weight: 800; font-size: 30px; line-height: 1.1; }
.text-artikel h3 { margin-top: 10px; font-weight: 700; font-size: 19px; line-height: 1.3; }
.text-artikel h4 { font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--muted); }
.text-artikel p, .text-artikel li { max-width: 680px; font-size: 16px; line-height: 1.7; color: var(--sec); overflow-wrap: anywhere; }
.text-artikel ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.text-artikel ul li::before { content: '· '; color: var(--rail); }
.text-artikel a { color: var(--accent-text); border-bottom: 1px solid currentColor; }
.text-artikel strong { color: var(--text); font-weight: 600; }
.h2-punkt { display: flex; align-items: center; gap: 12px; }
.h2-punkt::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--rail); flex: none; }
.typenschild dl { display: grid; grid-template-columns: 110px 1fr; }
.typenschild dt { padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.typenschild dd { padding: 14px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.typenschild dt:last-of-type, .typenschild dd:last-of-type { border-bottom: 0; }
.typenschild .kopf-schild { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 2px solid var(--rail); }
.typenschild svg.chip { width: 48px; height: 48px; }
.inhalt ol { padding-left: 16px; border-left: 2px solid var(--rail); }
.inhalt li { position: relative; padding: 9px 0; }
.inhalt li::before { content: ''; position: absolute; left: -24px; top: 15px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--rail); background: var(--tile); }
.inhalt a { display: flex; flex-direction: column; gap: 2px; font-weight: 600; color: var(--sec); }
.inhalt a span { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); }
.schalter { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; width: 100%; padding: 0; background: transparent; border: 0; color: var(--text); text-align: left; cursor: pointer; }
.schalter .bahn { flex: none; width: 46px; height: 26px; border-radius: 999px; border: 1px solid var(--btn-border); position: relative; }
.schalter .bahn::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: left .15s; }
.schalter[aria-checked="true"] .bahn { background: var(--accent); }
.schalter[aria-checked="true"] .bahn::after { left: 23px; background: var(--on-accent); }
.oben-kleben { align-self: start; position: sticky; top: 14px; }
#matomo-opt-out { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--sec); }
#matomo-opt-out:empty { display: none; }

/* ── Konto ── */
.konto-seite { min-height: 100vh; display: flex; flex-direction: column; }
.konto-seite .wrap { flex: 1; display: flex; flex-direction: column; padding-bottom: 32px; width: 100%; }
.konto-mitte { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.konto-raster { width: 100%; max-width: 1040px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.konto-raster .kachel { padding: 40px; }
.schritte { padding-left: 22px; border-left: 2px solid var(--rail); display: flex; flex-direction: column; gap: 20px; }
.schritte li { position: relative; display: flex; gap: 12px; align-items: baseline; font-weight: 700; font-size: 17px; }
.schritte li::before { content: ''; position: absolute; left: -30px; top: 5px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rail); background: var(--tile); }
.schritte li:last-child::before { background: var(--accent); }
.schritte .label { font-weight: 400; }
.pw-zeile { display: flex; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px; }
.pw-zeile:focus-within { outline: 2px solid var(--rail); outline-offset: 1px; border-color: var(--rail); }
.pw-zeile input { border: 0 !important; background: transparent !important; outline: none !important; min-width: 0; }
.pw-zeile button { flex: none; min-width: 84px; min-height: 44px; background: transparent; border: 0; color: var(--sec); font-family: var(--mono); font-size: 12px; cursor: pointer; }
.regeln { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.regeln li { display: flex; align-items: center; gap: 8px; }
.regeln li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--rail); }
.regeln li.ok { color: var(--text); }
.regeln li.ok::before { background: var(--accent); }
.text-knopf { align-self: flex-start; min-height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--accent-text); }
.einladung { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--rail); border-radius: 12px; background: var(--bg); }
.vorschau-hinweis { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px dashed var(--warm); border-radius: 10px; font-family: var(--mono); font-size: 12px; color: var(--warm-text); }

/* ── Kundenbereich ── */
.app { max-width: 1280px; margin: 0 auto; padding: 14px; display: flex; flex-wrap: wrap; gap: var(--gap); min-height: 100vh; align-items: stretch; }
.app-seite { flex: 1 1 270px; max-width: 100%; display: flex; flex-direction: column; gap: 26px; padding: 22px; }
.app-haupt { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.nutzer { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.nutzer .kreis { width: 40px; height: 40px; border-radius: 50%; background: var(--chip); border: 1px solid var(--chip-border); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--accent); flex: none; }
.nutzer b { display: block; font-size: 15px; font-family: var(--sans); }
.nutzer span { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.app-menue { display: flex; flex-direction: column; gap: 6px; }
.app-menue .org { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 8px 0 2px 12px; }
.app-menue button {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; width: 100%;
  border: 0; border-radius: 10px; background: transparent; color: var(--sec); font-weight: 600; font-size: 15px; text-align: left; cursor: pointer;
}
.app-menue button::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.app-menue button[aria-current="page"] { background: var(--nav-active); color: var(--text); }
.app-menue button[aria-current="page"]::before { background: var(--accent); border-color: var(--accent); }
.app-unten { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.app-unten .reihe { display: flex; gap: 8px; }
.app-unten .reihe > * { flex: 1; }
.modul-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.modul-karte { display: flex; flex-direction: column; gap: 14px; text-align: left; cursor: pointer; color: var(--text); min-height: 170px; }

.modul-karte b { font-size: 22px; font-stretch: 108%; }

/* ── Breiten ── */
@media (max-width: 1020px) {
  .aufgaben { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s5, .s6, .s7, .s8, .t12 { grid-column: span 12; }
  .r2 { grid-row: auto; }
  .oben-kleben { position: static; }
  .bento > .paar, .bento > .t6 { grid-column: span 6; }
  .foto.hoch { min-height: 420px; }
  .leitung { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 34px; border-top: 0; }
  .leitung li { border-top: 2px solid var(--rail); }
  .demo-oben > .links, .demo-oben > .links.breit, .demo-oben > .rechts, .demo-oben > .rechts.schmal { grid-column: 1 / -1; }
  .demo-oben.kuehl > .kuehlraum { grid-column: span 5; }
  .demo-oben.kuehl > .links { grid-column: span 7; }
  .demo-oben.kuehl > .rechts { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  /* Navigation hinter einem Menüknopf */
  .js .menu-knopf {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--btn-border); border-radius: 10px; color: var(--text); cursor: pointer;
  }
  .js .nav-links { display: none; }
  .js .nav-links.offen {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px; position: absolute; z-index: 20;
    top: 80px; left: 0; right: 0; padding: 14px; background: var(--tile); border: 1px solid var(--line); border-radius: 18px;
    font-size: 15px;
  }
  .js .nav-links.offen a, .js .nav-links.offen button { min-height: 48px; display: flex; align-items: center; padding: 0 10px; }
  .js .nav-links.offen .knopf { justify-content: center; margin-top: 6px; }
  .js .nav-links.offen .theme-knopf { justify-content: center; }

}

@media (max-width: 760px) {
  /* eine Spalte: 12 Spalten mit 28 px Abstand brauchen allein 308 px und laufen auf schmalen Handys über */
  .demo-oben { grid-template-columns: minmax(0, 1fr); }
  .demo-oben.kuehl > .kuehlraum, .demo-oben.kuehl > .links { grid-column: 1 / -1; }
  .kuehlraum { min-height: 240px; }
  .wrap { padding: 0 16px 40px; }
  .nur-breit { display: none; }
  .bento > * { grid-column: 1 / -1; grid-row: auto; }
  .bento > .paar { grid-column: span 6; }
  .bento > .foto.t6 { grid-column: 1 / -1; min-height: 0; aspect-ratio: 1; }
  .kachel { padding: 22px; }
  .kachel.p-l, .kachel.p-m { padding: 26px 22px; }
  .kopf { min-height: 0; }
  .foto.hoch { min-height: 300px; }
  .geraet-status { left: 12px; right: 12px; bottom: 12px; }
  .geraet-status > div { padding: 8px 10px; }
  .geraet-status dd { font-size: 13.5px; }
  .spruch { font-size: 20px; }
  .foto-gross { min-height: 340px; }
  .reiter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reiter button { padding: 0 4px; font-size: 12px; }
  .chip-gross svg { width: 96px; height: 47px; }
  .person { flex-direction: column; align-items: flex-start; gap: 10px; }
  .person img { width: 48px; height: 48px; }
  .person > span { min-width: 0; overflow-wrap: anywhere; }

  /* Leitung senkrecht */
  .leitung { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--rail); margin-left: 7px; row-gap: 0; }
  .leitung li { border-top: 0; padding: 0 0 22px 24px; }
  .leitung li::before { left: -8px; top: 2px; }
  .leitung li:last-child { padding-bottom: 0; }
  .leitung li:last-child::before { left: -9px; top: 1px; }
  .leitung h3 { font-size: 21px; }

  .ablauf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zelle b { font-size: 22px; }
  .aufgaben { grid-template-columns: 1fr; }
  .referenz { min-height: 0; padding: 18px; display: flex; }
  .referenz .browser { display: none; }
  .referenz .handy { position: static; width: 100%; max-width: 220px; height: 400px; margin: 0 auto; }

  .wege { display: flex; flex-direction: column; gap: 0; padding: 6px 22px; }
  .formular, .kontakt { grid-template-columns: 1fr; gap: 28px; }
  .formular { gap: 14px; }
  /* Ort so breit wie nötig, der Wert nimmt den Rest und bricht bei schmalen Handys in zwei Zeilen um */
  .geraete li { grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; grid-template-areas: 'name zustand' 'ort wert'; }
  .geraete .wert { text-wrap: balance; }
  .geraete b { grid-area: name; } .geraete .zustand { grid-area: zustand; justify-self: end; } .geraete .wert { font-size: 14px; } .geraete .ort { grid-area: ort; } .geraete .wert { grid-area: wert; text-align: right; }
  .konto-raster { grid-template-columns: 1fr; }
  .konto-raster .kachel { padding: 26px 22px; }
  .typenschild dl { grid-template-columns: 90px 1fr; }
  .app { padding: 10px; }
}

/* ── Bewegung (nur Startseite, js/bewegung.js) ──
   html.bw: Bewegung erlaubt (Inline-Skript im head). html.bw-an: bewegung.js hat die Startzustände gesetzt.
   Ohne bw (Bewegung reduzieren, kein JS, Skript fehlt) gilt nichts von hier. */
html.bw:not(.bw-an) .bento > :not(.kopf):not(.foto.hoch) { opacity: 0; }

/* Kopf beim Laden: reines CSS, startet mit dem ersten Bild und wartet auf kein Skript */
.bw .kopf .kopfzeile { animation: bw-ein 0.5s ease-out both; }
.bw .h-hero .zeile > span { animation: bw-zeile 0.9s var(--ease-out) both; animation-delay: 0.1s; }
.bw .h-hero .zeile:nth-child(2) > span { animation-delay: 0.2s; }
.bw .h-hero .zeile:nth-child(3) > span { animation-delay: 0.3s; }
.bw .abrechnen::after { animation: bw-balken 0.6s var(--ease-in-out) 0.6s both; }
.bw .kopf-fuss > * { animation: bw-hoch 0.6s var(--ease-out) both; animation-delay: 0.5s; }
.bw .kopf-fuss > :nth-child(2) { animation-delay: 0.58s; }
.bw .geraet-status { animation: bw-hoch 0.6s var(--ease-out) 0.75s both; }
@keyframes bw-ein { from { opacity: 0; } }
@keyframes bw-zeile { from { transform: translateY(110%); } }
@keyframes bw-balken { from { transform: scaleX(0); } }
@keyframes bw-hoch { from { opacity: 0; transform: translateY(12px); } }

.bw .h-hero .zeile { overflow: hidden; padding: 0.1em 0 0.14em; margin: -0.1em 0 -0.14em; }

/* Leitung: Signal läuft durch */
.leitung { position: relative; }
.bw .leitung { --strom: 0; --impuls: 0; border-top-color: var(--line); }
.bw .leitung::before { content: ''; position: absolute; left: 0; top: -2px; width: 100%; height: 2px; background: var(--rail); transform: scaleX(var(--strom)); transform-origin: left center; }
.bw .leitung::after {
  content: ''; position: absolute; top: -7px; left: calc(var(--strom) * 100%); width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent), 0 0 22px var(--accent); opacity: var(--impuls); pointer-events: none;
}
.bw .leitung li { opacity: 0.32; transition: opacity 0.5s ease; }
.bw .leitung li.an { opacity: 1; }
.leitung li::before { transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.bw .leitung li.an::before { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }

/* Chip: Pins, Impuls, Ring */
.chip-anim [data-pin] { transition: fill 0.25s ease; }
.chip-anim [data-pin].aktiv { fill: var(--accent); }
.chip-anim [data-ring] { transition: stroke-width 0.25s ease; }
.chip-anim [data-ring].aktiv { stroke-width: 3.5; fill: color-mix(in srgb, var(--accent) 35%, transparent); }

/* Wege: leicht anheben */
.bw a.weg { transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-color 0.35s ease; }


@media (max-width: 1020px) {
  .bw .leitung::before, .bw .leitung::after { display: none; }
}
@media (max-width: 760px) {
  .bw .leitung { border-left-color: var(--line); }
  .bw .leitung::before { display: block; top: 0; left: -2px; width: 2px; height: 100%; transform: scaleY(var(--strom)); transform-origin: center top; }
  .bw .leitung::after { display: block; top: calc(var(--strom) * 100%); left: -7px; margin: -6px 0 0 0; }
}

/* ── Feinschliff: Hover nur mit Maus, Spotlight, Seitenwechsel ── */
@media (hover: hover) and (pointer: fine) {
  .nav-links a:not(.knopf):hover, .fuss a:hover, .link-linie:hover { color: var(--text); }
  .knopf:not(:disabled):hover { filter: brightness(1.07); }
  .knopf.rahmen:hover, .knopf.leise:hover, .theme-knopf:hover { border-color: var(--rail); color: var(--text); filter: none; }
  .modul-karte:hover { border-color: var(--rail); }
  a.weg { transition: transform 0.35s var(--ease-out), border-color 0.35s ease; }
  a.weg:hover { transform: translateY(-3px); border-color: var(--rail); }

  /* Spotlight: Kante leuchtet dort auf, wo der Zeiger ist (bab.js setzt --mx/--my und .licht) */
  .kachel::after {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--rail) 75%, transparent), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0; transition: opacity 0.4s ease;
  }
  .kachel.licht::after { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .kachel::after { display: none; } }

/* Seitenwechsel weich überblenden (Chrome, Edge, Safari); das Logo bleibt stehen */
@view-transition { navigation: auto; }
.logo { view-transition-name: logo; }
::view-transition-group(*) { animation-duration: 0.32s; animation-timing-function: var(--ease-out); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Hell/Dunkel als Kreis vom Knopf aus (bab.js) */
html.modus-wechsel::view-transition-old(root),
html.modus-wechsel::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.modus-wechsel::view-transition-new(root) { z-index: 2; }
html.modus-wechsel .logo { view-transition-name: none; }

.uhr { font-variant-numeric: tabular-nums; }

/* Terminal in 3D (Startseite): Standbild sofort, das Modell blendet darüber ein, sobald es geladen ist */
:root { --buehne-mitte: #15292E; --buehne-rand: #060F12; }
:root[data-theme="hell"] { --buehne-mitte: #FFFFFF; --buehne-rand: #DDE4E4; }
.foto.modell { background: radial-gradient(circle at 50% 42%, var(--buehne-mitte), var(--buehne-rand)); }
.foto.modell .modell-bild { object-fit: contain; transition: opacity 0.5s ease; }
.dreh-buehne { position: absolute; inset: 0; z-index: 1; cursor: grab; touch-action: pan-y; }
.dreh-buehne:active { cursor: grabbing; }
.dreh-buehne canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; }
.modell.bereit .dreh-buehne canvas { opacity: 1; }
.modell.bereit .modell-bild { opacity: 0; }
.modell .plakette { z-index: 2; pointer-events: none; }
.foto .dreh-hinweis { left: auto; right: 16px; opacity: 0; transition: opacity 0.4s ease; }
.modell.bereit .dreh-hinweis { opacity: 1; }
.modell.gedreht .dreh-hinweis { opacity: 0; }
.nur-finger { display: none; }
@media (pointer: coarse) { .nur-maus { display: none; } .nur-finger { display: inline; } }

/* Fotos mit leichter Parallaxe (bewegung.js): die Vergrößerung steht schon vor dem Skript, damit nichts springt */
@media (min-width: 761px) { .bw .bento .foto:not(.modell) img { transform: scale(1.08); } }

/* Weiches Scrollen (Lenis, nur mit Maus/Trackpad, siehe bewegung.js) */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
