/* Flicken — styles. Original Flicken code, MIT (see LICENSE).
   v19: Material 3 (M3) as the design language, implemented by hand as CSS
   custom properties. No M3 library, no web components, no external fonts.

   Rule: colour values appear ONLY in the token block below; every component
   rule references a token (tools/check_release.py warns otherwise). The green
   palette of v18 is kept; M3 roles organise it.
   v20: a dark palette follows the browser/system preference
   (prefers-color-scheme). It is a second token block directly after the
   first; no toggle, no stored preference. Map tiles stay light (decision
   2026-11-07, C08), so pins and clusters keep their own tokens.
   v21: the dark palette keeps the green identity (header and footer stay
   green, panels sit visibly above the page, outlines are stronger); one
   rule for interactive elements — actions are buttons, information is
   linked text with an underline, facts are plain text (VISUAL_IDENTITY.md
   → "Links, buttons and plain text"). */

/* =====================================================================
   TOKENS
   ===================================================================== */
:root {
  /* ---- Colour roles (M3 names) ---- */
  --md-sys-color-primary: #0a6e4d;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #b2f0dc;
  --fl-color-on-primary-base: var(--md-sys-color-on-primary);   /* RC5: on-primary outside the header override (dest pill) */
  --md-sys-color-on-primary-container: #075238;
  --md-sys-color-secondary-container: #e9f7f2;
  --md-sys-color-on-secondary-container: #075238;
  --md-sys-color-surface: #f4f7f5;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f7faf8;
  --md-sys-color-surface-container: #eef3f0;
  --md-sys-color-surface-variant: #e9f7f2;
  --md-sys-color-on-surface: #1d2421;
  --md-sys-color-on-surface-variant: #5c6b64;
  --md-sys-color-outline: #6f7d76;
  --md-sys-color-outline-variant: #dce5e0;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #fff4f4;
  --md-sys-color-on-error-container: #8a1111;
  --md-sys-color-scrim: rgba(10, 30, 22, .55);

  /* ---- Flicken roles (same palette as v18, named by meaning) ---- */
  --fl-color-primary-strong: #075238;         /* header gradient end, footer */
  --fl-color-primary-outline: #cdeadd;        /* tonal tag and box borders */
  --fl-color-on-primary-soft: #eafff7;        /* secondary text on green */
  --fl-color-on-primary-faint: #c4e8d9;       /* small print on green */
  --fl-color-focus: #0b3d2c;                  /* focus ring on light surfaces */
  --fl-color-disabled: #8a9892;
  --fl-color-unavailable: #aab4af;            /* "not offered" options */
  --fl-color-info-container: #eef3ff;         /* brands, independence, notes */
  --fl-color-on-info-container: #23407f;
  --fl-color-info-outline: #d4e0ff;
  --fl-color-extra-container: #fff4e8;        /* additional services */
  --fl-color-on-extra-container: #9a5b16;
  --fl-color-extra-outline: #ffe2c2;
  --fl-color-access-container: #f1f3f6;       /* service options */
  --fl-color-on-access-container: #4a5568;
  --fl-color-access-outline: #dde2ea;
  --fl-color-warn-container: #fff6e5;         /* map tile notice, long links */
  --fl-color-on-warn-container: #7a4a00;
  --fl-color-warn-outline: #f2dcae;
  --fl-color-pending-container: #fff8e1;      /* "to be confirmed" */
  --fl-color-on-pending-container: #5a4300;
  --fl-color-pending-outline: #f0de9c;
  --fl-color-error-outline: #efb1b1;
  --fl-color-pin-active: #c4540a;             /* selected map pin */
  --fl-color-cluster: rgba(10, 110, 77, .25);
  /* v20: roles that must not follow the dark palette blindly. */
  --fl-color-header-start: #0a6e4d;           /* header gradient (= primary in light) */
  --fl-color-header-end: #075238;             /* header gradient end, footer */
  --fl-color-on-header: #ffffff;              /* text and outlines on header/footer */
  --fl-color-pin: #0a6e4d;                    /* pins and clusters sit on light tiles */
  --fl-color-pin-paper: #ffffff;
  --fl-color-on-pin: #ffffff;
  --fl-color-map-control: #ffffff;            /* zoom buttons, popups, attribution */
  --fl-color-on-map-control: #1d2421;
  --fl-color-map-attribution: rgba(255, 255, 255, .85);
  --fl-color-live-flash: #fff1c2;             /* results line: brief "updated" highlight */
  --fl-color-logo-mark: #0a6e4d;              /* the mark on its white square, both palettes */
  color-scheme: light dark;

  /* ---- Typography roles (system fonts; M3 type scale names) ---- */
  --md-sys-typescale-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --md-sys-typescale-display-small: clamp(1.7rem, 4.5vw, 2.7rem);
  --md-sys-typescale-headline-small: 1.25rem;
  --md-sys-typescale-title-large: 1.15rem;
  --md-sys-typescale-title-medium: 1.05rem;
  --md-sys-typescale-title-small: .95rem;
  --md-sys-typescale-body-large: 1rem;
  --md-sys-typescale-body-medium: .92rem;
  --md-sys-typescale-body-small: .82rem;
  --md-sys-typescale-label-large: .92rem;
  --md-sys-typescale-label-medium: .8rem;
  --md-sys-typescale-label-small: .7rem;
  --md-sys-typescale-weight-regular: 400;
  --md-sys-typescale-weight-medium: 600;
  --md-sys-typescale-weight-bold: 700;
  --md-sys-typescale-weight-heavy: 800;

  /* ---- Shape scale ---- */
  --md-sys-shape-corner-none: 0;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 999px;

  /* ---- Spacing scale ---- */
  --fl-space-1: .25rem;
  --fl-space-2: .5rem;
  --fl-space-3: .75rem;
  --fl-space-4: 1rem;
  --fl-space-5: 1.25rem;
  --fl-space-6: 1.5rem;
  --fl-space-8: 2rem;
  --fl-content-max: 1120px;
  --fl-touch-target: 48px;                    /* v23: 48 px targets (was 44) */
  --fl-nav-h: 4rem;                           /* v23: bottom navigation (focused mode) */
  --fl-list-w: clamp(440px, 40%, 540px);      /* v23: list pane beside the map (dual mode); RC4: 440 px keeps count · order · Reset in one row (DE) */

  /* ---- Elevation levels ---- */
  --md-sys-elevation-level0: none;
  --md-sys-elevation-level1: 0 1px 3px rgba(10, 40, 30, .08), 0 6px 20px rgba(10, 40, 30, .06);
  --md-sys-elevation-level2: 0 2px 6px rgba(10, 40, 30, .12), 0 10px 28px rgba(10, 40, 30, .08);
  --md-sys-elevation-level3: 0 20px 60px rgba(0, 0, 0, .3);
  --fl-pin-shadow: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}

/* ---- v20 dark palette: same roles, values for prefers-color-scheme: dark.
   Only colour tokens change; components keep referencing the same names. */
@media (prefers-color-scheme: dark) {
  :root {
    --md-sys-color-primary: #7fdcb5;
    --md-sys-color-on-primary: #00382a;
    --md-sys-color-primary-container: #0f6a4b;
    --md-sys-color-on-primary-container: #d3f8e7;
    --md-sys-color-secondary-container: #1f4034;
    --md-sys-color-on-secondary-container: #cbf3e0;
    --md-sys-color-surface: #121816;
    --md-sys-color-surface-container-lowest: #1d2622;
    --md-sys-color-surface-container-low: #182019;
    --md-sys-color-surface-container: #26312c;
    --md-sys-color-surface-variant: #2b3a33;
    --md-sys-color-on-surface: #e6ece8;
    --md-sys-color-on-surface-variant: #b9c6bf;
    --md-sys-color-outline: #97a79f;
    --md-sys-color-outline-variant: #41524a;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #3a1515;
    --md-sys-color-on-error-container: #ffdad6;
    --md-sys-color-scrim: rgba(0, 0, 0, .65);
    --fl-color-primary-strong: #9fefcf;
    --fl-color-primary-outline: #356350;
    --fl-color-on-primary-soft: #d9f6ea;
    --fl-color-on-primary-faint: #aedcc8;
    --fl-color-focus: #b0f7d6;
    --fl-color-disabled: #76857e;
    --fl-color-unavailable: #67746e;
    --fl-color-info-container: #1f2c4a;
    --fl-color-on-info-container: #cbdaff;
    --fl-color-info-outline: #3a4a6b;
    --fl-color-extra-container: #3a2b1c;
    --fl-color-on-extra-container: #ffcd9e;
    --fl-color-extra-outline: #5a432c;
    --fl-color-access-container: #262d37;
    --fl-color-on-access-container: #ccd3df;
    --fl-color-access-outline: #3d4653;
    --fl-color-warn-container: #3a2f11;
    --fl-color-on-warn-container: #ffda95;
    --fl-color-warn-outline: #58481c;
    --fl-color-pending-container: #3a3211;
    --fl-color-on-pending-container: #f5e29a;
    --fl-color-pending-outline: #584c1b;
    --fl-color-error-outline: #7a3030;
    --fl-color-header-start: #0c5a3f;
    --fl-color-header-end: #073f2c;
    --fl-color-on-header: #ffffff;
    --fl-color-map-control: #1d2622;
    --fl-color-on-map-control: #e6ece8;
    --fl-color-map-attribution: rgba(29, 38, 34, .9);
    --fl-color-live-flash: #4a3f14;
    --md-sys-elevation-level1: 0 1px 3px rgba(0, 0, 0, .5), 0 6px 20px rgba(0, 0, 0, .35);
    --md-sys-elevation-level2: 0 2px 6px rgba(0, 0, 0, .55), 0 10px 28px rgba(0, 0, 0, .4);
  }
}

/* =====================================================================
   BASE
   ===================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--md-sys-typescale-font);
  margin: 0; background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface);
  font-size: var(--md-sys-typescale-body-large);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--md-sys-color-primary); }
/* v21 rule (VISUAL_IDENTITY.md): information is a link — underlined text,
   optionally with a leading mark; an action is a button (pill). The same
   link style serves the header, the footer, About and the dialogs. */
/* v21: the link is one inline run — mark, non-breaking space
   and label — so the underline is continuous; the vertical padding gives a
   44 px hit area without changing the line height. */
.textlink { display: inline; padding: .45rem 0; font-weight: var(--md-sys-typescale-weight-bold); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; min-height: var(--fl-touch-target); }
.textlink .ico { display: inline; font-weight: var(--md-sys-typescale-weight-heavy); font-size: 1.05em; }
.textlink .ico-code { font-size: .78em; letter-spacing: -.04em; }
.textlink:hover { text-decoration-thickness: 2.5px; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--fl-space-3); top: -4rem; z-index: 5000; background: var(--md-sys-color-surface-container-lowest); color: var(--fl-color-primary-strong); padding: .55rem .95rem; border-radius: var(--md-sys-shape-corner-small); font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; box-shadow: var(--md-sys-elevation-level1); }
.skip-link:focus { top: var(--fl-space-3); }
/* Visible focus everywhere: dark on light surfaces, white on the green header and footer. */
:focus-visible { outline: 3px solid var(--fl-color-focus); outline-offset: 2px; }
header.site :focus-visible, footer.site :focus-visible { outline-color: var(--md-sys-color-on-primary); }
[tabindex="-1"]:focus { outline: none; }
.card:focus-visible { outline: 3px solid var(--fl-color-focus); outline-offset: 2px; }
.panel h2[tabindex="-1"]:focus-visible { outline: 3px solid var(--fl-color-focus); outline-offset: 3px; border-radius: var(--md-sys-shape-corner-extra-small); }

/* =====================================================================
   HEADER (top app bar + hero)
   ===================================================================== */
header.site {
  background: linear-gradient(160deg, var(--fl-color-header-start) 0%, var(--fl-color-header-end) 100%);
  color: var(--fl-color-on-header);
}
/* Inside the green header and footer, "on primary" means on the header
   colour, also in the dark palette (v20). */
header.site, footer.site { --md-sys-color-on-primary: var(--fl-color-on-header); }
/* Header: brand | language | links on wide screens (language control in the
   centre); on small screens brand on the left, language selector and Menu
   together on the right. */
.nav {
  max-width: var(--fl-content-max); margin: 0 auto; padding: var(--fl-space-3) var(--fl-space-5);
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--fl-space-3) var(--fl-space-4);
}
.nav .brand { justify-self: start; }
.nav .nav-links { justify-self: end; }
/* v23 RC4: one compact language selector at every size (lighter header). */
.lang-compact { display: flex; justify-self: end; }
.nav .brand { display: flex; align-items: center; gap: .6rem; color: var(--md-sys-color-on-primary); text-decoration: none; min-height: var(--fl-touch-target); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary);
  display: grid; place-items: center; flex: none;
}
.brand .logo svg { width: 24px; height: 24px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: var(--md-sys-typescale-weight-heavy); font-size: 1.35rem; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: var(--fl-space-2) var(--fl-space-4); flex-wrap: wrap; }
.nav-links a.navlink { color: var(--md-sys-color-on-primary); font-size: var(--md-sys-typescale-label-large); }
.nav-links a.navlink:hover { color: var(--md-sys-color-on-primary); }
/* v22: "Give feedback" is a Menu item on small screens and a footer link on
   all screens; the wide bar keeps About, the listing-form button and Install on one row. */
.nav-links a.nav-menu-only { display: none; }
/* The listing-form button: short in the bar, its full name in the Menu. */
.nav-links .cta .cta-full { display: none; }
.nav-links:not(.open) .cta { display: inline-flex; align-items: center; justify-content: center; }
.nav-links .cta .cta-short { display: inline-flex; align-items: center; gap: .2em; }
.nav-links .cta .cta-short .ico-svg { width: 1.3em; height: 1.3em; margin: -.15em 0; flex: none; }
/* Outlined buttons on the green bar: the listing form, Install. */
.nav-links .cta, .install-btn {
  color: var(--md-sys-color-on-primary); font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  border: 1.5px solid var(--fl-color-on-primary-faint); border-radius: var(--md-sys-shape-corner-full); padding: 0 var(--fl-space-4);
  min-height: var(--fl-touch-target); background: transparent; cursor: pointer; transition: background .15s, color .15s;
}
.nav-links .cta:hover, .install-btn:hover { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); }
/* v22: no hero block. The tagline continues the wordmark in the bar
   ("Flicken – Give your device a future"), in regular weight; it is the page
   heading. The band keeps some green below the bar so that the section tabs
   sit on its lower edge. */
header.site { padding-bottom: 2.1rem; }
body.doc-mode header.site { padding-bottom: 0; }
.brand-wrap { display: flex; align-items: center; gap: .5rem; justify-self: start; min-width: 0; }
.brand-tag { margin: .12rem 0 0; font-size: 1rem; font-weight: var(--md-sys-typescale-weight-regular, 400); letter-spacing: 0; line-height: 1.3; color: var(--fl-color-on-primary-soft); white-space: nowrap; }
/* Static facts (footer): plain text with a check mark, clearly non-interactive. */
.facts { list-style: none; padding: 0; margin: var(--fl-space-3) auto; max-width: 900px; display: flex; gap: var(--fl-space-2) 1.4rem; justify-content: center; flex-wrap: wrap; font-size: var(--md-sys-typescale-body-medium); color: var(--fl-color-on-primary-soft); }
.facts .fact { display: block; text-wrap: balance; }   /* v20: the mark stays with the first word when a fact wraps */
.facts .fact::before { content: "✓"; margin-right: .4rem; color: var(--fl-color-on-primary-faint); font-weight: var(--md-sys-typescale-weight-heavy); }


/* =====================================================================
   LAYOUT, TABS (segmented buttons), PANELS
   ===================================================================== */
