:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1a1917;
  --muted: #5f5c56;
  --rule: #e4e1db;
  --accent: #8a5a2b;
  --code-bg: #f2efe9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16151a;
    --surface: #1e1d23;
    --text: #eceaf0;
    --muted: #a3a0ab;
    --rule: #322f3a;
    --accent: #d9a066;
    --code-bg: #26242c;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 1.25rem 5rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 44rem;
  margin: 0 auto;
}

header {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.mark {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.15rem;
  margin: 2.75rem 0 0.6rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 0.95rem;
  margin: 1.75rem 0 0.4rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p, li { color: var(--text); }

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0;
}

ul { padding-left: 1.15rem; }
li { margin: 0.4rem 0; }

code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin: 1.25rem 0;
}

.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

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

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

footer a { margin-right: 1.1rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.94rem;
  display: block;
  overflow-x: auto;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th { color: var(--muted); font-weight: 600; white-space: nowrap; }
