:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #e4ddd2;
  --paper: #f6f1e8;
  --card: #fffdf9;
  --accent: #6b3f2a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Source Han Serif SC", serif;
  line-height: 1.75;
}
a { color: var(--accent); }

/* One column. Brand, nav, title and body share the same left edge. */
.sheet {
  width: min(680px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 48px;
}
.brand {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
nav.site {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 22px;
  margin: 18px 0 0;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 15px;
}
nav.site a {
  color: var(--ink);
  text-decoration: none;
  padding: 0;
}
nav.site a.current {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  padding-bottom: 12px;
  margin-bottom: -14px;
}
h1 {
  font-weight: 500;
  font-size: 36px;
  line-height: 1.25;
  margin: 26px 0 8px;
}
h2 { font-weight: 500; font-size: 22px; margin: 28px 0 8px; }
.lede, .meta { color: var(--muted); margin: 0; }
section.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 28px 28px;
  margin-top: 20px;
}
ul { padding-left: 1.2em; }
li { margin: 6px 0; }
footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 13px;
}
.lang {
  margin-top: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Cached first version: nav was a full-width sibling, title sat in a centered column. */
body > header,
body > nav.site,
body > main,
body > footer {
  width: min(680px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}
body > nav.site { padding-left: 0; padding-right: 0; }

@media (max-width: 640px) {
  .sheet { width: min(680px, calc(100% - 32px)); }
  h1 { font-size: 30px; }
  section.card { padding: 4px 18px 20px; }
  nav.site { gap: 8px 16px; }
}
