@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --hair: #00000026;
  --pad: clamp(16px, 4vw, 48px);
  --maxw: 1200px;
  --radius: 28px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Merriweather, Georgia, 'Songti SC', 'Noto Serif CJK SC', serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

h1, h2, h3 {
  font-family: 'Abril Fatface', Merriweather, Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0;
}

p { margin: 0 0 1.1em; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a, summary, button { -webkit-tap-highlight-color: transparent; }

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

/* ——— 顶栏 ——— */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px var(--pad);
  padding-inline: max(var(--pad), calc((100% - var(--maxw)) / 2));
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.brand {
  font-family: 'Abril Fatface', Merriweather, Georgia, serif;
  font-size: clamp(22px, 3.6vw, 32px);
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.dock {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fold { position: relative; }

.fold > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.22s ease, color 0.22s ease;
}

.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "＋"; font-size: 16px; }
.fold[open] > summary::after { content: "－"; }
.fold > summary:hover { background: var(--ink); color: var(--paper); }

.fold > menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: min(78vw, 264px);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 20px;
}

.fold > menu > li > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 16px;
  text-decoration: none;
  border-radius: 14px;
  transition: background 0.22s ease, color 0.22s ease;
}

.fold > menu > li > a:hover { background: var(--ink); color: var(--paper); }

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.22s ease, color 0.22s ease;
}

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

/* ——— 粘性锚点条 ——— */
.belt {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.belt-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 0 var(--pad);
  scrollbar-width: none;
}

.belt-nav::-webkit-scrollbar { display: none; }

.belt-nav a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 16px;
  text-decoration: none;
  border-left: 1px solid var(--hair);
  transition: background 0.22s ease, color 0.22s ease;
}

.belt-nav a:first-child { border-left: 0; }
.belt-nav a:hover { background: var(--ink); color: var(--paper); }

/* ——— 主区 ——— */
.stage {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  min-height: 45vh;
  padding: clamp(22px, 4vw, 48px) 0;
}

.hero-art {
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4 / 3;
}

.hero-art .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy { text-align: right; }

.hero-copy h1 {
  font-size: clamp(32px, 5.6vw, 64px);
  letter-spacing: 0.005em;
}

.lead {
  margin: 16px 0 0;
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.65;
}

.slashband {
  height: clamp(14px, 2.4vw, 24px);
  background: var(--ink);
  clip-path: polygon(0 55%, 100% 0, 100% 45%, 0 100%);
  margin: 6px 0 clamp(22px, 4vw, 40px);
}

.split {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(40px, 6vw, 80px);
}

/* ——— 左栏 ——— */
.rail {
  align-self: start;
  position: sticky;
  top: 64px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px 16px 22px;
}

.rail h2 {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.rail hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 12px 0 14px;
}

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

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  transition: padding-left 0.22s ease, background 0.22s ease;
}

.rail-nav a:hover { padding-left: 10px; background: var(--paper); }

.rail-nav i {
  font-style: normal;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}

/* ——— 正文 ——— */
.prose { min-width: 0; }

.prose article {
  border-top: 2px solid var(--ink);
  padding-top: clamp(20px, 3vw, 32px);
  margin-bottom: clamp(34px, 5vw, 60px);
  scroll-margin-top: 92px;
}

.prose article:first-child { border-top: 0; padding-top: 0; }
.prose article:last-child { margin-bottom: 0; }

.prose h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 16px 0 22px;
}

.prose h3 {
  font-size: clamp(20px, 2.8vw, 26px);
  margin: 30px 0 12px;
}

.prose h3 + hr { margin-top: 12px; }

.prose a {
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: background 0.22s ease;
}

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

.prose ul, .prose ol { padding-left: 1.35em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.45em; }

.prose img {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  margin: 22px 0;
}

.prose figure { margin: 22px 0; }
.prose figcaption { font-size: 16px; margin-top: 8px; }

.prose blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 20px;
  border-left: 5px solid var(--ink);
  font-size: 1.02em;
}

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

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

.prose code, .prose pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
}

.prose pre {
  border: 1px solid var(--ink);
  border-radius: 18px;
  padding: 16px;
  overflow-x: auto;
}

.prose time {
  display: inline-block;
  font-size: 16px;
  border-bottom: 1px dashed var(--ink);
  margin-bottom: 14px;
}

/* ——— 页脚 ——— */
.colophon {
  border-top: 2px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding: 26px var(--pad) 26px;
  padding-inline: max(var(--pad), calc((100% - var(--maxw)) / 2));
}

.foot-brand a {
  font-family: 'Abril Fatface', Merriweather, Georgia, serif;
  font-size: clamp(30px, 6vw, 60px);
  line-height: 1;
  text-decoration: none;
  display: block;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.22s ease;
}

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

.foot-legal {
  display: flex;
  align-items: center;
  gap: 18px;
}

.foot-legal p { margin: 0; font-size: 16px; }

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

/* ——— 动效 ——— */
.js-anim .prose article,
.js-anim .hero-copy {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js-anim .in {
  opacity: 1;
  transform: none;
}

@keyframes railIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

.js-anim .rail-nav li { animation: railIn 0.5s ease both; }
.js-anim .rail-nav li:nth-child(1) { animation-delay: 0.04s; }
.js-anim .rail-nav li:nth-child(2) { animation-delay: 0.10s; }
.js-anim .rail-nav li:nth-child(3) { animation-delay: 0.16s; }
.js-anim .rail-nav li:nth-child(4) { animation-delay: 0.22s; }
.js-anim .rail-nav li:nth-child(5) { animation-delay: 0.28s; }
.js-anim .rail-nav li:nth-child(6) { animation-delay: 0.34s; }
.js-anim .rail-nav li:nth-child(7) { animation-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .prose article,
  .js-anim .hero-copy { opacity: 1; transform: none; transition: none; }
  .js-anim .rail-nav li { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ——— 窄屏 ——— */
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .rail-nav ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-nav a { border-bottom: 1px solid var(--hair); }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 20px;
    padding-top: 20px;
  }
  .hero-copy { text-align: left; }
  .hero-art { aspect-ratio: 16 / 10; }
  .cta { padding: 0 16px; }
  .foot-nav { gap: 0 16px; }
  .colophon { justify-content: flex-start; }
}

@media (max-width: 460px) {
  .rail-nav ol { grid-template-columns: minmax(0, 1fr); }
  .fold > menu { right: auto; left: 0; }
}

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