/* Toolbar base */
.hal-skip-link{position:absolute;left:-9999px;top:auto}
.hal-skip-link:focus{left:8px;top:8px;z-index:10000;background:#000;color:#fff;padding:.5rem 1rem}
.hal-a11y-toolbar{position:fixed;right:16px;bottom:16px;display:flex;gap:.25rem;align-items:center;z-index:9999;
  background:#fff;border:1px solid #ddd;border-radius:8px;padding:6px 8px;box-shadow:0 6px 24px rgba(0,0,0,.12)}
.hal-a11y-toolbar .hal-toggle{border:1px solid #ccc;background:#f8f8f8;border-radius:6px;padding:.35rem .5rem;cursor:pointer;font-weight:bold}
.hal-a11y-toolbar button{border:1px solid #ccc;background:#f8f8f8;border-radius:6px;padding:.35rem .5rem;cursor:pointer}
.hal-a11y-toolbar .hal-a11y-logo{height:20px;margin-right:6px}

/* Collapsed state */
.hal-a11y-toolbar.hal-collapsed{padding:6px}
.hal-a11y-toolbar.hal-collapsed .hal-controls{display:none}
.hal-a11y-toolbar.hal-collapsed{border-radius:999px}

/* Vertical mode */
.hal-a11y-toolbar.hal-vertical{flex-direction:column;right:16px;bottom:auto;top:50%;transform:translateY(-50%);padding:8px}
.hal-a11y-toolbar.hal-vertical button{width:36px; height:36px; display:flex; align-items:center; justify-content:center; padding:0}
.hal-a11y-toolbar.hal-vertical .hal-a11y-logo{margin:0 0 6px}

/* Readability/motion classes */
html.hal-readable{--hal-font:'Atkinson Hyperlegible',system-ui,sans-serif;font-family:var(--hal-font)!important}
html.hal-contrast-high{filter:contrast(120%) satur(85%)}
html.hal-contrast-dark{filter:invert(1) hue-rotate(180deg)}
html.hal-pause *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
html.hal-mask:before{content:'';position:fixed;left:0;right:0;top:0;height:40%;background:rgba(0,0,0,.35);pointer-events:none;z-index:9998}
html.hal-mask:after{content:'';position:fixed;left:0;right:0;bottom:0;height:50%;background:rgba(0,0,0,.35);pointer-events:none;z-index:9998}

/* Custom theme via CSS variables. Two modes:
   - Site-wide: selectors on html/body/elements
   - Content-only: prefixed with #hal-main.hal-scope-content
*/
:root{
  --hal-custom-bg:#ffffff;
  --hal-custom-text:#111111;
}

/* Site-wide force (applied when forceColors=1) */
html.hal-theme-custom.hal-force-colors body,
html.hal-theme-custom.hal-force-colors body *, 
html.hal-theme-custom.hal-force-colors .wp-block-button__link{
  color: var(--hal-custom-text) !important;
}
html.hal-theme-custom.hal-force-colors body{
  background: var(--hal-custom-bg) !important;
}

/* Site-wide mild (no !important except base) */
html.hal-theme-custom:not(.hal-force-colors) body{
  background: var(--hal-custom-bg) !important;
  color: var(--hal-custom-text) !important;
}

/* Content-only scope (strong to win specific selectors inside content) */
#hal-main.hal-scope-content, 
#hal-main.hal-scope-content *{
  color: var(--hal-custom-text) !important;
  background-color: transparent;
}
#hal-main.hal-scope-content{
  background: var(--hal-custom-bg) !important;
}
