:root {
  --ink: #0E0F12;
  --gold: #C9A227;
  --ivory: #F4EFE6;
  --panel: #14161B;
  --line: rgba(201, 162, 39, .28);
  --edge: rgba(244, 239, 230, .12);
  --soft: rgba(244, 239, 230, .72);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: "Josefin Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: .01em;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: "Cinzel", "Songti SC", "Noto Serif SC", Georgia, serif;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 .5em;
  letter-spacing: .015em;
}

p { margin: 0 0 1.1em; }

a { color: var(--ivory); text-decoration: none; }
a:hover { color: var(--gold); }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(14, 15, 18, .86);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.navrail {
  margin: 0 auto;
  max-width: 1280px;
  padding: 8px 20px;
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.nav-side {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-left { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .95rem;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.pill:hover,
.pill:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -14px rgba(201, 162, 39, .9);
}

.brand {
  font-family: "Cinzel", "Songti SC", Georgia, serif;
  font-size: 1.02rem;
  letter-spacing: .3em;
  text-indent: .3em;
  padding: 9px 16px;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  transition: box-shadow .3s ease, transform .3s ease;
}
.brand:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(201, 162, 39, .12); }

.find { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: rgba(244, 239, 230, .04); }
.find input {
  width: 120px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--ivory);
  font: inherit;
  font-size: .92rem;
  outline: none;
}
.find input::placeholder { color: rgba(244, 239, 230, .5); }
.find button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font: inherit;
  font-size: .88rem;
  letter-spacing: .08em;
  cursor: pointer;
}
.find button:hover { filter: brightness(1.12); }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 80; pointer-events: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--gold); box-shadow: 0 0 14px rgba(201, 162, 39, .8); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: min(46vh, 440px);
  display: flex;
  align-items: flex-end;
  padding: 26px 0 54px;
  background: var(--ink);
}

.hero-layer {
  position: absolute;
  inset: -14% 0 -14%;
  z-index: -1;
  will-change: transform;
}

.hero-glow {
  transform: translate3d(0, calc(var(--p, 0) * -0.07px), 0);
  background:
    radial-gradient(58% 68% at 78% 26%, rgba(201, 162, 39, .34), transparent 64%),
    radial-gradient(46% 58% at 12% 84%, rgba(201, 162, 39, .13), transparent 72%);
}

.hero-veil {
  z-index: -2;
  overflow: hidden;
  transform: translate3d(0, calc(var(--p, 0) * 0.16px), 0);
  background: linear-gradient(140deg, #191b21, #0b0c0f 70%);
}
.hero-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 15, 18, .9), rgba(14, 15, 18, .28) 46%, rgba(14, 15, 18, .96));
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.82) contrast(1.06) brightness(.6);
}

.hero-cut {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 62px;
  background: var(--ink);
  clip-path: polygon(0 100%, 100% 10%, 100% 100%);
  z-index: 2;
}
.hero-cut::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 26px;
  text-align: right;
}

.kicker {
  display: block;
  font-size: .78rem;
  letter-spacing: .42em;
  text-indent: .42em;
  color: var(--gold);
  margin-bottom: .7em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 3.7rem);
  letter-spacing: .04em;
  text-shadow: 0 18px 44px rgba(0, 0, 0, .7);
}

/* ---------- 主体 ---------- */
.main { position: relative; z-index: 1; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 26px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 48px;
  align-items: start;
}

.content { min-width: 0; }

.doc {
  background: linear-gradient(180deg, rgba(244, 239, 230, .035), rgba(244, 239, 230, 0) 320px);
  border-radius: 12px;
  padding: 4px 26px 26px;
  box-shadow: 0 30px 70px -60px rgba(0, 0, 0, .95);
}

.doc article {
  padding: 40px 0 34px;
  border-top: 1px solid var(--edge);
  scroll-margin-top: 132px;
}
.doc article:first-of-type { border-top: 0; padding-top: 22px; }

.doc h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  color: var(--ivory);
  padding-bottom: .5em;
  border-bottom: 1px solid var(--line);
}
.doc h2::before {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  background: var(--gold);
  margin-bottom: .8em;
}
.doc h3 { font-size: 1.16rem; color: var(--gold); }
.doc h4 { font-size: 1.02rem; color: var(--soft); }

