/* ==========================================================================
   Azja Motors — design layer 00: FOUNDATION
   Fonts, tokens, reset, base elements, typography, layout, focus, forms base, helpers and the
   script-state helpers every public page needs. Written from the owner-approved concept
   (design-system/concept/concept.css); no legacy rule is copied.

   Loaded ONLY on public pages (body.public-body). Public pages load no legacy stylesheet at all
   (styles.css, azjamotors-*.css, booking-calendar.css, i18n*.css, language-flags.css are gone there),
   so this is a clean cascade: no !important wars.

   CASCADE CONTRACT (read before writing any public/design/*.css)
   - Load order (views/partials/head.ejs): 00-foundation, 10-components, 12-chrome, 20-home, 30-listing,
     40-car, 50-pages. Every file loads on every public page.
   - 00 and 10 put their rules in three cascade layers, declared once below:
         @layer am-reset, am-base, am-components;
     Area files (12/20/30/40/50) write PLAIN, UNLAYERED rules. Unlayered rules always beat layered
     ones, whatever their specificity, so an area can restyle any shared component with a simple
     selector and never needs !important. Do not open new layers in area files.
   - The only !important in the system: [hidden] (am-reset), position on .sr-only, the reduced-motion guard and
     the reduced-transparency backdrop-filter override (as in the concept). Important declarations in the first layer beat everything, so [hidden] always hides.
   - Tokens are plain custom properties on :root (layer am-base). Override them per section or per
     page with plain unlayered rules (e.g. `.ce { --ce-base: … }`), never with !important.
   - Breakpoints (max-width, same as the concept): 1279 narrow desktop, 1099 tablet (menu button,
     sheets, one-column car page), 767 phone. The production footer script still uses 980 for its
     mobile-nav logic (see the foundation report).
   ========================================================================== */

@layer am-reset, am-base, am-components;

/* ---------- Fonts: self-hosted, SIL OFL 1.1 (/fonts/am/OFL-*.txt) ----------
   Onest: one variable face per script, weight 400–800 (UI text).
   Noto Serif Display: variable wdth 62.5–100 % and wght 100–900; the design uses font-stretch 75 % / 400.
   unicode-range per subset, so each language downloads only what it needs (pl: latin + latin-ext,
   ru/uk: latin + cyrillic). head.ejs preloads the first-paint subsets per locale. */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/am/onest-cyrillic-ext-var.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/am/onest-cyrillic-var.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/am/onest-latin-ext-var.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: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/am/onest-latin-var.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; }
