@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@400;500;600;700&family=Public+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --paper: #fdfbf7;
  --ash: #f5f5f5;
  --ink: #1a1a1a;
  --line: #e0e0e0;
  --mute: #5f5b55;
  --rail: 268px;
  --pad: clamp(20px, 4vw, 56px);
  --serif: 'Libre Bodoni', 'Songti SC', 'Noto Serif SC', 'STSong', Georgia, serif;
  --sans: 'Public 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%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  letter-spacing: 0.012em;
  overflow-x: hidden;
}

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

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

.page { min-height: 100vh; }

/* 左侧竖排导航 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 30px 24px 36px;
  border-right: 1px solid var(--line);
  background: var(--ash);
  overflow-y: auto;
}

.masthead { border-bottom: 1px solid var(--ink); padding-bottom: 16px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.44rem;
  line-height: 1.1;
  letter-spacing: 0.06em;
}

.wordmark { border-bottom: 2px solid var(--ink); padding-bottom: 4px; }

.logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

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

.rail-nav li + li { border-top: 1px dotted #d5d1ca; }

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 8px;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.4;
  border-left: 3px solid transparent;
}

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

.rail-nav a.is-active {
  border-left-color: var(--ink);
  font-weight: 600;
  background: var(--paper);
}

.rail-nav a.is-active:hover { background: var(--ink); }

/* 右侧舞台 */
.stage {
  margin-left: var(--rail);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--pad) 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.strip-mark {
  font-size: 0.875rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--mute);
  white-space: nowrap;
}

.strip-line { flex: 1 1 auto; height: 1px; background: var(--line); }

main { flex: 1 0 auto; }

section {
  max-width: 880px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* 正文分区卡片 */
section > article {
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(22px, 3.4vw, 44px);
  margin: 0 0 clamp(22px, 3vw, 38px);
  scroll-margin-top: 36px;
}

section > article:last-of-type { margin-bottom: 0; }

section > article h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.55em;
}

section > article h3 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.4;
  font-weight: 600;
  margin: 1.6em 0 0.5em;
}

section > article p { margin: 0 0 1.05em; }
section > article p:last-child { margin-bottom: 0; }
section > article ul,
section > article ol { padding-left: 1.3em; margin: 0 0 1.05em; }
section > article li { margin: 0 0 0.4em; }

section > article a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

section > article a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

section > article blockquote {
  margin: 1.3em 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.08em;
}

/* 主视觉 */
.hero {
  margin-inline: calc(var(--pad) * -1);
  margin-bottom: clamp(24px, 4vw, 48px);
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  text-align: center;
  padding: var(--pad);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background-color: transparent;
  background-image: radial-gradient(#ded9d1 1px, transparent 1px);
  background-size: 23px 23px;
  scroll-margin-top: 0;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 8.2vw, 6.2rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  max-width: 18ch;
  overflow-wrap: anywhere;
}

.cue {
  margin: 0;
  font-size: 0.875rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--mute);
}

/* 引言 */
.lede { border-left: 3px solid var(--ink); }

h2 + .subtitle,
p.subtitle {
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--mute);
  max-width: 46ch;
  margin: 0;
}

/* 页脚 */
footer {
  flex: 0 0 auto;
  margin-top: clamp(40px, 6vw, 76px);
  border-top: 1px solid var(--ink);
  background: var(--ash);
  padding: clamp(34px, 6vw, 68px) var(--pad) 30px;
  text-align: center;
}

.foot-cta { margin: 0 0 20px; }

.foot-cta a {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.6vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.foot-cta a:hover,
.foot-cta a:focus-visible { background: var(--ink); color: var(--paper); }

footer small {
  display: block;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--mute);
}

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

@media (max-width: 860px) {
  :root { --pad: 16px; }

  body { font-size: 16px; }

  .rail {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    gap: 0;
    padding: 8px 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .masthead { border-bottom: 0; padding-bottom: 0; }

  .brand { font-size: 1.16rem; min-height: 40px; }

  .logo { width: 30px; height: 30px; border-radius: 8px; }

  .wordmark { border-bottom-width: 1px; }

  .rail-nav ul {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-top: 0;
    margin-top: 4px;
    scrollbar-width: none;
  }

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

  .rail-nav li + li { border-top: 0; }

  .rail-nav a {
    min-height: 44px;
    padding: 10px 13px;
    white-space: nowrap;
    border-left: 0;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
  }

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

  .rail-nav a.is-active { background: var(--paper); }

  .stage { margin-left: 0; }

  .strip { padding: 10px var(--pad) 8px; }

  .hero { min-height: 74vh; background-size: 19px 19px; gap: 20px; }

  .hero h1 { font-size: clamp(2.05rem, 10.5vw, 3.3rem); }

  section > article { scroll-margin-top: 132px; padding: 20px 18px; }
}

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

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