/* ==========================================================
 * star-ui.css · 星轨问卷页 高级感重排版 (r28)
 * ----------------------------------------------------------
 * 设计依据（真实调研）：
 *  1. Linear 官方 UI 重设计复盘
 *     linear.app/now/how-we-redesigned-the-linear-ui
 *     用黑白透明度构建「表面 elevation 体系」：
 *     background / foreground / panel / dialog 各占一层，
 *     层级靠表面亮度差表达，不靠投影。
 *  2. Dark Mode Design Principles
 *     designvity.com/dark-mode-design-principles
 *     暗色下投影不可见 → 用「分层背景 + 发丝边框 + 微弱高光」
 *     制造深度；避免纯黑背景与纯白正文。
 *  3. Material Design 状态层规范
 *     选中态 = 表面状态层叠加，而非整块反相。
 * ----------------------------------------------------------
 * r27 的问题（用户指出："纯白色太简陋"）：
 *   选中态用 #fff→#eaeaef 整块反相。深色底上千古对比度约 21:1，
 *   是把一整张白纸糊上去 —— 大面积纯白在深色界面里最廉价，
 *   且选中项亮度压过页面所有内容，抢走全部注意力。
 *   小面积纯白高级（勾、点、细线），大面积纯白廉价。
 * ----------------------------------------------------------
 * r28 选中态新做法（三步递进，不用大面积白）：
 *   ① 表面提亮一档  rgba(255,255,255,.10) → 渐变 .13/.075
 *   ② 边框明显化    1px rgba(255,255,255,.30) + 外侧柔和光环
 *   ③ 左侧白色强调条（3px，scaleY 展开）+ 文字转纯白加粗
 *   —— 用「小面积高亮」表达选中，而不是「整块反相」
 * ----------------------------------------------------------
 * 作用对象：star.js 渲染的 .star-*（星轨问卷/引导/方案）
 * 边界：纯 CSS，零 JS，零数据改动，不改 mentor.css / star.js
 * 回滚：删 index.html 里本文件 link 即可
 * ========================================================== */

/* ---------- 0. 画布：顶部环境光晕，摆脱纯黑塑料感 ---------- */
.star-wrap{
  position:relative;
  max-width:520px;
  padding:6px 0 32px;
  -webkit-font-smoothing:antialiased;
}
.star-wrap::before{
  content:"";
  position:absolute;left:50%;top:-56px;
  transform:translateX(-50%);
  width:min(620px,140%);height:280px;
  pointer-events:none;z-index:0;
  background:radial-gradient(58% 100% at 50% 0%,
    rgba(255,255,255,.062) 0%,
    rgba(255,255,255,.022) 42%,
    rgba(255,255,255,0) 72%);
}
.star-wrap > *{position:relative;z-index:1;}

/* ---------- 1. 顶栏 ---------- */
.star-topline{
  min-height:22px;margin-bottom:14px;
  align-items:baseline;
}
.star-back{
  font-size:12.5px;color:var(--text-3);
  letter-spacing:-.01em;
  transition:color .18s ease;
}
.star-back:hover{color:var(--text-2);}
.star-progress{
  font-size:11.5px;color:var(--text-3);
  letter-spacing:.04em;
}
.star-progress b{
  font-size:16px;font-weight:700;
  letter-spacing:-.02em;margin:0 3px;
  font-variant-numeric:tabular-nums;
}

