@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --fog: #f5f5f5;
  --line: #e2e2e2;
  --mute: #6d6d6d;
  --serif: "Playfair Display", "Source Serif 4", "Songti SC", "Noto Serif SC", Georgia, serif;
  --body: "Source Serif 4", "Songti SC", "Noto Serif SC", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "Courier New", monospace;
  --e1: 0 1px 2px rgba(31, 31, 31, .06), 0 1px 1px rgba(31, 31, 31, .04);
  --e2: 0 4px 10px rgba(31, 31, 31, .07), 0 14px 26px -14px rgba(31, 31, 31, .16);
  --e3: 0 10px 24px rgba(31, 31, 31, .09), 0 30px 58px -26px rgba(31, 31, 31, .22);
  --e4: 0 20px 46px rgba(31, 31, 31, .12), 0 52px 96px -40px rgba(31, 31, 31, .3);
  --r: 28px;
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--fog);
  background-image: linear-gradient(180deg, #ffffff 0, #f5f5f5 340px, #f5f5f5 100%);
}

a { color: inherit; }

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

.frame {
  position: relative;
  overflow-x: clip;
}

/* ---------- 顶部细条 ---------- */
.strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 14px;
  background: var(--ink);
  color: #f4f4f4;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .22em;
}

.strip-mark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f4f4f4;
  flex: none;
}

/* ---------- 页头 ---------- */
.masthead {
  position: relative;
  z-index: 3;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.masthead-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 21px;
  letter-spacing: .1em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--e2);
  border-radius: 999px;
  background: var(--paper);
  position: relative;
  z-index: 2;
}

.brand:hover { box-shadow: var(--e3); }

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

.nav-l ol { justify-content: flex-start; }
.nav-r ol { justify-content: flex-end; }

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 16px;
  text-decoration: none;
  color: #3a3a3a;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after { transform: scaleX(1); }

/* ---------- 粘性锚点条 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--e1);
}

.rail-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 10px;
}

.rail-nav ol {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail-nav ol::-webkit-scrollbar { display: none; }

.rail-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  color: #4d4d4d;
  border-bottom: 2px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px 10px;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
  overflow: hidden;
}

.hero-ghost {
  position: absolute;
  right: 4px;
  top: -4%;
  z-index: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(120px, 26vw, 300px);
  line-height: .78;
  letter-spacing: -.05em;
  color: #ececec;
  pointer-events: none;
  will-change: transform;
}

.hero-media {
  position: relative;
  z-index: 1;
  min-height: clamp(240px, 46vh, 520px);
  border-radius: var(--r);
  overflow: hidden;
  background: #ededed;
  box-shadow: var(--e4);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: right;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -.02em;
  text-align: right;
}

.hero-rule {
  border: 0;
  border-top: 3px solid var(--ink);
  width: 84px;
  margin: 0 0 18px auto;
}

.hero-lede {
  margin: 0 0 0 auto;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.8;
  color: #3d3d3d;
}

/* ---------- 正文骨架 ---------- */
.main { position: relative; z-index: 1; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 20px 44px;
}

.ledger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}

.paper { min-width: 0; }

.paper > section {
  position: relative;
  z-index: 1;
  margin: 0 0 26px;
  padding: 34px clamp(18px, 3vw, 40px);
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 3px solid var(--ink);
  box-shadow: var(--e2);
  scroll-margin-top: 78px;
  transition: box-shadow .4s ease, transform .4s ease;
}

.paper > section:nth-child(even) { margin-left: 22px; }
.paper > section:last-child { margin-bottom: 0; }

.paper > section:hover {
  box-shadow: var(--e3);
  transform: translateY(-3px);
}

.paper h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.18;
  letter-spacing: -.01em;
}

.paper h2 + hr {
  border: 0;
  border-top: 2px solid var(--ink);
  width: 56px;
  margin: 0 0 20px;
}

.paper h3 {
  margin: 28px 0 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.3;
}

.paper p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.85;
}

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

.paper ul,
.paper ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.paper li { margin: 6px 0; line-height: 1.8; }

.paper a {
  text-decoration: none;
  border-bottom: 1px solid #bcbcbc;
  transition: border-color .3s ease;
}

.paper a:hover { border-bottom-color: var(--ink); }

.paper img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 20px;
  box-shadow: var(--e2);
}

.paper figure { margin: 20px 0; }
.paper figure img { margin: 0; }

.paper blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  background: var(--fog);
  border-left: 3px solid var(--ink);
  border-radius: 0 18px 18px 0;
  color: #3a3a3a;
}

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

.paper hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 64px;
  z-index: 2;
  padding: 24px 22px 22px;
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 3px solid var(--ink);
  box-shadow: var(--e3);
}

.side-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
}

.side-rule {
  border: 0;
  border-top: 2px solid var(--ink);
  width: 40px;
  margin: 0 0 14px;
}

.side-list {
  counter-reset: s;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.side-list li { counter-increment: s; }

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  color: #3b3b3b;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color .3s ease, padding-left .3s ease;
}

.side-list li:last-child a { border-bottom: 0; }

.side-list a::before {
  content: counter(s, decimal-leading-zero);
  margin-right: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: #8d8d8d;
}

.side-list a:hover,
.side-list a:focus-visible {
  color: var(--ink);
  padding-left: 6px;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 17px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  box-shadow: var(--e2);
  transition: transform .3s ease, box-shadow .3s ease;
}

.to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--e3);
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 44px clamp(20px, 5vw, 64px);
  background: var(--ink);
  color: #f2f2f2;
}

.foot-brand { justify-self: start; }

.foot-logo {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 5.6vw, 56px);
  line-height: 1;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: none;
}

.foot-logo:hover { color: #d9d9d9; }

.foot-nav ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 16px;
  color: #e2e2e2;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
}

.foot-copy { justify-self: end; text-align: center; }

.foot-copy p {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .1em;
  color: #adadad;
}

.foot a:focus-visible { outline-color: #fff; }

/* ---------- 断点 ---------- */
@media (max-width: 980px) {
  .ledger { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; order: 2; }
  .paper > section:nth-child(even) { margin-left: 0; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 18px 20px 6px;
  }
  .hero-copy { order: 1; }
  .hero-media { order: 2; min-height: 240px; border-radius: 22px; }
  .hero-ghost { top: auto; bottom: 30%; font-size: clamp(96px, 32vw, 190px); }
}

@media (max-width: 760px) {
  .masthead-in {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 2px;
    padding: 10px 12px;
  }
  .brand { order: -1; font-size: 22px; }
  .nav { width: 100%; }
  .nav ol { justify-content: center; }
  .nav-l ol { justify-content: center; }
  .nav a { padding: 10px 10px; }
  .wrap { padding: 30px 14px 30px; }
  .paper > section { padding: 24px 18px 26px; border-radius: 22px; scroll-margin-top: 66px; }
  .hero { padding: 14px 14px 6px; }
  .hero-copy h1 { font-size: clamp(30px, 8.4vw, 44px); }
  .hero-lede { font-size: 16px; }
  .foot {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 14px;
    padding: 34px 16px;
  }
  .foot-brand,
  .foot-copy { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
  .hero-ghost { transform: none !important; }
  .paper > section:hover { transform: none; }
}

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