/* Kanzelwart design system – see docs/UI.md */

:root {
  --c-forest: #1F3D2B; --c-forest-600: #2E5A3F; --c-moss: #6B8F4E; --c-sand: #EFE8DA; --c-bark: #6B4F3A;
  --c-bg: #F7F5F0; --c-surface: #FFFFFF; --c-text: #1C211D; --c-muted: #5E665F; --c-line: #E2DED3;
  --c-ok: #2F9E44; --c-due: #E8A317; --c-overdue: #D9480F; --c-blocked: #C92A2A; --c-info: #1C7ED6;
  --c-primary: var(--c-forest); --c-primary-hover: var(--c-forest-600); --c-on-primary: #FFFFFF;
  --c-focus: #1C7ED6; --c-link: #155FA0; --c-control: #80877F; /* AA: link text 4.5:1, control borders 3:1 */
  --radius: 14px; --radius-sm: 8px; --shadow: 0 2px 10px rgba(20, 30, 20, .08);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --tap: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-s: 14px; --fs-m: 16px; --fs-l: 18px; --fs-xl: 22px; --fs-xxl: 28px;
  --nav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #121714; --c-surface: #1A211C; --c-text: #E8EDE9; --c-muted: #A3ADA5; --c-line: #2B362E;
    --c-sand: #262B24; --c-primary: #4C9A6A; --c-primary-hover: #5FAE7E; --c-on-primary: #0C130E;
    --c-ok: #51CF66; --c-due: #FFC940; --c-overdue: #FF8A4C; --c-blocked: #FF6B6B; --c-info: #74C0FC;
    --c-focus: #74C0FC; --c-link: #74C0FC; --c-control: #76827A; --shadow: 0 2px 10px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c-bg: #121714; --c-surface: #1A211C; --c-text: #E8EDE9; --c-muted: #A3ADA5; --c-line: #2B362E;
  --c-sand: #262B24; --c-primary: #4C9A6A; --c-primary-hover: #5FAE7E; --c-on-primary: #0C130E;
  --c-ok: #51CF66; --c-due: #FFC940; --c-overdue: #FF8A4C; --c-blocked: #FF6B6B; --c-info: #74C0FC;
  --c-focus: #74C0FC; --c-link: #74C0FC; --c-control: #76827A; --shadow: 0 2px 10px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--c-bg); color: var(--c-text);
  font: var(--fs-m)/1.5 var(--font);
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s3); }
h1 { font-size: var(--fs-xxl); } h2 { font-size: var(--fs-xl); } h3 { font-size: var(--fs-l); }
p { margin: 0 0 var(--s3); }
a { color: var(--c-link); }
img { max-width: 100%; display: block; }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-s); }
.muted { color: var(--c-muted); }
.small { font-size: var(--fs-s); }
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--c-surface); padding: var(--s2) var(--s4); z-index: 100; }
.skip-link:focus { left: var(--s2); top: var(--s2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Icons */
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon--s { width: 18px; height: 18px; }
.icon--l { width: 32px; height: 32px; }

/* Layout: mobile first */
.body-app { padding-top: calc(56px + env(safe-area-inset-top)); padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--s4) 0; display: flex; align-items: center; justify-content: space-between;
  background: var(--c-forest); color: #fff;
}
.topbar__title { font-size: var(--fs-l); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; align-items: center; gap: var(--s2); }
.icon-btn { width: var(--tap); height: var(--tap); display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: inherit; border-radius: 50%; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--c-moss); color: #fff; font-size: var(--fs-s); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.nav {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(var(--nav-cols, 5), 1fr); align-items: end;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--c-surface); border-top: 1px solid var(--c-line);
}
.nav__brand { display: none; }
.nav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--nav-h); color: var(--c-muted); text-decoration: none; font-size: 12px; font-weight: 600;
}
.nav__item[aria-current="page"] { color: var(--c-primary); }
.nav__item--primary .icon {
  width: 56px; height: 56px; padding: 14px; margin-top: -24px; border-radius: 50%;
  background: var(--c-primary); color: var(--c-on-primary); box-shadow: var(--shadow);
}

.main { padding: var(--s4); max-width: 1200px; margin: 0 auto; }
.body-plain { min-height: 100vh; }
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--s4); }
.auth-card { width: 100%; max-width: 420px; }

