/* GESP 教程 — 对齐站内资讯/白名单视觉语言 */
:root {
    --gesp-bg: #f5f7fb;
    --gesp-surface: #ffffff;
    --gesp-text: #1f2329;
    --gesp-text-2: #646a73;
    --gesp-text-3: #8f959e;
    --gesp-line: #eef0f3;
    --gesp-primary: #1677ff;
    --gesp-primary-soft: #e8f3ff;
    --gesp-primary-hover: #0f66e0;
    --gesp-radius: 14px;
    --gesp-shadow: 0 1px 2px rgba(31, 35, 41, 0.04), 0 10px 28px rgba(31, 35, 41, 0.06);
}

body:has(.gesp-wrap) {
    background: var(--gesp-bg);
}

.gesp-wrap {
    min-height: calc(100vh - 120px);
    padding-bottom: 56px;
    background:
        radial-gradient(1100px 280px at 16% -60px, rgba(22, 119, 255, 0.10), transparent 58%),
        radial-gradient(900px 240px at 94% 0, rgba(14, 165, 233, 0.07), transparent 55%),
        var(--gesp-bg);
}

.gesp-page {
    max-width: 1250px;
    margin: 0 auto;
    padding: 28px 16px 0;
    color: var(--gesp-text);
}

.gesp-eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--gesp-primary);
}

.gesp-hero {
    margin-bottom: 22px;
    padding: 6px 4px 2px;
}

.gesp-hero-title {
    margin: 0 0 12px;
    font-size: 34px;
    font-weight: 450;
    letter-spacing: -0.03em;
    color: #17191c;
    line-height: 1.2;
}

.gesp-hero-desc {
    margin: 0;
    max-width: 640px;
    font-size: 16px;
    color: var(--gesp-text-2);
    line-height: 1.7;
}

.gesp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.gesp-hero-meta span {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(22, 119, 255, 0.12);
    color: var(--gesp-text-2);
    font-size: 12px;
    font-weight: 400;
}

.gesp-hero-level {
    margin-bottom: 16px;
}

/* ---- level page ---- */
.gesp-level-page {
    padding-bottom: 8px;
}

.gesp-level-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-bottom: 18px;
    padding: 34px 36px;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    background: #071a3a;
    box-shadow:
        0 1px 2px rgba(7, 26, 58, 0.18),
        0 18px 40px rgba(11, 60, 140, 0.28);
}

.gesp-level-banner-media {
    position: absolute;
    inset: 0;
    background:
        url("/assets/img/gesp-level-banner.webp") center right / cover no-repeat;
    transform: scale(1.03);
    pointer-events: none;
}

.gesp-level-banner-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg,
            rgba(4, 18, 48, 0.88) 0%,
            rgba(6, 28, 68, 0.72) 28%,
            rgba(8, 48, 110, 0.38) 52%,
            rgba(10, 70, 150, 0.14) 74%,
            rgba(10, 90, 180, 0.04) 100%);
    pointer-events: none;
}

.gesp-level-banner::after {
    content: none;
}

.gesp-level-banner-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.gesp-level-banner .gesp-eyebrow {
    color: rgba(255, 255, 255, 0.82);
}

.gesp-level-banner-title {
    margin: 0 0 12px;
    font-size: 40px;
    font-weight: 450;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: #fff;
}

.gesp-level-banner-desc {
    margin: 0;
    max-width: 560px;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.gesp-level-banner-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.gesp-level-banner-meta span {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(8, 24, 56, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
}

.gesp-level-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    background: #fff;
    color: #0a3d9c !important;
    font-size: 14px;
    font-weight: 450;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(0, 16, 48, 0.28);
    transition: transform .18s ease, box-shadow .18s ease;
}

.gesp-level-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(8, 40, 110, 0.22);
}

.gesp-level-start::after {
    content: " →";
}

.gesp-level-banner-mark {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 132px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
}

.gesp-level-banner-num {
    font-size: 64px;
    font-weight: 450;
    letter-spacing: -0.06em;
    line-height: 1;
    color: #fff;
}

.gesp-level-banner-label {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 450;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.72);
}

.gesp-level-switch {
    margin: 0 0 20px;
    padding: 14px 16px 16px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 253, 0.98) 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow:
        0 1px 2px rgba(31, 35, 41, 0.04),
        0 10px 24px rgba(31, 35, 41, 0.04);
}

.gesp-level-switch-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.gesp-level-switch-head strong {
    font-size: 13px;
    font-weight: 450;
    color: #17191c;
    letter-spacing: -0.01em;
}

.gesp-level-switch-head span {
    font-size: 12px;
    color: var(--gesp-text-3);
    font-weight: 400;
}

.gesp-level-switch-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
}

.gesp-level-switch-track::before {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    top: 18px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #dbe7ff 0%, #e8eef6 50%, #dbe7ff 100%);
    pointer-events: none;
}

