/* Shared accessibility and resilience defaults for bundled layouts. Theme-specific CSS
   and utility classes remain responsible for each layout's visual identity. */
:root {
  --lf-focus-ring: 2px solid currentColor;
  --lf-focus-offset: 3px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  overflow-wrap: anywhere;
}

img, video, svg, canvas {
  max-width: 100%;
  height: auto;
}

pre, code {
  max-width: 100%;
}

pre {
  overflow-x: auto;
  white-space: pre;
}

/* Standalone images are promoted to <figure class="lf-figure"> blocks by the
   markdown pipeline. These neutral defaults keep captions readable and images
   contained in every theme; each theme refines them with its own tokens. */
figure,
figure.lf-figure {
  margin: 2rem 0;
}

figure > img {
  display: block;
  max-width: 100%;
  height: auto;
}

figcaption {
  font-size: 0.875em;
  line-height: 1.5;
  margin-top: 0.625rem;
  opacity: 0.8;
}

/* Minimal utilities shared by bundled components (search widget, skip links).
   Deliberately tiny: no utility framework, just what release-owned markup
   actually toggles. */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: var(--lf-focus-ring);
  outline-offset: var(--lf-focus-offset);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
