/* ============================================================
   语文阅读理解提分训练营 —— 样式表
   ============================================================ */
:root {
  --red: #e4572e;
  --teal: #0f8b8d;
  --purple: #5b5f97;
  --plum: #8a4f7d;
  --green: #2a7f62;

  --ink: #1d2129;
  --ink-2: #4a5568;
  --ink-3: #86909c;
  --line: #e7e9ee;
  --bg: #f6f7fb;
  --card: #ffffff;
  --brand: #c0392b;
  --brand-2: #d35400;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -8px rgba(16, 24, 40, .10);
  --shadow-lg: 0 12px 40px -12px rgba(16, 24, 40, .22);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 顶部导航 ---------- */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; letter-spacing: -.2px;
  white-space: nowrap;
}
.logo .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: grid; place-items: center;
  font-size: 17px; font-family: "KaiTi", "STKaiti", serif;
  box-shadow: 0 4px 12px -4px rgba(192, 57, 43, .6);
}
.logo small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-3); letter-spacing: 0; }

nav.main { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
nav.main button {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  padding: 8px 13px; border-radius: 9px; transition: .16s;
  white-space: nowrap;
}
nav.main button:hover { background: #eef0f5; color: var(--ink); }
nav.main button.on { background: var(--ink); color: #fff; }

.burger { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff;
  border-radius: 9px; padding: 7px 11px; font-size: 17px; cursor: pointer; }

/* ---------- 通用 ---------- */
main { padding: 32px 0 80px; min-height: 60vh; }
.view { display: none; animation: fade .28s ease; }
.view.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; letter-spacing: -.2px; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }

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

.muted { color: var(--ink-3); font-size: 13.5px; }
.small { font-size: 13.5px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-size: 14.5px; font-weight: 600;
  padding: 9px 17px; border-radius: 10px; cursor: pointer;
  transition: .16s; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.brand { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; color: #fff; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.ghost { background: transparent; }

.pill {
  display: inline-block; padding: 2.5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .2px;
}
.pill.red { background: #fdecea; color: var(--red); }
.pill.teal { background: #e3f4f4; color: var(--teal); }
.pill.purple { background: #ecebf7; color: var(--purple); }
.pill.plum { background: #f7ecf4; color: var(--plum); }
.pill.green { background: #e6f4ee; color: var(--green); }
.pill.gray { background: #eef0f5; color: var(--ink-2); }
.pill.ok { background: #e8f7ee; color: var(--ok); }
.pill.warn { background: #fdf3e3; color: var(--warn); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(140deg, #1d2129 0%, #343a46 55%, #4a3230 100%);
  color: #fff; border-radius: 20px; padding: 42px 38px; position: relative; overflow: hidden;
}
.hero::after {
  content: "语"; position: absolute; right: -10px; bottom: -70px;
  font-family: "KaiTi", "STKaiti", serif; font-size: 260px; font-weight: 700;
  color: rgba(255, 255, 255, .045); line-height: 1; pointer-events: none;
}
.hero h1 { font-size: 32px; margin-bottom: 12px; position: relative; }
.hero p { color: rgba(255, 255, 255, .78); margin: 0 0 22px; max-width: 640px; font-size: 15.5px; position: relative; }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap; position: relative; margin-bottom: 24px; }
.hero .chips span {
  background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .16);
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
}
.hero .acts { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.hero .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.hero .btn.brand { background: linear-gradient(135deg, #e4572e, #d35400); border: 0; }

/* ---------- 统计条 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 14px; margin-top: 20px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 20px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }

/* ---------- 文体卡片 ---------- */
.genre-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; cursor: pointer; transition: .18s; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.genre-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.genre-card .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
/* ---------- 关卡 ---------- */
.lv-entry {
  margin-top: 18px; cursor: pointer;
  background: linear-gradient(135deg, #fffdf7 0%, #fff6e8 100%);
  border: 1px solid #f2e2c4; border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  transition: .18s;
}
.lv-entry:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #e8cf9f; }
.lv-entry-txt { flex: 1 1 420px; }
.lv-entry-btn {
  flex: 0 0 auto; background: linear-gradient(135deg, #f0b429, #e8940c);
  color: #fff; font-weight: 800; font-size: 15px; padding: 12px 24px;
  border-radius: 11px; white-space: nowrap;
  box-shadow: 0 6px 18px -6px rgba(232, 148, 12, .7);
}
.lv-entry-btn:hover { background: var(--ink); }

.act-row { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .act-row .btn:first-child { background: linear-gradient(135deg, #e4572e, #d35400); border: 0; }

.lv-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }

.lvcard {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; cursor: pointer; transition: .18s; box-shadow: var(--shadow);
  border-top: 4px solid var(--lvc);
}
.lvcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lvcard.locked { cursor: not-allowed; filter: grayscale(.55); opacity: .72; }
.lvcard.locked:hover { transform: none; box-shadow: var(--shadow); }
.lvcard.passed { background: linear-gradient(180deg, #fffdf6 0%, #fff 60%); }

.lv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.lv-no { font-size: 12.5px; font-weight: 800; color: var(--ink-3); letter-spacing: 1px; }
.lv-star { font-size: 15px; font-weight: 800; color: var(--lvc); letter-spacing: 1px; }
.lvcard h3 { margin: 0 0 5px; font-size: 19px; }
.lv-slogan { font-size: 13.5px; color: var(--ink-2); min-height: 40px; line-height: 1.55; }
.lv-meta {
  display: flex; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700;
  color: var(--ink-3); margin: 11px 0 13px; padding-top: 11px; border-top: 1px dashed var(--line);
}
.lv-prog-txt {
  display: flex; justify-content: space-between; font-size: 12.5px;
  font-weight: 700; color: var(--ink-3); margin-top: 7px;
}
.lv-pct { font-weight: 800; }
.lv-stars { font-size: 17px; color: #f0b429; letter-spacing: 3px; margin-top: 10px; }
.lv-badge {
  margin-top: 12px; padding: 7px 12px; border-radius: 9px;
  font-size: 13px; font-weight: 700; text-align: center;
}
.lv-badge.ok { background: #e8f7ee; color: var(--ok); }
.lv-badge.bad { background: #fdecea; color: var(--bad); }
.lv-badge.go { background: var(--ink); color: #fff; }
.lv-card-link:hover .lv-badge.go { background: var(--brand); }

.lv-lock {
  margin-top: 12px; padding: 16px 14px; border-radius: 9px;
  background: #f7f8fa; border: 1px dashed #d5dae3;
  text-align: center; font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}

/* 关卡的分题所属体裁标签 */
.lvcard .bar { display: none; }

.genre-card .ic { font-size: 26px; }
.genre-card h3 { margin: 8px 0 4px; font-size: 16.5px; }
.genre-card .pill { margin-top: 8px; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #fafbfd; font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
tbody tr:hover { background: #fafbfd; }
td.k { font-weight: 700; white-space: nowrap; color: var(--brand); }

/* ---------- 折叠 ---------- */
details {
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
  padding: 0; margin-bottom: 10px; overflow: hidden;
}
details > summary {
  cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: 15px;
  list-style: none; display: flex; align-items: center; gap: 9px;
  transition: .15s;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: "▸"; color: var(--ink-3); font-size: 12px; transition: .18s; flex: 0 0 auto;
}
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { background: #fafbfd; }
details .body { padding: 2px 16px 16px; border-top: 1px solid var(--line); }

/* ---------- 方法论 ---------- */
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps-list li {
  counter-increment: s; position: relative; padding: 0 0 16px 40px;
  border-left: 2px solid var(--line); margin-left: 12px;
}
.steps-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps-list li::before {
  content: counter(s); position: absolute; left: -14px; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
}
.steps-list li b { display: block; margin-bottom: 2px; }

.qtype { border-left: 3px solid var(--line); padding-left: 16px; margin-bottom: 20px; }
.qtype .fml {
  background: #fdf6f3; border: 1px dashed #f0c9bb; color: #a8412a;
  padding: 9px 13px; border-radius: 9px; font-size: 14.5px; font-weight: 700;
  margin: 8px 0 12px;
}
.qtype ul.tips { margin: 0; padding-left: 20px; }
.qtype ul.tips li { margin-bottom: 6px; font-size: 14.5px; }

.eg {
  background: #f7f9fb; border: 1px solid #e4e9f0; border-radius: 11px;
  padding: 14px 16px; margin-top: 12px; font-size: 14.5px;
}
.eg .lbl { font-weight: 800; font-size: 12.5px; color: var(--ink-3); letter-spacing: .5px; }
.eg .note {
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed #d6dde7;
  color: var(--warn); font-size: 13.5px; font-weight: 600;
}

/* ---------- 阅读训练 ---------- */
.pbox {
  background: #fdfcf8; border: 1px solid #ece6d8; border-radius: var(--radius);
  padding: 24px 26px; font-family: "Songti SC", "SimSun", "Source Han Serif SC", Georgia, serif;
  font-size: 16px; line-height: 2.05; white-space: pre-wrap; color: #2b2b2b;
}
.pbox .ptitle {
  font-family: inherit; font-size: 19px; font-weight: 800; text-align: center;
  margin-bottom: 18px; letter-spacing: .5px;
}
.qitem {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 17px 19px; margin-bottom: 14px;
}
.qitem .qh { display: flex; gap: 9px; align-items: flex-start; font-weight: 700; font-size: 15.5px; }
.qitem .qno {
  flex: 0 0 auto; width: 23px; height: 23px; border-radius: 7px; background: var(--ink);
  color: #fff; display: grid; place-items: center; font-size: 12.5px; margin-top: 3px;
}
.qitem .qtext { white-space: pre-wrap; }
.qitem textarea {
  width: 100%; margin-top: 11px; min-height: 96px; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
  font: inherit; font-size: 14.5px; line-height: 1.8; background: #fcfdfe;
}
.qitem textarea:focus { outline: 2px solid #cdd7e5; outline-offset: 0; background: #fff; }
.qitem .foot { display: flex; align-items: center; gap: 9px; margin-top: 11px; flex-wrap: wrap; }

.ans {
  margin-top: 13px; border-top: 1px dashed var(--line); padding-top: 13px;
  animation: fade .25s ease;
}
.ans h4 { font-size: 13.5px; color: var(--ink-3); letter-spacing: .4px; margin: 0 0 7px; }
.pts { list-style: none; padding: 0; margin: 0 0 12px; }
.pts li {
  position: relative; padding-left: 26px; margin-bottom: 7px; font-size: 14.5px;
  cursor: pointer; border-radius: 8px; transition: .15s;
}
.pts li::before {
  content: "○"; position: absolute; left: 4px; top: 0; font-size: 14px; color: var(--ink-3);
  transition: .15s;
}
.pts li.hit { background: #eaf8ef; }
.pts li.hit::before { content: "●"; color: var(--ok); }
.scorerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.score-out { font-weight: 800; font-size: 15px; }

/* ---------- 错题本 ---------- */
.wrong-item {
  border-left: 4px solid var(--bad); background: #fff; border-radius: 11px;
  padding: 15px 18px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.wrong-item .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.wrong-item .qq { font-weight: 700; font-size: 14.5px; white-space: pre-wrap; margin-bottom: 9px; }
.wrong-item .mine {
  background: #fef3f2; border-radius: 8px; padding: 9px 12px; font-size: 14px;
  color: #8c2f22; white-space: pre-wrap; margin-bottom: 8px;
}
.wrong-item .refs {
  background: #f0f9f4; border-radius: 8px; padding: 9px 12px; font-size: 14px;
  color: #1a6349; white-space: pre-wrap;
}

.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty .big { font-size: 42px; margin-bottom: 10px; }

/* ---------- 计划 ---------- */
.week {
  display: grid; grid-template-columns: 128px 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; margin-bottom: 13px; box-shadow: var(--shadow);
}
.week .side {
  background: #fafbfd; border-right: 1px solid var(--line);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start;
}
.week .side b { font-size: 15px; }
.week .body { padding: 18px 20px; }
.week .body h3 { margin-bottom: 4px; font-size: 16px; }
.week .body .goal { font-size: 14px; color: var(--ink-2); margin-bottom: 13px; }
.todo { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.todo:first-of-type { border-top: 0; }
.todo input { margin-top: 5px; width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; flex: 0 0 auto; }
.todo label { font-size: 14.5px; cursor: pointer; }
.todo.done label { text-decoration: line-through; color: var(--ink-3); }

/* ---------- 测评 ---------- */
.quizq { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 19px 21px; margin-bottom: 13px; }
.quizq .qt { font-weight: 700; margin-bottom: 11px; font-size: 15.5px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 7px;
  cursor: pointer; transition: .14s; font-size: 14.5px;
}
.opt:hover { background: #fafbfd; border-color: #d3dae5; }
.opt.sel { background: #fdf2ee; border-color: #f0b9a4; }
.opt .rd {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 50%; border: 2px solid #c4ccd8;
  margin-top: 4px; transition: .14s;
}
.opt.sel .rd { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px #fff; }

.result-hero { text-align: center; padding: 26px 20px; }
.result-hero .num { font-size: 54px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.result-hero .lvl { font-size: 19px; font-weight: 800; margin: 8px 0 6px; }
.bar-outer { height: 10px; background: #eef0f5; border-radius: 999px; overflow: hidden; margin: 16px 0; }
.bar-inner { height: 100%; border-radius: 999px; transition: width .8s cubic-bezier(.2,.8,.2,1); }

.radar-legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.radar-legend span { display: flex; align-items: center; gap: 6px; }
.radar-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- 视图头 ---------- */
.vhead { margin-bottom: 22px; }
.vhead .eyebrow { font-size: 12.5px; font-weight: 800; color: var(--brand); letter-spacing: 1.4px; margin-bottom: 6px; }
.vhead h1 { margin-bottom: 7px; }
.vhead p { color: var(--ink-2); margin: 0; font-size: 15px; max-width: 720px; }

/* ---------- Tab ---------- */
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; font: inherit; font-size: 14.5px; font-weight: 700;
  color: var(--ink-3); padding: 9px 15px; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: .15s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }

.sub { display: none; }
.sub.on { display: block; animation: fade .25s ease; }

/* ---------- 提示框 ---------- */
.note {
  border-left: 3px solid var(--warn); background: #fffbf3;
  padding: 13px 16px; border-radius: 9px; font-size: 14px; color: #7c4a03;
}
.note b { color: #7c4a03; }
.note.tip { border-left-color: var(--teal); background: #f2fbfb; color: #0b5c5e; }
.note.tip b { color: #0b5c5e; }

.marker { background: linear-gradient(transparent 62%, #ffe08a 62%); font-weight: 600; }
.hl { background: #eef4ff; border-radius: 4px; padding: 0 4px; font-weight: 700; color: #2f5aa8; }

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line); padding: 26px 0 40px;
  color: var(--ink-3); font-size: 13px; text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .g5 { grid-template-columns: repeat(3, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .lv-map { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .top-inner { padding: 10px 16px; }
  nav.main {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 14px;
    flex-direction: column; box-shadow: var(--shadow-lg);
  }
  nav.main.open { display: flex; }
  nav.main button { text-align: left; }
  .burger { display: block; }
  .hero { padding: 30px 22px; border-radius: 16px; }
  .hero h1 { font-size: 25px; }
  .hero::after { font-size: 170px; bottom: -46px; }
  .g2, .g3, .g5 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .lv-map { grid-template-columns: 1fr; }
  .lv-entry { padding: 18px; }
  .lv-entry-btn { width: 100%; text-align: center; }
  .week { grid-template-columns: 1fr; }
  .week .side { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .pbox { padding: 18px 16px; font-size: 15px; line-height: 1.95; }
  h1 { font-size: 23px; }
  .wrap { padding: 0 15px; }
}

@media print {
  header.top, footer, .btn, .tabs, .burger { display: none !important; }
  .view { display: block !important; }
  body { background: #fff; }
}
