/* ============================================
           TYPOGRAPHY
        ============================================ */

body {
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.65em;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--rt-text);
}

h1 {
  font-size: clamp(2rem, 3vw, 3.25rem);
}

h2 {
  font-size: clamp(1.7rem, 2.3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.4rem, 1.9vw, 2rem);
}

h4 {
  font-size: clamp(1.15rem, 1.5vw, 1.5rem);
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--rt-text);
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--rt-text);
}

ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

li + li {
  margin-top: 0.35rem;
}

ul ul,
ul ol,
ol ul,
ol ol {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

strong,
b {
  font-weight: 900;
  color: var(--rt-text);
}

em {
  font-style: italic;
}

small {
  font-size: 0.875em;
  color: var(--rt-muted);
}

mark {
  padding: 0.08em 0.28em;
  border-radius: 0;
  background: rgba(var(--rt-warning-rgb), 0.18);
  color: var(--rt-text);
}

u {
  text-decoration-color: rgba(var(--rt-primary-rgb), 0.75);
  text-underline-offset: 0.14em;
}

hr {
  margin: 1.25rem 0;
  border: 0;
  border-top: 1px solid var(--rt-border);
}

blockquote {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--rt-primary);
  border-radius: 0;
  background: rgba(var(--rt-primary-rgb), 0.06);
  color: var(--rt-text);
}

blockquote p {
  margin-bottom: 0;
}

code,
kbd,
samp {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-size: 0.92em;
}

code {
  padding: 0.16em 0.42em;
  border: 1px solid var(--rt-border);
  border-radius: 0;
  background: rgba(var(--rt-primary-rgb), 0.08);
  color: var(--rt-primary);
  word-break: break-word;
}

pre {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  overflow: auto;
  border: 1px solid var(--rt-border);
  border-radius: 0;
  background: var(--rt-surface-solid);
  color: var(--rt-text);
}

pre code {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  white-space: pre;
}

kbd {
  display: inline-block;
  padding: 0.14em 0.45em;
  border: 1px solid var(--rt-border);
  border-bottom-width: 2px;
  border-radius: 0;
  background: var(--rt-surface-solid);
  color: var(--rt-text);
}

sub,
sup {
  font-size: 0.75em;
  line-height: 0;
}

sup {
  vertical-align: super;
}

sub {
  vertical-align: sub;
}

::selection {
  background: rgba(var(--rt-primary-rgb), 0.22);
  color: var(--rt-text);
}

