/* 统计页 v2 —— 孩子版：少数字、多图形、有解释 */
.hero-card .ovr-number { font-variant-numeric: tabular-nums; }
.ovr-number.lv-5 { color: #059669; } .ovr-number.lv-4 { color: #16A34A; }
.ovr-number.lv-3 { color: #1D4ED8; } .ovr-number.lv-2 { color: #D97706; } .ovr-number.lv-1 { color: #DC2626; }
.ovr-label b { font-weight: 700; }
.ovr-range { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.cred-wrap { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.cred-bar { width: 140px; height: 6px; border-radius: 6px; background: var(--fill); overflow: hidden; }
.cred-fill { height: 100%; background: linear-gradient(90deg, #93C5FD, #1D4ED8); border-radius: 6px; }
.cred-text { font-size: 12px; color: var(--ink-3); }

.metric-row2 { display: grid; grid-template-columns: 112px 1fr 34px; align-items: center; gap: 10px; margin: 10px 0; }
.metric-name2 { display: flex; flex-direction: column; line-height: 1.25; }
.metric-name2 b { font-size: 14px; color: var(--ink-1); }
.metric-name2 small { font-size: 11px; color: var(--ink-3); }

.recent-box { display: flex; flex-direction: column; gap: 6px; }
.trend-pill { align-self: flex-start; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.trend-up { background: rgba(5,150,105,.10); color: #047857; }
.trend-down { background: rgba(217,119,6,.12); color: #B45309; }
.trend-flat { background: var(--fill); color: var(--ink-2); }
.trend-detail { font-size: 12px; color: var(--ink-3); }

.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier-row { display: grid; grid-template-columns: 40px 1fr 30px 66px; align-items: center; gap: 8px; }
.tier-name { font-size: 13px; font-weight: 600; }
.tier-n { font-size: 11px; color: var(--ink-3); }
.tier-weak .metric-bar-fill { opacity: .35; }
.tier-weak .tier-n { color: #D97706; }

.explain { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.explain summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.explain ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.7; }

.kid-chart { padding-bottom: 14px; }
.chart-help { margin: 2px 4px 8px; font-size: 12px; color: var(--ink-2); line-height: 1.9; }
.lg { display: inline-block; vertical-align: middle; margin-right: 4px; }
.lg-line { width: 22px; height: 4px; border-radius: 4px; background: #1D4ED8; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: #A1A1AA; }
.lg-band { width: 20px; height: 10px; border-radius: 3px; background: rgba(29,78,216,.15); }
.svg-chart { position: relative; width: 100%; }
.svg-chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.gridline { stroke: rgba(0,0,0,.07); stroke-width: 1; }
.axis-label { font-size: 11px; fill: #8B8B93; }
.zone-label { font-size: 11px; fill: rgba(0,0,0,.28); font-weight: 600; }
.band { fill: rgba(29,78,216,.14); stroke: none; }
.level-line { fill: none; stroke: #1D4ED8; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.level-end { fill: #1D4ED8; stroke: #fff; stroke-width: 3; }
.level-end-label { font-size: 16px; font-weight: 800; fill: #1D4ED8; }
.day-dot { fill: #A1A1AA; opacity: .75; transition: .12s; }
.day-dot.st-dot-perfect { fill: #F59E0B; opacity: .95; }
.day-dot.st-dot-great { fill: #34C759; opacity: .9; }
.day-dot.st-dot-slip { fill: #F97316; opacity: .9; }
.day-dot.is-sel { stroke: #18181B; stroke-width: 2; opacity: 1; }
.sel-line { stroke: rgba(0,0,0,.35); stroke-dasharray: 3 3; opacity: 0; }
.sel-line.is-sel { opacity: 1; }
.hit { cursor: pointer; }
.bar-ok { fill: #34C759; } .bar-bad { fill: #FF6B5E; }
.bar-num { font-size: 10px; font-weight: 700; fill: #fff; }
.bar-star { font-size: 12px; }
.bar-g { opacity: .88; transition: .12s; }
.bar-g.is-sel { opacity: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.chart-tip { position: absolute; transform: translateX(-50%); background: #18181B; color: #fff; font-size: 12px; line-height: 1.55; padding: 8px 11px; border-radius: 10px; pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap; z-index: 5; box-shadow: var(--shadow-mid); }

.day-status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.day-status.st-perfect { background: rgba(245,158,11,.15); color: #B45309; }
.day-status.st-great { background: rgba(5,150,105,.12); color: #047857; }
.day-status.st-slip { background: rgba(249,115,22,.14); color: #C2410C; }
.day-card-overview .dim { color: var(--ink-3); font-size: 12px; }
.q-mark { font-weight: 800; }
.q-correct .q-mark { color: #059669; } .q-wrong .q-mark { color: #DC2626; }

@media (max-width: 640px) {
  .metric-row2 { grid-template-columns: 96px 1fr 30px; }
  .tier-row { grid-template-columns: 36px 1fr 28px 56px; }
  .chart-help { font-size: 11px; }
}

/* 顶部布局：加宽左侧卡片，能力条不再被挤成一个点 */
.stats-grid-top { grid-template-columns: minmax(300px, 360px) 1fr; }
.hero-card .metric-bar-wrap, .tier-row .metric-bar-wrap { height: 8px; border-radius: 6px; }
.hero-card .metric-bar-fill, .tier-row .metric-bar-fill { border-radius: 6px; }
.ovr-label { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.ovr-number { font-size: 72px; }
@media (max-width: 767px) {
  .stats-grid-top { grid-template-columns: 1fr; }
  .hero-card { display: block; }
  .hero-card .ability-ovr { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 16px; margin-bottom: 14px; }
}

/* 防止长公式把手机页面撑宽 */
.stats-grid-top > *, .stats-layout > *, .stats-panel, .detail-panel, .question-list { min-width: 0; }
.question-item { min-width: 0; }
.q-expr { min-width: 0; overflow-x: auto; overflow-y: hidden; }
.chart-help { overflow-wrap: anywhere; }
.app, #statsView { overflow-x: hidden; }
@media (max-width: 640px) {
  .metric-name2 small { white-space: normal; }
  .tier-row { grid-template-columns: 36px 1fr 28px; }
  .tier-n { display: none; }
  .day-card-header { flex-wrap: wrap; gap: 4px; }
  .day-card-overview { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* 图的缩放/翻看 */
.range-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 2px 4px 8px; }
.range-group, .pan-group { display: flex; gap: 6px; flex-wrap: wrap; }
.range-btn, .pan-older, .pan-newer { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--ink-2); cursor: pointer; }
.range-btn.on { background: #1D4ED8; border-color: #1D4ED8; color: #fff; font-weight: 600; }
.pan-older:disabled, .pan-newer:disabled { opacity: .35; cursor: default; }
.chart-period .hint { font-style: normal; color: var(--ink-3); }
.svg-chart { cursor: grab; user-select: none; -webkit-user-select: none; }
.svg-chart:active { cursor: grabbing; }

/* 目标分数线 */
.target-list { display: flex; flex-direction: column; gap: 10px; }
.target-row { display: grid; grid-template-columns: 92px 1fr 150px; align-items: center; gap: 10px; }
.target-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.target-name i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.target-name b { font-weight: 800; }
.target-state { font-size: 12px; color: var(--ink-2); }
.tg-ok { color: #047857; font-weight: 600; } .tg-edge { color: #0F766E; font-weight: 600; }
.tg-near { color: #B45309; font-weight: 600; } .tg-far { color: var(--ink-2); }
.target-label { font-size: 12px; font-weight: 700; }
.lg-target { width: 22px; height: 0; border-top: 3px dashed #EA580C; }
@media (max-width: 640px) {
  .target-row { grid-template-columns: 84px 1fr; }
  .target-state { grid-column: 1 / -1; margin-top: -4px; }
}

.ovr-sub { margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.form-line { fill: none; stroke: #10B981; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
.lg-form { width: 22px; height: 3px; border-radius: 3px; background: #10B981; }

/* 英语版补充 */
.topic-name { font-size: 13px; font-weight: 600; width: 168px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier-row.topic-row { grid-template-columns: 168px 1fr 30px 56px; }
.q-item-top .q-topic { min-width: 0; }
@media (max-width: 640px) {
  .tier-row.topic-row { grid-template-columns: 108px 1fr 28px; }
  .topic-name { width: 108px; font-size: 12px; }
  .tier-row .tier-n { display: none; }
  .tier-row:not(.topic-row) { grid-template-columns: 36px 1fr 28px; }
}
.topic-more { margin-top: 10px; }

/* ── 从超级数学基础样式补齐 ── */
.ability-metrics { display: flex; flex-direction: column; gap: 10px; }
.metric-bar-wrap {
  flex: 1;
  height: 3px;
  background: var(--fill);
  border-radius: 2px;
  overflow: hidden;
}
.metric-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--indigo);
  transition: width 0.6s cubic-bezier(0.25,1,0.5,1);
}
.metric-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-1);
  min-width: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.progress-panel {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.chart-panel {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 18px 20px 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.chart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.chart-period {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.2px;
}
.day-card-ops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  font-size: 11px;
  color: var(--ink-3);
}
.ability-ovr {
  text-align: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* 贝叶斯图例 */
.lg-gold { width: 22px; height: 4px; border-radius: 4px; background: #F59E0B; }
.lg-fan { width: 22px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, rgba(29,78,216,.14), rgba(29,78,216,.45)); }
.target-state { font-size: 12px; }

.target-row { grid-template-columns: 92px 1fr 200px; }
.target-state { line-height: 1.35; }
.target-state small { display: block; color: var(--ink-3); font-weight: 400; font-size: 11px; }
@media (max-width: 640px) { .target-row { grid-template-columns: 84px 1fr; } }

.target-name { line-height: 1.25; }
.tn-sub { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.target-row { grid-template-columns: 124px 1fr 230px; }
@media (max-width: 640px) { .target-row { grid-template-columns: 112px 1fr; } }
