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

html {
  min-width: 20rem;
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: clip;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1,
h2,
.editorial-title,
.rank-number {
  font-family: var(--font-editorial);
  font-weight: 600;
}

h1 {
  max-width: 16ch;
  margin-block-end: var(--space-6);
  font-size: var(--text-h1);
  line-height: .96;
}

h2 {
  margin-block-end: var(--space-6);
  font-size: var(--text-h2);
  line-height: 1.02;
}

h3 {
  margin-block-end: var(--space-4);
  font-size: var(--text-title-ui);
  line-height: 1.2;
}

p {
  text-wrap: pretty;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
}

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

::selection {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  inset: var(--space-3) auto auto var(--space-3);
  padding: var(--space-4) var(--space-5);
  translate: 0 -180%;
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 700;
}

.skip-link:focus {
  translate: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
