/* ============================================================
   MBA 课程中心 · 样式表
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --line: #e5e9f0;
  --line-2: #eef1f6;
  --brand: #1d4ed8;
  --brand-2: #3b6cf0;
  --brand-soft: #eef3ff;

  --accent: #1d4ed8;
  --accent-soft: #eef3ff;

  --ok: #15803d;
  --ok-soft: #e9f7ee;
  --warn: #b45309;
  --warn-soft: #fdf4e8;

  --sh-1: 0 1px 2px rgba(15, 23, 42, .04);
  --sh-2: 0 1px 3px rgba(15, 23, 42, .05), 0 6px 16px rgba(15, 23, 42, .06);
  --sh-3: 0 16px 40px rgba(15, 23, 42, .14);

  --r: 16px;
  --r-sm: 10px;
  --r-lg: 22px;
  --wrap: 1280px;
  --wrap-wide: 1560px;
  --top-h: 62px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
mark { background: #fff2a8; color: inherit; border-radius: 3px; padding: 0 1px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 30px; }
.wrap-wide { max-width: var(--wrap-wide); margin: 0 auto; padding: 0 30px; }

/* ---------- 2. 顶栏 ---------- */
#topbar {
  position: sticky; top: 0; z-index: 60; flex-shrink: 0;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: var(--top-h); display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .3px;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(29, 78, 216, .32);
}
.brand-text { font-size: 16px; font-weight: 700; letter-spacing: -.2px; line-height: 1.15; }
.brand-text small { display: block; font-size: 10px; font-weight: 500; color: var(--text-3); letter-spacing: 1.4px; }

.mainnav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
  background: none; border: 0; transition: .16s; white-space: nowrap;
}
.nav-link:hover { background: var(--line-2); color: var(--text); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nav-link .chev { transition: transform .18s; opacity: .6; }

.nav-dropdown { position: relative; }
.nav-dropdown.open .chev { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 270px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--sh-3); padding: 7px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: .18s; z-index: 70;
}
.nav-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; transition: .14s; }
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item.active { background: var(--accent-soft); }
.dd-icon {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 16px; background: var(--line-2);
}
.dd-body { min-width: 0; }
.dd-name { font-size: 13.5px; font-weight: 600; }
.dd-sub { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar-right { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 12px; }
.page-login .topbar-right { display: none; }
.page-login #footer { display: none; }

/* 实名认证拦截页：只留品牌，导航 / 搜索 / 页脚全部隐藏 */
.page-gate .mainnav { display: none; }
.page-gate .topbar-right { display: none; }
.page-gate #footer { display: none; }
.searchbox { position: relative; }
.searchbox .s-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
#searchInput {
  width: 262px; height: 38px; padding: 0 14px 0 35px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 13.5px;
  outline: none; transition: .18s;
}
#searchInput:focus { background: #fff; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(59,108,240,.12); width: 296px; }
#searchInput::placeholder { color: var(--text-3); }

.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; width: 400px; max-height: 460px;
  overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--sh-3); padding: 7px; z-index: 70;
}
.sr-item { display: block; padding: 9px 11px; border-radius: 10px; transition: .14s; }
.sr-item:hover { background: var(--surface-2); }
.sr-type { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 1px 7px; border-radius: 5px; margin-right: 7px; }
.sr-title { font-size: 13.5px; font-weight: 600; }
.sr-snippet { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-empty, .sr-more { padding: 12px; text-align: center; font-size: 13px; color: var(--text-3); }
.sr-more a { color: var(--brand); font-weight: 600; }

/* ---------- 3. 主内容 ---------- */
#app {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px 30px 48px;
}
.crumbs { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; display: flex; gap: 7px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand); }