.gesp-level-switch .gesp-level-tab {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 0 4px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--gesp-text-2);
    text-decoration: none !important;
    transition: color .15s ease;
}

.gesp-level-tab-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.gesp-level-switch .gesp-level-tab em {
    font-style: normal;
    font-size: 14px;
    font-weight: 450;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #64748b;
}

.gesp-level-switch .gesp-level-tab span {
    font-size: 12px;
    font-weight: 400;
    opacity: 1;
    color: var(--gesp-text-3);
    white-space: nowrap;
    transition: color .15s ease;
}

.gesp-level-switch .gesp-level-tab.is-ready .gesp-level-tab-dot {
    border-color: rgba(22, 119, 255, 0.28);
    background: #f3f8ff;
}

.gesp-level-switch .gesp-level-tab.is-ready em {
    color: var(--gesp-primary);
}

.gesp-level-switch .gesp-level-tab:hover {
    background: transparent;
    border-color: transparent;
    color: var(--gesp-primary-hover);
}

.gesp-level-switch .gesp-level-tab:hover .gesp-level-tab-dot {
    transform: translateY(-1px);
    border-color: rgba(22, 119, 255, 0.35);
    box-shadow: 0 6px 14px rgba(22, 119, 255, 0.12);
}

.gesp-level-switch .gesp-level-tab:hover span {
    color: var(--gesp-primary-hover);
}

.gesp-level-switch .gesp-level-tab.active {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--gesp-primary-hover);
}

.gesp-level-switch .gesp-level-tab.active .gesp-level-tab-dot {
    border-color: transparent;
    background: linear-gradient(145deg, #3b8dff 0%, #1677ff 55%, #0f66e0 100%);
    box-shadow: 0 8px 18px rgba(22, 119, 255, 0.28);
    transform: translateY(-1px);
}

.gesp-level-switch .gesp-level-tab.active em {
    color: #fff;
}

.gesp-level-switch .gesp-level-tab.active span {
    color: var(--gesp-primary-hover);
    font-weight: 450;
}

.gesp-level-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.gesp-level-empty {
    grid-column: 1 / -1;
}

.gesp-crumb {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 0 0 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
    font-size: 13px;
    line-height: 1.3;
    color: var(--gesp-text-3);
}

.gesp-crumb a {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--gesp-text-2);
    font-weight: 400;
    text-decoration: none !important;
    transition: color .15s, background .15s;
}

.gesp-crumb a:hover {
    color: var(--gesp-primary);
    background: var(--gesp-primary-soft);
}

.gesp-crumb-sep {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #cbd5e1;
    flex: 0 0 auto;
}

.gesp-crumb-current {
    display: inline-flex;
    align-items: center;
    max-width: min(420px, 55vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--gesp-primary-soft);
    color: var(--gesp-primary-hover);
    font-weight: 450;
}

.gesp-board {
    background: var(--gesp-surface);
    border: 1px solid rgba(238, 240, 243, 0.95);
    border-radius: var(--gesp-radius);
    box-shadow: var(--gesp-shadow);
    overflow: hidden;
}

.gesp-board-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 4px;
    border-bottom: 1px solid transparent;
}

.gesp-board-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 450;
    letter-spacing: -0.02em;
    color: #17191c;
}

.gesp-board-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--gesp-text-3);
}

.gesp-level-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 20px 22px;
}

@media (min-width: 900px) {
    .gesp-level-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

.gesp-level-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 196px;
    padding: 18px 16px 16px;
    border-radius: 12px;
    border: 1px solid var(--gesp-line);
    background:
        linear-gradient(180deg, #fbfdff 0%, #fff 42%),
        var(--gesp-surface);
    text-decoration: none !important;
    color: inherit;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.gesp-level-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: transparent;
    transition: background .2s ease;
}

.gesp-level-card.is-ready::before {
    background: linear-gradient(180deg, #4ea1ff, #1677ff);
}

.gesp-level-card:hover {
    border-color: rgba(22, 119, 255, 0.28);
    box-shadow: 0 10px 28px rgba(22, 119, 255, 0.10);
    transform: translateY(-2px);
}

.gesp-level-card.is-soon {
    opacity: 0.88;
}

.gesp-level-card.is-soon:hover {
    box-shadow: 0 8px 20px rgba(31, 35, 41, 0.06);
}

.gesp-level-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gesp-level-num {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 450;
    letter-spacing: -0.02em;
    color: #fff;
    background: linear-gradient(145deg, #3b8dff 0%, #1677ff 55%, #0f66e0 100%);
    box-shadow: 0 6px 14px rgba(22, 119, 255, 0.22);
}

.is-soon .gesp-level-num {
    background: linear-gradient(145deg, #cbd5e1 0%, #94a3b8 100%);
    box-shadow: none;
}

.gesp-level-body {
    flex: 1 1 auto;
}

.gesp-level-body h2 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 450;
    letter-spacing: -0.02em;
    color: #17191c;
}

.gesp-level-body p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--gesp-text-2);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gesp-level-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 400;
    background: var(--gesp-primary-soft);
    color: var(--gesp-primary);
}

.is-soon .gesp-level-badge {
    background: #f1f5f9;
    color: #64748b;
}

.gesp-level-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    font-size: 13px;
    font-weight: 400;
    color: var(--gesp-primary);
}

