/* Minimal reset — box-sizing, margin, tap highlight.
 *
 * MUST be wrapped in `@layer reset` so that universal selectors here
 * (like `* { margin: 0 }`) can be overridden by component layer rules.
 * When CSS is imported from JS via AssetMapper there's no automatic
 * `layer(name)` wrap — each file declares its own layer explicitly.
 */

@layer reset {
  *,
  *::before,
  *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  * {
    -webkit-tap-highlight-color: transparent;
  }

  html {
    text-size-adjust: 100%;
  }

  body {
    min-height: 100dvh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  img,
  picture,
  video,
  svg {
    display: block;
    max-width: 100%;
  }

  /* El `[hidden] { display: none }` del navegador pierde contra CUALQUIER regla
     de autor, sin importar la especificidad (el origen autor gana al UA). Sin
     este guard, el `display: block` de arriba se comía el atributo en <svg> e
     <img>: el tick de verificado salía en TODOS los comentaristas, no solo en
     los verificados. Misma capa y más especificidad (`[hidden]` 0-1-0 gana a
     `svg` 0-0-1), así que el atributo vuelve a mandar.

     Ojo: esto NO cubre reglas de CLASE que declaren display en capas
     posteriores (`.foo { display: flex }` en components) — esas siguen
     necesitando su `.foo[hidden]` explícito, como en comments-modal.css. */
  [hidden] {
    display: none;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  ul,
  ol {
    list-style: none;
  }

  /* Focus visible — global ring */
  :focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }

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