/* ---------- 4. 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 46px 44px 42px; margin-bottom: 34px;
  background-image:
    radial-gradient(760px 300px at 88% -30%, rgba(29, 78, 216, .10), transparent 62%),
    radial-gradient(560px 260px at 6% 130%, rgba(13, 148, 136, .09), transparent 60%);
}
.hero h1 { margin: 0 0 12px; font-size: 34px; line-height: 1.25; font-weight: 800; letter-spacing: -.6px; }
.hero p { margin: 0; font-size: 15px; color: var(--text-2); max-width: 620px; }
.hero-feats { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.hero-feat { font-size: 12.5px; font-weight: 500; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px; }

.hero-grid { display: grid; grid-template-columns: 1fr 316px; gap: 56px; align-items: center; }
.hero-stats { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 6px 26px; }
.hs-row { display: flex; align-items: baseline; gap: 14px; padding: 15px 0; border-bottom: 1px dashed var(--line); }
.hs-row:last-child { border-bottom: 0; }
.hs-row b { font-size: 27px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; min-width: 56px; letter-spacing: -.5px; }
.hs-row span { font-size: 13px; color: var(--text-2); }

/* ---------- 5. 区块标题 ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 16px; gap: 12px; }
.section-title h2 { margin: 0; font-size: 18.5px; font-weight: 700; letter-spacing: -.2px; }
.section-title .more { font-size: 13px; color: var(--brand); font-weight: 600; }
.section-title .more:hover { text-decoration: underline; }
.section-title .st-sub { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 9px; }

/* ---------- 6. 课程卡片网格 ---------- */
.course-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }
.course-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 25px 24px 20px; overflow: hidden;
  transition: .2s; box-shadow: var(--sh-1); display: flex; flex-direction: column;
}
.course-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 50%, #fff));
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--card-accent) 28%, var(--line)); }
.cc-head { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; }
.cc-icon {
  width: 48px; height: 48px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 23px;
  background: color-mix(in srgb, var(--card-accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--card-accent) 20%, #fff);
}
.cc-name { font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.cc-en { font-size: 11.5px; color: var(--text-3); font-weight: 500; letter-spacing: .2px; margin-top: 1px; }
.cc-meta { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-intro {
  font-size: 13px; color: var(--text-2); line-height: 1.7; margin: 12px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cc-stats { display: flex; gap: 22px; margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); margin-bottom: 14px; }
.cc-stat b { font-size: 17px; font-weight: 700; color: var(--card-accent); font-variant-numeric: tabular-nums; }
.cc-stat span { font-size: 11.5px; color: var(--text-3); display: block; margin-top: -2px; }
.cc-foot { display: flex; align-items: center; gap: 10px; }
.cc-go { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--card-accent); display: inline-flex; align-items: center; gap: 3px; }

.recent-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.recent-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; transition: .16s; }
.recent-item:hover { border-color: var(--brand-2); box-shadow: var(--sh-1); }
.ri-course { font-size: 11.5px; color: var(--brand); font-weight: 600; }
.ri-title { font-size: 13.5px; font-weight: 600; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-page { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* ---------- 7. 通用卡片 / 按钮 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); }
.card-pad { padding: 22px 24px; }
.card h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: var(--text-3); background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.small { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.chip.gray { background: var(--line-2); color: var(--text-2); }
.chip.amber { background: var(--warn-soft); color: var(--warn); }
.chip.green { background: var(--ok-soft); color: var(--ok); }

.empty { text-align: center; padding: 46px 20px; color: var(--text-3); font-size: 13.5px; }
.empty .e-icon { font-size: 34px; margin-bottom: 10px; opacity: .8; }

.progressbar { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progressbar > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); transition: width .4s; }

/* ---------- 8. 课程页 ---------- */
.course-hero { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--accent); color: #fff; padding: 34px 36px; margin-bottom: 22px; }
.course-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.16), rgba(0,0,0,.22)); }
.ch-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; }
.ch-icon { width: 62px; height: 62px; border-radius: 18px; flex: 0 0 auto; display: grid; place-items: center; font-size: 31px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(4px); }
.ch-title { font-size: 27px; font-weight: 800; letter-spacing: -.4px; }
.ch-en { font-size: 12.5px; opacity: .8; letter-spacing: 1.3px; text-transform: uppercase; margin-top: 2px; }
.ch-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; opacity: .94; }
.ch-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ch-meta span + span::before { content: "·"; opacity: .55; margin-right: 14px; }

