/* ============================================================
   OI伴学 · 新手起步页样式
   文件：public/css/start.css
   引入：index.html（在 onboarding.css 之后）

   设计取向：极简留白 + 关键术语高亮。
   - 四步主线以「时间轴」呈现，强调顺序不可跳。
   - 只用 tokens 变量，自动兼容暗黑主题（无需 media 查询）。
   - 断点 767px，与 mobile-practice.css / onboarding.css 保持一致。
   ============================================================ */

.start-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

/* —— 首屏标题 —— */
.start-hero {
  margin-bottom: 28px;
}
.start-hero h1 {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.start-hero p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.7;
}

/* —— 进度摘要 —— */
.start-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.start-summary__head h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}
.start-summary__head p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}
.start-summary--error {
  border-color: var(--warning);
  background: var(--warning-50);
}
.start-summary--error .start-summary__head p {
  color: var(--warning-text);
}

.start-summary__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}
.start-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
}
.start-bar__fill {
  display: block;
  height: 100%;
  background: var(--success);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.start-summary__count {
  font-size: 13px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* —— 四步时间轴 —— */
.start-steps {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  position: relative;
}
/* 竖线：连接四个步骤圆点 */
.start-steps::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: var(--border);
}

.start-step {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 0 0 20px;
}
.start-step:last-child {
  padding-bottom: 0;
}

.start-step__rail {
  flex: 0 0 40px;
  display: flex;
  justify-content: center;
  padding-top: 18px;
  z-index: 1;
}
.start-step__no {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  background: var(--card);
  border: 2px solid var(--border);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.start-step__no svg {
  width: 18px;
  height: 18px;
  color: var(--success);
}

/* 当前该做的一步：实心描边强调 */
.start-step--now .start-step__no {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-50);
}
/* 已完成：整行减淡 */
.start-step--done .start-step__no {
  border-color: var(--success);
  background: var(--success-50);
}
.start-step--done .start-step__title {
  color: var(--text-tertiary);
}

.start-step__body {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.start-step--now .start-step__body {
  border-color: var(--brand);
}

.start-step__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.start-step__icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: var(--brand);
}
.start-step__icon svg {
  width: 100%;
  height: 100%;
}
.start-step__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* 状态标签 */
.start-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 500;
}
.start-tag--done {
  background: var(--success-50);
  color: var(--success);
}
.start-tag--now {
  background: var(--brand-50);
  color: var(--brand);
}
.start-tag--lock {
  background: var(--bg-alt);
  color: var(--text-tertiary);
}

/* 三问：做什么 / 为什么 / 做完得到 */
.start-step__facts {
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.start-fact {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.start-fact dt {
  flex: 0 0 68px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: right;
  line-height: 1.7;
}
.start-fact dd {
  margin: 0;
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
/* 关键收益高亮：这是学生最需要记住的一句 */
.start-fact:last-child dd {
  color: var(--text);
  font-weight: 500;
}

.start-btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--brand);
  padding: 9px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.start-btn:hover {
  background: var(--brand-dark);
}
.start-step__again {
  display: inline-block;
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
}
.start-step__again:hover {
  color: var(--brand);
}
.start-step__blocked {
  font-size: 13px;
  color: var(--text-muted);
}

/* —— 四步走完后的收尾卡 —— */
.start-wrapup {
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 28px;
}
.start-wrapup h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}
.start-wrapup ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.start-wrapup li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.start-wrapup b {
  color: var(--text);
  font-weight: 600;
}
.start-wrapup a {
  color: var(--brand);
  text-decoration: none;
}
.start-wrapup a:hover {
  text-decoration: underline;
}

/* —— 底部跳过区 —— */
.start-skip {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.start-skip p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 16px 0 10px;
}
.start-skip__hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* —— 未登录时的登录引导 —— */
.start-gate {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
}
.start-gate p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}
.start-gate .btn {
  margin: 0 4px;
}

/* ============================================================
   手机端适配（与 mobile-practice.css / onboarding.css 同一断点）
   ============================================================ */
@media (max-width: 767px) {
  .start-page {
    padding: 20px 14px 40px;
  }
  .start-hero h1 {
    font-size: 21px;
  }
  .start-hero p {
    font-size: 14px;
  }

  /* 摘要卡竖排，进度条占满宽 */
  .start-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 18px;
  }
  .start-summary__progress {
    min-width: 0;
  }

  /* 竖线内移到圆点内侧，缩窄左边距换取正文宽度 */
  .start-steps::before {
    left: 15px;
  }
  .start-step {
    gap: 10px;
  }
  .start-step__rail {
    flex-basis: 32px;
  }
  .start-step__no {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-width: 2px;
  }
  .start-step__no svg {
    width: 15px;
    height: 15px;
  }
  .start-step__body {
    padding: 14px 15px;
    border-radius: 12px;
  }
  .start-step__title {
    font-size: 16px;
  }

  /* 三问改为标签在上、正文在下，避免窄屏被挤压 */
  .start-fact {
    flex-direction: column;
    gap: 2px;
  }
  .start-fact dt {
    flex: none;
    text-align: left;
  }
  .start-fact dd {
    font-size: 13.5px;
  }

  .start-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 11px 20px;
  }

  .start-wrapup {
    padding: 16px 18px;
  }
  .start-wrapup li {
    font-size: 13.5px;
  }
}