@media (min-width: 1024px) {
  .body-app { padding-bottom: 0; padding-left: 240px; }
  .topbar { left: 240px; }
  .nav {
    inset: 0 auto 0 0; width: 240px; height: auto; grid-template-columns: 1fr; align-content: start; gap: var(--s1);
    padding: var(--s5) var(--s3); border-top: 0; border-right: 1px solid var(--c-line);
  }
  .nav__brand { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-xl); font-weight: 700; color: var(--c-primary); padding: 0 var(--s3) var(--s4); }
  .nav__item { flex-direction: row; justify-content: flex-start; gap: var(--s3); min-height: var(--tap); padding: 0 var(--s3); border-radius: var(--radius-sm); font-size: var(--fs-m); }
  .nav__item:hover { background: var(--c-sand); }
  .nav__item[aria-current="page"] { background: var(--c-sand); }
  .nav__item--primary .icon { width: 24px; height: 24px; padding: 0; margin: 0; background: none; color: inherit; box-shadow: none; }
  .nav__item--primary { color: var(--c-primary); }
  .main { padding: var(--s5) var(--s6); }
}

/* Card */
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s4); }
.grid { display: grid; gap: var(--s4); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--kpi { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .grid--kpi { grid-template-columns: repeat(3, 1fr); } }
.kpi { display: flex; flex-direction: column; gap: var(--s1); }
.kpi__value { font-size: var(--fs-xxl); font-weight: 700; line-height: 1; }
.kpi__label { color: var(--c-muted); font-size: var(--fs-s); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s5);
  border: 2px solid transparent; border-radius: var(--radius-sm); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--c-surface); color: var(--c-text);
}
.btn--primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn--primary:hover { background: var(--c-primary-hover); }
.btn--secondary { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn--ghost { background: transparent; color: var(--c-primary); }
.btn--ghost:hover { background: var(--c-sand); }
.btn--danger { background: var(--c-blocked); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--block { width: 100%; }
@media (min-width: 768px) { .btn--block-mobile { width: auto; } }
@media (max-width: 767px) { .btn--block-mobile { width: 100%; } }

/* Forms */
.field { display: flex; flex-direction: column; gap: var(--s1); margin-bottom: var(--s4); }
.field > label { font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap); padding: var(--s2) var(--s3); font: inherit; color: var(--c-text);
  background: var(--c-surface); border: 2px solid var(--c-control); border-radius: var(--radius-sm);
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--c-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-focus) 35%, transparent); }
.field--error .input, .field--error .select, .field--error .textarea { border-color: var(--c-blocked); }
.field__error { color: var(--c-blocked); font-size: var(--fs-s); font-weight: 600; }
.field__hint { color: var(--c-muted); font-size: var(--fs-s); }
.check { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); }
.check input { width: 24px; height: 24px; accent-color: var(--c-primary); }

/* Status chip: dot + text, never color only */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; min-height: 28px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface); font-size: var(--fs-s); font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--c-muted)); }
.chip--ok { --dot: var(--c-ok); } .chip--due { --dot: var(--c-due); } .chip--overdue { --dot: var(--c-overdue); }
.chip--blocked { --dot: var(--c-blocked); } .chip--info { --dot: var(--c-info); }
.chip--blocked::before { border-radius: 2px; }

