/* ==========================================================================
   base.css — design tokens + reset + primitives shared by every page.
   Page-specific rules live in content.css / admin.css / authenticate.css.
   Your own overrides belong in custom.css (loaded last).
   ========================================================================== */

/* The single source of truth for hiding things: templates and JS only ever
   toggle the `hidden` attribute, never inline styles. */
[hidden] {
  display: none !important;
}

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 2. Remove default margin, except on native dialogs */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations if user allows motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

/* 4. Set core root and body defaults */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  min-height: 100svh;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

/* 5. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Improve text wrapping and prevent overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* 8. Remove list styles only when explicitly marked as non-semantic lists */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* 9. Make sure textareas without a rows attribute aren't tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* 10. Create a root stacking context (helpful for React/Next.js/Vue) */
#root,
#__next {
  isolation: isolate;
}
