/* ==========================================================================
   reset.css — Modern CSS Reset (2026)
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Global 90% scale: the whole system is rem-based, so shrinking the root
     zooms every page out ~10% (type, spacing, containers) uniformly. */
  font-size: 87.5%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  hanging-punctuation: first last;
}

body {
  min-block-size: 100vh;
  min-block-size: 100dvh;
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

img,
video {
  height: auto;
}

/* Forms inherit type */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Text wrapping / balance */
p,
li,
figcaption {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Lists reset (semantic lists still keyboard/AT-navigable) */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Break words defensively */
:where(p, h1, h2, h3, h4, h5, h6) {
  overflow-wrap: break-word;
}

/* Anchor scroll offset for sticky header */
:target {
  scroll-margin-block-start: calc(var(--header-height) + var(--space-md));
}

/* Focus visibility */
:focus-visible {
  outline: var(--focus-width) solid var(--color-brand);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Root stacking + isolation */
#root,
#__app,
main {
  isolation: isolate;
}

/* Respect reduced motion globally */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Hidden but available to assistive tech */
[hidden] {
  display: none !important;
}
