@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@400;500;600;700&family=Public+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --neon: #87ff71;
  --gold: #ffce5c;
  --ink: #192617;
  --ink-2: #22331e;
  --ink-3: #2c4027;
  --paper: #eef6e7;
  --muted: #b9cbae;
  --line: rgba(135, 255, 113, 0.3);
  --radius: 18px;
  --pad: clamp(16px, 4vw, 28px);
  --sans: "Public Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: "Libre Bodoni", "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(135, 255, 113, 0.16) 1px, transparent 0),
    linear-gradient(180deg, rgba(255, 206, 92, 0.05), transparent 40%);
  background-size: 22px 22px, 100% 100%;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
  overflow-x: hidden;
}

svg {
  max-width: 100%;
}

/* ---------- 页头 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--ink);
  background-image: linear-gradient(90deg, rgba(135, 255, 113, 0.09), transparent 55%);
  border-bottom: 2px dashed var(--line);
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px var(--pad) 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 20px;
  height: 20px;
  background: var(--neon);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(-9deg);
  flex: none;
}

.brand:hover .brand-mark {
  background: var(--gold);
  transform: rotate(6deg);
}

.masthead-deco {
  flex: none;
  width: 58px;
  height: 16px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px);
  transform: rotate(-7deg);
  opacity: 0.85;
}

.anchors {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--pad) 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.anchors::-webkit-scrollbar {
  display: none;
}

.anchors p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  min-width: max-content;
}

.anchors a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 13px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
}

.anchors a::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 64%, 0 64%);
  transform: rotate(-12deg);
}

.anchors a:nth-child(2n)::before {
  background: var(--neon);
  clip-path: circle(50%);
  transform: none;
}

.anchors a:hover,
.anchors a:focus-visible {
  color: var(--paper);
  background: rgba(135, 255, 113, 0.1);
  border-color: var(--line);
}

.anchors a.is-on {
  color: var(--ink);
  background: var(--neon);
  border-color: var(--neon);
}

.anchors a.is-on::before {
  background: var(--ink);
}

/* ---------- 主体 ---------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  min-height: 45vh;
  padding: 30px 0 22px;
  border-bottom: 3px solid var(--gold);
}

.hero-copy {
  min-width: 0;
  position: relative;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(29px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero h1::after {
  content: "";
  display: block;
  width: 74px;
  height: 12px;
  margin-top: 16px;
  background: var(--neon);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-lede {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-art {
  margin: 0;
  transform: rotate(-3deg);
  mix-blend-mode: screen;
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: start;
  padding: 28px 0 64px;
}

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

.rail {
  position: sticky;
  top: 132px;
  padding: 4px 0 4px 15px;
  border-left: 3px dashed var(--line);
}

.rail-eyebrow {
  display: block;
  color: var(--gold);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.rail-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
}

.rail-list li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.36s ease, transform 0.36s ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}

.rail.in .rail-list li,
.rail-list li.in {
  opacity: 1;
  transform: none;
}

.rail-list a {
  display: block;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  text-decoration: none;
  border-radius: 12px;
  border-bottom: 2px solid transparent;
}

.rail-list li:nth-child(3n + 1) a {
  border-bottom-color: rgba(255, 206, 92, 0.26);
}

.rail-list li:nth-child(3n + 2) a {
  border-bottom-color: rgba(135, 255, 113, 0.26);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: var(--paper);
  background: rgba(255, 206, 92, 0.12);
}

/* ---------- 正文 ---------- */

.prose {
  min-width: 0;
}

.prose > div {
  margin: 0 0 26px;
  padding: clamp(18px, 3vw, 30px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 62%);
  background-color: rgba(34, 51, 30, 0.5);
  border: 1px solid rgba(135, 255, 113, 0.14);
  border-bottom: 4px solid var(--neon);
  border-radius: var(--radius);
  scroll-margin-top: 140px;
}

.prose > div:nth-child(2n) {
  border-bottom-color: var(--gold);
}

.prose div > small {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.prose h2 {
  margin: 0 0 0.6em;
  font-family: var(--serif);
  font-size: clamp(23px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.005em;
}

.prose h3 {
  margin: 1.3em 0 0.45em;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--neon);
}

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

.prose p:last-child,
.prose ul:last-child,
.prose ol:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

.prose strong {
  color: var(--gold);
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--gold);
}

.prose blockquote {
  margin: 1.1em 0;
  padding: 12px 16px;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 206, 92, 0.09);
  color: var(--paper);
}

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

.prose figure {
  margin: 1.2em 0;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

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

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

.prose th,
.prose td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px dashed var(--line);
}

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

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

.colophon {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px var(--pad) 54px;
  text-align: center;
  border-top: 2px dashed var(--line);
}

.cta {
  margin: 26px 0 16px;
  font-family: var(--serif);
  font-size: clamp(32px, 7vw, 66px);
  font-weight: 700;
  line-height: 1.1;
}

.cta a {
  display: inline-block;
  padding: 0.06em 0.32em 0.1em;
  color: var(--neon);
  text-decoration: none;
  border-bottom: 6px solid var(--gold);
  transform: rotate(-0.9deg);
}

.cta a:hover,
.cta a:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--neon);
}

.colophon small {
  display: block;
  color: var(--muted);
  font-size: 16px;
}

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

.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.hero-art.reveal {
  transform: translateY(16px) rotate(-3deg);
}

.hero-art.reveal.in {
  transform: rotate(-3deg);
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 22px 0 18px;
  }

  .hero-art {
    order: 2;
    max-width: 210px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 20px;
  }

  .rail {
    position: static;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 3px dashed var(--line);
  }

  .rail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
  }

  .rail-list a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 999px;
  }

  .prose > div {
    scroll-margin-top: 128px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16.5px;
  }

  .brand {
    font-size: 20px;
  }

  .masthead-deco {
    width: 42px;
  }

  .hero h1 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .cta a {
    border-bottom-width: 4px;
  }
}

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

  .reveal,
  .hero-art.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rail-list li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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