/*
 * Stoei Core — base for websites and apps. Load after tokens.css.
 *
 * The few rules every page needs: box sizing, page colors and font, focus
 * ring, screen-reader text and skip link. (The light/dark switch is in
 * controls.css.) Looks come
 * from tokens.css (and the site's theme); nothing here sets a value itself.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--st-color-bg);
  color: var(--st-color-text);
  font-family: var(--st-font-body);
  font-size: var(--st-text-body);
  line-height: var(--st-leading-body);
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--st-color-accent); }
/* The focus ring, also on boxes that hold the focused part (search bar, cards, photo boxes)
   and on boxes the page moves focus to (the admin's list of fields to fix). */
:focus-visible, .st-hsearch:focus-within, .st-card:has(.st-card__link:focus-visible), .st-success:focus-visible, .st-upload__remove:focus-visible, .st-upload__add:focus-within, .fix-list:focus { outline: var(--st-focus-ring); outline-offset: var(--st-focus-offset); }
[hidden] { display: none !important; }

/* For screen readers only (still read aloud, not shown). */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* "Skip to content" link: hidden until reached with the keyboard. */
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: var(--st-space-3); top: var(--st-space-2); z-index: 100; background: var(--st-color-surface); color: var(--st-color-text); padding: var(--st-space-2) var(--st-space-3); }

/* Bare-bones layout for a site with no theme yet (Stoei CMS default templates). */
.site-header, .site-main, .site-footer { max-width: var(--st-container); margin: 0 auto; padding: var(--st-space-4) var(--st-space-6); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: var(--st-space-4); }
.site-footer { color: var(--st-color-text-muted); }