/* List row */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s3) var(--s4); color: inherit; text-decoration: none; background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.list > :first-child .list-row { border-radius: var(--radius) var(--radius) 0 0; }
.list > :last-child .list-row { border-radius: 0 0 var(--radius) var(--radius); border-bottom: 0; }
.list-row__icon { color: var(--c-primary); }
.list-row__main { flex: 1; min-width: 0; }
.list-row__title { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row__sub { display: block; color: var(--c-muted); font-size: var(--fs-s); }
.list-row__chev { color: var(--c-muted); }
.list-row .chip { flex: none; }

/* Segmented control (OK / Mangel / n.a.) */
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); border: 0; padding: 0; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 56px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--c-control); border-radius: var(--radius-sm); background: var(--c-surface);
}
.segmented input:focus-visible + label { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.segmented input:checked + label { color: #fff; border-color: transparent; }
.segmented .seg-ok:checked + label { background: var(--c-ok); }
.segmented .seg-defect:checked + label { background: var(--c-blocked); }
.segmented .seg-na:checked + label { background: var(--c-muted); }

/* Toast, banner */
.toast { padding: var(--s3) var(--s4); border-radius: var(--radius-sm); background: var(--c-forest); color: #fff; margin-bottom: var(--s4); box-shadow: var(--shadow); }
.toast--error { background: var(--c-blocked); }
.toast--warn { background: var(--c-due); color: #1C211D; }
.banner { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border-radius: var(--radius-sm); background: var(--c-sand); border: 1px solid var(--c-line); }

/* Progress */
.progress { height: 10px; border-radius: 999px; background: var(--c-line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--c-primary); border-radius: inherit; }

/* Modal (static markup, toggled by :target) and bottom sheet */
.modal { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .5); align-items: center; justify-content: center; padding: var(--s4); }
.modal:target { display: flex; }
.modal__box { width: 100%; max-width: 420px; }
.sheet { background: var(--c-surface); border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -4px 20px rgba(0, 0, 0, .15); padding: var(--s4); padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom)); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto var(--s3); border-radius: 2px; background: var(--c-line); }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.photo-grid > * { aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--c-sand); border: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center; color: var(--c-muted); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--c-line) 25%, var(--c-sand) 50%, var(--c-line) 75%); background-size: 200% 100%; animation: sk 1.4s infinite linear; border-radius: var(--radius-sm); min-height: 20px; }
@keyframes sk { to { background-position: -200% 0; } }

/* Empty state */
.empty { text-align: center; padding: var(--s6) var(--s4); }
.empty .icon { width: 56px; height: 56px; color: var(--c-moss); margin-bottom: var(--s3); }

/* Styleguide */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); }
.swatch { border: 1px solid var(--c-line); border-radius: var(--radius-sm); overflow: hidden; background: var(--c-surface); font-size: 12px; }
.swatch__color { height: 48px; background: var(--sw); }
.swatch__label { padding: var(--s1) var(--s2); }
.section-title { margin-top: var(--s6); padding-bottom: var(--s2); border-bottom: 1px solid var(--c-line); }
.trace { overflow: auto; max-height: 240px; background: var(--c-sand); padding: var(--s3); border-radius: var(--radius-sm); }

