/* ==========================================================================
   Car-Fleet portal — same design as car-group.fr (dark navy + blue, Inter)

   GOLDEN RATIO (phi = 1.618) — client rule, applied everywhere (see damien_claude.md):
   - spacing      only the Fibonacci tokens --s0…--s7 (3 5 8 13 21 34 55 89 px)
   - text sizes   only --fs-13 16 21 26 34 42 (each step ≈ x1.272 = √phi, two steps = x1.618)
   - line height  --lh (1.618) for text, --lh-tight (1.272 = √phi) for headings / buttons / figures
   - columns      --golden-major / --golden-minor (61.8 % / 38.2 %)
   - logos        61.8 % of their white tile (19.1 % margin on each side), centred
   - radius       --r-sm 8, --radius 13, --radius-lg 21 (Fibonacci)
   - widths       Fibonacci too: auth card 377, search 233, header 89 / 55
   Only exceptions (accessibility first): touch targets ≥ 44 px, form inputs ≥ 16 px (no zoom on iPhone),
   1–2 px borders and focus rings.
   ========================================================================== */

/* Inter, hosted on this server (no request to Google: visitors IP addresses stay private) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/inter-latin.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 {
    /* Colours (same as car-group.fr) */
    --bg: #060b18;
    --bg-2: #0a1120;
    --surface: #111a2e;
    --surface-2: #17223a;
    --border: rgba(148, 163, 184, .14);
    --border-strong: rgba(148, 163, 184, .26);
    --text: #f8fafc;
    --text-2: #b7c3d6;
    --muted: #8093ac;
    --primary: #2563eb;
    --primary-2: #3b82f6;
    --accent: #60a5fa;
    --fleet: #2F6B8A;                                   /* Car-Fleet logo colour */
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;

    /* Golden ratio */
    --phi: 1.618;
    --phi-inv: .618;
    --s0: 3px;  --s1: 5px;  --s2: 8px;  --s3: 13px;     /* spacing (Fibonacci) */
    --s4: 21px; --s5: 34px; --s6: 55px; --s7: 89px;
    --fs-13: 13px; --fs-16: 16px; --fs-21: 21px;        /* type scale */
    --fs-26: 26px; --fs-34: 34px; --fs-42: 42px;
    --lh: 1.618;                                        /* text */
    --lh-tight: 1.272;                                  /* √phi: headings, buttons, figures */
    --golden-major: minmax(0, 1.618fr);                 /* 61.8 % column (minmax: long content never widens it) */
    --golden-minor: minmax(0, 1fr);                     /* 38.2 % column */
    --logo-margin: 19.1%;                               /* logo = 61.8 % of its tile */
    --r-sm: 8px;
    --radius: 13px;
    --radius-lg: 21px;
    --r-pill: 999px;
    --touch: 44px;                                      /* minimum tap target (accessibility) */

    --shadow: 0 21px 55px -21px rgba(0, 0, 0, .6);
    --header-h: 89px;
    --brand-tile: 55px;                                 /* 55 / 89 = 61.8 % of the header */
    --container: 1220px;
    --gutter: var(--s4);
    --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    background: radial-gradient(1220px 610px at 80% -10%, rgba(37, 99, 235, .14), transparent 61.8%), var(--bg);
    color: var(--text); font-family: var(--font); font-size: var(--fs-16); line-height: var(--lh);
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: var(--lh-tight); letter-spacing: -.02em; }
p { margin: 0; }
code { font: var(--fs-13)/var(--lh-tight) var(--mono); padding: 2px var(--s1); border-radius: var(--s1); background: rgba(96, 165, 250, .12); color: #bfdbfe; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: var(--s0); border-radius: var(--s1); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.page { flex: 1; width: 100%; padding-top: var(--s5); padding-bottom: var(--s6); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-13); }
.nowrap { white-space: nowrap; }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ellipsis { display: inline-block; max-width: 377px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---------- Buttons (car-group.fr style, golden sizes: 13 × 21 padding → ~ 47 px tall) ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
    min-height: var(--touch); padding: var(--s3) var(--s4); border-radius: var(--radius); border: 1px solid transparent;
    background: linear-gradient(180deg, var(--primary-2), var(--primary));
    color: #fff; font: 600 var(--fs-16)/var(--lh-tight) var(--font); cursor: pointer; white-space: nowrap; text-align: center;
    box-shadow: 0 8px 21px -8px rgba(37, 99, 235, .7), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 13px 34px -8px rgba(37, 99, 235, .85), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn--sm { min-height: var(--s5); padding: var(--s2) var(--s3); font-size: var(--fs-13); border-radius: var(--r-sm); }
.btn--block { width: 100%; }
.btn--ghost { background: rgba(255, 255, 255, .04); border-color: var(--border-strong); box-shadow: none; }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: rgba(6, 11, 24, .85); border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(160%) blur(13px); -webkit-backdrop-filter: saturate(160%) blur(13px);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: var(--s3); flex-shrink: 0; min-width: 0; }
/* White logo tile: the logo takes 61.8 % of it, centred (client rule, like car-group.fr) */
.brand-mark { position: relative; width: var(--brand-tile); height: var(--brand-tile); flex-shrink: 0; border-radius: var(--radius); background: #fff;
    box-shadow: 0 0 0 1px var(--border), 0 8px 21px -8px rgba(59, 130, 246, .6); }
.brand-mark img { position: absolute; inset: var(--logo-margin); width: calc(100% - 2 * var(--logo-margin)); height: calc(100% - 2 * var(--logo-margin)); object-fit: contain; }
.brand-text { display: flex; flex-direction: column; font-weight: 800; font-size: var(--fs-16); letter-spacing: .08em; line-height: var(--lh-tight); }
.brand-text span { font-size: var(--fs-13); font-weight: 600; letter-spacing: .382em; color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
.main-nav a { padding: var(--s2) var(--s3); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-16); font-weight: 500; transition: color .2s, background .2s; }
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.main-nav a[aria-current] { color: #fff; background: rgba(37, 99, 235, .22); }
.logout-form { margin: 0 0 0 var(--s2); }
.lang-switch { display: inline-flex; margin-left: var(--s2); padding: var(--s0); border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }
.facts .lang-switch { margin-left: 0; }
.lang-switch a, .main-nav .lang-switch a { padding: var(--s1) var(--s2); border-radius: var(--s1); font-size: var(--fs-13); font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.lang-switch a:hover, .main-nav .lang-switch a:hover { color: var(--text); background: none; }
.lang-switch a[aria-current], .main-nav .lang-switch a[aria-current] { background: var(--primary); color: #fff; }
.nav-toggle { display: none; margin-left: auto; width: var(--touch); height: var(--touch); border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .04); color: var(--text); font-size: var(--fs-21); line-height: 1; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-13); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); padding-top: var(--s4); padding-bottom: var(--s4); }
.site-footer a:hover { color: var(--text); }

/* ---------- Page blocks ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.page-head h1 { font-size: clamp(var(--fs-26), 3vw, var(--fs-34)); font-weight: 800; overflow-wrap: anywhere; }
.page-head .count { font-size: .618em; font-weight: 600; margin-left: var(--s1); letter-spacing: 0; }
.crumb { margin-bottom: var(--s1); font-size: var(--fs-13); }
.box { padding: var(--s4); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); margin-bottom: var(--s4); min-width: 0; }
.box h2 { font-size: var(--fs-21); margin-bottom: var(--s3); }
.box-lead { margin: calc(-1 * var(--s1)) 0 var(--s3); }
/* Golden columns: 61.8 % / 38.2 % */
.grid-2 { display: grid; grid-template-columns: var(--golden-major) var(--golden-minor); gap: 0 var(--s4); align-items: start; }
.grid-2--minor-first { grid-template-columns: var(--golden-minor) var(--golden-major); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s4); margin: 0 0 var(--s3); font-size: var(--fs-16); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.kpi { padding: var(--s4); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.kpi b { display: block; font-size: var(--fs-34); font-weight: 800; letter-spacing: -.02em; line-height: var(--lh-tight); }
.kpi span { color: var(--muted); font-size: var(--fs-13); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s4); }
.filters select, .filters input[type=search], .date-range input {
    min-height: var(--touch); padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--bg-2); color: var(--text);
    border: 1px solid var(--border-strong); font: var(--fs-16) var(--font); min-width: 0; color-scheme: dark;
}
.filters input[type=search] { width: 233px; }
.date-range { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--fs-13); color: var(--text-2); }
.date-range[hidden] { display: none; }
.filters-end { display: flex; flex-wrap: wrap; gap: var(--s2); margin-left: auto; }
.check { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--touch); font-size: var(--fs-16); color: var(--text-2); cursor: pointer; }
.check input { width: var(--fs-16); height: var(--fs-16); flex-shrink: 0; accent-color: var(--primary-2); }
.box > .check { flex-wrap: wrap; row-gap: 0; }
.box > .check .small { flex-basis: 100%; padding-left: calc(var(--fs-16) + var(--s2)); }   /* hint under the label, aligned with it */