.gesp-level-cta::after {
    content: "→";
    transition: transform .18s ease;
}

.gesp-level-card:hover .gesp-level-cta::after {
    transform: translateX(3px);
}

.is-soon .gesp-level-cta {
    color: var(--gesp-text-3);
}

.gesp-level-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 22px;
}

.gesp-level-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--gesp-line);
    background: #fff;
    color: var(--gesp-text-2);
    font-size: 13px;
    font-weight: 400;
    text-decoration: none !important;
    transition: border-color .15s, background .15s, color .15s;
}

.gesp-level-tab.active,
.gesp-level-tab:hover {
    border-color: rgba(22, 119, 255, 0.35);
    background: var(--gesp-primary-soft);
    color: var(--gesp-primary-hover);
}

.gesp-section {
    margin-top: 28px;
}

.gesp-section-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 450;
    color: #17191c;
}

.gesp-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 18px;
}

.gesp-level-board .gesp-board-head {
    padding: 22px 24px 12px;
    border-bottom: 1px solid var(--gesp-line);
    background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}

.gesp-level-board .gesp-chapter-item {
    position: relative;
    border: 1px solid var(--gesp-line);
    border-radius: 12px;
    box-shadow: none;
    padding: 16px 16px 16px 14px;
    background: #fff;
    gap: 12px;
}

.gesp-level-board .gesp-chapter-item + .gesp-chapter-item {
    margin-top: 0;
}

.gesp-level-board .gesp-chapter-item:hover {
    background: #f7faff;
    border-color: rgba(22, 119, 255, 0.28);
    box-shadow: 0 8px 22px rgba(22, 119, 255, 0.08);
    transform: translateY(-1px);
}

.gesp-level-board .gesp-chapter-item:hover .gesp-chapter-go {
    background: var(--gesp-primary);
    color: #fff;
}

.gesp-chapter-index {
    flex: 0 0 auto;
    width: 28px;
    font-size: 13px;
    font-weight: 450;
    letter-spacing: -0.02em;
    color: var(--gesp-text-3);
    text-align: center;
}

.gesp-outline-board {
    margin-top: 0;
    position: sticky;
    top: 16px;
}

.gesp-outline-board .gesp-board-head {
    padding: 20px 20px 10px;
    border-bottom: 1px solid var(--gesp-line);
    background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}

.gesp-outline-board .gesp-outline {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 4px 28px 22px 40px;
}

.gesp-outline-grid {
    list-style: none;
    margin: 0;
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gesp-outline-grid li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0;
    border-radius: 10px;
    background: transparent;
    border: 0;
}

.gesp-outline-grid li:hover {
    background: transparent;
    border-color: transparent;
}

.gesp-outline-btn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid transparent;
    text-align: left;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
    appearance: none;
    font: inherit;
    color: inherit;
}
.gesp-outline-btn:hover {
    background: #f3f8ff;
    border-color: rgba(22, 119, 255, 0.12);
}
.gesp-outline-btn.is-active {
    background: #e8f3ff;
    border-color: rgba(22, 119, 255, 0.28);
    box-shadow: 0 1px 0 rgba(22, 119, 255, 0.06);
}
.gesp-outline-btn.is-active .gesp-outline-no {
    opacity: 1;
    font-weight: 700;
}
.gesp-outline-btn.is-active .gesp-outline-text {
    color: #0f66e0;
    font-weight: 600;
}

.gesp-unit-panel {
    display: none;
}
.gesp-unit-panel.is-active,
.gesp-unit-panel:not([hidden]) {
    display: block;
}
.gesp-unit-panel[hidden] {
    display: none !important;
}

.gesp-outline-no {
    flex: 0 0 auto;
    min-width: 22px;
    margin-top: 1px;
    font-size: 12px;
    font-weight: 450;
    letter-spacing: -0.02em;
    color: var(--gesp-primary);
    opacity: 0.75;
}

.gesp-outline-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #2b3139;
    font-weight: 400;
}

.gesp-chapter-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--gesp-line);
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
    text-decoration: none !important;
    color: inherit;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}

.gesp-chapter-item:hover {
    border-color: rgba(22, 119, 255, 0.28);
    box-shadow: 0 8px 22px rgba(22, 119, 255, 0.08);
    transform: translateY(-1px);
}

.gesp-chapter-code {
    flex: 0 0 auto;
    min-width: 44px;
    height: 44px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 450;
    font-size: 14px;
    color: var(--gesp-primary-hover);
    background: var(--gesp-primary-soft);
}

.gesp-chapter-main {
    flex: 1 1 auto;
    min-width: 0;
}