.doc p { color: rgba(244, 239, 230, .88); }
.doc strong { color: var(--gold); font-weight: 600; }
.doc a { color: var(--gold); border-bottom: 1px solid rgba(201, 162, 39, .45); }
.doc a:hover { border-bottom-color: var(--gold); }

.doc ul, .doc ol { padding-left: 1.25em; margin: 0 0 1.2em; }
.doc li { margin-bottom: .45em; }
.doc ul { list-style: none; padding-left: 1.1em; }
.doc ul > li { position: relative; }
.doc ul > li::before {
  content: "";
  position: absolute;
  left: -1em;
  top: .78em;
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

.doc blockquote {
  margin: 1.4em 0;
  padding: 16px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 18px 34px -30px #000;
  color: var(--soft);
}
.doc blockquote p:last-child { margin-bottom: 0; }

.doc figure { margin: 1.4em 0; }
.doc img { border-radius: 10px; box-shadow: 0 24px 46px -34px #000; }

.doc table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .96rem; }
.doc th, .doc td { border-bottom: 1px solid var(--edge); padding: 10px 8px; text-align: left; }
.doc th { color: var(--gold); font-weight: 500; }

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 108px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 32px 62px -52px #000;
}

.eyebrow {
  display: block;
  font-size: .74rem;
  letter-spacing: .38em;
  text-indent: .38em;
  color: var(--gold);
  margin-bottom: .55em;
}

.side-title {
  font-size: 1.12rem;
  margin: 0 0 .9em;
  padding-bottom: .55em;
  border-bottom: 1px solid var(--edge);
}

.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav li + li { border-top: 1px solid rgba(244, 239, 230, .07); }
.side-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  font-size: .95rem;
  color: var(--soft);
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: color .22s ease, border-color .22s ease, padding-left .22s ease;
}
.side-nav a:hover {
  color: var(--gold);
  border-left-color: var(--gold);
  padding-left: 18px;
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 34px 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 26px;
  max-width: 1280px;
  margin: 0 auto;
}

.foot-brand {
  font-family: "Cinzel", "Songti SC", Georgia, serif;
  font-size: clamp(1.35rem, 3.4vw, 2.3rem);
  letter-spacing: .12em;
  color: var(--gold);
  line-height: 1.2;
  padding: 6px 0;
}

.foot-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: .9rem;
  color: rgba(244, 239, 230, .6);
}
.foot-nav a:hover { color: var(--gold); }

.copy {
  margin: 0;
  font-size: .86rem;
  letter-spacing: .1em;
  color: rgba(244, 239, 230, .5);
}

/* ---------- 回到顶部 ---------- */
.totop {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 22, 27, .92);
  backdrop-filter: blur(10px);
  font-size: .9rem;
  color: var(--gold);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.totop.on { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- 滚动触发 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, .8, .3, 1);
}
.reveal.in { opacity: 1; transform: none; }

[ id ] { scroll-margin-top: 132px; }

/* ---------- 断点 ---------- */
@media (max-width: 1080px) {
  .wrap { grid-template-columns: minmax(0, 1fr) 250px; gap: 32px; }
  .find input { width: 92px; }
}

@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr; gap: 8px; }
  .nav-side { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .nav-side::-webkit-scrollbar { display: none; }
  .nav-left, .nav-right { justify-content: flex-start; }
  .brand { justify-self: start; order: -1; }
  .find { order: 3; }
  .wrap { grid-template-columns: 1fr; }
  .side { position: static; top: auto; }
  .doc { padding: 4px 20px 20px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 320px; padding-bottom: 46px; }
  .hero-inner { padding: 0 18px; }
  .hero h1 { font-size: clamp(1.8rem, 9vw, 2.5rem); }
  .hero-cut { height: 38px; }
  .wrap { padding: 40px 18px 34px; }
  .doc h2 { font-size: 1.28rem; }
  .doc article { padding: 32px 0 26px; }
  .foot { padding: 28px 18px 26px; }
  .find input { width: 110px; }
  .totop { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-layer { transform: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

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