/* Design System v2 — reset.
 *
 * Normalisation only: no colour, no type, no spacing. Every value here is a
 * browser-behaviour correction that survives whatever design language lands on
 * top of it, so nothing in this file is a placeholder.
 *
 * This file may only ever write into `@layer reset`. It is loaded first
 * (StylesheetsHelper::V2), so `reset` is the first layer name the document
 * sees, and tokens.css line 1 then appends the rest of the order after it. */

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

  html {
    -webkit-text-size-adjust: var(--reset-text-size-adjust);
    text-size-adjust: var(--reset-text-size-adjust);
  }

  body,
  h1, h2, h3, h4, h5, h6,
  p, figure, blockquote, dl, dd,
  ol, ul, menu {
    margin: var(--space-0);
  }

  ol, ul, menu {
    padding: var(--space-0);
    list-style: none;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }

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

  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    max-inline-size: var(--reset-media-max-inline-size);
    block-size: auto;
  }

  input, button, textarea, select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    margin: var(--space-0);
  }

  button {
    padding: var(--space-0);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  table {
    border-collapse: collapse;
  }

  textarea:not([rows]) {
    min-block-size: var(--reset-textarea-min-block-size);
  }

  :target {
    scroll-margin-block-start: var(--reset-target-scroll-margin);
  }

  [hidden]:not([hidden="until-found"]) {
    display: none !important;
  }

  /* The reduced-motion contract. Stated once, here, so no component has to
   * remember it. */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: var(--reset-motion-duration) !important;
      animation-iteration-count: var(--reset-motion-iterations) !important;
      transition-duration: var(--reset-motion-duration) !important;
      scroll-behavior: auto !important;
    }
  }
}