main { max-width: var(--fl-content-max); margin: -1.6rem auto 0; padding: 0 var(--fl-space-5) 3rem; }
.tabs-wrap { display: flex; justify-content: center; }
.tabs {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: var(--fl-space-1);
  background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full); padding: var(--fl-space-1); box-shadow: var(--md-sys-elevation-level1); margin: 0 auto 1.3rem;
}
.tab-btn {
  border: none; background: transparent; color: var(--md-sys-color-primary); cursor: pointer; font: inherit;
  min-height: var(--fl-touch-target); padding: 0 1.4rem; border-radius: var(--md-sys-shape-corner-full);
  font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large); transition: background .15s, color .15s;
}
.tab-btn[aria-selected="true"] { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.tab-btn:hover[aria-selected="false"] { background: var(--md-sys-color-secondary-container); }
.tab-btn:focus-visible { outline-offset: 1px; }
.panel { background: var(--md-sys-color-surface-container-lowest); border-radius: var(--md-sys-shape-corner-large); box-shadow: var(--md-sys-elevation-level1); padding: var(--fl-space-6); }
.panel h2 { margin: 0 0 var(--fl-space-4); font-size: var(--md-sys-typescale-headline-small); }

/* =====================================================================
   BUTTONS (filled, outlined, text)
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--fl-space-2);
  border: 1px solid transparent; border-radius: var(--md-sys-shape-corner-full); min-height: var(--fl-touch-target);
  padding: 0 var(--fl-space-6); font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .1s;
}
.btn-primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.btn-primary:hover { box-shadow: var(--md-sys-elevation-level1); background: var(--fl-color-primary-strong); }
.btn-ghost { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); border-color: var(--md-sys-color-outline); }
.btn-ghost:hover { background: var(--md-sys-color-secondary-container); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0 var(--fl-space-4); font-size: var(--md-sys-typescale-body-small); }
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  font: inherit; font-size: var(--md-sys-typescale-label-large); font-weight: var(--md-sys-typescale-weight-bold); line-height: 1.2;
  color: var(--md-sys-color-primary); background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-full); min-height: var(--fl-touch-target); padding: 0 var(--fl-space-5); cursor: pointer; transition: background .15s, color .15s;
}
.pill-btn:hover:not(:disabled) { background: var(--md-sys-color-secondary-container); color: var(--fl-color-primary-strong); }
.pill-btn:disabled { color: var(--fl-color-disabled); border-color: var(--md-sys-color-outline-variant); background: var(--md-sys-color-surface-container-low); cursor: not-allowed; }
.pill-btn .pager-arrow { font-size: 1.05em; }
button.linklike {
  text-align: left; border: none; background: none; padding: 0; font: inherit; color: var(--md-sys-color-primary);
  font-weight: var(--md-sys-typescale-weight-bold); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}

/* =====================================================================
   TEXT FIELDS (outlined) AND COMBOBOX
   ===================================================================== */
.search-grid {
  display: grid; gap: var(--fl-space-3);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: start;   /* label + control per field; hints grow downwards */
}
.field { display: flex; flex-direction: column; gap: var(--fl-space-1); position: relative; min-width: 0; }
.field label, .modal label, .contact-form label, .label-like {
  font-size: var(--md-sys-typescale-label-medium); font-weight: var(--md-sys-typescale-weight-bold);
  color: var(--md-sys-color-on-surface-variant); text-transform: uppercase; letter-spacing: .03em;
}
.field input, .field select, .field textarea, .combo input.combo-input,
.modal input, .modal select, .modal textarea, .contact-form input, .contact-form select, .contact-form textarea {
  min-height: var(--fl-touch-target); padding: .55rem .75rem; border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small); font: inherit; font-size: var(--md-sys-typescale-body-large);
  background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); width: 100%; max-width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus, .combo input.combo-input:focus,
.modal input:focus, .modal select:focus, .modal textarea:focus, .contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: 2px solid var(--md-sys-color-primary); outline-offset: 0; border-color: var(--md-sys-color-primary);
}
.field select option:disabled, .modal select option:disabled { color: var(--fl-color-unavailable); }
.field textarea { resize: vertical; min-height: 56px; }
.modal textarea { resize: vertical; min-height: 80px; }
.contact-form textarea { resize: vertical; min-height: 8rem; }
[aria-invalid="true"] { border-color: var(--md-sys-color-error) !important; }
.loc-hint, .hint { font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); line-height: 1.35; text-transform: none; letter-spacing: 0; font-weight: 500; }
.field .hint { margin-top: .1rem; }
.req, .opt-tag { text-transform: none; letter-spacing: 0; font-weight: var(--md-sys-typescale-weight-medium); color: var(--md-sys-color-on-surface-variant); }
/* v21: primary action on the right, secondary to its left, the
   row aligned right — the thumb reaches "Search" / "Prepare" without crossing
   "Reset". The same order holds on cards and in map popups. */
.search-actions { display: flex; gap: var(--fl-space-2); flex-wrap: nowrap; align-items: stretch; justify-content: flex-end; }
/* Search and Reset: their own full-width row under the filters, side by side. */
.search-actions .btn { flex: 0 0 auto; white-space: nowrap; }

.combo { position: relative; max-width: 100%; }
.combo input.combo-input { padding-right: 2rem; }
.combo input.combo-input.is-placeholder { font-style: italic; color: var(--md-sys-color-on-surface-variant); }
/* Example texts in fields: the same muted text colour in the light and the dark
   palette (the browser default is too faint on the dark surface). */
input::placeholder, textarea::placeholder { color: var(--md-sys-color-on-surface-variant); opacity: 1; }
.combo .combo-caret { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--md-sys-color-on-surface-variant); font-size: .7rem; }
/* Menu (M3): surface container, level-2 elevation, 44 px items. */
.combo .combo-list {
  position: absolute; z-index: 40; top: calc(100% + 3px); left: 0; right: 0;
  background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-small); box-shadow: var(--md-sys-elevation-level2);
  max-height: 300px; overflow-y: auto; padding: var(--fl-space-1) 0; display: none;
}
.combo.open .combo-list { display: block; }
/* v23 RC2 (QA/moderator): an open picker lies above the sticky results toolbar. */
.search-grid:has(.combo.open) { position: relative; z-index: 1000; }
.combo .opt {
  min-height: var(--fl-touch-target); padding: .4rem .75rem; font-size: var(--md-sys-typescale-body-medium); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--fl-space-2);
}
.combo .opt:hover, .combo .opt.active { background: var(--md-sys-color-secondary-container); }
.combo .opt.all { font-style: italic; color: var(--md-sys-color-on-surface-variant); font-weight: var(--md-sys-typescale-weight-medium); }
.combo .opt.na { color: var(--fl-color-unavailable); cursor: default; }
.combo .opt.na:hover { background: transparent; }
.combo .opt .na-tag { font-size: .68rem; font-weight: var(--md-sys-typescale-weight-bold); color: var(--fl-color-unavailable); text-transform: uppercase; letter-spacing: .03em; }
.combo .opt .ok-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--md-sys-color-primary); flex: none; }
.combo .opt.opt-extra { color: var(--md-sys-color-on-surface); }
.combo .opt.opt-sentinel { font-weight: var(--md-sys-typescale-weight-medium); color: var(--fl-color-primary-strong); }
.combo .opt.sel { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.combo .opt.sel .ok-dot { background: var(--md-sys-color-on-primary); }
.combo .group-label {
  font-size: var(--md-sys-typescale-label-small); font-weight: var(--md-sys-typescale-weight-heavy); text-transform: uppercase; letter-spacing: .05em;
  color: var(--md-sys-color-on-surface-variant); padding: .6rem .75rem .25rem; border-top: 1px solid var(--md-sys-color-outline-variant);
}
.combo .group-label:first-of-type { border-top: none; }
.combo .combo-empty { padding: .6rem .75rem; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-small); font-style: italic; }

/* Not-listed helper under the search form (brief 9.2) */
.notlisted { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fl-space-2) var(--fl-space-3); margin: var(--fl-space-3) 0 0; }
.notlisted .hint { margin: 0; }
.notlisted-actions { display: flex; flex-wrap: wrap; gap: var(--fl-space-2); }
.notlisted-actions:empty { display: none; }
.result-meta { margin: var(--fl-space-4) 0 .6rem; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); font-weight: var(--md-sys-typescale-weight-medium); }

/* =====================================================================
   CHIPS AND TAGS
   Tags (spans on cards) are read-only labels; chips (buttons in dialogs
   and request forms) are M3 filter chips with 44 px targets.
   ===================================================================== */
.tagrow { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  font-size: .74rem; font-weight: var(--md-sys-typescale-weight-bold); padding: .22rem .55rem; border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border: 1px solid var(--fl-color-primary-outline);
}
.tag.brand { background: var(--fl-color-info-container); color: var(--fl-color-on-info-container); border-color: var(--fl-color-info-outline); }
/* Service families: repair capabilities are the headline (filled), extras
   and service options are labelled, quieter rows. */
.tag.service-core { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-color: var(--md-sys-color-primary); }
.tag.service { background: var(--fl-color-extra-container); color: var(--fl-color-on-extra-container); border-color: var(--fl-color-extra-outline); }
.tag.service-access { background: var(--fl-color-access-container); color: var(--fl-color-on-access-container); border-color: var(--fl-color-access-outline); }
.tag.more { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface-variant); border-color: var(--md-sys-color-outline-variant); font-weight: var(--md-sys-typescale-weight-medium); }
.svcrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem var(--fl-space-2); }
.svcrow .svclabel, .chip-group-label {
  flex: none; font-size: var(--md-sys-typescale-label-small); font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .04em;
  text-transform: uppercase; color: var(--md-sys-color-on-surface-variant);
}
/* v20: secondary card facts as compact text lines. */
.factrow { margin: 0; font-size: var(--md-sys-typescale-body-small); line-height: 1.4; color: var(--md-sys-color-on-surface); }
.factrow .factlabel { font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-on-surface-variant); }
.factrow .factmore { color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }
.chip-group-label { width: 100%; margin: .35rem 0 -.1rem; }
.chips .chip-group-label:first-child { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--fl-space-2); margin-top: .2rem; }
.chip, button.chip {
  display: inline-flex; align-items: center; min-height: var(--fl-touch-target); padding: 0 var(--fl-space-3);
  font: inherit; font-size: var(--md-sys-typescale-body-small); font-weight: var(--md-sys-typescale-weight-bold);
  border-radius: var(--md-sys-shape-corner-small); cursor: pointer; user-select: none;
  background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline); color: var(--md-sys-color-on-surface-variant);
}
.chip:hover { background: var(--md-sys-color-secondary-container); }
.chip[aria-pressed="true"] { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-color: var(--md-sys-color-primary); }
/* v21: every chip carries a fixed-width mark in front of its
   label, so pressing it never moves the text. Multi-select chips (type filter)
   show a check box, single-select chips (device, service in the Ask dialog) a
   radio mark — the same convention as native form controls. */
.chip::before {
  content: ""; flex: none; box-sizing: border-box; width: 1em; height: 1em; margin-right: .45rem;
  border: 1.5px solid currentColor; border-radius: .2em; display: inline-grid; place-items: center;
  font-size: .95em; line-height: 1; font-weight: var(--md-sys-typescale-weight-heavy);
}
.chip[aria-pressed="true"]::before { content: "✓"; background: var(--md-sys-color-on-primary); color: var(--md-sys-color-primary); border-color: var(--md-sys-color-on-primary); }
.chip.chip-single::before { border-radius: 50%; }
.chip.chip-single[aria-pressed="true"]::before { content: ""; background: radial-gradient(circle, var(--md-sys-color-primary) 42%, var(--md-sys-color-on-primary) 48%); }
.chip.chip-sentinel { border-style: dashed; }

/* =====================================================================
   SHOP CARD (one component for directory, parts/tools picker, reuse picker)
   M3 outlined card.
   ===================================================================== */
.cards { display: grid; column-gap: var(--fl-space-4); grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.card {
  border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-4) 1.15rem;
  background: var(--md-sys-color-surface-container-lowest); display: flex; flex-direction: column; gap: .55rem; min-width: 0;
}
.card h3 { margin: 0; font-size: var(--md-sys-typescale-title-medium); display: flex; align-items: center; gap: var(--fl-space-2); flex-wrap: wrap; overflow-wrap: anywhere; }
.card .loc { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); font-weight: var(--md-sys-typescale-weight-medium); }
.card .loc { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .55rem; }
.card .loc svg { width: 13px; height: 13px; vertical-align: -1px; margin-right: .2rem; }
/* v22: the same two-part control on every card in all three sections, placed
   on the card's bottom edge the way the section tabs sit on the header line:
   a pill in the outline colour holding "Info" (plain) and the main action
   (filled). Half of it protrudes, so the lists leave room below each row. */
