/* home.css — 学习首页专属样式（2026-11-23 Amber 逐页优化第 2 轮：学习首页）
   全部限定在 .hp（首页外层，views.js home）或 .spot（首页分步高亮引导，home.js tour）之内；
   其他页面（学科页、复习顺序、报告等共用 .task / .subj / .hero 的地方）不受影响。
   学科主题色由 views.js 写进 --c（主色）/ --sc（浅底）/ --bc（边框）。 */

/* ── 顶部欢迎横幅（2026-11-23 Amber 参考图）：左侧标题前竖条；右半部浅紫弧形底；右侧矢量插画（书本 + 数据面板 + 勾选徽章），任意分辨率清晰 ── */
.hp .hero--hp { min-height: 176px; padding: 30px 40px; gap: 24px; border-radius: 24px;
  background: linear-gradient(110deg, #f7f5ff 0%, #f3f0ff 48%, #efebff 100%);
  border: 1px solid #e7e3fb; box-shadow: 0 12px 32px rgba(96, 82, 220, .07); }
.hp .hero--hp::before { content: ""; position: absolute; top: -45%; bottom: -45%; right: -12%; width: 58%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(214, 206, 255, .55) 0%, rgba(226, 220, 255, .38) 62%, rgba(236, 232, 255, 0) 100%); }
.hp .hero--hp::after { content: ""; position: absolute; top: -60%; bottom: -60%; left: 52%; width: 70%; border-radius: 50%; pointer-events: none;
  border-left: 1px solid rgba(255, 255, 255, .85); background: linear-gradient(90deg, rgba(236, 232, 255, .55), rgba(236, 232, 255, 0) 40%); }
.hp .hero--hp > * { position: relative; z-index: 1; }
.hp .hero--hp h1 { position: relative; padding-left: 20px; font-size: 32px; font-weight: 800; letter-spacing: .03em; color: #22234a; line-height: 1.25; }
.hp .hero--hp h1::before { content: ""; position: absolute; left: 0; top: .14em; bottom: .14em; width: 5px; border-radius: 3px; background: linear-gradient(180deg, #9a8bfa 0%, #6a52ec 100%); }
.hp .hero--hp p { margin-top: 12px; padding-left: 20px; font-size: 16px; color: #4d5170; max-width: 600px; letter-spacing: .01em; }
.hp .hp__art { flex: none; width: 262px; height: 183px; margin: -24px -4px -26px 0; display: flex; align-items: center; justify-content: center; }
.hp .hp__svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* ── 今日任务 ── */
.hp .today .card__h h2 { font-size: 18px; font-weight: 750; }
/* 今日任务：去掉了说明提示框（只在五项都完成时出现完成提示）；五项任务在卡片内均匀排开，左右两列等高、不留大段空白 */
.hp .today { display: flex; flex-direction: column; }
.hp .today .card__h { margin-bottom: 12px; }
.hp #task-list { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; }
.hp #task-list .task.ht { margin-bottom: 0; }
.hp #task-list.ht-fill .task.ht { flex: 1 1 auto; }   /* 4 项以上时卡片平分剩余高度（服务端仍只给 3 项时不拉伸，避免卡片过高） */
.hp .today__tip--done { margin-bottom: 10px; }
/* 2026-11-23 Amber：任务卡按参考图重做 —— 左侧图标方块 + 细分隔线；标题行 学科胶囊 + 知识点 + ✦优先推荐；
   芯片带小图标、竖线分隔（换行时自动去掉竖线，见 home.js fitSeps）；「为什么推荐？ ›」用学科色；「开始学习 →」加大 */
.hp .g-home2 { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }   /* 任务卡三个芯片在常见 PC 宽度下放一行（原 1.42 : 1）；窄屏仍按 styles.css 改单列 */
@media (max-width: 960px) { .hp .g-home2 { grid-template-columns: minmax(0, 1fr); } }   /* 与 styles.css 同一断点 */
.hp .ht__b { gap: 8px; }
.hp .task.ht { position: relative; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px 14px 14px; border-radius: 20px; margin-bottom: 10px;
  border: 1px solid color-mix(in srgb, var(--c) 20%, #fff); background: linear-gradient(100deg, color-mix(in srgb, var(--c) 5%, #fff) 0%, #fff 72%);
  box-shadow: 0 6px 18px rgba(60, 50, 150, .045); transition: box-shadow .15s, border-color .15s; }
.hp .task.ht:hover { box-shadow: 0 10px 26px rgba(60, 50, 150, .09); border-color: color-mix(in srgb, var(--c) 45%, #fff); }
.hp .task.ht.is-sel { border-color: color-mix(in srgb, var(--c) 58%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent), 0 10px 26px color-mix(in srgb, var(--c) 10%, transparent);
  background: linear-gradient(100deg, color-mix(in srgb, var(--c) 9%, #fff) 0%, #fff 78%); }
.hp .task.ht.is-done { background: #fafbfd; border-color: #e6e8f2; }
.hp .ht__ic { align-self: stretch; display: flex; align-items: center; padding-right: 14px; border-right: 1px solid color-mix(in srgb, var(--c) 14%, #eceaf5); }
.hp .ht__ic .sicon { --sz: 48px; border-radius: 16px; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 15%, #fff) 0%, color-mix(in srgb, var(--c) 7%, #fff) 100%);
  color: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 10%, transparent); }
.hp .ht__ic .sicon svg { stroke-width: 1.9; }
.hp #task-list .task.ht { cursor: pointer; }   /* 点任意一项今日任务 → 因果图切换到该项 */
.hp .ht__pick { all: unset; cursor: pointer; min-width: 0; border-radius: 6px; }
.hp .ht__pick:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.hp .ht__t { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.hp .today .task__b .ht__t b { font-size: 16.5px; font-weight: 750; color: var(--ink); white-space: normal; overflow: visible; letter-spacing: .01em; }
.hp .ht__s { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; flex: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 82%, #fff) 0%, var(--c) 100%); box-shadow: 0 3px 8px color-mix(in srgb, var(--c) 22%, transparent); }
.hp .today .task__b .ht__t span.ht__first { margin: 0; gap: 5px; height: 26px; padding: 0 11px; border: 0; font-size: 12.5px; font-weight: 700;
  background: color-mix(in srgb, var(--c) 11%, #fff); color: var(--c); }
.hp .ht__star { width: 13px; height: 13px; fill: currentColor; flex: none; }
.hp .ht__m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hp .ht__sep { flex: none; width: 1px; height: 16px; background: #dddbea; }
.hp .ht__m.is-wrap .ht__sep { display: none; }
.hp .today .task__b .ht__m span.ht__c { margin: 0; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); background: #fff; border: 1px solid #e9e8f3; white-space: nowrap; }
.hp .today .task__b .ht__m span.ht__c--r { background: color-mix(in srgb, var(--c) 9%, #fff); border-color: transparent; }
.hp .today .task__b .ht__m span.ht__c--pend { color: var(--muted); font-weight: 500; }
.hp .ht__ci { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hp .ht__c--pend .ht__ci { stroke: var(--muted); }
.hp .ht__why { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600;
  color: color-mix(in srgb, var(--c) 88%, #000); cursor: pointer; text-decoration: none; opacity: .92; }
.hp .ht__why:hover, .hp .ht__why[aria-expanded="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.hp .ht__chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.hp .ht__why[aria-expanded="true"] .ht__chev { transform: rotate(90deg); }
.hp .ht__wp { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.92); border: 1px dashed color-mix(in srgb, var(--c) 22%, #e3e3ee); font-size: 13px; color: var(--ink2); }
.hp .ht__wp p { margin: 0 0 4px; }
.hp .ht__wp .link { font-size: 12.5px; }
.hp .task.ht .task__a .btn { min-width: 108px; justify-content: center; }
.hp .task.ht .task__a .btn--pri.ht__go { height: 46px; padding: 0 16px; gap: 7px; border-radius: 14px; font-size: 15px; font-weight: 700;
  background: linear-gradient(135deg, #8b77fa 0%, #6a4cf0 100%); box-shadow: 0 10px 22px rgba(106, 76, 240, .28); }
/* 2026-11-23 Amber：只有选中的那张卡「开始学习」是紫色，其他卡为灰色（点卡片选中后变紫；按钮照常可点） */
.hp .task.ht:not(.is-sel) .task__a .btn--pri.ht__go { background: #eef0f6; color: #4d5170; box-shadow: none; }
.hp .task.ht:not(.is-sel) .task__a .btn--pri.ht__go:hover { background: #e4e7f1; filter: none; box-shadow: none; }
.hp .task.ht .task__a .btn--pri.ht__go:hover { box-shadow: 0 12px 26px rgba(106, 76, 240, .36); filter: brightness(1.04); }
.hp .ht__arr { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.hp .ht__go:hover .ht__arr { transform: translateX(2px); }

/* ── 今日学习进度：突出今日任务；累计数弱化；图标 / 文字 / 数字 / 分母对齐 ── */
.hp .prog { gap: 8px; }
.hp .prog li { grid-template-columns: 22px 1fr auto; padding: 10px 16px; border-radius: 12px; background: #fbfbff; border: 1px solid #edeef7; }
.hp .prog li > svg { width: 19px; height: 19px; }
.hp .prog li > span { font-size: 14px; color: var(--ink2); }
.hp .prog li b { font-size: 16px; text-align: right; min-width: 56px; }
.hp .prog li b small { font-size: 12.5px; color: #a3a8c2; font-weight: 500; }
.hp .prog li.is-today { background: linear-gradient(100deg, #f1eeff 0%, #faf9ff 100%); border-color: #dcd6fb; padding-block: 14px; }
.hp .prog li.is-today > span { color: var(--ink); font-weight: 700; font-size: 15px; }
.hp .prog li.is-today b { font-size: 22px; color: var(--pri); }
.hp .prog li.is-today b small { font-size: 14px; color: var(--ink2); }
.hp .prog li.is-cum b { color: var(--ink2); font-weight: 650; }

/* ── 因果知识分析：立体风格小图（home.js orbit） ── */
.hp .causal-home h2 .ic { color: var(--c, var(--pri)); }
/* 舞台底色同 aldeira（.dashboard-active .graph-stage 的浅色版） */
.hp .ch__panel { display: flex; flex-direction: column; min-height: 280px; border: 1px solid rgba(101, 130, 158, .18);
  background: radial-gradient(circle at 42% 44%, rgba(255,255,255,.82), transparent 28%), radial-gradient(circle at 78% 30%, rgba(95,211,245,.12), transparent 30%), linear-gradient(135deg, rgba(247,252,255,.94), rgba(231,246,255,.82)); }
.hp .ch__g { position: relative; inset: auto; flex: 1; min-height: 210px; }
.hp .ch__g canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* 图例放在图下方单独一行（不再浮在图上），标签与图例不会重叠 */
.hp .ch__legend { position: static; align-self: stretch; flex-wrap: wrap; row-gap: 2px; margin: 0 10px 10px; }
.hp .ch__legend i.lg-main { background: var(--c, #8b6cff); }
.hp .ch__legend i.lg-other { background: color-mix(in srgb, var(--c, #8b6cff) 75%, #fff); box-shadow: 0 0 0 2px #fff, 0 0 0 3px color-mix(in srgb, var(--c, #8b6cff) 35%, transparent); }
.hp .ch__legend { background: rgba(255,255,255,.58); border: 1px solid rgba(101,130,158,.18); border-radius: 11px; padding: 4px 9px; color: rgba(8,22,58,.82); font-weight: 650; box-shadow: 0 8px 20px rgba(40,70,108,.06); }
.hp .ch__g canvas { cursor: grab; }

/* ── 我的学科：学科色更清楚；待加强突出 ── */
.hp .subj-row .subj { gap: 9px; padding: 16px 16px 14px; border-color: color-mix(in srgb, var(--bc) 70%, #eceef8); background: linear-gradient(180deg, #fff 0%, #fff 55%, var(--sc) 100%); }
.hp .subj-row .subj:hover { border-color: var(--c); }
.hp .subj .sicon { border-radius: 12px; }
.hp .subj__n { font-size: 16.5px; font-weight: 750; }
.hp .subj__m b { font-size: 24px; font-weight: 800; color: var(--ink); }
.hp .subj .bar { height: 7px; } .hp .subj .bar b { background: var(--c); }
.hp .subj__f { min-height: 46px; padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--c) 6%, #fff); border: 1px solid color-mix(in srgb, var(--c) 14%, transparent); font-size: 13px; color: var(--ink); font-weight: 600; }
.hp .subj__ft { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; }
.hp .subj__f em { display: inline; font-style: normal; color: var(--c); font-weight: 700; }
.hp .subj__f em.subj__st { color: var(--muted); font-weight: 500; }

/* ── 响应式（沿用 styles.css 的断点） ── */
@media (max-width: 1280px) { .hp .hp__art { width: 230px; height: 161px; } .hp .hero--hp h1 { font-size: 29px; } }
@media (max-width: 960px) { .hp .hp__art { display: flex; width: 172px; height: 120px; margin: -14px -4px -16px 0; } .hp .hero--hp { min-height: 0; } .hp .hero--hp h1 { font-size: 26px; } .hp .hero--hp p { font-size: 15px; } .hp .hero--hp { padding: 22px 24px; } }
@media (max-width: 640px) {
  .hp .hp__art { display: none; } .hp .hero--hp h1 { font-size: 22px; }
  .hp .task.ht { grid-template-columns: auto minmax(0, 1fr); } .hp .task.ht .task__a { grid-column: 1 / -1; justify-content: flex-end; }
  .hp .ht__ic { padding-right: 12px; } .hp .ht__ic .sicon { --sz: 44px; border-radius: 14px; }
  .hp .today .task__b .ht__t span.ht__first { margin-left: 0; }
}

/* ── 首页分步高亮引导（Spotlight Tour） ── */
.spot { position: fixed; inset: 0; z-index: 60; }
.spot__hole { position: fixed; border-radius: 20px; box-shadow: 0 0 0 9999px rgba(22, 26, 62, .52), 0 0 0 3px rgba(255,255,255,.9), 0 0 0 7px rgba(124, 112, 247, .45);
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; pointer-events: none; }
.spot__pop { position: fixed; width: min(360px, calc(100vw - 24px)); background: #fff; border-radius: 16px; padding: 16px 18px 16px; box-shadow: 0 20px 50px rgba(22, 26, 62, .28); }
.spot__top { display: flex; justify-content: space-between; align-items: center; }
.spot__n { font-size: 12px; font-weight: 650; color: var(--muted); }
.spot__skip { border: 0; background: none; padding: 2px 4px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.spot__skip:hover { color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.spot__pop h2 { font-size: 17px; margin: 4px 0 6px; }
.spot__pop p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink2); }
.spot__dots { display: flex; gap: 6px; margin: 12px 0 14px; } .spot__dots i { width: 18px; height: 4px; border-radius: 9px; background: var(--track); } .spot__dots i.on { background: var(--pri-grad); }
.spot__a { display: flex; justify-content: space-between; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .spot__hole { transition: none; } }
