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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.85;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { line-height: 1.35; font-weight: 600; }
h1 { font-size: var(--fs-h1); margin: 0 0 8px; }
h2 { font-size: var(--fs-h2); margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
h3 { font-size: var(--fs-h3); margin: 32px 0 8px; }
h4 { font-size: var(--fs-body); margin: 24px 0 4px; }

p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 1.6em; }
li { margin-bottom: 6px; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 600; }
small, .small { font-size: var(--fs-small); }
.muted { color: var(--ink-2); }

hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0 24px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-weight: 600; border-bottom: 1px solid var(--line-strong); }
td.r, th.r { text-align: right; }

blockquote {
  margin: 16px 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--line-strong);
  color: var(--ink-2);
}

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

button {
  font: inherit;
  cursor: pointer;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
}

input, select, textarea { font: inherit; color: inherit; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 8px; top: 8px; z-index: 100;
  transform: translateY(-200%);
  transition: transform var(--speed, 150ms) ease;
  background: var(--surface); color: var(--accent);
  padding: 8px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-ctl);
}
.skip-link:focus { transform: translateY(0); }
