/* Shared density and motion layer. It follows the brand palette without overriding it. */
:root{--compact-gap:10px;--popup-ease:cubic-bezier(.18,.82,.24,1)}
.shell,.workspace,#main,#content{min-width:0}
.workspace{padding:10px clamp(12px,1.65vw,25px) 28px}
.topbar{min-width:0;min-height:43px;gap:8px;margin-bottom:10px;padding-bottom:8px}
.top-search{min-width:100px}.top-search input[type=search]{height:36px;min-height:36px}
.topbar .profile{max-width:220px}.topbar .profile>span:last-child{min-width:0}.topbar .profile strong,.topbar .profile small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page-header{min-width:0;min-height:0;align-items:center;gap:8px;padding:9px 14px;margin-bottom:10px}
.page-header h1{margin:2px 0 0;font-size:clamp(23px,2.3vw,31px);line-height:1.12}
.page-header p{margin:2px 0 0;line-height:1.35}
.page-header .eyebrow{line-height:1.1}.page-header .eyebrow .page-plane{width:19px;height:19px}
.page-header .eyebrow .page-plane img{width:18px;height:15px}
.page-header:before{height:38px;width:80px;right:16%;top:5px}.page-header:after{height:13px;width:45px}.header-jet{height:34px;width:48px;top:8px}
.page-actions{min-width:0;gap:6px}.page-actions .button{min-height:33px;padding-inline:10px}
.panel{min-width:0;padding:12px}.section-title{min-width:0;gap:8px;margin-bottom:8px}.section-title>div{min-width:0}.section-title h2{line-height:1.2}.section-title p{line-height:1.35}
.stat-grid,.dashboard-grid,.settings-grid,.community-layout,.course-overview,.discover-grid,.module-grid,.social-layout,.social-detail-layout,.chat-layout{min-width:0;gap:var(--compact-gap)}
.settings-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));align-items:start}
#content:has(#passwordForm)>.settings-grid{display:block;columns:2;column-gap:10px}
#content:has(#passwordForm)>.settings-grid>.panel{display:inline-block;width:100%;margin:0 0 10px;break-inside:avoid;vertical-align:top}
.dashboard-grid{grid-template-columns:minmax(0,1.5fr) minmax(270px,1fr);align-items:start}
.stat-grid{margin-bottom:10px}.stat-card{min-width:0;min-height:104px;padding:10px}.stat-card small{margin-top:6px;line-height:1.2}.stat-card strong{font-size:25px}.stat-card em{margin-top:5px}
.discover-panel{margin-bottom:10px}.discover-action{min-width:0;min-height:80px;padding:10px}.discover-action .icon-color{margin-bottom:5px}.discover-action small{margin-top:2px;line-height:1.25}
.module-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))}.module-tile{min-width:0;min-height:74px;padding:10px}.module-tile .icon,.module-tile .icon-color{margin-bottom:4px}
.surface.panel>p,.setting-note{line-height:1.4}.stack-form,.master-form,.field-grid,.wish-form-grid{gap:7px}
.form-field,.stack-form>label,.master-form>label{min-width:0}.input,select,textarea,input[type=file]{max-width:100%}
.table-wrap{max-width:100%;overflow-x:auto}.toolbar{gap:6px;margin-bottom:8px}.pagination{margin-top:8px}
.profile-cover{height:150px}.profile-body{padding:0 15px 12px}.profile-identity{margin-top:-35px;gap:10px}.profile-identity-text{padding-top:39px}.profile-photo.large,.profile-initial.large{width:76px;height:76px}.profile-identity h2{font-size:21px}.profile-social-row{margin:8px 0}.profile-buttons{margin-bottom:9px}.profile-tabs button{padding:8px 11px}.profile-tab-panel{padding-top:10px}.profile-tab-panel h3{margin-bottom:4px}.profile-tab-panel p{margin:3px 0}
.profile-directory{margin-top:10px}.profile-dialog .section-title{margin-bottom:8px}
:is(#content,dialog) .people-finder-controls>.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.social-feed{gap:7px;margin:7px 0}.social-feed>.social-post{margin-bottom:0}.social-composer,.social-comments{margin-bottom:7px}
.alert-tone-picker{display:grid;gap:5px;margin:10px 0 6px}.alert-tone-picker>label{font-size:11px;font-weight:750}.alert-tone-controls{display:flex;align-items:center;gap:7px;min-width:0}.alert-tone-controls select{flex:1;min-width:0}.alert-tone-controls .button{flex:none}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
dialog .dialog-head,dialog .section-title,dialog .quick-dialog-head{gap:8px;margin-bottom:9px}
dialog .dialog-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
dialog .dialog-actions .button{white-space:normal;min-height:34px}

/* The default dialog follows the supplied tilted entrance and return motion. */
html[data-popup-animation="lift"] dialog{
  opacity:0;transform:translate3d(18px,40px,0) rotate(6deg) scale(.92);
  transition:opacity .28s var(--popup-ease),transform .28s var(--popup-ease),overlay .28s allow-discrete,display .28s allow-discrete;
}
html[data-popup-animation="lift"] dialog[open]{opacity:1;transform:none;animation:none!important}
@starting-style{html[data-popup-animation="lift"] dialog[open]{opacity:0;transform:translate3d(-18px,40px,0) rotate(-7deg) scale(.9)}}
html[data-popup-animation="lift"] dialog::backdrop{background:#17233700;transition:background-color .28s ease,overlay .28s allow-discrete,display .28s allow-discrete}
html[data-popup-animation="lift"] dialog[open]::backdrop{background:#17233766;animation:none!important}
@starting-style{html[data-popup-animation="lift"] dialog[open]::backdrop{background:#17233700}}

@media(max-width:1100px){.dashboard-grid{grid-template-columns:1fr}.settings-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr))}}
@media(max-width:680px){
  :root{--compact-gap:7px}
  .workspace{padding:8px 9px calc(81px + env(safe-area-inset-bottom))}
  .topbar{gap:5px;min-height:38px;margin-bottom:7px;padding-bottom:6px}.top-search{flex:1 1 90px;min-width:70px}.top-search input[type=search]{height:32px;min-height:32px;font-size:11px}
  .topbar .button.small{min-height:31px;padding-inline:7px;font-size:10px}.topbar .profile{max-width:36px;padding:2px}.topbar .profile>span:last-child{display:none}
  .page-header{padding:7px 10px;margin-bottom:8px;min-height:0}.page-header h1{font-size:clamp(19px,5vw,24px)}.page-header p{font-size:11px}.page-header:before{height:28px;width:50px}.page-header:after{display:none}
  .page-header .page-actions{width:100%;margin-top:5px}.page-header .page-actions:empty{display:none}.page-header .page-actions .button{flex:1 1 auto;min-height:32px}
  .panel{padding:10px}.section-title{align-items:flex-start}.stat-grid{gap:7px}.stat-card{min-height:88px;padding:8px}.stat-card small{margin-top:4px}.stat-card strong{font-size:22px}
  .discover-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.discover-action{min-height:76px;padding:8px}.discover-action small{font-size:10px}
  .module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.module-tile{min-height:69px;padding:8px}.module-tile small{line-height:1.2}
  .settings-grid,.dashboard-grid,.community-layout,.course-overview,.social-layout,.social-detail-layout,.chat-layout{grid-template-columns:minmax(0,1fr)}
  #content:has(#passwordForm)>.settings-grid{columns:1}
  .chat-layout{min-height:0}.chat-people{max-height:none;overflow:visible}.chat-layout>.panel{min-height:0}
  .profile-cover{height:112px}.profile-body{padding:0 10px 10px}.profile-identity{margin-top:-26px}.profile-identity-text{padding-top:29px}.profile-photo.large,.profile-initial.large{width:62px;height:62px}.profile-identity h2{font-size:18px}.profile-social-row{margin:6px 0}.profile-buttons{margin-bottom:7px}.profile-tabs button{padding:7px 8px}.profile-tab-panel{padding-top:8px}
  dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:11px!important;border-radius:14px!important}
  dialog .field-grid{grid-template-columns:1fr}dialog .dialog-actions .button{flex:1 1 auto}
  html[data-popup-animation="lift"] dialog{transform:translate3d(8px,25px,0) rotate(3deg) scale(.94)}
  @starting-style{html[data-popup-animation="lift"] dialog[open]{transform:translate3d(-8px,25px,0) rotate(-3deg) scale(.93)}}
}
@media(max-width:380px){.topbar .ask-ai{padding-inline:4px;font-size:9px}.alert-tone-controls{flex-wrap:wrap}.alert-tone-controls .button{width:100%}}
@media(prefers-reduced-motion:reduce){html[data-popup-animation="lift"] dialog,html[data-popup-animation="lift"] dialog::backdrop{transition:none!important;transform:none!important}html[data-popup-animation="lift"] dialog[open]{animation:none!important}}
.recovery-code-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 20px;padding-left:22px}.recovery-code-list code{font-size:12px;letter-spacing:.04em;color:var(--heading)}#showRecovery{margin-top:8px}#recoveryCodesResult:not(:empty){padding:10px;border:1px solid #dce4ed;border-radius:10px;background:#fff}@media(max-width:480px){.recovery-code-list{grid-template-columns:1fr}}
.external-key-value{display:block;overflow-wrap:anywhere;padding:8px;border-radius:8px;background:#f2f5f8;font-size:12px}#externalKeyResult:not(:empty){padding:10px;border:1px solid #dce4ed;border-radius:10px;background:#fff}#externalKeyMaster .developer-row{gap:10px}.website-chart{height:150px;display:flex;align-items:flex-end;gap:4px;overflow-x:auto;margin:12px 0 20px;padding:4px 2px 15px;border-bottom:1px solid #dce4ed}.website-chart>div{height:100%;min-width:24px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px}.website-chart span{display:block;width:14px;min-height:3px;border-radius:4px 4px 0 0;background:var(--accent)}.website-chart small{font-size:9px;white-space:nowrap}
.report-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:8px;align-items:end}.report-filters label{display:grid;gap:4px;min-width:0}.report-filters .page-actions{align-self:end}.report-filters .form-error{grid-column:1/-1;margin:0}#recordReportResult{margin-top:12px}
.intake-upload{cursor:pointer}.intake-preview-list{max-height:16rem;overflow:auto;margin:.65rem 0;padding:.55rem .7rem;border:1px solid color-mix(in srgb,var(--text-muted,#667085) 20%,transparent);border-radius:12px;font-size:.86rem}.intake-preview-list>div{padding:.32rem 0;overflow-wrap:anywhere}.intake-preview-list small{margin-left:.35rem;color:var(--text-muted,#667085)}.intake-item{padding:.7rem 0;border-bottom:1px solid color-mix(in srgb,var(--text-muted,#667085) 16%,transparent)}.intake-item strong,.intake-item small{display:block;overflow-wrap:anywhere}.intake-item small{color:var(--text-muted,#667085)}.intake-item summary{cursor:pointer;margin:.4rem 0}.intake-item dl{display:grid;gap:.3rem;margin:.45rem 0;font-size:.86rem}.intake-item dl>div{display:grid;grid-template-columns:minmax(6rem,30%) 1fr;gap:.5rem}.intake-item dt{color:var(--text-muted,#667085)}.intake-item dd{margin:0;overflow-wrap:anywhere}.intake-item .page-actions{margin-top:.5rem}@media(max-width:640px){.intake-item dl>div{grid-template-columns:1fr;gap:0}.intake-item .page-actions{display:flex;flex-wrap:wrap}.intake-upload{max-width:100%}}
.intake-filters{display:grid;grid-template-columns:minmax(110px,150px) minmax(140px,1fr) auto;gap:8px;align-items:end}.intake-filters label{display:grid;gap:4px;min-width:0}.intake-pager{justify-content:flex-end;align-items:center;margin-top:10px}.intake-pager span{margin-right:auto;color:var(--text-muted,#667085);font-size:.8rem}@media(max-width:640px){.intake-filters{grid-template-columns:1fr 1fr}.intake-filters button{grid-column:1/-1}}
.catalog-layout{display:grid;grid-template-columns:minmax(210px,290px) minmax(0,1fr);gap:14px;align-items:start}
.catalog-layout .catalog-list{position:sticky;top:12px}
.catalog-details{display:grid;gap:14px;min-width:0}
.catalog-course{width:100%;display:grid;gap:4px;padding:12px;text-align:left;border:1px solid #dde4eb;border-radius:14px;background:#fff;color:var(--heading,#252b3b);cursor:pointer;transition:transform .2s ease,border-color .2s ease,background .2s ease}
.catalog-course:hover{transform:translateY(-2px);border-color:var(--accent,#6458d6)}
.catalog-course.active{background:color-mix(in srgb,var(--accent,#6458d6) 9%,white);border-color:var(--accent,#6458d6)}
.catalog-course small{color:var(--body,#667085);line-height:1.4}
.catalog-links{display:flex;gap:8px;flex-wrap:wrap}
.catalog-links span{padding:5px 9px;border-radius:999px;background:#eef2f6;font-size:12px}
.catalog-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.catalog-teacher-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;max-height:50vh;overflow:auto}
.catalog-teacher-grid fieldset{min-width:0;border:1px solid #dde4eb;border-radius:12px;padding:10px}
.catalog-teacher-grid legend{font-weight:700;padding:0 4px}
@media(max-width:760px){.catalog-layout{grid-template-columns:1fr}.catalog-layout .catalog-list{position:static}.catalog-form-grid{grid-template-columns:1fr}}
