/* =====================================================================
   Pacific Horizon Therapy — shared site shell, used by ALL 3 design options.
   One layout for the header, phone bottom tab bar + menu sheet, tablet side rail,
   desktop top nav, language switcher and footer. Markup is rendered by /js/app.js.

   Load it AFTER the option's own stylesheet, so the layout below always wins:
     <link rel="stylesheet" href="/css/styles.css">           A · Horizon
     <link rel="stylesheet" href="/serene/css/serene.css">    B · Serene
     <link rel="stylesheet" href="/compass/css/compass.css">  C · Compass
     <link rel="stylesheet" href="/css/shell.css">

   Options never restyle shell selectors. They only set the --sh-* skin tokens on :root
   (fonts, colours, CTA fill, footer surface). Defaults below are Option A's values.

   Breakpoints (same for every option):
     phone   < 700px    sticky header (logo · language · menu) + floating glass tab bar + menu sheet
     tablet  700–1099   fixed side rail on the left + floating language switcher top-right
     desktop ≥ 1100px   sticky top header (logo · centred links · language)
   ===================================================================== */

/* ---------- Skin tokens (zero specificity, so any option's :root overrides them) ---------- */
:where(:root) {
  --sh-font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --sh-ink: #1E293B;                       /* primary text */
  --sh-ink-2: #475569;                     /* inactive nav items, secondary text */
  --sh-line: rgba(30, 41, 59, .1);         /* hairlines */
  --sh-hover: rgba(28, 25, 23, .05);       /* hover wash on items */
  --sh-surface: #fbf8f4;                   /* menu sheet */
  --sh-bar-bg: rgba(255, 255, 255, .8);    /* header + rail (glass) */
  --sh-bar-border: rgba(231, 229, 228, .5);
  --sh-bar-solid: #fff;                    /* header + rail without backdrop-filter */
  --sh-chip-bg: rgba(28, 40, 54, .04);     /* language button at rest */
  --sh-chip-border: transparent;
  --sh-active-bg: #F6E6DC;                 /* current page: pill behind icon / row */
  --sh-active-ink: #8A4424;                /* current page: label */
  --sh-active-ring: rgba(194, 109, 71, .3);
  --sh-nav-active-bg: rgba(246, 230, 220, .8); /* desktop top nav: current page pill */
  --sh-nav-active-ink: #8A4424;
  --sh-cta-bg: #B05C38;                    /* "Book" item: icon pill fill */
  --sh-cta-hover: #9A4C2C;
  --sh-cta-ink: #fff;                      /* icon on the CTA fill */
  --sh-cta-label: #8A4424;                 /* "Book" label */
  --sh-cta-ring: rgba(194, 109, 71, .28);
  --sh-focus: #8A4424;
  --sh-edge-rgb: 250, 248, 245;            /* phone: tint of the blur under the tab bar */
  --sh-content: 1120px;                    /* max width of the language-suggestion bar */
  /* footer panel */
  --sh-foot-max: 1120px;                   /* panel width: line it up with the page's content column */
  --sh-foot-bg: rgba(255, 255, 255, .85);
  --sh-foot-border: rgba(231, 229, 228, .5);
  --sh-foot-ink: var(--sh-ink);
  --sh-foot-ink-2: var(--sh-ink-2);
  --sh-foot-link: var(--sh-active-ink);    /* "Verify with BCACC" */
  --sh-foot-link-hover: var(--sh-active-ink);
  --sh-foot-icon: #C26D47;
  --sh-foot-rule: rgba(214, 211, 209, .7);
  --sh-foot-logo-bg: transparent;
  --sh-foot-logo-pad: 0;
  /* emergency notice in the footer */
  --sh-alarm: #A63A2A;
  --sh-alarm-hover: #7F2A1E;
  --sh-alarm-bg: #FDF3EF;
  --sh-alarm-border: rgba(166, 58, 42, .3);
  --sh-alarm-text: var(--sh-foot-ink);
}

