/* Website appearance. Loaded after the editorial styles so existing light
   sections keep their palette while a dark preference changes semantic tokens.
   The original dark brand bands, photographs and footer retain their identity.
   Light mode is light and dark mode is dark: no section keeps the other
   palette. `ax-editorial-contrast` marks chapter bands that take a slightly
   different ground in dark mode so the page keeps its rhythm. */
:root {
  --ax-theme-scheme: light;
  --ax-theme-quote-bg: var(--ax-green-03);
  --ax-theme-quote-text: #f5f5f5;
  --ax-theme-quote-muted: #c5d4c9;
  --ax-theme-quote-accent: var(--ax-green-09);
  --ax-theme-paper: #fafaf7;
  --ax-theme-paper-alt: #eeefeb;
  --ax-theme-mist: #eeefeb;
  --ax-theme-sage: #e4ede5;
  --ax-theme-raised: #fff;
  --ax-theme-text: #141416;
  --ax-theme-text-2: #333a35;
  --ax-theme-muted: #4d574f;
  --ax-theme-dim: #5a625b;
  --ax-theme-border: #c9cfc9;
  --ax-theme-border-soft: #d8ddd6;
  --ax-theme-surface: rgb(18 40 25 / 3.5%);
  --ax-theme-surface-hover: rgb(18 40 25 / 6.5%);
  --ax-theme-surface-strong: rgb(18 40 25 / 10%);
  --ax-theme-link: #206f44;
  --ax-theme-link-hover: #14301e;
  --ax-theme-secondary: #996200;
  --ax-theme-danger: #a80000;
  --ax-theme-glass: rgb(250 250 247 / 75%);
  --ax-theme-glass-panel: rgb(250 250 247);
  --ax-theme-header-border: #d3d8d1;
  --ax-theme-logo-filter: invert(1);
  --ax-theme-logo-positive-display: block;
  --ax-theme-logo-negative-display: none;
  --ax-theme-map-filter: grayscale(1) contrast(0.92) brightness(1.04);
  --ax-theme-map-ground: #e0e0e0;
  --ax-theme-map-pin-border: #fff;
  --ax-theme-map-selected: #0a0a0c;
  --ax-theme-map-attribution: rgb(255 255 255 / 95%);
  --ax-theme-demo-bg: #f5f5f5;
  --ax-theme-demo-text: #0a0a0c;
  --ax-theme-demo-text-2: #19191b;
  --ax-theme-demo-muted: #5a5a5c;
  --ax-theme-demo-border: #c5c5c7;
  --ax-theme-demo-surface-hover: #e0e0e0;
  --ax-theme-demo-context: #e5fff0;
  --ax-theme-demo-notice: #fff7e5;
  --ax-theme-demo-confirmation-text: #373739;
  color-scheme: var(--ax-theme-scheme);
}

:root[data-ax-theme="dark"] {
  --ax-theme-scheme: dark;
  --ax-theme-quote-bg: color-mix(in srgb, var(--ax-theme-mist), var(--ax-theme-sage));
  --ax-theme-quote-text: var(--ax-theme-text);
  --ax-theme-quote-muted: var(--ax-theme-muted);
  --ax-theme-quote-accent: var(--ax-theme-link);
  --ax-theme-paper: var(--ax-gray-01);
  --ax-theme-paper-alt: var(--ax-gray-04);
  --ax-theme-mist: var(--ax-gray-03);
  --ax-theme-sage: var(--ax-gray-05);
  --ax-theme-raised: var(--ax-gray-03);
  --ax-theme-text: #f5f5f5;
  --ax-theme-text-2: var(--ax-gray-10);
  --ax-theme-muted: var(--ax-gray-09);
  --ax-theme-dim: var(--ax-gray-08);
  --ax-theme-border: var(--ax-gray-06);
  --ax-theme-border-soft: var(--ax-gray-05);
  --ax-theme-surface: rgb(255 255 255 / 5%);
  --ax-theme-surface-hover: rgb(255 255 255 / 8%);
  --ax-theme-surface-strong: rgb(255 255 255 / 12%);
  --ax-theme-link: #85ffb6;
  --ax-theme-link-hover: #b9ffd4;
  --ax-theme-secondary: #f6b45e;
  --ax-theme-danger: #ff9a9a;
  --ax-theme-glass: color-mix(in srgb, var(--ax-theme-paper) 85%, transparent);
  --ax-theme-glass-panel: var(--ax-theme-paper);
  --ax-theme-header-border: var(--ax-gray-05);
  --ax-theme-logo-filter: none;
  --ax-theme-logo-positive-display: none;
  --ax-theme-logo-negative-display: block;
  --ax-theme-map-filter: grayscale(1) invert(1) brightness(.85);
  --ax-theme-map-ground: var(--ax-gray-03);
  --ax-theme-map-pin-border: #85ffb6;
  --ax-theme-map-selected: #b9ffd4;
  --ax-theme-map-attribution: var(--ax-gray-03);
  --ax-theme-demo-bg: var(--ax-gray-02);
  --ax-theme-demo-text: #f5f5f5;
  --ax-theme-demo-text-2: var(--ax-gray-10);
  --ax-theme-demo-muted: var(--ax-gray-09);
  --ax-theme-demo-border: var(--ax-gray-06);
  --ax-theme-demo-surface-hover: var(--ax-gray-04);
  --ax-theme-demo-context: var(--ax-gray-03);
  --ax-theme-demo-notice: #392c19;
  --ax-theme-demo-confirmation-text: var(--ax-gray-10);
}

