/* Railway Predictive Maintenance page (/solutions/railway-predictive-maintenance/) — builds on platform-page.css, the section
   styles and tones (.dv-*, .dk-*) in platform-dashboards.css, and the Solutions patterns in solutions-production.css (.pe-*).
   Page-specific pieces are .rp-*. */

/* ---- hero copy ---- */
.rp-eyebrow{display:flex;justify-content:center;margin:6px 0 18px}
.rp-eyebrow span{padding:6px 14px;border-radius:20px;background:#FFE7DE;color:#B33B14;font-size:13px;font-weight:800;letter-spacing:.12em}
.pf-page .rp-hero h1{font-size:clamp(34px,4.4vw,60px);text-wrap:balance}

/* ---- hero picture: a board with the scene (left) and the RDPMS panel (right), then the five steps ---- */
.rp-viz{max-width:1180px;margin:44px auto 0;font-family:Manrope,Arial,sans-serif;text-align:left}
.rp-board{padding:18px;border-radius:28px;background:var(--pf-white);box-shadow:0 0 0 1px var(--pf-line),0 40px 70px -50px rgb(24 26 36 / .45)}
.rp-board-h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 6px 0}
.pf-page .rp-board-h p{margin:0}
.rp-board-h small{display:block;font-size:11.5px;font-weight:700;color:var(--pf-muted)}
.rp-board-h b{font-size:18px;letter-spacing:-.02em;color:var(--pf-ink)}
.rp-state em{display:none}
.rp-stage{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:14px;margin-top:14px}

