/* ============================================================
 * 知识体系配置平台 · 样式
 * ============================================================ */
:root {
  --bg: #f6f8fc;
  --bg-alt: #eef2fb;
  --card: #ffffff;
  --ink: #1a2233;
  --ink-2: #5a6478;
  --ink-3: #8a93a8;
  --line: #e4e9f3;
  --primary: #3b5bfd;
  --primary-2: #2743d8;
  --primary-soft: #eef1ff;
  --accent: #ff8a3d;
  --green: #12b76a;
  --green-soft: #e8f9f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(30, 50, 110, .08);
  --shadow-lg: 0 20px 50px rgba(30, 50, 110, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hl { color: var(--primary); }
.hl::after { content: ''; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(59,91,253,.28); }
.btn-primary:hover { background: var(--primary-2); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-logo {
  height: 42px; width: auto; border-radius: 6px; flex: none;
  object-fit: contain; border: none; background: transparent;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--primary), #6a8bff);
  color: #fff; font-weight: 800; font-size: 20px;
  display: grid; place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 17px; }
.brand-text strong em { font-style: normal; color: var(--primary); font-weight: 800; letter-spacing: .2px; }
.brand-text span { font-size: 12px; color: var(--ink-3); }
.nav { display: flex; gap: 16px; margin-left: auto; font-size: 14px; color: var(--ink-2); flex-wrap: nowrap; white-space: nowrap; }
.nav a { white-space: nowrap; flex: none; }
.nav a:hover { color: var(--primary); }
#auth-slot { display: inline-flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, #dbe4ff 0%, transparent 60%),
    radial-gradient(700px 400px at -10% 20%, #e7f9f0 0%, transparent 55%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
  padding: 64px 0 72px;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: 44px; line-height: 1.22; letter-spacing: -.5px; margin-bottom: 18px; }
.hero-lead { font-size: 17px; color: var(--ink-2); max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; list-style: none; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 28px; color: var(--primary); }
.hero-stats span { font-size: 13px; color: var(--ink-3); }

/* Hero 预览卡 */
.hero-preview { perspective: 1200px; }
.preview-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; transform: rotateY(-6deg) rotateX(2deg);
}
.pc-head {
  padding: 14px 18px; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, var(--primary), #5b76ff); color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.pc-head .dot { width: 9px; height: 9px; border-radius: 50%; background: #7dffb0; }
.pc-body { padding: 18px; font-size: 13.5px; }
.pc-row { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; }
.pc-row b { display: block; color: var(--primary); font-size: 13px; margin-bottom: 2px; }
.pc-row span { color: var(--ink-2); font-size: 12.5px; }
.pc-tree { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.pc-node { color: var(--ink); font-weight: 600; margin: 10px 0 3px; }
.pc-node em { font-style: normal; color: var(--accent); font-size: 11px; font-weight: 600; margin-left: 6px; }
.pc-sub { color: var(--ink-2); padding-left: 14px; margin: 2px 0; }
.pc-foot {
  padding: 12px 18px; font-size: 12.5px; color: var(--green);
  background: var(--green-soft); border-top: 1px solid var(--line);
}

/* ---------- 通用 Section ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 32px; text-align: center; letter-spacing: -.3px; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--ink-2); font-size: 16px; margin-bottom: 44px; }

/* ---------- 功能 Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.feature .icon { font-size: 32px; margin-bottom: 12px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- 价值 / 卖点 ---------- */
.value-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card-kicker { font-size: 14px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.kicker-value { color: var(--primary); }
.kicker-sell { color: var(--accent); }
.check-list { list-style: none; }
.check-list li { position: relative; padding: 8px 0 8px 26px; font-size: 14.5px; color: var(--ink-2); }
.check-list li::before {
  content: '✓'; position: absolute; left: 0; top: 8px;
  width: 18px; height: 18px; border-radius: 50%; text-align: center; line-height: 18px;
  background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700;
}
.check-list strong { color: var(--ink); }

/* ---------- 价格 ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; position: relative; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.price-card.featured { border-color: var(--primary); box-shadow: 0 16px 44px rgba(59,91,253,.20); }
.pc-tag {
  display: inline-block; align-self: center; padding: 4px 12px; border-radius: 999px;
  background: var(--bg-alt); color: var(--ink-2); font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.price-card.featured .pc-tag { background: var(--primary-soft); color: var(--primary); }
.price { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.price .cur { font-size: 22px; color: var(--primary); font-weight: 700; }
.price .num { font-size: 56px; font-weight: 800; letter-spacing: -2px; color: var(--ink); line-height: 1; }
.price-card.featured .num { color: var(--primary); }
.price-unit { font-size: 13px; color: var(--ink-3); margin: 6px 0 2px; }
.price-save { font-size: 12.5px; color: var(--green); background: var(--green-soft); display: inline-block; align-self: center; padding: 2px 10px; border-radius: 999px; margin: 6px 0 14px; }
.price-list { list-style: none; text-align: left; margin: 16px 0 22px; flex: 1; }
.price-list li { position: relative; padding: 6px 0 6px 22px; font-size: 13.5px; color: var(--ink-2); }
.price-list li::before { content: '•'; position: absolute; left: 4px; color: var(--primary); font-weight: 700; }
.pricing-note { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 22px; }

/* ---------- 配置器 ---------- */
.config-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.selectors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.sel { display: flex; flex-direction: column; gap: 7px; }
.sel span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.sel select {
  padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fff; font-size: 14px; color: var(--ink); cursor: pointer;
  font-family: var(--font); outline: none; transition: border .15s;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a93a8' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.sel select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.sel select:disabled { background: var(--bg-alt); color: var(--ink-3); cursor: not-allowed; }
.config-actions { display: flex; gap: 12px; margin-top: 20px; }

.selection-summary {
  margin-top: 22px; padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--primary-soft); border: 1px solid #dfe6ff;
  font-size: 14.5px; color: var(--primary-2);
}

/* ---------- 知识体系输出 ---------- */
.knowledge-output { margin-top: 28px; }
.knowledge-empty {
  text-align: center; color: var(--ink-3); padding: 40px;
  border: 1px dashed var(--line); border-radius: var(--radius);
}

.ks-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px;
}
.ks-head {
  padding: 20px 26px; color: #fff;
  background: linear-gradient(120deg, var(--primary), #5b76ff);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.ks-head h3 { font-size: 20px; }
.ks-head .ks-meta { font-size: 13px; opacity: .92; }
.ks-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.2); margin-left: 8px;
}
.ks-body { padding: 26px; }

.ks-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.ks-block { background: var(--bg); border-radius: var(--radius-sm); padding: 16px 18px; }
.ks-block h4 { font-size: 14px; color: var(--primary); margin-bottom: 10px; }
.ks-block ul { list-style: none; }
.ks-block li { position: relative; padding: 4px 0 4px 18px; font-size: 14px; color: var(--ink-2); }
.ks-block li::before { content: '›'; position: absolute; left: 2px; color: var(--primary); font-weight: 700; }
.ks-block.tags ul { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-block.tags li { padding: 4px 12px; background: var(--primary-soft); color: var(--primary); border-radius: 999px; font-size: 12.5px; }
.ks-block.tags li::before { content: ''; }
.ks-hours { margin: 0 0 22px; font-size: 13.5px; color: var(--accent); font-weight: 600; }

/* 单元 */
.ks-unit { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; overflow: hidden; }
.ks-unit-head {
  padding: 13px 18px; background: var(--bg-alt); cursor: pointer;
  display: flex; align-items: center; gap: 12px; font-weight: 600;
}
.ks-unit-head .arrow { transition: transform .2s; color: var(--ink-3); }
.ks-unit.open .ks-unit-head .arrow { transform: rotate(90deg); }
.ks-unit-head .u-name { flex: 1; }
.ks-unit-head .u-hours { font-size: 12px; color: var(--accent); font-weight: 600; }
.ks-unit-head .u-count { font-size: 12px; color: var(--ink-3); }
.ks-video {
  font-size: 12px; color: #fb7299; font-weight: 600; text-decoration: none;
  padding: 2px 8px; border-radius: 999px; background: #fff1f5; border: 1px solid #ffd4e2;
}
.ks-video:hover { background: #ffe4ec; }
.ks-unit-video { padding: 0 18px 10px 34px; }
.ks-unit-video a { font-size: 13px; color: #fb7299; text-decoration: none; font-weight: 600; }
.ks-unit-video a:hover { text-decoration: underline; }
.ks-unit-body { display: none; padding: 6px 18px 18px; }
.ks-unit.open .ks-unit-body { display: block; }

/* 知识点 */
.ks-point { border-bottom: 1px dashed var(--line); padding: 14px 0; }
.ks-point:last-child { border-bottom: 0; }
.ks-point-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ks-point-name { font-weight: 700; font-size: 15px; }
.lvl {
  font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 600;
}
.lvl-了解 { background: #eef1ff; color: #5b76ff; }
.lvl-理解 { background: #e8f6ff; color: #0a9ce8; }
.lvl-掌握 { background: #fff4e8; color: #e8831a; }
.lvl-运用 { background: #ffecec; color: #e5484d; }
.exam-tag {
  font-size: 11.5px; padding: 2px 8px; border-radius: 6px;
  background: var(--bg-alt); color: var(--ink-2); border: 1px solid var(--line);
}
.ks-point p { font-size: 13.5px; color: var(--ink-2); margin: 4px 0; }
.ks-example, .ks-pitfall {
  font-size: 13px; margin: 6px 0 0; padding: 8px 12px; border-radius: 8px;
}
.ks-example { background: var(--green-soft); color: #0c7a4a; }
.ks-example b, .ks-pitfall b { font-size: 12px; }
.ks-pitfall { background: #fff4f4; color: #b33; }
.ks-bilibili {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  font-size: 13px; color: #fb7299; text-decoration: none; font-weight: 600;
}
.ks-bilibili:hover { text-decoration: underline; }


.templated-note {
  margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: #fffbf0; border: 1px solid #ffe3b0; color: #9a6b14; font-size: 13.5px;
}

/* 钉钉 / 飞书落地（动态区块） */
.ks-integrate { margin-top: 6px; }
.ks-integrate h4 { font-size: 15px; color: var(--primary); margin: 18px 0 8px; }

/* ---------- 钉钉 / 飞书 指引 ---------- */
.integrate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 34px; }
.integrate-card h3 { font-size: 18px; }
.integrate-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.integrate-head .logo {
  width: 40px; height: 40px; border-radius: 10px; color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: 18px; flex: none;
}
.logo.ding { background: #1782ff; }
.logo.feishu { background: #3370ff; }
.step-list { list-style: none; counter-reset: step; }
.step-list li {
  position: relative; padding: 9px 0 9px 44px; font-size: 14px; color: var(--ink-2);
  counter-increment: step;
}
.step-list li::before {
  content: counter(step); position: absolute; left: 0; top: 9px;
  width: 26px; height: 26px; border-radius: 50%; text-align: center; line-height: 26px;
  background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 700;
}
.integrate-note { font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.integrate-copy { text-align: center; }
.integrate-copy h3 { font-size: 18px; margin-bottom: 18px; }
.integrate-benefits { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.integrate-benefits span {
  padding: 10px 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; font-size: 14px; color: var(--ink-2); box-shadow: var(--shadow);
}

/* ---------- 底部 ---------- */
.site-footer { background: #111827; color: #cbd5e1; padding: 44px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.footer-brand .brand-text strong { color: #fff; }
.footer-brand .brand-text span { color: #6b7280; }
.footer-links { display: flex; gap: 20px; font-size: 14px; margin-left: auto; }
.footer-links a:hover { color: #fff; }
.footer-note { width: 100%; font-size: 12.5px; color: #6b7280; margin-top: 8px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-preview { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .selectors { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .ks-overview { grid-template-columns: 1fr; }
  .integrate-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .hero h1 { font-size: 32px; }
  .features-grid, .value-columns, .selectors, .pricing-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .footer-links { margin-left: 0; }
}

/* ============================================================
 * 知识点掌握标记（注入到知识体系）
 * ============================================================ */
.pm-row {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pm-label { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.pm-btn {
  padding: 4px 12px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  transition: all .15s; font-family: var(--font);
}
.pm-btn:hover { border-color: var(--primary); color: var(--primary); }
.pm-btn.active { color: #fff; border-color: transparent; }
.pm-btn.pm-未学习.active { background: var(--ink-3); }
.pm-btn.pm-薄弱.active { background: var(--accent); }
.pm-btn.pm-已掌握.active { background: var(--green); }
.pm-err { font-size: 12.5px; color: var(--ink-2); margin-left: 4px; }
.pm-err b { color: #e5484d; }
.pm-add-err { color: #e5484d; border-color: #ffd4d4; background: #fff7f7; }
.pm-add-err:hover { border-color: #e5484d; color: #e5484d; }

/* ============================================================
 * 作业拍照上传
 * ============================================================ */
.badge {
  display: inline-block; min-width: 20px; text-align: center; padding: 1px 8px;
  border-radius: 999px; background: var(--primary); color: #fff; font-size: 13px;
}
.hw-panel { margin-bottom: 0; }
.hw-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hw-hint { font-size: 13px; color: var(--ink-3); }
.hw-tag-area { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.hw-tag-title { font-size: 15px; margin-bottom: 12px; }
.hw-pending {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px;
}
.hw-thumb {
  width: 84px; height: 84px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-alt);
}
.hw-noimg { display: grid; place-items: center; font-size: 30px; color: var(--ink-3); }
.hw-pending-fields { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; align-content: start; }
.hw-subject, .hw-unit, .hw-note {
  padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); font-size: 13.5px;
  font-family: var(--font); outline: none; width: 100%;
}
.hw-subject:focus, .hw-unit:focus, .hw-note:focus { border-color: var(--primary); }
.hw-note { grid-column: 1 / -1; }
.hw-result-group { display: flex; gap: 6px; align-items: center; }
.hw-res-btn {
  padding: 5px 14px; border-radius: 999px; cursor: pointer; font-size: 13px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-family: var(--font);
}
.hw-res-btn.on { color: #fff; border-color: transparent; }
.hw-res-btn[data-r="对"].on { background: var(--green); }
.hw-res-btn[data-r="错"].on { background: #e5484d; }
.hw-res-btn[data-r="待批"].on { background: var(--accent); }
.hw-pending-actions { display: flex; flex-direction: column; gap: 8px; }
.hw-list-title { font-size: 16px; margin: 24px 0 14px; display: flex; align-items: center; gap: 8px; }
.hw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.hw-item {
  display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px; background: #fff;
}
.hw-item .hw-thumb { width: 64px; height: 64px; }
.hw-item-info { flex: 1; min-width: 0; }
.hw-item-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hw-subject-tag { font-size: 12.5px; font-weight: 700; color: var(--primary); }
.hw-unit-tag { font-size: 12px; color: var(--ink-2); background: var(--bg-alt); padding: 1px 8px; border-radius: 6px; }
.hw-res { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; color: #fff; }
.hw-res.ok { background: var(--green); }
.hw-res.bad { background: #e5484d; }
.hw-res.pending { background: var(--accent); }
.hw-note-text { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.hw-date { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.hw-del { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 16px; padding: 2px 6px; }
.hw-del:hover { color: #e5484d; }
.hw-empty, .diag-empty { text-align: center; color: var(--ink-3); padding: 30px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.hw-note { font-size: 12px; color: var(--ink-3); margin-top: 16px; }

/* ============================================================
 * 月度诊断
 * ============================================================ */
.diag-toolbar { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.diagnosis-output { min-height: 120px; }
.diag-loading { text-align: center; color: var(--ink-3); padding: 30px; }
.diag-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.diag-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px; text-align: center; box-shadow: var(--shadow);
}
.diag-val { font-size: 34px; font-weight: 800; color: var(--primary); line-height: 1; }
.diag-unit { font-size: 12px; color: var(--ink-3); margin: 4px 0 2px; }
.diag-label { font-size: 13.5px; color: var(--ink-2); }
.diag-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 18px; }
.diag-weak-list { list-style: none; }
.diag-weak-list li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.diag-weak-list li:last-child { border-bottom: 0; }
.dw-unit { color: var(--ink-2); font-size: 12.5px; }
.dw-point { font-weight: 700; }
.dw-status { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--ink-2); }
.dw-status:empty { display: none; }
.dw-err { margin-left: auto; color: #e5484d; font-weight: 700; font-size: 12.5px; }
.diag-none { color: var(--ink-3); font-size: 13.5px; padding: 8px 0; }
.diag-note { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.diag-trend { padding: 16px 18px; }
.trend-bars { display: flex; gap: 14px; align-items: flex-end; height: 120px; margin-top: 12px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.trend-bar { width: 100%; max-width: 54px; background: linear-gradient(180deg, var(--primary), #7d97ff); border-radius: 6px 6px 0 0; min-height: 4px; transition: height .3s; }
.trend-col span { font-size: 12px; color: var(--ink-3); }
.trend-col em { font-style: normal; font-size: 12px; color: var(--ink-2); }

@media (max-width: 760px) {
  .hw-pending { grid-template-columns: 1fr; }
  .hw-pending-fields { grid-template-columns: 1fr; }
  .diag-cards { grid-template-columns: repeat(2, 1fr); }
  .diag-cols { grid-template-columns: 1fr; }
}

/* ============================================================
 * AI 助手对话框（浮动）
 * ============================================================ */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 10px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #5b76ff); color: #fff;
  border: 0; box-shadow: 0 10px 26px rgba(59,91,253,.35); font-family: var(--font);
  font-size: 14px; font-weight: 600; transition: transform .18s, box-shadow .18s;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(59,91,253,.42); }
.chat-fab img { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; background: #fff; padding: 2px; }
.chat-panel {
  position: fixed; right: 22px; bottom: 86px; z-index: 90;
  width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(20,40,90,.28);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line);
}
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary), #5b76ff); color: #fff;
}
.chat-avatar { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; background: #fff; padding: 3px; }
.chat-head-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.chat-head-text strong { font-size: 15px; }
.chat-head-text span { font-size: 11px; opacity: .85; }
.chat-close { border: 0; background: rgba(255,255,255,.16); color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.chat-close:hover { background: rgba(255,255,255,.3); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; white-space: normal; word-break: break-word; }
.chat-msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.typing { color: var(--ink-3); }
.dot-anim i { font-style: normal; animation: blink 1.2s infinite; }
.dot-anim i:nth-child(2) { animation-delay: .2s; }
.dot-anim i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,100%{opacity:.2} 50%{opacity:1} }
.chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-input { flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; outline: none; font-family: var(--font); }
.chat-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chat-send { border: 0; background: var(--primary); color: #fff; padding: 0 20px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; font-family: var(--font); }
.chat-send:hover { background: var(--primary-2); }

@media (max-width: 620px) {
  .chat-panel { right: 12px; bottom: 80px; width: calc(100vw - 24px); }
}

/* ============================================================
 * AI 错题整理
 * ============================================================ */
.review-panel { margin-bottom: 0; }
.review-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.review-field { display: flex; flex-direction: column; gap: 6px; }
.review-field-wide { grid-column: 1 / -1; }
.review-field label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.review-field textarea, .review-field input, .review-field select {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  font-size: 14px; font-family: var(--font); outline: none; resize: vertical;
}
.review-field textarea:focus, .review-field input:focus, .review-field select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.review-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.review-output { margin-top: 20px; }
.review-empty, .review-loading {
  text-align: center; color: var(--ink-3); padding: 30px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
}
.review-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 22px; font-size: 14.5px; line-height: 1.75;
}
.review-card h2 { font-size: 19px; margin: 14px 0 8px; }
.review-card h3 { font-size: 16px; margin: 14px 0 6px; color: var(--primary); }
.review-card h4 { font-size: 14.5px; margin: 10px 0 4px; }
.review-card h5 { font-size: 14px; margin: 8px 0 4px; color: var(--ink-2); }
.review-card strong { color: var(--ink); }
.review-card li { margin-left: 20px; }
.review-card .md-table {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; color: var(--ink-2); background: var(--bg-alt);
  padding: 6px 10px; border-radius: 6px; margin: 4px 0;
}

@media (max-width: 620px) {
  .review-form { grid-template-columns: 1fr; }
}

/* ============================================================
 * 账户 / 会员弹窗
 * ============================================================ */
.auth-user { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.auth-user em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.auth-user em:only-child { background: #fff4e8; color: #e8831a; }
.auth-link { font-size: 13px; color: var(--ink-3); }
.auth-link:hover { color: var(--primary); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  background: #fff; border-radius: 18px; width: 380px; max-width: 100%;
  max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: 0 30px 70px rgba(10,20,50,.35);
}
.modal-card.modal-wide { width: 560px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; margin: 0; }
.modal-x { border: 0; background: var(--bg-alt); color: var(--ink-2); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.modal-x:hover { background: var(--line); }
.modal-body { padding: 20px 22px 24px; }
.modal-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.modal-field span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.modal-field input { padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); font-size: 15px; font-family: var(--font); outline: none; }
.modal-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.modal-error { color: #e5484d; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.modal-submit { width: 100%; }
.modal-switch { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 14px; }
.modal-switch a { color: var(--primary); font-weight: 600; }

.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.plan-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; text-align: left; font-family: var(--font); transition: all .15s;
}
.plan-card:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(59,91,253,.15); transform: translateY(-1px); }
.plan-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.plan-price { font-size: 24px; font-weight: 800; color: var(--primary); }
.plan-desc { font-size: 12px; color: var(--ink-3); }
.pay-status { margin-top: 16px; text-align: center; font-size: 14px; }
.pay-order { margin-bottom: 10px; color: var(--ink-2); }
.pay-tip { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.pay-ok { color: #12b76a; font-weight: 700; font-size: 15px; }

/* 登录 tabs / 短信 / 用户中心 */
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-tabs button {
  flex: 1; padding: 8px 0; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); font-family: var(--font);
}
.auth-tabs button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.auth-panel[hidden] { display: none; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row button { white-space: nowrap; }
.modal-tip { font-size: 12px; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.profile-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.profile-row label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.profile-row select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; font-family: var(--font); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 13px; cursor: pointer; font-family: var(--font);
}
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 学习中心入口高亮 */
.nav a.nav-learning { color: var(--primary); font-weight: 700; }
.nav a.nav-learning:hover { color: var(--primary-2); }