/* ---------- 2. 进度条：细线 + 发光 ---------- */
.star-qbar{
  height:3px;
  background:rgba(255,255,255,.06);
  border-radius:999px;
  margin-bottom:20px;
  overflow:hidden;
}
.star-qbar i{
  display:block;height:100%;
  background:linear-gradient(90deg,rgba(255,255,255,.42) 0%,#fff 100%);
  border-radius:999px;
  box-shadow:0 0 14px rgba(255,255,255,.42);
  transition:width .42s cubic-bezier(.22,.61,.36,1);
}

/* ---------- 3. 题干 ---------- */
.star-q{
  font-size:15.5px;
  font-weight:600;
  line-height:1.52;
  letter-spacing:-.022em;
  margin:0 0 12px;
  color:var(--text);
}
.star-q-s{
  font-size:11.5px;font-weight:400;
  color:var(--text-3);
  margin-top:5px;line-height:1.58;
  letter-spacing:.005em;
}
.star-q-gap{margin-top:22px;}

/* ---------- 4. 选项：有厚度、会受光的"材质块" ---------- */
.star-choices{
  display:flex;flex-direction:column;flex-wrap:nowrap;
  gap:7px;
}
.star-choice{
  position:relative;
  border:1px solid rgba(255,255,255,.075);
  background:linear-gradient(180deg,
    rgba(255,255,255,.058) 0%,
    rgba(255,255,255,.024) 100%);
  color:var(--text);
  border-radius:11px;
  padding:11px 14px;
  font:inherit;font-size:13.5px;font-weight:500;
  letter-spacing:-.012em;text-align:left;line-height:1.45;
  -webkit-tap-highlight-color:transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 1px 2px rgba(0,0,0,.26);
  transition:background .22s ease,border-color .22s ease,
             box-shadow .22s ease,color .22s ease,
             transform .12s ease;
}
.star-choice:hover{
  border-color:rgba(255,255,255,.13);
  background:linear-gradient(180deg,
    rgba(255,255,255,.075) 0%,
    rgba(255,255,255,.034) 100%);
}
.star-choice:active{transform:scale(.992);}

/* 左侧强调条：默认隐形，选中时展开（小面积高亮手法） */
.star-choice::before{
  content:"";
  position:absolute;
  left:0;top:50%;
  width:2.5px;height:calc(100% - 16px);
  transform:translateY(-50%) scaleY(.18);
  transform-origin:center;
  background:#fff;
  border-radius:0 3px 3px 0;
  opacity:0;
  transition:transform .26s cubic-bezier(.22,.61,.36,1),
             opacity .22s ease;
  pointer-events:none;
}

/* ---------- 5. 选中态：提亮一档 + 边框明显化 + 左侧白条 ----------
 * 不使用整块反相白。用三个小面积信号叠加表达"已选中"：
 * 表面比未选中亮一档、边框变成明确的 30% 白、左边一条白色竖条。
 * ------------------------------------------------------------ */
.star-choice.on{
  border-color:rgba(255,255,255,.30);
  background:linear-gradient(180deg,
    rgba(255,255,255,.128) 0%,
    rgba(255,255,255,.072) 100%);
  color:#fff;
  font-weight:600;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    0 0 0 1px rgba(255,255,255,.055),
    0 10px 30px -20px rgba(255,255,255,.42);
}
.star-choice.on::before{
  opacity:1;
  transform:translateY(-50%) scaleY(1);
}

/* ---------- 6. 多选标签：同一套选中语言（药丸内小面积高亮） ---------- */
.star-chips{gap:9px;}
.star-chip{
  border:1px solid rgba(255,255,255,.075);
  background:linear-gradient(180deg,
    rgba(255,255,255,.05) 0%,
    rgba(255,255,255,.02) 100%);
  color:var(--text-2);
  border-radius:999px;
  padding:7px 13px;
  font:inherit;font-size:12.5px;
  letter-spacing:-.005em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055);
  transition:background .22s ease,border-color .22s ease,
             color .22s ease,box-shadow .22s ease;
}
.star-chip:hover{border-color:rgba(255,255,255,.13);}
.star-chip.on{
  border-color:rgba(255,255,255,.30);
  background:linear-gradient(180deg,
    rgba(255,255,255,.128) 0%,
    rgba(255,255,255,.072) 100%);
  color:#fff;font-weight:600;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    0 0 0 1px rgba(255,255,255,.055);
}

/* ---------- 7. 输入框 ---------- */
.star-input{
  border:1px solid rgba(255,255,255,.085);
  background:linear-gradient(180deg,
    rgba(255,255,255,.045) 0%,
    rgba(255,255,255,.02) 100%);
  color:var(--text);
  border-radius:13px;
  padding:14px 16px;
  font-size:14.5px;
  margin-top:7px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045);
  transition:border-color .2s ease,background .2s ease;
}
.star-input::placeholder{color:var(--text-3);}
.star-input:focus{
  border-color:rgba(255,255,255,.26);
  background:linear-gradient(180deg,
    rgba(255,255,255,.062) 0%,
    rgba(255,255,255,.03) 100%);
}
.star-area{min-height:106px;line-height:1.68;}

/* ---------- 8. 即时解读 ---------- */
.star-insight{
  border-left:2px solid rgba(255,255,255,.12);
  padding:1px 0 1px 14px;
  margin:0 0 20px;
  font-size:12.5px;line-height:1.82;
  color:var(--text-3);
  letter-spacing:.008em;
}

/* ---------- 9. 辅助说明文字 ---------- */
.star-why{
  font-size:11.5px;color:var(--text-3);
  line-height:1.68;margin-top:10px;
}
.star-consent-text{
  font-size:10.5px;color:var(--text-3);
  line-height:1.88;margin-top:24px;
}

/* ---------- 10. 底部操作区 ---------- */
.star-actions{gap:8px;margin-top:24px;}
.star-actions .btn{
  height:44px;border-radius:12px;
  font-size:13.5px;font-weight:650;letter-spacing:-.012em;
}

/* 主按钮：白瓷质感（这里小面积使用纯白是合理的——
 * 全页只有一个主操作，纯白能明确指向"该点这里"） */
