/*
 * Biointerphase light/dark color modes
 * -------------------------------------------------------------------
 * Loaded after style.css. <html data-theme="dark|light"> is set before
 * first paint (see functions.php); dark is the default.
 *
 * 1. Tokens: header, menus and buttons read these in both modes.
 * 2. Header, navigation, toggle and product logos (both modes).
 * 3. Dark mode: redefines the neutral style.css variables (lines, muted
 *    text, soft tints) and adapts components that hard-code white
 *    surfaces or navy text. Light mode is style.css as before.
 * Brand colors: navy #00355F, green #B4D88B, purple #853494.
 */

/* ===== 1. Tokens ===== */
:root{
  color-scheme:light;
  --bip-header-bg:var(--bip-navy);
  --bip-header-fg:#FFFFFF;
  --bip-header-hover:var(--bip-green);
  --bip-header-line:transparent;
  --bip-menu-bg:#FFFFFF;
  --bip-menu-fg:#243440;
  --bip-menu-hover-fg:var(--bip-navy);
  --bip-menu-hover-bg:#E5EDF4;
  --bip-menu-line:#DDE3E0;
  --bip-cta-bg:var(--bip-green);
  --bip-cta-fg:var(--bip-navy);
  --bip-cta-hover:#C6E3A3;
  --bip-toggle-line:rgba(255,255,255,.4);
}
html[data-theme="dark"]{
  color-scheme:dark;
  /* dark palette */
  --d-bg:#111418;          /* page */
  --d-stage:#0C0D0F;       /* product heroes: matches the logos' own black */
  --d-surface:#181C22;     /* cards, panels */
  --d-surface-2:#1F242B;   /* raised: menus, inputs on cards */
  --d-field:#0F1215;       /* form fields */
  --d-line-strong:#3A434D;
  --d-text:#E3E8EC;
  --d-heading:#F5F7F9;
  --d-link:#8EC3EA;        /* light tint of Biointerphase blue */
  --d-blue:#4F86B8;        /* navy lifted for rules and markers on dark */
  /* redefine style.css neutrals */
  --bip-charcoal:#E3E8EC;
  --bip-muted:#A6B2BD;
  --bip-slate:#93AEC6;
  --bip-line:#2A3139;
  --bip-offwhite:#15191E;
  --bip-green-soft:#18211A;
  --bip-navy-soft:#14263A;
  --bip-purple-soft:#2A1A2E;
  --bip-teal-soft:#12302F;
  /* header and menus */
  --bip-header-bg:#0D0F12;
  --bip-header-fg:#E6EBEF;
  --bip-header-line:#232A31;
  --bip-menu-bg:#1A1F25;
  --bip-menu-fg:#DCE3E8;
  --bip-menu-hover-fg:#FFFFFF;
  --bip-menu-hover-bg:#252C34;
  --bip-menu-line:#2E363F;
  --bip-toggle-line:rgba(255,255,255,.28);
}

/* ===== 2. Header, navigation, toggle (both modes) ===== */
.site-header{background:var(--bip-header-bg);border-bottom:1px solid var(--bip-header-line)}
.site-header__inner{gap:20px}
.site-header__inner>.wp-block-navigation{margin-left:auto}
.site-logo img{height:52px}
/* keep the full menu on one line beside the toggle on narrow laptops/tablets */
@media (max-width:960px){
  .site-header__inner{gap:12px}
  .site-header .wp-block-navigation .wp-block-navigation__container{gap:10px}
}

.site-header .wp-block-navigation .wp-block-navigation-item__content{color:var(--bip-header-fg)}
.site-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation .wp-block-navigation-item__content:focus-visible{color:var(--bip-header-hover)}
.site-header .wp-block-navigation__submenu-icon,
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close{color:var(--bip-header-fg)}
.site-header :focus-visible{outline-color:var(--bip-green)}

/* dropdown menus */
.site-header .wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container{background:var(--bip-menu-bg);border:1px solid var(--bip-menu-line);border-radius:10px;padding:6px 0;box-shadow:0 12px 32px rgba(0,0,0,.18)}
.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content{color:var(--bip-menu-fg)}
.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible{color:var(--bip-menu-hover-fg);background:var(--bip-menu-hover-bg)}

