:root {
  --paper: #f4f1ea;
  --ink: #1c1917;
  --muted: #5e5852;
  --line: #ddd6cb;
  --cobalt: #0143b5;
  --cobalt-soft: #e7eef8;
  --warn: #6b4e16;
  --warn-bg: #f6edd8;
  --max: 68rem;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  text-wrap: pretty;
}

a { color: var(--cobalt); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.brand small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--cobalt); }

.layout {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 3.5rem;
  padding: 3.25rem 0 4.5rem;
}

.side {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.side strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.side p { margin: 0.85rem 0 0; }

h1 {
  margin: 0 0 0.6rem;
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.en {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  font-size: 1.05rem;
}

.lede {
  margin: 0 0 1.75rem;
  font-size: 1.2rem;
  line-height: 1.65;
  max-width: 38rem;
}

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

p { margin: 0 0 1rem; max-width: 40rem; }

ol.steps {
  margin: 0.4rem 0 1.2rem;
  padding: 0;
  list-style: none;
  max-width: 40rem;
  counter-reset: step;
}

ol.steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  counter-increment: step;
}

ol.steps li:last-child { border-bottom: 1px solid var(--line); }

ol.steps li::before {
  content: counter(step);
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
  font-family: "Iowan Old Style", Palatino, serif;
  padding-top: 0.12rem;
}

.draft {
  margin: 0 0 1.6rem;
  padding: 0.85rem 1rem;
  background: var(--warn-bg);
  color: var(--warn);
  max-width: 40rem;
  font-size: 0.95rem;
}

.meta {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.foot a { color: var(--muted); }

@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 2rem;
  }
  .side { position: static; }
  .top { align-items: flex-start; flex-direction: column; gap: 0.4rem; }
}