.gesp-chapter-main strong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #17191c;
}

.gesp-chapter-video {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e8f3ff;
    color: #1677ff;
    font-size: 11px;
    font-weight: 450;
    font-style: normal;
    letter-spacing: 0.02em;
}

.gesp-chapter-video::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 4px;
    border-style: solid;
    border-width: 4px 0 4px 7px;
    border-color: transparent transparent transparent currentColor;
}

.gesp-chapter-main em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    font-size: 13px;
    color: var(--gesp-text-2);
}

.gesp-chapter-go {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 450;
    color: var(--gesp-primary);
    background: var(--gesp-primary-soft);
    transition: background .15s, color .15s;
}

.gesp-chapter-go::after {
    content: "";
}

.gesp-outline {
    margin: 0;
    padding: 16px 16px 16px 36px;
    border-radius: 12px;
    border: 1px solid var(--gesp-line);
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
    color: #334155;
    line-height: 1.85;
}

.gesp-empty {
    margin-top: 20px;
    padding: 36px 22px;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.gesp-empty h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.gesp-empty p {
    margin: 0 0 16px;
    color: var(--gesp-text-2);
}

.gesp-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 8px;
    background: var(--gesp-primary);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 400;
}

.gesp-btn:hover {
    background: var(--gesp-primary-hover);
}

.gesp-foot-note {
    margin-top: 18px;
    padding: 0 4px;
    font-size: 12px;
    color: var(--gesp-text-3);
    line-height: 1.6;
    text-align: center;
}

/* ---- chapter reading ---- */
.gesp-chapter-page {
    max-width: 1250px;
}

.gesp-chapter-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.gesp-toc {
    position: sticky;
    top: 16px;
}

.gesp-toc-inner {
    background: var(--gesp-surface);
    border: 1px solid rgba(238, 240, 243, 0.95);
    border-radius: 14px;
    box-shadow: var(--gesp-shadow);
    overflow: hidden;
}

.gesp-toc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gesp-line);
    background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}

.gesp-toc-head strong {
    font-size: 13px;
    font-weight: 450;
    color: #17191c;
}

.gesp-toc-head a {
    font-size: 12px;
    font-weight: 400;
    color: var(--gesp-primary);
    text-decoration: none;
}

.gesp-toc-head a:hover {
    text-decoration: underline;
}

.gesp-toc-list {
    display: flex;
    flex-direction: column;
    padding: 8px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.gesp-toc-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 10px;
    text-decoration: none !important;
    color: inherit;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s;
}

.gesp-toc-item + .gesp-toc-item {
    margin-top: 2px;
}

.gesp-toc-item:hover {
    background: #f7f9fc;
}

.gesp-toc-item.active {
    background: #f3f8ff;
    border-color: rgba(22, 119, 255, 0.18);
}

.gesp-toc-index {
    flex: 0 0 auto;
    width: 22px;
    margin-top: 1px;
    font-size: 12px;
    font-weight: 450;
    letter-spacing: -0.02em;
    color: var(--gesp-text-3);
}

.gesp-toc-item.active .gesp-toc-index {
    color: var(--gesp-primary);
}

.gesp-toc-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gesp-toc-body em {
    font-style: normal;
    font-size: 11px;
    font-weight: 450;
    color: var(--gesp-text-3);
}

.gesp-toc-item.active .gesp-toc-body em {
    color: var(--gesp-primary);
}

.gesp-toc-body strong {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #2b3139;
}

.gesp-toc-item.active .gesp-toc-body strong {
    color: #0f4db3;
}

.gesp-toc-video {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 18px;
    margin-top: 2px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e8f3ff;
    color: #1677ff;
    font-size: 10px;
    font-weight: 450;
    font-style: normal;
}

.gesp-toc-mobile {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(238, 240, 243, 0.95);
    box-shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
}

.gesp-toc-mobile label {
    flex: 0 0 auto;
    margin: 0;
    font-size: 13px;
    font-weight: 450;
    color: #17191c;
}

.gesp-toc-select {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #1f2329;
    font-size: 13px;
}

.gesp-chapter-maincol {
    min-width: 0;
}

.gesp-read {
    background: var(--gesp-surface);
    border: 1px solid rgba(238, 240, 243, 0.95);
    border-radius: 16px;
    box-shadow: var(--gesp-shadow);
    padding: 36px 40px 28px;
    animation: gespReadIn .4s ease both;
}

.gesp-read-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.gesp-read-head-row .gesp-read-code {
    margin-bottom: 0;
}

@keyframes gespReadIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.gesp-read-head {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--gesp-line);
}

.gesp-video {
    margin: 0 0 28px;
}

.gesp-video-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.gesp-video-head strong {
    font-size: 15px;
    font-weight: 450;
    color: #17191c;
}

.gesp-video-head span {
    font-size: 12px;
    color: var(--gesp-text-3);
}

.gesp-video-stage {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #d7e3f4;
    background: #071a3a;
    box-shadow: 0 10px 28px rgba(7, 26, 58, 0.12);
}

