html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family--body);
  font-size: var(--font-size--body);
  font-weight: var(--font-weight--normal);
  line-height: var(--line-height--base);
  color: var(--color--aaa-text);
  font-feature-settings: var(--font-features--body);
}

:where(h1, h2, h3, h4, strong) {
  font-weight: var(--font-weight--bold);
}

:where(h1, h2, h3, h4, h5, h6) {
  /* color: var(--color--aaa-high-contrast-text) */
}

h1 {
  text-wrap: balance;
  text-wrap: pretty;
}

h1, .as-h1 {
  font-size: 1.75rem;
}

h2, .as-h2 {
  font-size: 1.5rem;
}

h3, .as-h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

h4, .as-h4 {
  font-size: 1rem;
}

h5, .as-h5 {
  font-size: 0.875rem;
  font-weight: var(--font-weight--medium);
}

h6, .as-h6 {
  font-size: 0.65rem;
  font-weight: var(--font-weight--medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

a {
  text-underline-offset: 5px;
  text-decoration-color: var(--color--border-high-contrast);
  color: var(--color--link);

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

ul { padding-inline-start: 1.5rem; }

ol { padding-inline-start: 1.56rem; }

/* ----------------------------------------------------------------
 * ! FORMS */

label {
  font-size: var(--font-size--ui);
  /* font-weight: var(--font-weight--medium); */
  text-align: left;
}

input { font-size: var(--font-size--body); }

legend {
  font-size: var(--font-size--body);
  font-weight: var(--font-weight--bold);
}

/* ----------------------------------------------------------------
 * ! CODE */

kbd {
  width: fit-content;
  padding: 0.2rem 0.3rem;
  font-size: 14px;
  font-weight: var(--font-weight--light);
  line-height: 1;
  color: var(--color--aa-text);
  text-decoration: none !important;
  border: 1px solid var(--color--border-low-contrast);
  border-radius: 4px;
  opacity: 0.8;
  &.physical { /* background-color: var(--color--bg-1); */
    box-shadow: 0 3px 0 var(--color--border-low-contrast); }
}

code,
kbd,
.mono {
  font-family: var(--font-family--mono);
}

.inspect {
  font-family: var(--font-family--mono);
  font-size: 0.66rem;
  color: var(--color--aa-text);
  background-color: transparent;
}

kbd.glyphs { font-family: Inter, system-ui, ui-monospace, Menlo, monospace !important; }

p code,
li code,
:where(.lexxy-content) code:not(:where(pre code, [data-language])) {
  font-size: var(--font-size--ui);
  font-weight: var(--font-weight--normal);
  line-height: 1;
  padding-inline: 0.3em;
  padding-block: 1px;
  color: var(--color--aaa-high-contrast-text);
  background-color: var(--color--bg-2);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

code, pre {
  font-size: var(--font-size--ui);
  background-color: var(--color--bg-1);
}

/* ----------------------------------------------------------------
 * ! MISC */

hr {
  width: 100%;
  margin-block: 1rem;
  border: none;
  border-bottom: var(--border--light);
}

.inline-detail {
  font-weight: var(--font-weight--normal);
  color: var(--color--border-mid-contrast);
}

.text-sm {
  font-size: var(--font-size--small)
}
