:root {
  --jade: #5cc6b0;
  --jade-d: #2b8071;
  --sand: #d4c4a8;
  --sand-l: #f7f1e6;
  --sand-d: #e8dbc4;
  --ink: #172623;
  --clay: #c67b5c;
  --olive: #6b7b3c;
  --line: rgba(23, 38, 35, 0.16);
  --glass: rgba(255, 253, 247, 0.56);
  --muted: rgba(23, 38, 35, 0.66);
  --r: 4px;
  --shadow: 0 1px 2px rgba(23, 38, 35, 0.05), 0 14px 30px -20px rgba(23, 38, 35, 0.55);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  padding-bottom: 96px;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  background:
    radial-gradient(1100px 500px at 88% -8%, rgba(92, 198, 176, 0.3), transparent 62%),
    radial-gradient(820px 440px at 2% 6%, rgba(198, 123, 92, 0.15), transparent 60%),
    linear-gradient(180deg, #f8f2e8 0%, #f2e9da 48%, #ebdfcc 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  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='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.5'/%3E%3C/svg%3E");
}

body.is-locked {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

main {
  position: relative;
  z-index: 1;
}

a {
  color: var(--jade-d);
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 4vw, 46px);
  min-height: 70vh;
  padding: clamp(30px, 7vw, 74px) clamp(16px, 5vw, 58px) clamp(22px, 5vw, 54px);
  max-width: 1180px;
  margin: 0 auto;
}

.hero-copy {
  max-width: min(580px, 100%);
  text-align: right;
}

.hero-fig {
  margin: 0;
  flex: 0 0 auto;
  width: clamp(88px, 17vw, 208px);
  will-change: transform;
}

.hero-fig img {
  width: 100%;
  border-radius: 52% 48% 46% 54%;
  box-shadow: 0 26px 42px -28px rgba(23, 38, 35, 0.75);
  filter: saturate(0.94);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 18px 0 0 auto;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--jade), var(--sand));
}

.hero-lede {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.7;
}

/* ---------- 版心 ---------- */

.paper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 274px;
  align-items: start;
  gap: 22px 30px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(13px, 4vw, 32px) 42px;
}

.paper > section {
  grid-column: 1;
  min-width: 0;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--r);
  background: var(--glass);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(212, 196, 168, 0.3);
  backdrop-filter: blur(11px) saturate(1.1);
  scroll-margin-top: 24px;
}

.paper > section h2 {
  margin: 0 0 0.5em;
  font-size: clamp(1.24rem, 3.1vw, 1.55rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.005em;
}

.paper > section h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 13px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--jade), rgba(212, 196, 168, 0.95));
}

.paper > section h3 {
  margin: 1.7em 0 0.4em;
  font-size: 1.11rem;
  font-weight: 500;
}

.paper > section p {
  margin: 0 0 1.05em;
}

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

.paper > section ul,
.paper > section ol {
  margin: 0 0 1.15em;
  padding-left: 1.2em;
}

.paper > section li {
  margin: 0.35em 0;
}

.paper > section li::marker {
  color: var(--clay);
}

.paper > section a {
  color: var(--jade-d);
  text-underline-offset: 3px;
}

.paper > section strong {
  font-weight: 600;
}

.paper > section blockquote {
  margin: 1.3em 0;
  padding: 0.65em 1.1em;
  border-left: 3px solid var(--jade);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(92, 198, 176, 0.11);
  color: var(--muted);
}

.paper > section img {
  margin: 1.1em 0;
  border-radius: var(--r);
}

.paper > section table {
  display: block;
  width: 100%;
  margin: 1.1em 0;
  border-collapse: collapse;
  overflow-x: auto;
  font-size: 1rem;
}

.paper > section th,
.paper > section td {
  padding: 0.5em 0.7em;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.subtitle {
  margin: 0.15em 0 1.15em;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

/* ---------- 右侧栏 ---------- */

.rail {
  grid-column: 2;
  grid-row: 1 / span 99;
  position: sticky;
  top: 22px;
  align-self: start;
  padding: 22px 18px;
  border-radius: var(--r);
  background: linear-gradient(170deg, #182925 0%, #20342d 100%);
  box-shadow: 0 18px 34px -24px rgba(23, 38, 35, 0.95);
  color: #f2ebdd;
}

.rail-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--sand);
}

.rail-title::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  margin: 10px 0 12px;
  background: var(--jade);
}

.rail .subtitle {
  color: rgba(242, 235, 221, 0.7);
  font-size: 0.96rem;
  font-weight: 300;
}

.rail-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: rail;
}

