/* Base: design tokens, reset, and typography. Shared by every page. */

:root {
  --bg: #fdfdfb;
  --text: #111;
  --muted: #666;
  --rule: #ddd;
  --code-bg: #f2f2ee;
  --error: #a00;

  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --size-body: 16px;
  --size-small: 14px;
  --size-h1: 22px;
  --size-h2: 18px;
}

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

/* Keep the hidden attribute working even on elements styled with display. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.7;
}

h1,
h2 {
  line-height: 1.3;
  text-wrap: balance;
}

h1 { font-size: var(--size-h1); margin: 0 0 16px; }
h2 { font-size: var(--size-h2); margin: 40px 0 12px; }

p { margin: 0 0 20px; }

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

a:hover { text-decoration-thickness: 2px; }

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

code,
pre {
  font-family: inherit;
}

pre {
  background: var(--code-bg);
  padding: 16px;
  overflow-x: auto;
}

blockquote {
  margin: 0 0 20px;
  padding-left: 16px;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

.muted,
time {
  color: var(--muted);
}
