/* Size changes affect content, never the painted frame or page scale. The
   medium profile preserves existing metrics; saved table dimensions stay intact. */
html[data-luforms-size=small]{--luforms-text-scale:.9;--display-card-width:320px;--display-row-min:32px}
html[data-luforms-size=medium]{--luforms-text-scale:1;--display-row-min:0px}
html[data-luforms-size=large]{--luforms-text-scale:1.15;--display-card-width:420px;--display-row-min:42px}
html[data-luforms-size=xlarge]{--luforms-text-scale:1.3;--display-card-width:470px;--display-row-min:48px}

.luforms-theme-settings{background:#fbf5e7}
html[data-luforms-skin=minimal] .luforms-theme-settings{background:#fff}
.luforms-theme-settings fieldset+fieldset{margin-top:24px}
.display-motion>label{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:12px;cursor:pointer}
.luforms-theme-settings .display-motion input{appearance:none;flex:none;width:44px;height:26px;min-height:0;padding:3px;margin:0;border:1px solid #938774;border-radius:20px;background:#938774;cursor:pointer}
.display-motion input::before{content:'';display:block;width:18px;height:18px;background:white;border-radius:50%;transition:translate .15s}
.luforms-theme-settings .display-motion input:checked{background:var(--primary,#325973);border-color:var(--primary,#325973)}
.display-motion input:checked::before{translate:18px 0}
/* Keep switch tracks visible above the minimal skin's generic white inputs. */
html:root[data-luforms-skin=minimal][data-luforms-theme] .luforms-theme-settings .display-motion input{background:#94a3b8!important;border-color:#94a3b8!important;border-radius:20px}
html:root[data-luforms-skin=minimal][data-luforms-theme] .luforms-theme-settings .display-motion input:checked{background:#2563eb!important;border-color:#2563eb!important}
.display-size-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}
.display-size-options label{position:relative;display:flex;align-items:center;justify-content:center;padding:10px 4px;border:1px solid var(--line,#c6b58f);border-radius:3px;cursor:pointer}
.display-size-options input{position:absolute;opacity:0;width:1px;height:1px}
.display-size-options label:has(:checked){border-color:var(--primary,#325973);color:var(--primary,#325973);box-shadow:inset 0 0 0 1px currentColor}
.display-size-options label:has(:focus-visible),.display-motion input:focus-visible{outline:2px solid var(--primary,#325973);outline-offset:3px}
.theme-dialog-foot{gap:12px;flex-wrap:wrap}
.theme-dialog-foot [data-display-reset]{background:transparent;color:inherit;margin-right:auto;padding-inline:0}

/* Keep hover/selection/save feedback. Disable cinematic motion while allowing
   stationary browser snapshots to cover destination preparation. */
/* Keep native snapshots available for an atomic swap, with no visible animation. */
html:is([data-luforms-motion=off],[data-luforms-skin=minimal],[data-folio-static])::view-transition-group(*),
html:is([data-luforms-motion=off],[data-luforms-skin=minimal],[data-folio-static])::view-transition-old(*),
html:is([data-luforms-motion=off],[data-luforms-skin=minimal],[data-folio-static])::view-transition-new(*){animation:none!important;mix-blend-mode:normal}
html:is([data-luforms-motion=off],[data-luforms-skin=minimal],[data-folio-static])::view-transition-group(folio-curl){display:none}
html[data-folio-static]::view-transition-old(root){animation:folio-static-hold 4s linear both!important;animation-play-state:running!important;opacity:1;clip-path:none}
html[data-folio-static]::view-transition-new(root){visibility:hidden}
@keyframes folio-static-hold{from,to{opacity:1}}
html[data-luforms-motion=off] .folio-curl-source{view-transition-name:none;display:none}
html[data-luforms-motion=off] :is(.page-heading,.student-summary,.student-card,.form-card,.overview,.all-materials,.followup-page,.expanded-application){animation:none!important;opacity:1;translate:0 0}
html:is([data-luforms-motion=off],[data-luforms-skin=minimal])[data-folio-boot=pending] body{opacity:1!important;pointer-events:auto!important}

/* Controls grow with their own inherited font, including popovers and dialogs. */
html:root[data-luforms-size]:not([data-luforms-size=medium]) body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]),select){min-height:2.35em}
html:root[data-luforms-size]:not([data-luforms-size=medium]) body :is(.search-field,.directory .directory-toolbar .search-field){height:auto;min-height:2.4em}
html:root[data-luforms-size]:not([data-luforms-size=medium]) body :is(.heading-actions,.directory-toolbar,.master-query-main,.sheet-filter-actions,.workspace-section-heading,.account-editor-actions){flex-wrap:wrap;row-gap:8px}
html:root[data-luforms-size]:not([data-luforms-size=medium]) body :is(.modal,dialog){max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box}
html:root[data-luforms-size]:not([data-luforms-size=medium]) body .student-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--display-card-width)),1fr))!important}
html:root[data-luforms-size]:not([data-luforms-size=medium]) body :is(.student-card,.directory-student-card){height:auto;max-height:none;min-width:0}
html:root[data-luforms-size]:not([data-luforms-size=medium]) body :is(.student-card-summary,.student-card-task,.student-card-footer){flex-wrap:wrap;white-space:normal;overflow-wrap:anywhere}
html:root[data-luforms-size]:not([data-luforms-size=medium]) body .student-card-tags .tag-text{font-size:17px}

/* Keep widths and user row-height settings; only raise the rendered minimum. */
html[data-luforms-size] .admin-master-page{--master-effective-row-height:max(var(--master-row-height,36px),var(--display-row-min,0px))}
html:root[data-luforms-size]:not([data-luforms-size=medium]) body .spreadsheet-table :is(input,select){min-height:0}
html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .workspace-application-layout{grid-template-columns:minmax(260px,23%) minmax(0,1fr)}
html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .workspace-facts>div{grid-template-columns:minmax(100px,7em) minmax(0,1fr)}
html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body :is(.workspace-rail-item,.workspace-facts dd,.workspace-program,.workspace-next){overflow-wrap:anywhere}
html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .workspace-application-choice{grid-template-columns:2em minmax(0,1fr) minmax(180px,11em) 18px}
html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .accounts-page .account-admin-layout:has(.account-editor:not([hidden])){grid-template-columns:minmax(0,1fr) minmax(360px,30%)}
html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .account-editor{overflow:auto}
@media(max-width:1500px){
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body :is(.workspace-profile-columns,.workspace-account-grid,.workspace-facts){grid-template-columns:1fr}
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .workspace-profile-columns>section+section{padding:20px 0 0;border-left:0;border-top:1px solid var(--line)}
}
@media(max-width:1100px){
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .workspace-application-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .workspace-application-rail{display:flex;overflow-x:auto;overflow-y:hidden;height:auto;max-height:210px;gap:12px;border-right:0;border-bottom:1px solid var(--line);padding:0 0 12px}
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .workspace-application-rail>.application-order-row{flex:0 0 260px}
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .workspace-all-apps{flex-shrink:0}
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body .accounts-page .account-admin-layout:has(.account-editor:not([hidden])){grid-template-columns:1fr}
}
@media(max-width:900px){
 html:root[data-luforms-size] body .workspace-application-rail>.application-order-row{flex:0 0 calc(190px * var(--luforms-text-scale,1))}
 html:root[data-luforms-size] body .workspace-application-rail{height:auto;max-height:210px;overflow-x:auto;overflow-y:hidden}
 html:root[data-luforms-size] body .workspace-all-apps{flex-shrink:0}
}
@media(min-width:901px){
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body.collection-workspace .topbar{height:calc(52px * var(--luforms-text-scale));min-height:calc(52px * var(--luforms-text-scale))}
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body.collection-workspace .topbar-inner{height:100%}
 html:root[data-luforms-size]:is([data-luforms-size=large],[data-luforms-size=xlarge]) body.collection-workspace .page-shell.page-shell{top:calc(52px * var(--luforms-text-scale) + 12px)!important}
}
@media(max-width:700px){
 html:root[data-luforms-size]:not([data-luforms-size=medium]) body .workspace-application-choice{grid-template-columns:1.5em minmax(0,1fr) 18px}
 html:root[data-luforms-size]:not([data-luforms-size=medium]) body .workspace-application-choice>.workspace-status{grid-column:2}
 html:root[data-luforms-size]:not([data-luforms-size=medium]) body .workspace-application-choice>svg{grid-column:3;grid-row:1/3}
 html:root[data-luforms-size]:not([data-luforms-size=medium]) body .accounts-page .account-admin-layout:has(.account-editor:not([hidden])){grid-template-columns:1fr}
 html:root[data-luforms-size]:not([data-luforms-size=medium]) body :is(.app-header:not(.campus-header),.topbar){flex-wrap:wrap;height:auto!important;min-height:64px;row-gap:6px}
 html:root[data-luforms-size]:not([data-luforms-size=medium]) body :is(.form-two,.form-grid){grid-template-columns:1fr}
}
