@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(assets/fonts/Inter-normal-400-latin.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(assets/fonts/Inter-normal-500-latin.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(assets/fonts/Inter-normal-600-latin.woff2) format('woff2'); }

:root {
  --ink: #0f2150; --ink-2: #2b3c66; --ink-3: #5d6d8a;
  --blue: #1e4fa3; --blue-2: #1aa7e0; --water: #e2ecfa;
  --green: #13a13a; --green-ink: #0d7a2b; --green-btn: #0f7a2e; --green-2: #6fd83a; --amber: #8a5200; --red: #c0392b;
  --input-line: #8593a9;  /* 计划值 #8c9ab0 只有 2.85:1，不到 3:1，略调深 */
  --paper: #f7f9fc; --paper-2: #edf2f8; --white: #fff;
  --hero-start: #0f2150; --hero-end: #1e4fa3;  /* 首页 hero 渐变：文字区不淡到 --blue-2，白字对比度 check-contrast 检查 */
  --line: #d9e0ea; --line-2: #e3e9f1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15,33,80,.06), 0 4px 16px rgba(15,33,80,.06);
  --font: Inter, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 16px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; } /* iOS 聚焦不放大 */
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2, .h2 { font-size: 21px; } h3, .h3 { font-size: 17px; }
.muted { color: var(--ink-3); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.hidden { display: none !important; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; height: 58px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand b { font-size: 17px; letter-spacing: .02em; }
.brand span { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: 15px; }
.nav a.on, .nav a:hover { background: var(--paper-2); text-decoration: none; }
.nav.mobile { display: none; }
.top-r { display: flex; align-items: center; gap: 8px; }
.lang { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 4px 9px; cursor: pointer; font-size: 13px; }

/* 布局 */
main { max-width: 1120px; margin: 0 auto; padding: 28px 16px 64px; min-height: calc(100vh - 140px); }
.narrow { max-width: 760px; margin: 0 auto; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin-bottom: .4em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
footer .in { max-width: 1120px; margin: 0 auto; padding: 18px 16px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--blue); background: var(--blue); color: #fff; border-radius: 8px; padding: 9px 18px; cursor: pointer; font-weight: 500; font-size: 15px; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { background: var(--white); color: var(--blue); }
.btn.green { background: var(--green-btn); border-color: var(--green-btn); }
.btn.danger { background: var(--white); color: var(--red); border-color: var(--red); }
.btn.sm { padding: 5px 11px; font-size: 13.5px; }
.btn.lg { padding: 12px 26px; font-size: 16px; }
/* 长文案按钮：允许换行、左对齐、不超过容器（考试结果页「先复习…」、总览主按钮） */
.btn.wrap { white-space: normal; text-align: left; max-width: 100%; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
.main-btn { justify-content: flex-start; }

/* 表单 */
label.f, div.f { display: block; }
label.f > span, .f > label > span, fieldset.plain legend span { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.input { width: 100%; border: 1px solid var(--input-line); border-radius: 8px; padding: 9px 12px; background: var(--white); }
.input:focus { border-color: var(--blue); }
.input[aria-invalid="true"] { border-color: var(--red); }
/* 键盘焦点：2px 实色 + 2px 间隙 */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.req-mark { color: var(--red); font-weight: 600; }
.field-err { color: var(--red); font-size: 14px; margin-top: 4px; }
.field-err:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
fieldset.plain, fieldset.typesel { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.typesel legend { font-size: 14px; color: var(--ink-2); font-weight: 500; margin-bottom: 6px; padding: 0; }
.typesel-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 10px; }
.typebtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.typebtn b { font-size: 16px; } .typebtn span { font-size: 13px; color: var(--ink-3); }
.typebtn.on { border-color: var(--blue); background: #f2f7ff; }
.check.inline { display: inline-flex; margin-right: 8px; }
.kiosk-bar { background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 14px; font-weight: 500; margin-bottom: 14px; font-size: 14.5px; }
.cn-note { border-left-color: var(--amber); }
.employer-card { border-left: 4px solid var(--blue-2); }
.warn-note { border-left-color: var(--amber); background: #fdf0dc; color: var(--amber); }
.stat.warn b { color: var(--amber); }
.m-progress { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check input { margin-top: 4px; width: 17px; height: 17px; flex: none; }
.err { color: var(--red); font-size: 14px; }
.ok { color: var(--green-ink); }

/* 标签 */
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tag.blue { background: var(--water); color: var(--blue); }
.tag.green { background: #e3f5e7; color: var(--green-ink); }
.tag.amber { background: #fdf0dc; color: var(--amber); }
.tag.red { background: #fbe5e2; color: var(--red); }

/* 进度条 */
.bar { height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: 99px; }
.bar.green > i { background: var(--green); }

/* 首页 */
.hero { background: linear-gradient(135deg, var(--hero-start) 0%, var(--hero-end) 100%); color: #fff; border-radius: 16px; padding: 48px 40px; position: relative; overflow: hidden; }
.hero h1 { font-size: 38px; margin-bottom: 10px; }
.hero p { font-size: 17px; max-width: 640px; color: #fff; }
.hero .hero-lead { font-size: 18px; margin: 0 0 18px; }
.hero .hero-cta { margin-bottom: 18px; }
.hero .hero-more { font-size: 15px; margin: 0; opacity: .92; }
.hero .kicker { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); font-weight: 600; margin-bottom: 10px; }
.hero .btn { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.hero-flow { position: absolute; right: -40px; top: 0; bottom: 0; width: 420px; opacity: .18; pointer-events: none; }
.steps { counter-reset: s; }
.card.step { position: relative; padding-left: 62px; }
.card.step::before { counter-increment: s; content: counter(s); position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--water); color: var(--blue); font-weight: 600; display: grid; place-items: center; }
.level { border-top: 4px solid var(--blue); }
.level.l2 { border-top-color: var(--blue-2); } .level.l3 { border-top-color: var(--green); }
.level ul { padding-left: 18px; margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; }
.note { background: var(--paper-2); border-left: 3px solid var(--ink-3); padding: 12px 16px; border-radius: 6px; font-size: 14px; color: var(--ink-2); }
.err-note { border-left-color: var(--red); background: #fbe5e2; color: var(--red); }
.err-note a { color: var(--red); text-decoration: underline; }
.stat.bad b { color: var(--red); }
/* 进行中考卷横幅 */
.open-banner { border-left: 4px solid var(--amber); margin-bottom: 16px; }
/* 试行期通过记录：虚线框，和证书卡明显区分 */
.trial-rec { border: 2px dashed var(--input-line); box-shadow: none; background: var(--paper); }
/* 三段进度条：已完成 / 已上线未完成 / 即将上线（底色） */
.bar3 { height: 8px; border-radius: 99px; overflow: hidden; display: flex; background: repeating-linear-gradient(45deg, var(--paper-2) 0 6px, var(--line-2) 6px 12px); }
.bar3 > i { display: block; height: 100%; }
.bar3 > i.d { background: var(--blue); }
.bar3 > i.l { background: #b9d3f2; }
/* 心跳失败提示 */
.beat-warn { position: sticky; top: 64px; z-index: 12; background: #fdf0dc; color: var(--amber); border: 1px solid #f3d6a6; border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 500; margin-bottom: 12px; }
/* 站内确认框 */
.dlg-wrap { position: fixed; inset: 0; background: rgba(15,33,80,.45); z-index: 200; display: grid; place-items: center; padding: 16px; }
.dlg { background: var(--white); border-radius: 12px; padding: 22px 22px 18px; max-width: 460px; width: 100%; box-shadow: 0 10px 40px rgba(15,33,80,.25); max-height: calc(100vh - 32px); overflow-y: auto; }
.dlg h2 { font-size: 19px; }
.dlg-b { font-size: 15px; color: var(--ink-2); }
.dlg-btns { justify-content: flex-end; margin-top: 18px; }
/* 考试模式：隐藏顶部和底部导航、退出按钮 */
body.exam-mode .nav, body.exam-mode #logout { display: none !important; }
/* 表单里的小标题（非 label 的字段名） */
.f .lbl { font-size: 14px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.survey { border: 1px dashed var(--input-line); border-radius: 8px; padding: 12px 14px; }
.survey > * + * { margin-top: 12px; }
.survey-t { font-weight: 600; font-size: 14.5px; padding: 0 4px; }
.jl-paid { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.tiers { background: var(--paper); border-radius: 8px; padding: 12px 16px; margin: 14px 0; }
.tiers ul { padding-left: 18px; margin: 6px 0 8px; font-size: 14px; }
.input.sm { padding: 5px 8px; font-size: 14px; width: auto; }
table.data td.wrap-s { white-space: normal; min-width: 140px; }
table.data tr.overdue td { background: #fdf0ee; }
.q-img { margin: 4px 0 12px; }
.q-img img { max-width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.q-img figcaption { margin-top: 4px; }

/* 统计块 */
.stat b { display: block; font-size: 26px; font-weight: 600; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--ink-3); }

/* 打卡日历 */
.heat { display: grid; grid-template-rows: repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; background: var(--paper-2); }
.heat i.l1 { background: #b9d3f2; } .heat i.l2 { background: #6fa3e0; } .heat i.l3 { background: var(--blue); }
.heat i.ck { outline: 2px solid var(--green); outline-offset: -2px; }
.heat i.fut { background: transparent; }

/* 课程列表 */
.lesson-row { display: flex; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: var(--paper); text-decoration: none; }
.lesson-row .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-weight: 600; flex: none; font-size: 14px; }
.lesson-row .n.done { background: var(--green); color: #fff; }
.lesson-row .t { flex: 1; min-width: 0; }
.lesson-row .t b { display: block; font-weight: 500; }
.lesson-row .meta { display: flex; gap: 6px; align-items: center; flex: none; }
/* 「即将开放」行：不再整行降透明度（正文要 ≥4.5:1），只把序号圈改成虚线框 */
.lesson-row.coming .n { background: var(--white); border: 1px dashed var(--input-line); color: var(--ink-3); }
.lesson-row.coming:hover { background: none; }

/* 正文 */
.lesson-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.lesson-wrap > * { min-width: 0; }
/* 上一章 / 下一章：短标签 + 一行省略号截断的标题，允许换行 */
.lesson-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 18px; }
.btn.navbtn { flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; min-width: 0; max-width: 100%; text-align: left; padding: 10px 14px; }
.btn.navbtn.nb-r { align-items: flex-end; text-align: right; justify-self: end; }
.navbtn .nb-k { font-weight: 600; }
.navbtn .nb-t { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 400; opacity: .9; }
.side { position: sticky; top: 78px; }
.prose { font-size: 16.5px; line-height: 1.8; }
.prose h2 { font-size: 22px; margin: 1.8em 0 .6em; padding-top: .4em; border-top: 1px solid var(--line-2); }
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { font-size: 18px; margin: 1.4em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose code { background: var(--paper-2); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.prose blockquote { margin: 1.2em 0; padding: 12px 16px; background: var(--paper); border-left: 4px solid var(--line); border-radius: 6px; }
.prose blockquote.tip { background: #eef6ff; border-left-color: var(--blue-2); }
.prose blockquote.warn { background: #fff6e8; border-left-color: var(--amber); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .tbl { overflow-x: auto; margin: 0 0 1.2em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); }
.req { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0; }
.req i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.req.ok i { background: var(--green); border-color: var(--green); }

/* 题目 */
.q { padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.q:last-child { border-bottom: 0; }
.q .stem { font-weight: 500; margin-bottom: 10px; }
.q .stem .tag { margin-right: 6px; vertical-align: 1px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; cursor: pointer; background: var(--white); }
.opt:hover { border-color: var(--blue-2); }
.opt input { margin-top: 4px; flex: none; width: 17px; height: 17px; }
.opt.sel { border-color: var(--blue); background: #f2f7ff; }
.opt.right { border-color: var(--green); background: #effaf1; }
.opt.wrong { border-color: var(--red); background: #fdf0ee; }
.q.missing { background: #fff6e8; box-shadow: -12px 0 0 #fff6e8, 12px 0 0 #fff6e8; }
.q.missing .stem::after { content: ' *'; color: var(--amber); font-weight: 600; }
.q.q-ok .stem { color: var(--green-ink); }
.q.q-bad .stem { color: var(--red); }
.explain { font-size: 14.5px; background: var(--paper); padding: 10px 14px; border-radius: 8px; margin-top: 8px; color: var(--ink-2); }

/* 考试 */
.q { scroll-margin-top: 150px; }
#save-st:not(:empty)::before { content: ' · '; }
.exam-bar { position: sticky; top: 58px; z-index: 10; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; display: flex; gap: 14px; align-items: center; justify-content: space-between; box-shadow: var(--shadow); margin-bottom: 16px; flex-wrap: wrap; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 20px; }
.timer.low { color: var(--red); }
.qnav { display: flex; flex-wrap: wrap; gap: 5px; }
.qnav button { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: 13px; border: 1px solid var(--line); color: var(--ink-2); background: var(--white); cursor: pointer; padding: 0; }
.qnav button.ans { background: var(--blue); border-color: var(--blue); color: #fff; }
.qnav button:hover { border-color: var(--blue); }
.result-big { font-size: 56px; font-weight: 600; line-height: 1; }

/* 证书 */
.cert { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; max-width: 900px; margin: 0 auto; box-shadow: var(--shadow); }
.cert-in { border: 2px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -8px; padding: 44px 48px; text-align: center; position: relative; }
.cert-in .logo { width: 64px; height: 64px; }
.cert-in .org { letter-spacing: .18em; text-transform: uppercase; font-size: 13px; color: var(--ink-3); margin: 8px 0 22px; }
.cert-in h1 { font-size: 30px; letter-spacing: .04em; margin-bottom: 4px; }
.cert-in .sub { color: var(--ink-3); margin-bottom: 26px; }
.cert-in .who { font-size: 34px; font-weight: 600; margin: 6px 0 2px; }
.cert-in .who-en { font-size: 16px; color: var(--ink-3); margin-bottom: 20px; }
.cert-in .course { font-size: 19px; font-weight: 500; }
.cert-meta { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 36px; text-align: left; gap: 16px; }
.cert-meta .qr svg, .cert-meta .qr img { width: 96px; height: 96px; display: block; }
.cert-meta .k { font-size: 12px; color: var(--ink-3); } .cert-meta .v { font-size: 14px; font-weight: 500; }
.verify-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.verify-badge.valid { background: #e3f5e7; color: var(--green-ink); }
.verify-badge.bad { background: #fbe5e2; color: var(--red); }
/* 撤销/过期证书：斜向大水印，放在证书主体内（可打印区域），打印也保留颜色 */
.cert.invalid .cert-in > *:not(.cert-wm) { opacity: .55; }
.cert-wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; overflow: hidden; }
.cert-wm span { transform: rotate(-24deg); font-size: clamp(34px, 8vw, 84px); font-weight: 700; letter-spacing: .06em; color: rgba(192,57,43,.34); border: 6px solid rgba(192,57,43,.34); border-radius: 14px; padding: 6px 24px; white-space: nowrap; }
.cert-invalid { color: var(--red); margin: 18px 0 0; font-size: 15px; }
.cert, .cert-wm span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* 报名页 */
.join-head { margin-bottom: 18px; }
.join-head .kicker { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); font-weight: 600; margin-bottom: 6px; }
.join-head p { color: var(--ink-2); }
.join-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.jl { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; }
.jl.l2 { border-top-color: var(--blue-2); } .jl.l3 { border-top-color: var(--green); }
.jl b { display: block; font-weight: 600; } .jl span { color: var(--ink-3); font-size: 12.5px; }
.ok-note { border-left-color: var(--green); background: #e3f5e7; color: var(--green-ink); }
/* 草稿页 */
.draft-banner { background: #fdf0dc; color: var(--amber); border: 1px solid #f3d6a6; border-radius: 8px; padding: 8px 14px; font-weight: 600; margin-bottom: 16px; }
.legal h3 { margin-top: 1.4em; }
.legal p { color: var(--ink-2); }
/* 链接样式的按钮 */
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn:disabled { color: var(--ink-3); cursor: default; text-decoration: none; }
/* 管理端图表与二维码 */
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); } .chart .grid { stroke: var(--line-2); stroke-dasharray: 3 3; }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2; } .chart .dot { fill: var(--blue); }
.chart text { font-size: 11px; fill: var(--ink-3); }
table.data tr.total td { font-weight: 600; background: var(--paper); }
.qr-big svg { width: 240px; height: 240px; display: block; margin: 12px 0; }

/* 表格（管理端） */
.tbl-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
table.data th { font-weight: 500; color: var(--ink-3); font-size: 13px; background: var(--paper); }
table.data td.wrap { white-space: normal; min-width: 260px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--blue); font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--ink); }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14.5px; box-shadow: var(--shadow); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .lesson-wrap { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .hero { padding: 26px 20px; border-radius: 12px; }
  .hero h1 { font-size: 27px; }
  .hero .hero-lead { font-size: 16px; margin-bottom: 14px; }
  .hero .hero-cta .btn { padding: 11px 18px; }
  .hero .hero-more { font-size: 14px; }
  .hero-flow { display: none; }
  .nav { display: none; }
  .nav.mobile { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 30; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .nav.mobile a[aria-current] { color: var(--blue); font-weight: 600; }
  /* 底栏避让加在 body 上，页脚完整可见（登录与未登录都有底栏） */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  body.exam-mode { padding-bottom: 0; }
  body.exam-mode .nav.mobile { display: none !important; }
  /* 考试栏在手机上压成一行：已答数、剩余时间、交卷 */
  .exam-bar { flex-wrap: nowrap; padding: 8px 10px; gap: 8px; top: 58px; }
  .exam-bar .eb-title, .exam-bar .eb-left { display: none; }
  .exam-bar .eb-info { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .exam-bar .eb-r { flex-wrap: nowrap; gap: 8px; }
  .exam-bar .btn { padding: 7px 12px; }
  .timer { font-size: 18px; }
  .q { scroll-margin-top: 120px; }
  .typebtn { padding: 10px 10px; }
  .typebtn b { font-size: 15px; }
  .lesson-nav { gap: 8px; }
  .btn.navbtn { padding: 9px 11px; }
  .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); }
  /* 手机章节页：标题下的紧凑进度条代替右栏 */
  .m-progress { display: block; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: -4px 0 14px; }
  .lesson-wrap .side { display: none; }
  .card.step { padding-left: 58px; }
  .card.step::before { left: 14px; top: 15px; }
  .lesson-row { flex-wrap: wrap; row-gap: 4px; }
  .lesson-row .t { flex: 1 1 calc(100% - 48px); }
  .lesson-row .meta { flex: 1 1 100%; padding-left: 48px; }
  .join-levels { grid-template-columns: 1fr 1fr 1fr; }
  .jl { padding: 6px 8px; }
  .brand span { display: none; }
  .cert-in { padding: 26px 16px; }
  .cert-in .who { font-size: 26px; }
  .cert-meta { flex-direction: column; align-items: center; text-align: center; }
  .card { padding: 16px; }
}
@media print {
  .top, footer, .no-print, .nav.mobile { display: none !important; }
  body { background: #fff; padding-bottom: 0; }
  main { padding: 0; }
  .cert { border: 0; box-shadow: none; padding: 0; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* ───── 第 4 轮 ───── */
/* 新学员总览顶部大卡 */
.first-card { border-left: 4px solid var(--blue); margin-bottom: 18px; }
.first-card .kicker { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-weight: 600; }
/* 一次性确认卡 */
.consent-card { border-left: 4px solid var(--amber); margin-bottom: 18px; }
/* 访客预读：底部固定注册卡 */
.preview-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: #fff; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(15,33,80,.18); }
.preview-bar .btn { background: #fff; color: var(--ink); border-color: #fff; }
body.has-preview-bar { padding-bottom: 84px; }
body.has-preview-bar .nav.mobile { display: none !important; }
/* 常见问题 */
.faq-item { margin-bottom: 10px; padding: 0; }
.faq-item summary { cursor: pointer; padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--blue); flex: none; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary h2 { margin: 0; }
.faq-a { padding: 0 20px 14px; color: var(--ink-2); }
.faq-a p { margin: 0 0 .7em; }
/* 考试：题号抽屉（手机从底部弹出） */
.qdrawer { position: fixed; inset: 0; background: rgba(15,33,80,.45); z-index: 150; display: flex; align-items: center; justify-content: center; padding: 16px; }
.qd-in { background: var(--white); border-radius: 12px; padding: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 10px 40px rgba(15,33,80,.25); }
.qd-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); vertical-align: -1px; background: var(--white); }
.qd-key.ans { background: var(--blue); border-color: var(--blue); }
.qd-in .qnav button { width: 40px; height: 40px; font-size: 14px; }
.qnav button:not(.ans) { background: var(--white); }
/* 平板：顶栏大号语言切换 */
.kiosk-lang { background: #fff; color: var(--ink); border: 0; border-radius: 8px; font-size: 17px; font-weight: 600; padding: 8px 18px; cursor: pointer; min-height: 44px; }
.kiosk-bar.row { gap: 10px; padding: 6px 8px 6px 14px; }
.stat.good b { color: var(--green-ink); }
.ts-box:empty { display: none; }
.lead-short { display: none; }
@media (max-width: 640px) {
  .qdrawer { align-items: flex-end; padding: 0; }
  .qd-in { border-radius: 14px 14px 0 0; max-width: none; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .exam-bar #qnav-btn { padding: 7px 10px; }
  /* 报名页手机首屏：说明缩成一行、三级卡折成一行，邮箱框要在首屏里 */
  .join .lead-full { display: none; }
  .join .lead-short { display: block; margin: 0 0 10px; font-size: 14.5px; }
  .join-head { margin-bottom: 12px; }
  .join-head h1 { font-size: 22px; margin-bottom: 4px; }
  .join .join-levels { display: flex; gap: 6px; overflow-x: auto; }
  .join .jl { flex: 1 1 0; min-width: 0; padding: 4px 6px; border-top-width: 2px; }
  .join .jl b { font-size: 12.5px; } .join .jl span { font-size: 11.5px; } .join .jl .jl-paid { display: none; }
  .join .typesel legend { margin-bottom: 4px; }
  .join .typebtn { padding: 8px 10px; }
  .join .typebtn span { display: none; }
  .join form.card { padding: 14px; }
  .join form.stack > * + * { margin-top: 12px; }
  .preview-bar { justify-content: space-between; }
}
