:root {
  --bg: #f4efe6;
  --bg-elev: #fffdf8;
  --ink: #1c1a16;
  --muted: #6b6458;
  --line: #ddd4c6;
  --accent: #9a3b22;
  --accent-soft: #f3e4dc;
  --max: 42rem;
  --sans: "IBM Plex Sans", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
img { max-width: 100%; }

.wrap { width: min(100% - 2.4rem, 72rem); margin: 0 auto; }
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 0 1.2rem;
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--sans); color: var(--ink); letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.brand-title {
  display: block;
  font-size: 1.35rem;
  font-weight: 650;
  margin-top: 0.15rem;
}
nav { display: flex; gap: 1.15rem; font-family: var(--sans); font-size: 0.92rem; }
nav a { color: var(--ink); }

main { padding: 2.4rem 0 3.5rem; }
.hero { max-width: 46rem; margin-bottom: 2.6rem; }
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 0.9rem;
}
.lede { font-size: 1.12rem; color: var(--muted); margin: 0; }

.note-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.note-list li { border-bottom: 1px solid var(--line); }
.note-list a.row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  color: inherit;
}
.note-list a.row:hover { text-decoration: none; }
.note-list a.row:hover h2 { color: var(--accent); }
.meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 0.35rem;
}
.note-list h2 { font-size: 1.22rem; line-height: 1.35; margin: 0 0 0.35rem; font-weight: 600; }
.summary { margin: 0; color: var(--muted); font-size: 0.98rem; }

article.note { max-width: var(--max); }
.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.7rem;
}
article.note h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); line-height: 1.25; margin: 0 0 0.7rem; }
.dek { font-size: 1.08rem; color: var(--muted); margin: 0 0 0.8rem; }
article.note .meta { margin-bottom: 2rem; }
.prose p { margin: 0 0 1.15rem; }
.prose h2 { font-size: 1.25rem; margin: 2rem 0 0.7rem; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1.3rem 1.4rem;
  margin: 2.2rem 0 0;
}
.panel h2 { margin: 0 0 0.5rem; font-size: 1.1rem; font-family: var(--sans); }
.panel p { margin: 0; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2.2rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .note-list a.row { grid-template-columns: 1fr; gap: 0.2rem; }
}