/* mobile overlay menu: same color as the header bar */
.site-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{background:var(--bip-header-bg);color:var(--bip-header-fg);padding:20px var(--bip-gutter) 32px}
.site-header .wp-block-navigation:not(.has-background) .is-menu-open .wp-block-navigation__submenu-container{background:transparent;border:0;box-shadow:none}
.site-header .wp-block-navigation .is-menu-open .wp-block-navigation-item__content,
.site-header .wp-block-navigation .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content{color:var(--bip-header-fg);background:transparent}
.site-header .wp-block-navigation .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover{color:var(--bip-header-hover)}

/* Contact call to action: Biointerphase green in both modes */
.site-header .wp-block-navigation .wp-block-navigation-item.nav-cta>.wp-block-navigation-item__content{background:var(--bip-cta-bg);color:var(--bip-cta-fg);padding:10px 18px;border-radius:var(--r-sm);font-weight:600}
.site-header .wp-block-navigation .wp-block-navigation-item.nav-cta>.wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation .wp-block-navigation-item.nav-cta>.wp-block-navigation-item__content:focus-visible{background:var(--bip-cta-hover);color:var(--bip-cta-fg)}

/* light/dark toggle */
.theme-toggle{flex:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;margin:0;padding:0;border:1px solid var(--bip-toggle-line);border-radius:50%;background:transparent;color:var(--bip-header-fg);cursor:pointer;transition:color .15s,border-color .15s,background-color .15s}
.theme-toggle::before{content:"";width:20px;height:20px;background:currentColor;
  -webkit-mask:var(--bip-toggle-icon) center/contain no-repeat;mask:var(--bip-toggle-icon) center/contain no-repeat}
