* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; background: #eef8fb; color: #0f172a; line-height: 1.78; font-size: 18px; }
a { color: inherit; text-decoration: none; }
.course-shell { width: min(1400px, 100%); margin: 28px auto; background: #fffdf8; border: 2px solid #f4b000; border-radius: 22px; display: flex; align-items: stretch; overflow: visible; box-shadow: 0 16px 36px rgba(15, 23, 42, .08); }
.sidebar { flex: 0 0 280px; width: 280px; border-right: 1px solid #f5d37a; padding: 28px 20px; background: #fffaf0; overflow: visible; }
.sidebar h2 { margin: 0 0 22px; color: #b45309; font-size: 24px; border-left: 6px solid #f59e0b; padding-left: 12px; }
.nav-item { display: block; padding: 10px 12px; margin: 5px 0; border-radius: 12px; color: #10233f; font-size: 16px; line-height: 1.35; }
.nav-item:hover { background: #fff1c2; }
.nav-item.active { background: #3b82f6; color: #fff; font-weight: 700; box-shadow: 0 6px 14px rgba(59,130,246,.25); }
.main { flex: 1 1 auto; min-width: 0; padding: 34px 44px 28px; overflow: visible; }
.course-title { font-size: clamp(28px, 3vw, 40px); color: #7c2d12; margin: 0 0 6px; letter-spacing: 0; }
.chapter-title { font-size: clamp(21px, 2vw, 28px); color: #1e40af; margin: 0 0 24px; padding-bottom: 16px; border-bottom: 2px solid #fde68a; }
.content { max-width: 100%; }
.content h2 { font-size: 30px; color: #1e3a8a; border-left: 7px solid #f59e0b; padding-left: 14px; margin: 34px 0 18px; }
.content h3 { font-size: 24px; color: #7c2d12; margin: 28px 0 12px; }
.content p { margin: 12px 0; }
.content ul, .content ol { padding-left: 1.4em; }
.content li { margin: 8px 0; }
.content table { width: 100%; border-collapse: collapse; margin: 18px 0; background: #fff; }
.content th, .content td { border: 1px solid #f3c46b; padding: 10px 12px; vertical-align: top; }
.content th { background: #fff1c2; color: #7c2d12; }
.content pre { background: #102033; color: #e0f2fe; padding: 16px; border-radius: 12px; overflow-x: auto; font-size: 15px; }
.content code { font-family: Consolas, "Courier New", monospace; }
.highlight, .tip, .warning { margin: 18px 0; padding: 16px 18px; border-radius: 14px; border: 1px solid; }
.highlight { background: #fff7ed; border-color: #fdba74; }
.tip { background: #ecfdf5; border-color: #86efac; }
.warning { background: #fef2f2; border-color: #fca5a5; }
svg, img, canvas, video { max-width: 100%; height: auto; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; border-top: 1px solid #ead7a1; margin-top: 34px; padding-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border-radius: 999px; background: #eef4fb; color: #1e40af; font-weight: 700; }
.btn.next { justify-self: end; }
.btn.disabled { color: #94a3b8; pointer-events: none; }
.footer { margin-top: 26px; padding-top: 18px; border-top: 1px dashed #d7e3ef; text-align: center; color: #64748b; font-size: 16px; }
@media (max-width: 860px) {
  .course-shell { margin: 0; border-left: 0; border-right: 0; border-radius: 0; flex-direction: column; }
  .sidebar { width: 100%; flex-basis: auto; border-right: 0; border-bottom: 1px solid #f5d37a; }
  .main { padding: 24px 18px; }
  .pager { grid-template-columns: 1fr; }
  .btn, .btn.next { justify-self: stretch; }
}
