/* Bozo's Theme v5.0.1. Scoped contrast repair for true two-way light/dark mode.
   The photo artwork and physical chrome radio faceplate intentionally stay recognizable
   in both palettes.  No plugin settings, theme options, or older Legacy mode change. */

/* v5.0 used a permanently dark header but allowed the v4.9 light-mode text
   variables to turn dark, so the brand and search icon disappeared.  The v5.0.1
   header itself now follows the selected theme. */
html[data-cm-theme="dark"] body.bozos-v500-active .cm-site-header.cm-v150 {
  --cm-metal-text:#f6f8ff;
  --cm-metal-sub:#ffd17b;
  --cm-metal-divider:rgba(185,216,242,.2);
  color:#f6f8ff!important;
  background:linear-gradient(135deg,#0c1429 5%,#09101f 60%,#132644)!important;
  border-bottom-color:var(--bv5-red)!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header.cm-v150 {
  --cm-metal-text:#182c43;
  --cm-metal-sub:#805012;
  --cm-metal-divider:rgba(39,65,94,.23);
  color:#182c43!important;
  background:linear-gradient(180deg,#fffaf0 0%,#f1f3f7 45%,#d4e1ed 100%)!important;
  border-bottom:3px solid #ad3037!important;
  box-shadow:0 6px 19px rgba(20,48,73,.15),inset 0 1px #fff!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header.cm-v150.cm-metallic {
  background-image:linear-gradient(110deg,rgba(255,255,255,.6),transparent 40%,rgba(197,210,224,.25) 75%),linear-gradient(180deg,#fffaf0 0%,#f1f3f7 45%,#d4e1ed 100%)!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header :is(.cm-brand-link,.cm-brand-title strong,.cm-nav-item>a,.cm-nav-item>details>summary,.bozos-search-trigger) {
  color:#192d42!important;
}
html[data-cm-theme="dark"] body.bozos-v500-active .cm-site-header :is(.cm-brand-link,.cm-brand-title strong,.cm-nav-item>a,.cm-nav-item>details>summary,.bozos-search-trigger) {
  color:#f6f8ff!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header .cm-brand-title small {color:#875612!important;}
html[data-cm-theme="dark"] body.bozos-v500-active .cm-site-header .cm-brand-title small {color:#ffcc7b!important;}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header :is(.bozos-search-trigger,.cm-theme-toggle.cm-nav-bulb) {
  background:#f8fbff!important;
  color:#1c3954!important;
  border-color:#849bb4!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 1px 3px rgba(31,64,94,.08);
}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header :is(.bozos-search-trigger,.cm-theme-toggle.cm-nav-bulb) svg {
  color:#1c3954!important;
  stroke:currentColor!important;
  opacity:1!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header .cm-nav-bulb .cm-emoji-bulb {
  opacity:.8!important;
  filter:grayscale(.45) brightness(.9)!important;
}
html[data-cm-theme="dark"] body.bozos-v500-active .cm-site-header :is(.bozos-search-trigger,.cm-theme-toggle.cm-nav-bulb) {
  background:#172c47!important;
  color:#f8faff!important;
  border-color:#6188a8!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header .cm-menu-button {
  color:#192b43!important;
  background:linear-gradient(135deg,#ffe1a1,#edb950)!important;
  border-color:#bd8427!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header .cm-menu-icon i {background:#192b43!important;}
/* Keep mobile menu and desktop mega menus synchronized with the header palette. */
@media(max-width:1080px){
  html[data-cm-theme="light"] body.bozos-v500-active .cm-site-header .cm-v150-navigation {
    color:#192d42!important;
    background:linear-gradient(160deg,#fffdf6,#e5edf5)!important;
    border-color:#a9bdcf!important;
  }
  html[data-cm-theme="dark"] body.bozos-v500-active .cm-site-header .cm-v150-navigation {
    background:linear-gradient(160deg,#0e223a,#091729)!important;
    border-color:#52708e!important;
  }
}

/* True light surfaces for the v5 homepage. Decorative radio remains chrome and
   the hero photograph remains unchanged; the surrounding text and cards switch. */
html[data-cm-theme="light"] body.bozos-v500-active .bozos-v500-home {color:#183049!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-hero {
  background:#f7f9fc!important;
  border-color:#b58d53;
  box-shadow:0 15px 28px rgba(31,60,94,.14),inset 0 0 0 1px rgba(196,149,74,.1);
}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-hero-copy {
  background:linear-gradient(125deg,#fffdf8,#e6edf6)!important;
  border-top-color:#be3b44;
  color:#183049!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-hero-copy .bv5-kicker {color:#8c4a00!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-hero-copy h1 {color:#a15b05!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-hero-copy h1 span {color:#162d46!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-hero-copy>p:not(.bv5-kicker) {color:#29445f!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-secondary {
  background:#f9fbfe!important;color:#173650!important;border-color:#6f8ba8!important;
}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-radio-section,
html[data-cm-theme="light"] body.bozos-v500-active .bv5-links {
  color:#183049!important;
  background:linear-gradient(145deg,#fffdf6,#e8f0f7)!important;
  border-color:#b8a47f!important;
  box-shadow:0 8px 25px rgba(34,69,110,.09);
}
html[data-cm-theme="light"] body.bozos-v500-active :is(.bv5-radio-top,.bv5-section-heading) h2 {color:#172e48!important;}
html[data-cm-theme="light"] body.bozos-v500-active :is(.bv5-radio-top,.bv5-section-heading) h2 span {color:#89510b!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-radio-top>p {color:#405d76!important;}
html[data-cm-theme="light"] body.bozos-v500-active :is(.bv5-radio-section,.bv5-links) .bv5-kicker {color:#90520a!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-tile {
  background:linear-gradient(145deg,#fff,#e8f0f9)!important;
  border-color:#b8cadb!important;
  box-shadow:0 2px 9px rgba(39,73,107,.08);
}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-tile:hover {background:#f9f5e9!important;border-color:#9f650d!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-tile-body small {color:#81500c!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-tile-body strong {color:#17314e!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-tile-body>span {color:#395675!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-tile-arrow {color:#9b5b0a!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-support {
  color:#192d43!important;
  background:linear-gradient(125deg,#fff8ef,#e9eef6 60%,#fbe6de)!important;
  border-color:#bf8d4c!important;
  box-shadow:0 6px 18px rgba(45,62,84,.1);
}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-support>span {color:#a32d3a!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-support h2 {color:#152d45!important;}
html[data-cm-theme="light"] body.bozos-v500-active .bv5-support p {color:#37516b!important;}
/* Existing CBRT feed owns its intentionally dark 'spotlight' card; its content
   remains white on navy in either mode. Do not change or override plugin CSS. */

/* On phones, the separate Support plugin's wide fixed pill can cover the v5
   hero text and CTA. Keep the plugin enabled and its original left/right side,
   but present a small accessible heart control docked to a safe bottom corner.
   This applies only to the new v5 homepage and never to other pages or legacy. */
@media(max-width:640px){
  html[data-cm-theme] body.bozos-v500-active.bozos-v500-new-hero .bsos-floating-support[data-bsos-floating="1"] {
    position:fixed!important;
    box-sizing:border-box!important;
    bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;
    left:max(12px,env(safe-area-inset-left,0px))!important;
    right:auto!important;
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
    max-width:50px!important;
    max-height:50px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:50%!important;
    z-index:990!important;
    transform:none!important;
  }
  html[data-cm-theme] body.bozos-v500-active.bozos-v500-new-hero .bsos-floating-support.bsos-side-right[data-bsos-floating="1"]{
    left:auto!important;
    right:max(12px,env(safe-area-inset-right,0px))!important;
  }
  html[data-cm-theme] body.bozos-v500-active.bozos-v500-new-hero .bsos-floating-support[data-bsos-floating="1"] .bsos-float-label {
    /* Visually hidden, not display:none, so the label remains available to AT. */
    position:absolute!important;width:1px!important;height:1px!important;padding:0!important;
    margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;
    clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;
  }
  html[data-cm-theme] body.bozos-v500-active.bozos-v500-new-hero .bsos-floating-support[data-bsos-floating="1"] .bsos-float-icon {
    font-size:25px!important;line-height:1!important;margin:0!important;
  }
  html[data-cm-theme] body.bozos-v500-active.bozos-v500-new-hero .bsos-floating-support[data-bsos-floating="1"]:focus-visible {
    outline:3px solid #f0b653!important;outline-offset:3px!important;
  }
}
/* Avoid a white flash when switching modes; legacy panels continue using
   WordPress theme tokens. */
@media(prefers-reduced-motion:reduce){
  body.bozos-v500-active .cm-site-header,
  body.bozos-v500-active .bozos-v500-home * {transition:none!important;}
}
