/* ===================================================================
   纺织知识学院 — 移动优先样式表
   =================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #f5f4ef;
  --card: #ffffff;
  --ink: #17201e;
  --ink-2: #46524f;
  --ink-3: #8b938f;
  --line: #e6e3db;
  --primary: #0f5c54;
  --primary-2: #187a6d;
  --primary-soft: #e8f2ef;
  --accent: #bd7439;
  --accent-soft: #fbf1e7;
  --ok: #2f7d54;
  --bad: #bf4f3c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 40, 35, 0.04), 0 10px 26px rgba(20, 40, 35, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, "Segoe UI", Roboto, sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

a {
  color: var(--primary);
  text-decoration: none;
}

ul,
ol {
  margin: 8px 0 12px;
  padding-left: 20px;
}

li {
  margin: 5px 0;
}

/* ---------- 骨架 ---------- */
.shell {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  position: relative;
}

.page {
  padding: 0 16px 8px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(245, 244, 239, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.topbar .ttl {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ink-2);
}

.icon-btn:active {
  background: #f0efe9;
}

.home-head {
  padding: 22px 16px 6px;
}

.home-head .eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--primary);
  font-weight: 700;
}

.home-head h1 {
  margin: 6px 0 4px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.home-head p {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sec-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 12px;
}

.sec-title h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sec-title span {
  font-size: 12.5px;
  color: var(--ink-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.bar {
  height: 6px;
  border-radius: 99px;
  background: #ecebe4;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.4s ease;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.gray {
  background: #f0efe9;
  color: var(--ink-3);
}

.badge.warn {
  background: var(--accent-soft);
  color: var(--accent);
}

.muted {
  color: var(--ink-3);
}

.tiny {
  font-size: 12.5px;
}

/* ---------- 首页 Hero ---------- */
.hero {
  margin: 14px 0 0;
  padding: 20px 18px;
  border-radius: 20px;
  background: linear-gradient(140deg, #0d544c 0%, #147264 58%, #1a8574 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 28px rgba(15, 92, 84, 0.24);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.hero-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-body .k {
  font-size: 12px;
  opacity: 0.78;
  letter-spacing: 0.08em;
}

.hero-body .v {
  font-size: 21px;
  font-weight: 700;
  margin: 3px 0 2px;
}

.hero-body .s {
  font-size: 12.5px;
  opacity: 0.82;
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero .btn {
  height: 38px;
  padding: 0 16px;
  font-size: 13.5px;
  background: #fff;
  color: var(--primary);
  border-radius: 11px;
}

.ring {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  position: relative;
  z-index: 1;
}

.ring svg {
  display: block;
  transform: rotate(-90deg);
}

.ring .num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.ring .num small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.78;
  transform: translateY(-4px);
  margin-left: 1px;
}

/* ---------- 模块卡片 ---------- */
.mod-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 11px;
}

@media (min-width: 620px) {
  .mod-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mod-card {
  display: flex;
  gap: 13px;
  padding: 14px;
  text-align: left;
  width: 100%;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mod-card:active {
  background: #fbfaf7;
}

.mod-ico {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mod-main {
  flex: 1;
  min-width: 0;
}

.mod-main .m-title {
  display: block;
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
}

.mod-main .m-desc {
  display: -webkit-box;
  margin: 0 0 9px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.mod-meta .bar {
  flex: 1;
}

/* ---------- 章节列表 ---------- */
.mod-head {
  padding: 18px;
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(20, 40, 35, 0.16);
}

.mod-head h1 {
  margin: 8px 0 6px;
  font-size: 21px;
  line-height: 1.3;
}

.mod-head p {
  margin: 0 0 14px;
  font-size: 13px;
  opacity: 0.86;
  line-height: 1.6;
}

.mod-head .prog-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  opacity: 0.95;
}

.mod-head .prog-line .bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.25);
}

.mod-head .prog-line .bar > i {
  background: #fff;
}

.chap-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(20, 40, 35, 0.03);
}

.chap-item:active {
  background: #fbfaf7;
}

.chap-no {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: #f1f0e9;
  color: var(--ink-2);
  margin-top: 1px;
}

.chap-no.done {
  background: var(--primary);
  color: #fff;
}

.chap-body {
  flex: 1;
  min-width: 0;
}

.chap-body .c-title {
  display: block;
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
}

.chap-body .meta {
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.chap-item .arrow {
  align-self: center;
  color: #c8cbc4;
  font-size: 16px;
}

/* ---------- 文章 ---------- */
.article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px 20px;
  box-shadow: var(--shadow);
  margin-top: 12px;
}

.article h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 9px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
  line-height: 1.4;
}

.article h2:first-child {
  margin-top: 2px;
}

.article p {
  margin: 0 0 11px;
  color: #2b3331;
  font-size: 14.5px;
  line-height: 1.85;
}

.article ul {
  margin: 6px 0 12px;
  padding-left: 19px;
}

.article li {
  font-size: 14.5px;
  line-height: 1.8;
  margin: 6px 0;
  color: #2b3331;
}

.article li::marker {
  color: var(--primary-2);
}

.article strong {
  color: var(--primary);
}

.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px -6px 14px;
  padding: 0 2px 2px;
}

.article table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12.5px;
  line-height: 1.6;
}