.cards, .pick-list, .info-card .steps { --fl-pill-h: calc(var(--fl-touch-target) + 2 * var(--fl-space-1) + 2px); row-gap: calc(var(--fl-space-4) + var(--fl-pill-h) / 2); padding-bottom: calc(var(--fl-pill-h) / 2); }
.card { padding-bottom: 0; }
.card > :nth-last-child(2) { margin-bottom: var(--fl-space-2); }   /* air between the last line and the pill */
:is(.card, .step) .actions {
  position: relative; z-index: 1; align-self: center; margin: auto -.9rem calc(var(--fl-pill-h) / -2);   /* in the flow: a wrapped pill makes the card taller, never covers its text */
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--fl-space-1); max-width: calc(100% + 1.8rem);
  padding: var(--fl-space-1); background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: calc(var(--fl-touch-target) / 2 + var(--fl-space-1) + 1px); box-shadow: var(--md-sys-elevation-level1); cursor: default;
}
:is(.card, .step) .actions a, :is(.card, .step) .actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--fl-touch-target);
  text-decoration: none; font: inherit; font-size: var(--md-sys-typescale-label-large); font-weight: var(--md-sys-typescale-weight-bold);
  border-radius: var(--md-sys-shape-corner-full); padding: 0 .85rem; cursor: pointer; border: none; line-height: 1.2;
  max-width: 100%; min-width: 0; overflow-wrap: anywhere; text-align: center;   /* very large text: a segment wraps inside the pill instead of leaving it */
  background: transparent; color: var(--md-sys-color-primary); transition: background .15s, color .15s;
}
:is(.card, .step) .actions .ask { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.card .actions .details:hover, .card .actions .onmap:hover { background: var(--md-sys-color-secondary-container); }
/* v22: "On the map" is the middle segment, a pin symbol only (tooltip and
   accessible name carry the words), so the pill keeps one row in every
   language and at every card width. */
.card .actions .onmap { padding: 0 .7rem; min-width: var(--fl-touch-target); }
.card .actions .onmap .ico-svg { width: 1.3em; height: 1.3em; }
:is(.card, .step) .actions a:focus-visible, :is(.card, .step) .actions button:focus-visible { outline-offset: 1px; }
/* Pin pop-ups: the same pair as buttons (Info outlined, main action filled). */
.map-pop-actions .pop-ask { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-color: var(--md-sys-color-primary); }
.map-pop-actions .pop-visit { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); border-color: var(--md-sys-color-outline); }
.map-pop-actions .pop-visit, .map-pop-actions .pop-ask { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
/* v22: inline symbols on contact actions (envelope, handset, camera). */
.ico-svg { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
#detailAsk, .btn-map { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-map.hidden { display: none; }
/* v22: the address and its copy symbol (the place is stated once, here). */
.detail-list .addr-line { display: flex; align-items: flex-start; gap: .5rem; }
.icon-btn { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; margin: -.3rem 0; padding: 0; border: none; background: none; border-radius: var(--md-sys-shape-corner-small); color: var(--md-sys-color-primary); cursor: pointer; }
.icon-btn::after { content: ""; position: absolute; inset: -.45rem; }   /* 44 px target around a small symbol */
.icon-btn:hover { background: var(--md-sys-color-secondary-container); }
.icon-btn .ico-svg { width: 1.2rem; height: 1.2rem; }
#detailTitle { margin-bottom: .7rem; }
#detailAsk.hidden { display: none; }
.detail-list a .ico-svg, .alt-contacts a .ico-svg { margin-right: .35rem; }
.detail-list a[href^="tel:"], .alt-contacts a[href^="tel:"] { white-space: nowrap; }
.hint-photo { display: flex; align-items: flex-start; gap: .4rem; margin-top: .35rem; }
.hint-photo .ico-svg { margin-top: .08em; }
/* v22: the whole card opens its details (pointer shortcut for the labelled
   button, which remains). The hover tint is the only added cue. */
article.card { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
@media (hover: hover) {   /* pointer devices only: a tap must not leave a card looking hovered */
  article.card:hover { border-color: var(--md-sys-color-outline); box-shadow: var(--md-sys-elevation-level1); }
}
@media (prefers-reduced-motion: reduce) { article.card { transition: none; } }
.card.card-active { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
/* Independence is self-declared by the shop, never verified by Flicken. */
.badge-indep-wrap { display: inline-flex; align-items: center; }
.badge-indep {
  font-size: .68rem; font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .03em; text-transform: uppercase;
  background: var(--fl-color-info-container); color: var(--fl-color-on-info-container); border: 1px solid var(--fl-color-info-outline);
  border-radius: var(--md-sys-shape-corner-full); padding: .15rem .5rem; cursor: help;
}
.empty { padding: var(--fl-space-8); text-align: center; color: var(--md-sys-color-on-surface-variant); }

/* Pagination below the cards */
.pager { display: flex; align-items: center; justify-content: space-between; gap: .6rem var(--fl-space-4); margin: var(--fl-space-5) 0 .2rem; flex-wrap: wrap; }
.pager-status { margin: 0; flex: 1 1 12rem; text-align: center; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); font-weight: var(--md-sys-typescale-weight-medium); }
.pager-btn { flex: none; }

/* =====================================================================
   MAP (Leaflet)
   ===================================================================== */
.map-wrap {
  position: relative; z-index: 0; isolation: isolate;   /* below the dialogs */
  margin: var(--fl-space-4) 0 var(--fl-space-5); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium); overflow: hidden; background: var(--md-sys-color-secondary-container);
}
.map-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: var(--fl-space-2) .8rem; background: var(--md-sys-color-surface-container-lowest); border-bottom: 1px solid var(--md-sys-color-outline-variant); font-size: .85rem; color: var(--md-sys-color-on-surface-variant); }
.map-bar .map-title { font-weight: var(--md-sys-typescale-weight-medium); color: var(--md-sys-color-on-surface); }
.map-bar .map-count { margin-left: auto; }
.map-count .linklike { font-size: .85rem; }
#repairMap, .pick-map { width: 100%; height: 420px; background: var(--md-sys-color-secondary-container); }
.leaflet-container { font: inherit; }
.repair-pin { background: none; border: none; }
.repair-pin svg { display: block; filter: var(--fl-pin-shadow); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: var(--fl-color-cluster); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--fl-color-pin); color: var(--fl-color-on-pin); font-weight: var(--md-sys-typescale-weight-medium); }
.leaflet-popup-content-wrapper { border-radius: var(--md-sys-shape-corner-medium); }
.leaflet-popup-content { margin: .7rem .9rem; font-size: var(--md-sys-typescale-body-medium); line-height: 1.35; }
.leaflet-popup-content .map-pop p { margin: 0 0 .3rem; }
.map-pop-name { font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-on-surface); margin: 0 0 .15rem; }
.map-pop-loc { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-small); margin: 0 0 .35rem; }
.map-pop-addr { color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-body-small); margin: 0 0 .55rem; }
.map-pop-approx { color: var(--md-sys-color-on-surface-variant); font-style: italic; font-size: .76rem; margin: 0 0 .55rem; }
.map-pop-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; margin-top: var(--fl-space-2); }
.map-pop-actions a, .map-pop-actions button {
  font: inherit; font-size: var(--md-sys-typescale-label-medium); cursor: pointer; min-height: 36px;
  border-radius: var(--md-sys-shape-corner-full); padding: .32rem .7rem; border: 1px solid var(--md-sys-color-primary); text-decoration: none; line-height: 1.1;
}
.map-pop-actions .pop-list { background: var(--md-sys-color-surface-container-lowest); color: var(--fl-color-primary-strong); border: 1px dashed var(--md-sys-color-primary); }
.map-legend { font-size: .78rem; color: var(--md-sys-color-on-surface-variant); padding: .45rem .8rem; background: var(--md-sys-color-surface-container-lowest); border-top: 1px solid var(--md-sys-color-outline-variant); margin: 0; }
.map-warn { display: none; font-size: .84rem; color: var(--fl-color-on-warn-container); background: var(--fl-color-warn-container); border-bottom: 1px solid var(--fl-color-warn-outline); padding: var(--fl-space-2) .8rem; margin: 0; }
.map-wrap.tiles-failed .map-warn { display: block; }
.map-wrap.no-map #repairMap, .map-wrap.no-map .map-legend { display: none; }
.map-wrap.map-off { display: none; }   /* no map library: the section shows its list only */
.map-wrap.no-map .map-warn { display: block; }

/* =====================================================================
   DIALOGS (M3 dialog anatomy)
   ===================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--md-sys-color-scrim); display: none;
  align-items: flex-start; justify-content: center; padding: 4vh var(--fl-space-4); z-index: 4000; overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--md-sys-color-surface-container-lowest); border-radius: var(--md-sys-shape-corner-extra-large); max-width: 560px; width: 100%;
  box-shadow: var(--md-sys-elevation-level3); padding: var(--fl-space-6); animation: pop .15s ease;
}
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 .2rem; font-size: var(--md-sys-typescale-headline-small); }
.modal h3 .badge-indep, .card h3 .badge-indep { margin-left: .45rem; vertical-align: middle; }
.modal .sub { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); margin: 0 0 1.1rem; }
.modal .mfield { display: flex; flex-direction: column; gap: var(--fl-space-1); margin-bottom: .9rem; }
.modal .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.modal-actions { display: flex; gap: var(--fl-space-2); justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.modal .close-x {
  float: right; border: none; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--md-sys-color-on-surface-variant);
  min-width: var(--fl-touch-target); min-height: var(--fl-touch-target); border-radius: var(--md-sys-shape-corner-full); margin: -.6rem -.6rem 0 0;
}
.modal .close-x:hover { background: var(--md-sys-color-secondary-container); }
.modal fieldset, .fs { border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); padding: .8rem var(--fl-space-4) var(--fl-space-4); margin: 0 0 .9rem; min-width: 0; }
.modal legend, .fs legend { font-weight: var(--md-sys-typescale-weight-heavy); font-size: var(--md-sys-typescale-body-medium); padding: 0 .35rem; color: var(--fl-color-primary-strong); }
.modal fieldset .hint { margin: -.2rem 0 .7rem; }
.modal .checkline input { width: auto; min-height: 0; margin-top: .2rem; flex: none; }
.checkline { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface); margin: .2rem 0 .9rem; }
.modal .checkline label { flex: 1 1 auto; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-body-medium); line-height: 1.45; }
.ask-options-hint { margin: -.4rem 0 .9rem; }
.recipient-box { background: var(--md-sys-color-secondary-container); border: 1px solid var(--fl-color-primary-outline); border-radius: var(--md-sys-shape-corner-small); padding: .55rem .75rem; font-size: var(--md-sys-typescale-body-medium); margin: 0 0 var(--fl-space-4); overflow-wrap: anywhere; }
.recipient-box .k { font-size: .72rem; font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .04em; text-transform: uppercase; color: var(--fl-color-primary-strong); display: block; }
.err-summary { border: 1px solid var(--fl-color-error-outline); background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); border-radius: var(--md-sys-shape-corner-small); padding: .6rem .8rem; font-size: var(--md-sys-typescale-body-small); margin: 0 0 .9rem; }
.err-summary:empty { display: none; }
.err-summary ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.reason-note { font-size: var(--md-sys-typescale-body-small); color: var(--fl-color-on-info-container); background: var(--fl-color-info-container); border: 1px solid var(--fl-color-info-outline); border-radius: var(--md-sys-shape-corner-small); padding: var(--fl-space-2) .7rem; margin: -.3rem 0 .9rem; }

/* Shop details dialog */
.detail-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .55rem; }
.detail-list li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .6rem; align-items: baseline; font-size: var(--md-sys-typescale-body-medium); }
.detail-list .k { font-size: .74rem; font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .04em; text-transform: uppercase; color: var(--md-sys-color-on-surface-variant); }
.detail-list a, .detail-list button.linklike { color: var(--md-sys-color-primary); font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; word-break: break-word; }
.detail-list a:hover, .detail-list button.linklike:hover { text-decoration: underline; }
.detail-list button.linklike { border: none; background: none; padding: 0; font: inherit; font-weight: var(--md-sys-typescale-weight-bold); cursor: pointer; text-align: left; }
.detail-list .sub-k { display: block; font-size: .78rem; color: var(--md-sys-color-on-surface-variant); font-weight: 500; }
.detail-list .sec { display: inline-block; margin-top: .15rem; font-size: var(--md-sys-typescale-body-small); font-weight: var(--md-sys-typescale-weight-medium); }
.detail-list .row-actions { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; }
.detail-none { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); margin: .8rem 0 0; }
.detail-indep { font-size: .86rem; background: var(--fl-color-info-container); border: 1px solid var(--fl-color-info-outline); color: var(--fl-color-on-info-container); border-radius: var(--md-sys-shape-corner-small); padding: var(--fl-space-2) .7rem; margin: .2rem 0 .6rem; }
.detail-h { margin: var(--fl-space-4) 0 0; padding-top: .7rem; border-top: 1px solid var(--md-sys-color-outline-variant); font-size: var(--md-sys-typescale-title-small, .95rem); }
.detail-offer { margin-top: .4rem; }
.detail-foot { margin-top: var(--fl-space-4); padding-top: .7rem; border-top: 1px solid var(--md-sys-color-outline-variant); font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); display: grid; gap: .35rem; }
.detail-foot p { margin: 0; }

/* Prepared email view */
.prepared h4, .suggest-box h4 { margin: 0 0 .4rem; color: var(--fl-color-primary-strong); font-size: var(--md-sys-typescale-title-medium); }
.prepared .status { font-weight: var(--md-sys-typescale-weight-bold); margin: 0 0 var(--fl-space-2); }
.prepared p { margin: .4rem 0; }
.prepared details { margin-top: .9rem; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-surface-container-lowest); padding: .55rem .75rem; }
.prepared summary { cursor: pointer; font-weight: var(--md-sys-typescale-weight-bold); color: var(--fl-color-primary-strong); min-height: var(--fl-touch-target); display: flex; align-items: center; }
.copy-block { display: grid; gap: var(--fl-space-1); margin: .7rem 0 0; }
.copy-head { display: flex; justify-content: space-between; align-items: center; gap: var(--fl-space-2); }
.copy-head .k { font-size: .72rem; font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .04em; text-transform: uppercase; color: var(--md-sys-color-on-surface-variant); }
.copy-block textarea, .copy-block input { width: 100%; font: inherit; font-size: .86rem; padding: var(--fl-space-2) .6rem; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); }
.copy-block textarea { min-height: 11rem; resize: vertical; }
.alt-contacts { display: flex; flex-wrap: wrap; gap: var(--fl-space-2); margin-top: .4rem; }
.alt-contacts a { display: inline-flex; align-items: center; min-height: var(--fl-touch-target); font-size: .86rem; font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); padding: 0 var(--fl-space-4); color: var(--md-sys-color-primary); background: var(--md-sys-color-surface-container-lowest); }
.warn-note { font-size: .86rem; color: var(--fl-color-on-warn-container); background: var(--fl-color-warn-container); border: 1px solid var(--fl-color-warn-outline); border-radius: var(--md-sys-shape-corner-small); padding: var(--fl-space-2) .7rem; }
.pending-note { font-size: .86rem; color: var(--fl-color-on-pending-container); background: var(--fl-color-pending-container); border: 1px solid var(--fl-color-pending-outline); border-radius: var(--md-sys-shape-corner-small); padding: .55rem .75rem; margin: 0 0 var(--fl-space-4); }
.reveal-slot { margin: var(--fl-space-2) 0; }
.suggest-box { background: var(--md-sys-color-secondary-container); border: 1px solid var(--fl-color-primary-outline); border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-4); font-size: var(--md-sys-typescale-body-medium); margin-top: var(--fl-space-4); }
.suggest-box .tagrow { margin-top: var(--fl-space-2); }
.copy-status:empty { display: none; }

/* =====================================================================
   REQUEST FORMS (parts/tools, reuse) AND SHOP PICKER
   ===================================================================== */
/* v21: the two request panels read like the search panel: heading and one
   left-aligned sentence; details sit where they apply. */
.diy-intro { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); margin: -.6rem 0 1rem; max-width: 70ch; }
/* The three sections share one structure: a row of filters (.search-grid),
   the map (.map-wrap), the result line (.results-bar), the cards, Reset. */
.search-grid-fill { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }   /* same columns as the repair search, also when a route shows one field only */
@media (min-width: 1000px) { .search-grid-fill { grid-template-columns: 1.3fr 1.02fr 1fr 1.16fr .96fr; } }   /* five fields in one row; the two selects with the longest texts get more room */
.search-grid .combo input.combo-input { text-overflow: ellipsis; }
.search-grid .span-all { grid-column: 1 / -1; }
/* A checkbox as a filter: the box sits where the other fields have their control. */
.field-check .checkline { min-height: var(--fl-touch-target); align-items: center; margin: 0; }
.field-check .checkline input { margin-top: 0; }
/* Recycle/Gift on the routes without a list: only the first select stays. */
.route-off .field:not(.field-intent), .route-off .more-toggle-field { display: none; }
.type-hint { margin: var(--fl-space-3) 0 0; }
/* v22: one centred Reset at the bottom of every section; the bar stays at the
   bottom of the viewport while the section scrolls and rests at its end. */
.sticky-actions { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: center; background: var(--md-sys-color-surface-container-lowest); padding: .5rem 0; margin-top: var(--fl-space-4); border-top: 1px solid var(--md-sys-color-outline-variant); }
.sticky-actions .btn { min-width: 9rem; flex: 0 0 auto; }
/* The device line of an enquiry dialog (taken from the filters on the page). */
.recap { margin: 0 0 var(--fl-space-4); font-size: var(--md-sys-typescale-body-medium); line-height: 1.5; overflow-wrap: anywhere; }
.recap .recap-item { margin-right: .9rem; display: inline-block; }
.recap .k { font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-on-surface-variant); }
.recap .sub-k { display: block; font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.modal .more-details { margin-bottom: .2rem; }
/* "More details (optional)" disclosure of Parts/Tools, same look as More filters. */
.more-details summary { list-style: none; display: flex; align-items: center; gap: var(--fl-space-2); min-height: var(--fl-touch-target); padding: 0 var(--fl-space-3); font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-primary); border: 1.5px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small); cursor: pointer; }
.more-details summary::-webkit-details-marker { display: none; }
.more-details summary:hover { background: var(--md-sys-color-surface-container); }
.more-details .more-chevron { margin-left: 0; display: block; }
.more-details[open] .more-chevron { transform: rotate(180deg); }
.more-details-body { margin-top: .9rem; }
/* Same arrangement as the directory: the map above, then the shared shop
   cards in the same responsive grid (six per page). */
.pick-list { list-style: none; margin: 0; padding-left: 0; padding-top: 0; display: grid; column-gap: var(--fl-space-4); grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.pick-list > li { min-width: 0; display: flex; }
.pick-list > li > .card { flex: 1 1 auto; }
.pick-list .pick-empty { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); padding: var(--fl-space-2) .2rem; }
.pick-pager { margin: .7rem 0 0; }
.pick-pager .pager-status { flex-basis: 8rem; font-size: .85rem; }
.pick-map { position: relative; z-index: 0; }
.route-box { margin: var(--fl-space-4) 0; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); padding: .9rem var(--fl-space-4) var(--fl-space-4); background: var(--md-sys-color-surface-container-lowest); }
.route-box h3 { margin: 0 0 .4rem; font-size: var(--md-sys-typescale-title-medium); }
.route-box h3:focus { outline: none; }
.route-box p { margin: .35rem 0; font-size: var(--md-sys-typescale-body-medium); line-height: 1.5; }
.route-box .search-actions { margin-top: .7rem; }
.route-links { list-style: none; margin: .7rem 0 .3rem; padding: 0; display: flex; flex-wrap: wrap; gap: var(--fl-space-2); }
.route-links a { display: inline-flex; align-items: center; min-height: var(--fl-touch-target); padding: 0 var(--fl-space-4); border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; color: var(--md-sys-color-primary); }
.route-links a:hover { background: var(--md-sys-color-secondary-container); }
#recReuse { grid-column: 1 / -1; display: grid; gap: inherit; min-width: 0; }
#recReuse.hidden { display: none !important; }
#recEmpty { margin: .2rem 0 .6rem; }

