@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

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

:root {
  --moss: #172623;
  --moss-2: #1e332c;
  --clay: #5cc6b0;
  --clay-d: #3f9d8a;
  --sand: #d4c4a8;
  --sand-l: #e8dcc7;
  --paper: #f7f0e5;
  --card: #fdf8ef;
  --ink: #233029;
  --muted: #5f6f67;
  --line: #d9cdb8;
  --radius: 4px;
  --rail-w: 228px;
  --shadow: 0 20px 44px -30px rgba(23, 38, 35, .6);
  --font: 'Plus Jakarta Sans', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  padding-left: var(--rail-w);
  overflow-x: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, #efe2cd 0%, rgba(239, 226, 205, 0) 55%),
    radial-gradient(90% 60% at 0% 28%, #f2e8d8 0%, rgba(242, 232, 216, 0) 60%),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .3;
  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='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='.34'/%3E%3C/svg%3E");
}

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

.skip {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 12px);
  z-index: 90;
  transform: translateY(-180%);
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--moss);
  color: #f3ecdc;
  font-size: 16px;
  text-decoration: none;
  transition: transform .25s ease-out;
}

.skip:focus {
  transform: none;
}

/* ---- 侧向竖排导航 ---- */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px 22px;
  color: #eadfcb;
  border-right: 1px solid rgba(212, 196, 168, .22);
  background: linear-gradient(170deg, #172623 0%, #1d2f28 55%, #24382f 100%);
}

.rail::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  pointer-events: none;
  background: radial-gradient(80% 100% at 0% 100%, rgba(92, 198, 176, .24), transparent 70%);
}

.brand {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: #10241f;
  text-decoration: none;
  border-radius: 52% 48% 46% 54% / 48% 52% 48% 52%;
  background: var(--clay);
  box-shadow: 0 10px 22px -12px rgba(92, 198, 176, .9);
  transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}

.brand img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand:hover {
  transform: rotate(-7deg) scale(1.06);
}

.rail-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 7px 11px;
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 1.4;
  color: #e3d9c6;
  text-decoration: none;
  transition: background .25s ease-out, color .25s ease-out, transform .25s ease-out;
}

.ico {
  width: 9px;
  height: 9px;
  flex: none;
  border: 1.5px solid rgba(92, 198, 176, .9);
  border-radius: 2px;
  transform: rotate(45deg);
  transition: background .25s ease-out, border-radius .25s ease-out;
}

.rail-list li:nth-child(2n) .ico {
  border-radius: 50%;
  transform: none;
}

.rail-list li:nth-child(3n) .ico {
  transform: rotate(45deg) scale(.78);
}

.rail-link:hover,
.rail-link:focus-visible {
  background: rgba(92, 198, 176, .16);
  color: #fff;
  transform: translateX(3px);
}

.rail-link:hover .ico {
  background: var(--clay);
}

.rail-cta {
  margin-top: auto;
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .07em;
  color: #222c22;
  text-decoration: none;
  border-radius: 999px;
  background: var(--sand);
  transition: background .3s ease-out, transform .3s ease-out;
}

.rail-cta:hover {
  background: var(--clay);
  transform: translateY(-2px);
}

main section {
  scroll-margin-top: 26px;
}