/* No-script / pre-hydration fallback. An explicit choice always wins. Keep
   these values aligned with the explicit dark palette above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-ax-theme]) {
    --ax-theme-scheme: dark;
    --ax-theme-quote-bg: color-mix(in srgb, var(--ax-theme-mist), var(--ax-theme-sage));
    --ax-theme-quote-text: var(--ax-theme-text);
    --ax-theme-quote-muted: var(--ax-theme-muted);
    --ax-theme-quote-accent: var(--ax-theme-link);
    --ax-theme-paper: var(--ax-gray-01);
    --ax-theme-paper-alt: var(--ax-gray-04);
    --ax-theme-mist: var(--ax-gray-03);
    --ax-theme-sage: var(--ax-gray-05);
    --ax-theme-raised: var(--ax-gray-03);
    --ax-theme-text: #f5f5f5;
    --ax-theme-text-2: var(--ax-gray-10);
    --ax-theme-muted: var(--ax-gray-09);
    --ax-theme-dim: var(--ax-gray-08);
    --ax-theme-border: var(--ax-gray-06);
    --ax-theme-border-soft: var(--ax-gray-05);
    --ax-theme-surface: rgb(255 255 255 / 5%);
    --ax-theme-surface-hover: rgb(255 255 255 / 8%);
    --ax-theme-surface-strong: rgb(255 255 255 / 12%);
    --ax-theme-link: #85ffb6;
    --ax-theme-link-hover: #b9ffd4;
    --ax-theme-secondary: #f6b45e;
    --ax-theme-danger: #ff9a9a;
    --ax-theme-glass: color-mix(in srgb, var(--ax-theme-paper) 85%, transparent);
    --ax-theme-glass-panel: var(--ax-theme-paper);
    --ax-theme-header-border: var(--ax-gray-05);
    --ax-theme-logo-filter: none;
    --ax-theme-logo-positive-display: none;
    --ax-theme-logo-negative-display: block;
    --ax-theme-map-filter: grayscale(1) invert(1) brightness(.85);
    --ax-theme-map-ground: var(--ax-gray-03);
    --ax-theme-map-pin-border: #85ffb6;
    --ax-theme-map-selected: #b9ffd4;
    --ax-theme-map-attribution: var(--ax-gray-03);
    --ax-theme-demo-bg: var(--ax-gray-02);
    --ax-theme-demo-text: #f5f5f5;
    --ax-theme-demo-text-2: var(--ax-gray-10);
    --ax-theme-demo-muted: var(--ax-gray-09);
    --ax-theme-demo-border: var(--ax-gray-06);
    --ax-theme-demo-surface-hover: var(--ax-gray-04);
    --ax-theme-demo-context: var(--ax-gray-03);
    --ax-theme-demo-notice: #392c19;
    --ax-theme-demo-confirmation-text: var(--ax-gray-10);
  }
}

.ax-editorial-page {
  --ax-editorial-paper: var(--ax-theme-paper);
  --ax-editorial-mist: var(--ax-theme-mist);
  --ax-editorial-sage: var(--ax-theme-sage);
}
.ax-editorial-band--paper.ax-editorial-contrast,
.ax-integrated-hero:has(+ .ax-editorial-band--ink) { background: var(--ax-theme-paper-alt); }

/* Cards on paper, mist and sage are raised surfaces: white in light mode and
   one step lighter than the band in dark mode, never a grey tint. */
:is(.ax-editorial-band--paper, .ax-editorial-band--mist, .ax-editorial-band--sage) .ax-card:not(.ax-card--flat, .ax-card--panel) {
  background: var(--ax-bg-raised);
}

