/**
 * 课程模块样式：列表（左分类+右横向卡）/ 详情（介绍+大纲）/ 章节（贴近文章页）
 */
.fm-course-page {
    --fm-course-accent: #0f766e;
    --fm-course-accent-soft: #e8f5f2;
    --fm-course-hero: #0f2f57;
}

/* 课程列表：去掉右侧栏后主区铺满，内容左右对齐 */
.fm-course-page .fm-course-list-main {
    width: 100%;
    max-width: none;
    float: none;
    min-width: 0;
}
.fm-course-page .fm-course-list-panel {
    width: 100%;
    max-width: 100%;
    float: none;
    margin-top: 0 !important;
    box-sizing: border-box;
}
.fm-course-page .fm-course-list-body {
    padding: var(--fm-space-4, 16px) var(--fm-space-5, 20px) var(--fm-space-5, 20px);
    box-sizing: border-box;
    width: 100%;
}

.fm-course-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--fm-text-soft, #6b7280);
    line-height: 1.5;
}
.fm-course-stats strong {
    color: var(--fm-course-accent);
    font-weight: 700;
    margin: 0 2px;
}
.fm-course-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    width: 100%;
    box-sizing: border-box;
}
.fm-course-toolbar__types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.fm-course-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid var(--fm-border, #e8ece9);
    color: var(--fm-text-soft, #6b7280);
    text-decoration: none;
    font-size: 13px;
    background: var(--fm-card-bg, #fff);
    box-sizing: border-box;
}
.fm-course-chip:hover,
.fm-course-chip.is-on {
    color: var(--fm-course-accent);
    border-color: #99d5cb;
    background: var(--fm-course-accent-soft);
    text-decoration: none;
}
.fm-course-search {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin-left: auto;
    box-sizing: border-box;
}
.fm-course-search input {
    width: 200px;
    max-width: 100%;
    height: 34px;
    border: 1px solid var(--fm-border, #e8ece9);
    border-radius: 4px;
    padding: 0 10px;
    background: var(--fm-card-bg, #fff);
    color: inherit;
    box-sizing: border-box;
}
.fm-course-search button {
    height: 34px;
    border: 0;
    border-radius: 4px;
    padding: 0 14px;
    background: var(--fm-course-accent);
    color: #fff;
    flex-shrink: 0;
    cursor: pointer;
    box-sizing: border-box;
}

/* 横向课程列表 */
.fm-course-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}
.fm-course-row {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--fm-border, #e8ece9);
    border-radius: 4px;
    background: var(--fm-card-bg, #fff);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, border-color .15s ease;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}
.fm-course-row:hover {
    border-color: #b7ddd6;
    box-shadow: 0 8px 20px rgba(15, 118, 110, .08);
    text-decoration: none;
    color: inherit;
}
.fm-course-row__cover {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: linear-gradient(145deg, #1d4f91, #0f766e);
}
.fm-course-row__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fm-course-row__cover-fallback {
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
.fm-course-row__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    background: rgba(0,0,0,.72);
}
.fm-course-row__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}
.fm-course-row__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}
.fm-course-row__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--fm-text-soft, #6b7280);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fm-course-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--fm-text-soft, #6b7280);
}
.fm-course-row__meta i {
    margin-right: 4px;
    color: var(--fm-course-accent);
}
.fm-course-row__price {
    color: var(--fm-course-accent);
    font-weight: 700;
}
.fm-course-empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--fm-text-soft, #6b7280);
}

/* 详情页 */
.fm-course-detail {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 28px;
    box-sizing: border-box;
}
.fm-course-crumb {
    font-size: 13px;
    color: var(--fm-text-soft, #6b7280);
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.fm-course-crumb a {
    color: var(--fm-course-accent);
}
.fm-course-crumb a:hover {
    text-decoration: underline;
}
.fm-course-hero {
    /* 浅绿品牌底，与顶栏绿色、下方白卡片更融合；深色标题可读 */
    background: linear-gradient(145deg, #eaf8f0 0%, #dff3e8 42%, #d0ede0 100%);
    color: #163528;
    border: 1px solid #c5e6d3;
    border-radius: 4px;
    padding: 20px 22px 0;
    margin-bottom: 14px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
.fm-course-hero h1 {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.35;
    font-weight: 700;
    color: #0f2a1c !important;
}
.fm-course-hero__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #3f5a4c !important;
}
.fm-course-hero__tags {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #456355 !important;
}
.fm-course-hero__bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    margin-top: 16px;
    padding: 12px 0;
    border-top: 1px solid rgba(36, 174, 95, 0.22);
    font-size: 13px;
    color: #456355 !important;
}
.fm-course-diff {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.fm-course-diff__bar {
    display: inline-flex;
    gap: 3px;
}
.fm-course-diff__bar i {
    width: 14px;
    height: 8px;
    border-radius: 2px;
    background: rgba(36, 174, 95, 0.22);
}
.fm-course-diff__bar i.is-on {
    background: #24AE5F;
}

/* 详情：左（蓝底+内容）与右作者卡顶对齐 */
.fm-course-detail__body {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}
.fm-course-detail__main {
    flex: 1 1 0;
    min-width: 0;
}
.fm-course-detail__aside {
    flex: 0 0 285px;
    width: 285px;
    max-width: 285px;
    position: sticky;
    top: 80px;
}
.fm-course-aside-card {
    border-radius: 4px !important;
    overflow: hidden;
    margin: 0 !important;
}
.fm-course-detail__aside .fm-author-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fm-course-detail__aside .fm-author-action {
    width: 100%;
    border-radius: 4px;
}

.fm-course-section {
    background: var(--fm-card-bg, #fff);
    border: 1px solid var(--fm-border, #e8ece9);
    border-radius: 4px;
    padding: 16px 18px;
    margin-bottom: 14px;
    box-sizing: border-box;
}
.fm-course-section__title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    padding-left: 10px;
    border-left: 3px solid var(--fm-course-accent);
}
.fm-course-section p,
.fm-course-section li {
    color: var(--fm-text, #1f2937);
    line-height: 1.7;
    font-size: 14px;
}
.fm-course-outline-head {
    display: block;
    margin-bottom: 8px;
}
.fm-course-outline-meta {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6b7280;
}
.fm-course-outline-card .fm-course-detail-actions {
    margin-top: 12px;
    margin-bottom: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--fm-border, #e8ece9);
}
.fm-course-outline {
    margin: 0;
}
.fm-course-module {
    border: 0;
    border-radius: 0;
    margin: 0;
    overflow: visible;
    background: transparent;
}
.fm-course-module > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 10px;
    background: #f5f7f6;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-radius: 4px;
    color: #1f2937;
    user-select: none;
}
.fm-course-module > summary::-webkit-details-marker {
    display: none;
}
.fm-course-module[open] > summary {
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
}
.fm-course-module + .fm-course-module {
    margin-top: 8px;
}
.fm-course-module__left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.fm-course-module__caret {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent #6b7280;
    transition: transform .15s ease;
    flex-shrink: 0;
}
.fm-course-module[open] > summary .fm-course-module__caret {
    transform: rotate(90deg);
}
.fm-course-module__name {
    font-size: 14px;
}
.fm-course-module__meta {
    font-weight: 400;
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
}
.fm-course-module-list {
    list-style: none;
    margin: 0;
    padding: 4px 0 8px;
}
.fm-course-module-list li {
    border: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}
.fm-course-module-list li a,
.fm-course-module-list li .fm-course-module-list__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 14px 10px 28px;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    text-decoration: none;
}
.fm-course-module-list li a:hover {
    background: rgba(15, 118, 110, 0.06);
    text-decoration: none;
}
.fm-course-module-list__title {
    min-width: 0;
    font-size: 14px;
    color: #1f2937;
    line-height: 1.45;
}
.fm-course-module-list__dur,
.fm-course-module-list__right {
    flex-shrink: 0;
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
}
.fm-course-module-list__right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fm-course-module-list__right em {
    font-style: normal;
}
.fm-course-module-list__row.is-locked {
    opacity: 0.72;
    cursor: default;
}
.fm-course-preview-tag {
    color: #b45309;
    font-style: normal;
    font-size: 12px;
}
.fm-course-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 4px;
    background: var(--fm-course-accent);
    color: #fff !important;
    text-decoration: none !important;
    border: 0;
}
.fm-course-btn--ghost {
    background: transparent;
    color: var(--fm-course-accent) !important;
    border: 1px solid #99d5cb;
}
.fm-course-paywall {
    margin-top: 12px;
    padding: 22px 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(15,118,110,.06), rgba(15,118,110,.12));
    text-align: center;
}
.fm-course-paywall h3 {
    margin: 0 0 8px;
    font-size: 18px;
}
.fm-course-paywall p {
    margin: 0 0 14px;
    color: var(--fm-text-soft, #6b7280);
}
.fm-course-paywall__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.fm-course-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 4px;
}

html.fm-theme-dark .fm-course-module > summary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--fm-text, #e8eaed);
}
html.fm-theme-dark .fm-course-module__name {
    color: var(--fm-text, #e8eaed);
}
html.fm-theme-dark .fm-course-module__meta,
html.fm-theme-dark .fm-course-outline-meta {
    color: var(--fm-muted, #a8b0b8);
}
html.fm-theme-dark .fm-course-module__caret {
    border-color: transparent transparent transparent #a8b0b8;
}
html.fm-theme-dark .fm-course-module-list li a,
html.fm-theme-dark .fm-course-module-list li .fm-course-module-list__row {
    color: var(--fm-text, #e8eaed);
}
html.fm-theme-dark .fm-course-module-list__title {
    color: var(--fm-text, #e8eaed) !important;
}
html.fm-theme-dark .fm-course-module-list__dur,
html.fm-theme-dark .fm-course-module-list__right,
html.fm-theme-dark .fm-course-module-list__right em {
    color: var(--fm-muted, #a8b0b8) !important;
}
html.fm-theme-dark .fm-course-module-list li a:hover {
    background: rgba(36, 174, 95, 0.14);
}
html.fm-theme-dark .fm-course-outline-card .fm-course-detail-actions {
    border-bottom-color: var(--fm-line, #2a3330);
}
html.fm-theme-dark .fm-course-btn--ghost {
    border-color: rgba(36, 174, 95, 0.45);
    color: #6ee7b7 !important;
}
html.fm-theme-dark .fm-course-section__title,
html.fm-theme-dark .fm-course-outline-card {
    color: var(--fm-text, #e8eaed);
}
html.fm-theme-dark .fm-course-preview-tag {
    color: #fbbf24;
}
html.fm-theme-dark .fm-course-row__cover {
    background: linear-gradient(145deg, #16324f, #0f766e);
}
html.fm-theme-dark .fm-course-hero {
    background: linear-gradient(145deg, #14352a 0%, #1a4335 50%, #0f766e 120%);
    border-color: #2a5a48;
    color: #e8f5ef;
}
html.fm-theme-dark .fm-course-hero h1 {
    color: #f3fbf6 !important;
}
html.fm-theme-dark .fm-course-hero__desc,
html.fm-theme-dark .fm-course-hero__bar {
    color: rgba(232, 245, 239, 0.88) !important;
}
html.fm-theme-dark .fm-course-hero__bar {
    border-top-color: rgba(255, 255, 255, 0.16);
}
html.fm-theme-dark .fm-course-diff__bar i {
    background: rgba(255, 255, 255, 0.22);
}
html.fm-theme-dark .fm-course-diff__bar i.is-on {
    background: #34d399;
}

/* 导入正文块 */
.fm-course-callout {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 4px;
    background: #f0faf7;
    border-left: 3px solid #0f766e;
}
.fm-course-callout--tip { background: #f0faf7; border-left-color: #0f766e; }
.fm-course-callout--warn { background: #fff7ed; border-left-color: #f59e0b; }
.fm-course-callout--danger { background: #fef2f2; border-left-color: #ef4444; }
.fm-course-callout--info { background: #eff6ff; border-left-color: #3b82f6; }
.fm-course-analogy {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}
.fm-course-terminal {
    --fm-term-bg: #0b1220;
    --fm-term-head: #152033;
    --fm-term-text: #f1f5f9;
    --fm-term-muted: #94a3b8;
    --fm-term-prompt: #34d399;
    --fm-term-cmd: #f8fafc;
    --fm-term-comment: #7dd3fc;
    --fm-term-highlight: #fbbf24;
    --fm-term-error: #f87171;
    --fm-term-ip: #38bdf8;
    --fm-term-border: #243247;
    margin: 14px 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--fm-term-bg);
    color: var(--fm-term-text);
    border: 1px solid var(--fm-term-border);
}
.fm-course-terminal__title {
    padding: 8px 12px;
    background: var(--fm-term-head);
    font-size: 12px;
    color: var(--fm-term-muted);
    border-bottom: 1px solid var(--fm-term-border);
}
.fm-course-terminal pre,
.fm-course-terminal__body,
.content_content .fm-course-terminal pre,
.content_content .fm-course-terminal__body,
html.fm-theme-dark .content_content .fm-course-terminal pre,
html.fm-theme-dark .content_content .fm-course-terminal__body {
    display: block;
    margin: 0;
    padding: 12px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: transparent !important;
    color: var(--fm-term-text) !important;
    border: 0 !important;
}
.fm-course-terminal .cmd-prompt { color: var(--fm-term-prompt); margin-right: 4px; }
.fm-course-terminal .cmd-cmd { color: var(--fm-term-cmd); }
.fm-course-terminal .cmd-output { color: var(--fm-term-muted); }
.fm-course-terminal .cmd-comment { color: var(--fm-term-comment); }
.fm-course-terminal .cmd-highlight { color: var(--fm-term-highlight); }
.fm-course-terminal .cmd-error { color: var(--fm-term-error); }
.fm-course-terminal .cmd-ip { color: var(--fm-term-ip); }
.fm-course-table-wrap {
    width: 100%;
    margin: 14px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.fm-course-table-title { font-weight: 600; margin-bottom: 6px; }
.fm-course-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}
/* 覆盖文章 .content_content table { display:block }，保证表格整行铺满 */
.content_content .fm-course-table-wrap {
    width: 100%;
    display: block;
}
.content_content table.fm-course-table,
.content_content .fm-course-table,
.article_content table.fm-course-table {
    display: table !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}
.fm-course-table th,
.fm-course-table td {
    border: 1px solid var(--fm-border, #e8ece9);
    padding: 8px 10px;
    text-align: left;
}
.fm-course-table th { background: #f7faf8; }
.fm-course-list { margin: 12px 0; }

/* 拓扑 */
.fm-course-topo {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid var(--fm-border, #e8ece9);
    border-radius: 4px;
    background: #fafcfb;
}
.fm-course-topo__title {
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f2f57;
}
.fm-course-topo__canvas {
    overflow: auto;
    text-align: center;
}
.fm-course-topo__canvas svg {
    max-width: 100%;
    height: auto;
}
.fm-course-topo__note {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.55;
}
.fm-course-topo__ascii {
    margin: 10px 0 0;
    padding: 10px 12px;
    background: #0b1220;
    color: #f1f5f9;
    border: 1px solid #243247;
    border-radius: 4px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.4;
}
.content_content .fm-course-topo__ascii,
html.fm-theme-dark .content_content .fm-course-topo__ascii {
    background: #0b1220 !important;
    color: #f1f5f9 !important;
    border-color: #243247 !important;
}

/* 实验步骤 */
.fm-course-steps {
    margin: 16px 0;
}
.fm-course-steps__head {
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f2f57;
}
.fm-course-steps__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fm-course-steps__item {
    display: flex;
    gap: 12px;
    margin: 0 0 14px;
    align-items: flex-start;
}
.fm-course-steps__no {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #0f766e;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fm-course-steps__title {
    font-weight: 600;
    margin-bottom: 4px;
}
.fm-course-steps__desc {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}
/* 覆盖 bootstrap code 粉底 + 主题全局 code 色，避免浅字浅底看不清 */
.fm-course-steps__cmds,
.content_content .fm-course-steps__cmds {
    --fm-term-bg: #0b1220;
    --fm-term-text: #f8fafc;
    --fm-term-border: #243247;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--fm-term-bg);
    border: 1px solid var(--fm-term-border);
    border-radius: 4px;
    white-space: pre-wrap;
    color: var(--fm-term-text);
}
.fm-course-steps__cmds code,
.content_content .fm-course-steps__cmds code,
html.fm-theme-dark .content_content .fm-course-steps__cmds code {
    display: block;
    margin: 0;
    padding: 2px 0;
    background: transparent !important;
    border: 0 !important;
    color: var(--fm-term-text) !important;
    font-size: 12.5px;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    box-shadow: none;
}

/* 验收清单 */
.fm-course-checklist {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 4px;
    background: #f0faf7;
    border: 1px solid #cce8e0;
}
.fm-course-checklist__title {
    font-weight: 700;
    margin-bottom: 8px;
}
.fm-course-checklist ul {
    margin: 0;
    padding-left: 1.2em;
}
.fm-course-checklist li { margin: 6px 0; line-height: 1.55; }

/* 思考题 / 模拟题 */
.fm-course-quiz {
    margin: 16px 0;
    border: 1px solid var(--fm-border, #e8ece9);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.fm-course-quiz--exam { border-color: #c7d2fe; }
.fm-course-quiz__header {
    padding: 8px 12px;
    background: #f7faf8;
    font-size: 13px;
    font-weight: 600;
    color: #0f766e;
}
.fm-course-quiz--exam .fm-course-quiz__header {
    background: #eef2ff;
    color: #3730a3;
}
.fm-course-quiz__body { padding: 12px 14px; }
.fm-course-quiz__q {
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.6;
}
.fm-course-quiz__options {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}
.fm-course-quiz__options li {
    margin: 6px 0;
    padding: 8px 10px;
    border-radius: 4px;
    background: #f8fafc;
    line-height: 1.5;
}
.fm-course-quiz.is-revealed .fm-course-quiz__options li.is-correct {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.fm-course-quiz__key {
    font-weight: 700;
    margin-right: 4px;
    color: #0f766e;
}
.fm-course-quiz__toggle {
    display: inline-block;
    border: 1px solid #0f766e;
    background: #fff;
    color: #0f766e;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
.fm-course-quiz__toggle:hover { background: #f0faf7; }
.fm-course-quiz__answer {
    margin-top: 12px;
    padding: 12px;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}
.fm-course-quiz__answer[hidden] { display: none !important; }
.fm-course-quiz__answer-title {
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f766e;
}

/* 真题演练（交互答题，对齐 cisco） */
.exam-paper {
    background: #fff;
    border: 1px solid var(--fm-border, #e8ece9);
    border-radius: 4px;
    margin: 18px 0 26px;
    overflow: hidden;
}
.exam-paper-head {
    padding: 14px 18px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
}
.exam-paper-title { font-size: 16px; font-weight: 700; }
.exam-paper-meta { font-size: 12px; opacity: 0.9; margin-top: 4px; }
.exam-scorebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--fm-border, #e8ece9);
    position: sticky;
    top: 0;
    z-index: 5;
}
.exam-stat { font-size: 13px; color: #64748b; }
.exam-stat b { font-size: 16px; color: #0f172a; margin: 0 2px; }
.exam-stat.ok b { color: #16a34a; }
.exam-stat.bad b { color: #dc2626; }
.exam-scorebar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.exam-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #0f766e;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}
.exam-btn:hover { background: #f0fdfa; border-color: #0f766e; }
.exam-btn.active { background: #0f766e; border-color: #0f766e; color: #fff; }
.exam-btn.danger { color: #dc2626; }
.exam-btn.danger:hover { background: #fef2f2; border-color: #dc2626; }
.exam-timer {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 4px;
    padding: 4px 12px;
    font-variant-numeric: tabular-nums;
}
.exam-timer.active { display: flex; }
.exam-timer.warn { color: #b45309; background: #fffbeb; border-color: #fbbf24; }
.exam-timer.danger {
    color: #dc2626;
    background: #fef2f2;
    border-color: #f87171;
    animation: fmExamTimerPulse 1s infinite;
}
@keyframes fmExamTimerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.exam-verdict {
    padding: 12px 18px;
    font-size: 13px;
    line-height: 1.7;
    border-bottom: 1px solid var(--fm-border, #e8ece9);
    background: #ecfdf5;
    color: #065f46;
}
.exam-verdict.fail { background: #fef2f2; color: #991b1b; }
.exam-verdict b { font-size: 15px; }
.exam-q {
    padding: 16px 18px;
    border-bottom: 1px solid var(--fm-border, #e8ece9);
    display: block;
    float: none !important;
    width: auto !important;
    max-width: 100%;
    clear: both;
    box-sizing: border-box;
}
.exam-qlist {
    display: block;
    float: none;
    clear: both;
}
.exam-q:last-child { border-bottom: none; }
.exam-q.hide { display: none; }
.exam-q-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}
.exam-q-no {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #94a3b8;
    border-radius: 50%;
}
.exam-q.is-correct .exam-q-no { background: #16a34a; }
.exam-q.is-incorrect .exam-q-no { background: #dc2626; }
.exam-q-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    color: #0f172a;
}
.exam-q-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 4px;
    vertical-align: middle;
}
.exam-q-multi {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    border-radius: 4px;
    vertical-align: middle;
}
.exam-q pre.exam-q-pre,
.content_content .exam-q pre.exam-q-pre,
html.fm-theme-dark .content_content .exam-q pre.exam-q-pre {
    margin: 10px 0 0 34px;
    padding: 10px 14px;
    background: #0b1220 !important;
    color: #f1f5f9 !important;
    border: 1px solid #243247 !important;
    border-radius: 4px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}
.exam-opts {
    list-style: none;
    margin: 16px 0 0 34px;
    padding: 0;
}
.exam-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    margin: 5px 0;
    min-height: 0;
    font-size: 13px;
    line-height: 1.45;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}
/* 覆盖文章正文 .content_content li 的大字号 */
.content_content .exam-opt,
.content_content li.exam-opt {
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: inherit;
    margin: 5px 0 !important;
}
.exam-opt > span:last-child {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1px 0;
    font-size: 13px;
}
.content_content .exam-opt > span:last-child {
    font-size: 13px !important;
    line-height: 1.45 !important;
}
.exam-opt:hover { background: #f0fdfa; border-color: #5eead4; }
.exam-opt-key {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #64748b;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-sizing: border-box;
}
.exam-opt.picked { background: #e0f2fe; border-color: #38bdf8; }
.exam-opt.picked .exam-opt-key { background: #38bdf8; border-color: #38bdf8; color: #fff; }
.exam-opt.is-right {
    background: #dcfce7;
    border-color: #22c55e;
}
.exam-opt.is-right .exam-opt-key { background: #22c55e; border-color: #22c55e; color: #fff; }
.exam-opt.is-wrong {
    background: #fef2f2;
    border-color: #f87171;
    text-decoration: line-through;
    text-decoration-color: #f87171;
}
.exam-opt.is-wrong .exam-opt-key { background: #f87171; border-color: #f87171; color: #fff; }
.exam-q.done .exam-opt { cursor: default; }
.exam-q.done .exam-opt:hover { background: inherit; border-color: inherit; }
.exam-q.done .exam-opt.is-right:hover { background: #dcfce7; border-color: #22c55e; }
.exam-q.done .exam-opt.is-wrong:hover { background: #fef2f2; border-color: #f87171; }
.exam-confirm {
    margin: 8px 0 0 34px;
    padding: 5px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #0f766e;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}
.exam-confirm:hover { background: #0d9488; }
.exam-confirm[disabled] { background: #cbd5e1; cursor: not-allowed; }
.exam-explain {
    display: none;
    margin: 12px 0 0 34px;
    padding: 12px 16px;
    background: #f8fafc;
    border-left: 3px solid #0f766e;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    line-height: 1.75;
    color: #475569;
}
.exam-q.done .exam-explain { display: block; }
.exam-explain-head {
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 6px;
}
.exam-explain-head .wrongmark { color: #dc2626; }
.exam-explain-head .rightmark { color: #16a34a; }
.exam-empty {
    padding: 26px 20px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* 案例 / 嵌入 */
.fm-course-case {
    margin: 16px 0;
    border: 1px solid var(--fm-border, #e8ece9);
    border-radius: 4px;
    overflow: hidden;
}
.fm-course-case__header {
    padding: 10px 14px;
    background: #f0faf7;
    font-weight: 700;
    color: #0f766e;
}
.fm-course-case__body { padding: 12px 14px; }
.fm-course-case__h {
    margin: 14px 0 6px;
    font-size: 14px;
    color: #065f46;
}
.fm-course-embed {
    margin: 16px 0;
    border: 1px solid var(--fm-border, #e8ece9);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.fm-course-embed__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f7faf8;
}
.fm-course-embed__title { font-weight: 700; }
.fm-course-embed__fsbtn {
    border: 1px solid #0f766e;
    background: #fff;
    color: #0f766e;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.fm-course-embed__fsbtn:hover { background: #f0faf7; }
.fm-course-embed__note {
    margin: 0;
    padding: 8px 14px;
    font-size: 13px;
    color: #6b7280;
}
.fm-course-embed__stage {
    position: relative;
    cursor: zoom-in;
}
.fm-course-embed__hint {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    pointer-events: none;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    font-size: 12px;
}
.fm-course-embed__frame {
    display: block;
    width: 100%;
    border: 0;
    background: #0b1220;
    pointer-events: none; /* 预览区单击用于全屏，避免误触 iframe */
}

/* 理论讲解 · 听老师讲 */
.fm-course-voice {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
    border: 1px solid #a7f3d0;
    border-radius: 4px;
}
.fm-course-voice__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    background: #0f766e;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.fm-course-voice__btn:hover { background: #0d9488; }
.fm-course-voice__btn.is-playing {
    background: #dc2626;
}
.fm-course-voice__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.fm-course-voice__icon {
    font-size: 16px;
    line-height: 1;
}
.fm-course-voice__hint {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    flex: 1 1 160px;
}
.fm-course-voice.is-playing .fm-course-voice__hint {
    color: #b91c1c;
    font-weight: 500;
}
.fm-course-voice__speed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}
.fm-course-voice__speed-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}
.fm-course-voice__speed-btns {
    display: inline-flex;
    gap: 4px;
    background: #fff;
    padding: 3px;
    border-radius: 4px;
    border: 1px solid #a7f3d0;
}
.fm-course-voice__speed-btn {
    border: none;
    background: transparent;
    color: #0f766e;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}
.fm-course-voice__speed-btn:hover { background: #ecfdf5; }
.fm-course-voice__speed-btn.is-active {
    background: #0f766e;
    color: #fff;
}
.fm-course-voice__speed-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.fm-course-voice__restart {
    border: 1px solid #99f6e4;
    background: #fff;
    color: #0f766e;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    padding: 7px 12px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}
.fm-course-voice__restart:hover { background: #ecfdf5; }
@media (max-width: 640px) {
    .fm-course-voice__speed { margin-left: 0; width: 100%; }
}

/* 交互工具全屏层 */
.fm-course-tool-fs {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    flex-direction: column;
    background: #0b1220;
}
.fm-course-tool-fs.is-open { display: flex; }
.fm-course-tool-fs__bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #115e59;
    color: #ecfdf5;
}
.fm-course-tool-fs__title {
    font-weight: 700;
    font-size: 15px;
}
.fm-course-tool-fs__close {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #ecfdf5;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
.fm-course-tool-fs__close:hover { background: rgba(255, 255, 255, 0.1); }
.fm-course-tool-fs__frame {
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    background: #0b1220;
}
body.fm-course-tool-fs-lock {
    overflow: hidden;
}

/* 考证指南正文 */
.fm-course-guide-card {
    margin: 16px 0;
    padding: 4px 0 8px;
}
.fm-course-guide-h2 {
    margin: 18px 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #0f2f57;
}
.fm-course-guide-steps {
    margin: 10px 0 10px 18px;
    padding: 0;
}
.fm-course-guide-steps li {
    margin: 10px 0;
    line-height: 1.6;
}
.fm-course-guide-steps li div {
    margin-top: 4px;
    color: #6b7280;
    font-size: 14px;
}
.fm-course-guide-links {
    margin: 8px 0 8px 18px;
    padding: 0;
}
.fm-course-guide-links li { margin: 8px 0; }
.fm-course-guide-ext {
    color: #0f766e;
    text-decoration: underline;
}
.fm-course-callout-icon {
    margin-right: 6px;
}
.article_content .fm-course-table {
    margin: 10px 0 14px;
}

/* 课时页：本课正文目录（大节 + 小节）；吸顶用文章页 .article_menu_fix */
.fm-course-lesson-toc {
    margin-top: 14px;
}
.fm-course-lesson-toc.article_menu_fix {
    margin-top: 0;
    z-index: 1020;
}
.fm-course-lesson-toc .menu_contnet {
    padding: 4px 0 10px;
}
/* 覆盖 articles.css 的 .menu_contnet div:hover 整块刷绿 */
.fm-course-lesson-toc .menu_contnet div:hover,
.fm-course-lesson-toc .menu_contnet .fm-course-lesson-toc__tree:hover,
.fm-course-lesson-toc .menu_contnet .fm-course-lesson-toc__group:hover,
.fm-course-lesson-toc .menu_contnet .fm-course-lesson-toc__children:hover,
.fm-course-lesson-toc .menu_contnet li:hover {
    background-color: transparent !important;
}
.fm-course-lesson-toc .menu_contnet .fm-course-lesson-toc__link:hover,
.fm-course-lesson-toc .menu_contnet .fm-course-lesson-toc__link.is-active {
    background: #e8f5f2 !important;
    color: #0f766e;
}
.fm-course-lesson-toc__empty {
    padding: 16px;
    font-size: 13px;
    color: #6b7280;
}
.fm-course-lesson-toc__tree {
    padding: 0;
}
.fm-course-lesson-toc__group {
    margin: 0;
    border: 0;
}
.fm-course-lesson-toc__group + .fm-course-lesson-toc__group {
    margin-top: 2px;
}
.fm-course-lesson-toc__parent {
    list-style: none;
    cursor: pointer;
    padding: 0;
    background: #f5f7f6;
    border-radius: 4px;
}
.fm-course-lesson-toc__parent::-webkit-details-marker {
    display: none;
}
.fm-course-lesson-toc__parent .fm-course-lesson-toc__link {
    font-weight: 600;
    border-left-width: 0;
    padding-left: 12px;
}
.fm-course-lesson-toc__children {
    list-style: none;
    margin: 0;
    padding: 2px 0 6px;
}
.fm-course-lesson-toc__children li {
    margin: 0;
    border: 0;
}
.fm-course-lesson-toc__link {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 9px 14px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.45;
    border: 0;
    border-left: 3px solid transparent;
}
.fm-course-lesson-toc__link--child {
    padding-left: 22px;
    font-weight: 400;
}
.fm-course-lesson-toc__link:hover,
.fm-course-lesson-toc__link.is-active {
    background: #e8f5f2;
    color: #0f766e;
    text-decoration: none;
    border-left-color: #0f766e;
}
.fm-course-lesson-toc__text {
    min-width: 0;
    word-break: break-word;
}

/* 深色：本课目录去掉浅色白块，跟侧栏卡片一致 */
html.fm-theme-dark .fm-course-lesson-toc__parent {
    background: rgba(255, 255, 255, 0.04);
}
html.fm-theme-dark .fm-course-lesson-toc__link {
    color: var(--fm-text, #e5e7eb);
}
html.fm-theme-dark .fm-course-lesson-toc .menu_contnet .fm-course-lesson-toc__link:hover,
html.fm-theme-dark .fm-course-lesson-toc .menu_contnet .fm-course-lesson-toc__link.is-active,
html.fm-theme-dark .fm-course-lesson-toc__link:hover,
html.fm-theme-dark .fm-course-lesson-toc__link.is-active {
    background: rgba(36, 174, 95, 0.18) !important;
    color: #6ee7b7 !important;
    border-left-color: #24ae5f;
}
html.fm-theme-dark .fm-course-lesson-toc__empty {
    color: var(--fm-muted, #9ca3af);
}
html.fm-theme-dark .fm-course-lesson-toc .menu_contnet,
html.fm-theme-dark .fm-course-lesson-toc .menu_contnet div {
    color: var(--fm-text, #e5e7eb);
}
#fm-article-content-body h2[id^="fm-lesson-sec-"],
#fm-article-content-body h3[id^="fm-lesson-sec-"] {
    scroll-margin-top: calc(var(--fm-nav-h, 60px) + var(--fm-article-title-bar-h, 60px) + 12px);
}
#fm-article-content-body h3[id^="fm-lesson-sec-"] {
    font-size: 17px;
    margin: 18px 0 10px;
    font-weight: 650;
}

/* 课程课时页同样启用文章详情的滚动留白（标题条 + 导航） */
body.fm-site-shell:has(.fm-course-lesson-page) {
    scroll-padding-top: calc(var(--fm-nav-h, 60px) + var(--fm-article-title-bar-h, 60px) + var(--fm-space-2, 8px));
}

@media (max-width: 991px) {
    .fm-course-detail__body {
        flex-direction: column;
    }
    .fm-course-detail__aside {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 767px) {
    .fm-course-list-body {
        padding: 14px 14px 16px;
    }
    .fm-course-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .fm-course-search {
        margin-left: 0;
        width: 100%;
    }
    .fm-course-search input {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    .fm-course-row {
        grid-template-columns: 1fr;
    }
    .fm-course-hero {
        padding: 16px 16px 0;
    }
    .fm-course-hero h1 {
        font-size: 22px;
    }
    .fm-course-diff {
        margin-left: 0;
        width: 100%;
    }
}

/* ========== 课时正文：深色模式可读性 ========== */
html.fm-theme-dark .fm-course-page .fm-course-steps__desc {
    color: var(--fm-text-soft, #9ca8a0);
}
html.fm-theme-dark .fm-course-page .fm-course-steps__title {
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .fm-course-callout {
    background: rgba(15, 118, 110, 0.18);
    border-left-color: #2dd4bf;
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .fm-course-callout--warn {
    background: rgba(245, 158, 11, 0.16);
    border-left-color: #fbbf24;
}
html.fm-theme-dark .fm-course-page .fm-course-callout--danger {
    background: rgba(239, 68, 68, 0.16);
    border-left-color: #f87171;
}
html.fm-theme-dark .fm-course-page .fm-course-callout--info {
    background: rgba(59, 130, 246, 0.16);
    border-left-color: #60a5fa;
}
html.fm-theme-dark .fm-course-page .fm-course-analogy {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--fm-line, #2a3530);
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .fm-course-checklist {
    background: rgba(15, 118, 110, 0.16);
    border-color: rgba(45, 212, 191, 0.35);
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .fm-course-topo {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--fm-line, #2a3530);
}
html.fm-theme-dark .fm-course-page .fm-course-topo__title {
    color: #99f6e4;
}
html.fm-theme-dark .fm-course-page .fm-course-topo__note {
    color: var(--fm-text-soft, #9ca8a0);
}
html.fm-theme-dark .fm-course-page .fm-course-table th {
    background: rgba(255, 255, 255, 0.06);
}
html.fm-theme-dark .fm-course-page .fm-course-table th,
html.fm-theme-dark .fm-course-page .fm-course-table td {
    border-color: var(--fm-line, #2a3530);
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .fm-course-quiz,
html.fm-theme-dark .fm-course-page .exam-paper {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--fm-line, #2a3530);
}
html.fm-theme-dark .fm-course-page .fm-course-quiz__header {
    background: rgba(15, 118, 110, 0.2);
    color: #99f6e4;
}
html.fm-theme-dark .fm-course-page .fm-course-quiz__options li {
    background: rgba(255, 255, 255, 0.04);
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .exam-scorebar {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--fm-line, #2a3530);
}
html.fm-theme-dark .fm-course-page .exam-stat {
    color: var(--fm-text-soft, #9ca8a0);
}
html.fm-theme-dark .fm-course-page .exam-stat b {
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .exam-q {
    border-color: var(--fm-line, #2a3530);
}
html.fm-theme-dark .fm-course-page .exam-q-text {
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .exam-opt {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--fm-line, #2a3530);
    color: var(--fm-text, #e8eeea);
}
html.fm-theme-dark .fm-course-page .exam-opt:hover {
    background: rgba(45, 212, 191, 0.12);
    border-color: #2dd4bf;
}
html.fm-theme-dark .fm-course-page .exam-explain {
    background: rgba(255, 255, 255, 0.04);
    color: var(--fm-text-soft, #9ca8a0);
}
html.fm-theme-dark .fm-course-page .fm-course-voice {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.22), rgba(20, 184, 166, 0.12));
    border-color: rgba(45, 212, 191, 0.4);
}
html.fm-theme-dark .fm-course-page .fm-course-voice__hint {
    color: var(--fm-text-soft, #9ca8a0);
}
html.fm-theme-dark .fm-course-page .fm-course-voice__speed-btns {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(45, 212, 191, 0.35);
}
html.fm-theme-dark .fm-course-page .fm-course-embed {
    border-color: var(--fm-line, #2a3530);
    background: rgba(255, 255, 255, 0.02);
}
html.fm-theme-dark .fm-course-page .fm-course-embed__header {
    background: rgba(15, 118, 110, 0.18);
}
html.fm-theme-dark .fm-course-page .fm-course-case {
    border-color: var(--fm-line, #2a3530);
}
html.fm-theme-dark .fm-course-page .fm-course-case__header {
    background: rgba(15, 118, 110, 0.2);
    color: #99f6e4;
}
/* 侧栏操作条 */
.fm-course-lesson-page .right_do {
    margin-top: 15px;
}
.do_list[data-role="course-praise"].do_list_on div {
    background-color: var(--fm-brand-soft);
    border-color: var(--fm-brand);
    color: var(--fm-brand);
}
.do_list[data-role="course-praise"].do_list_on div .fa,
.do_list[data-role="course-praise"].do_list_on p {
    color: var(--fm-brand);
}
/* 终端 / 步骤命令：深色下略提亮边框，字色保持高对比 */
html.fm-theme-dark .fm-course-page .fm-course-terminal,
html.fm-theme-dark .fm-course-page .fm-course-steps__cmds {
    --fm-term-bg: #071018;
    --fm-term-head: #0f1a28;
    --fm-term-text: #f8fafc;
    --fm-term-muted: #a8b8c8;
    --fm-term-border: #2a3a4d;
}