/* ---- 首屏 ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: clamp(18px, 4vw, 52px);
  padding: clamp(46px, 9vh, 96px) clamp(20px, 5vw, 64px) clamp(84px, 13vh, 148px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(72% 58% at 100% 18%, rgba(212, 196, 168, .55), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(58px, 11vh, 130px);
  pointer-events: none;
  background: linear-gradient(100deg, var(--clay) 0%, #a9cfaf 55%, var(--sand) 100%);
  clip-path: polygon(0 74%, 100% 0, 100% 100%, 0 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 34em;
  margin: 0 auto;
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.45rem);
  line-height: 1.22;
  letter-spacing: -.028em;
  font-weight: 800;
  color: var(--moss);
}

.hero-lede {
  margin: 0;
  max-width: 30em;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.8;
  color: var(--muted);
}

.hero-btn {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  padding: 0 26px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .07em;
  border-radius: 999px;
  color: #f2ead9;
  text-decoration: none;
  background: var(--moss);
  transition: transform .3s ease-out, background .3s ease-out;
}

.hero-btn:hover {
  background: #20382f;
  transform: translateY(-3px);
}

.hero-figure {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 5 / 6;
  max-height: 70vh;
  overflow: hidden;
  border-radius: 118px 18px 106px 22px;
  box-shadow: var(--shadow);
  background: linear-gradient(150deg, var(--sand) 0%, #c8b79a 46%, var(--clay) 132%);
}

.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(23, 38, 35, 0) 55%, rgba(23, 38, 35, .52));
}

.hero-plate {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 30% 24%, rgba(255, 255, 255, .42), transparent 62%);
}

.hero-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-figure figcaption {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  font-size: 16px;
  letter-spacing: .16em;
  color: #f4ecdb;
}

/* ---- 正文与右侧目录 ---- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  align-items: start;
  gap: clamp(22px, 4vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 86px) clamp(20px, 5vw, 56px) clamp(56px, 8vw, 96px);
}

.side {
  order: 2;
  position: sticky;
  top: 26px;
  padding: 20px 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.side h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--muted);
}

.side hr {
  height: 2px;
  border: 0;
  margin: 10px 0 14px;
  background: linear-gradient(90deg, var(--clay), rgba(92, 198, 176, 0));
}

.side ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side li {
  counter-increment: toc;
}

.side a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 3px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
  transition: background .2s ease-out, color .2s ease-out;
}

.side a::before {
  content: "0" counter(toc);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--clay-d);
}

.side a:hover {
  background: rgba(92, 198, 176, .16);
  color: var(--moss);
}

.prose {
  order: 1;
  min-width: 0;
  max-width: 70ch;
  font-size: 17px;
  line-height: 1.85;
  color: #26332c;
}

.prose section + section {
  margin-top: clamp(30px, 4.5vw, 54px);
  padding-top: clamp(22px, 3.5vw, 38px);
  border-top: 1px solid var(--line);
}

.prose h2 {
  margin: 0 0 .45em;
  font-size: clamp(1.42rem, 2.6vw, 1.95rem);
  line-height: 1.35;
  letter-spacing: -.015em;
  color: var(--moss);
}

.prose h2::before {
  content: "";
  display: inline-block;
  width: .4em;
  height: .4em;
  margin-right: .45em;
  border-radius: 2px;
  background: var(--clay);
  transform: rotate(45deg) translateY(-.1em);
}

.prose hr {
  height: 2px;
  width: 72px;
  border: 0;
  margin: 0 0 1.1em;
  background: linear-gradient(90deg, var(--clay), rgba(92, 198, 176, 0));
}

.prose h3 {
  margin: 1.5em 0 .5em;
  font-size: 1.13rem;
  line-height: 1.5;
  color: #20443a;
}

.prose p {
  margin: 0 0 1.05em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

.prose li {
  margin: .35em 0;
}

.prose a {
  color: #2f6d5d;
  text-decoration: underline;
  text-decoration-color: rgba(92, 198, 176, .7);
  text-underline-offset: .18em;
}

.prose strong {
  color: var(--moss);
}

.prose time,
.prose .meta {
  font-size: 16px;
  letter-spacing: .05em;
  color: var(--muted);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.prose figure {
  margin: 1.4em 0;
}

.prose figcaption {
  margin-top: .5em;
  font-size: 16px;
  color: var(--muted);
}

.prose blockquote {
  margin: 1.3em 0;
  padding: .6em 1.1em;
  border-left: 3px solid var(--sand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #fbf5ea;
  color: #3c4a42;
}

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

.prose th,
.prose td {
  padding: .6em .5em;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

/* ---- 页脚 ---- */
.site-foot {
  margin-top: clamp(20px, 4vw, 48px);
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 56px) 0;
  color: #e6dcc9;
  border-top: 6px solid var(--clay);
  background: linear-gradient(180deg, #172623, #1b2d26);
}

.foot-top {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr;
  gap: clamp(28px, 5vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.foot-mark {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -.05em;
  font-weight: 800;
  color: var(--sand);
}

.foot-seal {
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: var(--clay);
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 30px);
}

.foot-nav dl {
  margin: 0;
}

.foot-nav dt {
  margin-bottom: .7em;
  font-size: 16px;
  letter-spacing: .2em;
  color: #8fb8ab;
}

.foot-nav dd {
  margin: 0;
}

.foot-nav dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  line-height: 1.5;
  color: #ded4c0;
  text-decoration: none;
  border-bottom: 1px dashed rgba(212, 196, 168, .16);
  transition: color .2s ease-out, padding-left .2s ease-out;
}

.foot-nav dd a:hover {
  color: var(--clay);
  padding-left: 4px;
}

.foot-base {
  max-width: 1180px;
  margin: clamp(28px, 5vw, 52px) auto 0;
  padding: 18px 0 22px;
  text-align: center;
  border-top: 1px solid rgba(212, 196, 168, .18);
}

.foot-base p {
  margin: 0;
  font-size: 16px;
  letter-spacing: .12em;
  color: #9aa79d;
}

/* ---- 动效 ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s cubic-bezier(.22, .7, .24, 1), transform .7s cubic-bezier(.22, .7, .24, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- 窄屏 ---- */
@media (max-width: 900px) {
  body {
    padding-left: 0;
    padding-top: 64px;
  }

  .rail {
    inset: 0 0 auto 0;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(212, 196, 168, .22);
  }

  .rail::after {
    inset: 0 0 0 auto;
    width: 120px;
    height: 100%;
    background: radial-gradient(70% 120% at 100% 50%, rgba(92, 198, 176, .22), transparent 70%);
  }

  .rail-list {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .rail-list::-webkit-scrollbar {
    display: none;
  }

  .rail-link {
    white-space: nowrap;
    min-height: 40px;
    padding: 8px 12px;
  }

  .rail-cta {
    margin-top: 0;
    flex: none;
    min-height: 40px;
    padding: 0 16px;
  }

  .skip {
    left: 12px;
    top: 72px;
  }

  main section {
    scroll-margin-top: 82px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: clamp(30px, 6vh, 54px);
    padding-bottom: clamp(72px, 13vh, 116px);
  }

  .hero-copy {
    gap: 16px;
  }

  .hero-figure {
    aspect-ratio: 16 / 11;
    max-height: none;
    border-radius: 66px 14px 66px 16px;
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
    padding-top: clamp(30px, 6vw, 44px);
  }

  .side {
    order: -1;
    position: static;
    box-shadow: none;
  }

  .foot-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .foot-nav {
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
  }
}

@media (max-width: 420px) {
  .foot-nav {
    grid-template-columns: 1fr;
  }
}

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