.star-actions .btn:not(.ghost){
  background:#fff !important;
  background-image:linear-gradient(180deg,#ffffff 0%,#ececf0 100%) !important;
  border:1px solid rgba(255,255,255,.66) !important;
  color:#0a0a0c !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(0,0,0,.10),
    0 2px 4px rgba(0,0,0,.22),
    0 14px 34px -18px rgba(255,255,255,.55) !important;
  transition:box-shadow .2s ease,transform .12s ease !important;
}
.star-actions .btn:not(.ghost):active{
  transform:translateY(1px);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,.16),
    inset 0 -1px 0 rgba(255,255,255,.5),
    0 1px 2px rgba(0,0,0,.2) !important;
}

/* 次按钮：发丝描边 + 内嵌高光，哑光不抢主按钮 */
.star-actions .btn.ghost{
  background:linear-gradient(180deg,
    rgba(255,255,255,.042) 0%,
    rgba(255,255,255,.016) 100%) !important;
  background-image:linear-gradient(180deg,
    rgba(255,255,255,.042) 0%,
    rgba(255,255,255,.016) 100%) !important;
  border:1px solid rgba(255,255,255,.085) !important;
  color:var(--text-2) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055) !important;
}

/* ---------- 11. 跳过入口 ---------- */
.star-skip{
  margin:14px 0 0;
  font-size:11.5px;
  color:var(--text-3);
  text-decoration:none;
  opacity:.72;
  padding:4px 0;
  transition:opacity .18s ease;
}
.star-skip:hover{opacity:1;}

/* ---------- 12. 备份提示：一条发丝分隔线 ---------- */
/* 需求：不要在问卷每一题都重复出现这段提示（11+ 题重复 11+ 次），
 * 只在真正需要的地方保留一次（引导页 / 结果页）。
 * 判定依据：问卷页必定含 .star-qbar（进度条），其他页面没有。
 * 纯 CSS 实现，不动红线文件 star.js。 */
.star-wrap:has(.star-qbar) .star-backup{display:none !important;}
/* 不支持 :has() 的旧浏览器退化为：问卷页末尾（有 star-skip 或 star-actions）隐藏 */
.star-wrap:has(.star-skip) .star-backup{display:none !important;}

.star-backup{
  border:0;
  border-top:1px solid rgba(255,255,255,.065);
  background:transparent;
  border-radius:0;
  padding:18px 0 0;
  margin-top:26px;
  font-size:10.5px;
  line-height:1.85;
  color:var(--text-3);
  letter-spacing:.012em;
}
.star-backup-t{
  font-size:11px;font-weight:600;
  color:var(--text-2);
  margin-bottom:7px;letter-spacing:0;
}
.star-backup a{
  color:var(--text-3);
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.15);
  padding-bottom:1px;margin-right:16px;
  transition:color .18s ease,border-color .18s ease;
}
.star-backup a:hover{
  color:var(--text-2);
  border-bottom-color:rgba(255,255,255,.3);
}

/* ---------- 13. 引导页 hero ---------- */
.star-hero{padding:26px 0 12px;}
.star-hero h2{
  font-size:24px;
  line-height:1.24;
  letter-spacing:-.045em;
  margin:14px 0 12px;
  font-weight:700;
}
.star-hero p{
  font-size:13.5px;line-height:1.88;
  color:var(--text-2);letter-spacing:.004em;
}
.star-kicker{
  font-size:10px;letter-spacing:.2em;
  color:var(--text-3);font-weight:600;
}
.star-hero-line{
  height:1px;
  background:linear-gradient(90deg,rgba(255,255,255,.24),rgba(255,255,255,0));
  margin:24px 0 14px;
}

/* ---------- 14. 轻量入场动效 ---------- */
@keyframes ykStarIn{
  from{opacity:0;transform:translateY(8px);}
  to{opacity:1;transform:translateY(0);}
}
.star-choices .star-choice{
  animation:ykStarIn .36s cubic-bezier(.22,.61,.36,1) both;
}
.star-choices .star-choice:nth-child(1){animation-delay:.02s;}
.star-choices .star-choice:nth-child(2){animation-delay:.055s;}
.star-choices .star-choice:nth-child(3){animation-delay:.09s;}
.star-choices .star-choice:nth-child(4){animation-delay:.125s;}
.star-choices .star-choice:nth-child(5){animation-delay:.16s;}
.star-choices .star-choice:nth-child(6){animation-delay:.195s;}
.star-choices .star-choice:nth-child(7){animation-delay:.23s;}
.star-choices .star-choice:nth-child(8){animation-delay:.265s;}

/* ---------- 15. 无障碍 ---------- */
@media (prefers-reduced-motion: reduce){
  .star-choices .star-choice{animation:none !important;}
  .star-qbar i{transition:none !important;}
  .star-choice,.star-chip,.star-input{transition:none !important;}
  .star-choice::before{transition:none !important;}
}