/* Element defaults. Every value is a token. */

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

html {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-size: var(--t-17);
  font-weight: var(--w-regular);
  line-height: var(--lh-text);
  font-variant-numeric: lining-nums tabular-nums;
  text-align: start;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  line-height: var(--lh-display);
}

h1 {
  font-size: var(--t-33);
}

h2 {
  font-size: var(--t-26);
}

h3 {
  font-size: var(--t-21);
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

p {
  max-inline-size: var(--measure);
}

/* Every figure is set in the text face with tabular lining numerals, even
   inside an Amiri heading: ar() isolates each figure in a <bdi>. */
:is(h1, h2, h3) bdi {
  font-family: var(--font-text);
  font-variant-numeric: lining-nums tabular-nums;
}

ul,
ol {
  padding: 0;
}

a {
  color: var(--patina-ink);
  text-decoration-line: underline;
  text-decoration-thickness: var(--line);
  text-underline-offset: var(--s-4);
}

/* The focus ring: drawn with the accent, everywhere, never removed. */
:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

[hidden] {
  display: none !important;
}

/* Form controls do not inherit type by default; figures in them must. */
button,
input,
select {
  font-variant-numeric: inherit;
}

img,
canvas {
  display: block;
  max-inline-size: 100%;
}

strong {
  font-weight: var(--w-bold);
}

.vh {
  position: absolute;
  inline-size: var(--line);
  block-size: var(--line);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.page {
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--s-16);
  inset-block-start: var(--s-16);
  z-index: var(--z-overlay);
  padding: var(--s-8) var(--s-16);
  background: var(--raised);
  color: var(--ink);
  border: var(--line) solid var(--hairline);
  border-radius: var(--r-control);
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: var(--t-15);
}
