@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Cabin:wght@400;500;600;700&display=swap');

:root {
  --paper: #fdfbf7;
  --ash: #f5f5f5;
  --ink: #1a1a1a;
  --line: #e0e0e0;
  --soft: #4a4744;
  --card: #fffdfa;
  --circle: 999px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cabin", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
  overflow-x: clip;
}

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

img { max-width: 100%; }

a, button, input { transition: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 20;
  padding: 12px 18px;
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--circle);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}
.skip:focus { top: 12px; }

/* 报头：品牌独占一行，菜单行在下 */
.masthead {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 22px 0;
}

.mast-brand {
  display: flex;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 4px 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  font-family: "Amatic SC", "Cabin", serif;
  font-size: 30px;
  line-height: 34px;
  letter-spacing: .04em;
}

.brand-text {
  font-size: clamp(1.55rem, 3.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1.2;
}

.brand:hover .brand-text { text-decoration: underline; text-underline-offset: 6px; }

.mast-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 8px 0 12px;
  border-bottom: 2px solid var(--ink);
}

.menu ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 2px 4px;
}

.menu a {
  display: block;
  padding: 11px 13px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--circle);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: .03em;
  text-decoration: none;
  line-height: 1.4;
}

.menu a:hover,
.menu a:focus-visible {
  border-color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.search {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ink);
  border-radius: var(--circle);
  overflow: hidden;
  background: var(--card);
}

.search input {
  width: 132px;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}
.search input:focus { outline: none; }
.search input::placeholder { color: var(--soft); }

.search button {
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 16px;
  letter-spacing: .08em;
  cursor: pointer;
}

/* 首屏：左图右文，右对齐，超大字 */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: 46px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 22px 0;
  min-height: 100svh;
}

.hero-ghost {
  position: absolute;
  right: 14px;
  bottom: -.12em;
  z-index: 0;
  margin: 0;
  font-family: "Amatic SC", "Cabin", serif;
  font-size: clamp(7rem, 25vw, 16rem);
  line-height: .78;
  letter-spacing: .03em;
  white-space: nowrap;
  opacity: .075;
  pointer-events: none;
  user-select: none;
}

.hero-media {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--ash);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}

.hero-media.is-blank {
  box-shadow: inset 0 0 0 12px var(--paper), inset 0 0 0 13px var(--line);
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: right;
  padding: 30px 0;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(1.95rem, 5vw, 3.3rem);
  line-height: 1.26;
  letter-spacing: .015em;
  font-weight: 700;
}

.hero-lead {
  max-width: 34ch;
  margin: 0 0 26px auto;
  color: var(--soft);
  font-size: 17px;
}

.hero-more {
  display: inline-block;
  padding: 11px 24px;
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--circle);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: .1em;
  text-decoration: none;
  line-height: 1.4;
}

.hero-more:hover,
.hero-more:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* 正文：左侧目录条 + 右侧纸页 */
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 34px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 54px 22px 76px;
  border-top: 2px solid var(--ink);
}

.rail {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 18px 18px 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
}

.rail-h {
  margin: 0 0 2px;
  font-size: 19px;
  letter-spacing: .16em;
  font-weight: 700;
}

.rail .subtitle {
  margin: 0 0 14px;
  color: var(--soft);
  font-size: 16px;
  letter-spacing: .06em;
}

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

.rail-list li { border-bottom: 1px solid var(--line); }

.rail-list a {
  display: block;
  padding: 11px 2px;
  min-height: 44px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  line-height: 1.5;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sheet { min-width: 0; }

.prose { max-width: 780px; }

.prose > section {
  margin: 0 0 26px;
  padding: 26px 26px 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  scroll-margin-top: 24px;
}

.prose > section:last-child { margin-bottom: 0; }

.prose h2 {
  margin: 2px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 1.45rem;
  line-height: 1.42;
  letter-spacing: .02em;
}

.prose h2::before {
  content: "■";
  margin-right: .5em;
  font-size: .56em;
  vertical-align: .18em;
}

.prose h3 {
  margin: 24px 0 10px;
  font-size: 1.15rem;
  line-height: 1.5;
}

.prose p { margin: 0 0 15px; }
.prose p:last-child { margin-bottom: 0; }

.prose ul,
.prose ol {
  margin: 0 0 15px;
  padding-left: 1.4em;
}

.prose li { margin: 0 0 7px; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 0 0 15px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--ink);
  color: var(--soft);
}

.prose code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 15px;
  font-size: 16px;
}
.prose th,
.prose td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
}

/* 页脚：单行极简 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 22px 36px;
  border-top: 2px solid var(--ink);
}

.foot p { margin: 0; font-size: 16px; color: var(--soft); }

.foot a {
  display: inline-block;
  padding: 10px 0;
  min-height: 44px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

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

/* 出现与视差 */
html.js .rv { opacity: 0; }
html.js .rv.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .rv { opacity: 1; }
}

@media (max-width: 900px) {
  .hero { gap: 30px; }
  .shell { grid-template-columns: 196px minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 820px) {
  .masthead { padding-top: 16px; }
  .mast-bar { gap: 8px 12px; }
  .search { order: 2; }
  .search input { width: 100%; flex: 1 1 auto; }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: auto;
    padding-top: 22px;
    padding-bottom: 34px;
  }

  .hero-copy {
    order: 1;
    text-align: left;
    padding: 0;
  }

  .hero-lead { margin-left: 0; max-width: none; }

  .hero-media {
    order: 2;
    aspect-ratio: 16 / 11;
  }

  .hero-ghost {
    font-size: clamp(4.6rem, 30vw, 9rem);
    bottom: auto;
    top: 12px;
    right: 8px;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 32px 18px 56px;
  }

  .rail {
    position: static;
    border-radius: 22px;
  }

  .rail-list {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
  }

  .rail-list li {
    width: 50%;
    border-bottom: 1px solid var(--line);
  }

  .rail-list li:nth-child(odd) { border-right: 1px solid var(--line); }

  .rail-list a { padding: 12px 8px; }

  .prose > div {
    padding: 20px 18px 24px;
    border-radius: 22px;
  }
}

@media (max-width: 420px) {
  .menu a { padding: 11px 10px; }
  .foot { padding-bottom: 28px; }
}

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