/* ==========================================================================
   Korte Motorsport – Onepager
   Schwarzes Motorsport-Design mit Akzenten aus dem Logo (Blau, Zielflaggen-Grau).
   Schriften: Barlow / Barlow Condensed (SIL OFL 1.1), lokal eingebunden –
   keine externen Fonts, CDNs oder Tracker.
   ========================================================================== */

/* ---------- Schriften (lokal, Latin-Subset inkl. Umlaute) ---------- */
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/Barlow-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/Barlow-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/Barlow-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/BarlowCondensed-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/BarlowCondensed-700-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* Flächen */
  --bg: #0A0A0B;
  --bg-2: #101113;
  --surface: #15171A;
  --surface-2: #1C1F23;
  --line: #262A30;
  --line-2: #363B43;

  /* Text */
  --text: #F4F5F7;
  --muted: #A6ADB8;
  --dim: #6F7783;

  /* Logo-Akzente */
  --blue: #0A9BF0;        /* Leuchtblau – Linien, Icons, Hervorhebungen */
  --blue-hi: #45B6FF;     /* Links auf Schwarz */
  --blue-btn: #0778C2;    /* Button-Fläche (weiße Schrift, Kontrast ≥ 4,5:1) */
  --blue-btn-hover: #0A8FE3;
  --blue-tint: rgba(10, 155, 240, .12);
  --silver: #9C9E9D;      /* Zielflaggen-Grau */

  --error: #FDA29B;
  --error-line: #F04438;
  --ok: #75E0A7;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
  --header-h: 76px;
  --container: 1160px;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Condensed", "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-head); font-weight: 700; line-height: 1.05;
  margin: 0 0 .5em; letter-spacing: .01em; text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: .02em; }
