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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --pad: clamp(18px, 4vw, 56px);
  --r: 18px;
  --display: 'Orbitron', 'Exo 2', system-ui, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --body: 'Exo 2', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.68;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.top-anchor { display: block; height: 0; }

/* ---------- 顶部 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.masthead {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px var(--pad);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  overflow: hidden;
}

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

.mark-txt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}

.masthead-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cta {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.cta:hover { background: #1d1d1d; }

.burger {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--ink);
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.28s ease;
}
.burger[aria-expanded='true'] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.ticker { background: var(--ink); border-top: 2px solid var(--ink); }

.anchorbar { overflow-x: auto; scrollbar-width: none; }
.anchorbar::-webkit-scrollbar { display: none; }

.anchorbar ol {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.anchorbar a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}
.anchorbar a:hover { background: var(--paper); color: var(--ink); }

/* ---------- 遮罩菜单 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: clamp(18px, 5vw, 52px);
  background: var(--ink);
  color: var(--paper);
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.drawer-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.22em;
}

.drawer-close {
  margin-left: auto;
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

.drawer-nav { overflow-y: auto; }
.drawer-nav ol { margin: 0; padding: 0; list-style: none; display: grid; }

.drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 58px;
  font-family: var(--display);
  font-size: clamp(1.05rem, 3.6vw, 1.5rem);
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}
.drawer-nav a:hover { color: var(--ink); background: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: clamp(28px, 6vw, 60px) var(--pad);
  background: var(--ink);
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--paper);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  max-width: 900px;
}

.hero-orn {
  flex: 0 0 auto;
  width: clamp(46px, 8vw, 66px);
  height: auto;
  color: var(--paper);
  will-change: transform;
}

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

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 5.4vw, 3.3rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.hero-desc {
  margin: 0;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- 主体 ---------- */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(28px, 5vw, 60px) var(--pad) clamp(40px, 6vw, 84px);
}

.side {
  padding: 20px;
  border-radius: var(--r);
  background: #f1f1f1;
  background-image: radial-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px);
  background-size: 12px 12px;
}

.eyebrow {
  display: block;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.24em;
  margin-bottom: 6px;
}

.side-title {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
}

.side-nav ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.32;
}
.side-nav a:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- 正文 ---------- */
.prose { min-width: 0; }

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

.prose section + section {
  margin-top: clamp(36px, 5vw, 62px);
  padding-top: clamp(24px, 4vw, 44px);
  border-top: 2px solid var(--ink);
}

.prose h2 {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 3.3vw, 2.05rem);
  line-height: 1.26;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose h3 { margin: 28px 0 12px; font-size: 1.16rem; line-height: 1.4; }

.prose p { margin: 0 0 1.15em; font-size: 17.5px; line-height: 1.78; }

.prose section > p:first-of-type::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.1em;
  line-height: 0.84;
  padding: 0.08em 0.12em 0 0;
}

.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.25em; }
.prose li { margin-bottom: 0.5em; line-height: 1.72; }

.prose blockquote {
  margin: 28px 0;
  padding: 22px 24px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-size: 1.05rem;
  line-height: 1.62;
}
.prose blockquote p:last-child { margin: 0; }

.prose figure { margin: 26px 0; }
.prose figure img { width: 100%; border-radius: var(--r); }
.prose figcaption { margin-top: 8px; font-size: 16px; color: #333; }

.prose img { margin: 22px 0; border-radius: var(--r); }
.prose a { text-underline-offset: 3px; }

.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 10px; text-align: left; border-bottom: 1px solid #c9c9c9; }

/* ---------- 页脚 ---------- */
.foot {
  padding: clamp(34px, 6vw, 64px) var(--pad) 24px;
  background: var(--ink);
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--paper);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  max-width: 1000px;
  margin: 0 auto;
}

.foot dl { margin: 0; }

.foot dt {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.foot dd { margin: 0; }

.foot dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}
.foot dd a:hover { color: var(--paper); text-decoration: underline; }

.copy {
  max-width: 1000px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  text-align: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- 回到顶部 ---------- */
.totop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 0 0 2px var(--paper);
}

/* ---------- 动效 ---------- */
.motion .rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.62s ease, transform 0.62s ease;
}
.motion .rv.in { opacity: 1; transform: none; }

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

/* ---------- 断点 ---------- */
@media (max-width: 599px) {
  .hero-inner { flex-direction: column; align-items: center; text-align: center; }
  .hero-desc { text-align: center; }
  .cta { padding: 0 14px; font-size: 16px; }
}

@media (min-width: 900px) {
  .wrap { grid-template-columns: 252px minmax(0, 1fr); align-items: start; }
  .side { position: sticky; top: 132px; }
  .prose p { font-size: 18px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1.5fr); gap: 40px; }
}

@media (min-width: 1200px) {
  .hero-inner { max-width: 1000px; }
  .prose section { max-width: 46rem; }
}

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