/* =====================================================================
   INFORMATION PAGES, ABOUT, FOOTER
   ===================================================================== */
section.block, .docpage { max-width: var(--fl-content-max); margin: 2.4rem auto 0; padding: 0 var(--fl-space-5); }
.docpage { margin-top: var(--fl-space-8); }
.info-card { background: var(--md-sys-color-surface-container-lowest); border-radius: var(--md-sys-shape-corner-large); box-shadow: var(--md-sys-elevation-level1); padding: 1.8rem; }
.info-card h2 { margin-top: 0; }
.info-card { overflow-wrap: break-word; }   /* enlarged text: a long word breaks instead of widening the page */
.docpage .back, #about .back { display: inline-flex; align-items: center; min-height: var(--fl-touch-target); margin-bottom: var(--fl-space-2); font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; }
.docpage h2 { margin-top: 0; }
#about h2:focus, #about h3:focus { outline: none; }
.doc-body h3 { margin: var(--fl-space-6) 0 .45rem; font-size: var(--md-sys-typescale-title-medium); color: var(--fl-color-primary-strong); }
.doc-body h4 { margin: var(--fl-space-4) 0 .25rem; font-size: var(--md-sys-typescale-body-large); }
.doc-body h3 + .table-wrap, .doc-body h3 + p { margin-top: .3rem; }
.doc-body p, .doc-body li { max-width: 78ch; }
.doc-body li { margin: var(--fl-space-1) 0; }
.doc-body code { background: var(--md-sys-color-secondary-container); padding: .05rem .3rem; border-radius: var(--md-sys-shape-corner-extra-small); font-size: .9em; }
.doc-md { font-size: .84rem; color: var(--md-sys-color-on-surface-variant); margin-top: 1.6rem; border-top: 1px solid var(--md-sys-color-outline-variant); padding-top: .8rem; }
.table-wrap { overflow-x: auto; margin: .6rem 0; }
.lic-table { border-collapse: collapse; width: 100%; font-size: var(--md-sys-typescale-body-medium); }
.lic-table:has(thead) { min-width: 520px; }
.lic-table th, .lic-table td { text-align: left; vertical-align: top; border-top: 1px solid var(--md-sys-color-outline-variant); padding: .55rem .6rem; }
.lic-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--md-sys-color-on-surface-variant); border-top: none; }
.lic-table tbody th { font-weight: var(--md-sys-typescale-weight-bold); width: 32%; }
.tbc { font-style: italic; color: var(--fl-color-on-pending-container); background: var(--fl-color-pending-container); border-radius: var(--md-sys-shape-corner-extra-small); padding: 0 var(--fl-space-1); }
footer.site .tbc { background: transparent; color: var(--md-sys-color-on-primary); }
.load-error { color: var(--md-sys-color-error); }
body.doc-mode main, body.doc-mode .back-to-search { display: none; }

.about-lead { font-size: var(--md-sys-typescale-body-large); max-width: 75ch; }
.about-sub { margin: 1.9rem 0 .35rem; font-size: var(--md-sys-typescale-title-large); color: var(--md-sys-color-on-surface); }
.steps { display: grid; gap: var(--fl-space-4); grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); margin-top: .8rem; }
ul.steps { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.step { background: var(--md-sys-color-secondary-container); border-radius: var(--md-sys-shape-corner-medium); padding: .9rem var(--fl-space-4); }
.step .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font-weight: var(--md-sys-typescale-weight-heavy); font-size: .85rem; }
.step p { margin: 0; font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.mode-card .n svg { display: block; }
/* About cards: marker and title share one row; "Open" sits at its end. */
/* The boxes of the About page are built like the shop cards: mark and title,
   a short text, and one action centred on the bottom edge (half protruding).
   The whole box is a pointer target for that action. Boxes in a row share one
   height; the action stays on the edge. */
.info-card .step { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-width: 0; align-items: center; column-gap: .6rem; row-gap: .35rem; padding-bottom: 0; cursor: pointer; }
.info-card .step > strong { margin: 0; line-height: 1.3; }
.info-card .step > p { grid-column: 1 / -1; margin: 0; align-self: start; }
.info-card .step .actions { grid-column: 1 / -1; justify-self: center; margin: var(--fl-space-3) 0 calc(var(--fl-pill-h) / -2); max-width: 100%; min-width: 0; }
.info-card .step .actions a, .info-card .step .actions button { padding: .3rem 1.1rem; white-space: normal; }   /* a long label, or enlarged text: two lines inside the pill, never wider than the box */
.info-card .step > strong { min-width: 0; overflow-wrap: anywhere; }
.info-card .step { transition: box-shadow .15s; }
@media (hover: hover) { .info-card .step:hover { box-shadow: var(--md-sys-elevation-level1); } }
@media (prefers-reduced-motion: reduce) { .info-card .step { transition: none; } }
.contact-wrap { max-width: 44rem; }
.contact-wrap > p { margin: 0 0 var(--fl-space-2); color: var(--md-sys-color-on-surface-variant); }
.contact-routes { margin: 0 0 var(--fl-space-4) 1.1rem; padding: 0; font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.contact-routes li { margin: .15rem 0; }
.contact-routes .linklike { font-size: inherit; }
.contact-form .mfield { display: flex; flex-direction: column; gap: var(--fl-space-1); margin-bottom: .9rem; }
.contact-form .hint { margin: 0 0 .8rem; }
#contactPrepared { background: var(--md-sys-color-secondary-container); border: 1px solid var(--fl-color-primary-outline); border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-4); font-size: var(--md-sys-typescale-body-medium); }
.behind { margin-top: 1.6rem; padding-top: .9rem; border-top: 1px solid var(--md-sys-color-outline-variant); font-size: .88rem; color: var(--md-sys-color-on-surface-variant); }
.behind h4 { margin: 0 0 var(--fl-space-1); font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface); }
.behind p { margin: .2rem 0; }
.behind .hint { display: block; margin-top: .15rem; }

/* v21: the way back to the search straddles the page/footer boundary, in the
   same white outlined pill as the mode selector on the header boundary. */
footer.site { position: relative; }
.back-to-search { position: absolute; left: 0; right: 0; top: 0; transform: translateY(-50%); text-align: center; padding: 0 var(--fl-space-4); pointer-events: none; }
.back-top-btn {
  pointer-events: auto; display: inline-flex; align-items: center; gap: var(--fl-space-2); min-height: var(--fl-touch-target); text-decoration: none;
  background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  padding: 0 1.4rem; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-full); box-shadow: var(--md-sys-elevation-level1);
}
footer.site .back-top-btn { color: var(--md-sys-color-primary); }   /* not the footer's link colour */
footer.site .back-top-btn:hover { background: var(--md-sys-color-secondary-container); color: var(--fl-color-primary-strong); }
footer.site .back-top-btn:focus-visible { outline-color: var(--fl-color-focus); }

footer.site { background: var(--fl-color-header-end); color: var(--fl-color-on-primary-soft); text-align: center; padding: 3.2rem var(--fl-space-5) 2rem; margin-top: 3.4rem; font-size: var(--md-sys-typescale-body-medium); }
footer.site a { color: var(--md-sys-color-on-primary); }
.footer-id { margin: 0 0 .3rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .35rem; }
.footer-id strong { color: var(--md-sys-color-on-primary); font-size: var(--md-sys-typescale-title-medium); }
.footer-id .footer-small { margin: 0; }
.footer-sep { color: var(--fl-color-on-primary-faint); }
.footer-small { color: var(--fl-color-on-primary-faint); font-size: var(--md-sys-typescale-body-small); max-width: 82ch; margin: .55rem auto; }
.footer-shops { margin: var(--fl-space-3) auto 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem var(--fl-space-3); line-height: 1.35; }
/* Outlined button on the green header/footer (same family as the listing-form button in the bar). */
.btn-onheader { background: transparent; color: var(--fl-color-on-header); border: 1.5px solid var(--fl-color-on-primary-faint); padding: 0 var(--fl-space-5); font-size: var(--md-sys-typescale-label-large); }
.btn-onheader:hover { background: var(--fl-color-on-header); color: var(--fl-color-logo-mark); }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--fl-space-6); padding: 0; margin: var(--fl-space-4) auto 0; max-width: 900px; }
.footer-nav a { color: var(--md-sys-color-on-primary); }
.footer-nav .ico { color: var(--fl-color-on-primary-faint); }

/* =====================================================================
   RESPONSIVE (360 px floor, tablets, desktop)
   ===================================================================== */
@media (max-width: 40em) {
  /* Mode selector stays one segmented control; each part takes the width its
     label needs (short names, one line each) and the rest is shared. */
  .tabs-wrap { display: block; container: tabs / inline-size; }
  .tabs { display: flex; flex-wrap: nowrap; gap: .2rem; width: 100%; border-radius: var(--md-sys-shape-corner-extra-large); padding: var(--fl-space-1); overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex: 1 1 0; min-width: max-content; padding: .4rem .45rem; font-size: var(--md-sys-typescale-label-medium); line-height: 1.2; border-radius: 22px; min-height: 3rem; display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; }
}
@media (max-width: 400px) {
  .tab-btn { font-size: 0.8125rem; padding: .4rem .3rem; }
}
/* Large text: when the three labels cannot share one line, they may break at
   the slash or wrap onto a second row; nothing is clipped or hidden. */
@container tabs (max-width: 19.5rem) {
  .tabs { flex-wrap: wrap; overflow: visible; }
  .tab-btn { flex: 1 1 min-content; min-width: min-content; white-space: normal; }
}
@media (max-width: 600px) {
  .panel { padding: var(--fl-space-4); }
  .info-card { padding: var(--fl-space-5) var(--fl-space-4); }
  .modal { padding: var(--fl-space-5) var(--fl-space-4); border-radius: var(--md-sys-shape-corner-large); }
  .modal .row2 { grid-template-columns: minmax(0, 1fr); }
  #repairMap, .pick-map { height: 320px; }
  .search-actions { flex-wrap: wrap; }
  .search-actions .btn { white-space: normal; flex: 1 1 auto; }
  /* v20: compact cards. */
  .cards, .pick-list { column-gap: var(--fl-space-3); }
  .card { padding: .75rem .9rem 0; gap: .4rem; }
  .card .actions a, .card .actions button { padding: 0 clamp(.7rem, 3.4vw, .85rem); }
  .card h3 { font-size: 1rem; line-height: 1.3; }
  .card .loc { font-size: var(--md-sys-typescale-body-small); }
  .tagrow { gap: .25rem; }
  .tag { font-size: .7rem; padding: .14rem .42rem; }
  .svcrow { gap: .2rem var(--fl-space-2); }
  .lic-table { font-size: .86rem; }
}
@media (max-width: 480px) {
  .detail-list li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  /* v22: the same two rows in every language: the range on top, then
     Previous | Next side by side (also in the narrower lists of the other
     two sections, where the range used to share a row with one button). */
  .pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem var(--fl-space-2); }
  .pager .pager-status { order: -1; grid-column: 1 / -1; }
  .pager-btn { min-width: 0; padding: 0 .7rem; }
  /* v22: Cancel/Close + the main action keep one row in every language; on
     the narrowest screens a long label may take two lines inside its button. */
  .modal-actions:has(> [data-close]) { flex-wrap: nowrap; }
  .modal-actions:has(> [data-close]) .btn { flex: 0 1 auto; min-width: 0; padding: .3rem .95rem; line-height: 1.2; text-align: center; }
  /* v22: Close | On the map | Contact keep one row: on phones the middle
     button shows its pin only (its name stays for screen readers). */
  .modal-actions .btn-map { flex: none; min-width: var(--fl-touch-target); padding: .3rem .7rem; }
  .modal-actions .btn-map > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
@media (max-width: 350px) {
  .pager-btn .pager-arrow { display: none; }
  .card .actions { gap: 2px; padding: 3px; }
  .card .actions a, .card .actions button { padding: 0 .5rem; gap: .3rem; }
  .card .actions .details, .card .actions .onmap { min-width: var(--fl-touch-target); padding: 0 .3rem; }
}
/* v22: "Info | pin | Contact ↗" stays one pill in the narrow lists of every
   language: on small phones Info shows its symbol only (its name stays for
   screen readers; a tap on the card opens Info as well). */