.gesp-video-el {
    display: block;
    width: 100%;
    max-height: 480px;
    background: #000;
}

.gesp-lesson-canvas {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(800px 280px at 80% 10%, rgba(46, 182, 255, 0.22), transparent 55%),
        linear-gradient(135deg, #071a3a 0%, #0b3d8c 55%, #0f66e0 100%);
    overflow: hidden;
}

.gesp-lesson-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 2;
}

.gesp-lesson-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(4, 18, 48, 0.72) 0%, rgba(7, 40, 100, 0.35) 55%, rgba(7, 40, 100, 0.15) 100%);
}

.gesp-lesson-cover.is-hidden {
    display: none;
}

.gesp-lesson-play {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #0a3d9c;
    font-size: 15px;
    font-weight: 450;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 16, 48, 0.28);
}

.gesp-lesson-play::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent currentColor;
}

.gesp-lesson-body {
    position: absolute;
    inset: 0;
    padding: 28px 32px;
    color: #fff;
    overflow: auto;
}

.gesp-lesson-body.is-hidden {
    display: none;
}

.gesp-lesson-kicker {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.72);
}

.gesp-lesson-title {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 450;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.gesp-lesson-code {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.14);
    overflow-x: auto;
}

.gesp-lesson-code code {
    display: block;
    padding: 0;
    background: transparent;
    color: #d7ecff;
    font-size: 13.5px;
    line-height: 1.65;
    white-space: pre;
    font-family: Consolas, "SF Mono", Monaco, monospace;
}

.gesp-lesson-points {
    margin: 0;
    padding-left: 1.2em;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
}

.gesp-lesson-points li + li {
    margin-top: 6px;
}

.gesp-lesson-error {
    margin: 24px;
    color: #fff;
}

.gesp-lesson-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #0a2248;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gesp-lesson-nav {
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
}

.gesp-lesson-nav.is-primary {
    background: #1677ff;
    border-color: #1677ff;
}

.gesp-lesson-nav:disabled {
    opacity: 0.45;
    cursor: default;
}

.gesp-lesson-progress {
    flex: 1 1 120px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    min-width: 80px;
}

.gesp-lesson-progress i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4ea1ff, #7ad0ff);
    border-radius: inherit;
}

.gesp-lesson-time,
.gesp-lesson-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.gesp-read-code {
    display: inline-flex;
    align-items: center;
    height: 26px;
    margin-bottom: 12px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--gesp-primary-soft);
    color: var(--gesp-primary-hover);
    font-size: 12px;
    font-weight: 450;
    letter-spacing: 0.04em;
}

.gesp-chapter-title {
    margin: 0;
    font-size: 30px;
    font-weight: 450;
    letter-spacing: -0.03em;
    color: #17191c;
    line-height: 1.32;
}

.gesp-article {
    font-size: 16px;
    line-height: 1.85;
    color: #2b3139;
}

.gesp-article > * + * {
    margin-top: 22px;
}

.gesp-box {
    border-radius: 12px;
    padding: 18px 20px;
}

.gesp-box-intro {
    background: linear-gradient(180deg, #f3f8ff 0%, #eef5ff 100%);
    border: 1px solid rgba(22, 119, 255, 0.14);
}

.gesp-box-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--gesp-primary-hover);
    font-size: 15px;
}