/* ---------- Layout tokens (owned by the shell; pages may read them for sticky offsets) ---------- */
:root {
  --top-h: 60px;      /* height of the sticky header at this breakpoint (0 on tablet: no header) */
  --header-h: 72px;   /* desktop header height */
  --rail-w: 96px;     /* tablet side rail width */
  --bottom-h: 80px;   /* phone: room the floating tab bar takes at the bottom (0 on tablet+) */
}
@media (min-width: 700px) { :root { --top-h: 0px; --bottom-h: 0px; } }
@media (min-width: 1100px) { :root { --top-h: var(--header-h); } }

html {
  scroll-padding-top: calc(var(--top-h) + 16px);
  scroll-padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom) + 16px);
}

@keyframes pht-pill-in { from { background-color: transparent; transform: scale(.82); } to { transform: none; } }
@keyframes pht-menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- Header (phone + desktop) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  height: 60px; padding: 0 var(--sh-header-inset, var(--gutter, 16px));
  background: var(--sh-bar-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sh-bar-border);
  font-family: var(--sh-font);
}
.site-header .brand { display: inline-flex; align-items: center; margin-right: auto; flex: none; }
.site-header .brand img { display: block; height: 38px; width: auto; max-width: none; }
.site-header .header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: none; }
.site-header .nav-links { display: none; }
.site-header .lbl-short { display: none; }
.menu-btn, .lang-hint-x {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--sh-ink); cursor: pointer;
  transition: background-color .18s ease-out;
}
.menu-btn:hover, .lang-hint-x:hover { background: rgba(255, 255, 255, .9); }
.menu-btn svg { display: block; width: 24px; height: 24px; }

/* ---------- Phone tab bar: iOS 26 "Liquid Glass" floating capsule ---------- */
.bottom-nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
  height: 64px; padding: 6px;
  border: 1px solid rgba(255, 255, 255, .6); border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .66) 0%, rgba(255, 255, 255, .42) 100%);
  -webkit-backdrop-filter: blur(24px) saturate(185%) brightness(1.04);
          backdrop-filter: blur(24px) saturate(185%) brightness(1.04);
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .08),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(255, 255, 255, .25),
    0 12px 32px -10px rgba(30, 20, 15, .3),
    0 2px 6px rgba(30, 20, 15, .08);
  font-family: var(--sh-font);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 100%; min-width: 0; border-radius: 26px;
  color: var(--sh-ink-2); text-decoration: none; font-size: 10.5px; font-weight: 500; letter-spacing: .01em; line-height: 1.1;
  transition: background-color .25s ease-out, box-shadow .25s ease-out, color .2s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a:hover { color: var(--sh-ink); }
.bottom-nav a:active { transform: scale(.96); }
.bottom-nav .ico { display: grid; place-items: center; width: 56px; height: 32px; border-radius: 999px; transition: background-color .2s ease-out, transform .15s ease-out; }
.bottom-nav a svg { display: block; width: 24px; height: 24px; }
/* current tab: a brighter glass "lens" around icon + label */
.bottom-nav a[aria-current="page"] {
  color: var(--sh-active-ink); font-weight: 700;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .7));
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .06), inset 0 1px 0 #fff, 0 2px 8px -2px rgba(30, 20, 15, .18);
}
.bottom-nav a.is-cta { color: var(--sh-cta-label); }
.bottom-nav a.is-cta .ico { background: var(--sh-cta-bg); color: var(--sh-cta-ink); }
.bottom-nav a.is-cta[aria-current="page"] .ico { background: var(--sh-cta-hover); box-shadow: 0 0 0 3px var(--sh-cta-ring); animation: pht-pill-in .25s ease-out; }

