:root {
  color-scheme: light;
  --paper: #f3efe4;
  --paper-raised: #faf7ef;
  --paper-deep: #e8e1d3;
  --ink: #22231f;
  --ink-soft: #494940;
  --editorial-muted: #747166;
  --rule: #cec7b8;
  --rule-strong: #969286;
  --editorial-accent: #9d402f;
  --editorial-accent-hover: #742f24;
  --editorial-accent-soft: #ead8ce;
  --code-surface: #e7e0d3;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--editorial-accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

code {
  background: var(--code-surface);
  border-radius: 2px;
}

::selection {
  background: var(--editorial-accent-soft);
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