.gesp-icon-intro {
    width: 18px;
    height: 14px;
    border-radius: 3px;
    background:
        linear-gradient(#60a5fa, #60a5fa) 0 0 / 100% 3px no-repeat,
        linear-gradient(#3b82f6, #3b82f6) 0 5.5px / 100% 3px no-repeat,
        linear-gradient(#2563eb, #2563eb) 0 11px / 100% 3px no-repeat;
}

.gesp-overview {
    margin: 0 0 12px;
    line-height: 1.85;
    color: #1f2329;
}

.gesp-chain-title {
    margin: 0 0 8px;
    color: #17191c;
}

.gesp-list {
    margin: 0;
    padding-left: 1.25em;
    line-height: 1.85;
    color: #3d4450;
}

.gesp-list li + li {
    margin-top: 8px;
}

.gesp-hl {
    display: inline;
    padding: 1px 6px;
    border-radius: 4px;
    background: #e8f3ff;
    color: #0f4db3;
    font-weight: 450;
}

.gesp-article code,
.gesp-lead code,
.gesp-list code {
    font-family: Consolas, "SF Mono", Monaco, "Courier New", monospace;
    font-size: 0.9em;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f3f5f8;
    color: #0f66e0;
}

.gesp-section-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.gesp-section-card > * + * {
    margin-top: 16px;
}

.gesp-h2 {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 8px 0 0;
    padding-top: 8px;
    font-size: 21px;
    font-weight: 450;
    letter-spacing: -0.02em;
    color: #17191c;
    line-height: 1.4;
}

.gesp-h2-text code {
    color: var(--gesp-primary);
    background: var(--gesp-primary-soft);
}

.gesp-num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 450;
    color: #fff;
    background: var(--gesp-primary);
}

.gesp-lead {
    margin: 0;
    line-height: 1.85;
    color: #3d4450;
}

.gesp-box-concept {
    background: #f5fbfc;
    border: 1px solid #d7eef2;
    color: #0f5c68;
}

.gesp-box-concept h3,
.gesp-box-syntax h3,
.gesp-box-pitfall h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 450;
    color: #17191c;
}

.gesp-box-syntax {
    background: #fafbfc;
    border: 1px solid var(--gesp-line);
}

.gesp-code-icon {
    display: inline-block;
    margin-right: 4px;
    color: var(--gesp-primary);
    font-family: Consolas, monospace;
    font-weight: 450;
}

.gesp-code {
    margin: 0 0 12px;
    padding: 16px 18px;
    border-radius: 10px;
    border: 1px solid #e8ecf1;
    background: #f7f8fa;
    overflow-x: auto;
}

.gesp-code code {
    display: block;
    padding: 0;
    background: transparent;
    color: #1f2329;
    font-size: 13.5px;
    line-height: 1.7;
    white-space: pre;
}

.gesp-code-lg {
    background: #f3f5f8;
}

.gesp-box-pitfall {
    background: #fff8f7;
    border: 1px solid #f1d5d1;
    color: #8f3a32;
}

.gesp-box-pitfall h3 {
    color: #b42318;
}

.gesp-box-pitfall .gesp-list {
    color: #8f3a32;
}

.gesp-box-ai {
    position: relative;
    background: #f7faff;
    border: 1px solid #d9e8ff;
    padding-top: 36px;
}

.gesp-ai-badge {
    position: absolute;
    top: 12px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--gesp-primary-soft);
    color: var(--gesp-primary-hover);
    font-size: 12px;
    font-weight: 450;
}

.gesp-compare {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 4px;
}

@media (min-width: 720px) {
    .gesp-compare {
        grid-template-columns: 1fr 1fr;
    }
}

.gesp-compare-col {
    padding: 14px;
    border-radius: 10px;
    background: #fff;
}

.gesp-compare-col.is-bad {
    border: 1px solid #f1d5d1;
    background: #fffaf9;
}

.gesp-compare-col.is-good {
    border: 1px solid #cce8d5;
    background: #f6fbf7;
}

.gesp-compare-col h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 450;
}

.gesp-compare-col.is-bad h4 {
    color: #b42318;
}

.gesp-compare-col.is-good h4 {
    color: #067647;
}

.gesp-compare-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
}

.gesp-compare-col.is-bad .gesp-compare-note {
    color: #8f3a32;
}

.gesp-compare-col.is-good .gesp-compare-note {
    color: #0e6244;
}

.gesp-box-integrate {
    border: 1px solid rgba(22, 119, 255, 0.16);
    background: #fff;
    padding: 0 0 18px;
    overflow: hidden;
}

.gesp-integrate-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 18px;
    background: #eef5ff;
    color: #0f4db3;
    font-size: 15px;
}

.gesp-box-integrate .gesp-lead,
.gesp-box-integrate .gesp-code,
.gesp-box-integrate .gesp-milestone {
    margin-left: 18px;
    margin-right: 18px;
}

.gesp-box-integrate .gesp-lead {
    margin-top: 16px;
}

.gesp-milestone {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #d7e8ff;
    background: #f5f9ff;
}

.gesp-milestone-solo {
    margin-top: 0;
}

.gesp-check {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 450;
    color: #067647;
    background: #e8f8ef;
}

.gesp-milestone strong {
    display: block;
    margin-bottom: 4px;
    color: #067647;
    font-size: 15px;
}

.gesp-milestone p {
    margin: 0;
    color: #3d4450;
    line-height: 1.75;
    font-size: 14px;
}

.gesp-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: stretch;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--gesp-line);
}

.gesp-pager-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--gesp-line);
    background: #fafbfc;
    font-size: 13px;
    font-weight: 400;
    color: inherit;
    text-decoration: none !important;
    line-height: 1.4;
    transition: border-color .15s, background .15s;
}

.gesp-pager-link em {
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    color: var(--gesp-text-3);
}

.gesp-pager-link strong {
    font-size: 13px;
    font-weight: 400;
    color: #17191c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gesp-pager-link:hover {
    border-color: rgba(22, 119, 255, 0.28);
    background: #f3f8ff;
}

.gesp-pager-link.is-next {
    text-align: right;
    align-items: flex-end;
}

.gesp-pager-home {
    align-self: center;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 400;
    color: var(--gesp-text-2);
    text-decoration: none !important;
    white-space: nowrap;
}

.gesp-pager-home:hover {
    color: var(--gesp-primary);
}

.gesp-pager-placeholder {
    display: block;
}

.gesp-html-extra {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--gesp-line);
    line-height: 1.85;
    color: #3d4450;
}

