/* base.css — reset, page ground, and typography for the languages site. Colour lives only in tokens.css; no hex codes here. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font: var(--t-body)/1.55 var(--font-text);
  max-width: 68ch;
  margin-inline: auto;
  margin-block-start: 0;
  margin-block-end: 0;
  padding-inline: var(--s2);
  padding-block: var(--s4);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-text);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  margin-block-start: 0;
  margin-block-end: var(--s2);
}

h1 {
  font-size: var(--t-h1);
  line-height: 1.2;
}

h2 {
  font-size: var(--t-h2);
  line-height: 1.25;
}

h3 {
  font-size: var(--t-h3);
  line-height: 1.3;
}

p,
ul,
ol {
  margin-block-start: 0;
  margin-block-end: var(--s2);
}

ul,
ol {
  padding-inline-start: var(--s3);
}

a {
  color: var(--ink);
  text-underline-offset: 2px;
  transition: color var(--motion-fast);
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

code,
pre {
  font-family: var(--font-code);
  font-size: var(--t-small);
}

code {
  border-radius: var(--radius-lg);
  padding-inline: var(--s1);
  overflow-wrap: break-word;
}

pre {
  margin-block: 0;
  line-height: 1.5;
}

hr {
  border: 0;
  border-block-start: 1px solid var(--rule);
  margin-block: var(--s3);
}

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

table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--t-small);
}

th,
td {
  text-align: left;
  padding: var(--s1);
  border-block-end: 1px solid var(--rule);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
