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

:root {
  --paper: #fdfbf7;
  --paper-2: #f5f5f5;
  --ink: #1a1a1a;
  --rule: #e0ddd5;
  --rule-soft: #ece8df;
  --muted: #585349;
  --r: 28px;
  --serif: 'Merriweather', Georgia, 'Songti SC', 'Source Han Serif SC', 'Noto Serif SC', 'SimSun', serif;
  --disp: 'Abril Fatface', Georgia, 'Songti SC', 'Source Han Serif SC', 'Noto Serif SC', 'SimSun', serif;
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

a { color: inherit; transition: none; }
img { display: block; max-width: 100%; height: auto; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- 页头 ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.strip {
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule-soft);
  text-align: center;
  padding: 7px 16px;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.2em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brandline {
  padding: 12px 20px 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  object-fit: cover;
}

.brand__name {
  font-family: var(--disp);
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

.masthead nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 8px 20px 14px;
}

.masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  font-size: 16px;
  line-height: 1.25;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
}

.masthead nav a:hover,
.masthead nav a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ---------- 版面 ---------- */
.sheet {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  column-gap: 48px;
  align-items: start;
}

.hero {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 34px;
  align-items: center;
  min-height: 70vh;
  padding: 42px 0 54px;
  border-bottom: 1px solid var(--rule);
}

.hero__fig {
  position: relative;
  margin: 0;
}

.hero__badge {
  position: absolute;
  top: -10px;
  left: -8px;
  z-index: 2;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  transform: rotate(-4deg);
}

.hero__img,
.hero__glyph {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper-2);
  object-fit: cover;
}

.hero__glyph { position: relative; }
.hero__glyph::after {
  content: "";
  position: absolute;
  inset: 38% 24%;
  border: 2px solid var(--ink);
  border-radius: 999px;
  transform: rotate(-34deg);
}

.hero__copy {
  text-align: right;
}

.hero__copy h1 {
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 3.05rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
}

.hero__lead {
  margin: 0 0 0 auto;
  max-width: 32em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
}

.hero--slim {
  min-height: 0;
  padding: 40px 0 44px;
}

/* ---------- 正文 ---------- */
.prose {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  max-width: 720px;
  overflow-wrap: break-word;
}

.prose > section {
  padding: 46px 0;
  border-top: 1px solid var(--rule-soft);
  scroll-margin-top: 140px;
}

.prose > section:first-child {
  border-top: 0;
  padding-top: 8px;
}

.prose h2 {
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.32;
  margin: 0 0 18px;
}

.prose h2 > span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
}

.prose h3 {
  font-family: var(--disp);
  font-weight: 400;
  font-size: 1.24rem;
  line-height: 1.45;
  margin: 30px 0 12px;
}

.prose h3 > span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
}

.prose p { margin: 0 0 1.05em; }
.prose ul,
.prose ol { margin: 0 0 1.1em; padding-left: 1.35em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--muted); }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.prose strong { font-weight: 700; }

.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--ink);
  border-radius: 0 18px 18px 0;
  background: var(--paper-2);
}

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

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

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

.prose th { background: var(--paper-2); font-weight: 700; }

.prose figure { margin: 1.4em 0; }
.prose img { border: 1px solid var(--rule); border-radius: 18px; margin: 1.2em 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  padding: 1px 5px;
}
.prose pre {
  overflow-x: auto;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 16px;
}
.prose pre code { border: 0; background: none; padding: 0; }

/* ---------- 右侧栏 ---------- */
.rail {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 148px;
  margin-top: 42px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper-2);
  padding: 22px 18px 18px;
}

.rail h2 {
  font-family: var(--disp);
  font-weight: 400;
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
}

.rail h2 > span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
}

.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 14px;
}

.rail a:hover { border-color: var(--ink); background: var(--paper); }
.rail a[aria-current="true"] { background: var(--ink); color: var(--paper); }

.rail__top {
  margin-top: 14px;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  padding-top: 14px;
  color: var(--muted);
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--ink);
  background: var(--paper-2);
}

.foot__cta {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 20px 44px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.foot__cta h2 {
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.2;
  margin: 0 0 22px;
}

.foot__cta h2 span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--ink);
}

.foot__cta a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 30px;
  font-size: 17px;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

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

.foot__nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 22px;
  border-bottom: 1px solid var(--rule);
}

.foot__nav p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin: 0;
}

.foot__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

.foot__bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 20px;
  font-size: 15px;
  color: var(--muted);
}

.foot__bar p { margin: 0; }

.foot__bar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* ---------- 断点 ---------- */
@media (max-width: 980px) {
  .sheet {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
  .hero { grid-column: 1; grid-row: 1; }
  .prose { grid-column: 1; grid-row: 2; max-width: none; }
  .rail {
    grid-column: 1;
    grid-row: 3;
    position: static;
    margin: 8px 0 44px;
  }
  .rail ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .sheet { padding: 0 16px 48px; }
  .masthead nav p {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px 16px 12px;
    scrollbar-width: none;
  }
  .masthead nav p::-webkit-scrollbar { display: none; }
  .masthead nav a { flex: 0 0 auto; }
  .brandline { padding: 10px 16px 2px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 20px;
    padding: 22px 0 34px;
  }
  .hero__copy { order: 1; text-align: left; }
  .hero__fig { order: 2; max-width: 330px; }
  .hero__img,
  .hero__glyph { aspect-ratio: 16 / 11; }
  .hero__lead { margin-left: 0; }

  .prose > div { padding: 34px 0; scroll-margin-top: 128px; }
  .foot__cta { padding: 42px 16px 34px; }
  .foot__nav { padding: 16px 16px 18px; }
  .rail ul { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .hero__fig { transform: none !important; }
}

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