.theme-toggle:hover{color:var(--bip-green);border-color:var(--bip-green);background:rgba(255,255,255,.06)}
.theme-toggle:focus-visible{outline:3px solid var(--bip-green);outline-offset:2px}
html:not(.bip-js) .theme-toggle{display:none}
/* the icon shows the active mode: sun in light, moon in dark */
:root{--bip-toggle-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E")}
html[data-theme="dark"]{--bip-toggle-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 14.6A8.5 8.5 0 0 1 9.4 3.5a8.5 8.5 0 1 0 11.1 11.1z'/%3E%3C/svg%3E")}

/* product logos (rendered by functions.php from heading blocks) */
.bip-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}
.product-logo{line-height:1;letter-spacing:0;margin:4px 0 28px}
.product-logo__art{display:block}
.product-logo__img{display:block;max-width:100%;height:auto}
.product-logo__img--dark{display:none}
html[data-theme="dark"] .product-logo__img--dark{display:block}
html[data-theme="dark"] .product-logo__img--light{display:none}
.product-logo--thermophase .product-logo__img--light{width:400px}
.product-logo--thermophase .product-logo__img--dark{width:420px}
.product-logo--intelliphase .product-logo__img{width:440px;border-radius:12px}
.product-logo--omnimaterials .product-logo__img{width:520px}

/* ===== 3. Dark mode ===== */
html[data-theme="dark"] body{background:var(--d-bg);color:var(--d-text)}
:where(html[data-theme="dark"]) :is(h1,h2,h3,h4,h5,h6){color:var(--d-heading)}
:where(html[data-theme="dark"]) a:where(:not(.wp-element-button)){color:var(--d-link)}
:where(html[data-theme="dark"]) a:where(:not(.wp-element-button)):hover{color:var(--bip-green)}
html[data-theme="dark"] :focus-visible{outline-color:var(--bip-green)}
html[data-theme="dark"] ::selection{background:rgba(180,216,139,.35);color:#fff}

/* product heroes sit on the same near-black as the product logos */
html[data-theme="dark"] .hero:has(.product-logo){background:var(--d-stage)}

/* type */
html[data-theme="dark"] .lede{color:#B4C0CA}
html[data-theme="dark"] .mech-intro{color:var(--d-text)}
html[data-theme="dark"] :is(.stat,.sequence strong,.flow strong,.process strong,table.pp tbody th,.link-list strong,.defs dt,.faq dt,.reasons strong,.inq-type strong,.app-compact__item strong){color:var(--d-heading)}
html[data-theme="dark"] .app-compact__item em{color:var(--d-link)}
html[data-theme="dark"] :is(.role,.pmark span){color:#74C7C2}
html[data-theme="dark"] .step-n{color:var(--d-link);border-top-color:var(--d-blue)}
html[data-theme="dark"] .type-tag:not(.on-dark){color:var(--d-link);border-color:var(--d-link)}

/* surfaces */
html[data-theme="dark"] :is(.card,.section.alt .card,.section.tint .card),
html[data-theme="dark"] :is(.flow li,.fig,.table-wrap,.paths,.contact-panel,.app-card,.val-item,.case,.inq-type,.explainer){background:var(--d-surface);border-color:var(--bip-line)}
html[data-theme="dark"] .flow li{border-top-color:var(--bip-teal)}
html[data-theme="dark"] .flow li:last-child,
html[data-theme="dark"] .flow.econ li:nth-child(1){border-top-color:var(--d-blue)}
html[data-theme="dark"] .flow.econ li:nth-child(2){border-top-color:var(--bip-purple)}
html[data-theme="dark"] .flow.econ li:nth-child(3){border-top-color:var(--bip-green)}
html[data-theme="dark"] .card-green{border-top-color:var(--bip-green)}
html[data-theme="dark"] .card-teal{border-top-color:var(--bip-teal)}
html[data-theme="dark"] .flagship-wide{border-top-color:var(--d-blue)}

/* rules, markers, numbered steps */
html[data-theme="dark"] .sequence li:not(:last-child){border-top-color:var(--d-blue)}
html[data-theme="dark"] .sequence li:not(:last-child)::before{background:var(--d-blue)}
html[data-theme="dark"] :is(.process li,.impl-item){border-top-color:var(--d-blue)}
html[data-theme="dark"] .process.econ li:nth-child(2){border-top-color:var(--bip-slate)}
html[data-theme="dark"] .process.econ li:nth-child(3){border-top-color:#7FB04F}
html[data-theme="dark"] .process__n{background:#2B5D8C;color:#fff}
html[data-theme="dark"] .process.econ li:nth-child(3) .process__n{background:var(--bip-green);color:var(--bip-navy)}

/* status labels */
html[data-theme="dark"] .status-com{background:rgba(180,216,139,.14);color:#C9E4A8}
html[data-theme="dark"] .status-dev{background:rgba(176,96,190,.2);color:#E3B9EA}
html[data-theme="dark"] .status-fed{background:rgba(110,160,210,.16);color:#B7D3EE}
html[data-theme="dark"] .status-teal{background:rgba(64,170,166,.18);color:#95D7D2}
html[data-theme="dark"] .status-explore{background:rgba(255,255,255,.08);color:#C7CFD6}

/* figures and imagery */
html[data-theme="dark"] .fig-label{color:#E2B47E}
html[data-theme="dark"] .fig-label-ok{color:var(--bip-green)}
html[data-theme="dark"] .photo-fig img,
html[data-theme="dark"] .photo-pair__row img{border-color:var(--bip-line)}
html[data-theme="dark"] .photo-fig figcaption,
html[data-theme="dark"] .photo-pair figcaption{color:var(--bip-muted)}
html[data-theme="dark"] .photo-ph{border-color:var(--d-line-strong);background:repeating-linear-gradient(135deg,#171B20 0 14px,#1B2026 14px 28px)}
/* decorative illustrations: re-map their light fills to the dark palette */
html[data-theme="dark"] .app-ill [fill="#F4F7F8" i]{fill:#1D232A}
html[data-theme="dark"] .app-ill :is([fill="#fff" i],[fill="#ffffff" i]){fill:#252C35}
html[data-theme="dark"] :is(.app-ill,.visual-ph) [stroke="#00355F" i]{stroke:var(--d-link)}
html[data-theme="dark"] :is(.app-ill,.visual-ph) [fill="#00355F" i]{fill:var(--d-link)}
html[data-theme="dark"] .visual-ph [fill="#E9EFF3" i]{fill:#151D25}
html[data-theme="dark"] .visual-ph [fill="#D7E2EA" i]{fill:#1D2A36}
html[data-theme="dark"] .visual-ph [stroke="#C9D6E0" i]{stroke:#2C3B48}

/* buttons: brand green carries the primary action on dark */
html[data-theme="dark"] .wp-block-button__link{background:var(--bip-green);border-color:var(--bip-green);color:var(--bip-navy)}
html[data-theme="dark"] .wp-block-button__link:hover{background:var(--bip-cta-hover);border-color:var(--bip-cta-hover);color:var(--bip-navy)}
html[data-theme="dark"] .is-style-outline .wp-block-button__link{background:transparent;border-color:rgba(255,255,255,.55);color:#fff}
html[data-theme="dark"] .is-style-outline .wp-block-button__link:hover{background:rgba(255,255,255,.08);border-color:#fff;color:#fff}
html[data-theme="dark"] .btn-link .wp-block-button__link{background:none;border-color:transparent;color:var(--d-link)}
html[data-theme="dark"] .btn{border-color:var(--d-link);color:#fff}
html[data-theme="dark"] .btn:hover{background:rgba(142,195,234,.12);color:#fff}
html[data-theme="dark"] :is(.btn--green,.btn--primary){background:var(--bip-green);border-color:var(--bip-green);color:var(--bip-navy)}
html[data-theme="dark"] :is(.btn--green,.btn--primary):hover{background:var(--bip-cta-hover);border-color:var(--bip-cta-hover);color:var(--bip-navy)}
html[data-theme="dark"] .jump a{border-color:var(--d-link)}
html[data-theme="dark"] .jump a:hover{background:rgba(142,195,234,.12)}

/* contact page and forms */
html[data-theme="dark"] .inq-type:hover{border-color:var(--d-link)}
html[data-theme="dark"] .inq-type.is-active{border-color:var(--d-link);background:rgba(142,195,234,.1)}
html[data-theme="dark"] .form-card :is(input[type=text],input[type=email],input[type=tel],input[type=url],select,textarea){background:var(--d-field);border-color:var(--d-line-strong);color:var(--d-text)}
html[data-theme="dark"] .form-card :is(input,select,textarea):focus{border-color:var(--d-link);outline:2px solid rgba(142,195,234,.35);outline-offset:0}
html[data-theme="dark"] .form-card ::placeholder{color:#7F8C98}
html[data-theme="dark"] .form-card :is(button,input[type=submit]){background:var(--bip-green);color:var(--bip-navy)}
html[data-theme="dark"] .form-card :is(button,input[type=submit]):hover{background:var(--bip-cta-hover)}
html[data-theme="dark"] .wpcf7-not-valid-tip{color:#FF9F94}
html[data-theme="dark"] .form-status--error{background:rgba(220,70,60,.12);border-color:rgba(240,120,110,.4);color:#FFB8B0}
html[data-theme="dark"] .form-status--ok{background:rgba(180,216,139,.12);border-color:rgba(180,216,139,.35);color:#D9EDC4}

/* footer: deepest charcoal, framing the page like the header */
html[data-theme="dark"] .site-footer{background:#0D0F12;border-top:1px solid #20262D;color:#AEB9C3}

/* ===== Dark mode: graphite feature bands =====
 * The navy feature sections (results band, closing call-to-action band,
 * navy sections) become a raised graphite panel in dark mode only: a
 * step lighter than the page, with a faint green glow (the site's accent)
 * and a teal glow (the status/role colour). Light mode keeps the navy. */
html[data-theme="dark"]{--d-band:#1A2027;--d-band-deep:#13181D}
html[data-theme="dark"] :is(.proof-band,.cta-band,.section.navy){
  background:
    radial-gradient(55% 80% at 100% 0%,rgba(180,216,139,.09),transparent 62%),
    radial-gradient(50% 80% at 0% 100%,rgba(64,170,166,.10),transparent 62%),
    linear-gradient(170deg,var(--d-band) 0%,var(--d-band-deep) 100%);
  border-top:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08);
}
html[data-theme="dark"] .metric-cell{border-top-color:rgba(180,216,139,.28)}
html[data-theme="dark"] :is(.proof-band,.cta-band,.section.navy) .metric-label{color:#C9D3DB}
html[data-theme="dark"] :is(.proof-band,.cta-band,.section.navy) .fine{color:#A9B5BF!important}
html[data-theme="dark"] .cta-band .path-tile{background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.14)}
html[data-theme="dark"] .cta-band .path-tile:is(:hover,:focus-visible){background:rgba(180,216,139,.08);border-color:var(--bip-green)}

/* ===== Headline numbers light up on hover (both modes): brand green ===== */
.metric{transition:color .25s ease,text-shadow .25s ease}
.metric-cell:is(:hover,:focus-within) .metric{color:var(--bip-green);text-shadow:0 0 24px rgba(180,216,139,.45)}
@media (prefers-reduced-motion:reduce){.metric{transition:none}}

/* ===== Dark mode: make the feature bands stand out more =====
 * Brighter corner glows, a slightly lifted panel, a green-to-teal
 * accent rule along the top, a soft outer glow, and (where the band sits
 * as a panel on wide screens) rounded corners. */
html[data-theme="dark"]{--d-band:#1E252D;--d-band-deep:#161B21}
html[data-theme="dark"] :is(.proof-band,.cta-band,.section.navy){
  position:relative;
  background:
    linear-gradient(90deg,var(--bip-green),#40AAA6) top/100% 3px no-repeat,
    radial-gradient(60% 85% at 100% 0%,rgba(180,216,139,.18),transparent 62%),
    radial-gradient(55% 85% at 0% 100%,rgba(64,170,166,.20),transparent 62%),
    linear-gradient(170deg,var(--d-band) 0%,var(--d-band-deep) 100%);
  border:1px solid rgba(180,216,139,.22);border-top:0;
  box-shadow:0 30px 80px -40px rgba(180,216,139,.35),0 0 0 1px rgba(0,0,0,.4);
}
@media (min-width:1229px){
  html[data-theme="dark"] :is(.proof-band,.cta-band,.section.navy){border-radius:20px;overflow:hidden}
}
html[data-theme="dark"] .metric-cell{border-top-color:rgba(180,216,139,.4)}
html[data-theme="dark"] .cta-band .path-tile{background:rgba(255,255,255,.05);border-color:rgba(180,216,139,.35)}

/* ===== Dark mode: results mini-charts (THERMOPHASE "per 850-ton chiller")
 * The inline charts were drawn for a white background. On dark, brighten
 * the navy labels and bars and the grey/green labels so they pop. */
html[data-theme="dark"] .mult svg text[fill="#00355F"]{fill:#9FD0EE}
html[data-theme="dark"] .mult svg rect[fill="#00355F"]{fill:#4F9BD0}
html[data-theme="dark"] .mult svg text[fill="#4A5A69"]{fill:#D3DCE3}
html[data-theme="dark"] .mult svg text[fill="#3E6B1F"]{fill:#C9E4A8}
html[data-theme="dark"] .mult svg line[stroke="#9AA6B0"]{stroke:#B8C3CC}

/* ===== First-visit "choose your side" dialog (assets/js/color-mode.js) ===== */
:root{--bip-icon-sun:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E");--bip-icon-moon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 14.6A8.5 8.5 0 0 1 9.4 3.5a8.5 8.5 0 1 0 11.1 11.1z'/%3E%3C/svg%3E")}
.side-picker{
  width:min(640px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;
  padding:clamp(24px,4vw,40px);border:1px solid rgba(255,255,255,.14);border-radius:22px;
  background:#14181D;color:#E3E8EC;box-shadow:0 30px 90px -20px rgba(0,0,0,.6);
  opacity:0;transform:translateY(12px) scale(.98);transition:opacity .35s ease,transform .35s ease;
}
.side-picker[open].is-in{opacity:1;transform:none}
.side-picker[data-preview="light"]{background:#FFFFFF;color:#343A40;border-color:rgba(0,53,95,.15)}
/* the see-through colour wash behind the dialog changes with the choice */
.side-picker::backdrop{background:rgba(12,6,24,.72);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);transition:background-color .35s ease}
.side-picker[data-preview="dark"]::backdrop{background:
  radial-gradient(60% 60% at 80% 20%,rgba(133,52,148,.45),transparent 70%),
  radial-gradient(60% 60% at 15% 85%,rgba(0,53,95,.55),transparent 70%),
  rgba(8,10,14,.72)}
.side-picker[data-preview="light"]::backdrop{background:
  radial-gradient(60% 60% at 80% 20%,rgba(180,216,139,.55),transparent 70%),
  radial-gradient(60% 60% at 15% 85%,rgba(96,169,211,.35),transparent 70%),
  rgba(246,249,247,.62)}
.side-picker__eyebrow{margin:0 0 8px;font-size:13px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#B4D88B}
.side-picker[data-preview="light"] .side-picker__eyebrow{color:#853494}
.side-picker__title{margin:0 0 8px;font-family:"Alibaba Sans","Arial Black",sans-serif;font-weight:900;font-size:clamp(30px,5vw,44px);line-height:1.05;transform:skewX(-8deg);transform-origin:left bottom;color:inherit}
.side-picker[data-preview="dark"] .side-picker__title{color:#F5F7F9}
.side-picker[data-preview="light"] .side-picker__title{color:#00355F}
.side-picker__text{margin:0 0 24px;font-size:16px;line-height:1.55;opacity:.9}
.side-picker__options{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width:520px){.side-picker__options{grid-template-columns:1fr}}
.side-picker__option{
  position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;
  padding:22px 20px;border-radius:16px;cursor:pointer;font:inherit;
  border:2px solid transparent;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.side-picker__option::before{content:"";width:30px;height:30px;margin-bottom:6px;background:currentColor;-webkit-mask:var(--side-icon) center/contain no-repeat;mask:var(--side-icon) center/contain no-repeat}
.side-picker__option--light{--side-icon:var(--bip-icon-sun);background:linear-gradient(150deg,#FFFFFF,#EEF5E6);color:#00355F;border-color:rgba(0,53,95,.18)}
.side-picker__option--dark{--side-icon:var(--bip-icon-moon);background:linear-gradient(150deg,#1E242C,#0C0D0F);color:#F5F7F9;border-color:rgba(255,255,255,.16)}
.side-picker__option strong{font-family:"Alibaba Sans","Arial Black",sans-serif;font-weight:900;font-size:22px;letter-spacing:.01em}
.side-picker__option span{font-size:14px;opacity:.85}
.side-picker__option--light span{color:#343A40}
.side-picker__option--dark span{color:#C9D3DB}
.side-picker__option:is(:hover,:focus-visible){transform:translateY(-3px)}
.side-picker__option--light:is(:hover,:focus-visible){border-color:#B4D88B;box-shadow:0 12px 34px -12px rgba(180,216,139,.9)}
.side-picker__option--dark:is(:hover,:focus-visible){border-color:#853494;box-shadow:0 12px 34px -12px rgba(133,52,148,.9)}
.side-picker__option:focus-visible{outline:3px solid #B4D88B;outline-offset:3px}
.side-picker[data-preview="light"] .side-picker__option:focus-visible{outline-color:#853494}
.side-picker__note{margin:18px 0 0;font-size:13px;opacity:.75}
@media (prefers-reduced-motion:reduce){.side-picker,.side-picker::backdrop,.side-picker__option{transition:none}.side-picker__option:is(:hover,:focus-visible){transform:none}}

/* ===== Footer secret: the haunted firehouse button =====
 * A simple line drawing of the 1901 Troy Hill firehouse (two arched bays,
 * balustrade, bell tower). On hover/focus the windows glow and a small
 * ghost drifts up out of the tower. Leads to the hidden firehouse page. */
.site-footer .firehouse-secret{display:inline-block;width:52px;height:52px;margin-top:14px;color:rgba(255,255,255,.42);border-radius:10px;transition:color .3s ease}
.firehouse-secret svg{display:block;width:100%;height:100%;overflow:visible}
.firehouse-secret .fh-glow{fill:#F2D27A;opacity:0;transition:opacity .4s ease}
.firehouse-secret .fh-ghost{fill:#F5F7F9;opacity:0;transform:translateY(6px);transition:opacity .35s ease,transform .5s ease}
.firehouse-secret .fh-eye{fill:#0D0F12;opacity:0;transition:opacity .35s ease}
.site-footer .firehouse-secret:is(:hover,:focus-visible){color:var(--bip-green)}
.firehouse-secret:is(:hover,:focus-visible) .fh-glow{opacity:.9;animation:fh-flicker 2.4s steps(1) infinite}
.firehouse-secret:is(:hover,:focus-visible) .fh-ghost{opacity:.92;transform:translateY(-14px);animation:fh-float 2.2s ease-in-out .5s infinite}
.firehouse-secret:is(:hover,:focus-visible) .fh-eye{opacity:1;transform:translateY(-14px);animation:fh-float 2.2s ease-in-out .5s infinite}
.firehouse-secret:focus-visible{outline:3px solid var(--bip-green);outline-offset:3px}
@keyframes fh-float{0%,100%{transform:translateY(-14px)}50%{transform:translateY(-18px)}}
@keyframes fh-flicker{0%,100%{opacity:.9}43%{opacity:.35}47%{opacity:.9}71%{opacity:.5}74%{opacity:.9}}
@media (prefers-reduced-motion:reduce){
  .firehouse-secret *{animation:none!important;transition:none!important}
}
/* address link: looks like the address, but also opens the firehouse page */
.site-footer a.firehouse-address{color:inherit;text-decoration:none;border-bottom:1px dotted transparent;transition:color .25s ease,border-color .25s ease}
.site-footer a.firehouse-address:is(:hover,:focus-visible){color:var(--bip-green);border-bottom-color:currentColor}
/* horse-drawn engine: rolls out beside the firehouse on hover */
.firehouse-secret .fh-engine{opacity:0;transform:translateX(-22px);transition:opacity .4s ease,transform .9s cubic-bezier(.2,.7,.2,1)}
.firehouse-secret .fh-legs-b{opacity:0}
:is(.firehouse-secret:is(:hover,:focus-visible),.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret) .fh-engine{opacity:1;transform:none}
:is(.firehouse-secret:is(:hover,:focus-visible),.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret) .fh-legs-a{animation:fh-trot .5s steps(1) infinite}
:is(.firehouse-secret:is(:hover,:focus-visible),.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret) .fh-legs-b{animation:fh-trot .5s steps(1) .25s infinite}
@keyframes fh-trot{0%{opacity:1}50%{opacity:0}}
/* hovering the address wakes the firehouse up too */
.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret{color:var(--bip-green)}
.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret .fh-glow{opacity:.9;animation:fh-flicker 2.4s steps(1) infinite}
.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret :is(.fh-ghost,.fh-eye){opacity:.92;transform:translateY(-14px);animation:fh-float 2.2s ease-in-out .5s infinite}
@media (prefers-reduced-motion:reduce){.firehouse-secret .fh-legs-b{display:none}}
/* steam pumper details: back horse a little fainter, wheels turn on hover */
.firehouse-secret .fh-horse--back{opacity:.6}
.firehouse-secret .fh-wheel{transform-box:fill-box;transform-origin:center}
:is(.firehouse-secret:is(:hover,:focus-visible),.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret) .fh-wheel{animation:fh-roll .9s linear infinite}
@keyframes fh-roll{to{transform:rotate(360deg)}}
.firehouse-secret .fh-gallop{transform-box:fill-box;transform-origin:center bottom}
:is(.firehouse-secret:is(:hover,:focus-visible),.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret) .fh-gallop{animation:fh-gallop .45s ease-in-out infinite}
:is(.firehouse-secret:is(:hover,:focus-visible),.footer-col:has(.firehouse-address:is(:hover,:focus-visible)) .firehouse-secret) .fh-gallop--b{animation-delay:.2s}
@keyframes fh-gallop{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-1.6px) rotate(-3deg)}}

/* Footer firehouse: one-time entrance when it first scrolls into view
 * (assets/js/color-mode.js adds .is-arriving). The ghost drifts in from
 * above, sinks into the bell tower and vanishes; then the windows flicker
 * on and off to draw the eye. Hover behaviour is unchanged afterwards. */
/* three separately eased motions (sideways drift, descent, fade) give one smooth curved glide */
.firehouse-secret.is-arriving :is(.fh-ghost,.fh-eye){will-change:transform,opacity;
  animation:fh-arrive-x 2.1s cubic-bezier(.22,.61,.36,1) both,fh-arrive-y 2.6s cubic-bezier(.45,.05,.4,1) both,fh-arrive-fade 2.6s ease-in-out both}
.firehouse-secret.is-arriving .fh-glow{animation:fh-wake 1.6s steps(1) 2.3s both}
.site-footer .firehouse-secret.is-arriving{animation:fh-wake-colour 1.6s steps(1) 2.3s}
@keyframes fh-arrive-x{from{translate:18px 0}to{translate:0 0}}
@keyframes fh-arrive-y{from{transform:translateY(-34px)}to{transform:translateY(4px)}}
@keyframes fh-arrive-fade{0%{opacity:0}16%,72%{opacity:.92}96%,100%{opacity:0}}
@keyframes fh-wake{0%{opacity:0}8%{opacity:.95}18%{opacity:.15}26%{opacity:.95}38%{opacity:.35}46%{opacity:.95}80%{opacity:.95}100%{opacity:0}}
@keyframes fh-wake-colour{0%,79%{color:var(--bip-green)}100%{color:rgba(255,255,255,.42)}}
@media (prefers-reduced-motion:reduce){.firehouse-secret.is-arriving,.firehouse-secret.is-arriving *{animation:none!important}}
