/*
  Reset
---------------------------------------------- */

/* Global */
*,
::before,
::after {
  box-sizing: border-box;
  min-inline-size: 0;
  padding: 0;
  margin: 0;
  border-width: 1px;
}

:root {
  scrollbar-gutter: stable;

  &:has(:modal) {
    overflow: hidden;
  }
}

/* Document & Sections */
:where(html) {
  font-family: var(--base-font-family);
  font-weight: var(--base-font-weight);
  line-break: strict;
  overflow-wrap: anywhere;
  line-height: var(--base-line-height);
  color: var(--base-color);
  background-color: var(--base-background);
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:where(body) {
  min-block-size: 100svb;
  overflow-x: clip;
}

/* Scroll margin */
:root {
  --base-scroll-margin: 62px;
}

@media (min-width: 768px) {
  :root {
    --base-scroll-margin: 72px;
  }
}

:where(section) {
  scroll-margin-block-start: var(--base-scroll-margin);
}

:where(ul, ol) {
  list-style-type: "";
}

/* Text-level semantics */
:where(em, address) {
  font-style: normal;
}

:where(strong) {
  font-weight: 700;
  color: var(--base-strong-color);
}

:where(:any-link) {
  color: unset;
}

:where(a) {
  text-decoration: none;
}

/* Embedded content */
:where(img, svg, iframe) {
  display: block flow;
}

:where(img, picture, svg) {
  max-inline-size: 100%;
  block-size: auto;
}

/* Tabular data */
:where(table) {
  border-collapse: collapse;
}

/* Forms */
:where(input, button, textarea, select, optgroup) {
  color: unset;
  letter-spacing: inherit;
  word-spacing: inherit;
  font: unset;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
}

:where(textarea) {
  resize: vertical;
  resize: block;
}

:where(button, label, select, summary) {
  cursor: pointer;
}

:where(dialog, [popover]) {
  max-inline-size: unset;
  max-block-size: unset;
  margin: auto;
  color: unset;
  background-color: unset;
  border-style: none;
}

:where(dialog:not([open], [popover]), [popover]:not(:popover-open)) {
  display: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *:before,
  *:after,
  ::backdrop {
    transition-delay: unset !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: unset !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    view-transition-name: none !important;
  }
}

:where(.visually-hidden:not(:focus-within, :active)) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  user-select: none !important;
  border: 0 !important;
}