/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #1a2030;
  line-height: 1.7;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.3; color: #0b1730; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.brand-mark {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.brand-name { font-size: 15px; color: #0b1730; }
.top-nav { display: flex; gap: 4px; align-items: center; }
.top-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #475569;
  transition: all 0.15s ease;
}
.top-nav a:hover { color: #0b1730; background: rgba(15, 23, 42, 0.05); }
.top-nav a.active { color: #2563eb; background: rgba(37, 99, 235, 0.08); }
.nav-cta {
  background: #0b1730 !important;
  color: #fff !important;
  margin-left: 8px;
}
.nav-cta:hover { background: #1e293b !important; }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(900px 400px at 80% 0%, rgba(37, 99, 235, 0.12), transparent 70%),
    radial-gradient(700px 400px at 0% 30%, rgba(14, 165, 233, 0.08), transparent 70%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  text-align: center;
}
.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.10);
  color: #2563eb;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.lead {
  max-width: 720px;
  margin: 0 auto 32px;
  color: #475569;
  font-size: 17px;
}
.hero-cta {
  display: inline-flex;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn-primary {
  background: #0b1730;
  color: #fff;
}
.btn-primary:hover { background: #1e293b; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: #0b1730;
  border: 1px solid rgba(15, 23, 42, 0.15);
}
.btn-ghost:hover { background: rgba(15, 23, 42, 0.05); }
.hero-meta {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 14px;
}

/* ---------- Chapters ---------- */
.chapter {
  padding: 80px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.chapter-alt {
  background: #f8fafc;
  border-bottom: none;
}
.chapter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.chapter-inner.reverse .chapter-text { order: 2; }
.chapter-inner.reverse .chapter-figure { order: 1; }
.chapter-inner.full { display: block; }
.chapter-inner.full .chapter-text.wide { max-width: 100%; }

.chapter-no {
  display: inline-block;
  background: #0b1730;
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.chapter h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.chapter-sub {
  color: #64748b;
  font-size: 16px;
  margin-bottom: 28px;
}

.op-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.op-list li {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
}
.chapter-alt .op-list li { background: #fff; }
.op-list li:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.op-list strong {
  font-weight: 600;
  color: #0b1730;
  font-size: 15px;
}
.op-list span { color: #475569; font-size: 14.5px; }
.op-list em {
  font-style: normal;
  font-weight: 600;
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.6);
  padding: 0 4px;
  border-radius: 3px;
}

.chapter-tip {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid #0ea5e9;
  border-radius: 8px;
  color: #0c4a6e;
  font-size: 14px;
}
.chapter-tip.warn {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: #ef4444;
  color: #7f1d1d;
}

.chapter-figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.20);
  text-align: center;
}
.chapter-figure img {
  width: 100%;
  background: #f1f5f9;
  padding: 24px;
}
.chapter-figure figcaption {
  padding: 12px 20px 16px;
  font-size: 13px;
  color: #64748b;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* ---------- Right-corner menu grid (chapter 6) ---------- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.menu-item {
  padding: 24px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  transition: all 0.15s ease;
}
.menu-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.menu-item h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.menu-item p {
  color: #475569;
  font-size: 14.5px;
}
.menu-item-warn {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(254, 242, 242, 0.5);
}
.menu-item-warn strong { color: #b91c1c; }

/* ---------- Resources ---------- */
.chapter-resources {
  text-align: center;
  background: #f8fafc;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 38px);
  margin-bottom: 12px;
}
.section-sub {
  color: #64748b;
  font-size: 16px;
  margin-bottom: 40px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.resource-card {
  padding: 32px 24px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  text-align: left;
  transition: all 0.15s ease;
}
.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}
.resource-icon { font-size: 36px; margin-bottom: 12px; }
.resource-card h3 { font-size: 18px; margin-bottom: 8px; }
.resource-card p { color: #64748b; font-size: 14.5px; margin-bottom: 16px; }
.resource-link { color: #2563eb; font-weight: 500; font-size: 14.5px; }
.resource-link:hover { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0b1730 0%, #1e293b 100%);
  color: #e2e8f0;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.contact-section h2 { color: #fff; font-size: 32px; margin-bottom: 12px; }
.contact-text p { color: #94a3b8; font-size: 16px; }
.contact-info {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 28px;
}
.contact-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.contact-row:last-child { border-bottom: none; }
.contact-label {
  width: 70px;
  color: #94a3b8;
  font-size: 14px;
}
.contact-value { color: #f1f5f9; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0b1730;
  color: #94a3b8;
  padding: 32px 0;
  font-size: 13.5px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-inner strong { color: #f1f5f9; }
.footer-inner p { margin-top: 4px; color: #64748b; }
.footer-meta { max-width: 420px; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .top-nav { display: none; }
  .header-inner { justify-content: flex-start; }
  .hero { padding: 64px 0 56px; }
  .chapter { padding: 56px 0; }
  .chapter-inner,
  .chapter-inner.reverse,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .chapter-inner.reverse .chapter-text,
  .chapter-inner.reverse .chapter-figure { order: 0; }
  .footer-meta { text-align: left; }
  .hero-meta { gap: 16px; }
}
