/* Keep these overrides after HybridMag's stylesheet. */
:root {
  --hybridmag-color-primary: #235b45;
  --hybridmag-color-text-light: #666666;
  --hybridmag-color-link-visited: #51438a;
  --hybridmag-color-input-border: #767676;
  --pureriffic-focus: #0645d8;
}
html.hm-dark {
  --hybridmag-color-primary: #91d5a3;
  --hybridmag-color-text-light: #cccccc;
  --hybridmag-color-link-visited: #c9baff;
  --hybridmag-color-button-background: #235b45;
  --hybridmag-color-input-border: #929292;
  --pureriffic-focus: #ffda70;
}
/* Badge text remains white in both modes; its background must stay dark. */
.cat-links a { background-color: #235b45 !important; color: #ffffff !important; }
.cat-links a:hover, .cat-links a:focus { background-color: #163f30 !important; }
html body a:focus-visible,
html body button:focus-visible,
html body input:focus-visible,
html body select:focus-visible,
html body textarea:focus-visible {
  outline: 3px solid var(--pureriffic-focus) !important;
  outline-offset: 3px;
}
/* Hide closed controls visually AND from keyboard/accessibility navigation. */
body:not(.mobile-menu-opened) #hm-mobile-sidebar { visibility: hidden; }
#hm-mobile-sidebar[hidden], .hm-search-box[hidden] { display: none !important; }
#hm-mobile-sidebar { max-height: 100dvh; overflow-y: auto; }
body.mobile-menu-opened { overflow: hidden; }
#hm-mobile-sidebar a { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  #hm-mobile-sidebar { transition: none; }
}
/* Single-character current-page labels need manual contrast coverage. */
html .pagination .page-numbers.current,
html .pagination .page-numbers:hover,
html .page-links .post-page-numbers.current {
  background: #235b45 !important;
  color: #ffffff !important;
}
