/* Browser-default normalisation, in the lowest cascade layer so that every
   component rule wins over it whatever its specificity, even a zero-specificity
   :where() one. These are the defaults a component starts from, never
   something it has to out-specify. This file sorts first in the application
   folder, so declaring the layer here fixes its place beneath the components
   layer tooltips.css uses. The marketing layout links this file on its own:
   it wants the neutral defaults but not the opinions in _reset.css. */
@layer base {
  *,
  ::before,
  ::after,
  ::backdrop,
  ::file-selector-button {
    border: 0 solid;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    -webkit-tap-highlight-color: transparent;
    tab-size: 4;
  }

  hr {
    block-size: 0;
    border-block-start-width: 1px;
    color: inherit;
  }

  abbr:where([title]) {
    text-decoration: underline dotted;
  }

  /* Headings take their size and weight from the component that places
     them; nothing in the app wants the UA's 2em bold h1. */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: inherit;
    font-weight: inherit;
  }

  /* Links are styled by their component (or by base.css for bare ones). */
  a {
    color: inherit;
    text-decoration: inherit;
  }

  code,
  kbd,
  samp,
  pre {
    font-family: var(--font-mono);
    font-size: 1em;
  }

  small {
    font-size: 80%;
  }

  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }

  sub {
    inset-block-end: -0.25em;
  }

  sup {
    inset-block-start: -0.5em;
  }

  table {
    border-collapse: collapse;
    border-color: inherit;
    text-indent: 0;
  }

  :-moz-focusring {
    outline: auto;
  }

  progress {
    vertical-align: baseline;
  }

  summary {
    display: list-item;
  }

  ol,
  ul,
  menu {
    list-style: none;
  }

  img,
  svg,
  video,
  canvas,
  audio,
  iframe,
  embed,
  object {
    display: block;
    vertical-align: middle;
  }

  img,
  video {
    block-size: auto;
    max-inline-size: 100%;
  }

  /* Form controls inherit typography and colour instead of shipping the
     UA's own; components add back what they need. */
  button,
  input,
  select,
  optgroup,
  textarea,
  ::file-selector-button {
    background-color: transparent;
    border-radius: 0;
    color: inherit;
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    opacity: 1;
  }

  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  ::file-selector-button {
    margin-inline-end: 4px;
  }

  textarea {
    resize: vertical;
  }

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-date-and-time-value {
    min-block-size: 1lh;
    text-align: inherit;
  }

  ::-webkit-datetime-edit {
    display: inline-flex;
  }

  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }

  ::-webkit-datetime-edit,
  ::-webkit-datetime-edit-year-field,
  ::-webkit-datetime-edit-month-field,
  ::-webkit-datetime-edit-day-field,
  ::-webkit-datetime-edit-hour-field,
  ::-webkit-datetime-edit-minute-field,
  ::-webkit-datetime-edit-second-field,
  ::-webkit-datetime-edit-millisecond-field,
  ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }

  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }

  :-moz-ui-invalid {
    box-shadow: none;
  }

  button,
  input:where([type="button"], [type="reset"], [type="submit"]),
  ::file-selector-button {
    appearance: button;
  }

  ::-webkit-inner-spin-button,
  ::-webkit-outer-spin-button {
    block-size: auto;
  }

  /* The hidden attribute must beat any display a component sets — panels
     are toggled with it while still carrying their .flex or .grid class.
     Layered !important still outranks every unlayered normal declaration. */
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