.gesp-html-extra p {
    margin: 0 0 14px;
}

.gesp-html-extra h2,
.gesp-html-extra h3 {
    margin: 22px 0 10px;
    color: #17191c;
    font-weight: 450;
    line-height: 1.4;
}

@media (max-width: 960px) {
    .gesp-level-layout {
        grid-template-columns: 1fr;
    }

    .gesp-outline-board {
        position: static;
    }

    .gesp-chapter-layout {
        grid-template-columns: 1fr;
    }

    .gesp-toc {
        display: none;
    }

    .gesp-toc-mobile {
        display: flex;
    }
}

@media (max-width: 640px) {
    .gesp-page {
        padding-top: 20px;
    }

    .gesp-hero-title {
        font-size: 26px;
    }

    .gesp-level-banner {
        grid-template-columns: 1fr;
        padding: 24px 18px;
        gap: 18px;
    }

    .gesp-level-banner-title {
        font-size: 30px;
    }

    .gesp-level-banner-mark {
        width: 96px;
        height: 96px;
        border-radius: 22px;
    }

    .gesp-level-banner-num {
        font-size: 44px;
    }

    .gesp-level-switch {
        padding: 12px 10px 14px;
    }

    .gesp-level-switch-head span {
        display: none;
    }

    .gesp-level-switch-track {
        display: flex;
        overflow-x: auto;
        gap: 4px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .gesp-level-switch-track::before {
        display: none;
    }

    .gesp-level-switch .gesp-level-tab {
        flex: 0 0 auto;
        min-width: 52px;
        padding: 0 2px;
    }

    .gesp-level-tab-dot {
        width: 32px;
        height: 32px;
    }

    .gesp-chapter-title {
        font-size: 24px;
    }

    .gesp-hero-desc {
        font-size: 15px;
    }

    .gesp-board-head {
        padding: 18px 16px 0;
    }

    .gesp-level-board .gesp-board-head,
    .gesp-outline-board .gesp-board-head {
        padding: 18px 16px 10px;
    }

    .gesp-level-grid {
        grid-template-columns: 1fr;
        padding: 14px 14px 16px;
    }

    .gesp-level-card {
        min-height: 0;
    }

    .gesp-chapter-index {
        display: none;
    }

    .gesp-read {
        padding: 22px 16px 18px;
        border-radius: 12px;
    }

    .gesp-video-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .gesp-lesson-body {
        padding: 18px 16px;
    }

    .gesp-lesson-title {
        font-size: 20px;
    }

    .gesp-article {
        font-size: 15px;
    }

    .gesp-h2 {
        font-size: 18px;
    }

    .gesp-pager {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .gesp-pager-link,
    .gesp-pager-link.is-next {
        align-items: center;
        text-align: center;
    }

    .gesp-pager-link strong {
        white-space: normal;
    }
}

/* 全站导航品牌（后加载，覆盖 bootstrap float 错乱） */
.navbar-header .navbar-brand.site-brand {
    float: left;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px;
    height: 60px !important;
    max-height: 60px;
    padding: 10px 12px 10px 0 !important;
    margin: 0;
    line-height: 1 !important;
    white-space: nowrap;
    color: #0f172a !important;
    text-decoration: none !important;
}

.navbar-header .site-brand-mark {
    display: inline-block !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    border-radius: 9px;
    flex: 0 0 36px;
}

.navbar-header .site-brand-name {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px;
    font-weight: 450;
    letter-spacing: 0.02em;
    color: #0f172a;
    line-height: 36px !important;
    vertical-align: middle;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .navbar-header .navbar-brand.site-brand {
        height: 50px !important;
        max-height: 50px;
        padding: 8px 10px 8px 0 !important;
        gap: 8px;
    }
    .navbar-header .site-brand-mark {
        width: 30px !important;
        height: 30px !important;
        flex-basis: 30px;
    }
    .navbar-header .site-brand-name {
        font-size: 16px;
        line-height: 30px !important;
    }
}

/* —— 章节自测 —— */
.gesp-quiz {
    margin: 0 0 28px;
    padding: 22px 22px 18px;
    background: var(--gesp-surface);
    border: 1px solid var(--gesp-line);
    border-radius: var(--gesp-radius);
    box-shadow: var(--gesp-shadow);
}
.gesp-quiz-head {
    margin-bottom: 18px;
}
.gesp-quiz-head strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--gesp-text);
    margin-bottom: 6px;
}
.gesp-quiz-head p {
    margin: 0;
    font-size: 14px;
    color: var(--gesp-text-2);
    line-height: 1.6;
}
.gesp-quiz-q {
    padding: 16px 0;
    border-top: 1px solid var(--gesp-line);
}
.gesp-quiz-q:first-child {
    border-top: 0;
    padding-top: 0;
}
.gesp-quiz-stem {
    font-size: 15px;
    font-weight: 600;
    color: var(--gesp-text);
    line-height: 1.65;
    margin-bottom: 12px;
}
.gesp-quiz-code {
    display: block;
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre;
    font-family: Consolas, "SF Mono", "Roboto Mono", monospace;
}
.gesp-quiz-opts {
    display: grid;
    gap: 8px;
}
.gesp-quiz-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--gesp-line);
    border-radius: 10px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.gesp-quiz-opt:hover {
    border-color: #91caff;
    background: var(--gesp-primary-soft);
}
.gesp-quiz-opt input {
    margin: 3px 0 0;
    accent-color: var(--gesp-primary);
    flex: 0 0 auto;
}
.gesp-quiz-opt-key {
    flex: 0 0 auto;
    min-width: 1.2em;
    font-weight: 700;
    color: var(--gesp-primary);
}
.gesp-quiz-opt-text {
    flex: 1;
    color: var(--gesp-text);
    line-height: 1.5;
    font-size: 14px;
    word-break: break-word;
}
.gesp-quiz-opt-text code,
.gesp-quiz-stem code {
    font-family: Consolas, "SF Mono", "Roboto Mono", monospace;
    font-size: 0.92em;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.06);
}
.gesp-quiz-opt:has(input:checked) {
    border-color: var(--gesp-primary);
    background: var(--gesp-primary-soft);
}
.gesp-quiz.is-revealed .gesp-quiz-opt {
    cursor: default;
}
.gesp-quiz.is-revealed .gesp-quiz-opt.is-correct {
    border-color: #52c41a;
    background: #f6ffed;
}
.gesp-quiz.is-revealed .gesp-quiz-opt.is-correct .gesp-quiz-opt-key {
    color: #389e0d;
}
.gesp-quiz.is-revealed .gesp-quiz-opt.is-wrong {
    border-color: #ff4d4f;
    background: #fff2f0;
}
.gesp-quiz.is-revealed .gesp-quiz-opt.is-wrong .gesp-quiz-opt-key {
    color: #cf1322;
}
.gesp-quiz-feedback {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fb;
    font-size: 13px;
    line-height: 1.6;
}
.gesp-quiz-q.is-ok .gesp-quiz-feedback {
    background: #f6ffed;
}
.gesp-quiz-q.is-miss .gesp-quiz-feedback {
    background: #fff7e6;
}
.gesp-quiz-result {
    margin: 0 0 4px;
    font-weight: 600;
    color: var(--gesp-text);
}
.gesp-quiz-explain {
    margin: 0;
    color: var(--gesp-text-2);
}
.gesp-quiz-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--gesp-line);
}
.gesp-quiz-btn {
    appearance: none;
    border: 1px solid var(--gesp-line);
    background: #fff;
    color: var(--gesp-text);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.gesp-quiz-btn:hover {
    border-color: #91caff;
    color: var(--gesp-primary);
}
.gesp-quiz-btn.primary {
    background: var(--gesp-primary);
    border-color: var(--gesp-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.25);
}
.gesp-quiz-btn.primary:hover {
    background: var(--gesp-primary-hover);
    border-color: var(--gesp-primary-hover);
    color: #fff;
}
.gesp-quiz-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--gesp-primary);
}
@media (max-width: 767px) {
    .gesp-quiz {
        padding: 16px 14px 14px;
    }
    .gesp-quiz-opt {
        padding: 9px 10px;
    }
}

