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

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

:root {
  --mint: #5cc6b0;
  --sand: #d4c4a8;
  --ink: #172623;
  --paper: #f5efe5;
  --paper-2: #ece3d4;
  --clay: #8a5e46;
  --line: rgba(23, 38, 35, 0.16);
  --line-soft: rgba(23, 38, 35, 0.09);
  --shadow: 0 24px 46px -32px rgba(23, 38, 35, 0.6);
  --deep: #2c6f61;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.66;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--mint);
  color: var(--ink);
}

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

.skip {
  position: absolute;
  left: 14px;
  top: -60px;
  z-index: 9;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  transition: top 0.18s ease-out;
}

.skip:focus {
  top: 14px;
}

/* ---------- 页头：品牌独占一行 + 有序菜单行 ---------- */
.mast {
  position: relative;
  z-index: 3;
  padding: 16px clamp(18px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.mast-brand {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.brand .mark {
  width: auto;
  height: 22px;
  display: block;
}

.brand:hover span {
  box-shadow: inset 0 -0.42em 0 var(--mint);
}

.mast-nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(12px, 2.4vw, 30px);
  margin: 0;
  padding: 0;
}

.mast-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 1px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.004em;
  color: #2d423d;
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s ease-out, color 0.18s ease-out;
}

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

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: stretch;
  min-height: 45vh;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(128deg, #eee6d7 0%, #f6f1e7 58%, #e4eee9 100%);
}

.hero:not(:has(.hero-fig)) {
  grid-template-columns: 1fr;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 68px) clamp(20px, 5vw, 60px) clamp(34px, 5vw, 68px)
    clamp(18px, 4vw, 44px);
}

.hero-h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2rem, 5.4vw, 3.7rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.038em;
}

.hero-bg {
  position: absolute;
  right: -0.05em;
  bottom: -0.2em;
  z-index: 0;
  font-size: clamp(4rem, 19vw, 12.5rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.055em;
  white-space: nowrap;
  color: rgba(92, 198, 176, 0.26);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.hero-fig {
  margin: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

/* ---------- 主体：左侧目录 + 正文 ---------- */
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 68px) clamp(18px, 4vw, 44px);
  display: grid;
  grid-template-columns: 234px minmax(0, 1fr);
  gap: clamp(26px, 4vw, 54px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 22px;
  padding: 18px 18px 14px;
  background: var(--paper-2);
  border-left: 3px solid var(--mint);
  box-shadow: var(--shadow);
}

.rail h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--clay);
}

.rail hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 10px 0 12px;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 2px;
  font-size: 16px;
  border-bottom: 1px dashed var(--line-soft);
  transition: color 0.16s ease-out, padding-left 0.16s ease-out;
}

.rail li:last-child a {
  border-bottom: 0;
}

.rail a:hover {
  color: var(--deep);
  padding-left: 7px;
}

.body article {
  scroll-margin-top: 84px;
}

.body article + article {
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.body h2 {
  margin: 2.6rem 0 0.7rem;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.024em;
}

.body h2 + hr {
  border: 0;
  border-top: 1px solid var(--sand);
  margin: 0 0 1.3rem;
}

.body article > h2:first-child {
  margin-top: 0;
}

.body h3 {
  margin: 1.9rem 0 0.55rem;
  font-size: clamp(1.15rem, 2vw, 1.32rem);
  font-weight: 600;
  letter-spacing: -0.014em;
}

.body h3 + hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 0 0 1rem;
}

.body p {
  margin: 0 0 1.05em;
  max-width: 66ch;
}

.body ul,
.body ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
  max-width: 66ch;
}

.body li {
  margin: 0.34em 0;
}

.body a {
  color: var(--deep);
  border-bottom: 1px solid rgba(92, 198, 176, 0.62);
}

.body a:hover {
  background: rgba(92, 198, 176, 0.22);
}

.body strong {
  font-weight: 600;
}

.body blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  background: var(--paper-2);
  border-left: 3px solid var(--mint);
  box-shadow: var(--shadow);
}

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

.body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.3em 0;
  box-shadow: var(--shadow);
}

.body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.7rem 0;
}

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

.body th,
.body td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

.body th {
  background: var(--paper-2);
  font-weight: 600;
}

/* ---------- 页脚：巨大品牌字 + 链接 + 居中版权 ---------- */
.foot {
  margin-top: clamp(46px, 8vw, 92px);
  padding: clamp(30px, 5vw, 58px) clamp(18px, 4vw, 44px) 26px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px 28px;
  align-items: start;
}

.foot-mark {
  margin: 0;
  font-size: clamp(2.3rem, 8.6vw, 5.2rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  justify-content: flex-end;
  align-self: end;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-size: 16px;
  border-bottom: 1px solid transparent;
}

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

.foot-copy {
  grid-column: 1 / -1;
  display: block;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 16px;
  color: #3c534d;
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: rise 0.62s ease-out both;
  }

  .hero-fig {
    animation: rise 0.72s 0.06s ease-out both;
  }

  .rail li {
    animation: rise 0.44s ease-out both;
  }

  .rail li:nth-child(1) {
    animation-delay: 0.05s;
  }
  .rail li:nth-child(2) {
    animation-delay: 0.1s;
  }
  .rail li:nth-child(3) {
    animation-delay: 0.15s;
  }
  .rail li:nth-child(4) {
    animation-delay: 0.2s;
  }
  .rail li:nth-child(5) {
    animation-delay: 0.25s;
  }
  .rail li:nth-child(6) {
    animation-delay: 0.3s;
  }
  .rail li:nth-child(7) {
    animation-delay: 0.35s;
  }
}

/* ---------- 断点 ---------- */
@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .rail {
    position: static;
  }

  .rail ol {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0 14px;
  }
}

@media (max-width: 760px) {
  .hero,
  .hero:not(:has(.hero-fig)) {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-img {
    min-height: 190px;
  }
}

@media (max-width: 700px) {
  .foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-links {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .hero-h1 {
    font-size: clamp(1.85rem, 8.4vw, 2.4rem);
  }

  .hero-bg {
    font-size: clamp(3.4rem, 17vw, 6rem);
  }
}

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