/* PlacementFlow for medical schools, stage two: the placement delivered, what reaches a student and from whom,
   who sees what, and why it is worth a pilot. Built on schools.css and the shared home.css tokens; prefix ms-.
   Each demonstration keeps the stage-one grammar: white product sheets, the student's phone over their edge. */

body.ms { --ms-theatre: #b93225; --ms-ward: #5b3fd6; --ms-clinic: #0b7168; --ms-teach: #1559b0;
  --ms-dph-w: clamp(232px, 19vw, 276px); --ms-dov: 64px; }

/* ---------------- chapter scaffolding ---------------- */
.ms-ch { position: relative; padding: clamp(92px, 12vh, 144px) 0 clamp(84px, 11vh, 128px); }
.ms-ch-head { display: grid; gap: 20px; }
.ms-ch-head .ms-h2 { max-width: none; }
.ms-h2-b { display: block; color: var(--blue); }
.ms-h2-l { display: block; }
.ms-ch-lead { max-width: 58ch; font-size: clamp(17px, 1.3vw, 19.5px); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* the product sheet every staff view sits on */
.ms-sheet { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border-radius: 14px; background: #fff; box-shadow: var(--sheet); color: var(--p-ink); font-size: 14px; line-height: 1.4; }
.ms-sh-bar { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 calc(var(--ms-dov) + 20px) 0 20px; border-bottom: 1px solid var(--ms-rule); }
.ms-sh-bar .ms-demo { margin-right: 0; }
.ms-sh-body { position: relative; min-height: 0; padding: 16px calc(var(--ms-dov) + 22px) 18px 20px; overflow: hidden; }
.ms-ok-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--ms-green-bg); color: var(--ms-green); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ms-ok-chip svg { width: 13px; height: 13px; }
.ms-chip--amber { background: var(--ms-amber-bg); color: var(--amber); }

/* ================= A · the placement, delivered ================= */
.ms-del { background: #fff; }
.ms-day { margin-top: clamp(40px, 6vh, 68px); }

/* the route: one station per moment; the ones behind solid, the current one blue, the ones ahead dashed */
.ms-day-bar { display: flex; align-items: flex-start; gap: 20px; }
.ms-route { flex: 1 1 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.ms-stop { position: relative; display: block; width: 100%; padding: 24px 14px 6px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ms-stop::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; border-top: 2px dashed #9aa5b5; }
.ms-route li:last-child .ms-stop::before { right: auto; width: 40px; }
.ms-stop::after { content: ""; position: absolute; left: 0; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #9aa5b5; transition: background .25s, box-shadow .25s, transform .3s var(--ease-out); }
.ms-stop time { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .25s; }
.ms-stop span { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink-2); transition: color .25s; }
.ms-stop:hover span { color: var(--ink); }
.ms-stop.is-past::before { border-top-style: solid; border-top-color: #5b6779; }
.ms-stop.is-past::after { background: #5b6779; box-shadow: none; }
.ms-stop[aria-current="step"]::before { border-top-style: dashed; }
.ms-stop[aria-current="step"]::after { background: var(--blue); box-shadow: 0 0 0 4px #fff, 0 0 0 5.5px rgba(23, 104, 242, .28); transform: scale(1.12); }
.ms-stop[aria-current="step"] time { color: var(--blue); }
.ms-stop[aria-current="step"] span { color: var(--ink); }
.ms-stop:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
/* while a moment plays, the line ahead of the current station fills towards the next one */
.ms-stop i { position: absolute; left: 0; top: 7px; height: 2px; width: 0; background: var(--blue); pointer-events: none; }
.ms-play { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin-top: 10px; padding: 0 13px 0 11px; border: 0; border-radius: 999px; background: #eef2f8; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.ms-play:hover { background: #e3e9f2; color: var(--ink); }
.ms-play[hidden] { display: none; }
.ms-play svg { width: 14px; height: 14px; }
.ms-play:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* the caption for the current moment */
.ms-day-caps { display: grid; list-style: none; margin: 14px 0 0; padding: 0; max-width: 72ch; }
.ms-day-caps li { grid-area: 1 / 1; font-size: 16px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; transition: opacity .3s var(--ease-out), transform .4s var(--ease-out); }
.ms-day-caps li b { color: var(--ink); font-weight: 650; margin-right: 4px; }
/* what each moment improves, said once and quietly */
.ms-instead { display: block; margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.ms-instead::before { content: ""; display: inline-block; width: 14px; height: 1.5px; margin: 0 8px 0 0; vertical-align: .3em; background: currentColor; opacity: .6; }
/* the caption leaving goes at once, so only the arriving one fades: the two never overlap */
.ms-day-caps li:not([aria-current]) { opacity: 0; transform: translateY(5px); pointer-events: none; transition: none; }

/* the stage: the staff sheet, Priya's phone over its right edge */
.ms-dstage { position: relative; height: clamp(420px, calc(100svh - var(--nav-h) - 236px), 516px); margin-top: 22px; container: ms-dstage / size; }
.ms-dv--staff { position: absolute; inset: 0 calc(var(--ms-dph-w) - var(--ms-dov)) 0 0; }
.ms-dv--student { position: absolute; right: 0; top: 26px; bottom: 0; width: var(--ms-dph-w); }
.ms-dp, .ms-sp { transition: opacity .32s var(--ease-out), visibility 0s .32s; }
.ms-dp { position: absolute; inset: 0; }
.ms-dstage:not([data-at="1"]) [data-p="1"], .ms-dstage:not([data-at="2"]) [data-p="2"],
.ms-dstage:not([data-at="3"]) [data-p="3"], .ms-dstage:not([data-at="4"]) [data-p="4"] { opacity: 0; visibility: hidden; }
.ms-dstage [data-p] { transition-delay: 0s; }

/* type swatches, as the calendar keys them */
.t-theatre { --t: var(--ms-theatre); } .t-ward { --t: var(--ms-ward); } .t-clinic { --t: var(--ms-clinic); } .t-teach { --t: var(--ms-teach); }

/* 1 · Delivery Studio */
.ms-ds-ctx { display: flex; flex-wrap: wrap; gap: 6px 28px; padding-bottom: 12px; border-bottom: 1px solid var(--ms-rule); font-size: 13px; color: var(--p-slate); }
.ms-ds-k { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--p-slate); }
.ms-ds-ctx b { font-weight: 600; color: var(--p-ink); }
.ms-ds-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.ms-ds-t { font-size: 15px; font-weight: 650; color: var(--p-ink); }
.ms-ds-list { list-style: none; margin: 8px 0 0; padding: 0; }
.ms-ds-list li { position: relative; display: grid; grid-template-columns: 52px 92px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 8px 9px 0; border-top: 1px solid #eef2f7; }
.ms-ds-d { font-size: 12.5px; font-weight: 600; color: var(--p-slate); }
.ms-ds-tm { font-size: 13px; color: var(--p-ink); font-variant-numeric: tabular-nums; }
.ms-ds-n { display: grid; min-width: 0; padding-left: 18px; position: relative; }
.ms-ds-n::before { content: ""; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 3px; background: var(--t); }
.ms-ds-n b { font-weight: 600; color: var(--p-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-ds-n small { font-size: 12.5px; color: var(--p-slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-ds-new::after { content: ""; position: absolute; inset: 2px -8px; z-index: -1; border-radius: 8px; background: var(--ms-tint); opacity: 0; }
.ms-ds-new.is-lit::after { animation: ms-lit 1.9s var(--ease-out) both; }
.ms-ds-list { position: relative; isolation: isolate; }
/* the session being added, over the timetable */
.ms-modal { position: absolute; right: calc(var(--ms-dov) + 34px); top: 64px; width: min(420px, 62%); padding: 16px 18px 14px; border-radius: 12px; background: #fff; box-shadow: var(--pop), 0 0 0 1px rgba(7, 20, 38, .06); }
.ms-modal-t { font-size: 15px; font-weight: 650; color: var(--p-ink); }
.ms-mf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; margin-top: 10px; }
.ms-mf-w { grid-column: 1 / -1; }
.ms-mf dt { font-size: 11.5px; font-weight: 600; color: var(--p-slate); }
.ms-mf dd { margin: 3px 0 0; padding: 5px 9px; border-radius: 7px; box-shadow: inset 0 0 0 1px #d8e0eb; font-size: 13px; color: var(--p-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-modal-note { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--ms-soft); font-size: 12.5px; line-height: 1.4; color: var(--p-slate); }
.ms-modal-note b { display: block; font-size: 11.5px; color: var(--p-ink); }
.ms-modal-a { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }

/* 2 · the owner's register in theatre */
.ms-rg-win { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--p-slate); }
.ms-rg-win::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ms-green); box-shadow: 0 0 0 3px var(--ms-green-bg); }
[data-p="3"] .ms-rg-win::before, [data-p="4"] .ms-rg-win::before { background: var(--p-mist); box-shadow: none; }
.ms-rg { display: grid; grid-template-columns: minmax(150px, 30%) minmax(0, 1fr); gap: 22px; margin-top: 12px; }
.ms-rg-qr { display: grid; align-content: start; justify-items: start; gap: 8px; }
.ms-rg-k { font-size: 13px; font-weight: 650; color: var(--p-ink); }
.ms-qr { box-sizing: border-box; width: 100%; max-width: 168px; aspect-ratio: 1; padding: 10px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--ms-rule); }
.ms-qr svg { display: block; width: 100%; height: 100%; }
.ms-qr path { fill: var(--p-ink); }
.ms-qr-b { transition: opacity .25s; }
.ms-rg-ref { font-size: 12px; color: var(--p-slate); font-variant-numeric: tabular-nums; }
.ms-rg-tick { display: grid; gap: 1px; padding-top: 8px; border-top: 1px solid var(--ms-rule); font-size: 12px; color: var(--p-slate); }
.ms-rg-tick b { font-size: 13px; font-weight: 600; color: var(--p-ink); }
.ms-rg-list { min-width: 0; }
.ms-rg-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 650; color: var(--p-ink); }
.ms-rg-n { font-weight: 500; color: var(--p-slate); font-variant-numeric: tabular-nums; }
.ms-rg-n b { font-size: 18px; font-weight: 650; color: var(--p-ink); }
.ms-rg-rows { list-style: none; margin: 6px 0 0; padding: 0; }
.ms-rg-rows li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid #eef2f7; }
.ms-rg-rows span { display: grid; min-width: 0; }
.ms-rg-rows b { font-weight: 600; color: var(--p-ink); }
.ms-rg-rows small { font-size: 12px; color: var(--p-slate); font-variant-numeric: tabular-nums; }
.ms-rg-rows em { padding: 2px 9px; border-radius: 999px; background: #eef1f5; color: var(--p-slate); font-size: 12px; font-style: normal; font-weight: 600; white-space: nowrap; transition: background .25s, color .25s; }
.ms-rg-rows li.is-in em { background: var(--ms-green-bg); color: var(--ms-green); }
.ms-rg-you { border-radius: 8px; background: linear-gradient(90deg, var(--ms-tint), rgba(234, 242, 253, 0) 85%); }
.ms-rg-rows li { transition: box-shadow .3s var(--ease-out); }
.ms-rg-rows li.is-lit { border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(23, 104, 242, .34); }
.ms-now-scan { transition: opacity .3s, transform .14s; }
.ms-now-scan.is-press { transform: scale(.97); }

/* 3 · the register after the window, and the correction asked of the owner */
.ms-rg-list--full { margin-top: 12px; }
.ms-cdlg { position: absolute; right: calc(var(--ms-dov) + 30px); bottom: 18px; width: min(380px, 58%); padding: 14px 16px 12px; border-radius: 12px; background: #fff; box-shadow: var(--pop), 0 0 0 1px rgba(7, 20, 38, .06); }
.ms-cdlg-t { font-size: 14.5px; font-weight: 650; color: var(--p-ink); }
.ms-cdlg-s { margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--p-slate); text-wrap: pretty; }
.ms-cdlg-k { margin-top: 10px; font-size: 11.5px; font-weight: 600; color: var(--p-slate); }
.ms-cdlg-in { margin-top: 4px; padding: 7px 9px; border-radius: 7px; box-shadow: inset 0 0 0 1px #c9d6ea; font-size: 13px; line-height: 1.4; color: var(--p-ink); }
.ms-cdlg-a { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }

/* 4 · the assessor signs */
.ms-so-who { display: flex; align-items: center; gap: 10px; }
.ms-so-who span { display: grid; }
.ms-so-who b { font-weight: 600; color: var(--p-ink); }
.ms-so-who small { font-size: 12.5px; color: var(--p-slate); }
.ms-so-note { margin-top: 12px; padding: 8px 10px; border-radius: 8px; background: var(--ms-soft); font-size: 12.5px; line-height: 1.45; color: var(--p-slate); max-width: 58ch; }
.ms-so-decl { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; margin-top: 14px; font-size: 13.5px; line-height: 1.45; color: var(--p-ink); max-width: 60ch; }
.ms-so-box { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px #9fb0c7; color: transparent; transition: background .2s, box-shadow .2s, color .2s; }
.ms-so-box svg { width: 13px; height: 13px; }
.ms-so-box.is-on { background: var(--blue); box-shadow: none; color: #fff; }
.ms-so-sign { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 2px 14px; margin-top: 14px; max-width: 460px; }
.ms-so-k { grid-column: 1 / -1; font-size: 11.5px; font-weight: 600; color: var(--p-slate); }
.ms-so-sig { width: 220px; height: 58px; border-bottom: 1px solid #c9d6ea; }
.ms-so-sig path { fill: none; stroke: var(--p-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ms-so-name { padding-bottom: 4px; font-size: 14px; font-weight: 600; color: var(--p-ink); }
.ms-so-a { display: flex; gap: 8px; margin-top: 14px; }

/* the student's side: the stage-one phone, cut by the stage */
.ms-dphone { position: absolute; inset: 0 0 26px; overflow: hidden; border: 9px solid #0e1728; border-bottom: 0; border-radius: 38px 38px 0 0; background: #fff; box-shadow: var(--pop);
  -webkit-mask-image: linear-gradient(#000 86%, transparent); mask-image: linear-gradient(#000 86%, transparent); }
.ms-dphone .ms-ph-sbar b { font-variant-numeric: tabular-nums; }
.ms-sp { position: absolute; inset: 30px 0 0; }
.ms-sp-in { padding: 12px 14px; }
.ms-dphone-cap { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 12px; color: var(--muted); }
/* 1 · her timetable */
.ms-tt-ctx { font-size: 12.5px; font-weight: 600; color: var(--p-ink); }
.ms-tt-sub { margin-top: 1px; font-size: 12px; color: var(--p-slate); }
.ms-tt-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; list-style: none; margin: 10px 0 0; padding: 0; }
.ms-tt-days li { position: relative; display: grid; justify-items: center; gap: 1px; padding: 5px 0 9px; border-radius: 8px; font-size: 10.5px; color: var(--p-slate); }
.ms-tt-days b { font-size: 14px; font-weight: 600; color: var(--p-ink); font-variant-numeric: tabular-nums; }
.ms-tt-days li.has::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }
.ms-tt-days li.ms-tt-new::after { transform: scale(0); transition: transform .35s var(--ease-out); }
.ms-tt-days li.is-sel { background: var(--ink); color: rgba(255, 255, 255, .78); }
.ms-tt-days li.is-sel b { color: #fff; }
.ms-tt-days li.is-sel::after { background: #fff; }
.ms-tt-list { list-style: none; margin: 10px 0 0; padding: 0; }
.ms-tt-list li, .ms-done-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid #eef2f7; }
.ms-tt-list li > span:last-child, .ms-done-row > span:nth-child(2) { position: relative; display: grid; gap: 2px; justify-items: start; padding-left: 10px; }
.ms-tt-list li > span:last-child::before, .ms-done-row > span:nth-child(2)::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--t); }
.ms-tt-tm { display: grid; font-size: 12.5px; font-weight: 600; color: var(--p-ink); font-variant-numeric: tabular-nums; }
.ms-tt-tm small { font-size: 11.5px; font-weight: 500; color: var(--p-slate); }
.ms-tt-list b, .ms-done-row b { font-size: 13.5px; font-weight: 600; color: var(--p-ink); }
.ms-tt-list small, .ms-done-row small { font-size: 12px; color: var(--p-slate); }
.ms-tt-list .ms-mand { margin-top: 3px; font-size: 11px; padding: 1px 7px; }
.ms-tt-list li.is-arriving { animation: ms-arrive .5s var(--ease-out) both; }
@keyframes ms-arrive { from { opacity: 0; transform: translateY(6px); } }
/* 2 · Now, then the scanner over it */
.ms-now { margin-top: 2px; padding: 12px 12px 12px; border-radius: 12px; background: var(--ms-soft); box-shadow: inset 0 0 0 1px var(--ms-rule); }
.ms-now-k { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--p-slate); }
.ms-now-t { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ms-now-t b { font-size: 18px; font-weight: 650; color: var(--p-ink); }
.ms-now-t small { font-size: 12px; color: var(--p-slate); }
.ms-now-n { display: grid; margin-top: 2px; }
.ms-now-n b { font-size: 15px; font-weight: 650; color: var(--p-ink); }
.ms-now-n small { font-size: 12px; color: var(--p-slate); }
.ms-now-c { margin-top: 7px; }
.ms-now-c .ms-mand { font-size: 11px; padding: 1px 7px; }
.ms-now-act { display: grid; margin-top: 10px; }
.ms-now-scan, .ms-now-ok { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; border-radius: 9px; font-size: 13.5px; font-weight: 600; transition: opacity .3s; }
.ms-now-scan { background: var(--blue); color: #fff; }
.ms-now-ok { background: var(--ms-green-bg); color: var(--ms-green); opacity: 0; }
.ms-now-ok svg { width: 14px; height: 14px; }
.ms-now.is-in .ms-now-scan { opacity: 0; }
.ms-now.is-in .ms-now-ok { opacity: 1; }
.ms-scan { position: absolute; left: 0; right: 0; bottom: 0; top: 46px; padding: 14px 14px 0; border-radius: 16px 16px 0 0; background: #0e1728; color: #fff; transform: translateY(102%); transition: transform .45s var(--ease-out); }
.ms-scan.is-open { transform: none; }
.ms-scan-t { font-size: 15px; font-weight: 650; }
.ms-scan-s { margin-top: 3px; font-size: 12px; line-height: 1.4; color: rgba(255, 255, 255, .74); }
.ms-scan-v { position: relative; width: 62%; aspect-ratio: 1; margin: 14px auto 0; border-radius: 12px; background: #1b2638; overflow: hidden; }
.ms-scan-v::before, .ms-scan-v::after { content: ""; position: absolute; inset: 12%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 10px; -webkit-mask: linear-gradient(#000 0 0) top left / 24% 24% no-repeat, linear-gradient(#000 0 0) top right / 24% 24% no-repeat, linear-gradient(#000 0 0) bottom left / 24% 24% no-repeat, linear-gradient(#000 0 0) bottom right / 24% 24% no-repeat; mask: linear-gradient(#000 0 0) top left / 24% 24% no-repeat, linear-gradient(#000 0 0) top right / 24% 24% no-repeat, linear-gradient(#000 0 0) bottom left / 24% 24% no-repeat, linear-gradient(#000 0 0) bottom right / 24% 24% no-repeat; }
.ms-scan-v::after { display: none; }
.ms-scan-q { position: absolute; inset: 22%; border-radius: 4px; background: #fff; opacity: .92; transform: rotate(-4deg) scale(.96); }
.ms-scan-q svg { display: block; width: 100%; height: 100%; padding: 8%; }
.ms-scan-q path { fill: #16233f; }
.ms-scan-v i { position: absolute; left: 14%; right: 14%; top: 18%; height: 2px; border-radius: 1px; background: #6ea2ff; box-shadow: 0 0 12px 2px rgba(110, 162, 255, .7); opacity: 0; }
.ms-scan.is-reading .ms-scan-v i { opacity: 1; animation: ms-sweep 1.1s ease-in-out infinite alternate; }
@keyframes ms-sweep { to { top: 80%; } }
.ms-scan-ok { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: #8be3ad; opacity: 0; transition: opacity .25s; }
.ms-scan-ok svg { width: 15px; height: 15px; }
.ms-scan.is-done .ms-scan-ok { opacity: 1; }
/* 3 · her day goes on */
.ms-done-row { align-items: start; border-top: 0; padding-top: 4px; }
.ms-done-row .ms-ok-chip { grid-column: 2; justify-self: start; margin: -2px 0 0 10px; }
.ms-now--next { margin-top: 8px; background: #fff; }
/* 4 · her sign-offs */
.ms-so-list { list-style: none; margin: 10px 0 0; padding: 0; }
.ms-so-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #eef2f7; }
.ms-so-list span { display: grid; min-width: 0; }
.ms-so-list b { font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--p-ink); }
.ms-so-list small { font-size: 12px; color: var(--p-slate); }
.ms-so-list em { padding: 2px 9px; border-radius: 999px; background: #eef1f5; color: var(--p-slate); font-size: 11.5px; font-style: normal; font-weight: 600; white-space: nowrap; transition: background .25s, color .25s; }
.ms-so-list em.ms-so-go { background: none; padding: 0; color: var(--blue); font-size: 12.5px; }
.ms-so-one.is-verified em { background: var(--ms-green-bg); color: var(--ms-green); }
.ms-so-pdf { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--ms-blue-ink); opacity: 0; transition: opacity .3s; }
.ms-so-pdf svg { width: 15px; height: 15px; }
.ms-so-pdf.is-on { opacity: 1; }
.ms-so-toast { position: absolute; left: 12px; right: 12px; bottom: 54px; padding: 9px 11px; border-radius: 10px; background: var(--ink); color: rgba(255, 255, 255, .9); font-size: 12px; line-height: 1.35; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease-out); }
.ms-so-toast.is-on { opacity: 1; transform: none; }

/* ================= B · what reaches a student, and from whom ================= */
.ms-edu { background: var(--deep); color: #fff; }
.ms-edu ::selection { background: rgba(143, 184, 255, .35); }
.ms-edu .ms-h2 { color: #fff; }
.ms-edu .ms-h2-b { color: #8fb8ff; }
.ms-edu .ms-ch-lead { color: rgba(255, 255, 255, .78); }
.ms-shelf { --bw: clamp(90px, 8vw, 116px); margin-top: clamp(44px, 6vh, 72px); }
.ms-shelf-for { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: rgba(255, 255, 255, .78); }
.ms-shelf-for em { margin-left: auto; font-style: normal; font-size: 13px; color: rgba(255, 255, 255, .66); }
.ms-shelf-for b { font-weight: 600; color: #fff; }
.ms-av--light { background: #e8f0fb; color: var(--deep); font-size: 11px; }
.ms-grps { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; gap: 26px clamp(22px, 2.6vw, 36px); margin-top: 22px; }
.ms-grps::after { content: ""; position: absolute; left: -14px; right: -14px; bottom: -1px; height: 1px; background: rgba(255, 255, 255, .22); }
.ms-grp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .86); white-space: nowrap; }
.ms-grp { display: flex; flex-direction: column; justify-content: space-between; }
.ms-books { display: flex; align-items: flex-end; gap: 10px; }

/* the access key: blue dot through a school, ring with a student's own account, half for a taking-part school,
   dashed for planned (the first two as the Students page draws them) */
.ms-key { flex: none; display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.ms-key--school { background: #6ea2ff; }
.ms-key--acct { box-shadow: inset 0 0 0 2.5px #fff; }
.ms-key--part { background: linear-gradient(90deg, #6ea2ff 50%, transparent 50%); box-shadow: inset 0 0 0 2px #6ea2ff; }
.ms-key--plan { box-shadow: none; border: 2px dashed rgba(255, 255, 255, .7); }

/* the books: the Learning & exams covers, at the scale of a shelf */
.ms-book { position: relative; flex: none; width: var(--bw); aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 2px 5px 5px 2px; background: var(--cb); color: var(--ci); font: inherit; text-align: left; cursor: pointer; container-type: inline-size; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .22), 0 22px 34px -22px rgba(0, 0, 0, .7); transition: transform .38s var(--ease-out), box-shadow .3s, opacity .4s var(--ease-out); }
.ms-book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; z-index: 2; width: 2.6cqw; background: linear-gradient(90deg, rgba(0, 0, 0, .13), rgba(0, 0, 0, 0)); pointer-events: none; }
.ms-book:hover { transform: translateY(-5px); }
.ms-book[aria-pressed="true"] { transform: translateY(-12px); box-shadow: 0 1px 2px rgba(0, 0, 0, .22), 0 34px 44px -22px rgba(0, 0, 0, .85); }
.ms-book[aria-pressed="true"]::after { content: ""; position: absolute; left: 28%; right: 28%; bottom: -1px; height: 3px; border-radius: 2px 2px 0 0; background: #8fb8ff; }
.ms-book:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.ms-book-in { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 7.6cqw; }
.ms-art { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateY(13%); }
.ms-bk-k { position: relative; font-size: max(11px, 8cqw); font-weight: 500; line-height: 1.15; opacity: .92; }
/* titles scale with the cover but never fall below 12.5px; the planned covers keep a 90px floor so they still fit */
.ms-bk-t { position: relative; margin-top: 2cqw; font-size: max(12.5px, 13.4cqw); font-weight: 600; letter-spacing: -.03em; line-height: 1.02; text-wrap: balance; }
.ms-cv--uni { --cb: #e8f0fb; --ci: #173d69; }
.ms-cv--pla { --cb: #e4efeb; --ci: #214f46; }
.ms-cv--lib { --cb: #102c52; --ci: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .22), 0 22px 34px -22px rgba(0, 0, 0, .7); }
.ms-cv--guides { --cb: #1d5750; --ci: #fff; }
.ms-cv--found { --cb: #eef2f9; --ci: #16233f; }
.ms-cv--mla { --cb: #dcebf9; --ci: #173d69; }
.ms-cv--ghost { --cb: transparent; --ci: rgba(255, 255, 255, .9); width: max(90px, calc(var(--bw) * .86)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .42); }
.ms-cv--ghost::before { display: none; }
.ms-cv--plan { box-shadow: none; outline: 1.5px dashed rgba(255, 255, 255, .55); outline-offset: -1.5px; }
.ms-cv--plan:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.ms-cv--ghost[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8), 0 30px 40px -24px rgba(0, 0, 0, .8); }

/* what the chosen book holds for her: a white sheet on the navy */
.ms-read { position: relative; display: grid; min-height: 0; margin-top: 30px; }
.ms-rd { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "s f" "t f"; align-content: start; gap: 4px 40px; padding: 20px 24px 22px; border-radius: 14px; background: #fff; color: var(--p-ink); box-shadow: var(--pop); }
.ms-rd[hidden] { display: none; }
.ms-rd-src { grid-area: s; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--p-slate); }
.ms-rd .ms-key--school { background: var(--blue); }
.ms-rd .ms-key--acct { box-shadow: inset 0 0 0 2.5px var(--ink); }
.ms-rd .ms-key--part { background: linear-gradient(90deg, var(--blue) 50%, transparent 50%); box-shadow: inset 0 0 0 2px var(--blue); }
.ms-rd .ms-key--plan { border-color: #8a97ad; }
.ms-rd-t { grid-area: t; font-size: clamp(22px, 2vw, 28px); font-weight: 650; letter-spacing: -.022em; line-height: 1.15; color: var(--ink); }
.ms-rd-p, .ms-rd-frag { grid-area: f; align-self: center; }
.ms-rd-p { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }
.ms-rd-frag { display: grid; gap: 0; padding: 4px 0; }
.ms-fr-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; padding-bottom: 8px; border-bottom: 1px solid var(--ms-rule); }
.ms-fr-h b { font-size: 14.5px; font-weight: 650; color: var(--p-ink); }
.ms-fr-h span { font-size: 13px; color: var(--p-slate); }
.ms-fr-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid #eef2f7; font-size: 13.5px; }
.ms-fr-row span { color: var(--p-slate); }
.ms-fr-row b { font-weight: 600; color: var(--p-ink); }
.ms-shelf-note { margin-top: 16px; font-size: 12.5px; color: rgba(255, 255, 255, .62); }

/* ================= C · one placement, each person's part ================= */
.ms-ppl { background: var(--ms-ground); }
.ms-roles { margin-top: clamp(40px, 5.5vh, 64px); }
.ms-band { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 16px 20px; border-radius: 12px; background: #fff; box-shadow: var(--sheet); font-size: 14px; color: var(--p-slate); }
.ms-band b { font-size: 16px; font-weight: 650; color: var(--p-ink); }
.ms-band .ms-chip { margin-left: auto; }
.ms-band-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--blue); }
.ms-role-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); column-gap: 0; list-style: none; margin: 0; padding: 0; }
.ms-role { position: relative; display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 8px; padding: 46px 26px 4px 22px; }
.ms-role + .ms-role { box-shadow: inset 1px 0 0 var(--ms-rule); }
/* each hangs from the placement */
.ms-role::before { content: ""; position: absolute; left: 35px; top: 0; height: 34px; width: 2px; background: #c3cfdf; transform-origin: top; }
.ms-role--student::before { background: var(--blue); }
.ms-role-who { display: flex; align-items: center; gap: 10px; }
.ms-role-who span { display: grid; min-width: 0; }
.ms-role-who b { font-size: 15px; font-weight: 650; color: var(--ink); }
.ms-role-who small { font-size: 12.5px; color: var(--muted); }
.ms-role .ms-av { width: 28px; height: 28px; }
.ms-role-line { font-size: 15.5px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
/* the same theatre list, as each seat sees it */
.ms-seat { align-self: start; margin-top: 4px; padding: 10px 12px 11px; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(7, 20, 38, .06), inset 0 0 0 1px var(--ms-rule); color: var(--p-ink); font-size: 13px; }
.ms-seat-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 7px; border-bottom: 1px solid #eef2f7; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--p-slate); }
.ms-seat-h span { font-size: 12px; letter-spacing: 0; color: var(--p-slate); font-variant-numeric: tabular-nums; }
.ms-seat-h span b { color: var(--p-ink); }
.ms-seat-r { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding-top: 8px; }
.ms-seat-r b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ms-seat-r small { font-size: 12px; color: var(--p-slate); }
.ms-fr-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1px var(--ms-rule); font-size: 12px; font-weight: 600; color: var(--p-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ms-role--student { border-radius: 0 0 12px 12px; background: linear-gradient(rgba(234, 242, 253, .9), rgba(234, 242, 253, 0)); }
.ms-roles-note { max-width: 62ch; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--ms-rule); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }


/* ================= stage three · governance, answered plainly ================= */
.ms-gov { background: var(--ms-ground); }
.ms-gov-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px clamp(40px, 5vw, 80px); align-items: start; }
.ms-gov-list { margin: clamp(28px, 4vh, 40px) 0 0; border-top: 1px solid var(--line); }
.ms-gov-list > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4px 28px; padding: 15px 0 16px; border-bottom: 1px solid var(--line); }
.ms-gov-list dt { font-size: 16.5px; font-weight: 650; letter-spacing: -.012em; line-height: 1.35; color: var(--ink); text-wrap: balance; }
.ms-gov-list dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.ms-gov-links { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 22px; }
.ms-gov-links a { color: var(--blue-hover); }
.ms-gov-links svg { width: 16px; height: 16px; }
/* the record behind two marks from the first day */
.ms-rec { margin: clamp(8px, 2vh, 24px) 0 0; }
.ms-rec-sheet { overflow: hidden; border-radius: 14px; background: #fff; box-shadow: var(--sheet); color: var(--p-ink); }
.ms-rec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 20px; border-bottom: 1px solid var(--ms-rule); font-size: 13px; font-weight: 650; color: var(--p-ink); }
.ms-rec-h .ms-demo { margin: 0; font-weight: 400; }
.ms-rec-item { padding: 16px 20px 14px; }
.ms-rec-item + .ms-rec-item { border-top: 1px solid var(--ms-rule); }
.ms-rec-t { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ms-rec-t b { font-size: 15px; font-weight: 650; color: var(--p-ink); }
.ms-rec-item dl { display: grid; gap: 0; margin: 10px 0 0; }
.ms-rec-item dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-top: 1px solid #eef2f7; font-size: 13.5px; line-height: 1.45; }
.ms-rec-item dt { color: var(--p-slate); }
.ms-rec-item dd { margin: 0; color: var(--p-ink); font-variant-numeric: tabular-nums; text-wrap: pretty; }
.ms-rec figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ================= stage three · the invitation (the homepage close, on this page's errand) ================= */
.ms-pilot { background: var(--blue); color: #fff; padding: clamp(104px, 12vw, 176px) 0 clamp(96px, 11vw, 160px); }
.ms-pilot ::selection { background: rgba(255, 255, 255, .3); }
.ms-pilot-h { font-size: clamp(42px, 5.5vw, 82px); line-height: 1; font-weight: 700; letter-spacing: -.034em; text-wrap: balance; }
.ms-pilot-h span { display: block; }
.ms-pilot-lead { max-width: 54ch; margin-top: clamp(20px, 2.6vw, 30px); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: #fff; text-wrap: pretty; }
/* the four steps on one line, as the delivery chapter drew its days */
.ms-pilot-route { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; }
.ms-pilot-route::before { content: ""; position: absolute; left: 6px; right: 0; top: 6px; height: 2px; background: rgba(255, 255, 255, .34); transform-origin: left center; }
.ms-pilot-route li { position: relative; display: grid; align-content: start; gap: 6px; padding-top: 32px; }
.ms-pilot-route li::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); box-shadow: inset 0 0 0 2.5px #fff; }
.ms-pilot-route li:first-child::before { background: #fff; }
.ms-pilot-route b { font-size: clamp(17px, 1.4vw, 20px); font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.ms-pilot-route span { font-size: 15px; line-height: 1.5; color: #fff; text-wrap: pretty; }
.ms-pilot-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: clamp(44px, 5vw, 64px); }
.ms-pilot-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 26px; border-radius: 12px; background: #fff; color: var(--blue); font-size: 16.5px; font-weight: 600; white-space: nowrap; transition: background .15s, transform .15s var(--ease-out); }
.ms-pilot-btn:hover { background: #f4f7ff; }
.ms-pilot-btn:active { transform: translateY(1px); }
.ms-pilot-q { display: inline-flex; align-items: center; gap: 8px; min-height: 54px; font-size: 16.5px; font-weight: 600; color: #fff; border-radius: 8px; }
.ms-pilot-q svg { width: 16px; height: 16px; transition: transform .2s var(--ease-out); }
.ms-pilot-q:hover svg { transform: translateX(3px); }
.ms-pilot a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ms-pilot-note { max-width: 62ch; margin-top: 26px; font-size: 14px; line-height: 1.5; color: #fff; text-wrap: pretty; }

/* ================= footer: the live homepage's ================= */
.ms-ft { background: var(--deep); color: rgba(255, 255, 255, .78); padding: 64px 0 40px; font-size: 14px; }
.ms-ft-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start; }
.ms-ft-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 16px; font-weight: 600; letter-spacing: -.02em; border-radius: 8px; }
.ms-ft-logo i { font-style: normal; color: #8fb8ff; }
.ms-ft-mark { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; }
.ms-ft-nav { display: grid; grid-template-columns: repeat(3, auto); gap: 24px 56px; }
.ms-ft-nav p { margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.ms-ft-nav a { display: block; padding: 4px 0; color: rgba(255, 255, 255, .78); }
.ms-ft-nav a:hover, .ms-ft-nav a[aria-current] { color: #fff; }
.ms-ft a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ms-ft-legal { display: grid; gap: 8px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; color: rgba(255, 255, 255, .72); }
.ms-ft-legal p { text-wrap: pretty; }
.ms-ft-legal a { color: rgba(255, 255, 255, .86); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255, 255, 255, .35); }

/* ---------------- motion: each chapter's one moment, armed by the script so nothing hides without it ---------------- */
html.motion .ms-shelf.is-armed:not(.is-in) .ms-book { opacity: 0; }
html.motion .ms-shelf.is-armed:not(.is-in) [data-g="school"] .ms-book { transform: translateX(-34px); }
html.motion .ms-shelf.is-armed:not(.is-in) [data-g="acct"] .ms-book { transform: translateY(26px); }
html.motion .ms-shelf.is-armed.is-in .ms-book { transition: transform .62s var(--ease-out), opacity .5s var(--ease-out), box-shadow .3s; transition-delay: var(--d, 0s); }
html.motion .ms-roles.is-armed:not(.is-in) .ms-role::before { transform: scaleY(0); }
html.motion .ms-roles.is-armed:not(.is-in) .ms-seat { opacity: 0; transform: translateY(4px); }
html.motion .ms-roles.is-armed .ms-role::before { transition: transform .5s var(--ease-out); transition-delay: var(--d, 0s); }
html.motion .ms-roles.is-armed .ms-seat { transition: opacity .4s var(--ease-out), transform .5s var(--ease-out); transition-delay: calc(var(--d, 0s) + .32s); }
html.motion .ms-pilot-route.is-armed:not(.is-in)::before { transform: scaleX(0); }
html.motion .ms-pilot-route.is-armed:not(.is-in) li { opacity: 0; transform: translateY(8px); }
html.motion .ms-pilot-route.is-armed::before { transition: transform 1.1s cubic-bezier(.65, 0, .35, 1); }
html.motion .ms-pilot-route.is-armed li { transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); transition-delay: var(--d, 0s); }
html.reduce .ms-dp, html.reduce .ms-sp, html.reduce .ms-day-caps li, html.reduce .ms-scan, html.reduce .ms-book, html.reduce .ms-stop::after { transition: none; }
.no-js .ms-day-caps li:not([aria-current]) { opacity: 1; transform: none; grid-area: auto; }
.no-js .ms-day-caps { gap: 8px; }

/* ---------------- widths ---------------- */
@media (max-width: 1199px) {
  .ms-ch-head { grid-template-columns: minmax(0, 1fr); }
  .ms-ds-list li { grid-template-columns: 46px 84px minmax(0, 1fr) auto; gap: 8px; }
  .ms-role-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); }
  .ms-role:nth-child(3) { box-shadow: none; }
}
@media (max-width: 1100px) {
  body.ms { --ms-dph-w: clamp(200px, 22vw, 236px); --ms-dov: 48px; }
  .ms-gov-in { grid-template-columns: minmax(0, 1fr); }
  .ms-rec { max-width: 560px; }
  .ms-pilot-route { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }
  .ms-pilot-route::before { display: none; }
  .ms-ft-top { grid-template-columns: 1fr; }
  .ms-ft-nav { grid-template-columns: repeat(3, auto); justify-content: start; }
  .ms-rg { grid-template-columns: 136px minmax(0, 1fr); gap: 18px; }
  .ms-rd { grid-template-columns: minmax(0, 1fr); grid-template-areas: "s" "t" "f"; gap: 4px; }
  .ms-rd-p, .ms-rd-frag { margin-top: 8px; }
}
@media (max-width: 760px) {
  body.ms { --ms-dov: 0px; }
  .ms-ch { padding: 72px 0 64px; }
  .ms-ch-lead { font-size: 16.5px; }
  .ms-day-bar { flex-direction: column; gap: 6px; }
  .ms-route { width: 100%; }
  .ms-stop { padding: 22px 8px 4px 0; }
  .ms-stop time { font-size: 11.5px; }
  .ms-stop span { font-size: 13px; line-height: 1.25; }
  .ms-play { margin-top: 0; }
  .ms-day-caps li { font-size: 15px; }
  /* the two sides stack: the staff sheet, then her phone */
  .ms-dstage { height: auto; container-type: normal; display: grid; gap: 16px; }
  .ms-dv--staff, .ms-dv--student { position: relative; inset: auto; width: auto; top: auto; }
  .ms-dv--staff { height: 470px; }
  .ms-ds-list li.t-clinic { display: none; }
  .ms-dv--student { height: 400px; width: min(300px, 100%); margin: 0 auto; }
  .ms-rg { grid-template-columns: minmax(0, 1fr); }
  .ms-rg-qr { grid-template-columns: 92px minmax(0, 1fr); align-items: start; column-gap: 14px; }
  .ms-rg-qr .ms-rg-k { grid-column: 1 / -1; }
  .ms-qr { grid-row: span 2; }
  .ms-sh-bar { min-height: 40px; padding: 0 14px; }
  .ms-sh-bar .ms-demo { display: none; }
  .ms-sh-body { padding: 12px 14px 14px; }
  .ms-ds-ctx { gap: 4px 18px; }
  .ms-ds-ctx p:first-child { flex-basis: 100%; }
  .ms-ds-list li { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .ms-ds-tm { display: none; }
  .ms-modal { left: 14px; right: 14px; top: 52px; width: auto; }
  .ms-mf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ms-rg-qr { grid-template-columns: 92px minmax(0, 1fr); }
  .ms-rg-tick { display: none; }
  .ms-rg-rows li:nth-child(n + 4) { display: none; }
  /* once check-in closes, the short register keeps Tom, since his correction is the moment */
  .ms-dp[data-p="3"] .ms-rg-rows li:nth-child(4) { display: grid; }
  .ms-cdlg { left: 14px; right: 14px; width: auto; bottom: 12px; }
  .ms-so-note { display: none; }
  .ms-so-sig { width: 170px; }
  .ms-shelf { --bw: clamp(84px, 26vw, 104px); }
  .ms-grps { gap: 22px 18px; }
  .ms-grp { flex: 1 1 100%; }
  .ms-grp-h { margin-bottom: 10px; }
  .ms-rd { padding: 16px 16px 18px; }
  .ms-fr-row { grid-template-columns: 92px minmax(0, 1fr); }
  .ms-band .ms-chip { margin-left: 0; }
  .ms-role-cols { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .ms-role { grid-row: auto; grid-template-rows: none; padding: 24px 0 10px 50px; box-shadow: none !important; }
  .ms-role + .ms-role { padding-top: 22px; }
  .ms-role::before { left: 13px; top: 0; height: 100%; }
  .ms-role .ms-av { position: absolute; left: 0; top: 22px; }
  .ms-role-who { gap: 0; }
  .ms-role--student { border-radius: 12px; padding-right: 12px; }
  .ms-gov-list > div { grid-template-columns: minmax(0, 1fr); }
  .ms-rec-item dl > div { grid-template-columns: 78px minmax(0, 1fr); }
  .ms-pilot { padding: 88px 0 80px; }
  .ms-pilot-h { font-size: clamp(38px, 11vw, 48px); }
  .ms-pilot-route { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .ms-pilot-route::before { display: block; left: 6px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; transform-origin: top center; }
  .ms-pilot-route li { padding: 0 0 0 30px; }
  html.motion .ms-pilot-route.is-armed:not(.is-in)::before { transform: scaleY(0); }
  .ms-pilot-btn { flex: 1 1 100%; }
  .ms-ft-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
}
/* a short wide screen: the stage takes its room from the viewport, and the sheets give up detail */
@container ms-dstage (max-height: 540px) { .ms-rg-rows li:nth-child(n + 8) { display: none; } }
@container ms-dstage (max-height: 470px) {
  .ms-ds-ctx { padding-bottom: 8px; }
  .ms-ds-list li { padding: 6px 8px 6px 0; }
  .ms-rg-rows li { padding: 4px 2px; }
  .ms-rg-rows li:nth-child(n + 6) { display: none; }
  .ms-so-note { display: none; }
  .ms-qr { max-width: 140px; }
}
.ms-tt-ctx span { display: block; font-weight: 500; color: var(--p-slate); }
/* the shortest wide stages: a tighter week, and her timetable without its second line */
@container ms-dstage (max-height: 480px) {
  .ms-tt-sub { display: none; }
  .ms-tt-days { margin-top: 8px; }
  .ms-tt-days li { padding: 4px 0 8px; }
  .ms-sp-in { padding: 10px 14px; }
  .ms-dphone { -webkit-mask-image: linear-gradient(#000 91%, transparent); mask-image: linear-gradient(#000 91%, transparent); }
}
@container ms-dstage (max-height: 440px) {
  .ms-ds-h { margin-top: 10px; }
  .ms-ds-list { margin-top: 4px; }
  .ms-ds-list li { padding: 5px 8px 5px 0; }
}
/* the session being added keeps its note and its button in view on a short stage */
@container ms-dstage (max-height: 500px) {
  .ms-mf > div:nth-child(n + 5) { display: none; }
  .ms-modal { top: 52px; }
}
