html {
  font-size: 16px;
  scroll-padding-top: var(--space-x-large);
  scrollbar-color: gray transparent;
  scrollbar-width: thin;
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  background: var(--color-canvas);
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-graphik);
  font-feature-settings: 'liga', 'ss05';
  font-size: var(--font-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-style: normal;
  font-weight: 400;
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

body.theme-1 {
  --oklch-canvas: var(--oklch-theme-1);
  --color-canvas: oklch(var(--oklch-theme-1));
}

body.theme-2 {
  --oklch-canvas: var(--oklch-theme-2);
  --color-canvas: oklch(var(--oklch-theme-2));
}

body.theme-3 {
  --oklch-canvas: var(--oklch-theme-3);
  --color-canvas: oklch(var(--oklch-theme-3));
}

body.theme-4 {
  --oklch-canvas: var(--oklch-theme-4);
  --color-canvas: oklch(var(--oklch-theme-4));
}

body.theme-5 {
  --oklch-canvas: var(--oklch-theme-5);
  --color-canvas: oklch(var(--oklch-theme-5));
}

body.theme-6 {
  --oklch-canvas: var(--oklch-theme-6);
  --color-canvas: oklch(var(--oklch-theme-6));
}

a {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: var(--text-decoration-thickness);
  text-underline-offset: var(--text-underline-offset);
}

b,
strong {
  font-weight: 600;
}

i,
em {
  font-style: italic;
}

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

button,
input {
  color: var(--color-ink);
  font-family: var(--font-family-graphik);
  font-feature-settings: 'liga', 'ss05';
  font-size: inherit;
  font-weight: 400;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
}

code {
  background: oklch(var(--oklch-ink) / 0.05);
  border: max(1px, 0.05em) solid oklch(var(--oklch-ink) / 0.1);
  border-radius: calc(var(--border-radius) / 3);
  font-family: var(--font-family-berkeley);
  font-feature-settings: normal;
  font-size: var(--font-size);
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  padding-block: 0.0875em;
  padding-inline: 0.3125em;
  word-break: break-word;
}

u {
  background: url('/assets/images/general/underline.svg') bottom center / 100% 0.2em no-repeat;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding-bottom: 0.1em;
  text-decoration: none;
}



@media(hover: hover) {

  a {
    transition:
      color var(--transition),
      text-decoration-color var(--transition)
    ;
  }

  a:focus,
  a:hover {
    color: var(--color-ink);
    text-decoration-color: var(--color-ink);
  }

}
