/* SavvyFleet Pilotdemo – Jonas' SavvyRide-Design (dunkel, Logo-Lime), professionell ausgearbeitet.
   Mobile-first. Keine Inline-Styles nötig: CSP style-src 'self'. Kontraste gemessen (docs/release/SECURITY_REVIEW.md). */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0D1216;            /* Logo-Hintergrund */
  --bg-raised: #10181C;
  --surface: #151C21;
  --surface-2: #1C252B;
  --surface-3: #232E35;
  --line: #26323A;
  --line-strong: #34424A;
  --control: #5F6E75;       /* ≥ 3:1 auf --surface */
  --text: #F2F5F4;
  --muted: #A3B0B1;         /* ≥ 6:1 auf allen Flächen */
  --lime: #D1FB65;          /* Logo-Lime: Schrift, Icons, Linien */
  --lime-fill: #D1FB65;     /* Logo-Lime als Fläche (Buttons, Badges, Punkte) */
  --lime-hover: #E0FD95;
  --lime-soft: #1F2B1C;
  --lime-line: #3E4D25;
  --on-lime: #0D1216;
  --warn: #F5B95C;   --warn-soft: #2E2516;
  --danger: #FF8B7E; --danger-soft: #301B1A; --danger-line: #5C2F2A;
  --ok: #9FE38A;     --ok-soft: #1B2B1C;
  --info: #8CC8FF;   --info-soft: #172634;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tabbar-h: 64px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --input-bg: #0F171B;
  --placeholder: #7D8A8C;
  color-scheme: dark;
}

/* Helle Darstellung (Schalter in der Kopfzeile, theme.js). Lime bleibt Fläche; als Schrift wird es dunkles Oliv,
   weil Lime auf Weiß unlesbar wäre. Kontraste gemessen: Text ≥ 4,5:1, Bedienelemente ≥ 3:1. */
:root[data-theme="light"] {
  --bg: #F3F5F4; --bg-raised: #FFFFFF; --surface: #FFFFFF; --surface-2: #F1F4F3; --surface-3: #E6EBEA;
  --line: #DDE3E2; --line-strong: #C6CFCF; --control: #7B8A8F;
  --text: #10181C; --muted: #4A585D;
  --lime: #4A6B00; --lime-hover: #C3F041; --lime-soft: #EEF8D6; --lime-line: #B5D36A;
  --warn: #8A5300;   --warn-soft: #FBF0DC;
  --danger: #B42318; --danger-soft: #FDECEA; --danger-line: #F2B8B2;
  --ok: #26692A;     --ok-soft: #E6F4E6;
  --info: #1F5FA8;   --info-soft: #E5F0FB;
  --input-bg: #FFFFFF; --placeholder: #6B787C;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* sonst setzt z. B. .btn display:inline-flex das Attribut außer Kraft */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
html.is-locked { overflow: hidden; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 7vw, 44px); font-weight: 750; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 650; }
p, ul, ol, dl, figure { margin: 0; }
a { color: var(--lime); }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
h1:focus, h2:focus, main:focus { outline: none; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--lime-fill); color: var(--on-lime); font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.tnum, .num { font-variant-numeric: tabular-nums; }
.eyebrow { color: var(--lime); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 17px; max-width: 62ch; }
.warn-text { color: var(--warn); font-weight: 600; }
.ok-text { color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 32px; height: 32px; }