/* the scene, drawn in viewBox units; HTML labels sit on it in % of the same box */
.rp-scene{position:relative;display:flex;align-items:center;border-radius:20px;overflow:hidden;background:#EEF1F5}
.rp-scene-in{position:relative;flex:none;width:100%;aspect-ratio:760/310}
.rp-art{position:absolute;inset:0;width:100%;height:100%;display:block}
.rp-ground{fill:#EEF1F5}
.rp-bed{fill:none;stroke:#DDE1E8;stroke-width:52}
.rp-bed-g{stroke:url(#rp-gravel);stroke-width:44}
.rp-slp{fill:none;stroke:#A9B1C1;stroke-width:28;stroke-dasharray:4.5 8.5}
.rp-rail{fill:none;stroke:#4A5368;stroke-width:2.6}
.rp-wire{fill:none;stroke:#7F8AA6;stroke-width:.9;opacity:.8}
.rp-mast rect{fill:#96A3C2;stroke:#4A5368;stroke-width:1}
.rp-mast path{stroke:#96A3C2;stroke-width:2}
.rp-hut rect{fill:#E2E5EB;stroke:#2B3550;stroke-width:1.6}
.rp-hut path{stroke:#2B3550;stroke-width:1.2;opacity:.6}
.rp-hut circle,.rp-ftu circle{fill:#2BB673}
.rp-ftu rect{fill:#F4F5F7;stroke:#2B3550;stroke-width:1.6}
.rp-ftu path{stroke:#2B3550;stroke-width:1.1;opacity:.55}
.rp-cable{fill:none;stroke:#2B3550;stroke-width:2;opacity:.35}
.rp-pm rect{fill:#D5D9E1;stroke:#2B3550;stroke-width:1.6}
.rp-pm circle:not(.rp-pm-ring){fill:#F4F5F7;stroke:#2B3550;stroke-width:1.4}
.rp-pm path{stroke:#2B3550;stroke-width:1.1;opacity:.55}
.rp-pm .rp-rod{stroke-width:3;opacity:1}
.rp-pm-ring{fill:none;stroke:transparent;stroke-width:3;transform-box:fill-box;transform-origin:center;transition:stroke .4s}
.rp-sig path{stroke:#2B3550;stroke-width:2}
.rp-sig>circle:not(.rp-g):not(.rp-r){fill:#2B3550}
.rp-sig rect{fill:#202A44}
.rp-g{fill:#2BB673}.rp-r{fill:#EE5A44}
.rp-off{opacity:.18}
.rp-trs rect{fill:#2B3550}.rp-trs path{stroke:#2B3550;stroke-width:1.4}
.rp-node rect{fill:#202A44}
.rp-node circle:not(.rp-ping){fill:var(--pf-orange)}
.rp-ping{fill:none;stroke:var(--pf-orange);stroke-width:2;opacity:0;transform-box:fill-box;transform-origin:center}
.rp-node path{stroke:#2B3550}

/* the train runs the main line; signal S12 turns red while the train is in its section */
.rp-car{fill:#DCE0E7;stroke:#2B3550;stroke-width:1.4}
.rp-cab{fill:var(--pf-orange)}
.rp-roof{fill:none;stroke:#9AA1B2;stroke-width:1.4}
.rp-panto{fill:#F4F5F7;stroke:#2B3550;stroke-width:1.1}
.rp-coupler{fill:#2B3550}
.rp-train{animation:rp-run 11s -3.5s linear infinite}
@keyframes rp-run{from{transform:translateX(-360px)}to{transform:translateX(820px)}}
.rp-s12 .rp-g{animation:rp-sig-g 11s -3.5s step-end infinite}
.rp-s12 .rp-r{animation:rp-sig-r 11s -3.5s step-end infinite}
@keyframes rp-sig-g{0%{opacity:1}20%{opacity:.18}68%{opacity:1}}
@keyframes rp-sig-r{0%{opacity:.18}20%{opacity:1}68%{opacity:.18}}

/* mesh links, packets and the maintainer: what each step shows */
.rp-ln{fill:none;stroke:#9AA1B2;stroke-width:1.6;stroke-dasharray:3 5;opacity:.35;transition:opacity .4s,stroke .4s}
.rp-l5,.rp-up{opacity:0}
.rp-x{opacity:0;transition:opacity .3s}
.rp-x path{stroke:#D9472F;stroke-width:3;stroke-linecap:round}
.rp-pk{opacity:0;transition:opacity .3s}
.rp-pk circle{fill:var(--pf-orange)}
.rp-tech{opacity:0;transform:translate(660px,372px);transition:transform 2.4s cubic-bezier(.45,0,.3,1),opacity .4s}

.rp-viz[data-phase="0"] .rp-ping{animation:rp-ping 1.8s var(--d,0s) ease-out infinite}
.rp-viz[data-phase="1"] .rp-ln:not(.rp-up){opacity:1;stroke:var(--pf-orange);animation:rp-flow 1s linear infinite}
.rp-viz[data-phase="1"] .rp-l3{stroke:#EE8574;stroke-dasharray:2 7;animation:none;opacity:.8}
.rp-viz[data-phase="1"] :is(.rp-x,.rp-pk-a){opacity:1}
.rp-viz[data-phase="2"] .rp-ln:not(.rp-l5){opacity:.9}
.rp-viz[data-phase="2"] :is(.rp-up,.rp-cable){opacity:1;stroke:var(--pf-orange);animation:rp-flow 1s linear infinite}
.rp-viz[data-phase="2"] .rp-cable{stroke-dasharray:6 4}
.rp-viz[data-phase="2"] .rp-pk-b{opacity:1}
.rp-viz[data-phase="2"] .rp-pm-ring{stroke:#5B9BD5}
.rp-viz:is([data-phase="3"],[data-phase="4"]) .rp-ln:not(.rp-l5){opacity:.5}
.rp-viz[data-phase="3"] .rp-pm-ring{stroke:#EE5A44;animation:rp-alarm 1.2s ease-in-out infinite}
.rp-viz[data-phase="3"] .rp-pm rect{fill:#F7B6A6}
.rp-viz[data-phase="4"] .rp-pm-ring{stroke:#2BB673}
.rp-viz[data-phase="4"] .rp-tech{opacity:1;transform:translate(340px,330px)}
@keyframes rp-ping{0%{opacity:.9;transform:scale(.8)}100%{opacity:0;transform:scale(2.2)}}
@keyframes rp-flow{to{stroke-dashoffset:-16}}
@keyframes rp-alarm{50%{transform:scale(1.25);opacity:.4}}

/* labels on the scene: each belongs to one step */
.rp-tag{position:absolute;z-index:1;padding:5px 10px;border-radius:20px;background:#fff;box-shadow:0 0 0 1.5px var(--k),0 8px 18px -10px rgb(24 26 36 / .45);color:var(--kt);font-size:12px;font-weight:800;line-height:1.2;white-space:nowrap;transform:translate(-50%,calc(-100% - 6px));opacity:0;transition:opacity .35s;pointer-events:none}
.rp-tag-b{transform:translate(-50%,6px)}
.rp-tag-r{transform:translate(-100%,calc(-100% - 6px))}

/* the RDPMS panel: one view per step */
.rp-panel{display:flex;flex-direction:column;padding:16px;border-radius:20px;background:var(--pf-surface);box-shadow:0 0 0 1px var(--pf-line)}
.pf-page .rp-panel p{margin:0}
.rp-panel-h{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px;margin-bottom:12px!important;border-bottom:1px solid var(--pf-line)}
.rp-panel-h b{font-size:15px;letter-spacing:.08em;color:var(--pf-ink)}
.rp-pn{display:none}
.rp-pn-h small{display:block;font-size:11.5px;font-weight:700;color:var(--pf-muted)}
.rp-pn-h b{display:block;font-size:16px;letter-spacing:-.02em;color:var(--pf-ink);margin-bottom:10px}
.rp-rows{margin:0 0 12px;padding:0;list-style:none}
.rp-rows li{display:flex;justify-content:space-between;gap:8px;padding:7px 0;font-size:13px}
.rp-rows li+li{border-top:1px dashed var(--pf-line)}
.rp-rows span{font-weight:600;color:#6D7283}
.rp-rows b{white-space:nowrap;color:var(--pf-ink)}
.rp-dot{display:inline-block;width:7px;height:7px;margin-left:4px;border-radius:50%;background:var(--k);vertical-align:1px}
.pf-page .rp-note{padding:8px 10px;border-radius:10px;background:var(--kb);font-size:12.5px;font-weight:700;color:var(--kt)}
.rp-spark{display:block;width:100%;height:auto;margin:4px 0 6px;overflow:visible}
.rp-spark-lim{stroke:#EE8574;stroke-width:1.4;stroke-dasharray:5 4}
.rp-spark-ln{fill:none;stroke:#5B9BD5;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.rp-spark circle{fill:#5B9BD5;stroke:#fff;stroke-width:2}
.pf-page .rp-legend{display:flex;gap:14px;margin-bottom:12px!important;font-size:11.5px;font-weight:700;color:#6D7283}
.rp-legend i{display:inline-block;width:14px;height:0;margin-right:6px;vertical-align:3px;border-top:3px solid #5B9BD5}
.rp-legend .rp-k-lim{border-top:2px dashed #EE8574}
.rp-alert{margin-bottom:12px;padding:12px;border-radius:14px;background:#fff;box-shadow:inset 3px 0 0 var(--k),0 0 0 1px var(--pf-line)}
.pf-page .rp-alert p{margin-top:8px;font-size:13px;line-height:1.5;color:var(--pf-text)}
.rp-ticks{margin:0 0 12px;padding:0;list-style:none}
.rp-ticks li{display:flex;gap:8px;align-items:flex-start;padding:6px 0;font-size:13px;font-weight:600;color:var(--pf-ink)}
.rp-ticks svg{flex:none;width:18px;height:18px;padding:2px;border-radius:50%;background:#E6F6EF;fill:none;stroke:#257A55;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.rp-kpi{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rp-kpi span{padding:8px 10px;border-radius:12px;background:#fff;box-shadow:0 0 0 1px var(--pf-line)}
.rp-kpi small{display:block;font-size:11.5px;font-weight:700;color:var(--pf-muted)}
.rp-kpi b{font-size:15px;color:var(--pf-ink)}
.rp-kpi i{font-style:normal;color:#1E9E5A}

/* the open step: its status pill, labels and panel view */
.rp-viz[data-phase="0"] :is(.rp-st0,.rp-pn0,.rp-cap0),.rp-viz[data-phase="1"] :is(.rp-st1,.rp-pn1,.rp-cap1),.rp-viz[data-phase="2"] :is(.rp-st2,.rp-pn2,.rp-cap2),
.rp-viz[data-phase="3"] :is(.rp-st3,.rp-pn3,.rp-cap3),.rp-viz[data-phase="4"] :is(.rp-st4,.rp-pn4,.rp-cap4){display:block;animation:rp-in .4s ease both}
.rp-viz[data-phase="0"] .rp-tg0,.rp-viz[data-phase="1"] .rp-tg1,.rp-viz[data-phase="2"] .rp-tg2,.rp-viz[data-phase="3"] .rp-tg3,.rp-viz[data-phase="4"] .rp-tg4{opacity:1}
@keyframes rp-in{from{opacity:0;transform:translateY(6px)}}

/* the steps: buttons with an orange bar that fills while a step is open */
.rp-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:14px 0 0;padding:0;list-style:none}
.rp-step{position:relative;display:flex;flex-direction:column;gap:4px;width:100%;height:100%;padding:14px 14px 16px;border:0;border-radius:16px;background:var(--pf-surface);box-shadow:0 0 0 1px var(--pf-line);font:inherit;text-align:left;color:var(--pf-text);cursor:pointer;overflow:hidden;transition:background .3s,box-shadow .3s}
.rp-step small{font-size:12px;font-weight:800;color:var(--pf-muted)}
.rp-step b{font-size:15.5px;letter-spacing:-.02em;color:var(--pf-ink)}
.rp-step span{font-size:13px;line-height:1.45}
.rp-step:hover{background:#fff}
.rp-step:focus-visible{outline:2px solid var(--pf-blue);outline-offset:3px}
.rp-step[aria-pressed="true"]{background:#fff;box-shadow:0 0 0 1.5px var(--pf-ink),0 14px 28px -20px rgb(24 26 36 / .5)}
.rp-step[aria-pressed="true"] small{color:var(--pf-orange)}
.rp-step-timer{position:absolute;left:0;right:0;top:0;height:3px;background:var(--pf-orange);transform-origin:left;transform:scaleX(0)}
.rp-step[aria-pressed="true"] .rp-step-timer{transform:scaleX(1)}
.rp-viz:not(.is-manual) .rp-step[aria-pressed="true"] .rp-step-timer{animation:rp-fill 5.5s linear both}
.rp-viz.is-paused .rp-step-timer,.rp-steps:hover .rp-step-timer{animation-play-state:paused!important}
@keyframes rp-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.rp-caps{display:none}
.pf-page .rp-caps p{display:none;margin:0;font-size:14.5px;line-height:1.5;color:var(--pf-text)}

/* ---- what is RDPMS: facts at a glance ---- */
.rp-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0}
.rp-facts div{padding:20px 22px;border-radius:20px;background:var(--pf-white);box-shadow:0 0 0 1px var(--pf-line)}
.rp-facts dt{margin-bottom:6px;font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--pf-muted)}
.rp-facts dd{margin:0;font-size:17px;font-weight:700;line-height:1.35;letter-spacing:-.02em;color:var(--pf-ink)}

/* ---- metrics that matter ---- */
.rp-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.rp-metric{display:flex;flex-direction:column;padding:24px 24px 30px;border-radius:24px;background:var(--pf-surface);box-shadow:0 0 0 1px var(--pf-line)}
.rp-metric-pic{display:flex;flex-direction:column;justify-content:center;gap:16px;min-height:190px;margin-bottom:24px;padding:20px 22px;border-radius:18px;background:#fff;box-shadow:0 0 0 1px var(--pf-line)}
.pf-page .rp-mt-row{margin:0}
.rp-mt-row small{display:block;margin-bottom:6px;font-size:12px;font-weight:700;color:var(--pf-muted)}
.rp-bar{display:flex;gap:4px}
.rp-bar-s{width:46%}
.rp-bar i{flex:0 0 calc(var(--w) - 3px);padding:7px 8px;border-radius:8px;background:var(--kb);box-shadow:inset 0 -3px 0 var(--k);font-style:normal;font-size:11.5px;font-weight:700;color:var(--kt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-line{position:relative;display:block;height:30px;border-radius:15px;background:#F2F3F6}
.rp-line b{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;background:#EE8574;box-shadow:0 0 0 3px #FDECE8}
.rp-line-ok b{background:#5B9BD5;box-shadow:0 0 0 3px #EAF2FB}
.rp-line em{position:absolute;top:50%;transform:translateY(-50%);font-style:normal;font-size:11.5px;font-weight:700;color:#2C68A8;text-align:center;white-space:nowrap}
.pf-page .rp-mt-cap{margin:0;font-size:13px;font-weight:600;color:var(--pf-text)}
.pf-page .rp-metric-k{margin-bottom:6px;font-size:13px;font-weight:800;letter-spacing:.12em;color:var(--pf-orange)}
.pf-page .rp-metric h3{font-size:24px;letter-spacing:-.03em;line-height:1.2;margin-bottom:10px}
.pf-page .rp-metric p:last-child{font-size:16px;line-height:1.6}
.rp-why{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,.4fr) minmax(0,1fr);gap:40px;align-items:center;padding:36px 40px;border-radius:24px;background:var(--pf-ink)}
.pf-page .rp-why h3{font-size:clamp(26px,2.6vw,36px);color:#fff}
.pf-page .rp-why p{font-size:18px;line-height:1.6;color:#C9CDDB}

/* ---- key components: four cards joined by arrows in the order data travels ---- */
.rp-chain{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;margin:0;padding:0;list-style:none;counter-reset:none}
.rp-comp{position:relative;display:flex;flex-direction:column;padding:20px 20px 26px;border-radius:24px;background:var(--pf-white);box-shadow:0 0 0 1px var(--pf-line)}
.rp-comp:not(:last-child):after{content:"";position:absolute;top:96px;right:-19px;z-index:1;width:16px;height:16px;border-radius:50%;background:var(--pf-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4l4 4-4 4' fill='none' stroke='%23181A24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;box-shadow:0 0 0 4px var(--pf-bg)}
.rp-comp-pic{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:170px;margin-bottom:22px;border-radius:18px;background:var(--pf-surface)}
.rp-comp-pic svg{width:86%;height:auto;max-height:130px;overflow:visible}
.rp-d-body{fill:#F4F5F7;stroke:#2B3550;stroke-width:1.75}
.rp-d-scr{fill:#2E3549}
.rp-d-led{fill:var(--pf-orange)}
.rp-d-led2{fill:#2BB673}
.rp-d-thin{fill:none;stroke:#2B3550;stroke-width:1.2;opacity:.5}
.rp-d-cable{fill:none;stroke:#2B3550;stroke-width:2.5;opacity:.45}
.rp-d-ring{fill:#E2E5EB;stroke:#2B3550;stroke-width:1.75}
.rp-d-face{fill:#fff;stroke:#2B3550;stroke-width:1.5}
.rp-d-ant{stroke:#2B3550;stroke-width:3;stroke-linecap:round}
.rp-d-wave{fill:none;stroke:var(--pf-orange);stroke-width:2;stroke-linecap:round}
.rp-d-mesh{fill:#fff;stroke:#5B9BD5;stroke-width:2}
.rp-d-link{fill:none;stroke:#5B9BD5;stroke-width:1.5;stroke-dasharray:3 4}
.rp-d-io{fill:#D5D9E1;stroke:#2B3550;stroke-width:1.2}
.rp-protos{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px;margin:0!important}
.rp-protos span{padding:3px 8px;border-radius:10px;background:#EAF2FB;color:#2C68A8;font-size:11px;font-weight:800}
.rp-comp-step{margin-bottom:8px;font-size:13px;font-weight:800;color:var(--pf-orange)}
.pf-page .rp-comp h3{font-size:21px;letter-spacing:-.03em;line-height:1.2;margin-bottom:10px}
.pf-page .rp-comp p{font-size:15px;line-height:1.6}
.rp-comps-more{margin-top:32px!important}

/* ---- motion off: the train stands at the junction, nothing pulses or flows ---- */
@media (prefers-reduced-motion: reduce){
 .rp-train{animation:none;transform:translateX(-20px)}
 .rp-s12 .rp-g,.rp-s12 .rp-r,.rp-ping,.rp-ln,.rp-pm-ring,.rp-cable,.rp-up{animation:none!important}
 .rp-pk{display:none}
 .rp-tech{transition:none}
}

/* ---- tablets ---- */
@media (max-width: 1100px){
 .rp-chain{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rp-comp:nth-child(2):after{display:none}
 .rp-why{grid-template-columns:1fr;gap:12px}
}
@media (max-width: 900px){
 .rp-stage{grid-template-columns:1fr}
 .rp-panel{min-height:0}
 .rp-steps{gap:6px}
 .rp-step{align-items:center;gap:2px;padding:10px 6px 12px;text-align:center}
 .rp-step b{font-size:13px;line-height:1.2}
 .rp-step span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 .rp-caps{display:block;margin-top:12px;padding:0 4px}
 .rp-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rp-metrics{grid-template-columns:1fr}
 /* metrics that matter: MTTR, MTBF and "Why it matters" stack over each other as you scroll. The script adds
    .is-stacked: each card pins under the header (--top) and the next slides over it; a covered card shrinks back (--cover) */
 .rp-metric,.rp-why{box-shadow:0 0 0 1px var(--pf-line),0 -16px 32px -24px rgb(24 26 36 / .35)}
 .rp-metrics.is-stacked>*{position:sticky;top:var(--top,80px);transform-origin:50% 0;transform:scale(calc(1 - var(--cover,0) * .05))}
 /* key components: one column, stacking the same way (the arrows between cards go) */
 .rp-chain{grid-template-columns:1fr;gap:20px}
 .rp-comp:after{display:none}
 .rp-comp{box-shadow:0 0 0 1px var(--pf-line),0 -16px 32px -24px rgb(24 26 36 / .35)}
 .rp-chain.is-stacked>.rp-comp{position:sticky;top:var(--top,80px);transform-origin:50% 0;transform:scale(calc(1 - var(--cover,0) * .05))}
}

/* ---- phones: the scene is cropped to the junction (the train, signals, point machine, FTU and hut), labels shrink ---- */
@media (max-width: 700px){
 .rp-scene-in{width:128%;margin-left:-18%}
 .rp-tag{padding:4px 8px;font-size:10.5px}
 .rp-board{padding:12px;border-radius:22px}
 .rp-board-h{flex-direction:column;align-items:flex-start;gap:6px}
 .rp-board-h em{font-size:11px}
 .rp-eyebrow{margin-bottom:14px}
}
@media (max-width: 600px){
 .rp-step small{font-size:11px}
 .rp-step b{font-size:11.5px;letter-spacing:-.01em}
 .rp-facts{grid-template-columns:1fr}
 .rp-facts div{padding:16px 18px}
 .rp-chain{grid-template-columns:1fr}
 .rp-comp:after{display:none}
 .rp-metric{padding:18px 18px 24px}
 .rp-metric-pic{padding:16px}
 .rp-bar-s{width:72%}
 .rp-bar i{white-space:normal;line-height:1.25;font-size:11px}
 .rp-why{padding:28px 24px}
 .pf-page .rp-why p{font-size:16.5px}
}
