/* =========================================================
   student.css — 学员端视觉补丁层（2026-11-18 @Doubao）
   作用域：仅 body.fe-gaokao.stu-page 下的 .stu-* 类，不覆盖任何全局组件。
   为什么单独一层：style/tokens/common/pro/gaokao 五层是全站共用的热区，
   学员端视觉调整写进这里可以把冲突面限制在"新增类"上。

   本层修的三个实证问题（均有截图/接口证据）：
   ① index.html 首屏 background 用了 --primary-600 / --primary-400 等 **未定义变量**，
      linear-gradient 整条声明在计算期失效 → 白字落在浅色底上，几乎不可读；
   ② 能力图在 measured=false 时仍按接口返回的 50 分画满五边形 → 学员误以为"能力中等"；
   ③ 空态用 30px 上下留白撑开整卡，页面出现大片空白（practice 趋势卡约 500px 高）。
   ========================================================= */

/* ---------------- 1. 首屏欢迎卡 ---------------- */
.stu-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 26px 30px 24px;
  margin-bottom: 20px;
  color: #fff;
  background:
    radial-gradient(900px 260px at 90% -40%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 62%),
    linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 58%, var(--brand-500) 100%);
}
.stu-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 18px rgba(255, 255, 255, .06), 0 0 0 52px rgba(255, 255, 255, .04);
  pointer-events: none;
}
.stu-hero__inner { position: relative; z-index: 1; }
.stu-hero__eyebrow {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .66;
  margin-bottom: 8px;
}
.stu-hero__name { font-size: 26px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }
.stu-hero__name span { font-weight: 700; }
.stu-hero__hint { font-size: 13px; opacity: .82; margin-bottom: 22px; }
.stu-hero__stats { display: flex; flex-wrap: wrap; }
.stu-stat { padding-right: 32px; margin-right: 32px; border-right: 1px solid rgba(255, 255, 255, .16); }
.stu-stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.stu-stat__value {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stu-stat__value small { font-size: 12px; font-weight: 600; margin-left: 2px; opacity: .8; }
.stu-stat__value.is-empty { opacity: .5; }
.stu-stat__label { font-size: 12px; opacity: .74; margin-top: 5px; }

/* ---------------- 2. 快捷入口 ---------------- */
.stu-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stu-quick__item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.stu-quick__item:hover {
  transform: translateY(-2px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-2);
  text-decoration: none;
  color: inherit;
}
.stu-quick__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-100);
  color: var(--brand-500);
}
.stu-quick__icon svg { width: 19px; height: 19px; }
.stu-quick__title { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.stu-quick__desc { display: block; font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.45; }

/* ---------------- 2.5 卡片节奏 ---------------- */
.stu-page .card { margin-bottom: 20px; }
.stu-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.stu-two-col .card { margin-bottom: 0; }
@media (max-width: 860px) { .stu-two-col { grid-template-columns: 1fr; gap: 14px; } }

/* ---------------- 3. 能力条 ---------------- */
.stu-bars { display: flex; align-items: flex-end; gap: 18px; padding: 6px 4px 0; }
.stu-bar { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.stu-bar__value {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--text-2);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.stu-bar__track { height: 132px; display: flex; align-items: flex-end; }
.stu-bar__fill {
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  min-height: 3px;
  height: 0;
  transition: height .7s cubic-bezier(.22, .61, .36, 1);
}
.stu-bar__label {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 9px;
  white-space: nowrap;
}
.stu-bar.is-1 .stu-bar__fill { background: linear-gradient(180deg, var(--brand-300), var(--brand-500)); }
.stu-bar.is-2 .stu-bar__fill { background: linear-gradient(180deg, #4aa3b8, var(--info)); }
.stu-bar.is-3 .stu-bar__fill { background: linear-gradient(180deg, #3f9f6a, var(--success)); }
.stu-bar.is-4 .stu-bar__fill { background: linear-gradient(180deg, #d8a359, var(--warning)); }
.stu-bar.is-5 .stu-bar__fill { background: linear-gradient(180deg, #8fb4e3, var(--brand-700)); }

/* ---------------- 4. 统一空态 ---------------- */
.stu-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  color: var(--text-3);
}
.stu-empty--compact { padding: 18px 16px; }
.stu-empty__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-1);
  color: var(--brand-500);
  margin-bottom: 10px;
}
.stu-empty__icon svg { width: 20px; height: 20px; }
.stu-empty__title { font-size: 13px; font-weight: 500; color: var(--text-2); }
.stu-empty__hint { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.stu-empty__action { margin-top: 12px; }

/* ---------------- 5. 列表行（首页三卡共用） ---------------- */
.stu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.stu-row:last-child { border-bottom: 0; }
.stu-row__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--bg-1);
  color: var(--brand-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stu-row__icon svg { width: 16px; height: 16px; }
.stu-row__main { flex: 1; min-width: 0; }
.stu-row__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stu-row__meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.stu-row__tail { flex: 0 0 auto; }

/* ---------------- 6. 特色学习小工具 ---------------- */
.stu-tools { margin: 4px 0 18px; }
.stu-tools__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 10px;
}
.stu-tools__title { font-size: 18px; font-weight: 700; color: var(--text-1,#0f172a); }
.stu-tools__sub { font-size: 12.5px; color: var(--text-3,#64748b); margin-top: 4px; }
.stu-tools__meta {
  font-size: 11px;
  color: var(--text-3,#94a3b8);
  white-space: nowrap;
  padding-bottom: 2px;
}
.stu-tools__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stu-tool {
  --tool: #2563eb;
  --tool-bg: #eff6ff;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--gray-100,#e8edf5);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stu-tool::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tool);
  opacity: .85;
}
.stu-tool:hover {
  transform: translateY(-2px);
  border-color: var(--tool);
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}
.stu-tool__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--tool-bg);
  color: var(--tool);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stu-tool__icon svg { width: 19px; height: 19px; }
.stu-tool__body { flex: 1; min-width: 0; }
.stu-tool__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 6px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-1,#0f172a);
}
.stu-tool__badge {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--tool);
  background: var(--tool-bg);
  white-space: nowrap;
}
.stu-tool__desc {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-3,#64748b);
}
.stu-tool__arrow {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 13px;
  color: var(--tool);
  opacity: .45;
  transition: opacity .18s ease, transform .18s ease;
}
.stu-tool:hover .stu-tool__arrow { opacity: .9; transform: translateX(2px); }

/* EJU 指南入口 */
.stu-guide {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #d9e6fb;
  border-radius: 12px;
  background: linear-gradient(90deg, #f2f7ff 0%, #fff 75%);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.stu-guide:hover {
  border-color: #a9c7f5;
  box-shadow: 0 8px 18px rgba(37,99,235,.08);
  transform: translateY(-1px);
}
.stu-guide__badge {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 6px;
  background: #1d4ed8;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
.stu-guide__body { flex: 1; min-width: 0; }
.stu-guide__body strong { display: block; font-size: 14px; color: var(--text-1,#0f172a); }
.stu-guide__body span { display: block; margin-top: 3px; font-size: 12px; color: var(--text-3,#64748b); }
.stu-guide__cta { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: #1d4ed8; white-space: nowrap; }

/* ---------------- 7. 移动端 ---------------- */
@media (max-width: 860px) {
  .stu-hero { padding: 20px; }
  .stu-hero__name { font-size: 21px; }
  .stu-hero__hint { margin-bottom: 18px; }
  .stu-hero__stats { row-gap: 14px; }
  .stu-stat { flex: 1; min-width: 0; border-right: 0; margin-right: 0; padding-right: 0; }
  .stu-stat__value { font-size: 22px; }
  .stu-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stu-quick__item { padding: 13px 14px; }
  .stu-quick__desc { display: none; }
  .stu-tools__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stu-tools__meta { display: none; }
  .stu-tool { padding: 13px 14px; gap: 10px; }
  .stu-tool__icon { width: 36px; height: 36px; border-radius: 10px; }
  .stu-tool__desc { font-size: 11.5px; }
  .stu-bars { gap: 9px; }
  .stu-bar__track { height: 108px; }
  .stu-bar__label { font-size: 11px; }
}

@media (max-width: 520px) {
  .stu-tools__head { align-items: flex-start; }
  .stu-tools__title { font-size: 16px; }
  .stu-tools__sub { font-size: 11.5px; }
  .stu-tools__grid { gap: 8px; }
  .stu-tool { padding: 12px; gap: 8px; }
  .stu-tool__icon { width: 32px; height: 32px; }
  .stu-tool__icon svg { width: 17px; height: 17px; }
  .stu-tool__title { font-size: 13px; }
  .stu-tool__badge { display: none; }
  .stu-tool__desc { font-size: 11px; }
  .stu-guide { padding: 12px; gap: 10px; }
  .stu-guide__badge { display: none; }
  .stu-guide__body strong { font-size: 13px; }
  .stu-guide__body span { font-size: 11px; }
  .stu-guide__cta { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .stu-bar__fill, .stu-quick__item { transition: none; }
}
