:root {
  --paper: #fdfbf7;
  --wash: #f5f5f5;
  --ink: #1a1a1a;
  --rule: #e0e0e0;
  --soft: #6a655f;
  --radius: 4px;
  --sans: "Open Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --head: "Poppins", "Open Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.topbar__wing ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar__wing--l ul {
  justify-content: flex-start;
}

.topbar__wing--r ul {
  justify-content: flex-end;
}

.topbar__wing a {
  display: block;
  padding: 12px 10px;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  border-radius: var(--radius);
}

.topbar__wing a:hover {
  background: var(--ink);
  color: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 8px;
  font-family: var(--head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 5px;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid var(--ink);
  border-radius: 2px;
  letter-spacing: 0;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: 44px 20px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 4px solid var(--ink);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.hero--img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.46);
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 46ch;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-family: var(--head);
  font-size: clamp(26px, 4.6vw, 42px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.03em;
}

/* ---------- 主体骨架 ---------- */

.frame {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 66px;
}

.rail {
  position: sticky;
  top: 102px;
  padding: 16px 15px 10px;
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.rail__title {
  margin: 0 0 3px;
  font-family: var(--head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.subtitle {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--soft);
}

.rail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.rail li {
  border-bottom: 1px solid var(--rule);
}

.rail a {
  display: block;
  padding: 11px 2px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
}

.rail a:hover {
  color: var(--soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

main {
  min-width: 0;
}

.sheet {
  display: block;
}

.lead {
  max-width: 60ch;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
  margin-bottom: 22px;
}

/* ---------- 正文块 ---------- */

.prose > section {
  scroll-margin-top: 96px;
  margin: 0 0 20px;
  padding: 24px 22px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.prose > section:last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 0 0 14px;
  font-family: var(--head);
  font-size: clamp(21px, 2.5vw, 27px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.prose h3 {
  margin: 22px 0 10px;
  font-family: var(--head);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
}

.prose p {
  margin: 0 0 14px;
  max-width: 68ch;
}

.prose p:last-child,
.prose ul:last-child,
.prose ol:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
}

.prose li {
  margin: 0 0 6px;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  margin: 0 0 14px;
  padding: 10px 16px;
  background: var(--wash);
  border-left: 3px solid var(--ink);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}

.prose table {
  width: 100%;
  margin: 0 0 14px;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 9px 10px;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--wash);
  font-weight: 600;
}

.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 15px;
  background: var(--wash);
  padding: 1px 5px;
  border-radius: 2px;
}

/* ---------- 页脚 ---------- */

.base {
  padding: 42px 20px 22px;
  background: var(--wash);
  border-top: 4px solid var(--ink);
}

.base__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand--foot {
  padding: 0;
  font-size: 17px;
}

.base__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.base__col li {
  border-bottom: 1px solid var(--rule);
}

.base__col a {
  display: block;
  padding: 11px 0;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
}

.base__col a:hover {
  color: var(--soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.base__cap {
  margin: 0 0 10px;
  font-family: var(--head);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.base__addr {
  font-style: normal;
  font-size: 16px;
  line-height: 1.6;
  color: var(--soft);
  word-break: break-all;
}

.base__copy {
  max-width: 1180px;
  margin: 30px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 16px;
  line-height: 1.5;
  color: var(--soft);
  text-align: center;
}

/* ---------- 回顶 ---------- */

.toTop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  padding: 12px 15px;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}

.toTop.is-off {
  opacity: 0;
  pointer-events: none;
}

/* ---------- 动效 ---------- */

@media (prefers-reduced-motion: no-preference) {
  a,
  .toTop {
    transition: background-color 0.12s linear, color 0.12s linear, opacity 0.15s linear;
  }

  html.js .prose > section {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.16s linear, transform 0.16s linear;
  }

  html.js .prose > section.is-in {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  a,
  .toTop {
    transition: none;
  }
}

/* ---------- 断点 ---------- */

@media (max-width: 980px) {
  .frame {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 22px;
  }

  .rail {
    position: static;
  }

  .rail ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
    border-top: 0;
  }

  .rail li {
    border-bottom: 1px solid var(--rule);
  }

  .prose > section {
    scroll-margin-top: 176px;
  }

  .base__grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr 1fr;
    padding: 6px 12px;
    gap: 2px;
  }

  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
    letter-spacing: 0.2em;
  }

  .topbar__wing {
    grid-row: 2;
  }

  .topbar__wing a {
    padding: 11px 8px;
  }

  .hero {
    min-height: 45vh;
    padding: 40px 18px;
  }

  .frame {
    padding: 20px 16px 52px;
  }

  .prose > section {
    padding: 20px 16px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 17px;
  }

  .base {
    padding: 34px 16px 20px;
  }

  .base__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .toTop {
    right: 12px;
    bottom: 12px;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
