/* Drawer and toggle stack inside .header's context, so .header is what has to
   beat the backdrop. Ceiling stays low so plugin overlays, which usually sit
   at 1000+, land above everything of ours. */
:root {
  --z-dropdown: 100;
  --z-backdrop: 200;
  --z-header: 300;
  --z-drawer: 400;
  --z-toggle: 500;
  --z-popup: 600;
}

/* Deliberately not theme.json palette entries: those show up in the block
   editor's colour picker, and validation states are not something a client
   picks per block. */
:root {
  --color-error: #c0392b;
  --color-success: #1e7a4b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  font-optical-sizing: auto;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body,
html {
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

img,
svg {
  border-style: none;
  display: block;
  height: auto;
  margin: 0;
  max-width: 100%;
}

::selection {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}

/* WP core emits this class in its own markup — without the rule that text
   shows up on screen. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  word-wrap: normal;
}

.screen-reader-text:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 15px 23px;
  overflow: visible;
  clip-path: none;
  background-color: var(--wp--preset--color--base);
  color: var(--wp--preset--color--contrast);
}

:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 2px;
}
input,
textarea,
select {
  vertical-align: middle;
  font-family: var(--wp--preset--font-family--body);
}
textarea {
  resize: none;
}
form,
fieldset {
  margin: 0;
  padding: 0;
  border-style: none;
}
figure {
  margin: 0;
}
a {
  text-decoration: none;
  cursor: pointer;
  color: inherit;
}
button {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--wp--preset--font-family--body);
  cursor: pointer;
}

input,
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
