/* Shared staff interaction components. See APPROVED_INTERACTION_MODEL.md. */
:root{--crew-section-surface:#f0f2f4;--crew-danger:#a51d35;--crew-control-pad-y:.7rem;--crew-control-pad-x:1rem}
.crew-section-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px 20px;background:var(--crew-section-surface);border:1px solid var(--crew-line);border-radius:8px;margin:24px 0 20px}
.crew-section-header :is(h2,h3){margin:0}
.crew-section-header p{margin:8px 0 0}
.crew-section-actions,.crew-record-actions,.crew-form-actions{display:flex;align-items:center;gap:10px}
.crew-section-actions{flex-wrap:wrap;margin-left:auto}
.crew-form-actions{justify-content:flex-start;flex-wrap:wrap;padding-top:20px;margin-top:24px;border-top:1px solid var(--crew-line)}
body:has(.crew-header) :is(#main,#cfboothModal,.crew-confirm) :is(.button,.cfbooth-btn,.crew-button){appearance:none;box-sizing:border-box;padding:var(--crew-control-pad-y) var(--crew-control-pad-x);min-height:44px;border:1px solid var(--crew-line);border-radius:8px;background:#fff;color:var(--crew-ink,#182230);font:600 14px/1.5 var(--crew-font);cursor:pointer;text-decoration:none;display:inline-flex;justify-content:center;align-items:center}
body:has(.crew-header) :is(#main,#cfboothModal,.crew-confirm) :is(.button-primary,.cfbooth-btn-primary,.crew-button-primary){background:var(--crew-primary);border-color:var(--crew-primary);color:var(--crew-button-text,#fff)}
body:has(.crew-header) :is(#main,#cfboothModal,.crew-confirm) .crew-button-danger{background:var(--crew-danger);border-color:var(--crew-danger);color:#fff}
body:has(.crew-header) :is(#main,#cfboothModal) .crew-button-remove{color:var(--crew-danger);background:#fff}
.crew-section-actions>*,.crew-record-actions>*{white-space:nowrap;flex-shrink:0}
.crew-record-actions{justify-content:flex-start}
.crew-record-table{width:100%;border-collapse:collapse}
.crew-record-table th,.crew-record-table td{padding:14px 12px;border-bottom:1px solid var(--crew-line);text-align:left}
.crew-record-table :is(th,td):last-child{width:260px;min-width:260px}
.crew-inline-editor{padding:20px;border:1px solid var(--crew-line);border-radius:8px;margin:0 0 20px}
.crew-inline-editor[hidden]{display:none}
.crew-confirm{width:min(520px,calc(100% - 32px));padding:0;border:1px solid var(--crew-line);border-radius:10px;color:var(--crew-ink);font:16px/1.55 var(--crew-font)}
.crew-confirm::backdrop{background:#0006}
.crew-confirm h2{font-size:22px;margin:0;padding:20px;background:var(--crew-section-surface)}
.crew-confirm-body{padding:20px}
.crew-confirm-actions{display:flex;justify-content:space-between;gap:32px;margin-top:24px;padding-top:20px;border-top:1px solid var(--crew-line)}
body:has(.crew-header) :is(.crew-button,.button,select):focus-visible{outline:2px solid var(--crew-accent-ink,var(--crew-primary));outline-offset:3px}
@media(max-width:850px){.crew-section-header{align-items:flex-start}.crew-section-actions{width:100%;margin-left:0}.crew-record-table thead{display:none}.crew-record-table tr{display:block;border-bottom:1px solid var(--crew-line);padding:12px 0}.crew-record-table td{display:block;border:0;padding:6px 12px}.crew-record-table :is(th,td):last-child{width:auto;min-width:0}.crew-record-actions{margin-top:8px}}
@media(max-width:480px){.crew-section-actions,.crew-record-actions{flex-direction:column;align-items:stretch}.crew-section-actions>*,.crew-record-actions>*{width:100%}.crew-form-actions{align-items:stretch;flex-direction:column}}

body:has(.crew-header) #main .crew-template-scope .crew-scope-fields label{font-size:var(--crew-type-label);line-height:1.5;letter-spacing:0}

/* Shared section/record layout used by both Fair setup tabs. */
.crew-section-header>div:first-child{flex:1 1 20rem;min-width:0}
.crew-section-header>div.crew-section-actions{flex:0 1 auto}
.crew-record-section{min-width:0}
.crew-record-table-wide-actions :is(th,td):last-child{width:360px;min-width:360px}
.crew-record-table td[colspan]{width:auto;min-width:0}
.crew-record-table td{overflow-wrap:anywhere}
.crew-record-actions{flex-wrap:wrap}
@media(max-width:850px){
 .crew-section-header>div.crew-section-actions{flex:1 1 100%}
 .crew-record-table-wide-actions :is(th,td):last-child{width:auto;min-width:0}
 .crew-record-table td[data-label]::before{content:attr(data-label) ": ";font-weight:600}
}

/* Connected section: one boundary around its heading and content. */
.crew-section-card{background:#fff;border:1px solid var(--crew-line);border-radius:8px;margin:24px 0;min-width:0}
.crew-section-card>.crew-section-header{margin:0;border:0;border-bottom:1px solid var(--crew-line);border-radius:7px 7px 0 0}
.crew-section-body{padding:20px;min-width:0}
.crew-section-body>:first-child{margin-top:0}
.crew-section-body>:last-child{margin-bottom:0}
.crew-section-scope.crew-template-scope.crew-section-card{border:1px solid var(--crew-line);padding-bottom:0}
@media(max-width:480px){.crew-section-body{padding:16px}.crew-section-card>.crew-section-header{padding:16px}}

/* Descriptive context stays unboxed; editable sections use cards. */
.crew-context-description{margin:20px 0 24px}
.crew-context-description p{margin:0 0 8px}
.crew-context-description .crew-section-actions{justify-content:flex-start;margin:12px 0 0}

/* Source belongs beside the section title, not only in the scope selector. */
.crew-section-title-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.crew-source-badge{display:inline-block;padding:4px 10px;border:1px solid #aeb7c2;border-radius:999px;background:#fff;color:var(--crew-ink,#182230);font:600 14px/1.4 var(--crew-font);max-width:100%;overflow-wrap:anywhere}
.crew-source-explanation{font-weight:600}
.crew-record-table-readonly :is(th,td):last-child{width:auto;min-width:0}

/* Student outline drawing reused for immediate, local staff feedback. */
.crew-update-indicator{display:flex;align-items:center;gap:12px;margin:16px 0;min-height:48px;color:var(--crew-ink,#182230)}
.crew-update-indicator[hidden]{display:none}
.crew-update-logo{position:relative;width:48px;height:48px;flex:none;display:none;color:var(--crew-accent-ink,var(--crew-primary))}
.crew-update-logo :is(svg,img){width:100%;height:100%;object-fit:contain}
.crew-update-logo img{padding:8px;box-sizing:border-box}.crew-update-frame{position:absolute;inset:0}
.crew-update-indicator[data-state=pending] .crew-update-logo{display:block}
.crew-update-logo .logo-frame,.crew-update-logo .logo-drawing{stroke:currentColor;stroke-width:3;stroke-linejoin:round;fill:transparent;stroke-dasharray:1;stroke-dashoffset:1;animation:crew-update-draw 3.2s ease-in-out infinite}
.crew-update-logo .logo-drawing{animation-name:crew-update-mark}
.crew-update-check{display:none;font-size:24px;color:var(--crew-ink,#182230)}
.crew-update-indicator[data-state=complete] .crew-update-check{display:block}
.crew-update-message{font-weight:600}
@keyframes crew-update-draw{0%{stroke-dashoffset:1;opacity:.3}50%,80%{stroke-dashoffset:0;opacity:1}100%{stroke-dashoffset:0;opacity:0}}@keyframes crew-update-mark{0%,8%{stroke-dashoffset:1;fill:transparent;opacity:.3}60%{stroke-dashoffset:0;fill:transparent;opacity:1}75%,85%{stroke-dashoffset:0;fill:transparent;opacity:1}100%{stroke-dashoffset:0;fill:transparent;opacity:0}}
@media(prefers-reduced-motion:reduce){.crew-update-logo .logo-frame,.crew-update-logo .logo-drawing{animation:none;stroke-dashoffset:0}}

/* Viewport feedback: stays visible even when the changed records are offscreen. */
.crew-update-indicator:is([data-state=pending],[data-state=complete]){position:fixed;z-index:80;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));width:max-content;max-width:min(480px,calc(100vw - 32px));box-sizing:border-box;margin:0;padding:14px 16px;background:#fff;border:1px solid var(--crew-line);border-radius:8px;box-shadow:0 6px 24px #18223026}
.crew-update-message{min-width:0;overflow-wrap:anywhere}
@media(max-width:480px){.crew-update-indicator:is([data-state=pending],[data-state=complete]){left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:auto;max-width:none;padding:12px;gap:10px}}
/* Staff legacy panels consume the same connected-section, field and action components. */
body:has(.crew-header) #main .crew-adapted-section,body #cfboothModalBody .crew-adapted-section{display:block;padding:0!important;margin:24px 0;border:1px solid var(--crew-line)!important;border-radius:8px;background:#fff;box-shadow:none;min-width:0;overflow:visible}
body:has(.crew-header) .crew-adapted-section>.crew-section-header{margin:0;padding:18px 20px;border:0;border-bottom:1px solid var(--crew-line);border-radius:7px 7px 0 0;background:var(--crew-section-surface)}
body:has(.crew-header) .crew-adapted-section>.crew-section-body{padding:20px;min-width:0}
body:has(.crew-header) :is(#main,#cfboothModal) :is(button,.button,.primary,.secondary,.btn){box-sizing:border-box;min-height:44px;border-radius:8px;padding:var(--crew-control-pad-y) var(--crew-control-pad-x);font:600 var(--crew-type-label,14px)/1.5 var(--crew-font);white-space:normal;max-width:100%}
body:has(.crew-header) :is(#main,#cfboothModal) :is(.primary,.button-primary,.cfbooth-btn-primary,.btn-primary){background:var(--crew-primary);color:var(--crew-button-text,#fff);border:1px solid var(--crew-primary)}
body:has(.crew-header) :is(#main,#cfboothModal) :is(.secondary,.button-secondary,.btn-secondary){background:#fff;color:var(--crew-ink);border:1px solid var(--crew-line)}
body:has(.crew-header) :is(#main,#cfboothModal) :is(.button-danger,.btn-danger,.danger){color:var(--crew-danger);background:#fff;border:1px solid var(--crew-line)}
body:has(.crew-header) :is(#main,#cfboothModal) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea){box-sizing:border-box;min-height:46px;max-width:100%;padding:.7rem 1rem;border:1px solid var(--crew-line);border-radius:8px;font:400 16px/1.5 var(--crew-font);color:var(--crew-ink);background-color:#fff}
body:has(.crew-header) :is(#main,#cfboothModal) .crew-form-actions{justify-content:flex-start;margin-top:20px;padding-top:16px;gap:12px}
body:has(.crew-header) .crew-record-actions form{margin:0}
body:has(.crew-header) .crew-record-actions .crew-form-actions{margin:0;padding:0;border:0}
body:has(.crew-header) a.action-card.crew-resource{display:flex;flex-direction:column;padding:24px;background:#fff;border:1px solid var(--crew-line);border-radius:8px;color:var(--crew-ink);text-decoration:none;transition:transform .18s,border-color .18s}
body:has(.crew-header) a.action-card.crew-resource:hover{transform:translateY(-2px);border-color:var(--crew-primary)}
body:has(.crew-header) .crew-resource-action{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--crew-line);padding-top:18px;margin-top:auto;font-size:14px;font-weight:600}
body:has(.crew-header) .crew-resource-action>span{color:var(--crew-accent-ink,var(--crew-primary));font-size:24px}
.crew-update-indicator[data-state=error]{position:fixed;z-index:100020;right:16px;bottom:16px;width:min(480px,calc(100vw - 32px));padding:16px;background:#fff;border:1px solid var(--crew-danger);border-radius:8px;box-shadow:0 6px 24px #18223026}
#crewGlobalStatus{z-index:100020}
@media(max-width:850px){body:has(.crew-header) .crew-record-table td{display:block;width:auto;min-width:0}body:has(.crew-header) .crew-record-table td[data-label]::before{content:attr(data-label) ': ';font-weight:600}}
@media(max-width:480px){body:has(.crew-header) .crew-adapted-section>.crew-section-body{padding:16px}body:has(.crew-header) :is(#main,#cfboothModal) :is(button,.button,.primary,.secondary){min-height:46px}body:has(.crew-header) .crew-section-actions>*{width:100%}}
@media(prefers-reduced-motion:reduce){body:has(.crew-header) a.action-card.crew-resource{transition:none}body:has(.crew-header) a.action-card.crew-resource:hover{transform:none}}
/* Preserve legacy mutation locking while the common logo carries its feedback. */
body:has(#crewGlobalStatus) #cfboothLoading>div{visibility:hidden}
body:has(.crew-header) .crew-section-body :is(form>label,.form-grid>label,.stack-form>label),body:has(.crew-header) .crew-section-body>label{display:grid;gap:8px;margin-bottom:18px;min-width:0}
body:has(.crew-header) .crew-section-body label:has(>input:is([type=checkbox],[type=radio])){display:flex;align-items:center;gap:10px}
body:has(.crew-header) .crew-section-body label>:is(input:not([type=checkbox]):not([type=radio]),select,textarea){width:100%}
body:has(.crew-header) .page-heading>p{flex-basis:100%;margin-top:0}
body:has(.crew-header) .crew-section-header :is(h2,h3){margin:0!important}
body:has(.crew-header) .page-heading:has(>p){flex-wrap:wrap}

/* School-aware shared controls for staff, central administration and student accounts. */
body:has(.crew-header) #main :is(.crew-button-secondary,.button-secondary,.secondary){background:#fff;border:1px solid var(--crew-line);color:var(--crew-ink)}
body:has(.crew-header) #main :is(.crew-section-actions,.crew-record-actions) button:not(.button-primary):not(.crew-button-primary):not(.primary):not(.crew-button-danger):not(.crew-button-remove):not(.danger):not(.button-danger){background:#fff;border:1px solid var(--crew-line);color:var(--crew-ink)}
body:has(.crew-header) #main .crew-section-body>.crew-inline-form{margin:0}
body:has(.crew-header) #main a.crew-resource{position:relative}
body:has(.crew-header) #main a.crew-resource>.action-icon{align-self:flex-end;color:var(--crew-accent-ink);background:transparent;width:40px;height:40px;font-size:30px;line-height:40px;text-align:center;margin:0 0 12px}
body:has(.crew-header) #main .crew-resource-action{margin-top:auto}
body:has(.crew-header) #main .crew-resource>p{margin-bottom:24px}
body:has(.crew-header) #main :is(.larry-actions,.student-actions){display:flex;flex-wrap:wrap;gap:12px;align-items:center}
body:has(.crew-header) #main .larry-resource{border:1px solid var(--crew-line);border-radius:8px;background:#fff}
body:has(.crew-header) #main .larry-resource>.larry-actions{border-top:1px solid var(--crew-line);padding-top:16px;margin-top:20px}
@media(max-width:480px){body:has(.crew-header) #main :is(.larry-actions,.student-actions){flex-direction:column;align-items:stretch}body:has(.crew-header) #main :is(.larry-actions,.student-actions)>*{width:100%}}
.crew-adapted-section[hidden]{display:none!important}
.crew-section-actions>:is(.section-actions,.panel-actions,.actions){display:flex;align-items:center;flex-wrap:wrap;gap:10px}
body:has(.crew-header) .crew-settings form>.crew-section-card{margin:0}
@media(max-width:480px){.crew-section-actions>:is(.section-actions,.panel-actions,.actions){width:100%;flex-direction:column;align-items:stretch}.crew-section-actions>:is(.section-actions,.panel-actions,.actions)>*{width:100%}}
/* Contained public flows retain their own layout and touch target sizes. */
body.crew-contained .button:is(.primary,.button-primary){background:var(--crew-primary);border-color:var(--crew-primary);color:var(--crew-button-text)}
body.crew-contained :focus-visible{outline:3px solid var(--crew-accent-ink);outline-offset:3px}
body.crew-contained a:not(.button):not(.primary):not(.scarlet-panel):not(.brand),body.crew-contained :is(.save,.red){color:var(--crew-accent-ink)}
body.crew-contained:has(.kiosk-shell){background:var(--canvas,#f2f3f5)}
body:has(.crew-header) a.action-card.crew-resource{box-shadow:none}
@media(max-width:620px){body:has(.crew-header) .crew-form-actions{flex-direction:column;align-items:stretch}body:has(.crew-header) .crew-form-actions>*{width:100%}}
body:has(.crew-header) #main .crew-section-body label>input:is([type=checkbox],[type=radio]){width:20px;height:20px;min-height:20px;max-width:20px;padding:0;margin:0;flex:0 0 20px}
/* Read-only overview summaries and task destinations. */
.crew-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.crew-summary-grid>div{min-width:0}.crew-summary-grid span,.crew-summary-grid strong,.crew-summary-grid small{display:block}.crew-summary-grid strong{font-size:30px;line-height:1.2;margin:10px 0;color:var(--crew-ink)}.crew-summary-grid small{color:var(--crew-muted);font-size:14px}.crew-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:24px 0}.crew-overview-grid .crew-resource{min-width:0}.crew-overview-grid .crew-resource h2{font-size:var(--crew-type-page,30px)}@media(max-width:760px){.crew-summary-grid,.crew-overview-grid{grid-template-columns:1fr}.crew-summary-grid>div+div{border-top:1px solid var(--crew-line);padding-top:20px}}

.crew-summary-grid-four{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:1100px){.crew-summary-grid-four{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.crew-summary-grid-four{grid-template-columns:1fr}}
/* Compact overview cards and review queues, shared across staff modules. */
.crew-overview-card{gap:16px}.crew-overview-card h2{margin:0}.crew-overview-grid .crew-overview-card p{min-height:0;margin:0;max-width:none}.crew-overview-details{display:grid;gap:10px;margin:0 0 4px}.crew-overview-details>div{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}.crew-overview-details dt{color:var(--crew-muted);font-size:14px}.crew-overview-details dd{margin:0;font-size:14px;font-weight:600}.crew-overview-list{list-style:none;padding:0;margin:0}.crew-overview-list li{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0}.crew-overview-list li:first-child{padding-top:0}.crew-overview-list li:last-child{padding-bottom:0}.crew-overview-list li+li{border-top:1px solid var(--crew-line)}.crew-overview-list li>div{min-width:0;overflow-wrap:anywhere}.crew-overview-list strong,.crew-overview-list li>div>span{display:block}.crew-overview-list li>div>span{margin-top:4px;color:var(--crew-muted);font-size:14px}.crew-overview-list .crew-button{flex:none}
@media(max-width:620px){.crew-overview-list li{align-items:stretch;flex-direction:column;gap:12px}.crew-overview-details>div{display:block}.crew-overview-details dd{margin-top:4px}}
/* Mobile banner option 3: full width with square edges; desktop remains rounded. */
@media(max-width:800px){body .crew-module-banner,body .jain-task-banner{width:100%;margin-left:auto;margin-right:auto}body .crew-module-banner,body .jain-task-banner .workspace-banner{border-radius:0}}
/* Shared staff navigation: nested destinations + a sticky mobile launcher/modal drawer. */
body .crew-navigation-layout{grid-template-columns:270px minmax(0,1fr)}
body .crew-navigation{min-width:0;padding:24px 18px;font-family:var(--crew-font,system-ui);background:#fff}
body .crew-navigation nav{display:grid;gap:5px;width:auto;max-width:none;margin:0;padding:0;border:0;background:transparent;overflow:visible}
body .crew-navigation a,body .crew-navigation summary{display:block;box-sizing:border-box;min-height:44px;padding:11px 12px;font-size:15px;line-height:1.45;color:var(--crew-ink,#17212b);white-space:normal;text-decoration:none;border:0;border-radius:6px;margin:0}
body .crew-navigation a[aria-current="page"]{background:var(--crew-primary-soft,#faedf1);color:var(--crew-accent-ink,#a8002a);font-weight:700}
body .crew-navigation .crew-nav-group{margin:0;border:0;padding:0;background:transparent}
body .crew-navigation .crew-nav-group>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;font-weight:700;list-style:none;background:transparent}
body .crew-navigation summary::-webkit-details-marker{display:none}
body .crew-navigation .crew-nav-group>summary:after{content:'›';font-size:22px;line-height:1;transform:rotate(0)}
body .crew-navigation .crew-nav-group[open]>summary:after{transform:rotate(90deg)}
body .crew-navigation .crew-nav-children{display:grid;gap:3px;border-left:2px solid var(--crew-line,#dce1e7);padding:0 0 0 10px;margin:4px 0 8px 10px}
body .crew-navigation .crew-nav-children a{padding:11px 8px;font-size:14px;min-height:44px;border:0;border-radius:6px;text-align:left;justify-content:flex-start}
body .crew-navigation .crew-nav-children a>span[aria-hidden]{display:none}
body .crew-navigation .crew-nav-children a>b{font-weight:inherit}
body .crew-navigation .crew-nav-overview{margin-left:22px;font-size:14px}
body .crew-navigation :is(a,summary):focus-visible,body .crew-menu-open:focus-visible,body .crew-menu-close:focus-visible{outline:3px solid var(--crew-accent-ink,#a8002a);outline-offset:2px}
body .crew-navigation a:hover,body .crew-navigation summary:hover{background:var(--crew-canvas,#f3f5f7)}
body .crew-mobile-menu-bar{display:none}
body dialog.crew-navigation-drawer{box-sizing:border-box;position:fixed;inset:0 auto 0 0;margin:0;padding:0;width:min(88vw,370px);height:100vh;height:100dvh;max-height:100dvh;max-width:none;border:0;border-radius:0;background:#fff;color:var(--crew-ink,#17212b);font-family:var(--crew-font,system-ui);overflow:hidden}
body dialog.crew-navigation-drawer[open]{display:flex;flex-direction:column}
body dialog.crew-navigation-drawer::backdrop{background:rgba(10,18,28,.55)}
body .crew-drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(16px + env(safe-area-inset-top,0px)) 18px 4px;flex:none}
body .crew-drawer-heading h2{font-size:22px;line-height:1.25;margin:0}
body .crew-menu-close{font:inherit;min-height:44px;padding:10px;background:#fff;color:var(--crew-ink,#17212b);border:1px solid var(--crew-line,#dce1e7);border-radius:6px;cursor:pointer;white-space:nowrap}
body .crew-drawer-context{margin:0;padding:0 18px 16px;font-size:14px;border-bottom:1px solid var(--crew-line,#dce1e7);color:var(--crew-muted,#596576)}
body .crew-drawer-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;padding-bottom:env(safe-area-inset-bottom,0px);-webkit-overflow-scrolling:touch}
body .crew-drawer-body .crew-navigation{border:0;width:100%;padding:12px 18px 24px}
@media(max-width:800px){
 body .crew-navigation-layout{grid-template-columns:1fr}
 body .crew-navigation-layout>.crew-navigation{display:none}
 body .crew-mobile-menu-bar{position:sticky;top:0;z-index:100;display:block;width:100%;flex:none;box-sizing:border-box;padding:calc(8px + env(safe-area-inset-top,0px)) 16px 8px;background:var(--crew-canvas,#f8fafb);border-bottom:1px solid var(--crew-line,#dce1e7)}
 body .crew-menu-open{display:flex;align-items:center;gap:14px;width:100%;min-height:48px;box-sizing:border-box;text-align:left;font:600 15px/1.4 var(--crew-font,system-ui);padding:10px 12px;background:#fff;color:var(--crew-ink,#17212b);border:1px solid var(--crew-line,#dce1e7);border-radius:6px;cursor:pointer}
 body .crew-menu-open>span:first-child{flex:none}
 body .crew-menu-context{border-left:1px solid var(--crew-line,#dce1e7);padding-left:14px;font-size:13px;font-weight:400;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--crew-muted,#596576)}
 body:has(.crew-mobile-menu-bar) :is(main[id],[id]:target){scroll-margin-top:90px}
}

/* Shared school/account workspace and sidebar fallback when JavaScript is unavailable. */
body .crew-core-layout{margin-top:30px}
body .crew-navigation :is(.task-support,.crew-module-support)>summary{list-style:revert}
body .crew-navigation :is(.task-support,.crew-module-support)>summary::-webkit-details-marker{display:inline}
body .crew-module-sidebar .crew-nav-children a{font-size:14px;min-height:44px}
@media(max-width:800px){body .crew-core-layout{margin-top:0}body .crew-core-layout .crew-module-content{padding-top:20px}}

/* Editable cards must size to their fields, rather than inherit navigation-card columns. */
.crew-module-content .semester-admin-grid,.page-shell .semester-admin-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));align-items:start}
.semester-admin-grid>form,.semester-admin-grid label,.semester-admin-grid .form-grid{min-width:0}
.semester-admin-grid .form-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}
.semester-admin-grid input,.semester-admin-grid select,.semester-admin-grid textarea{min-width:0;max-width:100%}
.semester-admin-grid>form:hover{transform:none}

/* Shared Administration groups and dynamic database menus. */
body .crew-navigation .crew-nav-children[hidden]{display:none!important}
body .crew-navigation .crew-nav-group:has(nav:not([hidden]) a[aria-current="page"])>summary{color:var(--crew-accent-ink);background:var(--crew-primary-soft,#faedf1)}

/* Shared staff session warning: neutral dialog, school-colored continuation. */
.crew-session-dialog{box-sizing:border-box;width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid #d6dce3;border-radius:12px;background:#fff;color:#1c2733;box-shadow:0 16px 60px #0003}
.crew-session-dialog::backdrop{background:#18223080}
.crew-session-dialog h2{margin:0 0 16px;font-size:22px;line-height:1.25}
.crew-session-dialog p{font-size:16px;line-height:1.55;margin:0 0 16px}
.crew-session-dialog .crew-session-countdown{font-variant-numeric:tabular-nums;font-weight:700}
.crew-session-dialog .crew-session-error{color:#a51d30}
.crew-session-dialog .crew-session-error:empty{display:none}
.crew-session-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.crew-session-actions button,.crew-session-actions a{box-sizing:border-box;min-height:46px;padding:12px 18px;border:1px solid #cfd6df;border-radius:7px;font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;cursor:pointer}
.crew-session-actions button{background:var(--crew-primary,#c03);color:var(--crew-button-text,#fff);border-color:var(--crew-primary,#c03)}
.crew-session-actions a{background:white;color:var(--crew-accent-ink,#9b002b)}
.crew-session-actions [hidden]{display:none!important}
.crew-session-actions :focus-visible{outline:3px solid var(--crew-primary,#c03);outline-offset:3px}
.crew-session-actions button:disabled{opacity:.65;cursor:wait}
.crew-session-notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:1000;box-sizing:border-box;width:max-content;max-width:calc(100vw - 32px);padding:14px 20px;background:#edf7ef;color:#19552a;border:1px solid #a8cdb1;border-radius:8px;box-shadow:0 4px 16px #0002}

/* Resource workspace cards use the shared padded surface contract. */
body:has(.crew-header) #main .larry-resource{padding:20px;margin-top:16px;min-width:0}
body:has(.crew-header) #main .larry-resource h3{overflow-wrap:anywhere}
@media(max-width:480px){body:has(.crew-header) #main .larry-resource{padding:16px}.larry-workspace .larry-metrics{grid-template-columns:1fr}}

/* Disabled shared actions retain a distinct non-interactive appearance. */
body:has(.crew-header) :is(#main,#cfboothModal,.crew-confirm) .crew-button:disabled{background:#e1e4e8;border-color:#cbd1d8;color:#59636e;opacity:1;cursor:not-allowed;filter:none;box-shadow:none}
