:root {
  --paper: #f5e6c8;
  --paper-2: #faf0dc;
  --tan: #d4a574;
  --ink: #262117;
  --ink-soft: #4a3f2e;
  --ink-faint: #8a6a44;
  --dash: rgba(38, 33, 23, 0.32);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-left: 248px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  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='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)' opacity='0.55'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background:
    radial-gradient(620px 420px at 98% -6%, rgba(212, 165, 116, 0.6), transparent 66%),
    radial-gradient(520px 380px at -8% 104%, rgba(212, 165, 116, 0.38), transparent 70%);
}

a { color: inherit; }

/* 左侧固定竖排栏 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 16px 26px;
  background: var(--paper);
  border-right: 2px solid var(--ink);
  overflow-y: auto;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
}

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 42px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.burger:hover { background: var(--tan); }

.rail-eyebrow {
  display: block;
  margin: 16px 0 -8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--ink-faint);
}

.rail-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.rail-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: idx;
}

.rail-nav li {
  counter-increment: idx;
  border-top: 1px dashed var(--dash);
}

.rail-nav li:last-child { border-bottom: 1px dashed var(--dash); }

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 6px;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease;
}

.rail-nav a::before {
  content: counter(idx, decimal-leading-zero);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.rail-nav a:hover {
  background: var(--tan);
  transform: translateX(4px);
}

/* 主行动按钮 */
.cta {
  position: fixed;
  top: 20px;
  right: 26px;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.cta:hover {
  background: var(--tan);
  color: var(--ink);
  transform: translateY(-2px);
}

main { padding: 0 40px; }

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  grid-template-areas: "media copy";
  gap: 32px;
  align-items: center;
  min-height: 45vh;
  padding: 106px 0 58px;
  max-width: 1080px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 12px;
  transform: skewY(-1.4deg);
  opacity: 0.9;
  background: repeating-linear-gradient(-45deg, var(--tan) 0 9px, transparent 9px 20px);
}

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

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 3.4vw, 3.05rem);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0;
  padding-right: 14px;
  border-right: 3px solid var(--tan);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.hero-media {
  grid-area: media;
  padding: 11px 11px 32px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper-2);
  transform: rotate(-1.2deg);
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 38vh;
  object-fit: cover;
  border-radius: 8px;
  filter: sepia(0.18) contrast(1.03) saturate(0.88);
}

.hero-media:empty { display: none; }

.hero-media:hover { animation: vhs 0.9s ease-in-out 1; }

@keyframes vhs {
  0%, 100% { transform: rotate(-1.2deg) translateX(0); }
  40% { transform: rotate(-1.2deg) translateX(3px); }
  70% { transform: rotate(-1.2deg) translateX(-2px); }
}

/* 正文 */
.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 46px 0 26px;
}

.prose {
  font-size: 17px;
}

.prose > section {
  padding: 40px 0;
  border-top: 1px dashed var(--dash);
}

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

.prose > section[id] { scroll-margin-top: 26px; }

.prose small {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
}

.prose h2,
.prose h3 {
  margin: 0 0 14px;
  line-height: 1.36;
  font-weight: 600;
  letter-spacing: -0.004em;
}

.prose h2 { font-size: 1.42rem; }
.prose h3 { font-size: 1.16rem; }

.prose p { margin: 0 0 16px; }

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

.prose a {
  color: #8a4b1f;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

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

.prose li { margin-bottom: 8px; }

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 6px 0 18px;
  border: 2px solid var(--ink);
  border-radius: 14px;
}

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

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

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

.prose time {
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* 回到顶部 */
.totop {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.totop:hover { background: var(--tan); }

/* 页脚 */
footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px 24px;
  align-items: center;
  margin-top: 46px;
  padding: 48px 40px 42px;
  border-top: 2px solid var(--ink);
  font-size: 14px;
}

.foot-cta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 18px;
  padding: 24px 24px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #efdab4;
}

.foot-cta small {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
}

.foot-cta h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.95rem);
  font-weight: 600;
  line-height: 1.3;
}

.foot-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

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

.foot-brand {
  font-weight: 600;
  letter-spacing: 0.05em;
}

.foot-brand a { text-decoration: none; }

.foot-nav { justify-self: center; }

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

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

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

.foot-legal { text-align: right; }

.foot-legal p {
  margin: 0;
  font-size: 13px;
  color: #5b4d3a;
}

/* 全屏遮罩菜单 */
body.menu-open { overflow: hidden; }

body.menu-open .rail-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: block;
  padding: 82px 28px 28px;
  background: var(--ink);
  color: var(--paper);
  overflow-y: auto;
  border: 0;
}

body.menu-open .rail-nav ol {
  counter-reset: idx;
  max-width: 560px;
  margin: 0 auto;
}

body.menu-open .rail-nav li { border-top: 1px solid rgba(245, 230, 200, 0.2); }

body.menu-open .rail-nav a {
  justify-content: flex-start;
  min-height: 62px;
  color: var(--paper);
  font-size: clamp(1.25rem, 3.6vw, 1.8rem);
}

body.menu-open .rail-nav a::before { color: var(--tan); }

body.menu-open .rail-nav a:hover { background: rgba(212, 165, 116, 0.18); }

body.menu-open .burger {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 160;
  min-width: 64px;
  background: var(--tan);
  border-color: var(--paper);
  color: var(--ink);
}

/* 滚动显现 */
html.reveal-init .prose > section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.reveal-init .prose > section.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail-nav a,
  .cta,
  .prose > section {
    transition: none;
  }
  .hero-media:hover { animation: none; }
}

/* 移动端 */
@media (max-width: 880px) {
  body { padding-left: 0; padding-top: 64px; }

  .rail {
    top: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 2px solid var(--ink);
    overflow: visible;
  }

  .rail-head { flex: 1; }

  .rail-eyebrow,
  .rail-title { display: none; }

  .rail-nav { display: none; }

  body.menu-open .rail-nav { display: block; }

  .cta {
    top: auto;
    bottom: 16px;
    right: 14px;
    padding: 0 16px;
    font-size: 14px;
  }

  .totop {
    left: 14px;
    right: auto;
    bottom: 16px;
    font-size: 13px;
  }

  main { padding: 0 18px; }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media";
    gap: 24px;
    min-height: 45vh;
    padding: 34px 0 42px;
  }

  .hero-copy h1 { font-size: clamp(1.7rem, 7vw, 2.3rem); }

  .lede { font-size: 16px; }

  .hero-media img { max-height: 34vh; }

  .wrap { padding: 32px 0 16px; }

  .prose > article { padding: 30px 0; }

  .prose > article[id] { scroll-margin-top: 78px; }

  footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 18px;
    padding: 36px 18px 96px;
  }

  .foot-cta {
    grid-template-columns: 1fr;
    justify-items: center;
    width: 100%;
    padding: 22px 18px;
    gap: 10px;
  }

  .foot-cta a { justify-self: center; }

  .foot-nav ol { justify-content: center; }

  .foot-legal { text-align: center; }

  body.menu-open .rail-nav { padding: 78px 18px 26px; }

  body.menu-open .burger {
    top: 12px;
    right: 12px;
  }
}
=====

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