:root {
  --ink: #1f2933;
  --muted: #667085;
  --line: #d7dce2;
  --paper: #ffffff;
  --surface: #f6f7f4;
  --surface-strong: #eef2ee;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --blue: #1d4ed8;
  --amber: #b45309;
  --page-width: 940px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(31, 41, 51, 0.88);
  color: #fff;
  backdrop-filter: blur(16px);
}

.brand,
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  min-width: 0;
  font-weight: 700;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}

.text-link,
.viewer-tools button,
.page-jump a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.text-link {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.12);
}

.text-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(11, 31, 54, 0.86), rgba(11, 31, 54, 0.32)),
    url("assets/hero-cover.jpg") center 18% / cover no-repeat;
  color: #fff;
}

.hero-shade {
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(0deg, rgba(10, 18, 24, 0.74), rgba(10, 18, 24, 0));
}

.hero-content {
  position: relative;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 70px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #a7f3d0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1040px;
  margin-bottom: 18px;
  font-size: 3.25rem;
  line-height: 1.08;
  font-weight: 800;
  word-break: keep-all;
}

.hero-copy {
  max-width: 860px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 48px;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 46px;
  border-bottom: 1px solid var(--line);
}

.overview h2,
.reader-head h2 {
  margin-bottom: 12px;
  font-size: 2rem;
  line-height: 1.22;
}

.overview p {
  max-width: 740px;
  margin-bottom: 0;
  color: #4b5563;
  line-height: 1.9;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.stat-grid div {
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.stat-grid strong {
  display: block;
  color: var(--teal-dark);
  font-size: 2.15rem;
  line-height: 1;
}

.stat-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.reader-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.side-nav {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
}

.side-title {
  margin-bottom: 12px;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 800;
}

.section-link {
  display: block;
  padding: 11px 12px;
  border-left: 3px solid transparent;
  color: #4b5563;
  font-size: 0.94rem;
  line-height: 1.45;
}

.section-link span {
  display: block;
  margin-top: 4px;
  color: #8a94a3;
  font-size: 0.78rem;
}

.section-link:hover,
.section-link.is-active {
  border-left-color: var(--teal);
  background: #e9f5f1;
  color: #0f3f3b;
}

.reader {
  min-width: 0;
}

.reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.reader-head h2 {
  margin-bottom: 0;
}

.viewer-tools {
  position: sticky;
  top: 76px;
  z-index: 10;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.viewer-tools button {
  min-width: 42px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.viewer-tools button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.page-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.page-jump a {
  width: 42px;
  height: 34px;
  border-color: var(--line);
  background: #fff;
  color: #475467;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.page-jump a:hover,
.page-jump a.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.page-list {
  display: grid;
  gap: 34px;
}

.section-anchor,
.page-card {
  scroll-margin-top: 92px;
}

.page-card {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 45px rgba(31, 41, 51, 0.09);
}

.page-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.page-title {
  min-width: 0;
}

.page-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
}

.page-title h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.4;
}

.image-link {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #4b5563;
  font-size: 0.86rem;
}

.image-link:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.page-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1365 / 1930;
  background: #fff;
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px;
  border-top: 1px solid var(--line);
  background: #202832;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer a {
  color: #fff;
}

@media (max-width: 980px) {
  .topbar {
    padding: 0 18px;
  }

  .hero {
    min-height: 540px;
  }

  .hero-content {
    width: min(calc(100% - 34px), 760px);
    padding-bottom: 54px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .overview {
    grid-template-columns: 1fr;
    gap: 24px;
    width: min(calc(100% - 34px), 760px);
  }

  .reader-shell {
    grid-template-columns: 1fr;
    width: min(calc(100% - 34px), 900px);
  }

  .side-nav {
    position: relative;
    top: auto;
    max-height: none;
  }

  #sectionNav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .section-link {
    flex: 0 0 170px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 8px;
    background: #fff;
  }

  .section-link:hover,
  .section-link.is-active {
    border-bottom-color: var(--teal);
    border-left-color: transparent;
  }

  .reader-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewer-tools {
    position: static;
  }
}

@media (max-width: 620px) {
  .brand span:last-child,
  .top-actions a[href="#reader"] {
    display: none;
  }

  .topbar {
    min-height: 58px;
  }

  .hero {
    min-height: 490px;
    background-position: center top;
  }

  h1 {
    font-size: 1.75rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .reader-shell {
    width: min(calc(100% - 22px), 900px);
  }

  .page-card header {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

  .text-link,
  .viewer-tools button,
  .page-jump a {
    transition: none;
  }
}