.course-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.ct-tab { padding: 11px 16px; font-size: 14px; font-weight: 600; color: var(--text-2); border-bottom: 2.5px solid transparent; margin-bottom: -1px; transition: .16s; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.ct-tab:hover { color: var(--text); }
.ct-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ct-tab .cnt { font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--text-2); border-radius: 6px; padding: 1px 7px; }
.ct-tab.active .cnt { background: var(--accent-soft); color: var(--accent); }

.ov-grid { display: grid; grid-template-columns: 1fr 330px; gap: 20px; align-items: start; }
.ov-col { display: grid; gap: 20px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--text-3); white-space: nowrap; }
.kv dd { margin: 0; color: var(--text-2); }

.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-list li { position: relative; padding: 9px 0 9px 26px; font-size: 13.5px; color: var(--text-2); border-bottom: 1px dashed var(--line); }
.topic-list li:last-child { border-bottom: 0; }
.topic-list li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .55; }

.grade-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grade-table td { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.grade-table td:last-child { text-align: right; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

.stat-row { display: flex; gap: 10px; }
.stat-box { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; text-align: center; }
.stat-box b { display: block; font-size: 21px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-box span { font-size: 11.5px; color: var(--text-3); }

.quick-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 9. 资料列表 ---------- */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.ft { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; transition: .15s; }
.ft:hover { border-color: var(--text-3); }
.ft.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.mat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.mat-card { padding: 20px 22px; display: flex; flex-direction: column; transition: .18s; }
.mat-card:hover { box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.mc-top { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-3); margin-bottom: 9px; flex-wrap: wrap; }
.mc-title { font-size: 15.5px; font-weight: 700; line-height: 1.5; letter-spacing: -.1px; }
.mc-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; margin: 8px 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.mc-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: auto; }

.type-tag { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px; }
.type-lecture { background: #eef3ff; color: #1d4ed8; }
.type-case { background: #fdf0e7; color: #b45309; }
.type-homework { background: #e9f7ee; color: #15803d; }
.type-assignment { background: #f2eaff; color: #7c3aed; }
.type-outline { background: #eef1f6; color: #475569; }

/* ---------- 10. 阅读器 ---------- */
.reader-topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 18px; margin-bottom: 16px; position: sticky; top: calc(var(--top-h) + 12px); z-index: 40;
  box-shadow: var(--sh-1);
}
.rt-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.1px; }
.rt-pageno { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rt-btns { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.slider-wrap { flex: 1 1 220px; min-width: 150px; display: flex; align-items: center; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--line); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
input[type=range]::-moz-range-thumb { width: 17px; height: 17px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; }

.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-align: center; box-shadow: var(--sh-1); }
.stage > img { margin: 0 auto; border-radius: 8px; cursor: zoom-out; box-shadow: var(--sh-1); width: 100%; height: auto; }
.stage.zoomed > img { width: auto; max-width: 100%; max-height: 78vh; cursor: zoom-in; }
.stage-hint { margin-top: 10px; font-size: 12px; color: var(--text-3); }
.stage-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 16px; }
.stage-nav button { height: 36px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 600; transition: .15s; }
.stage-nav button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.stage-nav button:disabled { opacity: .4; cursor: not-allowed; }
.stage-nav span { font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.page-text { margin-top: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; font-size: 13.5px; line-height: 1.9; color: var(--text-2); white-space: pre-wrap; }
.thumb-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 16px; }
.thumb { position: relative; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; transition: .15s; }
.thumb:hover { border-color: var(--text-3); }
.thumb.active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.thumb img { width: 100%; }
.thumb .tp { position: absolute; right: 6px; bottom: 6px; font-size: 10.5px; background: rgba(15,23,42,.72); color: #fff; padding: 1px 6px; border-radius: 5px; }

.related-qs { margin-top: 18px; }
.related-q { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; display: flex; gap: 9px; align-items: flex-start; }
.related-q:last-child { border-bottom: 0; }
.related-q a { margin-left: auto; white-space: nowrap; color: var(--brand); font-weight: 600; font-size: 12.5px; }

.doc-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 34px 44px; box-shadow: var(--sh-1); }
.doc-body .h { font-size: 15px; font-weight: 700; margin: 22px 0 9px; color: var(--text); }
.doc-body .h:first-child { margin-top: 0; }
.doc-body .p { font-size: 14px; line-height: 1.95; color: var(--text-2); margin: 0 0 11px; text-align: justify; }
.doc-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.doc-table td { border: 1px solid var(--line); padding: 8px 11px; color: var(--text-2); }
.doc-table tr:first-child td { background: var(--surface-2); font-weight: 700; color: var(--text); }

/* ---------- 11. 练习 ---------- */
.psz-courses { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.psz-course { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; transition: .16s; }
.psz-course:hover { border-color: color-mix(in srgb, var(--card-accent) 35%, var(--line)); box-shadow: var(--sh-1); }
.psz-c-name { display: block; font-size: 13.5px; font-weight: 600; }
.psz-c-num { display: block; font-size: 12px; color: var(--text-3); margin: 4px 0 9px; }
.psz-c-num b { color: var(--card-accent); font-size: 14px; font-variant-numeric: tabular-nums; }
.q-list { display: grid; gap: 16px; }
.q-card { padding: 20px 22px; scroll-margin-top: 90px; }
.q-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 11px; }
.q-no { font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 6px; }
.q-stem { font-size: 14.5px; line-height: 1.85; white-space: pre-line; }
.q-hint { margin-top: 11px; font-size: 13px; }
.q-hint summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 12.5px; }
.q-hint > div { margin-top: 7px; padding: 11px 14px; background: var(--warn-soft); border-radius: 10px; color: #7c4a06; line-height: 1.75; }
.q-answer { margin-top: 14px; }
.q-answer textarea { width: 100%; min-height: 104px; resize: vertical; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); font: inherit; font-size: 13.5px; line-height: 1.75; color: var(--text); outline: none; transition: .16s; }
.q-answer textarea:focus { background: #fff; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(59,108,240,.12); }
.q-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.q-foot .spacer { flex: 1; }
.q-foot a { color: var(--brand); font-weight: 600; }
.save-dot { color: var(--ok); font-weight: 600; opacity: 0; transition: opacity .3s; }
.save-dot.show { opacity: 1; }

/* 选择题 */
.q-choice .q-options { display: grid; gap: 9px; margin-top: 14px; }
.q-opt {
  display: flex; gap: 11px; align-items: flex-start; text-align: left; width: 100%;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2);
  font: inherit; font-size: 13.8px; line-height: 1.7; color: var(--text); transition: .15s;
}
.q-opt:hover { border-color: var(--text-3); background: #fff; }
.qo-key {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: #fff; border: 1px solid var(--line); color: var(--text-2);
}
.qo-text { flex: 1 1 auto; }
.q-opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.q-opt.picked .qo-key { background: var(--accent); border-color: var(--accent); color: #fff; }
.q-opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.q-opt.correct .qo-key { background: var(--ok); border-color: var(--ok); color: #fff; }
.q-opt.wrong { border-color: #dc2626; background: #fdecec; }
.q-opt.wrong .qo-key { background: #dc2626; border-color: #dc2626; color: #fff; }
.q-choice-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.q-choice-tip { font-size: 12.5px; color: var(--text-3); }
.q-choice.is-right .q-choice-tip { color: var(--ok); font-weight: 600; }
.q-choice.is-wrong .q-choice-tip { color: #b91c1c; font-weight: 600; }
.q-analysis { margin-top: 14px; padding: 13px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; font-size: 13.5px; line-height: 1.8; color: var(--text-2); }
.qa-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.q-evidence { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--text-3); }

/* ---------- 12. 问答卷 ---------- */
.paper-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.paper-opt { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.paper-opt input { width: 16px; height: 16px; accent-color: var(--brand); }
select.btn { height: 38px; padding: 0 12px; }

.paper-select-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-top: 18px; }
.pq-group h3 { margin: 0 0 9px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.pq-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 9px; border-radius: 9px; font-size: 13px; cursor: pointer; transition: .13s; line-height: 1.6; }
.pq-item:hover { background: var(--surface-2); }
.pq-item input { margin-top: 4px; width: 15px; height: 15px; accent-color: var(--brand); flex: 0 0 auto; }
.pq-no { font-weight: 700; color: var(--accent); }

.paper-sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 30px 34px; box-shadow: var(--sh-1); max-width: 900px; }
.ps-head { text-align: center; border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 22px; }
.ps-head h1 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.ps-meta { font-size: 12.5px; color: var(--text-2); }
.ps-q { margin-top: 20px; font-size: 14px; line-height: 1.85; white-space: pre-line; }
.ps-no { font-weight: 700; margin-right: 4px; }
.ps-opts { margin-top: 8px; display: grid; gap: 4px; }
.ps-opt { font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.ps-opt b { color: var(--text); }
.ps-ans { margin-top: 10px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; min-height: 92px; font-size: 13.5px; line-height: 1.85; white-space: pre-wrap; background: var(--surface-2); }
.ps-ans.blank { color: var(--text-3); border-style: dashed; background: transparent; }
.ps-tag { font-size: 11.5px; color: var(--text-3); margin-top: 7px; }

/* ---------- 13. 页脚 ---------- */
#footer { flex-shrink: 0; margin-top: 0; border-top: 1px solid var(--line); background: #fff; padding: 22px 0; }
#footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
#footer, #footer a { font-size: 12.5px; color: var(--text-3); }
.foot-brands { display: flex; gap: 18px; }

/* ---------- 14. 打印 ---------- */
@media print {
  body { display: block; min-height: 0; background: #fff; }
  #topbar, #footer, .no-print, #app > *:not(.print-root) { display: none !important; }
  #app { padding: 0; min-height: 0; max-width: none; margin: 0; }
  .print-root { display: block !important; }
  .paper-sheet { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .ps-ans { page-break-inside: avoid; }
  .ps-q { page-break-inside: avoid; }
  @page { size: A4; margin: 18mm 16mm; }
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1000px) {
  .ov-grid { grid-template-columns: 1fr; }
  .search-results { width: 340px; }
  .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-stats { display: flex; padding: 4px 10px; }
  .hs-row { flex: 1; flex-direction: column; align-items: center; gap: 1px; border-bottom: 0; border-right: 1px dashed var(--line); padding: 12px 0; }
  .hs-row:last-child { border-right: 0; }
  .hs-row b { font-size: 21px; min-width: 0; }
  .hs-row span { font-size: 12px; }
}
@media (max-width: 780px) {
  .wrap, .wrap-wide { padding: 0 16px; }
  #app { padding: 20px 16px 44px; }
  .topbar-inner { gap: 12px; }
  .brand-text small { display: none; }
  #searchInput { width: 40px; padding: 0 0 0 34px; }
  #searchInput:focus { width: 190px; }
  .mainnav { gap: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .mainnav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 8px 9px; font-size: 13px; }
  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 25px; }
  .course-hero { padding: 26px 22px; }
  .ch-title { font-size: 21px; }
  .ch-icon { width: 50px; height: 50px; font-size: 25px; border-radius: 14px; }
  .course-grid, .mat-grid { grid-template-columns: 1fr; }
  .doc-body { padding: 24px 20px; }
  .paper-sheet { padding: 22px 18px; }
  .search-results { width: min(92vw, 340px); right: auto; left: 0; }
}

/* ---------- 13. 顶栏用户区 ---------- */
.topbar-user { display: flex; align-items: center; gap: 8px; }
.tu-name {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tu-out {
  font: inherit; font-size: 12.5px; color: var(--text-3); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px; transition: .15s;
}
.tu-out:hover { color: var(--text); border-color: var(--brand); }

/* ---------- 14. 登录 / 注册 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 46px 0 60px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); padding: 34px 34px 28px;
}
.auth-brand { font-size: 12.5px; font-weight: 700; letter-spacing: .4px; color: var(--text-3); text-align: center; margin-bottom: 22px; }
.auth-brand span {
  display: inline-block; background: var(--brand); color: #fff;
  padding: 2px 7px; border-radius: 6px; margin-right: 7px; letter-spacing: .5px;
}
.auth-title { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.auth-sub { margin: 0 0 22px; font-size: 13.5px; line-height: 1.7; color: var(--text-2); }
.auth-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; margin-bottom: 20px; }
.auth-tabs .at {
  flex: 1; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  background: transparent; border: 0; padding: 8px 0; border-radius: 999px; cursor: pointer; transition: .15s;
}
.auth-tabs .at.active { background: var(--surface); color: var(--brand); box-shadow: var(--sh-1); }
.auth-field { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 15px; }
.auth-field input {
  display: block; width: 100%; margin-top: 7px; font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 13px; transition: .15s;
}
.auth-field input:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.pass-wrap { position: relative; display: block; margin-top: 7px; }
.auth-field .pass-wrap input { margin-top: 0; padding-right: 44px; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-3);
  display: grid; place-items: center;
}
.pass-toggle:hover { color: var(--text-2); background: var(--line-2); }
.pass-toggle svg[hidden] { display: none; }
.auth-msg { min-height: 19px; font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.auth-msg.err { color: #c0392b; }
.auth-submit { width: 100%; justify-content: center; padding: 12px 0; font-size: 14.5px; }
.auth-submit[disabled] { opacity: .6; cursor: default; }
.auth-foot { margin-top: 16px; font-size: 12.5px; color: var(--text-3); text-align: center; }

/* ---------- 14b. 实名认证拦截页 ---------- */
.gate-wrap { display: flex; justify-content: center; padding: 46px 0 60px; }
.gate-card {
  width: 100%; max-width: 460px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-2); padding: 32px 34px 26px;
}
.gate-loading { font-size: 13.5px; color: var(--text-3); padding: 60px 0; }
.gate-brand { font-size: 12.5px; font-weight: 700; letter-spacing: .4px; color: var(--text-3); text-align: center; margin-bottom: 20px; }
.gate-brand span {
  display: inline-block; background: var(--brand); color: #fff;
  padding: 2px 7px; border-radius: 6px; margin-right: 7px; letter-spacing: .5px;
}
.gate-icon {
  width: 62px; height: 62px; margin: 2px auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.gate-title { margin: 0 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; text-align: center; }
.gate-desc { margin: 0 0 20px; font-size: 13.5px; line-height: 1.75; color: var(--text-2); text-align: center; }
.gate-rows { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-bottom: 18px; }
.gate-rows > div {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; font-size: 13px;
}
.gate-rows > div + div { border-top: 1px solid var(--line-2); }
.gate-rows span { color: var(--text-3); }
.gate-rows b { font-weight: 600; color: var(--text); word-break: break-all; }
.gate-reject {
  display: grid; gap: 4px; margin: 0 0 18px; padding: 12px 14px;
  background: #fdf1f0; border: 1px solid #f7d4d1; border-radius: var(--r-sm);
  font-size: 13px; color: #a33227;
}
.gate-reject b { font-weight: 700; }
.gate-reject span { line-height: 1.6; }
.gate-msg { min-height: 19px; font-size: 13px; color: var(--text-3); margin-bottom: 10px; text-align: center; }
.gate-msg.err { color: #c0392b; }
.gate-btn { width: 100%; justify-content: center; padding: 12px 0; font-size: 14.5px; }
.gate-btn[disabled] { opacity: .6; cursor: default; }
.gate-foot {
  margin-top: 16px; font-size: 12.5px; color: var(--text-3);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.gate-foot a { color: var(--text-3); text-decoration: none; border-bottom: 1px dashed var(--line); }
.gate-foot a:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- 15. 我的学习 ---------- */
.acc-stack { display: grid; gap: 18px; }
.acc-overview { margin-top: 22px; }
.acc-label { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.acc-course-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 16px; }
.acc-split { height: 1px; background: var(--line); margin: 18px 0; }
.acc-read-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.acc-head h3 { margin: 0; }
.acc-count { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.acc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.acc-filters:empty { display: none; }
.acc-filters button {
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600;
}
.acc-filters button.on { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.acc-pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.acc-pager:empty { display: none; }
.acc-pager button {
  min-width: 32px; height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font: inherit; font-size: 13px; font-weight: 600;
}
.acc-pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.acc-pager button:disabled { opacity: .4; cursor: default; }
.acc-course .ac-head {
  display: flex; justify-content: space-between; font-size: 12.5px;
  color: var(--text-2); margin-bottom: 6px;
}
.acc-hint { margin: 0 0 14px; font-size: 12.5px; color: var(--text-3); }
.acc-prog-list { display: grid; gap: 9px; }
.acc-prog {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 13px; transition: .15s;
}
.acc-prog:hover { border-color: var(--brand); background: var(--surface-2); }
.ap-course {
  font-size: 11.5px; font-weight: 700; color: var(--card-accent, var(--brand));
  border-left: 3px solid var(--card-accent, var(--brand)); padding-left: 7px; white-space: nowrap;
}
.ap-title { flex: 1; font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-prog .chip { flex: 0 0 auto; }
.ap-page { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

.id-head { display: flex; align-items: center; gap: 14px; }
.id-avatar {
  width: 56px; height: 56px; border-radius: 18px; flex: 0 0 auto;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5); color: #fff;
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
}
.id-body { min-width: 0; }
.id-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.id-name {
  font-size: 18px; font-weight: 700; letter-spacing: -.2px; line-height: 1.3;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.id-name.id-placeholder { color: var(--text-2); font-weight: 500; }
.id-mail { margin-top: 2px; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-real { margin-top: 4px; font-size: 12.5px; color: var(--text-3); }
body.modal-open { overflow: hidden; }
.modal-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-mask[hidden] { display: none !important; }
.modal-card {
  width: 100%; max-width: 420px; background: #fff;
  border-radius: 16px; padding: 22px 24px 20px; box-shadow: var(--sh-3);
}
.modal-card h3 { margin: 0 0 6px; }
.modal-card .acc-hint { margin: 0; }
.modal-card input {
  display: block; width: 100%; height: 40px; margin-top: 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); padding: 0 12px;
  font: inherit; font-size: 14px; color: var(--text);
}
.modal-card input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(59,108,240,.12); }
.nick-msg { min-height: 18px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.nick-msg[hidden] { display: none !important; }
.nick-msg.err { color: #c0392b; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

@media (max-width: 900px) {
  .acc-stats, .acc-course-cols, .acc-read-grid { grid-template-columns: 1fr; }
  .auth-wrap { padding: 24px 0 40px; }
  .auth-card { padding: 26px 22px 22px; }
  .tu-name { max-width: 120px; }
}
