/* 益丰智能编制与排班 · 页面样式（叠加在主站 styles.css 之上） */
.rs { --yf: #00a870; --ph: #bf5af2; --short: #ff453a; --idle: #c7c7cc; }
.rs .eyebrow { color: var(--yf); }
.rs .hero .eyebrow, .rs .dark .eyebrow { color: #34d399; }

/* HERO 背景：班次条缓慢重排 */
.rs-bg { position: absolute; inset: 0; display: grid; align-content: center; gap: 14px; padding: 0 4%; opacity: .5; }
.rs-bg .hb-row { position: relative; height: 14px; }
.rs-bg .hb-row i { position: absolute; top: 0; height: 100%; border-radius: 7px; background: #1e3a5f; transition: left 1.6s var(--ease), width 1.6s var(--ease), background 1.6s; }
.rs-bg .hb-row i.ph { background: #4c1d95; }
.rs-bg .hb-row i.hot { background: #065f46; }
.rs-hero::after { background: radial-gradient(ellipse 55% 45% at 50% 52%, rgba(0,0,0,.82), transparent 75%), linear-gradient(to bottom, transparent 70%, #000); }

/* 痛点：需求曲线 vs 平的排班线 */
.mismatch { max-width: 860px; margin: 56px auto 0; background: #fff; border-radius: 28px; padding: 24px 20px 12px; }
.mismatch svg { width: 100%; height: auto; display: block; }
.mismatch text { font-family: var(--font); }
.mm-grid line { stroke: #f0f0f2; }
.mm-axis text { font-size: 12px; fill: var(--ink-2); }
.mm-demand { fill: none; stroke: #0071e3; stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s var(--ease) .2s; }
.mm-staff { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 5; opacity: 0; transition: opacity .6s 1.6s; }
.mm-short { fill: rgba(255,69,58,.22); opacity: 0; transition: opacity .8s 2.2s; }
.mm-idle { fill: rgba(142,142,147,.2); opacity: 0; transition: opacity .8s 2.5s; }
.mm-lbl { font-size: 12px; fill: var(--ink); opacity: 0; transition: opacity .6s 1.8s; }
.mm-tag { font-size: 14px; font-weight: 700; opacity: 0; transition: opacity .6s 2.8s; text-anchor: middle; }
.mm-tag.short { fill: #d70015; } .mm-tag.idle { fill: #6e6e73; }
.mismatch.in .mm-demand { stroke-dashoffset: 0; }
.mismatch.in .mm-staff, .mismatch.in .mm-lbl, .mismatch.in .mm-short, .mismatch.in .mm-idle, .mismatch.in .mm-tag { opacity: 1; }

.facts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 40px; text-align: center; }
.facts b { display: block; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; }
.facts span { font-size: 13px; color: var(--ink-2); }

.pains { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 48px; }
.pain { background: #fff; border-radius: 18px; padding: 20px 18px; }
.pain b { display: block; font-size: 16px; margin: 12px 0 4px; }
.pain p { font-size: 13px; color: var(--ink-2); }
.pains .reveal:nth-child(2) { transition-delay: .06s; } .pains .reveal:nth-child(3) { transition-delay: .12s; }
.pains .reveal:nth-child(4) { transition-delay: .18s; } .pains .reveal:nth-child(5) { transition-delay: .24s; }

/* 痛点小图标：纯 CSS 动画 */
.pi { display: block; width: 44px; height: 32px; position: relative; }
.pw-d { fill: none; stroke: #0071e3; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 60; animation: pwDraw 2.6s infinite var(--ease); }
@keyframes pwDraw { 0% { stroke-dashoffset: 60; } 60%, 100% { stroke-dashoffset: 0; } }
.pw-s { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 3; }
.pi-ph::before { content: ""; position: absolute; left: 14px; top: 2px; width: 16px; height: 28px; border-radius: 4px; background: var(--ph); animation: piBlink 1.6s infinite; }
.pi-ph::after { content: ""; position: absolute; left: 8px; top: 9px; width: 28px; height: 14px; border-radius: 4px; background: var(--ph); animation: piBlink 1.6s infinite; }
@keyframes piBlink { 60% { opacity: 1; } 75% { opacity: .2; } 90% { opacity: 1; } }
.pi-bike::before { content: ""; position: absolute; top: 6px; left: 0; width: 20px; height: 20px; border-radius: 6px; background: #ff9f0a; animation: piRide 2s infinite var(--ease); }
@keyframes piRide { 0% { transform: translateX(0); } 50% { transform: translateX(22px); } 100% { transform: translateX(0); } }
.pi-sheet { background: repeating-linear-gradient(90deg, #d2d2d7 0 1px, transparent 1px 11px), repeating-linear-gradient(0deg, #d2d2d7 0 1px, transparent 1px 8px); border: 1px solid #d2d2d7; border-radius: 4px; }
.pi-sheet::after { content: ""; position: absolute; left: 11px; top: 8px; width: 10px; height: 7px; background: #0071e3; animation: piCell 2.4s steps(1) infinite; }
@keyframes piCell { 0% { transform: translate(0, 0); } 25% { transform: translate(11px, 8px); } 50% { transform: translate(22px, 0); } 75% { transform: translate(0, 16px); } }
.pi-grid::before, .pi-grid::after { content: ""; position: absolute; bottom: 2px; width: 12px; background: #8e8e93; border-radius: 2px; }
.pi-grid::before { left: 6px; height: 24px; box-shadow: 16px 0 0 #8e8e93; }
.pi-grid::after { left: 32px; height: 10px; background: #ff9f0a; animation: piGrow 2.4s infinite var(--ease); }
@keyframes piGrow { 50% { height: 26px; } }

/* 原型应用 */
.app { margin-top: 56px; background: #fff; border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; }
.app-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #ececf0; background: #fbfbfd; }
.dots3 { display: flex; gap: 6px; } .dots3 i { width: 11px; height: 11px; border-radius: 50%; background: #e3e3e8; }
.app-bar em { font-style: normal; font-size: 13px; font-weight: 600; }
.app-tag { margin-left: auto; font-size: 11px; color: var(--ink-2); background: var(--bg-light); padding: 3px 9px; border-radius: 980px; }
.app-ctl { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 0; }
.app-ctl .seg { margin: 0; }
.mode { display: flex; gap: 8px; }
.mode button { padding: 8px 16px; border-radius: 980px; font-size: 14px; border: 1px solid var(--line); color: var(--ink-2); transition: all .3s; }
.mode button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.mode button.go { background: var(--yf); border-color: var(--yf); color: #fff; font-weight: 600; }
.mode button.go[aria-pressed="true"] { box-shadow: 0 0 0 4px rgba(0,168,112,.2); }
.mode button.go.busy { opacity: .7; }

.app-body { display: grid; grid-template-columns: 250px 1fr; gap: 20px; padding: 20px; }
.staffing { background: var(--bg-light); border-radius: 16px; padding: 16px; align-self: start; }
.pan-k { font-size: 12px; font-weight: 700; color: var(--yf); }
.st-desc { font-size: 13px; color: var(--ink-2); margin: 2px 0 8px; }
.need { width: 100%; height: auto; display: block; margin-bottom: 8px; }
.need text { font-family: var(--font); font-size: 9px; fill: #8e8e93; }
.need .nb { fill: #9fc3f5; transform-box: fill-box; transform-origin: bottom; animation: nbGrow .6s var(--ease) both; animation-delay: var(--d); }
.need .np { fill: none; stroke: #ff9f0a; stroke-width: 1.8; stroke-dasharray: 3 3; }
@keyframes nbGrow { from { transform: scaleY(0); } }
.st-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-top: 1px solid #e5e5ea; }
.st-row b { font-variant-numeric: tabular-nums; }
.st-row.hi b { color: var(--yf); font-size: 15px; }
.st-advice { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink); background: #ecfdf5; border-radius: 10px; padding: 8px 10px; }
.st-advice:empty { display: none; }

.roster { min-width: 0; }
.axis, .cells { position: relative; display: grid; grid-template-columns: repeat(var(--H), 1fr); }
.axis { margin-left: 92px; font-size: 10px; color: var(--ink-2); margin-bottom: 6px; }
.axis span { text-align: left; white-space: nowrap; overflow: visible; }
.rrow { display: grid; grid-template-columns: 92px 1fr; align-items: center; height: 34px; }
.rname { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 8px; padding: 2px 4px; text-align: left; }
.rname:hover { background: var(--bg-light); }
.rname em { font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: var(--ph); padding: 1px 5px; border-radius: 5px; }
.rname.leave { color: var(--short); text-decoration: line-through; }
.rtrack { position: relative; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, #f5f5f7 0 calc(100% / var(--H) - 1px), #fff calc(100% / var(--H) - 1px) calc(100% / var(--H))); }
.shift { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: #5b9bf0; color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; overflow: hidden; white-space: nowrap;
  transition: left .8s cubic-bezier(.5,0,.2,1), width .8s cubic-bezier(.5,0,.2,1), background .4s, opacity .4s; }
.shift.ph { background: var(--ph); }
.shift.part { background: #34c3a0; }
.shift.off { opacity: 0; }
.rtrack .offtag { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--ink-2); opacity: 0; transition: opacity .4s .4s; }
.rtrack.is-off .offtag { opacity: 1; }
.cov-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; margin-top: 6px; }
.cov-row label { font-size: 12px; color: var(--ink-2); }
.cells { gap: 2px; }
.cells span { height: 20px; border-radius: 4px; font-size: 10px; font-weight: 600; display: grid; place-items: center; background: #f5f5f7; color: var(--ink-2); transition: background .4s, color .4s; }
.cells span.ok { background: #d6f5de; color: #1a7f37; }
.cells span.short { background: #ffd9d6; color: #c1271c; }
.cells span.idle { background: #ececf0; color: #8e8e93; }
.cells span.gap { background: #ff453a; color: #fff; animation: gapPulse 1.2s infinite; }
.cells span.phok { background: #efe3fb; color: #8e3ec2; }
@keyframes gapPulse { 50% { opacity: .55; } }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 0 92px; font-size: 11px; color: var(--ink-2); }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lg.ok::before { background: #d6f5de; } .lg.short::before { background: #ffd9d6; } .lg.idle::before { background: #ececf0; } .lg.gap::before { background: #ff453a; }

.rkpis { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #ececf0; }
.rkpis div { padding: 14px 20px; border-right: 1px solid #ececf0; }
.rkpis div:last-child { border-right: 0; }
.rkpis span { display: block; font-size: 12px; color: var(--ink-2); }
.rkpis b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rkpis b.up { color: #1a7f37; } .rkpis b.down { color: #c1271c; }
.agent { display: flex; gap: 12px; align-items: flex-start; padding: 14px 20px 18px; background: #fbfbfd; border-top: 1px solid #ececf0; }
.agent-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #00a870, #0071e3); }
.agent p { font-size: 14px; line-height: 1.55; padding-top: 4px; }
.agent p b { color: var(--yf); }
.agent p small { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-2); }

/* 算法流水线 */
.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stage { background: #1d1d1f; border-radius: var(--radius); padding: 22px; }
.sg { width: 100%; height: auto; display: block; background: #111113; border-radius: 12px; padding: 6px; margin-bottom: 14px; }
.sg-n { font-size: 12px; font-weight: 700; color: #34d399; }
.stage h3 { font-size: 20px; margin: 2px 0 6px; }
.stage p:last-child { font-size: 14px; color: var(--ink-inv-2); }
.pipe .reveal:nth-child(2) { transition-delay: .08s; } .pipe .reveal:nth-child(3) { transition-delay: .16s; } .pipe .reveal:nth-child(4) { transition-delay: .24s; }
.sg-hist { fill: none; stroke: #5b9bf0; stroke-width: 2.4; }
.sg-pred { fill: none; stroke: #34d399; stroke-width: 2.4; stroke-dasharray: 1; animation: sgDraw 3s infinite; }
@keyframes sgDraw { 0% { stroke-dashoffset: 1; } 55%, 100% { stroke-dashoffset: 0; } }
.sg-now { stroke: #48484a; stroke-dasharray: 2 3; }
.sg-st rect { fill: #34d399; transform-box: fill-box; transform-origin: bottom; animation: sgBar 3s infinite both; animation-delay: var(--d); }
@keyframes sgBar { 0% { transform: scaleY(0); } 25%, 100% { transform: scaleY(1); } }
.sv-grid rect { fill: #2c2c2e; transition: fill .3s; }
.sv-grid rect.on { fill: #34d399; }
.sv-grid rect.bad { fill: #ff453a; }
.ag-a { fill: #2c2c2e; } .ag-b { fill: #0b3d2c; }
.ag-d { fill: #34d399; animation: agDot 1.2s infinite; animation-delay: var(--d); }
@keyframes agDot { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.cons > div { background: #1d1d1f; border-radius: var(--radius); padding: 22px 24px; }
.cons-k { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.cons-k.hard { color: #ff6961; } .cons-k.soft { color: #34d399; }
.cons li { font-size: 15px; color: #e5e5ea; padding: 6px 0; border-top: 1px solid #2c2c2e; }
.cons li:first-child { border-top: 0; }

/* 效益测算 */
.bcalc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; margin-top: 56px; background: #fff; border-radius: 28px; padding: 28px; }
.b-rows { display: grid; gap: 22px; align-content: center; }
.br { display: grid; gap: 8px; cursor: pointer; }
.br-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.br-h b { font-size: 17px; }
.br-h em { font-style: normal; font-size: 14px; color: var(--yf); white-space: nowrap; }
.br-h output { font-weight: 700; font-variant-numeric: tabular-nums; }
.br-base { font-size: 12px; color: var(--ink-2); }
.br input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #00a870 var(--p, 50%), #e5e5ea var(--p, 50%)); outline: none; }
.br input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.br input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.br input[type=range]:focus-visible { box-shadow: 0 0 0 3px rgba(0,168,112,.35); }
.b-out { display: grid; gap: 12px; }
.b-card { background: var(--bg-light); border-radius: 18px; padding: 16px 20px; }
.b-card span { display: block; font-size: 13px; color: var(--ink-2); }
.b-card b { font-size: 40px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.b-card em { font-style: normal; font-size: 14px; color: var(--ink-2); margin-left: 4px; }
.b-card p { font-size: 13px; color: var(--ink-2); }
.b-card.ph b { color: var(--ph); }
.b-bar { height: 6px; border-radius: 3px; background: #e5e5ea; margin-top: 8px; overflow: hidden; }
.b-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #00a870, #34d399); transition: width .5s var(--ease); }

/* 落地路径 */
.pl { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; }
.pl-line { position: absolute; left: 12.5%; right: 12.5%; top: 9px; height: 2px; background: var(--line); }
.pl-line i { position: absolute; inset: 0; width: 0; background: var(--yf); transition: width 2s var(--ease) .3s; }
.pl.in .pl-line i { width: 100%; }
.pl-st { position: relative; text-align: center; padding: 30px 8px 0; }
.pl-st::before { content: ""; position: absolute; top: 2px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #fff; border: 2px solid var(--line); transition: all .4s; transition-delay: calc(.3s + var(--i) * .55s); }
.pl.in .pl-st::before { background: var(--yf); border-color: var(--yf); }
.pl-st b { display: block; font-size: 17px; }
.pl-st span { font-size: 13px; color: var(--ink-2); }
.cohort { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 640px; margin: 48px auto 0; }
.cohort div { background: var(--bg-light); border-radius: 18px; padding: 18px; text-align: center; }
.cohort b { display: block; font-size: 36px; letter-spacing: -.02em; color: var(--yf); }
.cohort span { font-size: 13px; color: var(--ink-2); }
.rs .footer a { display: inline; margin-right: 16px; color: var(--blue-link); }

/* ---------- 响应式 ---------- */
@media (max-width: 1068px) {
  .pains { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .pipe { grid-template-columns: repeat(2, 1fr); }
  .app-body { grid-template-columns: 1fr; }
  .staffing { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .staffing { grid-template-columns: minmax(0, 340px) 1fr; grid-auto-flow: dense; align-items: start; }
  .staffing .pan-k, .staffing .st-desc { grid-column: 1 / -1; }
  .staffing .need { grid-column: 1; grid-row: span 4; margin: 0; }
  .staffing .st-row, .staffing .st-advice { grid-column: 2; }
}
@media (max-width: 833px) {
  .bcalc { grid-template-columns: 1fr; }
  .cons { grid-template-columns: 1fr; }
  .pl { grid-template-columns: 1fr; gap: 18px; padding-left: 8px; }
  .pl-line { left: 16px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; }
  .pl-line i { width: 100%; height: 0; transition-property: height; }
  .pl.in .pl-line i { height: 100%; }
  .pl-st { text-align: left; padding: 0 0 0 36px; }
  .pl-st::before { left: 8px; margin-left: 0; }
  .rkpis { grid-template-columns: repeat(2, 1fr); }
  .rkpis div:nth-child(2) { border-right: 0; }
  .rkpis div:nth-child(-n+2) { border-bottom: 1px solid #ececf0; }
}
@media (max-width: 560px) {
  .pains { grid-template-columns: 1fr 1fr; }
  .pain:last-child { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .pipe { grid-template-columns: 1fr; }
  .app { margin-left: -6px; margin-right: -6px; border-radius: 18px; }
  .app-ctl { padding: 14px 12px 0; }
  .app-ctl .seg { width: 100%; }
  .app-ctl .seg button { flex: 1; padding: 8px 6px; }
  .mode { width: 100%; } .mode button { flex: 1; }
  .app-body { padding: 14px 12px; }
  .staffing { grid-template-columns: 1fr; }
  .staffing .need, .staffing .st-row, .staffing .st-advice { grid-column: 1; grid-row: auto; }
  .rrow, .cov-row { grid-template-columns: 58px 1fr; }
  .axis, .legend { margin-left: 58px; }
  .rname { font-size: 12px; gap: 3px; padding: 2px; }
  .rname em { font-size: 9px; padding: 1px 3px; }
  .shift { font-size: 9px; }
  .cells span { font-size: 0; height: 16px; }
  .rkpis div { padding: 12px 14px; }
  .rkpis b { font-size: 22px; }
  .agent { padding: 12px 14px 16px; }
  .bcalc { padding: 20px 16px; }
  .cohort b { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-demand { stroke-dashoffset: 0; }
  .mm-staff, .mm-lbl, .mm-short, .mm-idle, .mm-tag { opacity: 1; }
  .pl-line i { width: 100%; }
}
