/* 备考站样式 · 浅色学习系 */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1c2333;
  --ink2: #5a6478;
  --muted: #8b93a7;
  --line: #e4e8f2;
  --accent: #3565e0;
  --accent2: #eef3fe;
  --green: #1d9e74;
  --green-bg: #e9f7f1;
  --amber: #b97a12;
  --amber-bg: #fdf5e5;
  --red: #d0453e;
  --red-bg: #fdeeed;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  line-height: 1.65; font-size: 15px;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 18px; }
a { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 10px; }
.brand { font-weight: 800; font-size: 17px; color: var(--ink); white-space: nowrap; }
.nav { display: flex; gap: 4px; overflow-x: auto; }
.nav a {
  padding: 7px 12px; border-radius: 9px; color: var(--ink2);
  font-size: 14px; white-space: nowrap;
}
.nav a:hover { background: var(--accent2); }
.nav a.active { background: var(--accent); color: #fff; font-weight: 600; }

/* 布局块 */
main { padding: 26px 0 40px; }
.hero { margin-bottom: 22px; }
.hero h1 { font-size: 26px; margin-bottom: 6px; }
.hero .sub { color: var(--ink2); }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
  .grid.c2, .grid.c3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 21px; }
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.card h2 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3 { font-size: 15px; margin: 14px 0 8px; }

/* 倒计时 */
.count-hero { text-align: center; padding: 30px 20px 24px; }
.count-num { font-size: 58px; font-weight: 800; color: var(--accent); letter-spacing: 1px; line-height: 1.1; }
.count-label { color: var(--ink2); margin-top: 2px; }
.count-warn { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--amber); background: var(--amber-bg); border-radius: 20px; padding: 3px 12px; }

/* 环形 */
.ring { position: relative; margin: 0 auto; }
.ring-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: var(--ink);
}

/* 标签 */
.tag {
  display: inline-block; font-size: 12px; border-radius: 20px;
  padding: 2px 10px; margin-right: 6px; vertical-align: 1px;
}
.tag.blue { color: var(--accent); background: var(--accent2); }
.tag.green { color: var(--green); background: var(--green-bg); }
.tag.amber { color: var(--amber); background: var(--amber-bg); }
.tag.red { color: var(--red); background: var(--red-bg); }

