/* ============================================================
   04 · USE CASES（业务场景）
   参考站 02-scenes：居中标题 + 一张左右分栏大圆角卡
   左：浅灰底 6 个场景页签（选中态 = 白底 + 左侧绿色竖条 + 阴影）
   右：白底详情（kicker / 标题 / 说明 / 痛点 / 三步 / 地址对照 / CTA）
   交互复用 assets/js/app.js 的 [data-sc-tabs] 契约，本文件只负责样式
   类名统一 .s4- 前缀；仅使用 base.css token
   ============================================================ */

/* ---------- 大卡：左右两栏 ---------- */
.s4-card{
  display:flex;
  align-items:stretch;
  margin-top:40px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  overflow:hidden;
}

/* ---------- 左栏：6 个场景页签 ---------- */
.s4-tabs{
  flex:0 0 400px;
  width:400px;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:16px;
  background:var(--soft);
  border-right:1px solid var(--line);
}
.s4-tab{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:16px;
  width:100%;
  padding:24px;
  border:1px solid transparent;
  border-radius:var(--r);
  text-align:left;
  color:var(--ink-2);
  font-family:var(--f);
  transition:background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.s4-tab:hover{background:rgba(255,255,255,.62);color:var(--ink)}
.s4-tab.on{
  background:var(--white);
  border-color:var(--line);
  color:var(--ink);
  box-shadow:var(--shadow);
}
/* 选中态：左侧绿色竖条 */
.s4-tab.on::before{
  content:"";
  position:absolute;
  left:-1px;
  top:24px;
  bottom:24px;
  width:3px;
  border-radius:2px;
  background:var(--brand);
}
.s4-tab-ic{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  flex:none;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--white);
  color:var(--ink-2);
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}
.s4-tab-ic .i{width:24px;height:24px}
.s4-tab.on .s4-tab-ic{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}
.s4-tab-tx{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.s4-tab-t{
  font-size:18px;
  line-height:24px;
  font-weight:700;
  color:inherit;
}
.s4-tab-d{
  margin-top:8px;
  font-size:14px;
  line-height:24px;
  font-weight:400;
  color:var(--ink-3);
}

/* ---------- 右栏：详情面板 ----------
   6 个面板叠在同一格子里（只显示当前的），容器高度 = 最高面板，
   这样切换页签时右侧区域不会跳版。 */
.s4-panes{
  flex:1;
  min-width:0;
  display:grid;
  align-content:start;
}
.s4-pane{
  grid-area:1/1;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-width:0;
  padding:56px 64px;
}
/* 保留 [hidden] 语义，但不让它退出布局（高度稳定） */
.s4-pane[hidden]{
  display:flex!important;
  visibility:hidden;
}
.s4-pane.on{animation:s4-pane-in .18s ease both}
@keyframes s4-pane-in{
  from{opacity:0;transform:translateY(4px)}
  to{opacity:1;transform:none}
}

/* 眉标 → 标题 → 说明 */
.s4-kicker{
  font-size:14px;
  line-height:24px;
  font-weight:600;
  color:var(--brand);
}
.s4-h{
  margin-top:16px;
  font-family:var(--f-h);
  font-size:32px;
  line-height:42px;
  font-weight:700;
  letter-spacing:-.02em;
  color:var(--ink);
  text-wrap:balance;
}
.s4-sub{
  margin-top:16px;
  max-width:800px;
  font-size:16px;
  line-height:28px;
  color:var(--ink-2);
}

/* 痛点：红色 × + 短句，横向流式排列 */
.s4-pains{
  display:flex;
  flex-wrap:wrap;
  gap:8px 24px;
  margin-top:16px;
}
.s4-pain{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:0;
  font-size:14px;
  line-height:24px;
  color:var(--ink-2);
}
.s4-pain .i{width:16px;height:16px;flex:none;color:var(--off)}

/* 三步：黑色圆形序号 + 正文 */
.s4-steps{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:24px;
}
.s4-step{
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-size:15px;
  line-height:26px;
  color:var(--ink-2);
}
.s4-step > span:last-child{min-width:0}
.s4-step-n{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  margin-top:1px;
  flex:none;
  border-radius:50%;
  background:var(--ink);
  color:#fff;
  font-family:var(--f);
  font-size:12px;
  line-height:1;
  font-weight:600;
}

/* 地址对照：原值 → 新值 */
.s4-eg{
  display:flex;
  align-items:stretch;
  gap:16px;
  margin-top:24px;
  width:100%;
}
.s4-eg-card{
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1 1 0;
  min-width:0;
  padding:16px 24px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--r);
}
.s4-eg-card.is-to{
  background:var(--tint);
  border-color:var(--brand-line);
}
.s4-eg-k{
  font-size:13px;
  line-height:20px;
  color:var(--ink-3);
}
.s4-eg-card.is-to .s4-eg-k{color:var(--ink-2)}
.s4-eg-v{
  font-family:var(--f-mono);
  font-size:16px;
  line-height:24px;
  font-weight:500;
  color:var(--ink-2);
  overflow-wrap:anywhere;
}
.s4-eg-card.is-to .s4-eg-v{
  font-size:17px;
  line-height:25px;
  font-weight:700;
  color:var(--ink);
}
.s4-eg-arrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  width:40px;
  height:40px;
  flex:none;
  border-radius:50%;
  background:var(--soft);
  color:var(--ink-2);
}
.s4-eg-arrow .i{width:18px;height:18px}