h4 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blue-hi); text-underline-offset: .18em; }
a:hover { color: #7FCCFF; }
address { font-style: normal; }
strong { font-weight: 600; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.small { font-size: .92rem; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--blue-btn); color: #fff; padding: 10px 16px; border-radius: 4px; font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Platzhalter deutlich sichtbar – vor Veröffentlichung ersetzen! */
mark.ph {
  background: rgba(250, 204, 21, .14);
  color: #FDE68A;
  border: 1px dashed #A16207;
  border-radius: 4px;
  padding: .05em .4em;
  font-weight: 500;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: .7em 1.6em;
  font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; line-height: 1;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 4px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue-btn); color: #fff; box-shadow: 0 8px 24px rgba(10, 155, 240, .25); }
.btn-primary:hover { background: var(--blue-btn-hover); color: #fff; box-shadow: 0 10px 30px rgba(10, 155, 240, .38); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); color: #fff; }
.btn-sm { min-height: 42px; padding: .5em 1.1em; font-size: 1rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: var(--blue-hi);
  text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 11, .86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(10, 10, 11, .95); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 56px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 18px; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav-list a {
  position: relative; display: block; padding: .55em .9em;
  color: var(--text); text-decoration: none;
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.nav-list a::after {
  content: ""; position: absolute; left: .9em; right: .9em; bottom: .25em; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.nav-list a:hover, .nav-list a[aria-current="true"] { color: #fff; }
.nav-list a:hover::after, .nav-list a[aria-current="true"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: .45em .9em;
  background: transparent; border: 1px solid var(--line-2); border-radius: 4px;
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .brand-logo { height: 46px; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 12px;
    padding: 12px 20px 22px;
    background: var(--bg-2); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { padding: .8em .4em; font-size: 1.25rem; border-bottom: 1px solid var(--line); }
  .nav-list a::after { display: none; }
  .nav-cta { align-self: stretch; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 420px at 78% 45%, rgba(10, 155, 240, .16), transparent 65%),
    linear-gradient(180deg, #0A0A0B 0%, #0E0F11 100%);
  padding: clamp(56px, 9vw, 120px) 0;
}
/* blaue Linie am unteren Rand */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue) 30%, rgba(10, 155, 240, 0) 85%);
}
/* Zielflaggen-Muster (reines CSS) */
.hero-flag {
  position: absolute; right: -8%; bottom: -30%;
  width: 62%; height: 120%;
  background-image: conic-gradient(#1E2125 25%, transparent 0 50%, #1E2125 0 75%, transparent 0);
  background-size: 56px 56px;
  transform: skewY(-12deg) rotate(-4deg);
  opacity: .9;
  -webkit-mask-image: linear-gradient(115deg, transparent 20%, #000 75%);
          mask-image: linear-gradient(115deg, transparent 20%, #000 75%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .7em;
  margin: 0 0 1em; font-family: var(--font-head); font-size: 1rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--blue-hi);
}
.eyebrow::before { content: ""; width: 36px; height: 4px; background: var(--blue); transform: skewX(-25deg); }
.hero h1 { margin-bottom: .35em; }
.hero h1 .accent { color: var(--blue); display: block; }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--muted); max-width: 32em; }
/* Hinweis „Termine nur nach Vereinbarung“ – bewusst auffällig */
.notice {
  display: flex; align-items: center; gap: 14px;
  max-width: 34em; margin: 26px 0 0; padding: 14px 18px;
  background: var(--blue-tint); border: 1px solid rgba(10, 155, 240, .45); border-left: 4px solid var(--blue);
  border-radius: 4px; color: var(--muted); font-size: 1rem; line-height: 1.45;
}
.notice strong {
  display: block; color: #fff;
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.notice-icon {
  width: 30px; height: 30px; flex-shrink: 0; color: var(--blue);
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.info-item.info-item-highlight { border-color: rgba(10, 155, 240, .45); border-left: 3px solid var(--blue); background: var(--blue-tint); }
.info-item.info-item-highlight p { color: #fff; font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-logo img { width: 100%; max-width: 500px; height: auto; margin-inline: auto; filter: drop-shadow(0 10px 40px rgba(10, 155, 240, .18)); }

@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-logo { display: none; }   /* Logo steht bereits im Header */
  .hero-flag { width: 100%; opacity: .6; }
}

/* ---------- Sektionen ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-soft { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin-bottom: 40px; }
/* kurzer Einleitungssatz unter einer Abschnittsüberschrift */
.section-title:has(+ .section-lead) { margin-bottom: 22px; }
.section-lead { max-width: 40em; margin: 0 0 36px; color: var(--muted); font-size: 1.15rem; }
.section-title::after {
  content: ""; display: block; width: 64px; height: 4px; margin-top: 14px;
  background: var(--blue); transform: skewX(-25deg); transform-origin: left;
}

/* ---------- Leistungen ---------- */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px;
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 24px; overflow: hidden;
  transition: transform .2s, border-color .2s, background-color .2s;
}
/* blaue Kante links beim Hover */
.card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--blue); transform: scaleY(0); transform-origin: top; transition: transform .25s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--surface-2); }
.card:hover::after { transform: scaleY(1); }
.card h3 { margin: 18px 0 .35em; }
.card p { color: var(--muted); margin: 0; font-size: 1rem; }

.card-icon {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 6px;
  background: var(--blue-tint); color: var(--blue);
  border: 1px solid rgba(10, 155, 240, .25);
}
.card-icon svg {
  width: 26px; height: 26px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.card-icon svg .fill { fill: currentColor; stroke: none; }

/* ---------- Über uns ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.about .section-title { margin-bottom: 24px; }
.about-text { color: var(--muted); font-size: 1.15rem; max-width: 36em; margin: 0; }
.about-text strong { color: var(--text); }
.location-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--blue);
  border-radius: var(--radius); padding: 24px;
}
.location-card h3, .info-item h3 {
  font-size: .95rem; letter-spacing: .14em; color: var(--muted); margin: 2px 0 6px;
}
.location-card address { font-size: 1.12rem; font-weight: 500; line-height: 1.55; }

@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Kontakt (kompakt) ---------- */
.contact { display: grid; grid-template-columns: .75fr 1.6fr; gap: 24px; align-items: start; max-width: 1000px; }
.contact-info { display: grid; gap: 10px; }

/* Telefon / E-Mail: kleine, ruhige Kästchen */
.info-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px;
}
.info-item .card-icon { width: 36px; height: 36px; border-radius: 5px; }
.info-item .card-icon svg { width: 19px; height: 19px; }
.contact-info .info-item h3 { font-size: .78rem; letter-spacing: .14em; margin: 0 0 2px; }
.info-item p, .info-item address { margin: 0; font-size: 1rem; font-weight: 500; overflow-wrap: anywhere; }
.info-item a { color: var(--text); text-decoration: none; }
.info-item a:hover { color: var(--blue-hi); text-decoration: underline; }

/* Termine nur nach Vereinbarung: bleibt groß und auffällig */
.info-item.info-item-highlight { gap: 16px; align-items: flex-start; padding: 20px; }
.info-item.info-item-highlight .card-icon { width: 48px; height: 48px; border-radius: 6px; }
.info-item.info-item-highlight .card-icon svg { width: 26px; height: 26px; }
.contact-info .info-item.info-item-highlight h3 { font-size: .95rem; margin: 2px 0 6px; }
.info-item.info-item-highlight p { font-size: 1.1rem; }

.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 26px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 500; margin-bottom: 4px; font-size: .92rem; }
.req { color: var(--blue); }
.opt { font-weight: 400; color: var(--dim); font-size: .92em; }

.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .98rem; color: var(--text);
  background: #0E0F11; border: 1px solid var(--line-2); border-radius: 4px;
  padding: .5em .75em; min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23A6ADB8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7em center; background-size: 16px;
  padding-right: 2.4em;
}
.field select option { background: var(--surface-2); color: var(--text); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #4A505A; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 155, 240, .25);
}
.field [aria-invalid="true"] { border-color: var(--error-line); background: rgba(240, 68, 56, .07); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(240, 68, 56, .22); }
.field-error { margin: 4px 0 0; font-size: .86rem; font-weight: 500; color: var(--error); }
.field-error:empty { display: none; }

.field-check {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start;
  background: #0E0F11; border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px;
}
.field-check input {
  width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0;
  accent-color: var(--blue); cursor: pointer;
}
.field-check label { font-weight: 400; font-size: .88rem; line-height: 1.5; color: var(--muted); margin: 0; cursor: pointer; }
.field-check .field-error { grid-column: 1 / -1; }
.field-check:has(input[aria-invalid="true"]) { border-color: var(--error-line); }

/* Honeypot – nicht für Menschen bestimmt */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.form-actions .btn { min-height: 44px; padding: .55em 1.3em; font-size: 1rem; }
.form-actions p { margin: 0; color: var(--dim); font-size: .86rem; }
.form-status {
  margin-top: 14px; padding: 12px 14px; border-radius: 4px;
  font-size: .95rem; font-weight: 500; border: 1px solid;
}
.form-status.is-ok { background: rgba(18, 183, 106, .1); color: var(--ok); border-color: rgba(18, 183, 106, .4); }
.form-status.is-error { background: rgba(240, 68, 56, .1); color: var(--error); border-color: rgba(240, 68, 56, .45); }
.form-status.is-info { background: var(--blue-tint); color: #9AD6FF; border-color: rgba(10, 155, 240, .4); }
.form-status p { margin: 0; }
.form-status p + p { margin-top: .4em; font-weight: 400; }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .info-item.info-item-highlight { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .info-item p, .info-item address { font-size: .95rem; overflow-wrap: break-word; }
  .info-item.info-item-highlight { padding: 16px; gap: 14px; }
  .info-item.info-item-highlight p { font-size: 1.05rem; }
}

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */
.subpage main { background: var(--bg); }
.subpage .header-inner .btn { flex-shrink: 0; }
.legal { padding: clamp(40px, 6vw, 72px) 0; }
.legal + .legal { border-top: 1px solid var(--line); }
.prose { max-width: 860px; }
.prose h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); margin-bottom: .6em; }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; font-weight: 600; letter-spacing: .04em; color: #fff; }
.prose > h2[id$="-title"] { margin-top: 0; font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 700; margin-bottom: .8em; }
.prose h3 { font-size: 1.2rem; }
.prose p, .prose li, .prose dd, .prose td { color: #C5CBD3; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose strong { color: var(--text); }
.facts { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 8px 20px; margin: 0 0 1em; }
.facts dt { font-weight: 600; color: var(--text); }
.facts dd { margin: 0; }
@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}
.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin: 20px 0 8px;
}
.toc ol { margin: 0; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 0 0 1em;
}
.callout p { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 1em; }
table { width: 100%; border-collapse: collapse; font-size: .98rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th {
  background: var(--surface-2); white-space: nowrap; color: var(--text);
  font-family: var(--font-head); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -10000px; }
  tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  td { border: 0; padding: 4px 14px; }
  td:first-child { font-weight: 600; color: var(--text); }
}

