/* Shared keyboard focus treatment. Loaded after the page-specific styles. */
body :is(a[href], button, summary):focus-visible:not(.next-hero-link),
body .skip:focus,
body .site-header .navlinks a[href]:is(:focus-visible):is(:hover, :focus-visible, [aria-current]),
body.home .site-header .navlinks a[href]:focus-visible[aria-current],
body .work .feature .feature-info-v5 a.button[href]:focus-visible,
body .sv-intro .sv-intro-action a.sv-site-link[href]:focus-visible,
body .back.back-projects[href]:focus-visible,
body .case-toc-desktop a[href]:focus-visible,
body .case-toc-mobile a[href]:focus-visible,
body.home .hero-scroll[href]:focus-visible {
  background: #FFFFFF !important;
  color: #000000 !important;
  outline: 3px solid #000000 !important;
  outline-offset: 3px !important;
  text-shadow: none !important;
  text-decoration-color: currentColor !important;
}
body .skip:focus { border-radius: 4px; }
body .work .feature .feature-info-v5 a.button[href]:focus-visible :is(.button-label,.arrow),
body .back.back-projects[href]:focus-visible :is(.back-label,.back-arrow),
body.home .hero-scroll[href]:focus-visible svg {
  color: #000000 !important;
}
body.home .hero-scroll[href]:focus-visible {border-color: transparent !important; border-radius: 50% !important;}
/* The next-project link wraps the full painted area. Focus its actual panel
   and arrow instead of covering the decorative background with white. */
body .next-project-painted a.next-hero-link[href]:focus-visible .next-project-panel {
  background: #FFFFFF !important;
  color: #000000 !important;
  border-color: #000000 !important;
  outline: 2px solid #000000 !important;
  outline-offset: 2px !important;
}
body .next-project-painted a.next-hero-link[href]:focus-visible :is(.next-hero-kicker,.next-hero-title,.next-hero-arrow,.next-hero-arrow svg) {
  color: #000000 !important;
}
body .next-project-painted a.next-hero-link[href]:focus-visible .next-hero-arrow {
  background: #FFFFFF !important;
  border-color: transparent !important;
  outline: 3px solid #000000 !important;
  outline-offset: 3px !important;
  border-radius: 50% !important;
}
/* Keep the focus outline inside the chapter links' scrolling container. */
body :is(.case-toc-desktop,.case-toc-mobile) a[href]:focus-visible {outline-offset: -3px !important;}
/* Focus must appear immediately, not fade through low-contrast colours. */
body :is(a[href],button,summary):focus-visible,
body .skip:focus,
body a[href]:focus-visible :is(.button-label,.arrow,.back-label,.back-arrow,.next-project-panel,.next-hero-kicker,.next-hero-title,.next-hero-arrow,svg) {
  transition: none !important;
}
body.home .work .feature .feature-info-v5 a.button[href]:focus-visible {
  background: #FFFFFF !important;
  color: #000000 !important;
  transition: none !important;
}