/* Scroll-edge effect under the tab bar: blur that strengthens toward the bottom + a soft tint fade */
@media (max-width: 699px) {
  body::after {
    content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; pointer-events: none;
    height: calc(130px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, rgba(var(--sh-edge-rgb), 0) 0%, rgba(var(--sh-edge-rgb), .35) 55%, rgba(var(--sh-edge-rgb), .6) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .6) 40%, #000 75%);
            mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .6) 40%, #000 75%);
  }
}

/* ---------- Phone menu: bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(20, 28, 38, .35); opacity: 0; pointer-events: none; transition: opacity .2s ease-out; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 86vh; overflow: auto;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  background: var(--sh-surface); color: var(--sh-ink); font-family: var(--sh-font);
  border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgba(20, 28, 38, .25);
  transform: translateY(105%); visibility: hidden;
  transition: transform .25s ease-out, visibility 0s linear .25s;
}
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(31, 43, 56, .2); margin: 0 auto 16px; }
body.sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
body.sheet-open .sheet { transform: none; visibility: visible; transition: transform .25s ease-out, visibility 0s; }
.sheet nav a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 12px; border-radius: 12px; color: var(--sh-ink); text-decoration: none; font-size: 1.0625rem; font-weight: 500; transition: background-color .18s ease-out; }
.sheet nav a:hover { background: var(--sh-hover); color: var(--sh-ink); }
.sheet nav a svg { display: block; flex: none; width: 22px; height: 22px; color: var(--sh-ink-2); }
.sheet nav a[aria-current="page"] { background: var(--sh-active-bg); color: var(--sh-active-ink); }
.sheet nav a[aria-current="page"] svg { color: var(--sh-active-ink); }
.sheet .sheet-lang { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--sh-line); }
.sheet .sheet-lang-h { margin: 0 0 8px 12px; font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sh-ink-2); }
.sheet .sheet-lang-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet .sheet-lang-list a {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); border: 1px solid var(--sh-line);
  color: var(--sh-ink); text-decoration: none; font-size: 1rem; font-weight: 500;
}
.sheet .sheet-lang-list a:hover { background: #fff; border-color: rgba(28, 40, 54, .2); color: var(--sh-ink); }
.sheet .sheet-lang-list a[aria-current="true"] { background: var(--sh-active-bg); border-color: var(--sh-active-ring); color: var(--sh-active-ink); }
.sheet .sheet-contact { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--sh-line); display: grid; gap: 8px; font-size: 1rem; }
.sheet .sheet-contact a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }

/* ---------- Tablet side rail (hidden elsewhere) ---------- */
.side-rail { display: none; }

