/*
 * Reset, normalize and remedy, all smushed together.
 *
 * https://github.com/jensimmons/cssremedy
 * https://github.com/clagnut/TODS
 * https://piccalil.li/blog/a-more-modern-css-reset
 */

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

* {
  font-family: inherit;
  font-size: inherit;
  margin: 0;
  outline-offset: max(0.0625rem, 1px);
  padding: 0;
  text-decoration-thickness: from-font;
}

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

:root {
  color-scheme: light dark;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    Inter,
    sans-serif;
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  font-variant-ligatures: common-ligatures no-discretionary-ligatures
    no-historical-ligatures contextual;
  hanging-punctuation: first allow-end last;
  hyphenate-character: '‐'; /* Unambiguous hyphen U+2010 */
  hyphenate-limit-chars: auto 2 3;
  interpolate-size: allow-keywords;
  letter-spacing: 0;
  margin: 0;
  orphans: 2;
  overflow-wrap: break-word;
  padding: 0;
  print-color-adjust: exact;
  tab-size: 2;
  text-align: start;
  text-decoration-skip-ink: auto;
  text-rendering: optimizeLegibility;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  text-underline-position: from-font;
  text-wrap: pretty;
}

[hidden] {
  display: none;
}

body {
  inline-size: 100%;
  min-block-size: 100vb;
}

button,
figcaption,
h1,
h2,
h3,
h4,
h5,
h6,
input,
label {
  text-wrap: balance;
}

ul:not([role='list']) {
  list-style-type: disc;
}

ol:not([role='list']),
ul:not([role='list']) {
  padding-inline-start: 1em;
}

ol[role='list'],
ul[role='list'] {
  list-style-type: none;
}

b,
strong {
  font-weight: bolder;
}

em,
i,
var {
  font-style: italic;
}

:is(em, i) > :is(em, i) {
  font-style: normal;
}

code,
kbd,
pre,
samp {
  font-family: ui-monospace, monospace;
  hyphens: none;
  text-align: start;
  word-spacing: normal;
  word-wrap: normal;
}

pre:has(code) {
  max-inline-size: 100%;
  overflow-x: auto;
  overflow-inline: auto;
  inline-size: max-content;
}

abbr {
  text-decoration: none;
}

hr {
  border-inline: 0;
  box-sizing: content-box;
  height: 0;
}

audio,
canvas,
embed,
figure,
iframe,
img,
object,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  vertical-align: middle; /* If `display` value is overridden */
}

img {
  height: auto;
  shape-margin: 1rem; /* If floated */

  /* If providing low-res preview via `style` attribute */
  background-repeat: no-repeat;
  background-size: cover;
}

img[alt] {
  font-style: italic;
}

audio:not([controls]) {
  display: none;
}

audio {
  width: 100%;
}

canvas,
img,
picture,
svg,
video {
  border-style: none;
  height: auto;
}

picture {
  display: contents;
}

source {
  display: none;
}

fieldset {
  border: 0;
  min-inline-size: 0;
}

input,
textarea {
  hanging-punctuation: none;
}

input,
button,
textarea,
select {
  touch-action: manipulation;
}

small {
  font-size: 0.85em;
}