.rail-list li {
  counter-increment: rail;
  border-top: 1px solid rgba(212, 196, 168, 0.16);
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 3px 2px;
  color: #ece4d3;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--r);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: var(--jade);
}

.rail-list a:hover {
  color: #ffffff;
  background: rgba(92, 198, 176, 0.16);
}

/* ---------- 页脚 ---------- */

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px clamp(13px, 4vw, 32px) 46px;
  border-top: 1px solid var(--line);
}

.foot-cta {
  margin: 0;
}

.foot-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 4px 0;
  border-bottom: 2px solid var(--jade);
  color: var(--ink);
  font-size: clamp(1.28rem, 4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.foot small {
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px clamp(12px, 4vw, 26px) calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(250, 245, 236, 0.87);
  box-shadow: 0 -12px 32px -24px rgba(23, 38, 35, 0.75);
  backdrop-filter: blur(16px) saturate(1.15);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 11px;
  height: 11px;
  margin-right: 9px;
  border-radius: 50% 50% 50% 18%;
  background: var(--jade);
  box-shadow: 0 0 0 3px rgba(92, 198, 176, 0.22);
}

.menu-wrap summary {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.menu-wrap summary::-webkit-details-marker {
  display: none;
}

.menu-wrap summary:hover {
  background: rgba(92, 198, 176, 0.16);
  border-color: rgba(92, 198, 176, 0.6);
}

.bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.bars i {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.28s var(--ease), opacity 0.18s linear;
}

.bars i:nth-child(1) {
  top: 0;
}

.bars i:nth-child(2) {
  top: 5px;
}

.bars i:nth-child(3) {
  top: 10px;
}

.menu-wrap[open] .bars i:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
  background: var(--jade);
}

.menu-wrap[open] .bars i:nth-child(2) {
  opacity: 0;
}

.menu-wrap[open] .bars i:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  background: var(--jade);
}

.menu-wrap[open] summary {
  background: #172623;
  border-color: #172623;
  color: #f3ecde;
}

.dock menu {
  display: none;
}

details[open] > menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  padding: 26px clamp(18px, 6vw, 64px) calc(86px + env(safe-area-inset-bottom));
  overflow-y: auto;
  list-style: none;
  counter-reset: veil;
  background:
    radial-gradient(700px 340px at 90% 0%, rgba(92, 198, 176, 0.24), transparent 62%),
    linear-gradient(165deg, #14211e 0%, #1d312b 58%, #263a2f 100%);
  animation: veil 0.34s var(--ease) both;
}

details[open] > menu li {
  counter-increment: veil;
  border-bottom: 1px solid rgba(212, 196, 168, 0.17);
}

details[open] > menu a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 54px;
  padding: 13px 2px;
  color: #f4ede0;
  font-size: clamp(1.14rem, 4.2vw, 1.62rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-left 0.24s var(--ease);
}

details[open] > menu a::before {
  content: counter(veil, decimal-leading-zero);
  font-size: 0.68em;
  letter-spacing: 0.12em;
  color: var(--jade);
}

details[open] > menu a:hover {
  color: var(--jade);
  padding-left: 8px;
}

/* ---------- 动效 ---------- */

@keyframes veil {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .hero-fig {
    animation: rise 0.85s var(--ease) 0.06s both;
  }

  .paper > article {
    animation: rise 0.62s var(--ease) both;
  }

  .paper > article:nth-of-type(1) { animation-delay: 0.05s; }
  .paper > article:nth-of-type(2) { animation-delay: 0.1s; }
  .paper > article:nth-of-type(3) { animation-delay: 0.15s; }
  .paper > article:nth-of-type(4) { animation-delay: 0.2s; }
  .paper > article:nth-of-type(5) { animation-delay: 0.25s; }
  .paper > article:nth-of-type(6) { animation-delay: 0.3s; }
  .paper > article:nth-of-type(7) { animation-delay: 0.35s; }

  .rail {
    animation: rise 0.6s var(--ease) 0.12s both;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-fig {
    transform: none !important;
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .paper {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .paper > aside {
    order: 2;
    position: static;
  }

  .rail {
    display: block;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16.5px;
    padding-bottom: 88px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 18px;
    min-height: 70vh;
    padding-top: 40px;
    padding-bottom: 30px;
  }

  .hero-fig {
    width: 76px;
  }

  h1::after {
    margin-top: 14px;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .foot {
    padding-bottom: 40px;
  }

  details[open] > menu {
    justify-content: flex-start;
    padding-top: calc(28px + env(safe-area-inset-top));
  }
}

@media (max-width: 420px) {
  .paper {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }
}

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