/* ---- P2: facilities, dashboard, forms ---- */
.topbar__title { color: inherit; text-decoration: none; font-size: var(--fs-l); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
a.nav__brand { text-decoration: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.page-head h1 { margin: 0; }
.banner--danger { background: color-mix(in srgb, var(--c-blocked) 14%, var(--c-surface)); border-color: var(--c-blocked); margin-bottom: var(--s4); }
.banner--warn { background: color-mix(in srgb, var(--c-due) 22%, var(--c-surface)); border-color: var(--c-due); }
.banner[hidden] { display: none; }
.banner a { margin-left: auto; font-weight: 600; }

.grid--kpi a.kpi { text-decoration: none; color: inherit; border-left: 6px solid var(--c-line); }
.kpi--ok { border-left-color: var(--c-ok) !important; } .kpi--due { border-left-color: var(--c-due) !important; }
.kpi--overdue { border-left-color: var(--c-overdue) !important; } .kpi--blocked { border-left-color: var(--c-blocked) !important; }
.kpi--defects { border-left-color: var(--c-info) !important; }

.detail-grid { display: grid; gap: var(--s5); align-items: start; margin-bottom: var(--s5); }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.hero-photo { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3) var(--s4); }
.facts dt { color: var(--c-muted); font-size: var(--fs-s); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.facts__wide { grid-column: 1 / -1; }

.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--c-line); margin-bottom: var(--s4); overflow-x: auto; }
.tabs__item { padding: var(--s3) var(--s4); min-height: var(--tap); display: inline-flex; align-items: center; color: var(--c-muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs__item[aria-current="page"] { color: var(--c-primary); border-bottom-color: var(--c-primary); }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.photo-grid__item { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--c-sand); }
.photo-grid__item a, .photo-grid__item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-grid__del { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.photo-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-bottom: var(--s3); }
.photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.photo-preview:empty { display: none; }
.lightbox { border: 0; padding: var(--s3); background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-width: 92vw; max-height: 80vh; margin: var(--s3) auto 0; border-radius: var(--radius-sm); }
.lightbox__close { display: block; margin-left: auto; }

.filter-form { display: grid; gap: var(--s3); }
.filter-form .field { margin-bottom: 0; }
.filter-form__row { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.form-grid { display: grid; gap: var(--s4); }
@media (min-width: 1024px) { .form-grid { grid-template-columns: 1fr 1fr; align-items: start; } .form-actions { grid-column: 1 / -1; } }
.form-actions { display: flex; gap: var(--s3); flex-wrap: wrap; }
@media (max-width: 420px) { .list-row { padding-inline: var(--s3); } .list-row__chev { display: none; } .list-row .chip { padding-inline: 8px; } }
@media (max-width: 767px) { .hero-photo { max-height: 220px; } }

/* ---- P3: inspection wizard, checklists ---- */
[x-cloak] { display: none !important; }
.segmented input:checked + .seg-sev--low { background: var(--c-info); }
.segmented input:checked + .seg-sev--medium { background: var(--c-due); color: #1C211D; }
.segmented input:checked + .seg-sev--critical { background: var(--c-blocked); }
.wizard { display: flex; flex-direction: column; gap: var(--s4); padding-bottom: calc(var(--tap) + var(--s5)); max-width: 720px; margin: 0 auto; }
.wizard__head { display: flex; flex-direction: column; }
.wizard__title { margin: 0; font-size: var(--fs-xl); overflow-wrap: anywhere; }
.wizard__step h2 { font-size: 26px; overflow-wrap: anywhere; }
.wizard__step .segmented label { font-size: var(--fs-l); min-height: 64px; }
.wizard__bar {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  display: flex; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--c-surface); border-top: 1px solid var(--c-line);
}
.wizard__next { flex: 1; }
@media (min-width: 1024px) { .wizard__bar { left: 240px; bottom: 0; } }
.wizard__photo { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--c-sand); }
.wizard__photo img { width: 100%; height: 100%; object-fit: cover; }
.wizard__sum { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
.checklist-up, .checklist-down { transform: rotate(90deg); }
.checklist-row .field { margin-bottom: var(--s3); }

/* PWA / offline */
.sync-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-s); font-weight: 600; text-decoration: none; white-space: nowrap; background: rgba(255, 255, 255, .16); color: #fff; }
.sync-pill[hidden] { display: none; }
.sync-pill--warn { background: var(--c-due); color: #1C211D; }
.icon-btn.is-busy .icon { animation: kw-spin 1s linear infinite; }
@keyframes kw-spin { to { transform: rotate(360deg); } }
.update-bar { position: fixed; z-index: 60; inset: auto var(--s4) calc(var(--nav-h) + var(--s4) + env(safe-area-inset-bottom)) var(--s4); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--radius-sm); background: var(--c-forest); color: #fff; box-shadow: var(--shadow); }
.banner[hidden] { display: none; }
.banner__actions { display: flex; gap: var(--s2); margin-left: auto; flex-wrap: wrap; }
.op-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.op-list__item { display: grid; gap: var(--s2); }
.op-list__error { color: var(--c-blocked); margin: 0; }
.progress--wide { width: 100%; }
@media (min-width: 900px) { .update-bar { inset: auto auto var(--s5) var(--s5); max-width: 420px; } }

/* P6: legal pages, footer links */
.doc { max-width: 720px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); }
.legal-text h2 { margin-top: var(--s5); }
.legal-text ul { padding-left: var(--s5); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s4); margin-top: var(--s5); font-size: var(--fs-s); }
.legal-links a { color: var(--c-muted); min-height: 32px; display: inline-flex; align-items: center; }

