:root {
  color-scheme: dark;
  --ink: #000000;
  --panel: #0b0b0b;
  --panel2: #121212;
  --text: #e9e6df;
  --prose: #cfcac1;
  --mute: #8e887b;
  --brass: #c8a24a;
  --gold: #e6c98a;
  --line: rgba(200, 162, 74, 0.26);
  --line-soft: rgba(233, 230, 223, 0.12);
  --rail: 226px;
  --pad: clamp(20px, 4vw, 56px);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Crimson Pro", "Songti SC", "Noto Serif SC", Georgia, serif;
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
  border-style: solid;
  border-width: 0;
}

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

a:hover {
  color: #fff;
}

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

/* ── 侧栏导航 ───────────────────────────── */

.side {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand search"
    "pills pills";
  gap: 10px 12px;
  align-items: center;
  padding: 12px var(--pad) 14px;
  background: var(--panel2);
  border-bottom: 1px solid var(--line);
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 2px;
  color: var(--text);
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: 15px;
  letter-spacing: 0.2em;
}

.brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--brass);
  color: var(--brass);
  font-size: 14px;
  line-height: 1;
}

.bname {
  white-space: nowrap;
}

.pills {
  grid-area: pills;
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  padding: 0 0 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pills li {
  flex: 0 0 auto;
}

.pills a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease,
    transform 0.25s ease;
}

.pills a:hover,
.pills a:focus-visible {
  border-color: var(--brass);
  color: var(--gold);
  transform: translateY(-2px);
}

.pills a[aria-current="true"] {
  background: var(--brass);
  border-color: var(--brass);
  color: #0a0a0a;
}

.search {
  grid-area: search;
  margin: 0;
  width: 132px;
}

.search input {
  width: 100%;
  min-height: 40px;
  padding: 7px 13px;
  background: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.search input::placeholder {
  color: var(--mute);
}

.search input:focus {
  outline: none;
  border-color: var(--brass);
}

/* ── 开篇 ──────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 6vw, 60px) var(--pad) clamp(38px, 6vw, 66px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0d0d0d 0%, #000 78%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 36ch;
}

.hero h1 {
  margin: 0 0 0.5em;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-weight: 500;
  font-size: clamp(2rem, 6.2vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: #f6f3ec;
  text-shadow: 0 0 10px rgba(200, 162, 74, 0.22);
}

.lede {
  margin: 0;
  max-width: 40ch;
  color: var(--mute);
  font-size: 16px;
}

.collage {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
  margin: 26px 0 0;
  z-index: 2;
}

.shot {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel2);
  aspect-ratio: 4 / 5;
}

.shot.b {
  aspect-ratio: 1 / 1;
  align-self: end;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) contrast(1.06);
  transition: filter 0.4s ease, transform 0.6s ease;
}

.shot:hover img {
  filter: brightness(1) contrast(1.02);
  transform: scale(1.03);
}

.band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 64px;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(200, 162, 74, 0.42),
    rgba(200, 162, 74, 0) 62%
  );
  clip-path: polygon(0 100%, 0 58%, 100% 0, 100% 100%);
  opacity: 0.55;
  pointer-events: none;
}

/* ── 正文与右侧索引 ─────────────────────── */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.prose {
  padding: clamp(22px, 4vw, 48px) var(--pad) clamp(30px, 5vw, 56px);
  max-width: 76ch;
  min-width: 0;
}

.prose article {
  scroll-margin-top: 22px;
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line-soft);
  background: var(--panel);
}

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

.prose article.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.prose h2 {
  margin: 0 0 0.55em;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.1vw, 2.05rem);
  line-height: 1.24;
  color: #f5f2ea;
  text-shadow: 0 0 10px rgba(200, 162, 74, 0.16);
}

.prose h3 {
  margin: 1.3em 0 0.4em;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-weight: 500;
  font-size: 1.22rem;
  color: var(--gold);
}

.prose p {
  margin: 0 0 1em;
  color: var(--prose);
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
  color: var(--prose);
}

.prose li {
  margin: 0.35em 0;
}

.prose strong {
  color: #fff;
  font-weight: 600;
}

.prose a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(200, 162, 74, 0.45);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--gold);
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--brass);
  color: var(--mute);
  font-style: italic;
}

.prose figure {
  margin: 1.1em 0;
}

.prose img {
  border: 1px solid var(--line-soft);
}

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

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

.prose th {
  color: var(--gold);
  font-weight: 500;
}

.prose code {
  font-size: 15px;
  color: var(--gold);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 1.5em 0;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--brass);
}

.rail {
  border-top: 1px solid var(--line);
  padding: 24px var(--pad) 40px;
  background: var(--panel);
}

.rail h2 {
  margin: 0 0 0.7em;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-weight: 500;
  font-size: 1.25rem;
  color: #f5f2ea;
}

.rail ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--line-soft);
  color: var(--mute);
  font-size: 15px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.rail a:hover,
.rail a:focus-visible {
  color: var(--gold);
  border-color: var(--brass);
}

/* ── 页脚 ──────────────────────────────── */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 22px var(--pad);
  border-top: 1px solid var(--line);
  background: var(--panel2);
}

.f-brand {
  min-width: 132px;
}

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

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 2px;
  color: var(--mute);
  font-size: 15px;
}

.f-nav a:hover,
.f-nav a:focus-visible {
  color: var(--gold);
}

.f-legal {
  flex: 1 1 auto;
  text-align: center;
  font-size: 15px;
  color: var(--mute);
}

/* ── 浮动按钮 ──────────────────────────── */

#top-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: none;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(18, 18, 18, 0.94);
  color: var(--gold);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

#top-btn.on {
  display: block;
}

#top-btn:hover {
  border-color: var(--brass);
  color: #fff;
}

/* ── 宽屏：固定竖排栏 ───────────────────── */

@media (min-width: 900px) {
  body {
    padding-left: var(--rail);
  }

  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 26px 18px 22px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .pills {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    padding: 0;
    gap: 8px;
  }

  .pills a {
    width: 100%;
  }

  .search {
    width: 100%;
    margin-top: auto;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    align-items: center;
    min-height: 70vh;
    padding-top: clamp(40px, 7vw, 84px);
    padding-bottom: clamp(48px, 8vw, 96px);
  }

  .hero-copy {
    grid-column: 1;
  }

  .collage {
    grid-column: 2;
    position: relative;
    margin: 0;
    min-height: 380px;
  }

  .shot {
    position: absolute;
    border: 1px solid var(--line);
  }

  .shot.a {
    width: 62%;
    aspect-ratio: 3 / 4;
    right: 2%;
    top: 0;
  }

  .shot.b {
    width: 46%;
    aspect-ratio: 1 / 1;
    right: 52%;
    bottom: 0;
    align-self: auto;
  }

  .stage {
    grid-template-columns: minmax(0, 1fr) 268px;
    align-items: start;
  }

  .rail {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    border-top: 0;
    border-left: 1px solid var(--line);
    padding-top: 34px;
  }

  .rail ol {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
  }

  .foot {
    flex-wrap: nowrap;
  }
}

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

  .prose article.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .shot img,
  .pills a {
    transition: none;
  }
}

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