/* ---------- Kopfzeile ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--bg-raised); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar__inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand__name { font-size: 17px; font-weight: 800; letter-spacing: .06em; }
.brand__name span { color: var(--lime); }
.areas, .topbar__inner .topbar__reset { display: none; }
.topbar__menu { padding: 0 12px; }
@media (max-width: 359px) { .topbar__menu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* Schalter hell/dunkel */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; padding: 0 4px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.theme-toggle__label { display: none; }
.theme-toggle__track { position: relative; width: 42px; height: 24px; flex: none; border: 1px solid var(--control); border-radius: 999px; background: var(--surface-3); transition: background-color .15s var(--ease); }
.theme-toggle__thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .15s var(--ease); }
.theme-toggle[aria-checked="true"] .theme-toggle__track { background: var(--lime-fill); border-color: var(--lime-line); }
.theme-toggle[aria-checked="true"] .theme-toggle__thumb { transform: translateX(18px); background: var(--on-lime); }
.theme-toggle:hover { color: var(--text); }
.areas a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 550; }
.areas a:hover { color: var(--text); background: var(--surface-2); }
.areas a[aria-current="page"] { color: var(--lime); background: var(--lime-soft); }
/* Eigene, gespeicherte Fuhrparks: abgesetzt von den Demo-Bereichen */
.areas .areas__own { margin-left: 12px; box-shadow: inset 0 0 0 1px var(--control); color: var(--text); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--lime-fill); color: var(--on-lime); font-size: 12px; font-weight: 750; line-height: 1; }
.badge[hidden] { display: none; }

/* ---------- Schaltflächen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--lime-fill); color: var(--on-lime); }
.btn--primary:hover { background: var(--lime-hover); }
.btn--secondary { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--control); background: var(--surface-3); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--control); }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger-line); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); }
.link-strong { padding: 0; border: 0; background: none; color: var(--text); font-weight: 650; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link-strong:hover { text-decoration-color: var(--lime); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Seitenaufbau ---------- */
main { padding: 24px 0 48px; }
body.has-tabbar main { padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); }
.stack { display: grid; gap: 28px; }
.block__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.area-head { display: grid; gap: 10px; margin-bottom: 20px; }
.role-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 14px; }
.role-note strong { color: var(--text); }
.role-note em { font-style: normal; color: var(--muted); }
.role-note .icon { color: var(--lime); margin-top: 1px; }
.subnav { display: none; }
.panel { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: grid; gap: 14px; align-content: start; }
.panel--inset { background: var(--surface-2); padding: 16px; }
.split { display: grid; gap: 28px; }
.two { display: grid; gap: 12px; }
.explain { display: grid; gap: 12px; align-content: start; }
.steps { list-style: none; padding: 0; display: grid; counter-reset: step; }
.steps li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); counter-increment: step; }
.steps span { color: var(--muted); font-size: 15px; }
ol.steps strong::before { content: counter(step) ". "; color: var(--lime); }
.info-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-size: 14px; }
.info-box .icon { color: var(--lime); margin-top: 1px; }

