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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  text-rendering: optimizeLegibility;
}

body.has-open-dialog {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
summary,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-link-hover);
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
li,
dd,
td,
th {
  overflow-wrap: break-word;
}

:where(h1, h2, h3, [tabindex="-1"]) {
  scroll-margin-top: 6rem;
}

:where(h1, h2) {
  text-wrap: balance;
}

:where(p, li) {
  text-wrap: pretty;
}

::selection {
  background: var(--brand-sea-glass);
  color: var(--brand-evergreen-950);
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: var(--z-skip-link);
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-focus);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  color: var(--brand-evergreen-950);
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}
