/* Solutions pages, "How DelphEon helps" (.pe-how): phone and tablet layout (900px and below). Desktop (901px+) is untouched.
   Shared by every Solutions page; loaded after solutions-production.css and the page's own sheet.
   theme/js/solutions-how.js adds .is-story at 900px and below, and .is-pinned when the window is tall enough to pin the
   stepper, the open step's copy and its tablet screen while the steps scroll past (one step per --step px of scroll).
   Page-specific trims (which widget drops out on a phone) sit at the end, under each page's own class. */

/* the open step's title and copy share one box inside each tab; on desktop the box is not there at all */
.pe-how-c{display:contents}

@media(max-width:900px){
 /* a stepper, the open step's copy, then its tablet screen right under it */
 .pe-how.is-story .dv-split{margin-bottom:24px}
 .pe-how.is-story .pe-how-grid{display:flex;flex-direction:column;align-items:stretch;gap:14px;max-width:640px;margin-inline:auto}
 .pe-how.is-pinned .pe-how-grid{position:sticky;top:var(--top);padding-bottom:6px}

 /* stepper: four numbered segments, each with a bar that fills as its step scrolls past */
 .pe-how.is-story .pe-how-tabs{position:relative;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-width:none;padding-bottom:calc(var(--cap,140px) + 12px)}
 .pe-how.is-story .pe-how-tab,.pe-how.is-story .pe-how-tab[aria-selected=true]{position:static;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px;min-height:44px;padding:8px 2px 6px;border-radius:12px;background:none;box-shadow:none;overflow:visible}
 .pe-how.is-story .pe-how-tab>small{padding:0;font-size:13px;font-weight:800;line-height:1;color:var(--pf-muted)}
 .pe-how.is-story .pe-how-tab[aria-selected=true]>small,.pe-how.is-story .pe-how-tab.is-past>small{color:var(--pf-ink)}
 .pe-how.is-story .pe-how-tab[aria-selected=true]>small{color:var(--pf-orange)}
 .pe-how.is-story .pe-how-timer{position:relative;left:auto;right:auto;bottom:auto;display:block;width:100%;height:4px;background:#DCE0E8}
 .pe-how.is-story .pe-how-timer:after{animation:none!important;transform:scaleX(0);transition:transform .2s linear}
 .pe-how.is-story .pe-how-tab.is-past .pe-how-timer:after{transform:none}
 .pe-how.is-pinned .pe-how-tab[aria-selected=true] .pe-how-timer:after{transform:scaleX(var(--f,0))}
 .pe-how.is-story:not(.is-pinned) .pe-how-tab[aria-selected=true] .pe-how-timer:after{transform:none}

 /* the open step's title and copy, under the stepper; the others wait, hidden, in the same place */
 .pe-how.is-story .pe-how-c{position:absolute;left:0;right:0;top:58px;display:block;padding:14px 16px 16px;border-radius:18px;background:var(--pf-white);box-shadow:0 0 0 1px var(--pf-line),0 16px 34px -28px rgb(24 26 36 / .45);visibility:hidden;opacity:0;transition:opacity .3s ease,visibility 0s .3s}
 .pe-how.is-story .pe-how-tab[aria-selected=true] .pe-how-c{visibility:visible;opacity:1;transition:opacity .3s ease}
 .pe-how.is-story .pe-how-t{display:block;font-size:18px;line-height:1.25;color:var(--pf-ink)}
 .pe-how.is-story .pe-how-d,.pe-how.is-story .pe-how-tab[aria-selected=true] .pe-how-d{display:block;margin-top:6px}
 .pe-how.is-story .pe-how-d>span{display:block;font-size:14.5px;line-height:1.5}

 /* the tablet: no person beside it; it takes the room left under the copy and its screen is zoomed (--mz) to fit */
 .pe-how.is-story .pe-how-stage{display:block;min-height:0}
 .pe-how.is-pinned .pe-how-stage{flex:1;overflow:hidden}
 .pe-how.is-story .pe-how-fig{display:none}
 .pe-how.is-story .pe-tablet{padding:7px;border-radius:22px;box-shadow:0 0 0 1px #2B2F3A,0 24px 40px -30px rgb(24 26 36 / .6)}
 .pe-how.is-story .pe-tablet:before{top:2px;width:4px;height:4px;margin-left:-2px}
 /* the screen is exactly the tablet's width: its one column would otherwise grow to the widest panel's content
    (a no-wrap bar title, a table) and push the right-hand side of every screen out of view */
 .pe-how.is-story .pe-tab-screen{grid-template-columns:minmax(0,1fr);border-radius:16px}
 .pe-how.is-story .pe-tab-panel{min-width:0}
 /* pinned: the tablet fills the room; each screen's panes are zoomed on their own (--mz) so only a tall screen shrinks */
 .pe-how.is-pinned .pe-tablet{display:flex;max-height:100%}
 .pe-how.is-pinned .pe-tab-screen{flex:1 1 auto;min-height:0;grid-template-rows:minmax(0,1fr)}
 .pe-how.is-pinned .pe-tab-panel{min-height:0}
 .pe-how.is-pinned .pe-tab-panel .dv-panes{min-height:0;overflow:hidden;zoom:var(--mz,1)}
 .pe-how.is-story .pe-tab-bar{gap:8px;padding:8px 12px}
 .pe-how.is-story .pe-tab-bar .pe-tab-logo{height:24px}
 .pe-how.is-story .pe-tab-bar>span{font-size:12px}
 .pe-how.is-story .pe-tab-bar small{display:none}
 .pe-how.is-story .pe-tab-panel .dv-panes{padding:10px}
 .pe-how.is-story .pe-tablet .dk-w{padding:12px}
 .pe-how.is-story .pe-tablet .dk-cols+.dk-w,.pe-how.is-story .pe-tablet .dk-w+.dk-w,.pe-how.is-story .pe-tablet .dk-kpis+.dk-cols{margin-top:8px}
 .pe-how.is-story .pe-tablet .dk-callout{margin-top:8px}
 .pe-how.is-story .pe-tablet .dk-ring-svg{width:84px;height:84px}
 /* KPI tiles: the sparkline beside the status pill gives way in a narrow tile instead of running into the next one */
 .pe-how.is-story .pe-tablet .dk-kpi-f svg{flex:0 1 56px;min-width:0}
}

/* short phones (most phones once the browser bars are showing): tighter copy */
@media(max-width:600px) and (max-height:740px){
 .pe-how.is-story .pe-how-c{top:54px;padding:12px 14px 13px}
 .pe-how.is-story .pe-how-t{font-size:16.5px}
 .pe-how.is-story .pe-how-d>span{font-size:13.5px;line-height:1.45}
 .pe-how.is-story .pe-how-tabs{padding-bottom:calc(var(--cap,130px) + 8px)}
 .pe-how.is-story .pe-how-grid{gap:10px}
}

/* tablets (601–900px): a little more air round the steps */
@media(min-width:601px) and (max-width:900px){
 .pe-how.is-story .pe-how-c{padding:16px 20px 18px}
 .pe-how.is-story .pe-how-t{font-size:20px}
 .pe-how.is-story .pe-how-d>span{font-size:15.5px}
 /* paired widgets stay side by side as on desktop (the shared phone rule stacks them), so a chart is not stretched
    across the whole tablet */
 .pe-how.is-story .pe-tablet .dk-cols{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- page trims: phones keep each screen's main widgets readable ---------- */
@media(max-width:600px){
 /* Quality: the inspection table drops its specification column (the Pass pill says it met spec); the LIMS stepper
    names only the current stage; the trace chain keeps each id on one line */
 .qt-how.is-story .qt-insp li{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 52px;gap:8px}
 .qt-how.is-story .qt-insp li>:nth-child(2){display:none}
 .qt-how.is-story .qt-lims{padding:10px 12px}
 .qt-how.is-story .qt-lims li:not(.is-now){font-size:0;gap:0}
 .qt-how.is-story .qt-chain>i{width:14px}
 .qt-how.is-story .qt-cn{padding:9px 9px}
 .qt-how.is-story .qt-cn b{font-size:12.5px;white-space:nowrap}
 .qt-how.is-story .qt-cn-lots{flex:1.25;grid-template-columns:auto;row-gap:1px}
 .qt-how.is-story .qt-cn-lots b{font-size:11.5px}
 /* Asset Maintenance step 1: the KPI cards, the vibration trend and the next step; the status list drops out */
 .mr-how.is-story .pe-tab-panel:nth-child(1) .mr-cols{grid-template-columns:minmax(0,1fr)}
 .mr-how.is-story .pe-tab-panel:nth-child(1) .mr-cols>.dk-w:nth-child(2){display:none}
 /* step 2 keeps the fault chart and the repeat list (the callout drops out); step 3 the work order and its parts */
 .mr-how.is-story .pe-tab-panel:nth-child(2) .dk-callout{display:none}
 .mr-how.is-story .pe-tab-panel:nth-child(3) .dk-cols{grid-template-columns:minmax(0,1fr)}
 .mr-how.is-story .pe-tab-panel:nth-child(3) .dk-cols>.dk-w:nth-child(2){display:none}
 /* Plant Logistics step 3: the four bays as a 2 × 2 grid so each status word fits */
 .lg-how.is-story .lg-bays{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* short phones (most phones once the browser bars are showing): each screen drops one more secondary piece so it keeps
   a readable size (Shop Floor Execution's own trims are in solutions-production-mobile.css) */
@media(max-width:600px) and (max-height:740px){
 .qt-how.is-story .pe-tab-panel:nth-child(1) .pe-next,
 .qt-how.is-story .pe-tab-panel:nth-child(2) .pe-next,
 .qt-how.is-story .pe-tab-panel:nth-child(4) .dk-callout,
 .mr-how.is-story .pe-tab-panel:nth-child(1) .pe-next,
 .mr-how.is-story .pe-tab-panel:nth-child(2) .dk-events>li:nth-child(3),
 .mr-how.is-story .pe-tab-panel:nth-child(4) .dk-callout,
 .pb-how.is-story .pe-tab-panel:nth-child(1) .pe-next,
 .pb-how.is-story .pe-tab-panel:nth-child(3) .pb-deltas,
 .pb-how.is-story .pe-tab-panel:nth-child(4) .pe-next,
 .lg-how.is-story .pe-tab-panel:nth-child(2) .pe-next,
 .lg-how.is-story .pe-tab-panel:nth-child(4) .lg-sum-cols{display:none}
 /* Process step 1: with the alert gone the trend takes the full width */
 .pb-how.is-story .pe-tab-panel:nth-child(1) .dk-cols{grid-template-columns:minmax(0,1fr)}
}

@media(max-width:900px) and (prefers-reduced-motion:reduce){
 .pe-how.is-story .pe-how-c,.pe-how.is-story .pe-how-timer:after{transition:none}
}
