:root {
  color-scheme: light;
  --ink: #101216;
  --muted: #6a707a;
  --paper: #fbfaf7;
  --line: rgba(16, 18, 22, .1);
  --orange: #f5a623;
  --blue: #3678f6;
  --green: #2fba85;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(16,18,22,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,18,22,.028) 1px, transparent 1px),
    linear-gradient(180deg, #fff 0%, #f6f8fb 54%, #fffaf4 100%);
  background-size: 44px 44px, 44px 44px, auto;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.nav {
  position: sticky;
  z-index: 80;
  top: 16px;
  width: min(1160px, calc(100% - 32px));
  height: 58px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  border: 1px solid rgba(255, 255, 255, .84);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 18px 50px rgba(16, 18, 22, .08);
  backdrop-filter: blur(24px) saturate(1.2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
}
.brand img { width: 31px; height: 31px; border-radius: 50%; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(16,18,22,.64);
  font-size: 14px;
  font-weight: 760;
}
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: rgba(16,18,22,.06);
}
.nav-cta, .btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.nav-cta, .btn.dark {
  color: #fff;
  background: #111318;
  border-color: #111318;
}
.btn:disabled { opacity: .48; cursor: not-allowed; }

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.page-head {
  padding: 92px 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}
.eyebrow {
  margin: 0 0 12px;
  color: rgba(16,18,22,.52);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: 0;
}
.lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(16,18,22,.66);
  font-size: 18px;
  line-height: 1.75;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  color: rgba(16,18,22,.52);
  font-size: 14px;
  font-weight: 760;
}
.post-list {
  display: grid;
  gap: 12px;
  padding: 0 0 84px;
}
.post-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 18px 54px rgba(16,18,22,.06);
}
.post-card:hover { border-color: rgba(16,18,22,.2); transform: translateY(-1px); }
.post-card h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.25;
  letter-spacing: 0;
}
.post-card p {
  margin: 12px 0 0;
  color: rgba(16,18,22,.64);
  line-height: 1.75;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 14px;
  color: rgba(16,18,22,.46);
  font-size: 13px;
  font-weight: 720;
}
.empty, .notice {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
  color: rgba(16,18,22,.62);
  line-height: 1.7;
}

.form {
  display: grid;
  gap: 16px;
  max-width: 760px;
  padding-bottom: 90px;
}
.field {
  display: grid;
  gap: 8px;
}
.field span {
  font-weight: 900;
  color: rgba(16,18,22,.76);
}
.input, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  padding: 13px 14px;
  color: var(--ink);
  outline: none;
}
.input:focus, .textarea:focus {
  border-color: rgba(54,120,246,.54);
  box-shadow: 0 0 0 4px rgba(54,120,246,.1);
}
.textarea {
  min-height: 240px;
  line-height: 1.75;
  resize: vertical;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.article {
  max-width: none;
  padding: 46px 0 96px;
}
.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 38px;
  align-items: start;
}
.article-layout.no-toc {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}
.article-main {
  min-width: 0;
}
.article-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 14px 44px rgba(16,18,22,.05);
}
.toc-title {
  margin-bottom: 10px;
  color: rgba(16,18,22,.48);
  font-size: 12px;
  font-weight: 900;
}
.toc-link {
  display: block;
  padding: 7px 0;
  color: rgba(16,18,22,.62);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}
.toc-link:hover {
  color: var(--ink);
}
.toc-link.level-3 {
  padding-left: 12px;
  font-weight: 650;
}
.article-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.article-body {
  display: grid;
  gap: 18px;
  margin-top: 26px;
  color: #24272f;
  font-size: 18px;
  line-height: 1.9;
  white-space: normal;
}
.article-body p { margin: 0; }
.article-body h2,
.article-body h3 {
  margin: 12px 0 -4px;
  color: var(--ink);
  letter-spacing: 0;
}
.article-body h2 {
  font-size: 28px;
  line-height: 1.28;
}
.article-body h3 {
  font-size: 21px;
  line-height: 1.38;
}
.article-body ul {
  margin: 0;
  padding-left: 22px;
}
.article-body li {
  margin: 6px 0;
}
.article-figure {
  width: min(320px, 100%);
  margin: 10px auto 20px;
}
.article-figure img {
  width: auto;
  max-width: 100%;
  max-height: 64vh;
  margin: 0 auto;
  border: 1px solid rgba(16,18,22,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 18px 54px rgba(16,18,22,.08);
}
.article-figure figcaption {
  margin-top: 8px;
  color: rgba(16,18,22,.52);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
.site-footer {
  padding: 34px 20px 42px;
  text-align: center;
  color: rgba(16,18,22,.52);
  background: rgba(255,255,255,.72);
  border-top: 1px solid rgba(16,18,22,.08);
  font-size: 13px;
  font-weight: 650;
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}
.site-footer a { color: rgba(16,18,22,.66); }

@media (max-width: 760px) {
  .nav { top: 12px; width: calc(100% - 20px); }
  .nav-links { display: none; }
  .page-head { grid-template-columns: 1fr; padding-top: 70px; align-items: start; }
  .page-head .btn { width: max-content; }
  h1 { font-size: clamp(34px, 11vw, 46px); }
  .shell { width: min(960px, calc(100% - 22px)); }
  .article { padding-top: 32px; }
  .article-layout { display: block; }
  .article-toc { display: none; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 24px; }
  .article-body h3 { font-size: 19px; }
  .article-figure { width: min(300px, 100%); }
}