@media (max-width: 380px) {
  .card .actions .details { min-width: var(--fl-touch-target); padding: 0 .5rem; }
  .card .actions .details > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
@media (max-width: 350px) { .card .actions .details { min-width: var(--fl-touch-target); padding: 0 .3rem; } }
/* v22: enlarged text (a card only a few "rem" wide, at any screen width): the
   pill keeps one row by dropping first the Info label, then the Contact label.
   The symbols stay; accessible names are unchanged. At the default text size
   every label that fitted before stays (from 320 px screens upwards). */
.card { container: card / inline-size; }
@container card (max-width: 15.5rem) {
  .card .actions .details > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
@container card (max-width: 13.5rem) {
  .card .actions { gap: 2px; padding: 3px; }
  .card .actions a, .card .actions button { padding: 0 .4rem; gap: .3rem; }
  .card .actions .details, .card .actions .onmap { padding: 0 .3rem; min-width: var(--fl-touch-target); }
}
@container card (max-width: 10.8rem) {
  .card .actions a, .card .actions button { padding: 0 .3rem; min-width: var(--fl-touch-target); }
  .card .actions .ask > svg + span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
@container card (max-width: 6rem) {
  .card .actions a, .card .actions button, .card .actions .details, .card .actions .onmap { padding: 0 .1rem; min-width: 0; flex: 1 1 0; font-size: .7rem; }
}
/* v22: on a map too small for a pop-up to clear the attribution line, the
   line (which lies above pop-ups) steps aside while it would cover the
   pop-up's buttons, and returns when the pop-up closes or moves away. */
.leaflet-container .leaflet-control-attribution.att-away { visibility: hidden; }
/* v22: on phones the two pop-up actions share one row inside a narrow map. */
@media (max-width: 420px) {
  .map-pop-actions { gap: .3rem; }
  .map-pop-actions .pop-visit, .map-pop-actions .pop-ask { padding-left: .6rem; padding-right: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .modal { animation: none; }
}

/* =====================================================================
   v20 — compact small-screen layout, live results line, map touch mode,
   dark-palette support for third-party map controls.
   Breakpoints are content-based (when the wide bar no longer fits), not a
   device size. All colours come from the token blocks.
   ===================================================================== */

/* ---- Header: compact bar parts (hidden on wide screens) ---- */
.nav-compact { display: none; align-items: center; gap: var(--fl-space-2); }
.lang-select {
  min-height: var(--fl-touch-target); padding: 0 var(--fl-space-3); font: inherit; font-weight: var(--md-sys-typescale-weight-bold);
  font-size: var(--md-sys-typescale-label-large); color: var(--fl-color-on-header); background: transparent;
  border: 1.5px solid var(--fl-color-on-primary-faint); border-radius: var(--md-sys-shape-corner-small); cursor: pointer; max-width: 9.5rem;
}
.lang-select option { color: var(--md-sys-color-on-surface); background: var(--md-sys-color-surface-container-lowest); }
.menu-btn {
  display: inline-flex; align-items: center; gap: .4rem; min-height: var(--fl-touch-target); padding: 0 var(--fl-space-3);
  font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  color: var(--fl-color-on-header); background: transparent; border: 1.5px solid var(--fl-color-on-primary-faint);
  border-radius: var(--md-sys-shape-corner-small); cursor: pointer;
}
.menu-btn[aria-expanded="true"] { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); border-color: var(--md-sys-color-surface-container-lowest); }

/* Compact bar: narrow screens, and short screens such as phones in landscape. */
@media (max-width: 40em), (max-height: 31.25em) {
  /* Brand takes the free space on the left; language selector and Menu sit
     together on the right, selector first. */
  .nav { padding: var(--fl-space-2) var(--fl-space-4); gap: var(--fl-space-2); grid-template-columns: minmax(0, 1fr) auto auto; }
  .nav .brand { justify-self: stretch; min-width: 0; overflow: hidden; container: brand / inline-size; }
  .brand .logo { flex: 0 0 auto; }
  .brand-text { min-width: 0; overflow: hidden; }
  .brand-name { font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-compact { display: flex; flex: 0 0 auto; justify-self: end; }
  .lang-select { max-width: none; padding: 0 var(--fl-space-2) 0 var(--fl-space-3); }
  /* The wide-screen links become the Menu panel: same elements, stacked. */
  .nav { position: relative; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: var(--fl-space-2);
    position: absolute; top: 100%; left: var(--fl-space-3); right: var(--fl-space-3); z-index: 1200;
    background: var(--fl-color-header-end); border: 1px solid var(--fl-color-on-primary-faint);
    border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-3); box-shadow: var(--md-sys-elevation-level2);
  }
  .nav-links.open .cta, .nav-links.open .install-btn {
    display: flex; align-items: center; justify-content: center; padding: 0 var(--fl-space-4); border: 1.5px solid var(--fl-color-on-primary-faint);
    border-radius: var(--md-sys-shape-corner-full); color: var(--fl-color-on-header); font-size: var(--md-sys-typescale-label-large);
  }
  .nav-links.open a.navlink { display: inline-flex; justify-content: center; padding: 0 var(--fl-space-4); }
  .nav-links.open .cta .cta-short { display: none; }
  .nav-links.open .cta .cta-full { display: inline; }
  header.site { padding-bottom: 1.9rem; }
  .facts { gap: .1rem .8rem; font-size: var(--md-sys-typescale-body-small); }
  .facts .fact { white-space: normal; }   /* whole facts move to the next line first; only a fact wider than the screen (very large text) wraps inside */
}
/* Very narrow header or large text: first the Menu button keeps only its
   icon (its name stays for screen readers), then the wordmark gives way to
   the logo. Container queries in rem follow the header width and text size. */
.nav { container: nav / inline-size; }
/* v22: when the bar is too narrow for wordmark + tagline beside the language
   switch, the tagline takes a second line, starting under the wordmark, and
   the three parts of the bar keep one row (brand | languages | links).
   The query is on the header band (a container cannot restyle itself, and
   the bar is one), in rem, so it follows the width and the text size. */
header.site { container: site-header / inline-size; }
@container site-header (max-width: 60rem) {
  .brand-wrap { display: contents; }
  .brand-tag { grid-column: 1 / -1; grid-row: 2; margin: -.45rem 0 0; padding-left: calc(34px + .6rem); white-space: normal; font-size: var(--md-sys-typescale-body-medium); }
  .brand-dash { display: none; }
}
@media (min-width: 40.0625em) and (min-height: 31.3125em) {
  @container site-header (max-width: 60rem) { .nav { grid-template-columns: auto 1fr auto; } }
  /* Enlarged text set by the page or the user's style (not by the browser's
     default size, which the em queries follow): the wide bar stacks rather
     than running past the window (QA-RC1-01). Never reached at default size. */
  @container site-header (max-width: 34rem) {
    .nav { grid-template-columns: minmax(0, 1fr); justify-items: start; }
    .nav .lang-compact, .nav .nav-links { justify-self: start; }
    .nav-links { justify-content: flex-start; }
    .brand-tag { padding-left: 0; }
  }
}
@container nav (max-width: 17.5rem) {
  .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
/* The listing-form button keeps only its symbol where the bar is tight
   (a narrow window, or enlarged text): the word would cost a row or push the
   bar wider than the window. Its full name stays as accessible name and tooltip. */
@container site-header (max-width: 46rem) {
  .nav-links:not(.open) .cta .cta-short > [data-i18n] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
/* The wordmark gives way to the logo as soon as its own column is too narrow
   for logo + name (34 px logo + gap + about 4.75 rem of text), whatever the
   text size or the language selector's width. */
@container brand (max-width: calc(4.75rem + 34px)) { .brand-name { display: none; } }
/* Logo square and active language stay white on the header in both palettes. */
.brand .logo { background: var(--fl-color-on-header); color: var(--fl-color-logo-mark); }

/* ---- Search form ----
   Wide screens: all five fields in the grid; the "More filters" group is
   transparent to the grid and its toggle is hidden.
   Small screens: one full-width column. Device and Location first; Brand,
   Service and Shop name behind "More filters" (count of active ones shown). */
/* v23 RC2: the disclosure is used at every size (the dual pane too), so the
   first results are on the first screen; the toggle names the filters in use. */
.search-grid .more-toggle-field { display: flex; grid-column: 1 / -1; }
.more-filters { display: contents; }
.search-grid .more-filters[hidden] { display: none; }
.more-toggle {
  display: flex; align-items: center; gap: var(--fl-space-2); width: 100%; min-height: var(--fl-touch-target);
  padding: 0 var(--fl-space-3) 0 var(--fl-space-4); font: inherit; font-weight: var(--md-sys-typescale-weight-bold);
  font-size: var(--md-sys-typescale-label-large); color: var(--md-sys-color-primary); text-align: left;
  background: transparent; border: 1px solid var(--md-sys-color-outline);   /* same boundary as the fields around it */
  border-radius: var(--md-sys-shape-corner-small); cursor: pointer;
}
.more-toggle:hover { background: var(--md-sys-color-surface-container); }
.more-count:not(:empty) {
  padding: .1rem .55rem; border-radius: var(--md-sys-shape-corner-full); font-size: var(--md-sys-typescale-body-small);
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
}
.more-chevron { margin-left: auto; flex: 0 0 auto; transition: transform .18s ease-out; }
.more-toggle[aria-expanded="true"] .more-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .more-chevron { transition: none; } }
@media (max-width: 600px) {
  .panel h2 { margin-bottom: var(--fl-space-3); }
  .search-grid { grid-template-columns: minmax(0, 1fr); gap: var(--fl-space-3); }
  .search-grid .more-toggle-field { display: flex; }
  .search-grid .more-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fl-space-3); }
  .search-grid .more-filters[hidden] { display: none; }
  .search-grid .search-actions .btn { flex: 1 1 0; }
  /* Hints stay available to screen readers (aria-describedby) and appear
     visually while the field is in use. */
  .search-grid .loc-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .search-grid .combo input.combo-input, .search-grid input { text-overflow: ellipsis; }
}
/* "Not listed?" helper: only shown while a device or brand filter is active. */
.notlisted.is-empty { display: none; }

/* ---- Map: legend, touch mode ---- */
.touch-only { display: none; }
.touch-ui .touch-only { display: inline; }
.touch-block { display: none; }
.touch-ui .touch-block { display: block; }
.map-move-ctl.leaflet-control { margin: var(--fl-space-2); }
.map-move-btn {
  display: inline-flex; align-items: center; gap: .35rem; min-height: var(--fl-touch-target); padding: 0 var(--fl-space-4);
  font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  background: var(--fl-color-map-control); color: var(--md-sys-color-primary); border: 1.5px solid var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-corner-full); box-shadow: var(--md-sys-elevation-level1); cursor: pointer;
}
.map-move-btn.is-on { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.map-active { outline: 3px solid var(--md-sys-color-primary); outline-offset: -3px; }
@media (max-width: 600px) {
  #repairMap, .pick-map { height: min(320px, 46vh); }
  .map-bar { font-size: .8rem; }
}

/* ---- Live results line under the map ---- */
.results-bar {
  display: flex; align-items: flex-start; gap: var(--fl-space-3); margin: var(--fl-space-3) 0 var(--fl-space-4);
  padding: var(--fl-space-3) var(--fl-space-4); border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-secondary-container);
}
.results-arrow { font-weight: var(--md-sys-typescale-weight-heavy); color: var(--md-sys-color-primary); font-size: 1.15rem; line-height: 1.4; }
.results-text { min-width: 0; }
.results-bar .result-meta { margin: 0; color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-body-large); font-weight: var(--md-sys-typescale-weight-bold); }
.results-live { margin: .1rem 0 0; font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.results-bar .linklike { font-size: inherit; }
@keyframes fl-results-flash { from { background: var(--fl-color-live-flash); } to { background: var(--md-sys-color-secondary-container); } }
.results-bar.flash { animation: fl-results-flash 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .results-bar.flash { animation: none; } }

/* ---- Footer: compact, every link kept ---- */
@media (max-width: 600px) {
  main { padding-bottom: var(--fl-space-6); }
  footer.site { padding: 2.6rem var(--fl-space-4) var(--fl-space-5); margin-top: 2.4rem; }
  .footer-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--fl-space-3); margin: var(--fl-space-3) 0 0; text-align: left; }
  .footer-nav a { line-height: 1.25; align-items: flex-start; padding-top: .55rem; overflow-wrap: break-word; hyphens: auto; }   /* only matters when one word is wider than its column (very large text) */
  .footer-nav .ico { margin-top: .05em; }
  .footer-id { justify-content: flex-start; text-align: left; }
  .footer-shops { justify-content: flex-start; text-align: left; }
  .footer-shops .btn-onheader { flex: 1 1 100%; }
  .facts { justify-content: flex-start; }
}

/* ---- Leaflet controls and popups follow the palette (tiles stay light) ---- */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); }
.leaflet-bar a, .leaflet-bar a:hover { background-color: var(--fl-color-map-control); color: var(--fl-color-on-map-control); border-bottom-color: var(--md-sys-color-outline-variant); }
/* v23 RC2: map zoom buttons meet the project's 48 px target (QA). */
.leaflet-bar a, .leaflet-touch .leaflet-bar a { width: var(--fl-touch-target); height: var(--fl-touch-target); line-height: var(--fl-touch-target); }
.leaflet-bar a.leaflet-disabled { background-color: var(--md-sys-color-surface-container); color: var(--fl-color-disabled); }
.leaflet-container .leaflet-control-attribution { background: var(--fl-color-map-attribution); color: var(--fl-color-on-map-control); }
.leaflet-container .leaflet-control-attribution a { color: var(--md-sys-color-primary); }
/* v20: Leaflet's standard compact attribution size, so it keeps to one line on phones. */
.leaflet-container .leaflet-control-attribution { font-size: .75rem; line-height: 1.4; }
.leaflet-container a.leaflet-popup-close-button { color: var(--md-sys-color-on-surface-variant); }

/* Recycle/Gift: the kind of place is repeated as a tag on every card (colour is never the only signal). */
.tag.tag-type { background: var(--fl-color-info-container); color: var(--fl-color-on-info-container); border-color: var(--fl-color-info-outline); }
.detail-note { margin: .4rem 0 .2rem; font-size: var(--md-sys-typescale-body-medium); line-height: 1.5; }
.gift-before { margin-top: var(--fl-space-4); }
.pick-filter { margin: 0; }
.pick-filter label { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-body-medium); line-height: 1.45; }
.pick-filter input { width: 18px; height: 18px; min-height: 0; margin-top: .2rem; flex: none; accent-color: var(--md-sys-color-primary); }
.pick-filter .count { color: var(--md-sys-color-on-surface-variant); }
.cafes-box { margin: var(--fl-space-5) 0 0; }
.pill-sm { min-height: 32px; padding: 0 var(--fl-space-3); font-size: var(--md-sys-typescale-body-small); }


/* =====================================================================
   v23 — RESULTS-FIRST LAYOUT
   Two modes, set by app.js on <body data-layout> from one media query
   ((min-width: 49.5em) and (min-height: 30em) = "dual"; else "focused"):
   - dual: header with the three destinations (sticky), list pane with
     filters and results on the left, the map beside it (sticky, full height);
   - focused: the header scrolls away, the destinations are a bottom
     navigation bar, the results toolbar is sticky (two persistent bars at
     most), and List | Map switches the map into its own view.
   ===================================================================== */
/* ---- Destinations: one tablist, in the header ---- */
header.site { padding-bottom: 0; }
main { margin-top: 0; padding-top: var(--fl-space-4); }
header.site .tabs-wrap { max-width: var(--fl-content-max); margin: 0 auto; padding: 0 var(--fl-space-5) var(--fl-space-3); display: flex; justify-content: flex-start; }
header.site .tabs { margin: 0; box-shadow: none; border-color: transparent; display: inline-flex; flex-wrap: nowrap; }
.tab-btn { display: inline-flex; align-items: center; gap: var(--fl-space-2); padding: 0 var(--fl-space-5); min-height: var(--fl-touch-target); }
.tab-ico { display: inline-flex; flex: none; }
.tab-ico svg { width: 1.25rem; height: 1.25rem; }

/* ---- Section head, honesty line ---- */
.panel-head h2 { margin: 0; }
.panel-lead { margin: var(--fl-space-1) 0 var(--fl-space-4); color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); max-width: 68ch; }
.honest-line { margin: 0 0 var(--fl-space-4); font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }

/* ---- Results toolbar: count, Reset, List | Map (one row; sticky on phones).
   Below it, not sticky: the order sentence, the order select, "Also show…". ---- */
.results-bar { flex-direction: column; align-items: stretch; gap: 0; padding: var(--fl-space-1) var(--fl-space-1) var(--fl-space-1) var(--fl-space-3); margin: var(--fl-space-4) 0 var(--fl-space-2); }
.results-row { display: flex; align-items: center; gap: var(--fl-space-2); flex-wrap: wrap; }
.results-bar .result-meta { flex: 1 1 0; min-width: 3.5rem; overflow-wrap: break-word; hyphens: manual; line-height: 1.25; }   /* RC3: wraps between words, never inside one */
.results-row .reset-btn { order: 1; }
.results-row .view-switch { order: 2; }
.results-sub { display: flow-root; margin: 0 0 var(--fl-space-3); }
/* v23 RC2: the order select floats right and the sentence flows around it,
   then takes the full width (fewer lines on phones, nothing clipped). */
.results-sub .order-ctl { float: right; margin: 0 0 var(--fl-space-1) var(--fl-space-3); }
.results-sub .widen { clear: both; padding-top: var(--fl-space-2); }
.order-note { margin: 0; padding-top: var(--fl-space-1); font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); line-height: 1.35; }
.order-note:focus { outline: none; }

