
:root { --accent: #2b5ce6; --bg: #f7f8fa; --card: #fff; --text: #1f2329; --muted: #6b7280; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; line-height: 1.75; }
.container { max-width: 960px; margin: 0 auto; padding: 32px 24px 80px; }
.doc-header { background: linear-gradient(135deg, #2b5ce6, #7b5ce6); color: #fff; border-radius: 14px; padding: 28px 32px; margin-bottom: 28px; }
.doc-header h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.4; }
.doc-header .meta { font-size: 13px; opacity: .85; }
.doc-body { background: var(--card); border-radius: 14px; padding: 32px 36px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.doc-body h1 { font-size: 24px; border-bottom: 2px solid #e5e7eb; padding-bottom: 10px; margin-top: 40px; }
.doc-body h2 { font-size: 20px; margin-top: 34px; }
.doc-body h3 { font-size: 17px; margin-top: 26px; }
.doc-body h4, .doc-body h5, .doc-body h6 { font-size: 15px; margin-top: 20px; }
.doc-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; box-shadow: 0 2px 8px rgba(0,0,0,.08); display: block; }
.doc-body pre { background: #1e2430; color: #e6e6e6; border-radius: 8px; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.doc-body code { font-family: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace; }
.doc-body :not(pre) > code { background: #eef1f5; color: #d6336c; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.doc-body blockquote { border-left: 4px solid var(--accent); background: #f3f6ff; margin: 14px 0; padding: 10px 16px; border-radius: 0 8px 8px 0; color: #333; }
.doc-body a { color: var(--accent); text-decoration: none; }
.doc-body a:hover { text-decoration: underline; }
.doc-body li { margin: 4px 0; }
.video-card { display: flex; align-items: flex-start; gap: 14px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; margin: 16px 0; background: #fafbff; }
.video-card .video-card-icon { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; background: #ff3b30; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.video-card.bili .video-card-icon { background: #fb7299; }
.video-card .video-card-title { font-weight: 600; font-size: 15px; }
.video-card .video-card-desc { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }
.video-card a { display: inline-block; padding: 6px 14px; background: var(--accent); color: #fff; border-radius: 6px; font-size: 13px; text-decoration: none; }
.video-card.bili a { background: #fb7299; }
.video-card .bili-frame { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px; margin: 10px 0; }
.doc-footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 24px; }
.toc { background: #f3f6ff; border-radius: 10px; padding: 14px 20px; margin-bottom: 20px; }
.toc ul { margin: 4px 0; padding-left: 20px; }
@media (max-width: 600px) {
  .doc-body { padding: 20px 16px; }
  .doc-header { padding: 20px; }
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 24px; }
.reader-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.reader-tools a { color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 7px; padding: 7px 12px; text-decoration: none; font-size: 14px; }
.reader-tools a:hover { background: rgba(255,255,255,.28); }
.offline-note { margin: 18px 0 0; font-size: 13px; opacity: .95; }
.local-toc { background: #fff; border: 1px solid #dfe5ef; border-radius: 12px; margin-bottom: 22px; padding: 16px 20px; }
.local-toc summary { cursor: pointer; color: #214aa7; font-weight: 600; }
.local-toc input { width: 100%; margin: 16px 0 10px; padding: 10px 12px; border: 1px solid #cbd5e3; border-radius: 7px; font: inherit; }
.local-toc ol { padding-left: 22px; max-height: 65vh; overflow: auto; }
.local-toc li { margin: 7px 0; }
.local-toc a { color: #315bb0; text-decoration: none; }
.local-toc .toc-h1 { font-weight: 700; margin-top: 16px; }
.local-toc .toc-h2 { margin-left: 12px; font-size: 14px; }
.image-open { display: block; cursor: zoom-in; }
.image-caption { display: block; text-align: center; color: #718096; font-size: 12px; line-height: 1.5; margin: -4px 0 20px; }
.external-resource { display: block; border: 1px solid #dfe5ef; border-radius: 8px; padding: 13px 16px; margin: 12px 0; background: #f7f9fd; }
.doc-body { overflow-wrap: anywhere; }
.doc-body pre { overflow-wrap: normal; }
.doc-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.doc-body mjx-container[display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.doc-body th, .doc-body td { padding: 10px; border: 1px solid #e0e6ef; }
button { cursor: pointer; font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #edab3b; outline-offset: 3px; }
.back-to-top { position: fixed; bottom: 22px; right: 20px; border-radius: 24px; padding: 9px 15px; background: #243c6b; color: white; text-decoration: none; z-index: 10; font-size: 13px; }
#image-dialog { width: min(96vw, 1800px); max-width: 96vw; height: 94vh; max-height: 94vh; margin: auto; padding: 0; border: 0; border-radius: 10px; background: #eef1f5; }
#image-dialog::backdrop { background: rgba(12,22,39,.8); }
.image-dialog-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #d5ddea; }
#image-dialog-title { flex: 1; font-size: 14px; }
.image-dialog-toolbar a, .image-dialog-toolbar button { padding: 7px 11px; border: 1px solid #c8d2e0; border-radius: 6px; background: white; color: #254aa3; text-decoration: none; font-size: 14px; }
.image-dialog-scroll { height: calc(100% - 65px); padding: 18px; overflow: auto; text-align: center; }
#image-dialog-content { display: inline-block; max-width: none; height: auto; width: auto; background: white; box-shadow: 0 2px 16px rgba(0,0,0,.08); }
.report-container { max-width: 1400px; margin: 0 auto; padding: 30px 22px 80px; }
.report-container .doc-header { margin-bottom: 22px; }
.verification-panel { background: #fff; padding: 22px; border: 1px solid #dfe5ef; border-radius: 12px; margin-bottom: 22px; }
.verification-panel h2 { margin-top: 0; }
.verification-panel button { background: #2b5ce6; color: #fff; border: 0; border-radius: 7px; padding: 10px 16px; }
.verification-panel button:disabled { opacity: .6; cursor: wait; }
#verification-status { display: block; padding-top: 16px; color: #36516d; font-size: 15px; }
#verification-status[data-state="passed"] { color: #06754a; font-weight: 700; }
#verification-status[data-state="failed"], #verification-errors { color: #b83838; }
.report-note { color: #67788d; font-size: 14px; }
.image-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 20px; }
.image-report-card { background: #fff; border: 1px solid #dfe5ef; border-radius: 10px; padding: 16px; }
.image-report-card h2 { margin: 0 0 12px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.image-report-card img { width: 100%; height: 230px; object-fit: contain; background: #f4f6f9; }
.image-report-card p, .image-report-card details { color: #67788d; font-size: 12px; overflow-wrap: anywhere; }
.image-report-card summary { cursor: pointer; }
@media (max-width: 600px) {
  .container, .report-container { padding: 16px 10px 60px; }
  .reader-tools { gap: 7px; }
  .reader-tools a { font-size: 12px; }
  .local-toc { padding: 14px; }
  .image-dialog-toolbar { flex-wrap: wrap; gap: 6px; padding: 9px; }
  .image-dialog-toolbar a, .image-dialog-toolbar button { font-size: 12px; }
  .image-dialog-scroll { padding: 8px; }
  .image-report-grid { grid-template-columns: 1fr; }
  .back-to-top { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .reader-tools, .local-toc, .back-to-top, .image-caption, #image-dialog { display: none; } .doc-body { box-shadow: none; padding: 0; } }