/* P7: public landing page */
.body-site { min-height: 100vh; display: flex; flex-direction: column; }
.body-site main { flex: 1; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); max-width: 1100px; width: 100%; margin: 0 auto; }
.site-header__brand { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-xl); font-weight: 700; color: var(--c-primary); text-decoration: none; min-height: var(--tap); }
.site-header__nav { display: flex; align-items: center; gap: var(--s2); }
@media (max-width: 479px) { .site-header__cta { display: none; } }
.hero { background: linear-gradient(180deg, var(--c-sand), var(--c-bg)); padding: var(--s6) var(--s4) var(--s5); }
.hero__inner { max-width: 760px; margin: 0 auto; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: var(--s2); color: var(--c-primary); font-weight: 600; margin-bottom: var(--s3); }
.hero h1 { font-size: clamp(26px, 6vw, 40px); margin-bottom: var(--s4); }
.hero__lead { font-size: var(--fs-l); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0 var(--s3); }
@media (max-width: 479px) { .hero__actions .btn { width: 100%; } }
.site-section { max-width: 1100px; margin: 0 auto; padding: var(--s5) var(--s4); }
.site-section--band { max-width: none; background: var(--c-sand); }
.site-section--band > * { max-width: 1100px; margin-inline: auto; }
.features, .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.features__icon, .steps__num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-primary); color: var(--c-on-primary); font-weight: 700; margin-bottom: var(--s3); }
.features__item h3, .steps__item h3 { margin-bottom: var(--s2); }
.price { max-width: 720px; }
.site-cta { text-align: center; margin-top: var(--s5); }
.site-footer { padding: var(--s5) var(--s4) var(--s6); text-align: center; }
.site-footer p { margin: 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.checks li { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; }

/* P10: Strecke */
@media (max-width: 767px) {
  .nav--dense .nav__item { font-size: 10.5px; letter-spacing: -.01em; min-width: 0; padding-inline: 2px; }
  .nav--dense .nav__item span { max-width: 100%; text-align: center; line-height: 1.05; hyphens: manual; }
}
.choice-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice-group > legend { padding: 0; margin-bottom: var(--s2); font-weight: 700; color: var(--c-muted); font-size: var(--fs-s); }
.choice-grid { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 var(--s4);
  font-weight: 600; cursor: pointer; border: 2px solid var(--c-control); border-radius: var(--radius-sm); background: var(--c-surface);
}
.choice input:focus-visible + label { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.choice input:checked + label { background: var(--c-primary); color: var(--c-on-primary); border-color: transparent; }
.plan-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.plan-table th, .plan-table td { padding: var(--s2) var(--s2); text-align: right; border-bottom: 1px solid var(--c-line); }
.plan-table th[scope="col"], .plan-table th[scope="row"] { text-align: left; font-weight: 600; }
.plan-table thead th { color: var(--c-muted); font-size: var(--fs-s); }
.plan-table tfoot th, .plan-table tfoot td { font-weight: 700; border-bottom: 0; }
.plan-table__pct--over { font-weight: 700; }
.plan-field input { max-width: 8em; }
.filter-details > summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.filter-details[open] > summary { margin-bottom: var(--s3); }

/* P11: Strecke auswerten */
.plan-table__sub th, .plan-table__sub td { font-size: var(--fs-s); color: var(--c-muted); padding-block: var(--s1); }
.plan-table__sub th[scope="row"] { font-weight: 400; padding-left: var(--s5); }
.vbars { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; gap: 2px; align-items: stretch; height: 170px; }
.vbars__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vbars__n { font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.vbars__track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--c-bg); border-radius: 4px 4px 0 0; }
.vbars__fill { display: block; width: 100%; background: var(--c-primary); border-radius: 4px 4px 0 0; min-height: 0; }
.vbars__label { font-size: 10.5px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 100%; }
@media (max-width: 767px) { .vbars__label { writing-mode: vertical-rl; transform: rotate(180deg); height: 3.4em; } }
.hbars { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.hbars li { display: grid; grid-template-columns: minmax(6em, 1fr) 2fr auto; gap: var(--s2); align-items: center; }
.hbars__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars__track { height: 10px; background: var(--c-line); border-radius: 5px; overflow: hidden; }
.hbars__fill { display: block; height: 100%; background: var(--c-primary); }
.hbars__n { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 2ch; text-align: right; }

/* P12: Wildkameras – picture gallery caption, thumbnail rows and the hour histogram */
.cam-grid .photo-grid__item { display: block; }
.cam-grid__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: var(--fs-s); line-height: 1.3; color: #fff; background: rgba(0, 0, 0, .62); overflow: hidden; max-height: 2.7em; }
.cam-thumb { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); background: var(--c-sand); }
.hours { padding: var(--s3); }
.hours__bars { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 64px; }
.hours__bar { height: 100%; display: flex; align-items: flex-end; }
.hours__bar > span:first-child { display: block; width: 100%; min-height: 2px; background: var(--c-primary); border-radius: 2px 2px 0 0; }
.hours__axis { display: flex; justify-content: space-between; margin-top: 2px; }
@media (min-width: 768px) { .cam-grid { grid-template-columns: repeat(6, 1fr); } }
