:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --ink: #20252b;
  --muted: #66717b;
  --line: #d9d5cc;
  --accent: #315e54;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #ece9e2;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
}

body > main {
  width: min(920px, calc(100% - 32px));
  margin: 32px auto;
  padding: clamp(28px, 6vw, 76px);
  background: var(--paper);
  box-shadow: 0 12px 40px rgb(0 0 0 / 12%);
}

.article-nav {
  width: min(920px, calc(100% - 32px));
  margin: 24px auto -16px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font: 600 .9rem/1.4 system-ui, sans-serif;
}

.article-nav a { text-decoration: none; }
.article-nav a:hover { text-decoration: underline; }

h1, h2, h3 {
  color: #162b27;
  font-family: system-ui, sans-serif;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin-top: 0; }
h2 { margin-top: 3.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }

p, li { max-width: 76ch; }
a { color: var(--accent); }

pre {
  overflow-x: auto;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--accent);
  background: #f0eee8;
}

code { font-family: "DejaVu Sans Mono", monospace; font-size: .9em; }

table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: .92rem;
}

th, td { padding: .65rem .8rem; border: 1px solid var(--line); text-align: left; }
th { background: #e8ece8; }

figure { margin: 2.5rem 0; }
figure img { display: block; width: 100%; height: auto; background: #0d1220; }
figcaption { margin-top: .7rem; color: var(--muted); font: .9rem/1.45 system-ui, sans-serif; }

.draft-note {
  margin: 0 0 2rem;
  padding: .75rem 1rem;
  border: 1px solid #c9a95f;
  background: #fff4d8;
  font: .9rem/1.4 system-ui, sans-serif;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .article-nav { width: calc(100% - 32px); margin: 16px auto; }
  body > main { width: 100%; margin: 0; box-shadow: none; }
}
