/* =====================================================================
   v036 — Goal-driven Progress page (目标导向的 Progress)
   ---------------------------------------------------------------------
   旧 Progress 以「已刷题数 / 题库总量」为主指标 —— 分母永远填不满。
   新页面改问另一个问题：你离自己填的目标等级还差多远。
   挂在 #progressV2.goalProgress 上，只作用于本组件内部。
   ===================================================================== */

/* ---------- 容器 ---------- */
.goalProgress{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-bottom:18px;
}

/* ---------- 1. 目标带 ---------- */
.goalProgress .gpGoal{
  background:var(--c-surface);
  border:1px solid var(--c-line);
  border-radius:var(--r-lg);
  box-shadow:var(--s-sm);
  padding:18px 20px;
}
.goalProgress .gpGoalStats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  align-items:start;
}
.goalProgress .gpStat{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}
.goalProgress .gpStatLabel{
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--c-muted);
}
.goalProgress .gpStatValue{
  font-size:24px;
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.12;
  color:var(--c-ink);
}
.goalProgress .gpStat select,
.goalProgress .gpStat input[type=date]{
  width:100%;
  max-width:190px;
  min-height:40px;
  font-size:15px;
  font-weight:700;
  color:var(--c-ink);
}
.goalProgress .gpStat--week{gap:6px}
.goalProgress .gpWeekTrack{
  display:block;
  height:6px;
  border-radius:99px;
  background:var(--c-line-2);
  overflow:hidden;
}
.goalProgress .gpWeekTrack>i{
  display:block;
  height:100%;
  border-radius:99px;
  background:linear-gradient(90deg,var(--c-primary),#5a3df0);
}
.goalProgress .gpStatFoot{
  font-size:11px;
  font-weight:600;
  color:var(--c-muted);
}

/* ---------- 2. 当前水平 vs 目标 ---------- */
.goalProgress .gpLevel{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--c-line-2);
}
.goalProgress .gpLevelHead{
  display:flex;
  align-items:baseline;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.goalProgress .gpLevelNow{
  font-size:22px;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--c-ink);
}
.goalProgress .gpLevelNow--empty{
  font-size:15px;
  font-weight:700;
  color:var(--c-muted);
}
.goalProgress .gpLevelTo{
  font-size:13px;
  font-weight:700;
  color:var(--c-ink-3);
}
.goalProgress .gpLevelGap{
  margin-left:auto;
  padding:4px 11px;
  border-radius:var(--r-pill);
  background:var(--c-primary-50);
  color:var(--c-primary-2);
  font-size:11px;
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
  white-space:nowrap;
}
.goalProgress .gpBand{
  display:flex;
  gap:4px;
}
.goalProgress .gpBandSeg{
  flex:1;
  height:12px;
  border-radius:4px;
  background:var(--c-line-2);
  box-shadow:inset 0 0 0 1px var(--c-line);
}
.goalProgress .gpBandSeg--have{box-shadow:inset 0 0 0 1px #6ccfa6}
.goalProgress .gpBandSeg--have:nth-child(1){background:#d5f2e4}
.goalProgress .gpBandSeg--have:nth-child(2){background:#c4ecdb}
.goalProgress .gpBandSeg--have:nth-child(3){background:#b0e6d0}
.goalProgress .gpBandSeg--have:nth-child(4){background:#9adfc4}
.goalProgress .gpBandSeg--have:nth-child(5){background:#7fd6b8}
.goalProgress .gpBandSeg--have:nth-child(6){background:#61cbaa}
.goalProgress .gpBandSeg--have:nth-child(7){background:#3fbf9a}
.goalProgress .gpBandSeg--gapNear{background:#fdeec9;box-shadow:inset 0 0 0 1px #f0c869}
.goalProgress .gpBandSeg--gapHard{background:#fbdcda;box-shadow:inset 0 0 0 1px #ef9a95}
.goalProgress .gpBandSeg--above{background:#eef4ff;box-shadow:inset 0 0 0 1px #c7d7f7}
.goalProgress .gpBandSeg--unknown{background:#f4f6fa;box-shadow:inset 0 0 0 1px var(--c-line)}
.goalProgress .gpBandSeg--now{outline:2px solid var(--c-navy);outline-offset:1px}
.goalProgress .gpBandSeg--target{outline:1.5px dashed var(--c-muted-2);outline-offset:1px}
.goalProgress .gpBandLabels{
  display:flex;
  gap:4px;
  margin-top:6px;
}
.goalProgress .gpBandLabel{
  flex:1;
  text-align:center;
  font-size:11px;
  font-weight:700;
  color:var(--c-muted-2);
}
.goalProgress .gpBandLabel.is-now{color:var(--c-ink);font-weight:800}
.goalProgress .gpBandLabel.is-target{color:var(--c-primary-2)}
.goalProgress .gpLevelNote{
  margin:12px 0 0;
  font-size:12px;
  line-height:1.55;
  color:var(--c-muted);
}

/* ---------- 3. 三个桶 ---------- */
.goalProgress .gpBuckets{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.goalProgress .gpBucket{
  border-radius:var(--r-lg);
  border:1px solid transparent;
  padding:15px 17px;
}
.goalProgress .gpBucket--work{background:#fdecec;border-color:#f6cfcb}
.goalProgress .gpBucket--close{background:#fdf5e6;border-color:#f2ddb8}
.goalProgress .gpBucket--at{background:#e9f6ef;border-color:#bfe6d3}
.goalProgress .gpBucketLabel{
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.goalProgress .gpBucketNum{
  margin-top:2px;
  font-size:26px;
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.1;
}
.goalProgress .gpBucketHint{
  font-size:11px;
  font-weight:600;
  opacity:.78;
}
.goalProgress .gpBucket--work .gpBucketLabel,
.goalProgress .gpBucket--work .gpBucketHint{color:#a8322a}
.goalProgress .gpBucket--work .gpBucketNum{color:#7d231c}
.goalProgress .gpBucket--close .gpBucketLabel,
.goalProgress .gpBucket--close .gpBucketHint{color:#8f5a0d}
.goalProgress .gpBucket--close .gpBucketNum{color:#6d440a}
.goalProgress .gpBucket--at .gpBucketLabel,
.goalProgress .gpBucket--at .gpBucketHint{color:#186b47}
.goalProgress .gpBucket--at .gpBucketNum{color:#0f4f34}

/* ---------- 4. 通用卡片 ---------- */
.goalProgress .gpCard{
  background:var(--c-surface);
  border:1px solid var(--c-line);
  border-radius:var(--r-lg);
  box-shadow:var(--s-sm);
  padding:18px 20px;
}
.goalProgress .gpCardHead{margin-bottom:14px}
.goalProgress .gpCardHead h3{
  margin:0 0 3px;
  font-size:16px;
  font-weight:800;
  letter-spacing:-.01em;
  color:var(--c-ink);
}
.goalProgress .gpCardHead p{
  margin:0;
  font-size:12.5px;
  line-height:1.5;
  color:var(--c-muted);
}

/* ---------- 5. 知识点列表 ---------- */
.goalProgress .gpList{
  list-style:none;
  margin:0;
  padding:0;
}
.goalProgress .gpRow{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 6px;
}
.goalProgress .gpRow+.gpRow{border-top:1px solid var(--c-line-2)}
.goalProgress .gpDot{
  width:9px;
  height:9px;
  border-radius:50%;
  flex:none;
  background:var(--c-muted-2);
}
.goalProgress .gpRow--needsWork .gpDot{background:#e5484d}
.goalProgress .gpRow--close .gpDot{background:#f0a92e}
.goalProgress .gpRow--atTarget .gpDot{background:#22a06b}
.goalProgress .gpRow--noData .gpDot{background:var(--c-line)}
.goalProgress .gpRowMain{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.goalProgress .gpRowName{
  font-size:13.5px;
  font-weight:700;
  color:var(--c-ink);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.goalProgress .gpRowSub{
  font-size:11px;
  font-weight:600;
  color:var(--c-muted);
}
.goalProgress .gpRowValue{
  display:flex;
  align-items:center;
  gap:7px;
  flex:none;
}
.goalProgress .gpRowNow{
  font-size:12.5px;
  font-weight:800;
  color:var(--c-ink-2);
}
.goalProgress .gpRowArrow{font-size:12px;color:var(--c-muted-2)}
.goalProgress .gpRowTarget{
  font-size:12.5px;
  font-weight:800;
  color:var(--c-primary-2);
}
.goalProgress .gpRowMuted{
  font-size:11.5px;
  font-weight:600;
  color:var(--c-muted-2);
}
.goalProgress .gpRowBar{
  flex:none;
  width:86px;
  height:6px;
  border-radius:99px;
  background:var(--c-line-2);
  overflow:hidden;
}
.goalProgress .gpRowBar>i{
  display:block;
  height:100%;
  border-radius:99px;
  background:var(--c-muted-2);
}
.goalProgress .gpRow--needsWork .gpRowBar>i{background:#e5484d}
.goalProgress .gpRow--close .gpRowBar>i{background:#f0a92e}
.goalProgress .gpRow--atTarget .gpRowBar>i{background:#22a06b}

/* ---------- 6. 下一步练什么 ---------- */
.goalProgress .gpNextList{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.goalProgress .gpNextRow{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--c-line);
  border-radius:var(--r-md);
  background:var(--c-bg-2);
}
.goalProgress .gpNextNum{
  flex:none;
  width:24px;
  height:24px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--c-primary-50);
  color:var(--c-primary-2);
  font-size:12px;
  font-weight:800;
}
.goalProgress .gpNextMain{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.goalProgress .gpNextName{
  font-size:13.5px;
  font-weight:700;
  color:var(--c-ink);
}
.goalProgress .gpNextWhy{
  font-size:11px;
  font-weight:600;
  color:var(--c-muted);
}
.goalProgress .gpStartBtn{flex:none}

/* ---------- 7. 空态 / 提示 ---------- */
.goalProgress .gpEmpty{
  margin:0;
  padding:22px 18px;
  border:1px dashed var(--c-line);
  border-radius:var(--r-md);
  background:var(--c-bg-2);
  color:var(--c-muted);
  font-size:13px;
  line-height:1.6;
  text-align:center;
}
.goalProgress .gpMore{
  margin:12px 0 0;
  font-size:11.5px;
  color:var(--c-muted-2);
}

/* ---------- 8. 旧图表降级为附录 ---------- */
.progressAppendix>summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  gap:9px;
  padding:14px 18px;
  background:var(--c-surface);
  border:1px solid var(--c-line);
  border-radius:var(--r-lg);
  box-shadow:var(--s-sm);
  font-size:13px;
  font-weight:800;
  color:var(--c-ink-2);
}
.progressAppendix>summary::-webkit-details-marker{display:none}
.progressAppendix>summary::before{
  content:"▸";
  font-size:12px;
  color:var(--c-muted);
  transition:transform .15s;
}
.progressAppendix[open]>summary::before{transform:rotate(90deg)}
.progressAppendix>summary:hover{border-color:#cad5ea}
.progressAppendixBody{padding-top:14px}

/* ---------- 9. 响应式 ---------- */
@media(max-width:900px){
  .goalProgress .gpGoalStats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .goalProgress .gpBuckets{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:600px){
  .goalProgress .gpGoal{padding:15px}
  .goalProgress .gpStatValue{font-size:20px}
  .goalProgress .gpStat select,
  .goalProgress .gpStat input[type=date]{max-width:none}
  .goalProgress .gpRow{flex-wrap:wrap;row-gap:8px}
  .goalProgress .gpRowBar{width:100%;order:10}
  .goalProgress .gpRowValue{margin-left:auto}
  .goalProgress .gpNextRow{flex-wrap:wrap;row-gap:10px}
  .goalProgress .gpStartBtn{width:100%}
}