/* CTA：次按钮（首页实心绿主按钮只留给首屏与收尾带） */
.s4-cta{margin-top:32px;flex:none}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:1180px){
  .s4-tabs{flex-basis:336px;width:336px;padding:12px}
  .s4-tab{padding:20px;gap:14px}
  .s4-tab.on::before{top:20px;bottom:20px}
  .s4-tab-ic{width:44px;height:44px;border-radius:11px}
  .s4-tab-ic .i{width:22px;height:22px}
  .s4-tab-t{font-size:17px;line-height:24px}
  .s4-tab-d{font-size:13px;line-height:20px;margin-top:6px}
  .s4-pane{padding:40px}
  .s4-h{font-size:30px;line-height:40px}
  .s4-sub{font-size:15px;line-height:26px}
}
@media (max-width:1023px){
  .s4-tabs{flex-basis:288px;width:288px}
  .s4-tab{padding:16px;gap:12px}
  .s4-tab.on::before{top:16px;bottom:16px}
  .s4-tab-ic{width:40px;height:40px;border-radius:10px}
  .s4-tab-ic .i{width:20px;height:20px}
  .s4-tab-t{font-size:15px;line-height:22px}
  .s4-tab-d{font-size:12px;line-height:18px}
  .s4-pane{padding:32px}
  .s4-h{font-size:28px;line-height:38px}
  .s4-eg{gap:8px}
  .s4-eg-card{padding:12px 16px}
  .s4-eg-v{font-size:14px;line-height:22px}
  .s4-eg-card.is-to .s4-eg-v{font-size:15px;line-height:23px}
  .s4-eg-arrow{width:32px;height:32px}
  .s4-eg-arrow .i{width:16px;height:16px}
}

/* ≤768：左右改上下；页签变 2 列网格 */
@media (max-width:768px){
  .s4-card{flex-direction:column;margin-top:32px}
  .s4-tabs{
    flex:0 0 auto;
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    padding:12px;
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .s4-tab{
    align-items:center;
    gap:10px;
    padding:12px 14px;
    border-radius:12px;
  }
  .s4-tab.on::before{
    top:10px;
    bottom:10px;
    left:-1px;
  }
  .s4-tab-ic{
    width:36px;
    height:36px;
    border-radius:9px;
  }
  .s4-tab-ic .i{width:20px;height:20px}
  .s4-tab-t{font-size:15px;line-height:22px}
  .s4-tab-d{display:none}
  .s4-pane{padding:32px 24px}
  .s4-kicker{font-size:13px;line-height:22px}
  .s4-h{font-size:24px;line-height:34px}
  .s4-sub{margin-top:12px}
  .s4-pains{margin-top:16px;gap:8px 20px}
  .s4-steps{margin-top:20px}
  .s4-eg{flex-direction:column;gap:8px;margin-top:20px}
  .s4-eg-arrow{width:36px;height:36px;transform:rotate(90deg)}
  .s4-cta{margin-top:24px}
}

/* 手机：更紧凑 */
@media (max-width:480px){
  .s4-tabs{padding:10px;gap:6px}
  .s4-tab{padding:10px 12px;gap:8px}
  .s4-tab-ic{width:32px;height:32px;border-radius:8px}
  .s4-tab-ic .i{width:18px;height:18px}
  .s4-tab-t{font-size:14px;line-height:20px}
  .s4-pane{padding:24px 20px}
  .s4-h{font-size:22px;line-height:32px;margin-top:12px}
  .s4-sub{font-size:15px;line-height:26px}
  .s4-pain{font-size:13px;line-height:22px}
  .s4-step{font-size:14px;line-height:24px}
  .s4-step-n{width:22px;height:22px;font-size:11px}
  .s4-eg-card{padding:12px 16px}
  .s4-eg-v{font-size:15px;line-height:23px}
  .s4-eg-card.is-to .s4-eg-v{font-size:16px;line-height:24px}
}
@media (max-width:380px){
  .s4-tab{padding:10px 8px 10px 12px}
  .s4-pane{padding:20px 16px}
}

/* 副标里的三个步骤短语不拆行 */
.s4-nw{white-space:nowrap}

/* 降级：减少动态偏好下不播放切换淡入 */
@media (prefers-reduced-motion:reduce){
  .s4-pane.on{animation:none}
  .s4-tab{transition:none}
}
