/**
 * Fit Circle site-wide (every front-end page).
 *
 * Only what Divi cannot express itself: the keyboard focus ring and anchor
 * scroll padding. No layout or module restyling here.
 */

/* Keyboard focus ring. Divi resets `:focus{outline:0}`, so Divi-native links,
   buttons and fields showed no focus at all (WCAG 2.4.7). :focus-visible is
   keyboard focus only: a mouse click shows nothing. `html` lifts the
   specificity over Divi's reset without !important, so the plugin's own
   scoped rings (events, dashboard, filter, sign-in) still apply. */
html :focus-visible {
  outline: 3px solid var(--gcid-14kz8k5e4k, #1f1e23);
  outline-offset: 3px;
}

/* On dark backgrounds (brand #424149 / ink sections, Divi dark text layout)
   the ring is pastel. assets/site.js sets data-fc-focus-dark on a focused
   element whose background behind it is dark. */
html .et_pb_bg_layout_dark :focus-visible,
html [data-fc-focus-dark]:focus-visible {
  outline-color: var(--gcid-zhpwvkwx1p, #f8dcd0);
}

/* Anchor targets and keyboard focus land below the sticky site header
   (76px desktop, 66px at 980px and under) instead of under it.
   scroll-margin on the targets, not scroll-padding on html: with
   scroll-padding, focusing a link inside the sticky header made the page
   jump. --fc-anchor-offset is also read by site.js for Divi's smooth
   scroll. */
html {
  --fc-anchor-offset: 92px;
}
html:has(body.admin-bar) {
  --fc-anchor-offset: 124px;
}
@media (max-width: 980px) {
  html {
    --fc-anchor-offset: 82px;
  }
  html:has(body.admin-bar) {
    --fc-anchor-offset: 114px;
  }
}
@media (max-width: 782px) {
  html:has(body.admin-bar) {
    --fc-anchor-offset: 128px;
  }
}
@media (max-width: 600px) {
  /* The admin bar scrolls away under 601px. */
  html:has(body.admin-bar) {
    --fc-anchor-offset: 82px;
  }
}
:where([id]) {
  scroll-margin-top: var(--fc-anchor-offset);
}
#et-main-area :where(a[href], button, input, select, textarea, summary, [tabindex]) {
  scroll-margin-top: var(--fc-anchor-offset);
}

/* Divi mobile menu: the open state shows a close icon (ETmodules "M"), as
   live's menu button does. Divi has no open-state icon setting. */
.et-l--header .mobile_nav.opened .mobile_menu_bar::before {
  content: "\4d";
}

/* "Skip to main content" (printed by the plugin): hidden until focused. */
.fc-skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100000;
  padding: 12px 16px;
  background: var(--gcid-14kz8k5e4k, #1f1e23);
  color: var(--gcid-zcxhwnu6sh, #fff) !important;
  font-family: "Atkinson Hyperlegible", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  transform: translateY(-200%);
}
.fc-skip-link:focus {
  transform: none;
}
html .fc-skip-link:focus-visible {
  outline-color: var(--gcid-zhpwvkwx1p, #f8dcd0);
}
/* The skip target takes focus only to move the reading position. */
html [role="main"][tabindex="-1"]:focus {
  outline: none;
}