/* 进度条 */
.bar { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 8px 0 4px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #5b86f0, var(--accent)); border-radius: 6px; transition: width .3s; }
.bar.green > i { background: linear-gradient(90deg, #35c396, var(--green)); }

/* 清单勾选 */
.check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.check:hover { background: var(--accent2); }
.check input { display: none; }
.check .box {
  flex: 0 0 auto; width: 19px; height: 19px; margin-top: 3px;
  border: 2px solid #c4ccdd; border-radius: 6px; position: relative; transition: all .15s;
}
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box::after {
  content: "✓"; color: #fff; font-size: 13px; font-weight: 700;
  position: absolute; top: -2px; left: 2.5px;
}
.check .txt { flex: 1; }
.check.is-done .txt { color: var(--muted); text-decoration: line-through; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink2); font-weight: 600; font-size: 13px; background: #fafbfe; }
tr:last-child td { border-bottom: none; }

/* 时间线（阶段） */
.phase { border-left: 3px solid var(--accent); padding: 2px 0 18px 16px; margin-left: 6px; position: relative; }
.phase::before {
  content: ""; position: absolute; left: -8.5px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
}
.phase h3 { margin-top: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.phase .meta { color: var(--ink2); font-size: 13px; margin-bottom: 8px; }
.phase .block { margin: 8px 0; font-size: 14px; }
.phase .block b { color: var(--ink); }

/* 题型卡 */
.qtype { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fbfcff; }
.qtype h3 { margin: 0 0 4px; font-size: 15px; }
.qtype .score { color: var(--accent); font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.qtype p { font-size: 13.5px; color: var(--ink2); }

/* 周计划 */
.week-row { display: grid; grid-template-columns: 86px 1fr 1fr; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }
.week-row:last-child { border-bottom: none; }
.week-row .wn { font-weight: 700; color: var(--accent); }
.week-row .wn small { display: block; color: var(--muted); font-weight: 400; }
.week-row.current { background: var(--accent2); border-radius: 10px; border-bottom-color: transparent; }
@media (max-width: 760px) {
  .week-row { grid-template-columns: 70px 1fr; }
  .week-row > div:last-child { grid-column: 2; margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }
}

/* 模式卡 */
.mode { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); background: #fff; }
.mode h3 { margin: 0 0 2px; font-size: 15px; }
.mode .tagline { font-size: 12.5px; margin-bottom: 8px; }
.mode p { font-size: 14px; color: var(--ink2); }
.mode.amber { border-top: 3px solid #eab54e; }
.mode.blue  { border-top: 3px solid var(--accent); }
.mode.green { border-top: 3px solid var(--green); }

/* 日计划表 */
table.plan td:first-child { white-space: nowrap; color: var(--ink2); font-size: 13px; width: 92px; }

/* 追踪表单 */
.formrow { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.formrow label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink2); }
.formrow input, .formrow select, .formrow textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); min-width: 0;
}
.formrow input:focus, .formrow select:focus, .formrow textarea:focus { outline: 2px solid var(--accent2); border-color: var(--accent); }
.btn {
  display: inline-block; border: none; cursor: pointer; font: inherit;
  background: var(--accent); color: #fff; font-weight: 600;
  padding: 9px 18px; border-radius: 10px; align-self: flex-end;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: #fff; color: var(--ink2); border: 1px solid var(--line); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 页脚 */
.footer { border-top: 1px solid var(--line); padding: 20px 0 30px; color: var(--muted); font-size: 13px; background: #fff; }
.footer p { margin: 2px 0; }

/* 打印 */
@media print { .topbar, .footer, .btn { display: none; } body { background: #fff; } .card { border: none; padding: 0; } }

/* ===== v2 新组件 ===== */
/* 时间档选择 */
.seg { display: flex; gap: 10px; }
.seg button {
  flex: 1; font: inherit; cursor: pointer; padding: 14px 8px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
  font-weight: 700; color: var(--ink2); transition: all .15s; line-height: 1.4;
}
.seg button small { font-weight: 400; color: var(--muted); }
.seg button.active { border-color: var(--accent); background: var(--accent2); color: var(--accent); }
.seg button.active small { color: var(--accent); }

/* 词条 */
.word-row { display: flex; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line); }
.word-row:last-child { border-bottom: none; }
.say {
  flex: 0 0 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--accent2); cursor: pointer; font-size: 16px; line-height: 1;
  transition: transform .1s;
}
.say:active { transform: scale(.9); }
.w-main { flex: 1; }
.w-word { font-weight: 700; font-size: 16px; }
.w-info { color: var(--ink2); font-size: 13.5px; }
.w-info .pos { color: var(--accent); font-weight: 600; }
.w-mn { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* 小测 */
.quiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.qtext { font-size: 16.5px; font-weight: 600; margin: 6px 0 14px; line-height: 1.6; }
.opts { display: grid; gap: 10px; }
.opt {
  text-align: left; font: inherit; padding: 12px 14px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 11px; background: #fbfcff;
  transition: all .15s; line-height: 1.5;
}
.opt:hover:enabled { border-color: var(--accent); background: var(--accent2); }
.opt:disabled { cursor: default; opacity: .85; }
.opt.right { border-color: var(--green); background: var(--green-bg); opacity: 1; }
.opt.wrong { border-color: var(--red); background: var(--red-bg); opacity: 1; }
.qexp { margin-top: 14px; padding: 12px 14px; background: #fafbfe; border-radius: 10px; font-size: 13.5px; color: var(--ink2); line-height: 1.7; }
.quiz-done { text-align: center; padding: 26px 10px; }

/* 复习队列 / 错题列表 */
.due-item { padding: 8px 6px; border-bottom: 1px dashed var(--line); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.due-item:last-child { border-bottom: none; }

/* 要点卡 */
.memcard { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 10px; overflow: hidden; background: #fbfcff; }
.memcard summary {
  padding: 11px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
  list-style: none; position: relative; padding-right: 34px;
}
.memcard summary::after { content: "▸"; position: absolute; right: 14px; transition: transform .15s; color: var(--muted); }
.memcard[open] summary::after { transform: rotate(90deg); }
.memcard summary:hover { background: var(--accent2); }
.membody { padding: 0 14px 12px; font-size: 14px; line-height: 1.7; }

/* 词根卡 */
.root-card h2 { flex-wrap: wrap; }
.root-bad { background: var(--accent2); color: var(--accent); border-radius: 8px; padding: 3px 10px; font-size: 15px; }
.linklike { background: none; border: none; font: inherit; color: var(--accent); cursor: pointer; padding: 0; }
.linklike:hover { text-decoration: underline; }

/* 移动端细节 */
@media (max-width: 760px) {
  .seg { flex-direction: column; }
  .qtext { font-size: 15.5px; }
}