.article table.wide {
  min-width: 480px;
}

.article th,
.article td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.article th {
  background: var(--primary-soft);
  color: #0b4a43;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid #d6e6e1;
}

.article tbody tr:nth-child(even) {
  background: #fbfaf7;
}

.note {
  margin: 14px 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  color: #7d4a1d;
  font-size: 13.5px;
  line-height: 1.75;
}

.tbl-hint {
  margin: -8px 0 12px;
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
}

.goal-card {
  background: var(--primary-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 12px;
}

.goal-card .k {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.goal-card ul {
  margin: 0;
  padding-left: 17px;
}

.goal-card li {
  font-size: 13.5px;
  color: #17403b;
  line-height: 1.7;
  margin: 4px 0;
}

.recap {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f7f6f1;
  border: 1px dashed #ddd8cb;
  border-radius: 14px;
}

.recap .k {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.recap ul {
  margin: 0;
  padding-left: 17px;
}

.recap li {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

.article-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.article-title {
  margin: 10px 0 6px;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chap-nav {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.chap-nav .btn {
  flex: 1;
}

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 680px;
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  padding: 7px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
}

.tab {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 3px 0;
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: 0;
}

.tab svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.active {
  color: var(--primary);
  font-weight: 700;
}

/* ---------- 测试 ---------- */
.lock-card {
  text-align: center;
  padding: 30px 22px;
  margin-top: 16px;
}

.lock-card .big {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
}

.lock-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.lock-card p {
  margin: 0 0 16px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.7;
}

.exam-sticky {
  position: sticky;
  top: 0;
  z-index: 22;
  background: rgba(245, 244, 239, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
}

.exam-sticky .topbar,
.exam-sticky .exam-top {
  position: static;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.exam-sticky .exam-top {
  padding-top: 0;
}

.exam-top {
  padding: 4px 16px 10px;
  position: sticky;
  top: 0;
  z-index: 21;
  background: rgba(245, 244, 239, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.exam-top .line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 7px;
}

.exam-top .line b {
  color: var(--primary);
  font-size: 13px;
}

.q-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-top: 4px;
}

.q-type {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.q-card h2 {
  margin: 0 0 16px;
  font-size: 16.5px;
  line-height: 1.6;
  font-weight: 600;
}

.opts {
  display: grid;
  gap: 9px;
}

.opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fdfdfb;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.opt .tag {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  background: #f0efe9;
  color: var(--ink-3);
  margin-top: 1px;
}

.opt.sel {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: #0d4039;
}

.opt.sel .tag {
  background: var(--primary);
  color: #fff;
}

.opt.ok {
  border-color: var(--ok);
  background: #eef7f1;
  color: #1e5738;
}

.opt.ok .tag {
  background: var(--ok);
  color: #fff;
}

.opt.no {
  border-color: #e0b3a9;
  background: #fdf2ef;
  color: #8a3a29;
}

.opt.no .tag {
  background: var(--bad);
  color: #fff;
}

.exam-nav {
  display: flex;
  gap: 10px;
  margin: 14px 0 4px;
}

.exam-nav .btn {
  flex: 1;
}

/* ---------- 答题卡 ---------- */
.answer-sheet {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow);
}

.as-head {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.as-head span:first-child {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
}

.qdots {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px;
}

.qdot {
  height: 27px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fdfdfb;
  font-size: 11px;
  color: var(--ink-3);
  display: grid;
  place-items: center;
  padding: 0;
}

.qdot.done {
  background: var(--primary-soft);
  border-color: #cfe4df;
  color: var(--primary);
  font-weight: 600;
}

.qdot.cur {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* ---------- 成绩 ---------- */
.result-hero {
  text-align: center;
  padding: 26px 20px 22px;
  border-radius: 20px;
  color: #fff;
  margin-top: 14px;
  background: linear-gradient(140deg, #0d544c, #1a8574);
  box-shadow: 0 12px 28px rgba(15, 92, 84, 0.22);
}

.result-hero.pass {
  background: linear-gradient(140deg, #0d544c, #1a8574);
}

.result-hero.mid {
  background: linear-gradient(140deg, #8a5a1f, #c08a3c);
  box-shadow: 0 12px 28px rgba(160, 110, 40, 0.22);
}

.result-hero.fail {
  background: linear-gradient(140deg, #7b3327, #b1543e);
  box-shadow: 0 12px 28px rgba(150, 60, 40, 0.22);
}

.result-hero .score {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.result-hero .score small {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.8;
  margin-left: 2px;
}

.result-hero .verdict {
  font-size: 16px;
  font-weight: 700;
  margin: 12px 0 6px;
}

.result-hero .desc {
  font-size: 12.5px;
  opacity: 0.86;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 320px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}

.stat .v {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.stat .k {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

.mrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f0eee7;
}

.mrow:last-child {
  border-bottom: 0;
}

.mrow .nm {
  flex: 0 0 88px;
  font-size: 13px;
  font-weight: 600;
}

.mrow .dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.mrow .bar {
  flex: 1;
}

.mrow .pc {
  flex: 0 0 42px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.review-item {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  margin-bottom: 10px;
}

.review-item .qh {
  font-size: 13.8px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 8px;
}

.review-item .ans {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.review-item .ans span.no {
  color: var(--bad);
  font-weight: 600;
}

.review-item .ans span.ok {
  color: var(--ok);
  font-weight: 600;
}

.review-item .ex {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e8e5dc;
  font-size: 12.5px;
  line-height: 1.75;
  color: #5a6560;
}

/* ---------- 我的 ---------- */
.prof-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-top: 12px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 800;
  font-size: 20px;
  flex: 0 0 auto;
}

.prof-head h2 {
  margin: 0 0 3px;
  font-size: 17px;
}

.prof-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.list-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid #f1efe9;
  font-size: 14px;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row .lb {
  flex: 1;
}

.list-row .val {
  font-size: 13px;
  color: var(--ink-3);
}

.list-row:active {
  background: #fbfaf7;
}

.danger {
  color: var(--bad);
}

.about {
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.85;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 10px);
  background: rgba(23, 32, 30, 0.94);
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: min(88vw, 440px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.foot-hint {
  text-align: center;
  font-size: 11.5px;
  color: #a8afab;
  padding: 18px 0 6px;
  line-height: 1.7;
}

.empty {
  text-align: center;
  padding: 34px 20px;
  color: var(--ink-3);
  font-size: 13.5px;
}

@media (min-width: 620px) {
  .article {
    padding: 24px 26px 28px;
  }
  .article p,
  .article li {
    font-size: 15px;
  }
  .article h2 {
    font-size: 17px;
  }
}

/* ---------- 课程总览 ---------- */
.course-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.course-summary .cs-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.course-summary .cs-num small {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

.course-summary .cs-txt {
  flex: 1;
  min-width: 0;
}

.course-summary .cs-txt p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.course-summary .btn {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 11px;
}

.cblock {
  margin-bottom: 16px;
}

.cblock-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 4px 2px 8px;
}

.cblock-head .mod-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 11.5px;
}

.cblock-head .cb-t {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
}

.cblock-head .cb-p {
  font-size: 12px;
  color: var(--ink-3);
}

.row-line {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 7px;
  font-size: 13.5px;
  color: var(--ink);
}

.row-line:active {
  background: #fbfaf7;
}

.rl-no {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  background: #f1f0e9;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.rl-no.done {
  background: var(--primary);
  color: #fff;
}

.rl-t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rl-m {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--ink-3);
}

/* ---------- 测评入口 ---------- */
.exam-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.exam-entry:active {
  background: #fbfaf7;
}

.exam-entry .ic {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

.exam-entry .e-body {
  flex: 1;
  min-width: 0;
}

.exam-entry .e-title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 3px;
}

.exam-entry .e-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}

.exam-entry .go {
  margin-left: auto;
  color: #c8cbc4;
  font-size: 18px;
}

/* ---------- 未解锁 ---------- */
.lock-ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  color: var(--primary);
}

.lock-ico svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exit-btn {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 6px 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
}


/* ===================================================================
   图示化学习组件
   =================================================================== */
.vis {
  margin: 14px 0 6px;
}

.vis-cap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.vis-cap::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--primary);
}

.vis-box {
  background: #fbfaf6;
  border: 1px solid #eae6d9;
  border-radius: 14px;
  padding: 12px;
}

.vis-note {
  margin: 9px 0 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #7d7a6d;
  padding-left: 2px;
}

/* 流程链 */
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 6px;
}

.flow-item {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 8px 9px;
  position: relative;
}

.flow-item .n {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--primary-2);
  letter-spacing: 0.04em;
}

.flow-item .t {
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-item .s {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 对比 */
.cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cmp-col {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 10px 8px;
}

.cmp-col h5 {
  margin: 0 0 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
}

.cmp-col.alt h5 {
  background: var(--accent);
}

.cmp-col ul {
  margin: 0;
  padding-left: 14px;
}

.cmp-col li {
  font-size: 11.5px;
  line-height: 1.6;
  margin: 4px 0;
  color: var(--ink-2);
}

.cmp-col li::marker {
  color: #c9cec8;
}

/* 要点卡 */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 10px;
}

.mini .k {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.mini .v {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 3px 0 2px;
  line-height: 1.35;
}

.mini .d {
  font-size: 10.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* 占比条 */
.brows {
  padding: 2px 0;
}

.brow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.brow .lb {
  flex: 0 0 62px;
  font-size: 11.5px;
  color: var(--ink-2);
}

.brow .tr {
  flex: 1;
  height: 9px;
  background: #edebe3;
  border-radius: 99px;
  overflow: hidden;
}

.brow .tr i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #1a8574, #0f5c54);
}

.brow .vl {
  flex: 0 0 38px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}

/* 分层金字塔 */
.pyr {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.pyr-row {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  font-size: 11.5px;
  line-height: 1.2;
  padding: 0 8px;
  text-align: center;
}

.pyr-row b {
  font-weight: 700;
}

.pyr-row span {
  opacity: 0.85;
  font-size: 10.5px;
}

/* 步骤 */
.steps {
  position: relative;
  padding-left: 18px;
}

.steps::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 10px;
  width: 2px;
  background: #e2e5de;
}

.step {
  position: relative;
  margin-bottom: 9px;
}

.step:last-child {
  margin-bottom: 0;
}

.step::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
}

.step .t {
  font-size: 12.5px;
  font-weight: 700;
}

.step .s {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.55;
  margin-top: 1px;
}

/* 四宫格 */
.quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qcell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 8px;
  text-align: center;
}

.qcell .n {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.qcell .s {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* ===================================================================
   随堂检测
   =================================================================== */
.check-card {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 15px 16px;
  box-shadow: var(--shadow);
}

.cc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cc-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.cc-xp {
  font-size: 11px;
  color: var(--ink-3);
}

.cc-q {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 12px;
}

.cc-opts {
  display: grid;
  gap: 8px;
}

.cc-opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 10px 11px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fdfdfb;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.cc-opt .tag {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: #f0efe9;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.cc-opt.ok {
  border-color: var(--ok);
  background: #eef7f1;
  color: #1e5738;
}

.cc-opt.ok .tag {
  background: var(--ok);
  color: #fff;
}

.cc-opt.no {
  border-color: #e0b3a9;
  background: #fdf2ef;
  color: #8a3a29;
}

.cc-opt.no .tag {
  background: var(--bad);
  color: #fff;
}

.cc-fb {
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.7;
}

.cc-fb.ok {
  background: #eef7f1;
  color: #1e5738;
}

.cc-fb.no {
  background: #fdf2ef;
  color: #8a3a29;
}

.cc-fb b {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.cc-retry {
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
}

/* ===================================================================
   进度环徽标 / 等级 / 激励
   =================================================================== */
.stat-strip {
  padding: 13px 14px;
  margin-top: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.ss-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.lv-badge {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(140deg, #1a8574, #0f5c54);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.05;
}

.lv-badge .n {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.lv-body {
  flex: 1;
  min-width: 0;
}

.lv-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 5px;
}

.lv-line b {
  color: var(--primary);
  font-size: 12px;
}

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  background: #f1f0e8;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
}

.chip.on {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.bd {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px 8px;
  text-align: center;
}

.bd .ic {
  width: 30px;
  height: 30px;
  margin: 0 auto 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.bd .nm {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.bd .ds {
  font-size: 9.5px;
  color: var(--ink-3);
  margin-top: 3px;
  line-height: 1.4;
}

.bd.lock {
  opacity: 0.45;
}

.bd.lock .ic {
  background: #f0efe9;
  color: var(--ink-3);
}

/* 阅读进度条 */
.readbar {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
}

.topbar {
  position: sticky;
}

/* ---------- 账号与登录 ---------- */
.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 15px;
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.account-card.on {
  border-color: #cfe4df;
  background: linear-gradient(180deg, #f4fbf9, #ffffff);
}

.ac-av {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #f0efe9;
  color: var(--ink-3);
  font-size: 15px;
  font-weight: 800;
}

.ac-av.on {
  background: var(--primary);
  color: #fff;
}

.ac-t {
  flex: 1;
  min-width: 0;
  display: block;
}

.ac-t b {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.ac-t span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-out {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--ink-3);
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
}

.login-card {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px 18px;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.login-card > p {
  margin: 0 0 20px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.login-card .fl {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin: 14px 0 6px;
}

.login-card .fi {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfdfb;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
}

.login-card .fi:focus {
  border-color: var(--primary);
  background: #fff;
}

.login-card .or {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-3);
  margin: 16px 0 -4px;
}