/* ---------- Language switcher: flag + code button → flag + autonym menu ---------- */
.lang-flag { display: block; flex: none; width: 20px; height: 14px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(28, 40, 54, .18); }
.lang-switch { position: relative; flex: none; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 44px; min-height: 44px; margin: 0; padding: 0 10px 0 12px;
  border: 1px solid var(--sh-chip-border); border-radius: 999px;
  background: var(--sh-chip-bg); color: var(--sh-ink);
  font: 500 .9375rem/1 var(--sh-font); letter-spacing: .04em;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out;
}
.lang-btn:hover { background: rgba(255, 255, 255, .92); border-color: var(--sh-line); }
.lang-btn[aria-expanded="true"] { background: #fff; border-color: var(--sh-line); box-shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 4px 12px -6px rgba(28, 25, 23, .1); }
.lang-btn .chev { display: block; width: 16px; height: 16px; color: var(--sh-ink-2); transition: transform .2s ease-out; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-btn:focus-visible { outline: 3px solid var(--sh-focus); outline-offset: 2px; border-radius: 999px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70;
  min-width: 212px; margin: 0; padding: 6px; list-style: none;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--sh-bar-border); border-radius: 18px;
  box-shadow: 0 0 0 1px var(--sh-line), 0 2px 4px rgba(28, 25, 23, .04), 0 16px 32px -16px rgba(28, 25, 23, .18), 0 40px 72px -36px rgba(28, 25, 23, .26);
  font-family: var(--sh-font);
  transform-origin: top right; animation: pht-menu-in .16s ease-out;
}
.lang-menu li { margin: 0; padding: 0; }
.lang-menu li::before { content: none; }
.lang-menu a {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 12px; border-radius: 12px;
  color: var(--sh-ink); text-decoration: none; font-size: 1rem; font-weight: 500; white-space: nowrap;
  transition: background-color .15s ease-out;
}
.lang-menu a:hover { background: rgba(28, 40, 54, .06); color: var(--sh-ink); }
.lang-menu a:focus-visible { outline: 3px solid var(--sh-focus); outline-offset: -3px; border-radius: 12px; }
.lang-menu a[aria-checked="true"] { background: var(--sh-active-bg); color: var(--sh-active-ink); }
.lang-menu .check { display: block; width: 18px; height: 18px; margin-left: auto; color: var(--sh-active-ink); visibility: hidden; }
.lang-menu a[aria-checked="true"] .check { visibility: visible; }

/* tablet (no top header): the same switcher floats in the top-right corner */
.lang-float { display: none; }

/* "This site is available in Russian/Ukrainian" suggestion (English pages only) */
.lang-hint { padding: 12px var(--gutter, 16px) 0; font-family: var(--sh-font); }
.lang-hint-in {
  display: flex; align-items: center; gap: 12px;
  max-width: var(--sh-content); margin: 0 auto; padding: 4px 4px 4px 16px;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--sh-bar-border); border-radius: 999px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 4px 12px -6px rgba(28, 25, 23, .1);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 1rem; color: var(--sh-ink-2);
}
.lang-hint p { flex: 1; margin: 0; max-width: none; line-height: 1.35; }
.lang-hint-go { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
.lang-hint-x { flex: none; border-radius: 999px; color: var(--sh-ink-2); }
.lang-hint-x svg { display: block; width: 20px; height: 20px; }

/* ---------- Footer: one panel — brand/contact · pages · offices · emergency notice; copyright below ---------- */
.site-footer {
  padding: 32px var(--gutter, 16px) calc(var(--bottom-h) + 40px + env(safe-area-inset-bottom));
  color: var(--sh-foot-ink-2); font-family: var(--sh-font); font-size: .9375rem; line-height: 1.5;
}
.site-footer .container {
  display: grid; gap: 32px; grid-template-columns: 1fr;
  width: 100%; max-width: var(--sh-foot-max); margin-inline: auto;
  padding: clamp(24px, 3.5vw, 40px);
  background: var(--sh-foot-bg);
  border: 1px solid var(--sh-foot-border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, .05);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.site-footer .footer-col { min-width: 0; }
.site-footer .footer-logo { display: inline-block; min-height: 0; margin-bottom: 12px; padding: var(--sh-foot-logo-pad); border-radius: 14px; background: var(--sh-foot-logo-bg); }
.site-footer .footer-logo img { display: block; width: 168px; height: auto; }
.site-footer .tagline { margin: 0 0 12px; color: var(--sh-foot-ink-2); font-weight: 500; }
.site-footer h4 { margin: 0 0 8px; font-family: var(--sh-font); font-size: .8125rem; font-weight: 700; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; color: var(--sh-foot-ink-2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.site-footer li { margin: 0; padding: 0; }
.site-footer li::before { content: none; }
.site-footer p, .site-footer li { max-width: none; }
.site-footer .footer-offices { gap: 16px; }
.site-footer .footer-offices strong { color: var(--sh-foot-ink); font-weight: 500; }
.site-footer .footer-offices address { font-style: normal; }
.site-footer a { color: var(--sh-foot-ink-2); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.site-footer a:hover { color: var(--sh-foot-link-hover); text-decoration: underline; }
.site-footer a svg { display: block; width: 18px; height: 18px; flex: none; color: var(--sh-foot-icon); }
.site-footer nav.footer-col a { display: inline-block; min-height: 0; padding: 7px 0; line-height: 1.35; } /* wrapped RU/UK labels stay tidy; ≥ 32px targets */
.site-footer .footer-contact { display: grid; }
.site-footer .footer-contact a { overflow-wrap: anywhere; }
.site-footer .nowrap { white-space: nowrap; }
.site-footer .credential { font-size: .9375rem; margin: 12px 0 0; }
.site-footer .credential a { display: inline; min-height: 0; padding: 10px 0; color: var(--sh-foot-link); text-decoration: underline; } /* ≥ 24px target without breaking the line */
.site-footer .footer-base { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid var(--sh-foot-rule); font-size: .875rem; color: var(--sh-foot-ink-2); }
.site-footer .callout-emergency {
  position: relative; margin: 0;
  padding: 16px 16px 16px 20px; border-radius: 12px;
  background: var(--sh-alarm-bg); border: 1px solid var(--sh-alarm-border); box-shadow: inset 4px 0 0 var(--sh-alarm);
  color: var(--sh-alarm-text); font-size: .9375rem; line-height: 1.5;
}
.site-footer .callout-emergency .callout-h { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; color: var(--sh-alarm); font-weight: 700; font-size: 1rem; line-height: 1.45; }
.site-footer .callout-emergency .callout-h svg { display: block; width: 20px; height: 20px; flex: none; margin-top: 2px; }
.site-footer .callout-emergency ul { display: grid; gap: 4px; }
.site-footer .callout-emergency a { display: inline; min-height: 0; color: var(--sh-alarm); font-weight: 700; text-decoration: underline; }
.site-footer .callout-emergency a:hover { color: var(--sh-alarm-hover); }
@media (min-width: 700px) { .site-footer .container { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .site-footer .container { grid-template-columns: 1.25fr 1fr .9fr 1.3fr; } }

/* ---------- Tablet: 700–1099px → side rail ---------- */
@media (min-width: 700px) {
  .bottom-nav { display: none; }
  .site-footer { padding-bottom: 40px; }
  body { padding-left: var(--rail-w); }
  .site-header { display: none; }
  .side-rail {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; width: var(--rail-w);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 16px 8px;
    background: var(--sh-bar-bg);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-right: 1px solid var(--sh-bar-border);
    box-shadow: 8px 0 24px -22px rgba(28, 25, 23, .3);
    overflow-y: auto;
    font-family: var(--sh-font);
  }
  /* full logo, uncropped (842×317) on a small white tile */
  .side-rail .rail-logo { display: block; flex: none; width: 80px; margin-bottom: 16px; padding: 8px 6px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 4px 12px -6px rgba(28, 25, 23, .1); }
  .side-rail .rail-logo img { display: block; width: 100%; height: auto; aspect-ratio: 842 / 317; object-fit: contain; }
  .side-rail a.rail-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 56px; padding: 8px 2px; border-radius: 14px; color: var(--sh-ink-2); text-decoration: none; font-size: .78rem; font-weight: 500; text-align: center; line-height: 1.2; transition: color .2s ease-out; }
  .side-rail a.rail-item .ico { display: grid; place-items: center; width: 56px; height: 32px; border-radius: 999px; transition: background-color .2s ease-out, transform .15s ease-out; }
  .side-rail a.rail-item svg { display: block; width: 24px; height: 24px; }
  .side-rail a.rail-item:hover { color: var(--sh-ink); }
  .side-rail a.rail-item:hover .ico { background: var(--sh-hover); }
  .side-rail a.rail-item:active .ico { transform: scale(.94); }
  .side-rail a.rail-item[aria-current="page"] { color: var(--sh-active-ink); font-weight: 700; }
  .side-rail a.rail-item[aria-current="page"] .ico { background: var(--sh-active-bg); box-shadow: inset 0 0 0 1px var(--sh-active-ring); animation: pht-pill-in .25s ease-out; }
  .side-rail a.rail-item.is-cta { color: var(--sh-cta-label); }
  .side-rail a.rail-item.is-cta .ico { background: var(--sh-cta-bg); color: var(--sh-cta-ink); }
  .side-rail a.rail-item.is-cta:hover .ico { background: var(--sh-cta-hover); }
  .side-rail a.rail-item.is-cta[aria-current="page"] .ico { background: var(--sh-cta-hover); box-shadow: 0 0 0 3px var(--sh-cta-ring); }
  .side-rail .rail-spacer { flex: 1; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .lang-float { display: block; position: fixed; top: 12px; right: 16px; z-index: 55; }
  .lang-float .lang-btn {
    background: rgba(255, 255, 255, .92); border-color: var(--sh-bar-border);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 0 0 1px var(--sh-line), 0 1px 2px rgba(28, 25, 23, .05), 0 4px 12px -6px rgba(28, 25, 23, .1);
  }
  .lang-float .lang-btn:hover, .lang-float .lang-btn[aria-expanded="true"] { background: #fff; }
  .lang-hint { padding-right: calc(16px + 104px); } /* clear the floating switcher */
}

/* ---------- Desktop: ≥ 1100px → top header ---------- */
@media (min-width: 1100px) {
  body { padding-left: 0; }
  .side-rail { display: none; }
  .site-header { display: flex; height: var(--header-h); gap: 16px; }
  .site-header .menu-btn { display: none; }
  .site-header .brand img { height: 48px; }
  /* logo (left) · centred links · language (right): equal flexible sides keep the links centred */
  .site-header .brand { flex: 1 1 0; margin-right: 0; min-width: max-content; }
  .site-header .header-actions { flex: 1 1 0; min-width: max-content; }
  .site-header .nav-links { display: flex; flex: none; gap: 2px; list-style: none; margin: 0; padding: 0; }
  .site-header .nav-links li { margin: 0; padding: 0; }
  .site-header .nav-links li::before { content: none; }
  .site-header .nav-links a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--sh-ink-2); text-decoration: none; font-weight: 500; font-size: 1rem; white-space: nowrap; transition: background-color .2s ease-out, color .2s ease-out; }
  .site-header .nav-links a:hover { background: var(--sh-hover); color: var(--sh-ink); }
  .site-header .nav-links a[aria-current="page"] { background: var(--sh-nav-active-bg); color: var(--sh-nav-active-ink); }
  /* long languages (ru/uk): app.js adds these step by step until the row fits */
  .site-header.is-compact .nav-links a { padding: 0 12px; }
  .site-header.is-compact .nav-links .lbl-long { display: none; }
  .site-header.is-compact .nav-links .lbl-short { display: inline; }
  .site-header.is-tight .nav-links a { font-size: .9375rem; padding: 0 10px; }
}

/* ---------- No backdrop-filter, or less transparency requested → solid surfaces ---------- */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header, .side-rail { background: var(--sh-bar-solid); }
  .bottom-nav { background: rgba(255, 255, 255, .96); }
  body::after { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header, .side-rail { background: var(--sh-bar-solid); }
  .bottom-nav { background: #fff; }
  .site-header, .side-rail, .bottom-nav, .lang-menu, .lang-float .lang-btn, .lang-hint-in, .site-footer .container, body::after { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bottom-nav a, .bottom-nav .ico, .side-rail a.rail-item, .side-rail a.rail-item .ico, .sheet, .sheet-backdrop, .lang-menu { transition: none; animation: none; }
  .bottom-nav a:active { transform: none; }
}

@media print {
  .site-header, .side-rail, .bottom-nav, .sheet, .sheet-backdrop, .lang-float, .lang-switch, .lang-hint { display: none !important; }
  body { padding-left: 0 !important; }
  body::after { display: none !important; }
}
