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

:root {
  --ink: #1D2B53;
  --red: #E4572E;
  --yellow: #F2B705;
  --paper: #F5F3EC;
  --card: rgba(255, 255, 255, 0.62);
  --line: rgba(29, 43, 83, 0.16);
  --muted: #4A577A;
  --rail: 264px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', 'Lexend', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.8;
}

h1, h2, h3, .brand, .num, .veil-mark, .veil-nav a, .foot dt, .burger {
  font-family: 'Lexend', 'Source Sans 3', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

a { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* 左轨 */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 20px 22px;
  background: var(--ink);
  color: #fff;
  border-right: 5px solid var(--yellow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
}
.brand:hover { color: var(--yellow); }
.brand-logo { display: block; width: 40px; height: 40px; border-radius: 4px; }
.brand-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  border-radius: 4px;
}

.burger {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--ink);
  border: 0;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.burger:hover { background: var(--red); color: #fff; }
.burger-bar { display: block; width: 18px; height: 2px; background: currentColor; }
.burger-txt { font-size: 16px; }

.rail-contact { margin-top: auto; }
.rail-label {
  margin: 0 0 2px;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.55);
}
.rail-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  color: #fff;
  font-weight: 600;
  text-decoration-thickness: 2px;
}
.rail-link:hover { color: var(--yellow); }

/* 遮罩菜单 */
.veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 40px;
  background: var(--ink);
  color: #fff;
  visibility: hidden;
  transform: translateY(-102%);
  transition: transform 0.28s ease, visibility 0.28s ease;
  overflow: auto;
}
.veil.on { visibility: visible; transform: none; }

.veil-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 5px solid var(--yellow);
}
.veil-mark { font-weight: 700; font-size: 20px; color: var(--yellow); }
.veil-close {
  min-height: 44px;
  padding: 10px 18px;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.veil-close:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

.veil-nav { display: flex; flex-direction: column; }
.veil-nav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 50px;
  padding: 14px 2px;
  color: #fff;
  text-decoration: none;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transition: color 0.16s ease, padding-left 0.16s ease;
}
.veil-nav a:hover { color: var(--yellow); padding-left: 10px; }

.num {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--yellow);
}

/* 主体骨架 */
.page { margin-left: var(--rail); }

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  padding: 34px 44px 72px 44px;
}

div { min-width: 0; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
  min-height: 45vh;
  padding: 10px 0 34px;
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}

.hero-ghost {
  position: absolute;
  top: -0.22em;
  left: -0.06em;
  z-index: 0;
  font-size: clamp(64px, 11vw, 150px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: rgba(29, 43, 83, 0.08);
  pointer-events: none;
  will-change: transform;
}

.hero-text { position: relative; z-index: 1; }

h1 {
  margin: 0 0 14px;
  font-size: clamp(27px, 3.4vw, 42px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.lead {
  margin: 0 0 20px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 11px 22px;
  background: var(--red);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.16s ease;
}
.hero-cta:hover { background: var(--ink); color: #fff; }

.hero-fig {
  margin: 0;
  aspect-ratio: 4 / 3;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--yellow);
  overflow: hidden;
}
.hero-img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 正文 */
.body-wrap { padding-top: 38px; }

.prose section[id] {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 2px solid var(--line);
  scroll-margin-top: 22px;
}
.prose section[id]:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose h2 {
  margin: 0 0 0.55em;
  padding-left: 14px;
  border-left: 6px solid var(--yellow);
  font-size: clamp(21px, 2.3vw, 28px);
  line-height: 1.4;
  font-weight: 700;
}

.prose h3 { margin: 1.5em 0 0.4em; font-size: 19px; line-height: 1.5; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.35em; }
.prose li { margin-bottom: 0.4em; }
.prose img { max-width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 14px; }
.prose blockquote {
  margin: 0 0 1.2em;
  padding: 4px 0 4px 18px;
  border-left: 6px solid var(--red);
  color: var(--muted);
}
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.2em; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; }
.prose th { background: var(--yellow); }

/* 侧栏 */
.side {
  position: sticky;
  top: 26px;
  padding: 20px 18px 14px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.side h2 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.subtitle {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}
.toc { display: flex; flex-direction: column; }
.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.15s ease, padding-left 0.15s ease;
}
.toc a:last-child { border-bottom: 0; }
.toc a:hover { color: var(--red); padding-left: 6px; }

/* 页脚 */
.foot {
  padding: 46px 44px 26px;
  background: var(--ink);
  color: #fff;
  border-top: 7px solid var(--yellow);
}
.foot a { color: #fff; text-decoration-thickness: 2px; }
.foot a:hover { color: var(--yellow); }

.foot-cols {
  display: grid;
  grid-template-columns: 1.5fr 1.1fr 1fr;
  gap: 34px;
}
.foot dl { margin: 0; }
.foot dt {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.04em;
}
.foot dd { margin: 0; }
.foot-brand dd { font-size: 16px; color: rgba(255, 255, 255, 0.78); line-height: 1.75; }
.foot nav dd a,
.foot-more dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 0;
  font-size: 16px;
}

.sub {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.sub-label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--yellow); }
.sub-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sub-row input {
  flex: 1 1 200px;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
}
.sub-row input::placeholder { color: rgba(255, 255, 255, 0.6); }
.sub-row button {
  min-height: 46px;
  padding: 10px 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--yellow);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.sub-row button:hover { background: var(--red); color: #fff; }

.copy {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.62);
}

/* 入场 */
.js [data-rv] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.js [data-rv].in { opacity: 1; transform: none; }
.js .hero-fig[data-rv] { transition-delay: 0.08s; }

@media (max-width: 900px) {
  :root { --rail: 0px; }

  .rail {
    inset: 0 0 auto 0;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 4px solid var(--yellow);
  }
  .brand { font-size: 18px; }
  .brand-logo, .brand-mark { width: 32px; height: 32px; }
  .burger { margin-left: auto; align-self: center; }
  .rail-contact { display: none; }

  .page { margin-left: 0; padding-top: 70px; }

  main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 20px 18px 56px;
  }

  .hero { grid-template-columns: 1fr; min-height: 0; gap: 20px; padding-bottom: 26px; }
  .hero-ghost { font-size: clamp(48px, 17vw, 96px); }
  .hero-fig { aspect-ratio: 16 / 10; }
  .lead { max-width: none; }

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

  .side { position: static; }

  .foot { padding: 34px 18px 22px; }
  .foot-cols { grid-template-columns: 1fr; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .veil, .veil-nav a, .toc a, .burger, .hero-cta { transition: none; }
  .js [data-rv] { opacity: 1; transform: none; }
}

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