@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

:root {
  --paper: #ffffff;
  --wash: #f5f5f5;
  --ink: #1f1f1f;
  --ink-soft: #565656;
  --line: #e5e5e5;
  --line-strong: #d2d2d2;
  --r: 10px;
  --pill: 999px;
  --gut: clamp(16px, 3.2vw, 34px);
  --shell: 1240px;
  --font-body: "DM Sans", "Nunito", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-head: "Nunito", "DM Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: .01em;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.26;
  letter-spacing: -.012em;
  margin: 0;
}

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
ol, ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

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

/* ---------- 顶部主体 ---------- */
.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.masthead__row {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px var(--gut);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

.pillnav ol { display: flex; gap: 8px; flex-wrap: wrap; }
.pillnav--b ol { justify-content: flex-end; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.pill:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-1px); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .02em;
  text-decoration: none;
  padding: 6px 4px;
  min-height: 40px;
}

.brand__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
}

.masthead__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  justify-self: end;
  min-width: 0;
}

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--wash);
  padding: 3px 4px 3px 14px;
  min-height: 42px;
}

.search__label { font-size: 15px; color: var(--ink-soft); white-space: nowrap; }

.search__input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  width: 88px;
  padding: 6px 8px 6px 0;
  min-height: 34px;
}
.search__input:focus { outline: none; }

/* ---------- 粘性锚点条 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 245, 245, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.rail__nav {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 8px var(--gut);
}

.rail__nav ol {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.rail__nav ol::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--paper);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.chip:hover { background: var(--wash); }
.chip[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- 页面主体 ---------- */
.page {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gut) 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(26px, 5vw, 52px) 0;
}

.hero__art {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.hero__ghost {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(120px, 26vw, 300px);
  line-height: .78;
  letter-spacing: -.05em;
  color: rgba(31, 31, 31, .055);
  transform: translateY(-4%);
  user-select: none;
}

.hero__copy {
  position: relative;
  z-index: 1;
  text-align: right;
  max-width: 780px;
}

.hero__kicker {
  display: inline-block;
  font-size: 14px;
  letter-spacing: .3em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.hero__title {
  font-size: clamp(30px, 6vw, 62px);
  line-height: 1.14;
  margin: 0 0 14px;
}

.hero__lead {
  margin: 0 0 0 auto;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 17px;
}

/* ---------- 正文 + 侧栏 ---------- */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

.board__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.board__body > section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(18px, 2.4vw, 30px);
  scroll-margin-top: 108px;
  min-width: 0;
}

.board__body > section:nth-child(3n+1) { grid-column: 1 / -1; }
.board__body > section:nth-child(3n+2) { background: #fbfbfb; }

.board__body > section > small,
.board__body small {
  display: inline-block;
  font-size: 14px;
  letter-spacing: .2em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.board__body h2 { font-size: clamp(21px, 2.1vw, 27px); margin: 0 0 12px; }
.board__body h3 { font-size: 19px; margin: 20px 0 8px; }
.board__body small + h2, .board__body small + h3 { margin-top: 2px; }

.board__body a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.board__body a:hover { background: var(--wash); }

.board__body ul, .board__body ol { padding-left: 0; margin: 0 0 14px; }
.board__body li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
}
.board__body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.board__body li:last-child { margin-bottom: 0; }

/* ---------- 侧栏 ---------- */
.side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 72px;
  align-self: start;
}

.side__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
}

.side__card small {
  display: block;
  font-size: 14px;
  letter-spacing: .2em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.side__card h3 { font-size: 18px; margin: 0 0 12px; }

.side__nav ol { display: grid; gap: 4px; }

.sidenav {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  text-decoration: none;
}
.sidenav:hover { background: var(--wash); border-color: var(--line); }

.side__top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

/* ---------- 页脚 ---------- */
.foot {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 26px var(--gut) 38px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.foot__brand { display: grid; gap: 10px; }

.foot__logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.sub {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--paper);
  padding: 3px 4px 3px 14px;
  min-height: 42px;
}

.sub__label { font-size: 15px; color: var(--ink-soft); }
.sub__input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  width: 118px;
  min-width: 0;
  padding: 6px 0;
  min-height: 34px;
}
.sub__input:focus { outline: none; }

.sub__btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  border-radius: var(--pill);
  padding: 7px 15px;
  min-height: 34px;
  cursor: pointer;
  transition: opacity .18s ease;
}
.sub__btn:hover { opacity: .82; }

.foot__nav ol { display: flex; flex-wrap: wrap; gap: 2px 16px; }

.footlink {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footlink:hover { border-bottom-color: var(--ink); }

.foot__meta { display: grid; gap: 4px; justify-items: end; text-align: right; }
.foot__copy { margin: 0; font-size: 15px; color: var(--ink-soft); }
.foot__links { margin: 0; display: flex; gap: 16px; }
.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.foot__links a:hover { border-bottom-color: var(--ink); }

/* ---------- 滚动显现 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.22, .7, .3, 1);
  will-change: opacity, transform;
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .pill:hover { transform: none; }
}

/* ---------- 断点 ---------- */
@media (max-width: 1080px) {
  .masthead__row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px var(--gut);
  }
  .brand { order: -2; justify-self: center; }
  .masthead__tools { justify-self: stretch; justify-content: space-between; flex-wrap: nowrap; }
  .pillnav { min-width: 0; flex: 1 1 auto; }
  .pillnav--b { order: 2; }
  .pillnav ol {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .pillnav ol::-webkit-scrollbar { display: none; }
  .pillnav--b ol { justify-content: flex-start; }
  .search { flex: 0 0 auto; }
  .search__input { width: 74px; }
}

@media (max-width: 960px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side__nav ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .hero {
    min-height: 40vh;
    justify-content: flex-start;
    align-items: flex-end;
  }
  .hero__copy { text-align: left; }
  .hero__lead { margin-left: 0; max-width: 100%; }
  .hero__art { align-items: flex-start; }
  .hero__ghost { transform: translateY(6%); opacity: .9; }
  .board__body { grid-template-columns: minmax(0, 1fr); }
  .board__body > section { grid-column: 1 / -1; }
  .side__nav ol { grid-template-columns: minmax(0, 1fr); }
  .foot { flex-direction: column; align-items: stretch; gap: 18px; }
  .foot__meta { justify-items: start; text-align: left; }
  .foot__nav ol { gap: 2px 14px; }
  .sub__input { width: 100%; }
}

@media (max-width: 400px) {
  .search { display: none; }
}

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