@font-face { font-family: 'Noto Serif Display'; font-style: normal; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  src: url('/fonts/am/noto-serif-display-cyrillic-ext-wdth-var.woff2') format('woff2-variations'), url('/fonts/am/noto-serif-display-cyrillic-ext-wdth-var.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Noto Serif Display'; font-style: normal; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  src: url('/fonts/am/noto-serif-display-cyrillic-wdth-var.woff2') format('woff2-variations'), url('/fonts/am/noto-serif-display-cyrillic-wdth-var.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Noto Serif Display'; font-style: normal; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  src: url('/fonts/am/noto-serif-display-latin-ext-wdth-var.woff2') format('woff2-variations'), url('/fonts/am/noto-serif-display-latin-ext-wdth-var.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: 'Noto Serif Display'; font-style: normal; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  src: url('/fonts/am/noto-serif-display-latin-wdth-var.woff2') format('woff2-variations'), url('/fonts/am/noto-serif-display-latin-wdth-var.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; }
/* Polish letters only (ĄąĆćĘęŁłŃńŚśŹźŻż), 10.5 KB: a fontTools subset of the latin-ext file above, same axes and
   outlines (renders pixel-identical). Declared LAST so the browser checks it first for these code points (CSS Fonts:
   overlapping unicode-ranges are tried in reverse order), so Polish serif headings no longer download the 325 KB
   latin-ext file. The latin-ext face stays for every other latin-ext letter (e.g. Š in a car name). */
@font-face { font-family: 'Noto Serif Display'; font-style: normal; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  src: url('/fonts/am/noto-serif-display-pl-wdth-var.woff2') format('woff2-variations'), url('/fonts/am/noto-serif-display-pl-wdth-var.woff2') format('woff2');
  unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C; }


/* ==========================================================================
   RESET (layer am-reset) — small, modern; the hard guarantees live here
   ========================================================================== */
@layer am-reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { margin: 0; }
  img, svg, video, canvas { display: block; max-width: 100%; }
  img, video { height: auto; }
  /* An <svg> icon without a width attribute is 1.5em wide (square for a 24×24 viewBox) until a component
     sizes it. Always size SVGs with width (+ height or height:auto) in your rules. */
  :where(svg:not([width]):not([height])) { width: 1.5em; height: auto; }
  :where(svg) { flex-shrink: 0; }
  button, input, select, textarea, optgroup { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; margin: 0; }
  :where(button, [role="button"], label[for], summary, select) { -webkit-tap-highlight-color: transparent; }
  /* range keeps the UA 2 px margin, as in the concept (the rate panel rows depend on it) */
  input:not([type="range"]), select, textarea { margin: 0; }
  textarea { resize: vertical; }
  h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote, pre, fieldset, legend { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  fieldset { padding: 0; border: 0; min-width: 0; }
  legend { padding: 0; }
  table { border-collapse: collapse; border-spacing: 0; }
  summary { cursor: pointer; }
  address { font-style: normal; }
  a { color: inherit; text-decoration: none; }
  hr { height: 0; margin: 0; border: 0; border-top: 1px solid var(--line); color: inherit; }
  [disabled] { cursor: not-allowed; }

  /* hard guarantee: the hidden attribute (set by every production script) always wins, even over inline display.
     There is deliberately NO global .is-hidden helper: the concept uses .is-hidden on the header for its
     scroll-away state (translateY), see am.js. Use the hidden attribute to hide things. */
  [hidden]:not([hidden="until-found"]) { display: none !important; }
}


/* ==========================================================================
   BASE (layer am-base) — tokens, elements, typography, layout, focus, forms, helpers, states
   ========================================================================== */
@layer am-base {

  /* ---------- Tokens (values = concept.css :root, owner-approved) ---------- */
  :root {
    /* surfaces */
    --page: #E5E0D8;               /* the whole page background (beige) */
    --page-deep: #DCD6CC;
    --surface: #FFFFFF;            /* tiles, cards, panels, inputs on the beige page */
    --panel: #F6F4F0;              /* quiet panel inside a white tile */
    --tint: #ECE6DC;               /* inner block on white, always with a hairline or bold content */
    --dark: #111111;               /* black bands, footer, dark tiles */
    --dark-2: #1C1C1C;             /* rate panel */
    --dark-3: #2A2A2A;
    /* text (contrast on beige: ink 13.4:1, body 11:1, muted 5.3:1) */
    --ink: #1A1917;
    --body: #2B2926;
    --muted: #5E5952;
    --on-dark: #FAFAF8;
    --on-dark-muted: #A8A29A;      /* 7.5:1 on #111 */
    /* lines */
    --line: #D6D0C6;
    --line-strong: #BFB8AC;
    --line-input: #948D82;         /* control outline, 3.3:1 on white (non-text contrast) */
    --hair: rgb(26 25 23 / .12);
    --line-dark: rgb(255 255 255 / .14);
    /* accent — the only action colour (owner 2026-10-02: #422E15; the --cherry names are the concept's) */
    --cherry: #422E15;             /* white text on it 12.9:1; on beige 9.8:1 */
    --cherry-hover: #57401F;
    --cherry-press: #2E200E;
    --cherry-on-dark: #B8915E;     /* the same hue lifted for black surfaces (variant A, dark text): 6.5:1 on #111 */
    --cherry-on-dark-hover: #C9A574;
    --cherry-on-dark-press: #A27E4E;
    --cherry-soft: #EFE7DA;
    --accent: var(--cherry);       /* readable aliases */
    --accent-hover: var(--cherry-hover);
    --accent-press: var(--cherry-press);
    --accent-on-dark: var(--cherry-on-dark);
    --danger: #A3202F;             /* validation errors only (7.4:1 on white) */
    --ok: #15803D;
    --europe: #6F6A62;             /* Chiny vs Europa: Europe bars, 5.4:1 on white */
    /* secondary action = solid dark (never hollow) */
    --btn-dark: #111111;
    --btn-dark-hover: #2A2A2A;
    --btn-dark-press: #000000;
    /* glass recipes */
    --glass: rgb(240 237 231 / .74);          /* frosted beige: header past the hero, toolbars, price bar */
    --glass-strong: rgb(246 244 240 / .86);   /* bottom bars, glass icon buttons */
    --glass-dark: rgb(17 17 17 / .72);        /* chips and counters on photos */
    --glass-filter: saturate(1.6) blur(20px);
    /* header */
    --header-h: 76px;                          /* one row, never changes height (60 px on phones) */
    --header-dark: #0E0D0C;                    /* .is-top-dark: black liquid glass at the top of inner pages */
    --header-dark-sheen: linear-gradient(180deg, rgb(255 255 255 / .08) 0%, rgb(255 255 255 / .02) 55%, rgb(255 255 255 / 0) 100%);
    --header-dark-edge: inset 0 -1px 0 rgb(255 255 255 / .10), inset 0 1px 0 rgb(255 255 255 / .06);
    --header-hero-glass: rgb(14 13 12 / .58);  /* home: scrolled but still over the hero (dark liquid glass) */
    --header-hover: rgb(26 25 23 / .07);       /* nav item hover on light glass */
    --header-hover-dark: rgb(255 255 255 / .14); /* nav item hover on dark / over the hero */
    --header-edge-shadow: linear-gradient(rgb(26 25 23 / .10), rgb(26 25 23 / 0));
    /* shape */
    --r-badge: 4px;
    --r: 12px;                     /* cards, inputs */
    --r-lg: 20px;                  /* tiles, bands, panels */
    --r-sheet: 20px;
    --pill: 999px;                 /* every button */
    /* layout */
    --maxw: 1680px;
    --margin: clamp(20px, 7vw, 134px);         /* page side margin (content 1172 px at 1440) */
    --gutter: clamp(16px, 2.8vw, 40px);        /* grid gap */
    --section: clamp(64px, 43.2px + 5.3334vw, 120px); /* THE one section gap: 64 @390, ~96 @1024, 120 @1440 */
    --head-gap: clamp(28px, 3vw, 48px);        /* section head -> content */
    /* type */
    --serif: 'Noto Serif Display', 'Iowan Old Style', 'Times New Roman', serif;
    --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    /* depth: one soft elevation, only for floating / sticky commerce surfaces */
    --shadow-float: 0 0 2px rgb(0 0 0 / .08), 0 2px 4px rgb(0 0 0 / .06), 0 16px 40px -12px rgb(26 25 23 / .22);
    --shadow-card-hover: 0 1px 2px rgb(0 0 0 / .05), 0 18px 40px -18px rgb(26 25 23 / .30);
    /* motion */
    --ease-out: cubic-bezier(0, 0, .3, 1);       /* colour / hover */
    --ease-expand: cubic-bezier(.35, 0, 0, 1);   /* expands, panels */
    --ease-settle: cubic-bezier(.2, .8, .2, 1);  /* non-gesture position changes */
    --t-fast: 120ms;
    --t-color: 200ms;
    --t-panel: 360ms;
    /* stacking (concept values) */
    --z-sticky: 20;                /* sticky toolbars inside the page */
    --z-pricebar: 55;
    --z-bottombar: 56;
    --z-header: 60;
    --z-popover: 70;
    --z-sheet-scrim: 80;
    --z-sheet: 85;
    --z-drawer: 90;
    --z-modal: 95;
    --z-lightbox: 100;
    --z-toast: 120;
    --z-cookie: 130;
    --z-loader: 2000;
    color-scheme: light;
  }
  @media (max-width: 767px) { :root { --header-h: 60px; } }
  /* phones held sideways (844x390): the phone's 60 px header, not the tablet's 76 px (20 % of a 390 px screen) */
  @media (max-width: 1023px) and (orientation: landscape) and (max-height: 520px) { :root { --header-h: 60px; } }

  /* ---------- Elements ---------- */
  html { scroll-padding-top: calc(var(--header-h) + 16px); }
  body {
    background: var(--page); color: var(--body);
    font-family: var(--sans); font-size: 1rem; line-height: 1.625; font-weight: 400;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums lining-nums;
    overflow-x: clip;
  }
  h1, h2, h3, h4, h5, h6 { color: var(--ink); overflow-wrap: anywhere; hyphens: manual; }
  h1 { font-size: 2em; }
  :lang(de) :is(h1, h2, h3, h4, p, .btn) { hyphens: auto; }
  /* long Russian / Ukrainian words in condensed display headings ("конфиденциальности" at 390) break with a hyphen,
     never mid-word without one */
  :is(:lang(ru), :lang(uk)) :is(h1, h2, h3, h4) { hyphens: auto; hyphenate-limit-chars: 15 6 6; }
  ::selection { background: var(--cherry); color: #fff; }
  ::placeholder { color: var(--muted); opacity: 1; }

  /* ---------- Focus: always visible, two-tone (works on beige, white, photos and black) ---------- */
  :focus { outline: none; }
  :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 5px rgb(255 255 255 / .9); border-radius: 6px; }
  :is(.on-dark, .band-dark, .hero, .lightbox, .is-top-dark, .is-over-hero) :focus-visible { outline-color: #fff; box-shadow: 0 0 0 5px rgb(0 0 0 / .55); }
  .skip-link { position: absolute; left: 16px; top: -100px; z-index: 200; padding: 12px 18px; border-radius: var(--pill); background: var(--ink); color: #fff; font-weight: 600; }
  .skip-link:focus, .skip-link:focus-visible { top: 12px; }

  /* ---------- Typography (concept scale; h2 = 52 px at 1440) ---------- */
  .serif { font-family: var(--serif); font-weight: 400; font-stretch: 75%; font-optical-sizing: auto; }
  .t-display { font-family: var(--serif); font-weight: 400; font-stretch: 75%;
    font-size: clamp(2.5rem, 1.45rem + 4.2vw, 4.75rem); line-height: 1.02; letter-spacing: -0.015em; }
  .t-title { font-family: var(--serif); font-weight: 400; font-stretch: 75%;
    font-size: clamp(2rem, 1.45rem + 2.2vw, 3.25rem); line-height: 1.1; letter-spacing: -0.01em; }
  .t-title-sm { font-family: var(--serif); font-weight: 400; font-stretch: 75%;
    font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.25rem); line-height: 1.18; letter-spacing: -0.005em; }
  .t-h { font-family: var(--sans); font-weight: 700; font-size: 1.25rem; line-height: 1.4; letter-spacing: -0.005em; }
  .t-lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.6; color: var(--body); }
  .t-label { font-size: .875rem; line-height: 1.43; letter-spacing: .01em; color: var(--muted); }
  .t-caption { font-size: .8125rem; line-height: 1.33; letter-spacing: .02em; color: var(--muted); }
  .eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .8125rem; line-height: 1.33; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .eyebrow--cherry, .eyebrow--accent { color: var(--cherry); }
  .mark::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 18px; border-radius: 2px; background: var(--cherry); }
  .price { font-family: var(--sans); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .price .unit, .unit { font-size: .9375rem; font-weight: 500; color: var(--muted); } /* letter-spacing inherits from .price, as in the concept */
  .strike { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); font-weight: 500; }
  .muted { color: var(--muted); }
  .nowrap { white-space: nowrap; }
  .balance { text-wrap: balance; }

  /* ---------- Dark surfaces: one class carries the colour context ---------- */
  /* .on-dark is a context class only (concept): it sets no colour of its own, children inherit from their surface */
  .band-dark { color: var(--on-dark); background: var(--dark); }
  :is(.band-dark, .on-dark) :is(h1, h2, h3, h4) { color: #fff; }
  :is(.band-dark, .on-dark) :is(.eyebrow, .t-label, .t-caption, .muted) { color: var(--on-dark-muted); }
  :is(.band-dark, .on-dark) .mark::before { background: var(--cherry-on-dark); }
  :is(.band-dark, .on-dark) .price { color: #fff; }

  /* ---------- Layout ---------- */
  .wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--margin)); margin-inline: auto; padding-inline: var(--margin); }
  /* ONE section gap (owner 2026-10-02): sections own it as vertical MARGINS, so two neighbours on the same
     surface share one gap (margins collapse) — no doubled padding, no padding-top:0 exceptions, no inline spacing.
     A section with its own background (.section--band, footer) keeps the same token as INNER padding. A page whose
     title block and content form one section (listing, car) wraps them in .page-section. */
  .section { margin-block: var(--section); }
  .section--band { margin-block: 0; padding-block: var(--section); }
  .section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-bottom: var(--head-gap); }
  .section-head__text { max-width: 760px; }
  .section-head__text p { margin-top: 14px; max-width: 60ch; color: var(--muted); }
  .section-head__text > .eyebrow:first-child { display: flex; margin-top: 0; margin-bottom: 14px; }
  .section-head__tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .section-head__tools--row { flex: 1 1 100%; justify-content: space-between; }
  .section-head--center { justify-content: center; text-align: center; }
  .section-head--center .section-head__text,
  .section-head--center .section-head__text p,
  .section-head--center .mark::before { margin-inline: auto; }
  :is(.band-dark, .on-dark) .section-head__text p { color: var(--on-dark-muted); }
  .block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 20px; }
  .block-head p { margin-top: 8px; color: var(--muted); }
  @media (max-width: 767px) {
    .section-head { align-items: flex-start; }
    .section-head__tools { width: 100%; }
  }

  /* ---------- Forms base: every bare control already looks like the concept input ----------
     (components .input / .select / .textarea / .check / .range refine; all :where() = zero specificity) */
  :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="color"]), select, textarea) {
    width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--r);
    background-color: var(--surface); border: 1px solid var(--line-input); color: var(--ink); font-size: 1rem;
    transition: border-color var(--t-color) var(--ease-out), box-shadow var(--t-color) var(--ease-out);
  }
  :where(textarea) { min-height: 120px; padding: 14px 16px; line-height: 1.5; }
  :where(select:not([multiple], [size])) {
    -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1917' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
  }
  :where(input, select, textarea):hover:not(:disabled, [type="checkbox"], [type="radio"], [type="range"]) { border-color: var(--muted); }
  :where(input, select, textarea):focus-visible:not([type="checkbox"], [type="radio"], [type="range"]) {
    outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(26 25 23 / .14); border-radius: var(--r);
  }
  :where(input[type="checkbox"], input[type="radio"]) { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); vertical-align: middle; }
  :where(input[type="search"])::-webkit-search-cancel-button { cursor: pointer; }
  /* text fields only: concept checkboxes are dimmed by their label (.check.is-empty), never twice */
  :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"]), select, textarea):disabled { opacity: .55; cursor: not-allowed; }
  :where(input[type="number"]) { -moz-appearance: textfield; }

  /* validation (public/form-validation.js and public/booking-calendar.js): the wrapper gets .is-invalid,
     the control aria-invalid="true", and a <small> message is injected after it */
  :where(input, select, textarea)[aria-invalid="true"],
  .is-invalid :where(input:not([type="checkbox"], [type="radio"]), select, textarea) { border-color: var(--danger); }
  :where(input, select, textarea)[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgb(163 32 47 / .18); }
  .aa-form-field-error, .zd-booking-field-error {
    display: block; margin-top: 6px; font-size: .8125rem; line-height: 1.4; font-weight: 600; color: var(--danger);
  }
  .aa-form-field-error:empty, .zd-booking-field-error:empty { display: none; }
  .is-invalid > .label, .is-invalid > label { color: var(--ink); }

  /* ---------- Helpers ---------- */
  .sr-only, .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .sr-only-focusable:focus, .sr-only-focusable:focus-visible { position: static !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; white-space: normal; }
  /* honeypot fields (contact form, booking form): off-screen, never focusable by intent */
  .hp-field, input[name="website"][tabindex="-1"] {
    position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none;
  }
  .js .js-off, html:not(.js) .js-only { display: none; }
  [data-click-surface] { cursor: pointer; }        /* whole-card click (footer script) */

  /* closed states of production widgets (footer script). The area files restyle these widgets; when a widget
     animates out instead of disappearing, override display for the closed state there (unlayered rules win). */
  [data-mobile-nav-root]:not(.is-open) [data-mobile-nav-panel] { display: none; }     /* mobile menu closed */
  [data-tech-compact-grid]:not(.is-expanded) .is-tech-extra { display: none; }        /* car: technical data collapsed */

  /* scroll locks: dialogs, sheets, drawer (am.js Layers) and the booking modal (booking-calendar.js) */
  html.am-scroll-lock, html.am-scroll-lock body, body.aa-booking-modal-open { overflow: hidden; }

  /* ---------- Page loader (footer script: body.is-page-loading on same-origin navigation) ----------
     [data-page-loader].page-loader > .page-loader__inner > img + .page-loader__track > span — beige veil, black logo,
     thin accent bar (9.8:1 on beige). Hidden unless a navigation is running. */
  [data-page-loader] {
    position: fixed; inset: 0; z-index: var(--z-loader); display: grid; place-items: center;
    background: rgb(229 224 216 / .9); -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 220ms var(--ease-out), visibility 0s linear 220ms;
  }
  body.is-page-loading [data-page-loader] { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 220ms var(--ease-out), visibility 0s; }
  body.is-page-loading { cursor: wait; }
  .page-loader__inner { display: grid; justify-items: center; gap: 22px; }
  .page-loader__inner img { width: min(176px, 48vw); height: auto; }
  .page-loader__track { position: relative; display: block; width: min(168px, 44vw); height: 3px; border-radius: 3px; background: rgb(26 25 23 / .14); overflow: hidden; }
  .page-loader__track > span { position: absolute; left: 0; top: 0; bottom: 0; width: 42%; border-radius: 3px; background: var(--cherry); animation: am-loader-bar 900ms var(--ease-expand) infinite; }
  @keyframes am-loader-bar { 0% { transform: translateX(-110%); } 70%, 100% { transform: translateX(250%); } }

  /* ---------- Preferences ---------- */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
    .page-loader__track > span { width: 100%; transform: none; animation: none; }
  }
  @media (prefers-reduced-transparency: reduce) {
    :root { --glass: #ECE8E1; --glass-strong: #F6F4F0; --glass-dark: #1C1C1C; --header-hero-glass: #0E0D0C; --header-dark-sheen: none; }
    [data-page-loader] { background: var(--page); -webkit-backdrop-filter: none; backdrop-filter: none; }
  }
  @media (prefers-contrast: more) {
    :root { --glass: #F1EEE8; --glass-strong: #FFFFFF; --muted: #45413B; --line: #8A847B; --line-strong: #5E5952; --line-input: #5E5952; --hair: #5E5952; }
  }
}