.ax-editorial-band--paper,
.ax-editorial-band--mist,
.ax-editorial-band--sage,
.ax-editorial-light,
.ax-site-header {
  --ax-bg: var(--ax-theme-paper);
  --ax-bg-raised: var(--ax-theme-raised);
  --ax-text: var(--ax-theme-text);
  --ax-text-2: var(--ax-theme-text-2);
  --ax-text-muted: var(--ax-theme-muted);
  --ax-text-dim: var(--ax-theme-dim);
  --ax-border: var(--ax-theme-border);
  --ax-border-soft: var(--ax-theme-border-soft);
  --ax-surface: var(--ax-theme-surface);
  --ax-surface-hover: var(--ax-theme-surface-hover);
  --ax-surface-strong: var(--ax-theme-surface-strong);
  --ax-scrim: var(--ax-theme-raised);
  --ax-accent: var(--ax-theme-link);
  --ax-accent-hover: var(--ax-theme-link-hover);
  --ax-accent-2: var(--ax-theme-secondary);
  --ax-danger: var(--ax-theme-danger);
  --ax-logo-positive-display: var(--ax-theme-logo-positive-display);
  --ax-logo-negative-display: var(--ax-theme-logo-negative-display);
}

.ax-editorial-band--paper .ax-control,
.ax-editorial-band--mist .ax-control,
.ax-editorial-band--sage .ax-control,
.ax-editorial-light .ax-control,
.ax-demo-panel .ax-control {
  color-scheme: var(--ax-theme-scheme);
}

.ax-landing-segment-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px var(--ax-accent);
}

/* Frosted navigation. Explicitly cover the original video-hero override too.
   Keep panels almost opaque so moving film never competes with menu text. */
.ax-site-header { --ax-border: var(--ax-theme-header-border); }
.ax-site-header .ax-logo { filter: var(--ax-theme-logo-filter); }

.ax-site-header .ax-site-header__bar,
body:has(.ax-video-hero) .ax-site-header .ax-site-header__bar {
  background: var(--ax-theme-glass);
  border-bottom-color: var(--ax-theme-header-border);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
}

.ax-site-header .ax-site-panel,
.ax-site-header .ax-site-locale__panel {
  background: var(--ax-theme-glass-panel);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
}

.ax-site-header .ax-site-consumer { color: var(--ax-text-muted); }
.ax-site-header .ax-site-consumer:hover { color: var(--ax-accent); }
.ax-site-header .ax-site-panel__link:is(:hover, :focus-visible) {
  color: var(--ax-accent);
  background: var(--ax-theme-sage);
}
.ax-site-header :is(.ax-site-nav__trigger, .ax-site-nav__direct, .ax-site-locale__toggle, .ax-site-mobile__toggle):hover {
  color: var(--ax-accent);
}

.ax-theme-selector {
  padding: var(--ax-2);
}
:root:not([data-ax-theme]) .ax-theme-selector { display: none; }
.ax-theme-selector > .ax-label {
  margin: 0 0 var(--ax-1);
  padding-inline: 12px;
  color: var(--ax-text-muted);
}
.ax-theme-selector__options {
  display: grid;
  gap: 4px;
}
.ax-theme-selector__option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ax-text-2);
  text-align: left;
  font-size: 14px;
  line-height: 20px;
}
.ax-theme-selector__option .ax-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.ax-theme-selector__option:hover { background: var(--ax-surface-hover); }
.ax-theme-selector__option[aria-pressed="true"] {
  color: var(--ax-accent);
  background: var(--ax-theme-sage);
  box-shadow: inset 2px 0 var(--ax-accent);
}
.ax-theme-selector__option[aria-pressed="true"]::after {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: currentColor;
}

/* The enquiry panel has its own local palette. Preserve its current light
   version while avoiding bright form and confirmation islands in dark mode. */
.ax-demo-panel {
  --ax-bg: var(--ax-theme-demo-bg);
  --ax-bg-raised: var(--ax-theme-raised);
  --ax-text: var(--ax-theme-demo-text);
  --ax-text-2: var(--ax-theme-demo-text-2);
  --ax-text-muted: var(--ax-theme-demo-muted);
  --ax-text-dim: var(--ax-theme-demo-muted);
  --ax-border: var(--ax-theme-demo-border);
  --ax-surface: var(--ax-theme-raised);
  --ax-surface-hover: var(--ax-theme-demo-surface-hover);
  --ax-surface-strong: var(--ax-theme-demo-surface-hover);
  --ax-accent: var(--ax-theme-link);
  --ax-accent-hover: var(--ax-theme-link-hover);
  --ax-danger: var(--ax-theme-danger);
}
.ax-demo-context { background: var(--ax-theme-demo-context); border-left-color: var(--ax-theme-link); }
.ax-demo-preview__notice { background: var(--ax-theme-demo-notice); }
.ax-demo-confirmation { background: var(--ax-theme-demo-context); color: var(--ax-theme-demo-text); }
.ax-demo-confirmation .ax-small { color: var(--ax-theme-demo-confirmation-text); }
.ax-demo-panel .ax-btn:focus-visible,
.ax-demo-confirmation:focus-visible { outline-color: var(--ax-theme-link); }
.ax-demo-confirmation__mark { color: var(--ax-gray-01); }