/* ---------- Kennzahlen (bewusst kompakt) ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.stat dt { color: var(--muted); font-size: 13px; }
.stat dd { margin: 4px 0 0; display: grid; gap: 2px; }
.stat__value { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat__note { color: var(--muted); font-size: 12px; }

/* ---------- Karten ---------- */
.cards { display: grid; gap: 12px; }
.card { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card--decision { border-left: 3px solid var(--lime); }
.card--hint { border-left: 3px solid var(--warn); }
.card--hint .eyebrow { color: var(--warn); }
.card--info { border-left: 3px solid var(--info); }
.card--info .eyebrow { color: var(--info); }
.card .actions { margin-top: 6px; }
.empty { display: grid; gap: 6px; justify-items: start; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 16px; }
.empty .icon { color: var(--ok); }
.empty__title { font-weight: 650; font-size: 17px; }

.vgrid { display: grid; gap: 12px; }
.vcard { display: grid; gap: 10px; width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.vcard:hover { border-color: var(--lime-line); background: var(--surface-2); }
.vcard > span { display: block; }
.vcard__top { display: flex !important; justify-content: space-between; align-items: center; gap: 8px; }
.vcard__name { font-size: 17px; font-weight: 700; }
.vcard__meta { color: var(--muted); font-size: 14px; }
.vcard__facts { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.vcard__facts > span { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.vcard__label { color: var(--muted); font-size: 12px; }
.vcard__cta { display: flex !important; align-items: center; gap: 4px; color: var(--lime); font-size: 14px; font-weight: 650; }
.tag { padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 600; }

/* ---------- Status ---------- */
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill--offen { background: var(--warn-soft); color: var(--warn); }
.pill--rueckfrage { background: var(--info-soft); color: var(--info); }
.pill--freigegeben { background: var(--ok-soft); color: var(--ok); }
.pill--abgelehnt { background: var(--danger-soft); color: var(--danger); }
.meter { display: block; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--lime-fill); }
.meter--warn i { background: var(--warn); }
:root[data-theme="light"] .meter:not(.meter--warn) i { background: var(--lime); } /* Lime auf Hell < 3:1 */
.assess { display: grid; gap: 6px; min-width: 0; }

/* ---------- Tabellen: mobil als Zeilenkarten, ab 1024 px als Tabelle ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table, .table tbody, .table tfoot, .table tr, .table td, .table tfoot th { display: block; }
.table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.table tbody tr:last-child { border-bottom: 0; }
.table tfoot tr { border-top: 1px solid var(--line-strong); background: var(--surface-2); }
.table td, .table tfoot th { padding: 0; min-width: 0; overflow-wrap: anywhere; text-align: left; font-variant-numeric: tabular-nums; }
.table td::before, .table tfoot th::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
.table td:first-child, .table tfoot th:first-child, .table td.act { grid-column: 1 / -1; }
.table td:first-child::before, .table tfoot th:first-child::before, .table td.act::before { content: none; }
.table td:empty { display: none; }
.table .sub { display: block; color: var(--muted); font-size: 13px; }
.table td .btn { width: 100%; }
.table td .pill { white-space: normal; }
.table .link-strong { padding: 10px 0; margin: -10px 0; } /* größere Trefferfläche (≥ 24 px, mobil ≈ 44 px) ohne Layoutänderung */

/* ---------- Formulare ---------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-size: 14px; font-weight: 650; color: var(--text); padding: 0; }
.input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--control); border-radius: 10px; background: var(--input-bg); color: var(--text); font-size: 16px; /* 16 px verhindert Auto-Zoom in iOS Safari */ }
.input::placeholder { color: var(--placeholder); }
.input:hover { border-color: #75858C; }
.input:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; border-color: var(--lime); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23A3B0B1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
input[type="date"].input { -webkit-appearance: none; appearance: none; display: block; }
.field__hint { color: var(--muted); font-size: 13px; }
.field__error, .form__error { color: var(--danger); font-size: 14px; font-weight: 550; }
.form__result { color: var(--ok); font-size: 14px; }
.form__result:empty { display: none; }
.checks { display: grid; gap: 4px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 0; font-weight: 450 !important; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--lime); }
.search { display: grid; gap: 6px; }
.fb-fallback { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

/* ---------- Akte und Dialoge ---------- */
.sheet { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--surface); color: var(--text); }
.sheet::backdrop, .menu::backdrop { background: rgba(4, 7, 9, .72); }
.sheet__inner { height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); display: grid; gap: 16px; align-content: start; }
.sheet__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 0 -16px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet__kicker { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__content { display: grid; gap: 16px; }
.sheet h2 { font-size: 24px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { border-color: var(--lime-line); background: var(--lime-soft); color: var(--lime); }
.kv { display: grid; }
.kv__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv__row dt { color: var(--muted); }
.kv__row dd { margin: 0; text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.amount-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.amount { font-size: 32px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.history { list-style: none; padding: 0; display: grid; gap: 0; }
.history li { display: grid; gap: 2px; padding: 10px 0 10px 16px; border-left: 2px solid var(--line-strong); }
.history__meta { color: var(--muted); font-size: 13px; }
.history__comment { color: var(--muted); font-size: 14px; }

.menu { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--bg-raised); color: var(--text); }
.menu__inner { display: grid; gap: 16px; align-content: start; padding: calc(8px + env(safe-area-inset-top)) 16px 24px; }
.menu__head { display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.menu nav { display: grid; }
.menu nav a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 18px; font-weight: 600; }
.menu nav a[aria-current="page"] { color: var(--lime); }
.menu nav .menu__own { margin-top: 24px; }
.menu__hint { color: var(--muted); font-size: 13px; font-weight: 500; }

/* ---------- Navigation unten (mobil/Tablet) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--bg-raised); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar[hidden] { display: none; }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tabbar-h); padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; text-align: center; }
.tabbar a span:not(.badge):not(.sr-only) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar a[aria-current="page"] { color: var(--lime); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2px; border-radius: 0 0 2px 2px; background: var(--lime); }
.tabbar .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 11px; }

/* ---------- Startseite ---------- */
.hero { padding: 16px 0 32px; }
.hero .wrap { display: grid; gap: 16px; justify-items: start; }
.hero__logo { width: min(100%, 360px); border-radius: 14px; border: 1px solid var(--line); }
.hero h1 { max-width: 16ch; margin-top: 8px; }
.accent { color: var(--lime); }
.hero__note { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.hero__note .icon { color: var(--lime); margin-top: 1px; }
.area-cards { display: grid; gap: 16px; }
.area-card { display: grid; gap: 14px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.area-card { min-width: 0; }
.area-card__head { display: flex; gap: 14px; align-items: center; min-width: 0; }
.area-card__head > div { min-width: 0; }
@media (max-width: 359px) {
  .area-card { padding: 18px; }
  .area-card h2 { font-size: 20px !important; }
  .area-card__letter { width: 40px; height: 40px; font-size: 19px; }
}
.area-card__letter { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--lime-soft); border: 1px solid var(--lime-line); color: var(--lime); font-size: 22px; font-weight: 800; }
.area-card h2 { font-size: 24px; }
.area-card__status { color: var(--warn); font-weight: 650; font-size: 14px; }
.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .icon { color: var(--lime); margin-top: 2px; }
.plainlist { padding-left: 18px; display: grid; gap: 6px; color: var(--muted); }
.how { margin-top: 40px; display: grid; gap: 16px; }
.how__list { list-style: none; padding: 0; display: grid; gap: 0; }
.how__list li { display: grid; align-content: start; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.how__list span { color: var(--muted); }
.cta { margin-top: 32px; display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.cta > div { display: grid; gap: 6px; }

/* ---------- Bereich C: SavvyRide-App ---------- */
.app-section { margin-top: 40px; display: grid; gap: 20px; }
.app-section__grid { display: grid; gap: 28px; }
.app-section__text { display: grid; gap: 14px; align-content: start; }
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }
.phone-figure { display: grid; gap: 10px; justify-items: center; align-content: start; }
.app-section .checklist li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; flex: none; background: var(--lime); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.phone-figure figcaption { color: var(--muted); font-size: 13px; text-align: center; max-width: 24ch; }
.phone { width: 100%; max-width: 230px; padding: 9px; border-radius: 42px; background: #050708; border: 1px solid #2B3338; box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 0 0 2px #1A2024; }
.phone__screen { position: relative; aspect-ratio: 1170 / 2532; border-radius: 34px; overflow: hidden; background: var(--bg); display: grid; place-items: center; padding: 20px; }
.phone__screen::before { content: ""; position: absolute; top: 10px; left: 50%; z-index: 2; width: 32%; height: 22px; transform: translateX(-50%); border-radius: 999px; background: #000; }
.phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone__placeholder { display: grid; gap: 12px; justify-items: center; color: var(--muted); font-size: 13px; line-height: 1.45; text-align: center; }
.phone__screen--pending { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pending-tag { padding: 4px 8px; border: 1px dashed var(--lime-line); border-radius: 999px; color: var(--lime); font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }

/* ---------- Rückmeldung, Fuß, Einstellungen ---------- */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60; width: max-content; max-width: min(92vw, 520px); padding: 12px 16px; border-radius: var(--radius); background: var(--lime-fill); color: var(--on-lime); font-size: 15px; font-weight: 650; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
body.has-tabbar .toast { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
.footer { border-top: 1px solid var(--line); padding: 28px 0 32px; color: var(--muted); font-size: 13px; }
body.has-tabbar .footer { padding-bottom: calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }
.footer__inner { display: grid; gap: 16px; }
.footer__brandlink { justify-self: start; display: block; border-radius: 10px; }
.footer__brandlink:hover .footer__cobrand { box-shadow: 0 0 0 2px var(--lime); }
.footer__cobrand { width: 240px; padding: 8px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.assumptions { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.assumptions summary { cursor: pointer; font-weight: 650; min-height: 28px; }
.assumptions ul { margin-top: 10px; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }

/* ---------- ab 640 px ---------- */
@media (min-width: 640px) {
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { grid-template-columns: 1fr auto; align-items: center; }
  .how__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

/* ---------- ab 768 px ---------- */
@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
  main { padding-top: 32px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat__value { font-size: 24px; }
  .area-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 28px 0 40px; }
  .sheet { width: min(680px, 92vw); height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-left: 1px solid var(--line); }
  .sheet__inner { padding: 0 24px 40px; }
  .sheet__bar { margin: 0 -24px; padding: 10px 12px 10px 24px; }
  .menu { width: min(420px, 92vw); margin: 0 0 0 auto; }
  .app-section__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ---------- ab 1024 px: Navigation oben, echte Tabellen ---------- */
@media (min-width: 1024px) {
  .wrap { padding: 0 32px; }
  .topbar__inner { gap: 20px; min-height: 68px; }
  .topbar__inner .topbar__reset { display: inline-flex; }
  .theme-toggle { padding: 0 10px; }
  .theme-toggle__label { display: inline; }
  .tabbar { display: none; }
  body.has-tabbar main, body.has-tabbar .footer { padding-bottom: 48px; }
  body.has-tabbar .toast { bottom: 24px; }
  .subnav { display: flex; gap: 4px; margin: 4px 0 28px; border-bottom: 1px solid var(--line); }
  .subnav a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; }
  .subnav a:hover { color: var(--text); }
  .subnav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--lime); }
  .subnav a[aria-current="page"] .icon { color: var(--lime); }
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 52px; }

  main .table { display: table; }
  main .table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  main .table tbody { display: table-row-group; }
  main .table tfoot { display: table-footer-group; }
  main .table tr { display: table-row; padding: 0; }
  main .table th, main .table td, main .table tfoot th { display: table-cell; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; overflow-wrap: normal; }
  main .table .num, main .table .tnum { white-space: nowrap; }
  main .table thead th { padding: 12px 16px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; border-bottom-color: var(--line-strong); }
  main .table td::before, main .table tfoot th::before { content: none; }
  main .table td:empty { display: table-cell; }
  main .table .num { text-align: right; }
  main .table td.act { text-align: right; white-space: nowrap; }
  main .table td .btn { width: auto; }
  main .table td .pill { white-space: nowrap; }
  main .table tbody tr:hover { background: var(--surface-2); }
  main .table tbody tr:last-child td { border-bottom: 0; }
  main .table tfoot th, main .table tfoot td { font-weight: 700; border-bottom: 0; }
  .block--flush .table-wrap { margin-top: 0; }
}

/* ---------- ab 1200 px: Bereiche als Leiste oben (darunter „Menü“, die Leiste braucht ~1.050 px) ---------- */
@media (min-width: 1200px) {
  .areas { display: flex; gap: 4px; }
  .topbar__inner .topbar__menu { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .pill, .badge, .btn { border: 1px solid CanvasText; }
}