.order-ctl select {
  min-height: var(--fl-touch-target); font: inherit; font-size: var(--md-sys-typescale-label-large); font-weight: var(--md-sys-typescale-weight-bold);
  color: var(--md-sys-color-primary); background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); padding: 0 var(--fl-space-3); cursor: pointer; max-width: 12rem;
}
.results-sub.no-point { margin: 0; }
.results-sub.no-point .order-ctl { display: none; }
/* RC5.1: no place, the basis sentence stays visible ("In alphabetical order."), so the row keeps its shape. */
.result-meta[data-order]::after { content: " · " attr(data-order); color: var(--md-sys-color-on-surface-variant); font-weight: var(--md-sys-typescale-weight-regular, 400); }
.reset-btn { min-height: var(--fl-touch-target); flex: none; }
.view-switch { display: none; flex: none; padding: 2px; border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-surface-container-lowest); }
.view-btn {
  display: inline-flex; align-items: center; gap: var(--fl-space-1); min-height: calc(var(--fl-touch-target) - 6px); min-width: var(--fl-touch-target);
  padding: 0 var(--fl-space-3); border: none; border-radius: var(--md-sys-shape-corner-full); background: transparent;
  color: var(--md-sys-color-primary); font: inherit; font-size: var(--md-sys-typescale-label-large); font-weight: var(--md-sys-typescale-weight-bold); cursor: pointer;
}
.view-btn[aria-pressed="true"] { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.widen { margin: 0; }
.widen-btn { color: var(--md-sys-color-primary); border-color: var(--md-sys-color-outline); background: var(--md-sys-color-surface-container-lowest); min-height: var(--fl-touch-target); white-space: normal; text-align: left; }
/* v23 RC3: distance / approximate position is secondary to the place:
   regular weight, secondary colour, after a middot. */
.card .loc { column-gap: .4rem; }
/* RC3: a tighter rhythm name → place · distance → tags → actions (hit areas unchanged). */
.card { gap: .45rem; }
.card > :nth-last-child(2) { margin-bottom: var(--fl-space-1); }
.card .dist { color: var(--md-sys-color-on-surface-variant); font-weight: var(--md-sys-typescale-weight-regular, 400); white-space: nowrap; }
/* The middot ends the place line (no-break space before it), so a long
   distance wraps after the dot, never with a dot leading the next line. */
.card .loc { display: block; }
.card .dist-sep { color: var(--md-sys-color-on-surface-variant); font-weight: var(--md-sys-typescale-weight-regular, 400); }
.card .dist.dist-long { white-space: normal; }

/* ---- Map pane ---- */
.pane-map .map-wrap { margin: 0; }
.panel[data-route]:not([data-route="reuse"]) .pane-map { display: none; }

/* ================= focused mode (phones, small or short windows) ================= */
body[data-layout="focused"] { padding-bottom: var(--fl-nav-live, calc(var(--fl-nav-h) + env(safe-area-inset-bottom, 0px))); }
body[data-layout="focused"] header.site .tabs-wrap {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; margin: 0; padding: 0 0 env(safe-area-inset-bottom, 0px);
  background: var(--md-sys-color-surface-container-lowest); border-top: 1px solid var(--md-sys-color-outline-variant); box-shadow: var(--md-sys-elevation-level2);
  display: block; max-width: none;
}
body[data-layout="focused"] header.site .tabs { display: flex; width: 100%; border: none; border-radius: 0; padding: 0; gap: 0; background: transparent; }
body[data-layout="focused"] .tab-btn {
  flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; min-height: var(--fl-nav-h);
  padding: var(--fl-space-1) 2px; border-radius: 0; background: transparent; color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium); line-height: 1.15; text-align: center; white-space: normal; overflow-wrap: anywhere; hyphens: auto;
}
body[data-layout="focused"] .tab-btn .tab-ico { padding: 2px var(--fl-space-4); border-radius: var(--md-sys-shape-corner-full); }
body[data-layout="focused"] .tab-btn .tab-ico svg { width: 1.375rem; height: 1.375rem; }
body[data-layout="focused"] .tab-btn[aria-selected="true"] { background: transparent; color: var(--md-sys-color-primary); font-weight: var(--md-sys-typescale-weight-heavy); }
body[data-layout="focused"] .tab-btn[aria-selected="true"] .tab-ico { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
body[data-layout="focused"] .tab-btn:hover[aria-selected="false"] { background: var(--md-sys-color-surface-container); }
body[data-layout="focused"] .tab-btn:focus-visible { outline-offset: -3px; }
body[data-layout="focused"] .view-switch { display: inline-flex; }
body[data-layout="focused"] main { padding: var(--fl-space-3) var(--fl-space-3) var(--fl-space-6); }
body[data-layout="focused"] .panel { padding: var(--fl-space-4) var(--fl-space-4) var(--fl-space-5); }
/* The results toolbar is the second (and last) persistent bar. */
body[data-layout="focused"] .results-bar { position: sticky; top: 0; z-index: 900; margin-left: calc(-1 * var(--fl-space-2)); margin-right: calc(-1 * var(--fl-space-2)); box-shadow: 0 1px 0 var(--md-sys-color-outline-variant); }
/* List only: no map in the page (and no tile requests: the map is created when first shown). */
body[data-layout="focused"] .panel[data-view="list"] .pane-map { display: none; }
/* Map view: toolbar + map fill the screen above the bottom bar; nothing else scrolls. */
body.map-view footer.site, body.map-view .skip-link { display: none; }
body.map-view main { padding: 0; }
body.map-view .panel { padding: 0; border-radius: 0; box-shadow: none; }
body.map-view .panel[data-view="map"] .pane-list > :not(.results-bar):not(#recReuse):not(.pane-map),
body.map-view .panel[data-view="map"] #recReuse > :not(.results-bar):not(.pane-map) { display: none; }
body.map-view .panel[data-view="map"] .results-bar { margin: 0; border-radius: 0; top: 0; padding-left: var(--fl-space-4); }
body.map-view .panel[data-view="map"] .map-wrap { height: var(--mapview-h, 60vh); display: flex; flex-direction: column; border: none; border-radius: 0; }
body.map-view .panel[data-view="map"] .map-wrap > #repairMap, body.map-view .panel[data-view="map"] .map-wrap > .pick-map { flex: 1 1 auto; height: auto; min-height: 0; }
body.map-view .map-legend.touch-block, body.map-view .map-move-ctl { display: none; }
body.map-view .map-bar .map-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
body.map-view .map-bar:not(:has(.map-count:not(:empty))) { display: none; }
/* v23 RC2 (reviewer): beside the list, a "Map" bar with nothing else in it adds nothing; the map keeps its region name. */
body[data-layout="dual"] .map-bar:not(:has(.map-count:not(:empty))) { display: none; }
/* v23 RC2 (first screen of Pass on): on phones Location and Condition share
   a row; every other field keeps the full width. DOM and visual order match. */
@media (min-width: 22.5em) and (max-width: 37.5em) {
  #recycleForm.search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #recycleForm > .field, #recycleForm > .more-filters { grid-column: 1 / -1; }
  #recycleForm > .field:has(#rec-location), #recycleForm > .field:has(#rec-condition) { grid-column: auto; }
}
/* Short or narrow screens: the toolbar packs tighter. */
@media (max-width: 30em) {
  .results-bar .result-meta { font-size: var(--md-sys-typescale-body-medium); }
  .order-ctl select { max-width: 100%; padding: 0 var(--fl-space-2); }
  .view-btn { padding: 0 var(--fl-space-2); }
}
/* A narrow toolbar keeps one row: List | Map show their symbols only (names stay for screen readers). */
.results-bar { container: rbar / inline-size; }
/* RC4.1: the toolbar itself decides (app.js fitBars): labels while they fit
   on one row, then Reset as its symbol, then List | Both | Map as symbols. */

/* ================= dual mode (list beside the map) ================= */
body[data-layout="dual"] header.site { position: sticky; top: 0; z-index: 1000; }
body[data-layout="dual"] header.site .nav { padding-top: var(--fl-space-2); padding-bottom: var(--fl-space-2); }
body[data-layout="dual"] header.site .tabs-wrap { max-width: none; padding: 0 var(--fl-space-5) var(--fl-space-2); }
body[data-layout="dual"] header.site .nav { max-width: none; }
body[data-layout="dual"] main { max-width: none; padding: 0; }
body[data-layout="dual"] .panel:not(.hidden) {
  display: grid; grid-template-columns: var(--fl-list-w) minmax(0, 1fr); align-items: start;
  padding: 0; border-radius: 0; box-shadow: none; background: var(--md-sys-color-surface);
}
body[data-layout="dual"] .pane-list { padding: var(--fl-space-4) var(--fl-space-5) var(--fl-space-6); min-width: 0; background: var(--md-sys-color-surface-container-lowest); border-right: 1px solid var(--md-sys-color-outline-variant); min-height: calc(100dvh - var(--hdr-h, 7rem)); }
body[data-layout="dual"] .pane-map { position: sticky; top: var(--hdr-h, 7rem); height: calc(100dvh - var(--hdr-h, 7rem)); min-width: 0; }
body[data-layout="dual"] .pane-map .map-wrap { height: 100%; display: flex; flex-direction: column; border: none; border-radius: 0; }
body[data-layout="dual"] .pane-map .map-wrap > #repairMap, body[data-layout="dual"] .pane-map .map-wrap > .pick-map { flex: 1 1 auto; height: auto; min-height: 0; }
/* v23 RC2 (reviewer, P07): routes without places (Recycle, Not sure) have no
   map, so the list pane takes a readable centred column instead of leaving an
   empty map slot. */
body[data-layout="dual"] .panel[data-route]:not([data-route="reuse"]):not(.hidden) { grid-template-columns: minmax(0, 60rem); justify-content: center; background: var(--md-sys-color-surface-container-lowest); }
body[data-layout="dual"] .panel[data-route]:not([data-route="reuse"]) .pane-list { border-right: none; }
/* Filters: two columns inside the list pane; Brand, Service, Shop name behind "More filters". */
body[data-layout="dual"] .pane-list .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
/* v23 RC2 (first-screen density): the location hint shows while the field is
   in use, as on phones (it stays linked by aria-describedby); tighter rhythm. */
body[data-layout="dual"] .pane-list .search-grid .loc-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
body[data-layout="dual"] .pane-list .panel-lead { margin-bottom: var(--fl-space-3); }
body[data-layout="dual"] .pane-list .results-bar { margin-top: var(--fl-space-3); }
body[data-layout="dual"] .pane-list .search-grid .field-name, body[data-layout="dual"] .pane-list .search-grid .span-all { grid-column: 1 / -1; }
body[data-layout="dual"] .pane-list .cards, body[data-layout="dual"] .pane-list .pick-list { grid-template-columns: minmax(0, 1fr); }
body[data-layout="dual"] .results-bar { position: sticky; top: var(--hdr-h, 7rem); z-index: 900; }
body[data-layout="dual"] footer.site { margin-top: 0; }
/* v23 RC4: wide screens keep one card column (calmer) and give the extra width to the map. */
@media (min-width: 100em) {
  body[data-layout="dual"] { --fl-list-w: clamp(540px, 32%, 640px); }
}
/* About and Terms keep their reading width. */
body.doc-mode main { display: none; }

@media (prefers-reduced-motion: reduce) {
  .view-btn, .tab-btn { transition: none; }
}
/* A narrow list pane (tablets, enlarged text): the location field takes a whole row, so its example stays readable. */
body[data-layout="dual"] .pane-list { container: listpane / inline-size; }
@container listpane (max-width: 30rem) {
  .search-grid .field:has(.loc-hint) { grid-column: 1 / -1; }
  /* v23 RC3.1: in a narrow pane the top-level fields (Device, and in Pass on also
     What to do and Condition) stack full width too, instead of a half row beside
     an empty half; fields behind "More filters" are unchanged. */
  .search-grid > .field { grid-column: 1 / -1; }
}
@container listpane (max-width: 17rem) {
  .search-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
/* Parts & tools: the Repair Café / FabLab pointer under the heading. */
.lead-aside { margin: calc(-1 * var(--fl-space-2)) 0 var(--fl-space-4); font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.lead-aside .linklike, .panel-lead .linklike { min-height: var(--fl-touch-target); display: inline; padding: .7rem 0; }
#cafesH { scroll-margin-top: calc(var(--hdr-h, 0px) + 5rem); }
body[data-layout="focused"] #cafesH { scroll-margin-top: 5rem; }
/* v23: the collapsed "More filters" names the filters in use. */
.more-count.more-values { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--md-sys-typescale-weight-medium); }
/* QA-RC2 (320 px at 200 % text): the label keeps its natural width when there
   is room and wraps between words when there is not; the chevron stays inside. */
.more-toggle > [data-i18n="filters.more"] { flex: 0 1 auto; min-width: 0; overflow-wrap: break-word; }
.more-toggle { min-width: 0; max-width: 100%; }
/* v23: no match — what was searched, an honest sentence, one action per filter. */
.zero { padding: var(--fl-space-4); border: 1px dashed var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-medium); color: var(--md-sys-color-on-surface); }
.zero p { margin: 0 0 var(--fl-space-2); }
.zero-lead { font-weight: var(--md-sys-typescale-weight-bold); overflow-wrap: anywhere; }
.zero-honest { font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.zero-actions { display: flex; flex-wrap: wrap; gap: var(--fl-space-2); margin-top: var(--fl-space-3); }
.zero-actions .btn { white-space: normal; text-align: left; line-height: 1.25; padding-top: .3rem; padding-bottom: .3rem; }
.pick-list .pick-empty { grid-column: 1 / -1; }

/* v23 RC3: the group without a reliable position (listed last, A–Z) opens
   with a small labelled divider instead of a sentence above the list. */
.list-divider {
  display: flex; align-items: center; gap: var(--fl-space-2); margin: 0 0 var(--fl-space-2);
  font-size: var(--md-sys-typescale-label-medium); font-weight: var(--md-sys-typescale-weight-medium); color: var(--md-sys-color-on-surface-variant);
}
.list-divider::after { content: ""; flex: 1 1 2rem; border-top: 1px solid var(--md-sys-color-outline-variant); }
.cards > .list-divider { grid-column: 1 / -1; margin-bottom: calc(var(--fl-space-2) - var(--fl-space-4) - var(--fl-pill-h) / 2); }

/* =====================================================================
   v23 RC3 — wide header in one row: brand + tagline | the three
   destinations | languages, About, Add place (+ Install). app.js
   (fitHeader) moves the destination list into the bar, right after the
   brand, only when the window is wide (min-width: 64em) and the content
   fits; it tries the tagline beside the wordmark, then under it, then the
   destinations without their symbols, and otherwise keeps the two rows.
   DOM order = visual order in every arrangement. The destinations sit on
   the bar's lower edge as tabs with an indicator line.
   ===================================================================== */
body[data-layout] header.site.one-row .nav { grid-template-columns: auto minmax(0, 1fr) auto auto; padding-top: 0; padding-bottom: 0; column-gap: var(--fl-space-5); }
body[data-layout] header.site.one-row .nav > .brand-wrap { grid-column: 1; grid-row: 1; padding: var(--fl-space-2) 0; }
body[data-layout] header.site.one-row .nav > .tabs-wrap { grid-column: 2; grid-row: 1; align-self: stretch; display: flex; justify-content: center; margin: 0; padding: 0; max-width: none; min-width: 0; }
body[data-layout] header.site.one-row .nav > .lang-compact { grid-column: 3; grid-row: 1; }
body[data-layout] header.site.one-row .nav > .nav-links { grid-column: 4; grid-row: 1; flex-wrap: nowrap; }
body[data-layout] header.site.one-row .tabs { display: flex; flex-wrap: nowrap; align-items: stretch; gap: var(--fl-space-1); padding: 0; background: transparent; border: none; border-radius: 0; box-shadow: none; }
body[data-layout] header.site.one-row .tab-btn {
  position: relative; min-height: 4rem; padding: 0 var(--fl-space-3); border-radius: 0; white-space: nowrap;
  background: transparent; color: var(--fl-color-on-primary-soft); font-weight: var(--md-sys-typescale-weight-medium);
}
body[data-layout] header.site.one-row .tab-btn::after {
  content: ""; position: absolute; left: var(--fl-space-2); right: var(--fl-space-2); bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: transparent;
}
body[data-layout] header.site.one-row .tab-btn:hover[aria-selected="false"] { background: transparent; color: var(--fl-color-on-header); }
body[data-layout] header.site.one-row .tab-btn:hover[aria-selected="false"]::after { background: var(--fl-color-on-primary-faint); }
body[data-layout] header.site.one-row .tab-btn[aria-selected="true"] { background: transparent; color: var(--fl-color-on-header); font-weight: var(--md-sys-typescale-weight-heavy); }
body[data-layout] header.site.one-row .tab-btn[aria-selected="true"]::after { background: var(--fl-color-on-header); }
body[data-layout] header.site.one-row .tab-btn:focus-visible { outline-offset: -4px; }
/* Tier 2: the tagline under the wordmark (smaller). */
body[data-layout] header.site.one-row.hdr-stack .brand-wrap { flex-direction: column; align-items: flex-start; gap: 0; }
body[data-layout] header.site.one-row.hdr-stack .nav .brand { min-height: 2.5rem; }
body[data-layout] header.site.one-row.hdr-stack .brand-tag { margin: -.2rem 0 0; padding-left: calc(34px + .6rem); font-size: var(--md-sys-typescale-body-medium); }
body[data-layout] header.site.one-row.hdr-stack .brand-dash { display: none; }
/* Tier 3: destinations by name only (symbols hidden; names unchanged). */
body[data-layout] header.site.one-row.hdr-tight .tab-ico { display: none; }
@media (forced-colors: active) { body[data-layout] header.site.one-row .tab-btn[aria-selected="true"]::after { background: CanvasText; } }

/* v23 RC3: order sentence + honest line form one small-print block that
   flows around the order select; tighter steps above the first result. */
.results-sub .honest-line { margin: var(--fl-space-1) 0 0; line-height: 1.35; }
.results-sub.no-point { margin: 0 0 var(--fl-space-3); }
.results-sub.no-point .honest-line { margin-top: 0; }
.results-bar { margin-top: var(--fl-space-3); }
body[data-layout="focused"] .panel-lead { margin-bottom: var(--fl-space-3); }
.results-sub { margin-bottom: var(--fl-space-2); }
.order-note, .results-sub .honest-line { line-height: 1.3; }
/* RC3 (same class of defect as QA's 320 px / 200 % chevron): outlined link
   pills wrap their words instead of running past a narrow screen. */
.route-links li { min-width: 0; max-width: 100%; }
.route-links a { max-width: 100%; }
.route-links a > span { min-width: 0; overflow-wrap: break-word; }

/* =====================================================================
   v23 RC4 — calmer screens, list and map together on phones
   ===================================================================== */
.search-grid .loc-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
/* Dual pane, Repair and Parts: Device | Location | More filters in one row
   when the list pane has room; the opened filters take the row under it. */
@container listpane (min-width: 30.0625rem) {
  #repairForm.search-grid, #diyForm.search-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  #repairForm .more-toggle-field, #diyForm .more-toggle-field { grid-column: auto; align-self: end; }
  #repairForm .more-filters:not([hidden]), #diyForm .more-filters:not([hidden]) { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: inherit; }
  #repairForm .more-filters .field-name, #diyForm .more-filters .span-all { grid-column: 1 / -1; }
}
/* One results bar: count · order · (List | Both | Map on phones) · Reset. */
.results-row .order-ctl { flex: none; order: 0; }
.results-bar.no-point .order-ctl { display: none; }
/* Under it, one short line naming the basis of the order, and "About these results". */
.results-sub { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--fl-space-3); row-gap: 0; }
.results-sub .order-note { flex: 1 1 12rem; padding-top: 0; }
.results-sub .widen, .results-sub .about-results { flex: 1 1 100%; }
.results-sub .widen { padding-top: var(--fl-space-1); }
.about-btn {
  display: inline-flex; align-items: center; gap: var(--fl-space-1); min-height: var(--fl-touch-target); margin-left: auto; padding: 0 var(--fl-space-1);
  font: inherit; font-size: var(--md-sys-typescale-body-small); font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-primary);
  background: transparent; border: none; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: .2em;
}
.about-btn .more-chevron { margin-left: 0; }
.about-btn[aria-expanded="true"] .more-chevron { transform: rotate(180deg); }
.about-results { margin: 0 0 var(--fl-space-2); padding: var(--fl-space-2) var(--fl-space-3); border-left: 3px solid var(--md-sys-color-outline-variant); font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); line-height: 1.4; }
.about-results p { margin: 0; }
.about-results p + p { margin-top: var(--fl-space-1); }
.about-results[hidden] { display: none; }

