:root {
    --green: #1c9e4f;
    --green-dark: #14703a;
    --bg: #f6f8f7;
    --card: #ffffff;
    --text: #1f2d27;
    --muted: #64748b;
    --border: #e2e8e5;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(16, 44, 30, .08), 0 4px 16px rgba(16, 44, 30, .05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 导航 ---------- */
.topnav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand {
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-icon { font-size: 20px; }
.nav-links { display: flex; gap: 6px; flex: 1; }
.nav-links a {
    color: var(--muted);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14.5px;
}
.nav-links a:hover { color: var(--text); background: #f0f4f2; text-decoration: none; }
.nav-links a.active { color: var(--green-dark); background: #e8f5ed; font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.user-badge { font-size: 14px; color: var(--text); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 9px 18px;
    font-size: 14.5px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: #fff; border-color: var(--green); color: var(--green-dark); }
.btn-success { background: #e8f5ed; color: var(--green-dark); }
.btn-success.btn-active { background: var(--green); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-active { outline: 2px solid var(--green); }

/* ---------- 容器 ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 32px 20px 60px; width: 100%; flex: 1; }
.container.narrow { max-width: 820px; }
.page-title { margin-bottom: 24px; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #0f3d26 0%, #1c9e4f 100%);
    border-radius: 18px;
    color: #fff;
    padding: 48px 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}
.hero h1 { font-size: 34px; margin-bottom: 14px; }
.hero .accent { color: #b9f6ce; }
.hero-sub { font-size: 16px; opacity: .92; max-width: 640px; line-height: 1.7; margin-bottom: 22px; }
.hero-actions { display: flex; gap: 12px; margin-bottom: 26px; }
.hero-actions .btn-outline { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); color: #fff; }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.stat {
    background: rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 10px 18px;
    display: flex;
    flex-direction: column;
    min-width: 96px;
}
.stat strong { font-size: 20px; }
.stat span { font-size: 12.5px; opacity: .85; }
.stat-link { color: #fff; }
.stat-link:hover { text-decoration: none; background: rgba(255,255,255,.2); }

/* ---------- 分类与课程卡片 ---------- */
.category-title { font-size: 20px; margin: 30px 0 16px; }
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.lesson-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all .15s;
    color: var(--text);
}
.lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #cfe8d9;
    text-decoration: none;
}
.lesson-card-head { display: flex; gap: 8px; }
.lesson-card h3 { font-size: 16.5px; }
.lesson-card p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lesson-more { font-size: 13px; color: var(--green); font-weight: 600; }

/* ---------- 徽章 ---------- */
.badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef2f0;
    color: var(--muted);
    white-space: nowrap;
}
.b-green { background: #e8f5ed; color: #14703a; }
.b-yellow { background: #fdf3d8; color: #92600a; }
.b-red { background: #fdeaea; color: #b03a3a; }
.b-blue { background: #e7f0fd; color: #1d5fbf; }
.b-gray { background: #eef2f0; color: #64748b; }

/* ---------- 课程详情 ---------- */
.lesson-detail {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 40px;
    box-shadow: var(--shadow);
}
.lesson-header { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 20px; }
.lesson-header-meta { display: flex; gap: 8px; margin-bottom: 12px; }
.lesson-header h1 { font-size: 26px; margin-bottom: 10px; }
.lesson-summary { color: var(--muted); line-height: 1.7; }
.lesson-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f6faf7;
    border: 1px dashed #cfe8d9;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.progress-btns { display: flex; gap: 10px; }
.mark-tip { color: var(--green-dark); font-size: 13.5px; }
.login-tip { font-size: 14px; color: var(--muted); }

.lesson-content { line-height: 1.85; font-size: 15.5px; }
.lesson-content h2 { font-size: 20px; margin: 26px 0 12px; border-left: 4px solid var(--green); padding-left: 12px; }
.lesson-content h3 { font-size: 17px; margin: 20px 0 10px; }
.lesson-content p { margin: 10px 0; }
.lesson-content ul, .lesson-content ol { margin: 10px 0 10px 24px; }
.lesson-content li { margin: 5px 0; }
.lesson-content pre {
    background: #0f1a14;
    color: #d9efe2;
    border-radius: 10px;
    padding: 16px 18px;
    overflow-x: auto;
    margin: 14px 0;
    font-size: 13.5px;
    line-height: 1.65;
}
.lesson-content code {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: .92em;
    background: #eef4f0;
    border-radius: 5px;
    padding: 2px 6px;
}
.lesson-content pre code { background: transparent; padding: 0; }
.lesson-content blockquote {
    border-left: 4px solid #cfe8d9;
    background: #f6faf7;
    padding: 10px 16px;
    margin: 14px 0;
    border-radius: 0 8px 8px 0;
    color: #47555b;
}

.lesson-pager {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.pager-link {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text);
    max-width: 46%;
    text-align: left;
}
.pager-link:hover { text-decoration: none; border-color: var(--green); color: var(--green-dark); }
.lesson-ask { text-align: center; margin-top: 28px; }

/* ---------- 进度页 ---------- */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 12px;
}
.stats-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stats-num { font-size: 28px; font-weight: 700; color: var(--green-dark); }
.stats-label { font-size: 13.5px; color: var(--muted); }
.progress-bar { height: 8px; background: #eef2f0; border-radius: 999px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #1c9e4f, #59c98a); border-radius: 999px; transition: width .4s; }

.progress-table {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-table th, .progress-table td {
    text-align: left;
    padding: 11px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.progress-table thead th { background: #f6faf7; color: var(--muted); font-weight: 600; font-size: 13px; }
.progress-table tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; }

/* ---------- AI 聊天页 ---------- */
.chat-wrap {
    flex: 1;
    display: flex;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
    min-height: calc(100vh - 60px - 60px);
}
.chat-side {
    width: 260px;
    flex-shrink: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    align-self: flex-start;
}
.chat-side h2 { font-size: 17px; margin-bottom: 8px; }
.chat-side p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.side-section { margin-top: 18px; }
.side-section h3 { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.side-section ul { list-style: none; }
.side-section li { margin: 6px 0; }
.side-section a { font-size: 13.5px; }
.side-note { margin-top: 18px; font-size: 12.5px; background: #fdf9e8; border-radius: 8px; padding: 10px; }

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 0;
}
.chat-box { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg .bubble {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14.5px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg.assistant .bubble { background: #f0f6f2; border-bottom-left-radius: 4px; }
.assistant-wrap { max-width: 88%; display: flex; flex-direction: column; gap: 6px; }
.chat-trace {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    color: #7a8a80;
    padding: 2px 4px;
}
.chat-trace:empty { display: none; }
.trace-step { display: flex; gap: 8px; align-items: baseline; }
.trace-name { font-weight: 700; color: #3f8f60; white-space: nowrap; }
.trace-detail { word-break: break-all; }
.msg.user .bubble { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg .bubble.typing::after {
    content: "▌";
    animation: blink 1s step-start infinite;
    color: var(--green);
}
@keyframes blink { 50% { opacity: 0; } }

.chat-lesson-link {
    display: inline-block;
    margin: 6px 4px 0 0;
    background: #fff;
    border: 1px solid var(--green);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13.5px;
    font-weight: 600;
}
.chat-lesson-link:hover { background: #e8f5ed; text-decoration: none; }

.chat-input {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    background: #fbfdfc;
    align-items: flex-end;
}
.chat-input textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14.5px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    outline: none;
}
.chat-input textarea:focus { border-color: var(--green); }
.chat-input .btn { height: 42px; }

/* ---------- 登录注册 ---------- */
.auth-wrap { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px; }
.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 38px;
    width: 100%;
    max-width: 400px;
}
.auth-card h1 { font-size: 22px; margin-bottom: 8px; }
.auth-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; line-height: 1.6; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; margin-bottom: 6px; font-weight: 600; }
.field input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 13px;
    font-size: 14.5px;
    outline: none;
    font-family: inherit;
}
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(28,158,79,.12); }
.auth-error { color: #b03a3a; font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 16px; }

/* ---------- 课后练习 ---------- */
.lesson-quiz {
    margin-top: 32px;
    background: #f6faf7;
    border: 1px solid #cfe8d9;
    border-radius: 12px;
    padding: 22px 24px;
}
.quiz-heading { font-size: 18px; margin-bottom: 16px; }
.quiz-item { margin-bottom: 22px; }
.quiz-item:last-child { margin-bottom: 0; }
.quiz-q { font-size: 15px; font-weight: 600; margin-bottom: 10px; line-height: 1.6; }
.quiz-no {
    display: inline-block;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    border-radius: 6px;
    padding: 2px 8px;
    margin-right: 8px;
    vertical-align: 1px;
}
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-opt {
    text-align: left;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all .12s;
    display: flex;
    gap: 8px;
    line-height: 1.55;
}
.quiz-opt b { color: var(--green-dark); min-width: 18px; }
.quiz-opt:hover { border-color: var(--green); transform: translateX(2px); }
.quiz-opt.q-picked { border-color: var(--green); box-shadow: 0 0 0 2px rgba(28,158,79,.15); }
.quiz-opt.q-correct {
    background: #e8f5ed;
    border-color: var(--green);
    color: var(--green-dark);
    font-weight: 600;
}
.quiz-opt.q-wrong {
    background: #fdeaea;
    border-color: #d98a8a;
    color: #b03a3a;
}
.quiz-item.quiz-passed .quiz-opt { cursor: default; }
.quiz-item.quiz-passed .quiz-opt:hover { transform: none; }
.quiz-explain {
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #47555b;
    background: #fff;
    border-left: 3px solid var(--green);
    border-radius: 0 8px 8px 0;
    padding: 9px 13px;
}

/* ---------- 代码沙箱 ---------- */
.sb-header { margin-bottom: 18px; }
.sb-header h1 { font-size: 24px; margin-bottom: 8px; }
.sb-sub { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; max-width: 720px; }
.sb-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sb-toolbar select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
}
.sb-editor-wrap, .sb-output-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1c3328;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
#sb-code {
    width: 100%;
    min-height: 340px;
    background: #0f1a14;
    color: #d9efe2;
    border: none;
    outline: none;
    resize: vertical;
    padding: 18px 20px;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 13.5px;
    line-height: 1.65;
    tab-size: 4;
    white-space: pre;
}
.sb-output-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #16241c;
    color: #9fc3ae;
    font-size: 13px;
    padding: 8px 16px;
}
.sb-status { font-weight: 600; }
.sb-output {
    margin: 0;
    background: #0f1a14;
    color: #d9efe2;
    min-height: 180px;
    max-height: 420px;
    overflow: auto;
    padding: 16px 20px;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- MCP 在线开发台 ---------- */
.mcp-warn { color: #b07a0a; }
.card-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 22px;
}
.card-box h2 { font-size: 16.5px; margin-bottom: 14px; }
.mcp-form .field-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.mcp-form .field-row label { width: 110px; flex-shrink: 0; font-size: 13.5px; font-weight: 600; padding-top: 9px; }
.mcp-form input, .mcp-form select, .mcp-form textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.mcp-form textarea { font-family: "JetBrains Mono", Consolas, monospace; resize: vertical; }
.mcp-form input:focus, .mcp-form textarea:focus { border-color: var(--green); }
.mcp-server-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.mcp-server-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mcp-server-head b { font-size: 15.5px; }
.mcp-server-info { color: var(--muted); font-size: 12.5px; flex: 1; }
.mcp-tool {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: 10px;
    align-items: start;
    background: #f7faf8;
    border: 1px solid #e8efea;
    border-radius: 9px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.mcp-tool-title code {
    background: #eef4f0;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 13px;
    font-weight: 700;
}
.mcp-tool-title span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.mcp-args-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12.5px;
    font-family: "JetBrains Mono", Consolas, monospace;
    resize: vertical;
    outline: none;
}
.mcp-args-input:focus { border-color: var(--green); }
.mcp-empty { color: var(--muted); font-size: 13.5px; }

/* ---------- 学习路线图 ---------- */
.rm-hero {
    display: flex;
    align-items: center;
    gap: 36px;
    background: linear-gradient(135deg, #0f3d26 0%, #1c9e4f 100%);
    border-radius: 18px;
    color: #fff;
    padding: 36px 44px;
    margin-bottom: 44px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.rm-ring {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 6px rgba(255,255,255,.15);
}
.rm-ring-inner {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: #0f3d26;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.rm-ring-inner strong { font-size: 26px; }
.rm-ring-inner span { font-size: 12px; opacity: .85; }
.rm-hero-text { flex: 1; min-width: 260px; }
.rm-hero-text h1 { font-size: 27px; margin-bottom: 10px; }
.rm-hero-sub { font-size: 15px; opacity: .92; line-height: 1.7; margin-bottom: 14px; }
.rm-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.rm-chip {
    background: rgba(255,255,255,.13);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13.5px;
}
.rm-chip b { font-size: 15px; }
.rm-chip-green { background: rgba(122, 232, 165, .25); }
.rm-chip-yellow { background: rgba(255, 214, 112, .28); }
.rm-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.rm-hero-actions .btn-outline { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); color: #fff; }

.rm-timeline { position: relative; padding: 8px 0 8px; }
.rm-line {
    position: absolute;
    left: 31px;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, #b9e6cc, #1c9e4f 55%, #b9e6cc);
    opacity: .55;
}
.rm-stage {
    position: relative;
    display: flex;
    gap: 22px;
    margin-bottom: 26px;
}
.rm-node-wrap { width: 66px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.rm-node {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #cfdfd6;
    color: var(--muted);
    font-weight: 800;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: var(--shadow);
}
.rm-node-doing { border-color: #f0b429; color: #92600a; background: #fdf3d8; }
.rm-node-done { border-color: var(--green); color: var(--green-dark); background: #e8f5ed; }
.rm-node-line-label { flex: 1; color: #9dbcaa; font-size: 15px; padding-top: 6px; }

.rm-card {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 22px 16px;
    box-shadow: var(--shadow);
}
.rm-card-doing { border-color: #f0d48a; }
.rm-card-done { border-color: #bfe3cd; background: #fbfefc; }
.rm-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rm-stage-icon { font-size: 26px; }
.rm-card-title { flex: 1; }
.rm-card-title h3 { font-size: 17.5px; }
.rm-card-title p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rm-progress { height: 7px; background: #edf3ef; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.rm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1c9e4f, #59c98a);
    border-radius: 999px;
    transition: width .4s;
}
.rm-lessons { display: flex; flex-direction: column; gap: 7px; }
.rm-lesson {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #f7faf8;
    border: 1px solid #e8efea;
    border-radius: 9px;
    padding: 8px 13px;
    color: var(--text);
    font-size: 13.5px;
    transition: all .12s;
}
.rm-lesson:hover { border-color: var(--green); text-decoration: none; transform: translateX(2px); }
.rm-l-check { color: #a9bcb1; font-size: 13px; width: 14px; text-align: center; }
.rm-lesson.rm-l-doing .rm-l-check { color: #d99a06; }
.rm-lesson.rm-l-done { background: #f2faf5; border-color: #d5ecdf; }
.rm-lesson.rm-l-done .rm-l-check { color: var(--green); font-weight: 800; }
.rm-lesson.rm-l-done .rm-l-title { color: #7a9a89; text-decoration: line-through; }
.rm-l-title { flex: 1; }
.rm-l-diff { font-size: 11.5px; color: var(--muted); }
.rm-endpoint {
    margin-left: 88px;
    background: linear-gradient(135deg, #0f3d26, #1c9e4f);
    color: #fff;
    border-radius: 12px;
    padding: 13px 20px;
    font-weight: 700;
    display: inline-block;
    box-shadow: var(--shadow);
}

.rm-achievements { margin-top: 48px; }
.rm-achievements h2 { font-size: 20px; margin-bottom: 16px; }
.rm-ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
.rm-ach {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}
.rm-ach-icon { font-size: 30px; }
.rm-ach strong { font-size: 14.5px; }
.rm-ach-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.rm-ach-on { border-color: #f0d48a; background: linear-gradient(180deg, #fffdf5, #fdf6e0); box-shadow: 0 3px 12px rgba(217, 154, 6, .12); }
.rm-ach-off { opacity: .62; filter: grayscale(.7); }

@media (max-width: 640px) {
    .rm-hero { padding: 28px 22px; }
    .rm-node-wrap { width: 52px; }
    .rm-node { width: 42px; height: 42px; font-size: 15px; }
    .rm-line { left: 24px; }
    .rm-endpoint { margin-left: 74px; }
}

/* ---------- 页脚 ---------- */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    background: #fff;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .nav-inner { gap: 12px; }
    .nav-links a { padding: 8px 8px; font-size: 13.5px; }
    .hero { padding: 32px 24px; }
    .hero h1 { font-size: 26px; }
    .chat-side { display: none; }
    .lesson-detail { padding: 24px 20px; }
}