/* Leaflet chrome uses website tokens; the filter is restricted to raster tiles.
   Pins, text, controls, logos, photographs and attribution are never inverted. */
.ax-location-map__frame,
.ax-location-map__canvas { background: var(--ax-theme-map-ground); }
.ax-location-map .leaflet-tile-pane { filter: var(--ax-theme-map-filter); }
.ax-location-map .leaflet-control-zoom.leaflet-bar a,
.ax-location-map .leaflet-popup-content-wrapper,
.ax-location-map .leaflet-popup-tip,
.ax-location-map__notice {
  color: var(--ax-theme-demo-text);
  background: var(--ax-theme-raised);
}
.ax-location-map .leaflet-control-zoom.leaflet-bar a:hover { background: var(--ax-theme-mist); }
.ax-location-map .leaflet-control-attribution {
  color: var(--ax-theme-text);
  background: var(--ax-theme-map-attribution);
}
.ax-location-map .leaflet-control-attribution a,
.ax-location-map .ax-location-map__popup-actions a,
.ax-location-map__sources a { color: var(--ax-theme-link); }
.ax-location-map .ax-location-map__popup-actions a:hover { color: var(--ax-theme-text); }
.ax-location-map .leaflet-container a.leaflet-popup-close-button,
.ax-location-map .ax-location-map__popup-entry h3 { color: var(--ax-theme-demo-text); }
.ax-location-map .ax-location-map__popup-entry p,
.ax-location-map .ax-location-map__popup-entry address,
.ax-location-map__sources { color: var(--ax-theme-demo-text-2); }
.ax-location-map__pin { border-color: var(--ax-theme-map-pin-border); }
.ax-location-map__marker--selected .ax-location-map__pin { outline-color: var(--ax-theme-map-selected); }
.ax-location-map a:focus-visible,
.ax-location-map button:focus-visible,
.ax-location-map summary:focus-visible,
.ax-location-map .ax-location-map__marker:focus-visible,
.ax-location-map__canvas:focus-visible { outline-color: var(--ax-theme-link); }
.ax-locations-map-loading { color: var(--ax-theme-link); }

/* Keep the shared menu and language controls comfortably spaced. */
@media (min-width: 961px) {
  :root:not([data-ax-theme]) .ax-site-mobile { display: none; }
}
@media (min-width: 961px) and (max-width: 1360px) {
  .ax-site-header .ax-site-consumer { display: none; }
  .ax-site-header .ax-site-header__bar { gap: 8px; padding-inline: 24px; }
}
@media (max-width: 480px) {
  .ax-site-header .ax-site-header__bar { gap: 4px; padding-inline: 12px; }
  .ax-site-header__demo { padding-inline: 8px; }
}
@media (max-width: 960px) {
  .ax-site-mobile__panel > .ax-theme-selector {
    border-top: var(--ax-hairline) solid var(--ax-border);
    padding-bottom: max(var(--ax-2), env(safe-area-inset-bottom));
  }
}

@supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
  .ax-site-header .ax-site-header__bar,
  body:has(.ax-video-hero) .ax-site-header .ax-site-header__bar,
  .ax-site-header .ax-site-panel,
  .ax-site-header .ax-site-locale__panel { background: var(--ax-theme-paper); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .ax-site-header .ax-site-header__bar,
  body:has(.ax-video-hero) .ax-site-header .ax-site-header__bar,
  .ax-site-header .ax-site-panel,
  .ax-site-header .ax-site-locale__panel {
    background: var(--ax-theme-paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Open menus do not cover the page: the click-outside layer stays transparent. */
.ax-site-header .ax-site-scrim { background: transparent; }

/* Approved graphite palette. Mint remains the action colour. */
:root[data-ax-theme="dark"] .ax-editorial-band--green {
  --ax-bg: var(--ax-theme-mist);
  --ax-text-muted: var(--ax-theme-muted);
  --ax-border: var(--ax-theme-border);
}
:root[data-ax-theme="dark"] .ax-landing-audience:has(.ax-editorial-link):is(:hover, :focus-within) {
  background: var(--ax-theme-raised);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-ax-theme]) .ax-editorial-band--green {
    --ax-bg: var(--ax-theme-mist);
    --ax-text-muted: var(--ax-theme-muted);
    --ax-border: var(--ax-theme-border);
  }
  :root:not([data-ax-theme]) .ax-landing-audience:has(.ax-editorial-link):is(:hover, :focus-within) {
    background: var(--ax-theme-raised);
  }
}