/* The limit of the list, once at its end. */
.list-end-note { margin: var(--fl-space-4) 0 0; font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); line-height: 1.4; max-width: 68ch; }
.modal .sub-limit { margin-top: calc(-1 * var(--fl-space-1)); }
/* Selected entry (from its pin): a thicker frame and a bar on its leading edge, not colour alone. */
.card.card-active { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; box-shadow: inset 6px 0 0 var(--md-sys-color-primary); }
@media (forced-colors: active) { .card.card-active { outline-color: Highlight; } }

/* Phones: "Both" (default). The map follows the toolbar and stays under it. */
body[data-layout="focused"] .view-switch .view-btn { min-width: var(--fl-touch-target); }
body[data-layout="focused"] .map-legend.touch-block, body[data-layout="focused"] .map-move-ctl { display: none; }
body[data-split="stack"] .panel[data-view="split"] .pane-map {
  position: sticky; top: var(--fl-split-bar, 3.5rem); z-index: 850;
  margin: calc(-1 * var(--fl-space-2)) calc(-1 * var(--fl-space-2)) var(--fl-space-2);
  box-shadow: 0 1px 0 var(--md-sys-color-outline-variant);
}
body[data-split] .panel[data-view="split"] .map-wrap { height: var(--fl-split-h, 40vh); display: flex; flex-direction: column; border: none; border-radius: 0; }
body[data-split] .panel[data-view="split"] .map-wrap > #repairMap, body[data-split] .panel[data-view="split"] .map-wrap > .pick-map { flex: 1 1 auto; height: auto; min-height: 0; }
body[data-split] .panel[data-view="split"] .map-bar:not(:has(.map-count:not(:empty))) { display: none; }
body[data-split] .panel[data-view="split"] .map-bar .map-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
body[data-layout="focused"] .panel[data-view="split"] .card { scroll-margin-top: calc(var(--fl-split-top, 0px) + var(--fl-space-2)); scroll-margin-bottom: calc(var(--fl-nav-h) + var(--fl-space-2)); }
/* Landscape phones: list and map side by side, the map sticky on the right. */
body[data-split="side"] .panel:not(.hidden)[data-view="split"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--fl-space-4); align-items: start; }
body[data-split="side"] .panel[data-view="split"] .pane-map { position: sticky; top: 0; min-width: 0; }
body[data-split="side"] .panel[data-route]:not([data-route="reuse"])[data-view="split"] { display: block; }
/* Phones: the order select opens the order line (one toolbar row above the map). */
.results-sub .order-ctl { float: none; margin: 0; flex: none; }
/* RC4: the count never breaks inside a word; when the bar is too narrow,
   the controls take the next row instead. */
.results-bar .result-meta { min-width: min-content; max-width: 100%; }
/* Both, stacked: a failed-tiles note stays short so the map keeps its room. */
body[data-split="stack"] .panel[data-view="split"] .map-warn { font-size: var(--md-sys-typescale-body-small); line-height: 1.3; padding: var(--fl-space-1) var(--fl-space-2); }
body[data-split="stack"][data-split-loose] .panel[data-view="split"] .pane-map { position: relative; top: auto; }
/* RC4: each of List | Both | Map is a full 48 px target; the frame hugs them. */
body[data-layout="focused"] .view-switch { padding: 0; }
body[data-layout="focused"] .view-switch .view-btn { min-height: var(--fl-touch-target); }
/* RC4: a narrow list pane keeps count · order · Reset in one row. */
@container rbar (max-width: 26rem) {
  .results-row .order-ctl select { padding: 0 var(--fl-space-2); }
  .results-row .reset-btn { padding: 0 var(--fl-space-3); }
}
/* Both on short phones: the toolbar scrolls away, the map stays at the top. */
body[data-split="stack"][data-split-short] .panel[data-view="split"] .results-bar { position: relative; top: auto; }

/* =====================================================================
   v23 RC4.1 — fix round
   ===================================================================== */
/* Toolbar on one row where possible (classes set by app.js fitBars). */
.reset-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--fl-space-1); }
.reset-ico { display: block; flex: none; }   /* RC5.1: ↺ always shown */
.results-bar.bar-reset .reset-btn { min-width: var(--fl-touch-target); padding: 0; }
.results-bar.bar-reset .reset-ico { display: block; }
.results-bar.bar-reset .reset-btn > span,
.results-bar.bar-icons .view-btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.results-bar.bar-icons .view-btn { padding: 0 var(--fl-space-2); justify-content: center; }
/* RC4.1: in-between tier: labels stay visible, the switch packs tighter */
.results-bar.bar-tight .view-btn { padding: 0 var(--fl-space-2); gap: 2px; font-size: var(--md-sys-typescale-label-medium); }
.results-bar.bar-tight .view-btn svg { width: 18px; height: 18px; }
/* "1262 shops · A–Z": the order label never breaks inside. */
.result-meta[data-order]::after { display: inline-block; white-space: nowrap; content: "· " attr(data-order); margin-left: .3em; }
/* Phones: one order row — [Nearest first ▾] Straight-line from Lausanne (i). */
.ord-short, .about-ico { display: none; }
.panel.order-below .ord-long { display: none; }
.panel.order-below .ord-short { display: inline; }
.panel.order-below .results-sub { flex-wrap: wrap; column-gap: var(--fl-space-2); margin-bottom: var(--fl-space-1); }
.panel.order-below .results-sub .order-note { order: 0; flex: 1 1 5rem; min-width: 0; padding: 0; overflow-wrap: break-word; }
.panel.order-below .results-sub .order-ctl { min-width: 0; max-width: calc(100% - var(--fl-touch-target) - var(--fl-space-2)); }
.panel.order-below .results-sub .order-ctl select { max-width: min(11rem, 100%); width: auto; text-overflow: ellipsis; }
.panel.order-below .about-btn { min-width: var(--fl-touch-target); justify-content: center; padding: 0; margin-left: auto; }
.panel.order-below .about-btn .about-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.panel.order-below .about-btn .more-chevron { display: none; }
.panel.order-below .about-btn .about-ico { display: block; }
.panel.order-below .about-btn[aria-expanded="true"] .about-ico { color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); border-radius: 50%; }
/* No reference point: the (i) sits at the end of the row it shares with nothing else; keep it short. */
.panel.order-below .results-sub.no-point { margin: 0 0 var(--fl-space-1); }
/* Phones from 360 px: Device | Location side by side (Repair, Parts). */
@media (min-width: 22.5em) and (max-width: 37.5em) {
  #repairForm.search-grid, #diyForm.search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--fl-space-2); }
  #repairForm > .field, #diyForm > .field, #repairForm > .more-filters, #diyForm > .more-filters { grid-column: 1 / -1; }
  #repairForm > .field:has(.combo), #diyForm > .field:has(.combo), #repairForm > .field:has(.loc-hint), #diyForm > .field:has(.loc-hint) { grid-column: auto; }
  #repairForm .combo input.combo-input, #diyForm .combo input.combo-input { padding-left: var(--fl-space-2); }
  #repairForm input, #diyForm input { padding-left: var(--fl-space-2); }
  #repairForm > .field input::placeholder, #diyForm > .field input::placeholder { font-size: var(--md-sys-typescale-body-medium); }
}
body[data-layout="focused"] .panel-lead { margin-bottom: var(--fl-space-2); }
/* Dual pane 1024 px: Device | Location on one row in the list pane, too. */
@container listpane (min-width: 24rem) and (max-width: 30rem) {
  #repairForm > .field:has(.combo), #diyForm > .field:has(.combo), #repairForm > .field:has(.loc-hint), #diyForm > .field:has(.loc-hint) { grid-column: auto; }
}
/* Active filters named on "More filters" never squeeze Device and Location:
   the button takes its own row, and the names shorten with an ellipsis
   (the full text stays in the button's accessible name). */
@container listpane (min-width: 30.0625rem) {
  #repairForm.search-grid:has(.more-count.more-values), #diyForm.search-grid:has(.more-count.more-values) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #repairForm:has(.more-count.more-values) .more-toggle-field, #diyForm:has(.more-count.more-values) .more-toggle-field { grid-column: 1 / -1; }
  #repairForm.search-grid, #diyForm.search-grid { grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(0, auto); }
}
/* Header: the tagline steps back only when nothing else lets one row fit. */
body[data-layout] header.site.one-row.hdr-notag .brand-tag, body[data-layout] header.site.one-row.hdr-notag .brand-dash { display: none; }
body[data-layout] header.site.one-row.hdr-snug .nav { column-gap: var(--fl-space-3); }
body[data-layout] header.site.one-row.hdr-snug .tabs { gap: 0; }
body[data-layout] header.site.one-row.hdr-snug .tab-btn { padding-left: var(--fl-space-2); padding-right: var(--fl-space-2); }
/* Short landscape phones: a slimmer bottom bar (one-line labels). */
@media (max-height: 30em) and (orientation: landscape) {
  body[data-layout="focused"] .tabs-wrap .tab-btn { flex-direction: row; gap: var(--fl-space-2); min-height: var(--fl-touch-target); padding-top: 0; padding-bottom: 0; }
}

/* ---- RC4.2: the count in the results bar stays on one line ("1262 Werkstätten");
   if it cannot fit, fitBars makes it smaller (.meta-small); only a line wider than the whole row wraps (.meta-wrap). On phones the
   "· A–Z" suffix is not shown: the order stays stated in the ⓘ disclosure and the order description. */
.results-bar .result-meta { white-space: nowrap; }
.results-bar.bar-icons .results-row { column-gap: var(--fl-space-1); }
.results-bar.meta-small .result-meta { font-size: var(--md-sys-typescale-body-small); }
.results-bar.meta-wrap .result-meta { white-space: normal; flex: 1 1 100%; min-width: 0; }
@media (max-width: 37.5em) {
  .results-bar .result-meta[data-order]::after { content: none; }
}

/* =====================================================================
   v23 RC5 — owner's second review
   ===================================================================== */
/* ---- Header: brand | globe language pill | ☰ Menu pill, at every size.
   The destinations are one white segmented pill on the band's lower edge
   (v22 look): the band's green ends at the pill's middle (--fl-pill-half is
   set by app.js from the pill's real height). No bottom bar. ---- */
