@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --ash: #6d6d6d;
  --serif: "Calistoga", "Songti SC", Georgia, serif;
  --sans: "Inter", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --gut: clamp(16px, 4vw, 56px);
  --wide: 1240px;
}

*,
*::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: 400 17px/1.75 var(--sans);
  letter-spacing: 0.004em;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }

/* 顶部主条：品牌缩成角落图标，CTA 靠右 */
.masthead {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px var(--gut);
}

.mark {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
}

.mark img { width: 100%; height: 100%; object-fit: cover; }
.mark-ch { font-family: var(--serif); font-size: 23px; line-height: 1; }

.cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cta:hover { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 2px var(--paper); }

/* 二级粘性锚点条 */
.anchors {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.anchors ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchors ul::-webkit-scrollbar { display: none; }
.anchors li { flex: none; border-right: 1px solid var(--ink); }
.anchors li:first-child { border-left: 1px solid var(--ink); }

.anchors a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

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

/* 主体：侧栏在左，正文在右 */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 236px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gut) 80px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 76px;
  background: var(--ink);
  color: var(--paper);
  padding: 24px 20px 26px;
  margin-top: clamp(28px, 5vw, 64px);
}

.rail h2 {
  font-size: 25px;
  line-height: 1.1;
  margin: 0;
}

.rail .subtitle {
  margin: 4px 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: #9c9c9c;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: railc;
}

.rail-list li {
  counter-increment: railc;
  border-top: 1px solid rgba(255, 255, 255, 0.26);
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 0;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}

.rail-list a::before {
  content: counter(railc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: #8b8b8b;
}

.rail-list a:hover { color: #bdbdbd; }

/* 首屏 */
.copy { min-width: 0; padding-top: clamp(20px, 3vw, 40px); }

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 26px;
  padding: clamp(30px, 7vh, 78px) 0 0;
  background-image: radial-gradient(var(--ink) 0.9px, transparent 0.9px);
  background-size: 22px 22px;
}

.hero-txt {
  background: var(--paper);
  padding: clamp(14px, 2.4vw, 26px) 0;
}

.kicker {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.hero h1 {
  font-size: clamp(38px, 8vw, 100px);
  line-height: 0.98;
  margin: 0 0 18px;
  max-width: 15ch;
}

.standfirst {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
}

.hero-fig {
  margin: 0;
  border-top: 10px solid var(--ink);
  overflow: hidden;
  min-height: 130px;
}

.hero-fig img {
  width: 100%;
  height: 114%;
  top: -7%;
  position: relative;
  object-fit: cover;
  will-change: transform;
}

/* 正文区：page.content 直接落在 section 里 */
.copy > article {
  border-top: 10px solid var(--ink);
  padding: clamp(36px, 6vw, 76px) 0;
  scroll-margin-top: 88px;
}

.copy > article:nth-of-type(even) {
  background: var(--ink);
  color: var(--paper);
  padding-left: clamp(16px, 3vw, 34px);
  padding-right: clamp(16px, 3vw, 34px);
}

.copy > article h2 {
  font-size: clamp(28px, 4.4vw, 54px);
  line-height: 1.04;
  margin: 0 0 14px;
}

.copy > article h3 {
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
  margin: 1.5em 0 0.6em;
}

.copy > article p { margin: 0 0 1.1em; max-width: 62ch; }
.copy > article p:last-child { margin-bottom: 0; }

.copy > article .subtitle,
.copy > article .lead,
.copy > article .desc {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  margin: 0 0 24px;
  opacity: 0.72;
}

.copy > article > p:not(.subtitle):not(.lead):not(.desc):first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.5em;
  line-height: 0.8;
  padding: 0.08em 0.12em 0 0;
}

.copy > article ul,
.copy > article ol {
  padding-left: 1.25em;
  max-width: 60ch;
  margin: 0 0 1.2em;
}

.copy > article li { margin-bottom: 0.4em; }

.copy > article blockquote {
  margin: 1.7em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 6px solid currentColor;
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 29px);
  line-height: 1.35;
  max-width: 34ch;
}

.copy > article blockquote p { max-width: none; }

.copy > article figure { margin: 1.7em 0; }
.copy > article figcaption {
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 8px;
  opacity: 0.68;
}

.copy > article a { text-decoration: underline; text-underline-offset: 3px; }

.copy > article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 0 0 1.3em;
}

.copy > article th,
.copy > article td {
  border-bottom: 1px solid currentColor;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.copy > article strong { font-weight: 700; }
.copy > article code { font-family: var(--mono); font-size: 0.94em; }

/* 页脚 */
.foot {
  border-top: 12px solid var(--ink);
  padding: clamp(30px, 5vw, 58px) var(--gut) 34px;
}

.foot-in {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  max-width: var(--wide);
  margin: 0 auto;
}

.foot-id { font-style: normal; max-width: 46ch; }
.foot-name { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); line-height: 1.2; }
.foot-desc { margin: 10px 0 0; font-size: 16px; opacity: 0.78; }

.foot-nav { display: flex; gap: 28px; }
.foot-nav dl { margin: 0; flex: 1 1 0; }

.foot-nav dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 6px;
  opacity: 0.6;
}

.foot-nav dd { margin: 0; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
}

.foot-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

.foot-big {
  font-family: var(--serif);
  font-size: clamp(50px, 13.5vw, 172px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  margin: clamp(24px, 4vw, 46px) auto 16px;
  max-width: var(--wide);
  word-break: break-word;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  border-top: 3px solid var(--ink);
  padding-top: 14px;
  max-width: var(--wide);
  margin: 0 auto;
}

.foot-base small { font-size: 16px; letter-spacing: 0.02em; }

.foot-base ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-base a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
}

.foot-base a:hover { text-decoration: underline; text-underline-offset: 3px; }

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 20px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: 500 16px/1 var(--sans);
  letter-spacing: 0.03em;
  cursor: pointer;
}

.totop:hover { background: #222; }

/* 滚动显现 */
.js .copy > article {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .copy > article.in { opacity: 1; transform: none; }

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

/* 移动端 */
@media (max-width: 860px) {
  .shell {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 56px;
  }

  .copy { order: 1; padding-top: 0; }
  .rail { order: 2; position: static; margin-top: 40px; padding: 20px 16px 22px; }
  .rail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

  .hero { min-height: auto; padding-top: 30px; padding-bottom: 0; }
  .hero h1 { max-width: none; }
  .hero-fig { max-height: 52vh; }

  .foot-in { grid-template-columns: 1fr; }
  .foot-big { font-size: clamp(40px, 15vw, 90px); }
}

@media (max-width: 380px) {
  .anchors a { padding: 0 12px; }
  .foot-nav { gap: 18px; }
}

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