/* —— 自测确认弹层（替代原生 confirm） —— */
body.gesp-dlg-open {
    overflow: hidden;
}
.gesp-dlg {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}
.gesp-dlg[hidden] {
    display: none !important;
}
.gesp-dlg.is-show {
    pointer-events: auto;
}
.gesp-dlg-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    transition: opacity 0.16s ease;
    will-change: opacity;
}
.gesp-dlg-panel {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    padding: 24px 22px 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    text-align: center;
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.16s ease, transform 0.16s ease;
    will-change: opacity, transform;
}
.gesp-dlg.is-show .gesp-dlg-mask {
    opacity: 1;
}
.gesp-dlg.is-show .gesp-dlg-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.gesp-dlg-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #e8f3ff;
    color: #1677ff;
    font-size: 22px;
    font-weight: 700;
    line-height: 44px;
}
.gesp-dlg-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2329;
}
.gesp-dlg-msg {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.65;
    color: #646a73;
}
.gesp-dlg-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.gesp-dlg-btn {
    appearance: none;
    min-width: 104px;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.gesp-dlg-btn.is-ghost {
    background: #fff;
    border-color: #e5e6eb;
    color: #1f2329;
}
.gesp-dlg-btn.is-ghost:hover {
    border-color: #91caff;
    color: #1677ff;
}
.gesp-dlg-btn.is-primary {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}
.gesp-dlg-btn.is-primary:hover {
    background: #0f66e0;
    border-color: #0f66e0;
}
.gesp-dlg-btn:focus-visible {
    outline: 2px solid #91caff;
    outline-offset: 2px;
}