body[data-layout] header.site {
  background: linear-gradient(160deg, var(--fl-color-header-start) 0%, var(--fl-color-header-end) 100%) top left / 100% calc(100% - var(--fl-pill-half, 29px)) no-repeat, var(--md-sys-color-surface);
  padding-bottom: 0;
}
body[data-layout] header.site .nav { position: relative; grid-template-columns: minmax(0, 1fr) auto auto; padding-bottom: var(--fl-space-3); }
body[data-layout] .nav-compact { display: flex; flex: 0 0 auto; justify-self: end; }
body[data-layout] .nav .lang-compact { justify-self: end; }
.lang-pill { position: relative; display: inline-flex; align-items: center; border-radius: var(--md-sys-shape-corner-full); }
.lang-globe { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--fl-color-on-header); }
body[data-layout] .lang-pill .lang-select { padding: 0 var(--fl-space-3) 0 2.4rem; border-radius: var(--md-sys-shape-corner-full); max-width: none; }
body[data-layout] .menu-btn { border-radius: var(--md-sys-shape-corner-full); padding: 0 var(--fl-space-4); }
body[data-layout] .nav-links { display: none; }
body[data-layout] .nav-links.open {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  position: absolute; top: calc(100% - var(--fl-space-2)); right: var(--fl-space-3); left: auto; width: min(20rem, calc(100% - 2 * var(--fl-space-3))); z-index: 1200;
  background: var(--fl-color-header-end); border: 1px solid var(--fl-color-on-primary-faint);
  border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-2); box-shadow: var(--md-sys-elevation-level2);
}
/* All five Menu items share one style: symbol + name, a full-width row. */
body[data-layout] .nav-links.open .menu-item {
  display: flex; align-items: center; justify-content: flex-start; gap: var(--fl-space-3); width: 100%; min-height: var(--fl-touch-target);
  padding: 0 var(--fl-space-3); margin: 0; border: none; border-radius: var(--md-sys-shape-corner-small); background: transparent;
  color: var(--fl-color-on-header); font: inherit; font-size: var(--md-sys-typescale-label-large); font-weight: var(--md-sys-typescale-weight-bold);
  text-align: start; text-decoration: none; cursor: pointer; line-height: 1.25;
}
body[data-layout] .nav-links.open .menu-item.hidden { display: none !important; }
body[data-layout] .nav-links.open .menu-item:hover { background: color-mix(in srgb, var(--fl-color-on-header) 14%, transparent); color: var(--fl-color-on-header); }
.menu-item .ico-svg { width: 1.3rem; height: 1.3rem; flex: none; }
body[data-layout] header.site .tabs-wrap.dest-pill {
  position: static; display: flex; justify-content: center; max-width: var(--fl-content-max); margin: 0 auto; padding: 0 var(--fl-space-3);
  background: transparent; border: none; box-shadow: none;
}
body[data-layout] header.site .dest-pill .tabs {
  display: inline-flex; flex-wrap: nowrap; width: auto; max-width: 100%; gap: 2px; margin: 0; padding: 4px;
  background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-large); box-shadow: var(--md-sys-elevation-level1); overflow: visible;
}
body[data-layout] .dest-pill .tab-btn {
  flex: 0 1 auto; min-width: 0; flex-direction: row; justify-content: center; align-items: center; gap: var(--fl-space-2);
  min-height: var(--fl-touch-target); padding: var(--fl-space-1) var(--fl-space-5); border-radius: calc(var(--md-sys-shape-corner-extra-large) - 4px);
  background: transparent; color: var(--md-sys-color-primary); font-size: var(--md-sys-typescale-label-large); font-weight: var(--md-sys-typescale-weight-bold);
  line-height: 1.2; text-align: center; white-space: nowrap;
}
body[data-layout] .dest-pill .tab-btn::after { content: none; }
body[data-layout] .dest-pill .tab-btn .tab-ico { padding: 0; background: transparent; color: inherit; }
body[data-layout] .dest-pill .tab-btn .tab-ico svg { width: 1.25rem; height: 1.25rem; }
body[data-layout] .dest-pill .tab-btn[aria-selected="true"] { background: var(--md-sys-color-primary); color: var(--fl-color-on-primary-base); font-weight: var(--md-sys-typescale-weight-heavy); }
body[data-layout] .dest-pill .tab-btn[aria-selected="true"] .tab-ico { background: transparent; color: inherit; }
body[data-layout] .dest-pill .tab-btn:hover[aria-selected="false"] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-primary); }
body[data-layout] .dest-pill .tab-btn:focus-visible { outline: 3px solid var(--fl-color-focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--md-sys-color-surface-container-lowest); }
/* Narrower bands: the symbols step back first, then the three parts share the width by their length
   (RC5.1: EN/FR/IT stay on one line from 360 px; long labels such as DE may take two lines). */
@container site-header (max-width: 46rem) { body[data-layout] .dest-pill .tab-btn .tab-ico { display: none; } body[data-layout] .dest-pill .tab-btn { padding-left: var(--fl-space-4); padding-right: var(--fl-space-4); } }
@container site-header (max-width: 36rem) {
  body[data-layout] header.site .dest-pill .tabs { display: flex; width: 100%; }
  body[data-layout] .dest-pill .tab-btn { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: break-word; hyphens: manual; padding: var(--fl-space-1); font-size: var(--md-sys-typescale-label-medium); text-wrap: balance; }
}
/* RC5: very large text (about 200 % on a 320 px phone): the three segments stack so no word is cut. */
@container site-header (max-width: 18rem) {
  body[data-layout] header.site .dest-pill .tabs { flex-direction: column; }
  body[data-layout] .dest-pill .tab-btn { flex: none; width: 100%; }
}
body[data-layout="focused"] { padding-bottom: 0; }
@media (forced-colors: active) { body[data-layout] .dest-pill .tab-btn[aria-selected="true"] { outline: 2px solid CanvasText; } }

/* ---- Results bar: count and Reset as one centred group; the order line under it ---- */
.results-bar .results-row { justify-content: center; flex-wrap: nowrap; }
/* RC5.1: a fixed axis. The count has a reserved track (--fl-count-w, set by fitBars to its longest form) and is
   right-aligned in it; Reset sits after it, so Reset keeps its x when the count text changes. */
.results-group { display: grid; grid-template-columns: var(--fl-count-w, auto) auto; align-items: center; justify-content: center; column-gap: var(--fl-space-3); min-width: 0; max-width: 100%; position: relative; }
.results-bar .results-group .result-meta { min-width: 0; text-align: end; }
/* RC5.2: when both halves fit, the axis is the bar's centre: count ends just left of it, Reset starts just right of it. */
.results-bar.bar-center .results-group { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); justify-content: stretch; width: 100%; }
.results-bar.bar-center .results-group .reset-btn { justify-self: start; }
.results-bar.bar-stack .results-group { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: var(--fl-space-1); }
.results-bar.bar-stack .results-group .result-meta { text-align: center; }
.results-bar .result-meta[data-order]::after { content: none; }
.meta-probe { position: absolute; right: 100%; top: 0; visibility: hidden; white-space: nowrap; pointer-events: none; }
.results-bar .reset-btn { order: 0; }
/* Disabled Reset: same box, quieter, still legible (≥ 3:1 for the symbol). */
.reset-btn[aria-disabled="true"], .reset-btn[aria-disabled="true"]:hover { color: var(--md-sys-color-outline); border-color: var(--md-sys-color-outline-variant); background: transparent; cursor: not-allowed; }
.reset-btn[aria-disabled="true"]:active { transform: none; }
.view-switch { display: none !important; }

/* ---- Per-field clear (×) ---- */
.clear-wrap { position: relative; display: block; }
.clear-wrap > input, .clear-wrap > select { width: 100%; box-sizing: border-box; }
.clear-wrap.has-clear > input, .combo.has-clear > .combo-input { padding-right: calc(var(--fl-touch-target) + 2px); }
.combo.has-clear > .combo-caret { display: none; }
.field-clear {
  position: absolute; top: 0; bottom: 0; right: 0; width: var(--fl-touch-target); min-height: var(--fl-touch-target); margin: auto 0;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: var(--md-sys-shape-corner-full);
  background: transparent; color: var(--md-sys-color-on-surface-variant); cursor: pointer; z-index: 2;
}
.field-clear:hover { color: var(--md-sys-color-on-surface); background: var(--md-sys-color-surface-container); }
.field-clear[hidden], .more-chip[hidden], .more-chips[hidden] { display: none !important; }
.clear-select .field-clear { right: 1.9rem; }
.clear-select.has-clear > select { padding-right: calc(var(--fl-touch-target) + 1.9rem); }

/* ---- Closed "More filters": removable chips, "+N" when they do not fit ---- */
.more-chips { display: flex; flex-wrap: nowrap; gap: var(--fl-space-2); overflow: hidden; margin-top: var(--fl-space-2); padding: 2px; }
.more-chip {
  flex: none; max-width: min(15rem, 100%); display: inline-flex; align-items: center; gap: var(--fl-space-2); min-height: var(--fl-touch-target);
  padding: 0 var(--fl-space-3) 0 var(--fl-space-4); border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); font: inherit; font-size: var(--md-sys-typescale-label-large); cursor: pointer;
}
.more-chip-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.more-chip-x { font-size: 1.25em; line-height: 1; flex: none; }
.more-plus { padding: 0 var(--fl-space-4); font-weight: var(--md-sys-typescale-weight-bold); }

/* ---- Map Back (↶) under + and − ---- */
.map-back-ctl .map-back {
  width: var(--fl-touch-target); height: var(--fl-touch-target); display: grid; place-items: center; padding: 0; border: none; border-radius: inherit;
  background: var(--fl-color-map-control); color: var(--fl-color-on-map-control); cursor: pointer;
}
.map-back-ctl .map-back:hover { background: var(--md-sys-color-surface-container); }
.map-back-ctl .map-back[aria-disabled="true"] { background: var(--md-sys-color-surface-container); color: var(--md-sys-color-outline); cursor: not-allowed; }

/* ---- Info dialog: the facts in one flat shaded box, "Correct this listing" at its end ---- */
.info-box { margin: var(--fl-space-3) 0; padding: var(--fl-space-3) var(--fl-space-4); background: var(--md-sys-color-surface-container); border-radius: var(--md-sys-shape-corner-medium); box-shadow: none; }
.info-box > .detail-list:first-child { margin-top: 0; }
.info-box .detail-h { margin-top: var(--fl-space-4); }
.info-correct-row { margin: var(--fl-space-3) 0 0; padding-top: var(--fl-space-3); border-top: 1px solid var(--md-sys-color-outline-variant); }
.dlg-close-x > span[aria-hidden] { font-size: 1.2em; line-height: 1; }

/* ---- "Add place": the same pin-plus symbol everywhere ---- */
.add-place { display: inline-flex; align-items: center; gap: .4rem; }
.add-place .ico-svg { width: 1.25em; height: 1.25em; flex: none; }
.linklike.add-place { vertical-align: bottom; }

/* ---- Footer: two equal blocks, question over its button, centred ---- */
.cta-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: var(--fl-space-4); max-width: 46rem; margin: var(--fl-space-4) auto 0; padding: 0 var(--fl-space-4); }
/* RC5.1: the two blocks share two grid rows (question, button), so the buttons sit on one line whenever the blocks are side by side. */
.cta-block { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: var(--fl-space-2); justify-items: center; text-align: center; }
.cta-block p { margin: 0; line-height: 1.35; text-wrap: balance; align-self: end; }
.cta-block .btn { align-self: start; }
.cta-block .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: min(13rem, 100%); max-width: 100%; }
.cta-block .btn .ico-svg { width: 1.25em; height: 1.25em; flex: none; }

/* ---- Recycle route: the rule, then one line of official finders ---- */
.official-finders { display: flex; flex-wrap: wrap; align-items: center; column-gap: .35rem; row-gap: 0; margin: var(--fl-space-3) 0 0; font-size: var(--md-sys-typescale-body-medium); line-height: 1.4; }
.official-finders::before { content: ""; flex-basis: 100%; order: 1; }
.official-finders .finders-foen { order: 2; }
.official-finders .finders-pair { white-space: nowrap; }
.official-finders a { display: inline-block; min-height: var(--fl-touch-target); line-height: var(--fl-touch-target); font-weight: var(--md-sys-typescale-weight-bold); }

/* =====================================================================
   v24 (maintainer's review of 22 November 2026). Focused overrides, kept
   together here so they can be read and reverted as one block.
   ===================================================================== */

/* ---- Header on the compact (phone) bar: the logo alone on the first line,
   at the height of the language and Menu pills; the whole phrase
   "Flicken – Give your device a future" on the second line, starting at the
   logo's left edge. The wordmark never disappears. ---- */
.brand-tag-name { display: none; }
@media (max-width: 40em), (max-height: 31.25em) {
  .nav .brand .brand-text { display: none; }
  .brand .logo { width: var(--fl-touch-target); height: var(--fl-touch-target); border-radius: 12px; }
  .brand .logo svg { width: 32px; height: 32px; }
  .brand-wrap .brand-tag, header.site .brand-tag { padding-left: 0; margin: -.2rem 0 0; white-space: normal; text-wrap: pretty; }
  .brand-tag .brand-tag-name {
    display: inline; font-weight: var(--md-sys-typescale-weight-heavy); font-size: 1.2rem; letter-spacing: -.02em;
    color: var(--md-sys-color-on-primary); white-space: nowrap;
  }
  .brand-tag .brand-dash { display: inline; margin-left: .35em; }
  /* Language selector and Menu: the same type size as the destination names below them. */
  .lang-select, .menu-btn { font-size: .8125rem; }
  .lang-compact .lang-globe, .menu-btn svg { width: 18px; height: 18px; }
}
/* The narrowest phones (320 px): the phrase stays on one line in all four languages. */
@media (max-width: 22em) {
  header.site .brand-tag { font-size: .8125rem; }
  .brand-tag .brand-tag-name { font-size: 1.1rem; }
}

/* ---- Destinations on small screens: always two lines, in capitals, so the
   three names look the same in every language (same words as on wide screens;
   the fixed break is in i18n.js, "tab.*.2l"). ---- */
@container site-header (max-width: 36rem) {
  body[data-layout] .dest-pill .tab-btn { text-transform: uppercase; letter-spacing: .03em; font-size: .75rem; line-height: 1.2; padding: var(--fl-space-1) var(--fl-space-2); }
  body[data-layout] .dest-pill .tab-label .tl1, body[data-layout] .dest-pill .tab-label .tl2 { display: block; white-space: nowrap; }
}
@container site-header (max-width: 21.5rem) {
  body[data-layout] .dest-pill .tab-btn { letter-spacing: 0; font-size: .6875rem; padding-left: var(--fl-space-1); padding-right: var(--fl-space-1); }
}
/* Very large text: a part may wrap rather than leave its segment. */
@container site-header (max-width: 18rem) {
  body[data-layout] .dest-pill .tab-label .tl1, body[data-layout] .dest-pill .tab-label .tl2 { white-space: normal; }
}

/* ---- The section's name is already shown, selected, in the destinations:
   the heading stays for screen readers and keyboard focus, not on screen. ---- */
.panel-head { position: relative; }
.panel-head h2 { position: absolute; 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; }
.panel-lead { margin-top: 0; }

/* ---- Order line: only a distance basis is announced; without a place (A–Z)
   the line is not shown at all (no "In alphabetical order.", no ⓘ). ---- */
.results-sub.no-point, .panel.order-below .results-sub.no-point { display: none; }

/* ---- Cards: place beside the name where the card is wide enough, under it
   on narrow cards; the tags on one line. ---- */
.card .card-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .75rem; row-gap: .45rem; min-width: 0; }
.card .card-head h3 { flex: 0 1 auto; min-width: 0; }
.card .card-head .loc { flex: 0 1 auto; min-width: 0; }
@container card (max-width: 24rem) {
  .card .card-head { flex-direction: column; align-items: stretch; }
}
.card .tagrow { flex-wrap: nowrap; overflow: hidden; }
.card .tagrow .tag { flex: 0 0 auto; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .tagrow .tag[hidden] { display: none; }

/* ---- Pass on: What to do | Location | More filters, the same pattern as
   Device | Location | More filters in the other two sections. Device,
   Condition and What happens are behind "More filters". ---- */
.route-off .more-filters { display: none; }
/* Phones and a narrow list pane: What to do takes the first row (its options
   are longer than a postcode); Location and More filters share the second. */
@media (min-width: 22.5em) and (max-width: 37.5em) {
  #recycleForm.search-grid { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--fl-space-2); }
  #recycleForm > .more-toggle-field .more-toggle { white-space: nowrap; }
  #recycleForm > .field, #recycleForm > .more-filters { grid-column: 1 / -1; }
  #recycleForm > .field:has(#rec-location), #recycleForm > .more-toggle-field { grid-column: auto; align-self: end; }
  #recycleForm:has(.more-count.more-values) > .more-toggle-field { grid-column: 1 / -1; }
  #recycleForm input, #recycleForm .combo input.combo-input { padding-left: var(--fl-space-2); }
  #recycleForm > .field input::placeholder { font-size: var(--md-sys-typescale-body-medium); }
}
@container listpane (min-width: 24rem) and (max-width: 30rem) {
  #recycleForm.search-grid { grid-template-columns: minmax(0, 1fr) auto; }
  #recycleForm > .more-toggle-field .more-toggle { white-space: nowrap; }
  #recycleForm > .field, #recycleForm > .more-filters { grid-column: 1 / -1; }
  #recycleForm > .field:has(#rec-location), #recycleForm > .more-toggle-field { grid-column: auto; align-self: end; }
  #recycleForm:has(.more-count.more-values) > .more-toggle-field { grid-column: 1 / -1; }
}
@container listpane (min-width: 30.0625rem) {
  #recycleForm.search-grid { grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(0, auto); }
  #recycleForm > .field, #recycleForm > .more-filters { grid-column: auto; }
  #recycleForm .more-toggle-field { grid-column: auto; align-self: end; }
  #recycleForm .more-filters:not([hidden]) { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: inherit; }
  #recycleForm .more-filters .span-all { grid-column: 1 / -1; }
  #recycleForm.search-grid:has(.more-count.more-values) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #recycleForm:has(.more-count.more-values) .more-toggle-field { grid-column: 1 / -1; }
}
