:root {
  color-scheme: light dark;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-soft: #f0eee8;
  --text: #20242c;
  --muted: #636a75;
  --line: rgba(32, 36, 44, 0.13);
  --brand: #0b72a8;
  --brand-dark: #07547d;
  --accent: #c0613d;
  --shadow: 0 18px 45px rgba(36, 45, 56, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151718;
    --surface: #1f2326;
    --surface-soft: #24292d;
    --text: #f2f3ef;
    --muted: #afb7bd;
    --line: rgba(255, 255, 255, 0.14);
    --brand: #62b8e6;
    --brand-dark: #91d2f0;
    --accent: #e09772;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 16px;
  font-weight: 750;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  border-radius: 6px;
  padding: 8px 10px;
}

.nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 42px 0 36px;
}

.hero-copy {
  max-width: 680px;
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.actions,
.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.actions {
  margin: 28px 0 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.button.primary {
  background: var(--brand);
  color: #fff;
}

.button.primary:hover {
  background: var(--brand-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
}

.button.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 0;
}

.facts div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.facts dd {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

.cover-wrap {
  margin: 0;
  justify-self: center;
}

.cover {
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 595 / 878;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.reader-section {
  padding: 34px 0 54px;
}

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

.pdf-frame {
  display: block;
  width: 100%;
  height: min(86vh, 960px);
  min-height: 680px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.fallback {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 420px;
  padding: 40px;
  text-align: center;
}

.fallback p {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--brand);
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    min-height: auto;
    padding: 14px 16px;
    gap: 12px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  main,
  .footer {
    width: min(100% - 24px, 680px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding-top: 30px;
  }

  .cover-wrap {
    order: -1;
  }

  .cover {
    width: min(72vw, 300px);
  }

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

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

  .pdf-frame {
    height: 76vh;
    min-height: 520px;
  }
}
