/* OBD Dashboard — Webseite. Nur HTML und CSS: kein JavaScript, keine fremden Schriften oder Dienste (s. _headers: CSP erlaubt nur eigene Dateien).
   Farben: die Cockpit-Palette der App (dunkel) und eine helle Variante im selben Farbton. Die Variablen stehen nur hier; check-site.py liest sie
   und verlangt für jedes Text/Hintergrund-Paar mindestens 4,5:1. Wer eine Farbe ändert, lässt die Prüfung laufen. */

@font-face { font-family: "Space Grotesk"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/space-grotesk-regular.ttf") format("truetype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/space-grotesk-bold.ttf") format("truetype"); }

:root {
  color-scheme: dark light;
  --bg: #050d1a;
  --surface: #0a1628;
  --surface-2: #0d2035;
  --text: #e2f3fb;
  --muted: #9dc5d6;
  --line: #243b4c;
  --link: #38bdf8;
  --btn-bg: #38bdf8;
  --btn-text: #000d1a;
  --accent: #f97316;
  --dim: #12263a;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f8fb;
    --surface: #ffffff;
    --surface-2: #e8f0f6;
    --text: #0b1b2e;
    --muted: #3d566a;
    --line: #c5d5e0;
    --link: #035f8f;
    --btn-bg: #035f8f;
    --btn-text: #ffffff;
    --accent: #b8400a;
    --dim: #d3e0ea;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(1.9rem, 7vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
p, ul, ol, dl { margin: 0 0 1em; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
.mono { overflow-wrap: anywhere; }

.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--btn-bg); color: var(--btn-text); padding: .75rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* Kopf: Name links, Seiten-Navigation und Sprachwahl rechts; bricht auf schmalen Bildschirmen um */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding-block: .6rem; }
.brand { order: 1; display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; margin-right: auto; }
.brand img { width: 2rem; height: 2rem; border-radius: 22%; }
.site-header nav { order: 2; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-header nav.lang { order: 3; }
.site-header nav a { color: var(--text); text-decoration: none; min-height: 2.75rem; display: inline-flex; align-items: center; }
.site-header nav a:hover { text-decoration: underline; }
.lang a { padding-inline: .5rem; font-weight: 700; }
.lang a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: .15em; }

/* Startseite */
.hero { padding-block: clamp(2rem, 7vw, 4.5rem) 1.5rem; }
.hero-grid { display: grid; gap: 1.5rem; grid-template-columns: auto 1fr; align-items: center; }
.hero-grid img { width: 6rem; height: 6rem; border-radius: 22%; border: 1px solid var(--line); }
.hero h1 { margin-bottom: .2em; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 42rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: .5rem 1.5rem; border-radius: .25rem;
  background: var(--btn-bg); color: var(--btn-text); font-weight: 700; text-decoration: none; border: 2px solid var(--btn-bg); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--link); border-color: var(--link); }
/* Segmentleiste wie der Drehzahlbalken der App: nur Zierde (aria-hidden im HTML), keine Information */
.segbar { height: .6rem; margin-top: 2.5rem; -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 .8rem, transparent .8rem .95rem);
  mask-image: repeating-linear-gradient(90deg, #000 0 .8rem, transparent .8rem .95rem);
  background: linear-gradient(90deg, var(--link) 0 72%, var(--accent) 72% 84%, var(--dim) 84% 100%); }

section { padding-block: 2.5rem; }
section + section { border-top: 1px solid var(--line); }
.features { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.features li { background: var(--surface); padding: 1rem 1.25rem; margin: 0; }
.features strong { display: block; color: var(--text); }
.features span { color: var(--muted); }
.shots { display: grid; gap: 1.5rem; }
.shots figure { margin: 0; background: var(--surface); border: 1px solid var(--line); }
.shots figcaption { padding: .75rem 1rem; color: var(--muted); }
.shots img { width: 100%; }
.note { background: var(--surface-2); border-left: .35rem solid var(--accent); padding: 1rem 1.25rem; margin-block: 1.25rem; }
.note > :last-child { margin-bottom: 0; }
.facts { display: grid; gap: .35rem 1.5rem; grid-template-columns: max-content 1fr; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.muted { color: var(--muted); }

/* Datenschutzerklärung */
.doc { max-width: 46rem; padding-block: 2.5rem 3rem; }
.doc h2 { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.doc h2:first-of-type { border-top: 0; }
.toc { background: var(--surface); border: 1px solid var(--line); padding: 1rem 1.25rem 1rem 2.5rem; }
.toc li { margin-block: .2rem; }
.doc address { font-style: normal; background: var(--surface); border: 1px solid var(--line); padding: 1rem 1.25rem; }
/* Berechtigungen als Liste statt Tabelle: eine Tabelle mit drei Spalten sprengt ein Handy; die Liste bricht von selbst um */
.perms { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.perms li { background: var(--surface); padding: .9rem 1.1rem; margin: 0; }
.perms span { display: block; margin-top: .3rem; }
.perms .when { color: var(--muted); }
.doc code { overflow-wrap: anywhere; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 2rem; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: grid; gap: .75rem; }
.site-footer p { margin: 0; }

@media (min-width: 48rem) {
  .features { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: 1fr 1fr; }
}
/* Schmal: Name und Sprachwahl in einer Zeile, das Menü darunter; die reinen Sprunglinks (.opt) entfallen, die Seite ist ein einziger Scroll */
@media (max-width: 47.99rem) {
  .site-header .wrap { gap: .1rem 1rem; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .site-header nav.lang { order: 2; flex-basis: auto; gap: 0; }
  .lang a { padding-inline: .4rem; }
}
@media (max-width: 32rem) {
  .site-header nav a.opt { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: .6rem; }
  .actions .btn { width: 100%; }
}
@media (forced-colors: active) { .segbar { background: CanvasText; } }
