/* Shop Floor Execution page: phone and tablet layout (900px and below). Desktop (901px+) is untouched.
   Loaded after solutions-production.css and solutions-how-mobile.css, and only on this page.
   "How DelphEon helps" uses the shared story (solutions-how-mobile.css + theme/js/solutions-how.js); this sheet only
   trims its screens. The script at the foot of production-execution.php makes "Key capabilities" a story the same way
   (.is-story at 900px and below, .is-pinned when the window is tall enough to pin the stage). */

@media(max-width:900px){
 /* ---------- How DelphEon helps (the shared story is in solutions-how-mobile.css): this page's screens ---------- */
 .pe-how.is-story .pe-tab-panel .dk-cols{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:8px}
 .pe-how.is-story .pe-tablet .pe-wo+.dk-w{margin-top:8px}
 /* step 1: four machines as compact rows */
 .pe-how.is-story .pe-mach{gap:5px}
 .pe-how.is-story .pe-mach li{grid-template-columns:10px minmax(0,1fr) auto;column-gap:8px;padding:7px 8px;line-height:1.3}
 .pe-how.is-story .pe-mach i{grid-row:auto}
 .pe-how.is-story .pe-mach b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .pe-how.is-story .pe-mach small{white-space:nowrap;text-align:right}
 .pe-how.is-story .pe-tab-panel:nth-child(1) .dk-cols{grid-template-columns:minmax(0,.62fr) minmax(0,1.38fr)}
 .pe-how.is-story .pe-tab-panel:nth-child(1) .dk-cols .dk-w-h em{display:none}
 .pe-how.is-story .pe-tablet .pe-out{padding-block:9px}
 .pe-how.is-story .pe-chips{gap:6px}

 /* ---------- Key capabilities: the line is the stepper, the open capability's copy and screen sit under it ---------- */
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-caps-body{display:flex;flex-direction:column;align-items:stretch;gap:12px}
 .pe-caps.pe-caps-in.is-tabs.is-pinned .pe-caps-body{position:sticky;top:var(--top);padding-bottom:6px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-caps-hint{display:none}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-caps-map{flex:none}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-line{width:min(100%,330px);margin:0 auto}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-hs{width:34px;height:34px;margin:-17px 0 0 -17px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-hs:after{content:"";position:absolute;inset:-5px;border-radius:50%}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-hs svg{width:17px;height:17px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-hs span{display:none}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-hs.is-on{box-shadow:0 0 0 3px var(--pf-white),0 0 0 5px var(--pf-ink)}

 .pe-caps.pe-caps-in.is-tabs.is-story .pe-caps-panels{padding:16px 14px 14px;border-radius:24px}
 .pe-caps.pe-caps-in.is-tabs.is-pinned .pe-caps-panels{flex:1;min-height:0;display:flex;flex-direction:column}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap.is-on{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:0;border-radius:0;background:none;box-shadow:none;animation:none}
 .pe-caps.pe-caps-in.is-tabs.is-pinned .pe-cap.is-on{flex:1;min-height:0}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap:before{content:attr(data-n);position:absolute;top:0;right:0;padding:3px 9px;border-radius:12px;background:var(--pf-white);box-shadow:0 0 0 1px var(--pf-line);font-size:11.5px;font-weight:800;color:var(--pf-muted)}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-copy>small{margin:0 70px 6px 0;font-size:11.5px}
 .pf-page .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap h3{margin-bottom:6px;font-size:20px;line-height:1.2}
 .pf-page .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-copy .pe-cap-lead{font-size:15px;font-weight:600;line-height:1.45}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-copy>p:not(.pe-cap-lead){display:none}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-copy{flex:none;margin-bottom:0}
 .pe-caps.pe-caps-in.is-tabs.is-pinned .pe-cap-viz{flex:1;min-height:0;overflow:hidden}
 /* a zoomed screen still spans the column (it lays out wider, so it is also shorter) */
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz>.dv-screen{zoom:var(--mz,1);border-radius:16px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dv-panes{padding:10px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-w{padding:12px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-cols{gap:8px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dv-panes>.dk-w,.pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dv-panes>.dk-cols+.dk-w{margin-top:8px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-callout{margin-top:8px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-ring-svg{width:84px;height:84px}

 /* closing call to action: the heading and the button only, the paragraph is left to desktop */
 .pf-page .pf-final p{display:none}
 .pf-page .pf-final h2{margin-bottom:28px}
}

/* phones: step 3 shows the SOP alone (the record widget beside it drops out), step 4 the KPIs and the top losses
   (planned vs actual drops out) */
@media(max-width:600px){
 .pe-how.is-story .pe-tablet .pe-sop-cols{grid-template-columns:minmax(0,1fr)}
 .pe-how.is-story .pe-tablet .pe-sop-cols>.dk-w:nth-child(2){display:none}
 .pe-how.is-story .pe-tab-panel:nth-child(4) .dk-cols{grid-template-columns:minmax(0,1fr)}
 .pe-how.is-story .pe-tab-panel:nth-child(4) .dk-cols>.dk-w:first-child{display:none}
}

/* phones: each capability screen keeps its main widgets and drops one secondary piece, so it stays readable */
@media(max-width:600px){
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-oee .dv-panes>.dk-w,.pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-oee .dk-callout,
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-orders .dk-pane-h,.pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-orders .dk-callout,
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-sops .pe-sop-cols>.dk-w:nth-child(2),
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-changeover .dk-callout,
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-reporting .dk-cols>.dk-w:nth-child(2){display:none}
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-sops .pe-sop-cols,.pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-reporting .dk-cols{grid-template-columns:minmax(0,1fr)}
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-oee .dk-cols{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr)}
 /* the OEE ring shrinks with its narrow card instead of running past it */
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-oee .dk-cols>.dk-w:first-child{padding-inline:8px}
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-oee .dk-ring-svg{width:min(84px,100%);height:auto;aspect-ratio:1}
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-oee .dk-ring-c b{font-size:clamp(16px,5vw,21px)}
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-changeover .dk-cols{grid-template-columns:repeat(2,minmax(0,1fr))}
 /* work orders (here and on the tablet): id, quantity and status on one line, the progress bar full width under them */
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-wo li,.pe-how.is-story .pe-tablet .pe-wo li{grid-template-columns:minmax(0,1fr) auto auto;gap:6px 10px;padding:9px 12px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-wo li>div,.pe-how.is-story .pe-wo li>div{grid-area:1/1}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-wo li>span,.pe-how.is-story .pe-wo li>span{grid-area:1/2}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-wo li>em,.pe-how.is-story .pe-wo li>em{grid-area:1/3}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-wo .pe-prog,.pe-how.is-story .pe-wo .pe-prog{grid-area:2/1/3/-1}
 /* the product and line under each order id wrap instead of being cut off */
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-wo small{white-space:normal;line-height:1.35}
 /* bar lists (OEE losses, actual vs planned): label and value on one line, the bar full width under them, so the
    value never runs past the edge of a narrow widget */
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-hbars li{grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;padding:5px 0}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-hbars li>span{grid-area:1/1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-hbars b{grid-area:1/2}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-hbars i{grid-area:2/1/3/-1;height:8px}
}

/* short phones (most phones once the browser bars are showing): each screen drops one secondary widget
   so it keeps a readable size */
@media(max-width:600px) and (max-height:740px){
 .pe-how.is-story .pe-tab-panel:nth-child(1) .pe-out,
 .pe-how.is-story .pe-tab-panel:nth-child(2) .dk-callout,
 .pe-how.is-story .pe-tab-panel:nth-child(3) .pe-next,
 .pe-how.is-story .pe-tab-panel:nth-child(4) .dk-callout{display:none}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-line{width:min(100%,280px)}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-caps-body{gap:8px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-caps-panels{padding:14px 12px 12px}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-copy>small{display:none}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap.is-on{gap:10px}
 .pf-page .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap h3{margin-right:64px;font-size:18px}
 .pf-page .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-copy .pe-cap-lead{font-size:14px}
}

/* tablets (601–900px): the capability card */
@media(min-width:601px) and (max-width:900px){
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-caps-body{max-width:640px;margin-inline:auto}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-line{width:min(100%,420px)}
 /* widgets stay side by side as on desktop (the shared phone rule stacks them), so the screen is not a tall column
    that has to be shrunk to small text to fit */
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .dk-cols{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pe-caps.pe-caps-in.is-tabs.is-story #pe-cap-oee .dk-cols{grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr)}
 .pe-caps.pe-caps-in.is-tabs.is-story .pe-cap-viz .pe-sop-cols{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
 /* the card hugs its screen and only shrinks (zooming the screen) when the window is short */
 .pe-caps.pe-caps-in.is-tabs.is-pinned .pe-caps-panels,.pe-caps.pe-caps-in.is-tabs.is-pinned .pe-cap.is-on,.pe-caps.pe-caps-in.is-tabs.is-pinned .pe-cap-viz{flex:0 1 auto}
}
