@font-face {
  font-family: "Estonia";
  src: url("/fonts/Estonia-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Averia Libre";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url("/fonts/AveriaLibre-Regular-300.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Averia Libre";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url("/fonts/AveriaLibre-Regular-300.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Averia Libre";
  font-style: italic;
  font-weight: bold;
  font-display: swap;
  src: url("/fonts/AveriaLibre-Italic-700.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Averia Libre";
  src: url("/fonts/AveriaLibre-Regular-700.woff2") format("woff2");
  font-style: italic;
  font-weight: bold;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-heading-h1: Estonia, cursive;
  --font-heading-h2:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";

  --font-prose:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  --font-body:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  --font-sans:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  --font-mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --color-slate-200: oklch(92.9% 0.013 255.508);
  --color-slate-500: oklch(55.4% 0.046 257.417);
  --color-slate-600: oklch(44.6% 0.043 257.281);
  --color-slate-700: oklch(37.2% 0.044 257.287);
  --color-slate-800: oklch(27.9% 0.041 260.031);
  --color-gray-200: oklch(92.8% 0.006 264.531);
  --color-gray-300: oklch(87.2% 0.01 258.338);
  --color-gray-400: oklch(70.7% 0.022 261.325);
  --color-gray-500: oklch(55.1% 0.027 264.364);
  --color-gray-600: oklch(44.6% 0.03 256.802);
  --color-gray-700: oklch(37.3% 0.034 259.733);
  --color-gray-800: oklch(27.8% 0.033 256.848);
  --color-gray-900: oklch(21% 0.034 264.665);
  --spacing: 0.25rem;
  --container-2xl: 42rem;
  --container-3xl: 48rem;
  --container-4xl: 56rem;
  --container-6xl: 72rem;
  --container-7xl: 80rem;
  --text-xs: 0.75rem;
  --text-xs--line-height: calc(1 / 0.75);
  --text-sm: 0.875rem;
  --text-sm--line-height: calc(1.25 / 0.875);
  --text-base: 1rem;
  --text-base--line-height: calc(1.5 / 1);
  --text-lg: 1.125rem;
  --text-lg--line-height: calc(1.75 / 1.125);
  --text-xl: 1.25rem;
  --text-xl--line-height: calc(1.75 / 1.25);
  --text-2xl: 1.5rem;
  --text-2xl--line-height: calc(2 / 1.5);
  --text-3xl: 1.875rem;
  --text-3xl--line-height: calc(2.25 / 1.875);
  --text-4xl: 2.25rem;
  --text-4xl--line-height: calc(2.5 / 2.25);
  --text-5xl: 3rem;
  --text-5xl--line-height: 1;
  --text-6xl: 3.75rem;
  --text-6xl--line-height: 1;
  --text-8xl: 6rem;
  --text-8xl--line-height: 1;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;
  --tracking-tight: -0.025em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --leading-tight: 1.25;
  --leading-relaxed: 1.625;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  --blur-sm: 8px;
  --blur-lg: 16px;
  --blur-xl: 24px;
  --blur-3xl: 64px;
  --default-transition-duration: 150ms;
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  --default-font-family: var(--font-body);
  --default-mono-font-family: var(--font-mono);
}

@view-transition {
  navigation: auto;
}

* {
  box-sizing: border-box;
}

body {
  max-width: 80rem;
  margin: auto;
  padding: 1rem;
}

img,
video {
  max-width: 100%;
  height: auto;
}

body {
  line-height: 1.7;
  color: var(--fallback-bc, oklch(var(--bc) / 1));
  font-size: 16px;
  font-family:
    var(--default-font-family),
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-feature-settings:
    "liga" 1,
    "kern" 1;
  min-height: 100vh;
}

h1 {
  font-family: var(--font-heading-h1);
  font-size: var(--text-8xl);
  line-height: var(--text-8xl--line-height);
  font-variant-alternates: swash(fancy);
  margin: 0.5em;
  justify-content: center;
  display: flex;
}

h2 {
  font-family: var(--font-heading-h2);
  font-size: var(--text-3xl);
  line-height: var(--text-3xl--line-height);
  letter-spacing: -0.035em;
  margin-top: calc(var(--spacing) * 16);
  margin-bottom: calc(var(--spacing) * 8);
}

h3 {
  margin-top: calc(var(--spacing) * 12);
  margin-bottom: calc(var(--spacing) * 6);
  font-size: var(--text-2xl);
  line-height: var(--text-2xl--line-height);
  letter-spacing: -0.02em;
}

h4 {
  font-size: inherit;
  font-family: inherit;
  font-weight: bold;
  line-height: inherit;
  margin-bottom: 1rem;
  & ~ p {
    margin-top: 0;
  }
}

h5 {
  font-size: inherit;
  font-family: inherit;
  font-weight: 600;
  line-height: inherit;
  margin-bottom: 0;
  display: inline;
  &::after {
    content: ".";
  }
  & ~ p {
    display: inline;
    margin-top: 0;
    &::after {
      display: block;
      content: " ";
      margin-bottom: 1rem;
    }
  }
}

.search {
  input {
    padding: 0.5em;
  }

  .search-results {
    display: none;
    position: absolute;
    margin-top: 0.5rem;
    background: white;
    border: 2px solid black;
    color: black;
    padding: 1rem;
    overflow: auto;
    max-height: 50vh;
    max-width: 50vw;
    transform: translateX(-50%);
  }

  .search-results__items {
    list-style: none;
  }

  .search-results__item {
    margin-bottom: 1rem;
  }
}

main nav {
  margin-bottom: 4rem;

  .menu,
  .toc {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1rem;

    li {
      &.active {
        a {
          color: inherit;
          text-decoration: none;
        }
      }
    }
  }

  .menu {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .toc {
    font-size: 1rem;
    line-height: 1.1;
    flex-wrap: wrap;
  }

  .toc-details {
    white-space: nowrap;
  }
}

main p {
  font-family: var(--font-prose);
  margin-top: 0;
  margin-bottom: 1rem;
}

main table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.3;

  th {
    white-space: nowrap;
    vertical-align: bottom;
  }
  td {
    vertical-align: top;
  }
  td,
  th {
    border: 1px solid white;
    padding: 5px;
  }
  tr:nth-child(even) {
    background: #e7eef580;
  }
  td:nth-child(even) {
    background: #efeeef80;
  }
  thead {
    border-bottom: 2px solid #33333380;
  }
  thead th {
    font-weight: bold;
  }
  tfoot {
    font-weight: bold;
    border-top: 2px solid #33333380;
  }
}

.footnote-definition {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid black;

  display: flex;
  gap: 1rem;

  p {
    margin: 0;
  }

  & ~ .footnote-definition {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
}
