/* The Peeloff shell (whole-app plan step 2, docs/peeloff-whole-app/plan.md): Make tomorrow is a day line of three stops,
   Count and MEOs, Rooms and people, Send. Each stop shows its own part of the page on every screen size, replacing
   the steps rail, the phone's bottom tabs and the board's Morning/Afternoon toggle. Touch-sized (44 px) stops. */
:root{--sh-forest:#174a43;--sh-ink:#13201d;--sh-muted:#5d6e68;--sh-line:#d7dfd9;--sh-lime:#d7f68b;--sh-amber:#9a5b00;--sh-amber-bg:#fff3d6;--sh-done:#edf3e6}

/* The day line. */
#creator-steps.creator-steps{display:block;margin:0 0 14px;position:static;padding:0;border:0;background:none;overflow:visible}
.day-line{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;position:relative}
.day-line li{min-width:0}
.day-stop{all:unset;touch-action:manipulation;box-sizing:border-box;display:flex;flex-direction:column;gap:2px;width:100%;min-height:56px;height:100%;padding:9px 12px;border:1px solid var(--sh-line);border-radius:12px;background:#fff;color:var(--sh-ink);cursor:pointer}
.day-stop:focus-visible{outline:3px solid var(--sh-forest);outline-offset:2px}
.day-stop-label{display:flex;align-items:center;gap:7px;font-weight:750;font-size:14px;font-stretch:88%}
.day-stop-n{display:inline-grid;place-items:center;flex:none;width:22px;height:22px;border-radius:50%;border:2px solid var(--sh-forest);font-size:12px;font-weight:800;color:var(--sh-forest);background:#fff}
.day-stop-title{font-size:13.5px;font-weight:650;color:var(--sh-muted)}
.day-stop-sub{font-size:12px;color:var(--sh-muted)}
.day-stop.is-done{background:var(--sh-done);border-color:transparent}
.day-stop.is-done .day-stop-n{background:var(--sh-forest);color:#fff}
.day-stop.is-now .day-stop-title{color:var(--sh-amber)}
.day-stop.is-warn{background:#fbf5e8;border-color:#ead8b0}
.day-stop.is-warn .day-stop-title{color:var(--sh-amber)}
.day-stop.is-current{border:2px solid var(--sh-forest);padding:8px 11px;background:#f3f8e8;box-shadow:0 2px 0 var(--sh-forest)}
/* Phones and tablets: the stops stay pinned at the top as the page scrolls (step 3: tablets too); the board's sticky
   names column sits under them. */
@media(max-width:1059px){#creator-steps.creator-steps{position:sticky;top:0;z-index:6;margin:0 -12px 12px;padding:8px 12px;background:#fff;border-bottom:1px solid var(--sh-line)}
 .board-rail{top:calc(var(--steps-h,0px) + 12px);max-height:calc(100vh - 24px - var(--steps-h,0px))}}
@media(max-width:700px){
 /* Phones: three compact stops; the first line of each, no sub-line. */
 .day-line{gap:6px}
 .day-stop{min-height:48px;padding:6px 8px}
 .day-stop.is-current{padding:5px 7px}
 .day-stop-label{font-size:12.5px;gap:5px}
 .day-stop-n{width:18px;height:18px;font-size:10.5px}
 .day-stop-title{font-size:12px;line-height:1.25}
 .day-stop-sub{display:none}
}

/* The board's own Morning/Afternoon toggle: the stop decides now. */
.schedule-board .board-mode{display:none!important}

/* What each stop shows (every width). */
body:not([data-stop=people]) .creator-layout-bar{display:none!important}
/* #typed-gap is an afternoon warning (renderTypedGap); on Count the morning panel shows typed vs the board itself. */
body:not([data-stop=people]) :is(#rooms-check,#double-booked,#typed-gap){display:none!important}
/* Staffing warnings (MEO eligibility, 4665/DOD, imports) show on Count and Rooms and people; Send has them in its checks. */
body[data-stop=send] #people-warnings{display:none!important}
/* A failed staffing import (Retry) shows wherever the Peeloff panel's own copy is out of sight. */
body[data-stop=people]:not([data-creator-layout=board]) #stop-staffing-status{display:none!important}
.stop-staffing-status:not([hidden]){margin:0 0 12px}
/* Before app.js draws the stops, and if it never does, no empty bar. */
#creator-steps.creator-steps:empty{display:none}
/* Cases moved on Count's morning board are listed there too, with their Remove move buttons (renderRoomsCheck). */
body[data-stop=count] #rooms-check.is-moves:not([hidden]){display:block!important}
.people-warnings:not([hidden]){display:block;margin:0 0 12px}
body:not([data-stop=count]) #morning-workflow{display:none!important}
body[data-stop=send] .schedule-board{display:none!important}
body[data-stop=count] .schedule-board{display:block!important}
body[data-stop=count] .workspace{display:none!important}
body[data-stop=send] .workspace>:is(.list-side,#room-planning,#staff-planning,#crna-planning){display:none!important}
body[data-stop=people] .workspace>#schedule-review{display:none!important}
body[data-stop=send] .workspace>#schedule-review{display:block!important}
body[data-stop=send] .workspace{display:block}

/* Rooms and people on a phone or tablet, list view: the peeloff, then the CRNAs, with the side panel above (its buttons,
   the open rooms to pick from, and "Still needs you"); the room planner behind Edit rooms. */
@media(max-width:1059px){
 body[data-stop=people]:not([data-creator-layout=board]) .workspace>.list-side{display:flex;flex-direction:column;gap:10px;margin:0 0 12px}
 body[data-stop=people]:not([data-creator-layout=board]) .workspace>#crna-planning{display:block!important;margin-top:12px}
 body[data-stop=people].rooms-editing:not([data-creator-layout=board]) .workspace>#room-planning{display:block!important;margin-bottom:12px}
 body[data-stop=people].rooms-editing:not([data-creator-layout=board]) .workspace>.list-side :is(.list-side-needs,.list-side-rooms){display:none}
 .list-side #md-room-tray{border:0;padding:0;background:none}
 .list-side-bar .button,.list-side-bar .text-button{min-height:44px}
}

/* Wide screens (style.css makes main two columns at 1500 px): the day line and every banner span the page. */
@media(min-width:1500px){main>:is(#creator-steps,#credit-nudge,#people-warnings,#stop-staffing-status,#rooms-check,#double-booked,#typed-gap,#update-notice){grid-column:1/-1}}

/* Jumps to a section (the CRNA link, the board) land below the pinned day line. */
html{scroll-padding-top:calc(var(--steps-h,0px) + 18px)}
/* On a phone's Count stop the morning sum is pinned under it too. */
html:has(body.msum-pinned){scroll-padding-top:calc(var(--steps-h,0px) + 74px)}
/* The one-time guide offer (guide-offer.js, whole-app step 10): a small card bottom-left, never in the way of work. */
.guide-offer{position:fixed;left:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:30;max-width:340px;padding:14px 16px;border-radius:14px;background:#fff;border:1px solid var(--sh-line);border-left:5px solid var(--sh-forest);box-shadow:0 14px 36px #13201d2e;color:var(--sh-ink);font-size:14px;line-height:1.45}
.guide-offer p{margin:0 0 10px}
.guide-offer-actions{display:flex;gap:8px}
.guide-offer-actions .button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;text-decoration:none;font-weight:700}
@media(max-width:600px){.guide-offer{left:12px;right:12px;max-width:none}}
/* A phone's pinned Send early count bar owns the bottom: the offer sits under the day line and morning bar instead. */
body.msum-pinned .guide-offer{bottom:auto;top:calc(var(--steps-h,0px) + 64px)}
/* While the phone's count panel is opened, the offer waits out of sight (it comes back when the panel folds). */
body:has(.msum.is-pinned.is-open) .guide-offer{display:none}
