@layer reset {

  /*
   * Modern reset. Normalises without removing anything the visitor needs:
   * focus rings, list semantics for screen readers and form font inheritance
   * are all preserved.
   */

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

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Anchor jumps only; never a global smooth scroll (spec section 12.14). */
    scroll-behavior: auto;
  }

  body {
    margin: 0;
    min-block-size: 100vb;
    /* Guarantees the page itself can never scroll sideways. */
    overflow-x: clip;
  }

  h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
    margin-block: 0;
    margin-inline: 0;
  }

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

  p { text-wrap: pretty; }

  ul[role="list"],
  ol[role="list"] {
    list-style: none;
    margin-block: 0;
    padding-inline-start: 0;
  }

  img, picture, video, canvas, svg, iframe {
    display: block;
    max-inline-size: 100%;
  }

  img, video { block-size: auto; }

  a {
    color: inherit;
    text-decoration-thickness: from-font;
    text-underline-offset: 0.18em;
  }

  button, input, select, textarea {
    font: inherit;
    color: inherit;
    margin: 0;
  }

  button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    /* Touch target floor applies to every interactive control. */
    min-block-size: var(--alasadi-touch-target);
    min-inline-size: var(--alasadi-touch-target);
  }

  textarea { resize: vertical; }

  table {
    border-collapse: collapse;
    inline-size: 100%;
  }

  th { text-align: start; }

  fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-inline-size: 0;
  }

  legend { padding: 0; }

  hr {
    border: 0;
    border-block-start: var(--alasadi-border-width) solid var(--alasadi-rule);
    margin-block: var(--alasadi-space-7);
  }

  /*
   * Focus is never removed. The default ring is replaced in base.css with a
   * stronger monochrome ring, not with nothing.
   */
  :focus-visible { outline: revert; }

  [hidden] { display: none !important; }
}