/* ---------- Footer ---------- */
.site-footer { background: #060607; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px 28px; padding-top: 24px; padding-bottom: 24px;
}
.footer-inner p { margin: 0; color: var(--dim); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer-nav a, .footer-nav .linklike {
  font-family: var(--font-head); font-size: 1rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.footer-nav a:hover, .footer-nav .linklike:hover { color: #fff; }

/* ---------- Overlay Impressum / Datenschutz ---------- */
html.dialog-open { overflow: hidden; }
.legal-dialog {
  width: min(920px, calc(100% - 32px)); max-width: none;
  height: min(88vh, 1000px); max-height: none;
  margin: auto; padding: 0;
  display: none; flex-direction: column;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-top: 3px solid var(--blue); border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.legal-dialog[open] { display: flex; animation: dialog-in .25s ease-out; }
.legal-dialog::backdrop { background: rgba(0, 0, 0, .78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.legal-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 12px 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.legal-dialog-title {
  margin: 0; font-family: var(--font-head); font-size: 1.2rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.legal-dialog-close {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: transparent; color: var(--text); border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer;
}
.legal-dialog-close:hover { border-color: var(--blue); color: #fff; }
.legal-dialog-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.legal-dialog-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: 16px; }
.legal-dialog-body:focus { outline: none; }
.legal-dialog-body .legal { padding: 32px 0; }
.legal-dialog-body .legal:first-child { padding-top: 28px; }
.legal-dialog-body .container { padding-inline: clamp(18px, 4vw, 40px); }
/* Variante für lokal geöffnete Dateien: Inhalt als eingebettete Seite */
.legal-dialog-body.is-frame { overflow: hidden; display: flex; }
.legal-frame { flex: 1; width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.embedded .site-header, .embedded .site-footer, .embedded .skip-link { display: none; }
.embedded .legal:first-of-type { padding-top: 28px; }

@media (max-width: 600px) {
  .legal-dialog { width: 100%; height: 100%; max-height: 100dvh; border-radius: 0; border-left: 0; border-right: 0; }
  .legal-dialog-head { padding-left: 16px; }
}

/* ---------- Cookie-/Speicher-Hinweis ---------- */
.consent {
  position: fixed; z-index: 150; left: 16px; right: 16px; bottom: 16px;
  margin-inline: auto; max-width: 640px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
  animation: consent-in .35s ease-out;
}
.consent[hidden] { display: none; }
@keyframes consent-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.consent-inner { padding: 22px 24px; }
.consent-title { font-size: 1.4rem; margin-bottom: .35em; }
.consent p { font-size: .98rem; color: var(--muted); margin-bottom: .9em; }
.consent-cats { margin: 0 0 14px; display: grid; gap: 8px; }
.consent-cats:empty { display: none; }
.consent-cat {
  display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--muted);
  background: var(--surface); border-radius: 4px; padding: 10px 12px;
}
.consent-cat input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); flex-shrink: 0; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-actions .btn { flex: 1 1 180px; }
@media (max-width: 600px) {
  .consent { left: 10px; right: 10px; bottom: 10px; }
  .consent-inner { padding: 16px 16px 14px; }
  .consent-title { font-size: 1.25rem; }
  .consent p { font-size: .92rem; line-height: 1.5; margin-bottom: .7em; }
  .consent-actions .btn { min-height: 46px; }
}
