:root {
    --guide-bg: #f6f8fb;
    --guide-surface: #ffffff;
    --guide-sidebar: #f1f4f8;
    --guide-ink: #1f2937;
    --guide-muted: #64748b;
    --guide-line: #e2e8f0;
    --guide-brand: #3451b2;
    --guide-brand-soft: #e8edff;
    --guide-code: #0d1117;
}

* { box-sizing: border-box; }

body {
    background: var(--guide-bg) !important;
    color: var(--guide-ink) !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
    padding: 24px !important;
}

/* Course index */
body > .container {
    max-width: 1240px !important;
    padding: 0 !important;
    background: var(--guide-surface) !important;
    border: 1px solid var(--guide-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08) !important;
    overflow: hidden;
}

.header {
    display: flex !important;
    align-items: flex-end !important;
    gap: 32px;
    margin: 0 !important;
    padding: 52px 56px 46px !important;
    border: 0 !important;
    background: #111827 !important;
    color: #f8fafc;
}

.header h1 {
    margin: 0 !important;
    color: #f8fafc !important;
    background: none !important;
    -webkit-text-fill-color: #f8fafc;
    text-shadow: none !important;
    font-size: clamp(2.5rem, 6vw, 5.5rem) !important;
    letter-spacing: -.07em !important;
    line-height: .98;
}

.header h1 small {
    color: #dbeafe !important;
    background: transparent !important;
    border: 1px solid rgba(147, 197, 253, .55);
    border-radius: 6px !important;
    box-shadow: none !important;
    padding: .35rem .65rem !important;
    font-size: .78rem !important;
}

.header-badge {
    margin-left: auto;
    background: transparent !important;
    color: #cbd5e1 !important;
    border: 0 !important;
    border-left: 1px solid rgba(147, 197, 253, .5) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 12px 0 12px 20px !important;
    line-height: 1.6;
}

.header-badge i { display: none; }
.catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; margin: 0 !important; padding: 36px 48px 48px; }
.chapter-card { min-height: 126px; background: #fff !important; border: 1px solid var(--guide-line) !important; border-radius: 9px !important; box-shadow: none !important; padding: 18px !important; }
.chapter-card:hover { transform: none !important; background: #f8fbff !important; border-color: #93c5fd !important; box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important; }
.chapter-number { background: var(--guide-brand-soft) !important; color: var(--guide-brand) !important; border: 0 !important; border-radius: 5px !important; padding: 3px 8px !important; font: 700 .72rem/1.3 ui-monospace, monospace; }
.chapter-title { color: #172554 !important; font-size: 1rem !important; line-height: 1.45 !important; }
.chapter-title span { display: none !important; }
.chapter-topics { color: var(--guide-muted) !important; font-size: .84rem !important; }
.chapter-topics::before { color: var(--guide-brand) !important; }
.footer { margin: 0 !important; padding: 24px 48px 36px !important; border-top: 1px solid var(--guide-line) !important; color: var(--guide-muted) !important; background: #fff; }
.footer .brand, .footer .contact { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; color: var(--guide-muted) !important; }
.footer .brand strong { color: var(--guide-brand) !important; }
.footer .contact { font-size: .9rem; }
.footer .color-dot { display: none; }

/* Chapter pages */
.double-border {
    max-width: 1240px !important;
    border: 1px solid var(--guide-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08) !important;
}
.double-border > .container { grid-template-columns: 248px minmax(0, 1fr) !important; }
.double-border .sidebar { background: var(--guide-sidebar) !important; border-right: 1px solid var(--guide-line) !important; padding: 28px 18px !important; }
.double-border .sidebar h3 { color: var(--guide-ink) !important; border-left: 3px solid var(--guide-brand) !important; padding-left: 12px !important; margin-bottom: 22px !important; font-size: 1.1rem !important; }
.double-border .chapter-list li { margin-bottom: 2px !important; }
.double-border .chapter-list a { color: #526174 !important; border-radius: 7px !important; font-size: .88rem !important; padding: 8px 10px !important; }
.double-border .chapter-list a:hover { background: var(--guide-brand-soft) !important; color: var(--guide-brand) !important; transform: none !important; }
.double-border .chapter-list .active { background: var(--guide-brand) !important; color: #fff !important; box-shadow: 0 4px 10px rgba(52, 81, 178, .2) !important; }
.double-border .main-content { background: #fff !important; padding: 48px clamp(28px, 5vw, 76px) 52px !important; line-height: 1.85; }
.double-border .main-content h2 { color: #172554 !important; border-left: 4px solid var(--guide-brand) !important; border-bottom: 0 !important; background: linear-gradient(90deg, var(--guide-brand-soft), transparent) !important; border-radius: 5px !important; padding: 9px 13px !important; margin: 0 0 28px !important; }
.double-border .main-content h3 { color: #26364d !important; background: linear-gradient(90deg, var(--guide-brand-soft), transparent) !important; border-left: 4px solid #7c8edb !important; border-radius: 5px !important; padding: 9px 13px !important; }
.double-border .main-content p, .double-border .main-content li { color: #465569; }
.double-border .main-content strong { color: #9a3412; }
.double-border pre { background: var(--guide-code) !important; border: 1px solid #343b58 !important; border-radius: 9px !important; box-shadow: 0 12px 28px rgba(15, 23, 42, .16), inset 0 1px 0 rgba(255, 255, 255, .025) !important; padding: 20px !important; line-height: 1.7; }
.double-border table { background: #fff !important; border-color: var(--guide-line) !important; }
.double-border th { background: #f8fafc !important; color: #334155 !important; border-color: var(--guide-line) !important; }
.double-border td { border-color: var(--guide-line) !important; }
.double-border .tip, .double-border .warning, .double-border .highlight { border-radius: 8px !important; box-shadow: none !important; }
.double-border .footer-nav { border-top: 1px solid var(--guide-line) !important; }
.double-border .footer-nav a { background: #f8fafc !important; border: 1px solid var(--guide-line); color: var(--guide-brand) !important; border-radius: 7px !important; }
.double-border footer { color: var(--guide-muted) !important; border-top-color: var(--guide-line) !important; }

/* Shiki GitHub Dark Default; token colors come directly from the open-source theme. */
pre code {
    display: block;
    color: #e6edf3;
    background: transparent !important;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace !important;
    font-size: .88rem;
    line-height: 1.72;
}

@media (max-width: 700px) {
    body { padding: 10px !important; }
    .header { display: block !important; padding: 38px 28px 34px !important; }
    .header-badge { margin-top: 28px; padding: 12px 0 0 0 !important; border-left: 0 !important; border-top: 1px solid rgba(147, 197, 253, .45) !important; }
    .catalog-grid { grid-template-columns: 1fr !important; padding: 24px 16px 32px; }
    .double-border > .container { display: block !important; }
    .double-border .sidebar { border-right: 0 !important; border-bottom: 1px solid var(--guide-line); }
    .double-border .main-content { padding: 30px 20px 38px !important; }
}