/* ---------- Tables (become cards on phones, see "Phones" below) ---------- */
.table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--s2)); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-16); }
th, td { text-align: left; padding: var(--s2); border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: var(--fs-13); white-space: nowrap; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-weight: 700; }
td.empty { color: var(--muted); text-align: center; padding: var(--s5) var(--s2); }
code.uuid { font-size: var(--fs-13); }

/* ---------- Tags and alerts ---------- */
.tag { display: inline-block; padding: 2px var(--s2); border-radius: var(--r-pill); font-size: var(--fs-13); font-weight: 600; line-height: var(--lh); background: rgba(148, 163, 184, .16); color: var(--text-2); vertical-align: middle; letter-spacing: 0; }
.tag--ok { background: rgba(52, 211, 153, .14); color: #a7f3d0; }
.tag--warn { background: rgba(251, 191, 36, .14); color: #fde68a; }
.alert { margin-bottom: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--radius); font-size: var(--fs-16); background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .35); color: #fecaca; overflow-wrap: anywhere; }
.alert--ok { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .35); color: #a7f3d0; }
.alert--info { background: rgba(37, 99, 235, .12); border-color: rgba(96, 165, 250, .35); color: #bfdbfe; }
.alert--warn { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .35); color: #fde68a; }

/* ---------- Forms (car-group.fr style) ---------- */
.form-card { padding: var(--s5); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; margin-bottom: var(--s4); }
.field label { font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
.field .req { color: var(--accent); }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
    width: 100%; min-height: var(--touch); padding: var(--s3); border-radius: var(--r-sm); border: 1px solid var(--border-strong);
    background: var(--bg-2); color: var(--text); font: var(--fs-16)/var(--lh-tight) var(--font);   /* 16 px: no zoom on iPhone */
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; }
.field textarea.code { font: var(--fs-13)/var(--lh) var(--mono); color: #bfdbfe; }
.field input::placeholder, .field textarea::placeholder { color: #5b6b85; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 var(--s0) rgba(59, 130, 246, .3); background: #0c1426; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: var(--fs-13); }
.field small { font-size: var(--fs-13); }
.field .btn { align-self: flex-start; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); }
.inline-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
/* Owners tables: selection checkboxes + Block / Unblock button under the table */
.col-check { width: var(--touch); text-align: center; }
.col-check input { width: var(--fs-16); height: var(--fs-16); accent-color: var(--primary-2); cursor: pointer; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s3); }
.bulk-bar .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.box > details > summary { cursor: pointer; list-style-position: outside; }
.box > details > summary h2 { display: inline; }
.box > details[open] > summary { margin-bottom: var(--s3); }
.embed details { margin-top: var(--s1); }
.embed summary { cursor: pointer; color: var(--accent); margin-bottom: var(--s2); min-height: var(--touch); display: flex; align-items: center; }
.embed .field { margin-bottom: var(--s3); }

/* ---------- Login pages (card 377 px = Fibonacci) ---------- */
.auth { max-width: 377px; margin: var(--s6) auto 0; }
.auth-logo { height: var(--s5); width: auto; margin-bottom: var(--s4); }
.auth .panel-title { font-size: var(--fs-26); font-weight: 800; margin-bottom: var(--s1); }
.auth-lead { margin-bottom: var(--s4); }
.auth-foot { margin-top: var(--s4); text-align: center; }

/* ==========================================================================
   Responsive — tablets, phones and very small phones
   ========================================================================== */

/* Tablets (landscape) and small laptops */
@media (max-width: 1080px) {
    .grid-2, .grid-2--minor-first { grid-template-columns: minmax(0, 1fr); }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters-end { margin-left: 0; }
}

/* Tablets (portrait) and phones: header 55 px, logo tile 34 px (61.8 %), menu behind a button */
@media (max-width: 900px) {
    :root { --header-h: 55px; --brand-tile: 34px; --gutter: var(--s3); }
    .brand-mark { border-radius: var(--r-sm); }
    .brand-text { font-size: var(--fs-13); }
    .brand-text span { letter-spacing: .236em; }
    .nav-toggle { display: block; }
    .main-nav {
        display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: var(--s0); padding: var(--s3) var(--gutter) var(--s4);
        background: rgba(6, 11, 24, .97); border-bottom: 1px solid var(--border);
        max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: var(--s3) var(--s4); }
    .main-nav--guest { display: flex; position: static; flex-direction: row; padding: 0; background: none; border: 0; }
    .lang-switch { align-self: flex-start; margin: var(--s2) 0 0; }
    .lang-switch a, .main-nav .lang-switch a { padding: var(--s2) var(--s3); }
    .main-nav--guest .lang-switch { margin: 0; }
    .logout-form { margin: var(--s2) 0 0; }
    .logout-form .btn { width: 100%; min-height: var(--touch); font-size: var(--fs-16); }
    .page { padding-top: var(--s4); padding-bottom: var(--s5); }
    .form-card { padding: var(--s4); }
    .kpi { padding: var(--s3); }
    .kpi b { font-size: var(--fs-26); }
    .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .facts dd { margin-bottom: var(--s2); }
}

/* Phones: full-width controls and tables shown as cards (label | value) */
@media (max-width: 600px) {
    .page-head { align-items: stretch; }
    .page-head h1 { font-size: var(--fs-26); }
    .page-head .btn-row, .page-head > .btn { width: 100%; }
    .btn-row .btn, .page-head > .btn, .form-actions .btn, .inline-action .btn { flex: 1 1 100%; }
    .auth { margin-top: var(--s4); }

    .filters > :not(.sr-only), .filters select, .filters input[type=search] { flex: 1 1 100%; width: 100%; }
    .filters .check { flex: 1 1 auto; }
    .filters > .btn { flex: 1 1 auto; }
    .date-range input { flex: 1 1 0; }
    .filters-end .btn { flex: 1 1 0; }

    .table-wrap { margin: 0; overflow: visible; }
    .rtable thead { display: none; }
    .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
    .rtable tr { display: flex; flex-direction: column; padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
    .rtable tbody tr:hover { background: none; }
    .rtable td { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: var(--s1) 0; border: 0; text-align: right; min-width: 0; }
    .rtable td::before { content: attr(data-label); flex-shrink: 0; color: var(--muted); font-size: var(--fs-13); font-weight: 600; text-align: left; }
    .rtable td.cell-main { order: -1; display: block; text-align: left; font-size: var(--fs-16); } /* card title first */
    .rtable td.cell-main::before, .rtable td.empty::before { content: none; }
    .rtable td.empty { display: block; text-align: center; padding: var(--s4) 0; }
    .rtable td > * { min-width: 0; }
    .ellipsis { max-width: 61.8vw; }
    .rtable td.cell-main .ellipsis { max-width: 100%; }
}

/* Very small phones (iPhone SE 1st gen, small Android: 320–377 px) */
@media (max-width: 377px) {
    :root { --gutter: var(--s2); }
    .brand-text span { display: none; }
    .kpis { gap: var(--s2); }
    .kpi b { font-size: var(--fs-21); }
    .box { padding: var(--s3); }
    .form-card { padding: var(--s3); }
}

/* Cookie banner (fixed at the bottom until the visitor chooses) and preferences dialog — cookie_banner() in inc/layout.php */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: var(--s4) 0;
    background: rgba(17, 26, 46, .97); border-top: 1px solid var(--border-strong);
    box-shadow: 0 -21px 55px -21px rgba(0, 0, 0, .8); backdrop-filter: blur(13px); animation: cookie-in .4s ease;
}
.cookie-banner[hidden] { display: none; }
@keyframes cookie-in { from { transform: translateY(100%); } }
.cookie-banner__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); }
.cookie-banner__text { flex: 1 1 377px; min-width: 0; }
.cookie-banner h2 { margin: 0 0 var(--s2); font-size: var(--fs-21); line-height: var(--lh-tight); }
.cookie-banner p { margin: 0; color: var(--text-2); font-size: 15px; line-height: var(--lh); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.cookie-banner__actions .btn { min-height: var(--touch); }

.cookie-dialog {
    width: min(610px, calc(100% - 2 * var(--s3))); max-height: calc(100dvh - 2 * var(--s4)); padding: 0; overflow: auto;
    border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.cookie-dialog::backdrop { background: rgba(2, 6, 23, .72); backdrop-filter: blur(3px); }
.cookie-dialog__box { padding: var(--s5); }
.cookie-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s2); }
.cookie-dialog h2 { margin: 0; font-size: var(--fs-21); line-height: var(--lh-tight); }
.cookie-dialog__close {
    width: var(--touch); height: var(--touch); flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-size: var(--fs-21);
    border: 1px solid var(--border-strong); background: transparent; color: var(--text-2); cursor: pointer; transition: color .2s, background .2s;
}
.cookie-dialog__close:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.cookie-dialog__text { margin: 0 0 var(--s4); color: var(--text-2); font-size: 15px; line-height: var(--lh); }
.cookie-cat { padding: var(--s3) var(--s4); border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); }
.cookie-cat + .cookie-cat { margin-top: var(--s3); }
.cookie-cat__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 34px; margin-bottom: var(--s1); }
.cookie-cat h3 { margin: 0; font-size: var(--fs-16); }
.cookie-cat p { margin: 0; color: var(--muted); font-size: 14px; line-height: var(--lh); }
.cookie-cat__always { color: var(--success); font-size: var(--fs-13); font-weight: 700; white-space: nowrap; }
.cookie-cat__none { color: var(--muted); font-size: var(--fs-13); font-weight: 700; white-space: nowrap; }
.cookie-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); }

/* Footer link "Cookies" (opens the preferences) */
.footer-cookies { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; transition: color .2s; }
.footer-cookies:hover { color: var(--text); }

@media (max-width: 600px) {
    .cookie-banner { padding: var(--s3) 0; max-height: 61.8dvh; overflow-y: auto; }
    .cookie-banner h2 { font-size: var(--fs-16); }
    .cookie-banner p { font-size: 14px; }
    .cookie-banner__actions, .cookie-banner__actions .btn, .cookie-dialog__actions .btn { width: 100%; justify-content: center; }
    .cookie-dialog__box { padding: var(--s4) var(--s3); }
}
@media print { .cookie-banner { display: none; } }
