@media(max-width:760px){.ap-sidebar{top:68px;height:calc(100dvh - 68px)}}
/* Keep the foundation wordmark legible and consistent across authenticated dashboards. */
.student-header-brand,
.cd-page .sd-brand,
.ap-top-brand {
  display: flex;
  align-items: center;
  flex: 0 1 310px;
  min-width: 150px;
  max-width: 320px;
  text-decoration: none;
}

.student-header-brand img,
.cd-page .sd-brand img,
.ap-top-brand img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68px;
  object-fit: contain;
}

.cd-page .sd-header,
.student-header {
  height: 82px;
  min-height: 82px;
}

.ap-top {
  height: 82px;
  min-height: 82px;
  background: linear-gradient(100deg, #fff7df, #fffef7 65%, #fff4d9);
  color: #071e4d;
  border-bottom: 2px solid #d5a233;
}

.ap-top-brand {
  flex: 0 1 310px;
  margin-right: auto;
}

.ap-top .ap-global-search {
  margin: 0 auto;
}

.ap-top .ap-icon,
.ap-top .ap-account {
  color: #850000;
}

.ap-top .ap-account small {
  color: #42506c;
}

@media (max-width: 1000px) {
  .student-header-brand,
  .cd-page .sd-brand,
  .ap-top-brand {
    flex-basis: 260px;
  }
}

@media (max-width: 760px) {
  .student-header,
  .cd-page .sd-header,
  .ap-top {
    height: 68px;
    min-height: 68px;
  }

  .student-header-brand,
  .cd-page .sd-brand {
    flex: 1 1 0;
    min-width: 0;
    max-width: 230px;
  }

  .student-header-brand img,
  .cd-page .sd-brand img,
  .ap-top-brand img {
    max-height: 50px;
  }

  .ap-top-brand {
    flex: 0 1 190px;
    min-width: 95px;
    max-width: 190px;
    margin-right: 0;
  }

  .ap-top .ap-global-search {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .ap-top-brand {
    flex-basis: 145px;
    min-width: 76px;
    max-width: 145px;
  }

  .ap-top-brand img {
    max-height: 42px;
  }
}

/* Shared policy dropdown in authenticated dashboard headers. */
.sd-header,.student-header,.ap-top{position:sticky!important;top:0;z-index:80;overflow:visible}
.ag-more{position:relative;display:inline-flex;align-items:center;flex:none;color:#790000;font:600 13px Arial,sans-serif}
.ag-more>summary{list-style:none;display:flex;align-items:center;gap:7px;min-height:34px;padding:6px 9px;border:1px solid #dfb95d;border-radius:7px;background:linear-gradient(#fffdf5,#fff3d3);color:#790000;cursor:pointer;white-space:nowrap}
.ag-more>summary::-webkit-details-marker{display:none}
.ag-more[open]>summary,.ag-more>summary:hover{background:#ffedbd}
.ag-more-menu{position:absolute;right:0;top:calc(100% + 7px);z-index:120;min-width:220px;padding:9px;border:1px solid #d2a33d;border-radius:9px;background:#fffaf0;box-shadow:0 12px 30px #3c180033;color:#4e0700}
.ag-more-menu strong{display:block;padding:8px 10px;color:#810000;font-size:13px}
.ag-more-menu a{display:block;padding:9px 10px;border-radius:6px;color:#4e0700;text-decoration:none;font:14px Arial,sans-serif}
.ag-more-menu a:hover{background:#ffedbd}
@media(max-width:760px){.ag-more>summary{min-height:31px;padding:5px 7px;font-size:11px}.ag-more-menu{position:fixed;right:10px;top:72px;width:min(250px,calc(100vw - 20px))}}

/* Unified cream, maroon and gold dashboard header */
:is(.student-header,.cd-page .sd-header,.ap-top,.admin-header){box-sizing:border-box;display:flex;align-items:center;gap:20px;height:82px!important;min-height:82px!important;padding:12px 24px!important;background:#fffaf0!important;border:0!important;border-bottom:2px solid #d5a233!important;box-shadow:0 3px 16px #54240b0b;color:#790000;font-family:Arial,sans-serif;flex-wrap:nowrap}
:is(.student-header,.cd-page .sd-header,.ap-top) :is(.student-header-menu,.sd-menu-button,#approval-menu){display:grid!important;place-items:center;width:44px!important;height:44px!important;flex:0 0 44px;padding:10px!important;align-self:center;border:1px solid #ead9b9!important;border-radius:10px!important;background:#fff7e6!important;color:#790000!important;font-size:24px;cursor:pointer}
:is(.student-header-brand,.cd-page .sd-brand,.ap-top-brand){flex:0 1 280px!important;min-width:140px!important;max-width:280px!important;margin:0!important}
:is(.student-header-brand,.cd-page .sd-brand,.ap-top-brand) img{width:100%!important;height:auto!important;max-height:58px!important;object-fit:contain!important}
:is(.student-header-search,.cd-page .sd-search,.ap-global-search){display:flex!important;flex:1 1 300px!important;min-width:100px!important;max-width:620px!important;margin:0 auto!important;height:46px;border:1px solid #e3d4ba!important;border-radius:13px!important;overflow:hidden;background:#fffdf8!important;box-shadow:none!important}
:is(.student-header-search,.cd-page .sd-search,.ap-global-search) input[type=search]{box-sizing:border-box;flex:1;width:100%;min-width:0;border:0!important;background:transparent!important;padding:12px 16px!important;color:#24344d;font:14px Arial,sans-serif;outline-offset:-3px}
:is(.student-header-search,.cd-page .sd-search,.ap-global-search) button{display:grid;place-items:center;width:50px;flex:0 0 50px;border:0!important;border-radius:0!important;background:#790000!important;color:#fff4d8!important;font-size:25px;cursor:pointer}
:is(.student-header-actions,.cd-page .sd-actions){display:flex!important;align-items:center;gap:14px!important;margin-left:0!important;flex:none}
:is(.student-header,.cd-page .sd-header,.ap-top) .language{position:static!important;display:flex!important;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 12px!important;background:#fffaf0!important;border:1px solid #dfceb1!important;border-radius:10px!important;color:#790000!important;font:13px Arial,sans-serif;white-space:nowrap;box-shadow:none!important}
:is(.student-header,.cd-page .sd-header,.ap-top) .ag-more{display:none!important}
:is(.student-header,.cd-page .sd-header,.ap-top) :is(.sd-header-icon,.dh-bell,.ap-icon){display:grid;place-items:center;position:relative;width:40px;height:40px;flex:none;border:0;background:transparent;color:#790000;text-decoration:none;border-radius:10px}
:is(.student-header,.cd-page .sd-header,.ap-top) .icon{width:23px;height:23px;flex:none}
:is(.student-header-profile,.sd-account-toggle,.ap-account){display:flex;align-items:center;gap:10px;border:0!important;background:transparent!important;padding:0!important;color:#790000!important;text-decoration:none;font:14px Arial,sans-serif;cursor:pointer;white-space:nowrap}
:is(.student-header-avatar,.sd-mini-avatar,.ap-avatar){display:grid;place-items:center;flex:none;width:42px!important;height:42px!important;border-radius:50%;border:1px solid #d7ac56!important;background:#ffe7b2!important;color:#790000!important;font-size:18px;overflow:hidden}
:is(.student-header-avatar,.sd-mini-avatar,.ap-avatar) img{width:100%;height:100%;object-fit:cover}
:is(.student-header-profile,.sd-account-toggle,.ap-account) small{display:block;font:11px Arial,sans-serif;color:#7c715f!important;margin-top:4px}
.dh-profile{position:relative}.dh-profile>summary{list-style:none}.dh-profile>summary::-webkit-details-marker{display:none}.dh-profile-menu{position:absolute;right:0;top:calc(100% + 17px);min-width:190px;padding:8px;background:#fffaf0;border:1px solid #e1c999;border-radius:12px;box-shadow:0 10px 30px #3d180022;z-index:130}.dh-profile-menu a{display:block;padding:12px;color:#790000;text-decoration:none;border-radius:7px;font:14px Arial,sans-serif}.dh-profile-menu a:hover{background:#fff0d0}
body:has(.student-header){--student-header-height:82px!important}.cd-page .sd-sidebar{top:82px;height:calc(100vh - 82px)}
@media(max-width:1100px){:is(.student-header,.cd-page .sd-header,.ap-top){gap:12px;padding:12px 16px!important}:is(.student-header-brand,.cd-page .sd-brand,.ap-top-brand){max-width:230px!important;flex-basis:230px!important}:is(.student-header-profile,.sd-account-toggle,.ap-account)>span:not(:first-child),.ap-account strong{display:none}:is(.student-header-actions,.cd-page .sd-actions){gap:9px!important}}
@media(max-width:760px){:is(.student-header,.cd-page .sd-header,.ap-top){height:68px!important;min-height:68px!important;padding:10px 12px!important;gap:10px}:is(.student-header-brand,.cd-page .sd-brand,.ap-top-brand){flex:1 1 150px!important;min-width:80px!important;max-width:220px!important}:is(.student-header-brand,.cd-page .sd-brand,.ap-top-brand) img{max-height:45px!important}:is(.student-header-search,.cd-page .sd-search,.ap-global-search){flex:0 0 38px!important;min-width:38px!important;width:38px;max-width:38px!important;height:38px;border:0!important;background:transparent!important}:is(.student-header-search,.cd-page .sd-search,.ap-global-search) input[type=search]{display:none}:is(.student-header-search,.cd-page .sd-search,.ap-global-search) button{width:38px;flex-basis:38px;border-radius:9px!important;background:#790000!important}:is(.student-header,.cd-page .sd-header,.ap-top) .language{min-height:34px;padding:6px!important;font-size:11px;gap:4px}:is(.student-header,.cd-page .sd-header,.ap-top) .language .icon{display:none}:is(.student-header,.cd-page .sd-header,.ap-top) :is(.dh-bell,.sd-header-icon,.ap-icon){display:none}:is(.student-header-avatar,.sd-mini-avatar,.ap-avatar){width:36px!important;height:36px!important}:is(.student-header-actions,.cd-page .sd-actions){gap:7px!important}:is(.student-header,.cd-page .sd-header,.ap-top) :is(.student-header-menu,.sd-menu-button,#approval-menu){width:38px!important;height:38px!important;flex-basis:38px}:is(.student-header-search,.cd-page .sd-search,.ap-global-search).dh-search-open{position:absolute;left:12px;right:12px;top:72px;max-width:none!important;width:auto;display:flex!important;min-height:46px;background:#fffaf0!important;border:1px solid #d5a233!important;box-shadow:0 5px 15px #54240b22}:is(.student-header-search,.cd-page .sd-search,.ap-global-search).dh-search-open input[type=search]{display:block}body:has(.student-header){--student-header-height:68px!important}.cd-page .sd-sidebar{top:68px;height:calc(100vh - 68px)}.ap-top .ap-account{flex:none}}
@media(max-width:420px){:is(.student-header,.cd-page .sd-header,.ap-top){gap:6px;padding:10px 8px!important}:is(.student-header-brand,.cd-page .sd-brand,.ap-top-brand){min-width:70px!important}.student-header-actions .language,.cd-page .sd-actions .language{font-size:10px!important;padding:5px!important}.language .language-label{max-width:44px;overflow:hidden;text-overflow:ellipsis}}

/* Restore the original maroon and gold dashboard sidebars. */
body{--dashboard-sidebar-width:264px}
:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar){box-sizing:border-box;background:radial-gradient(ellipse at 30% 30%,#850a00 0,#590500 48%,#310000 100%)!important;color:#fff8dd!important;border:3px solid #d9a227!important;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d5a541 #580000;overscroll-behavior:contain;font-family:Georgia,'Times New Roman',serif!important}
.cd-page .sd-layout{grid-template-columns:var(--dashboard-sidebar-width) minmax(0,1fr)}
.cd-page .sd-sidebar{position:sticky;align-self:start;top:82px;height:calc(100dvh - 82px);min-height:0;padding:12px 9px 24px!important}
.ap-sidebar{width:var(--dashboard-sidebar-width);padding:12px 9px 24px}
.ap-shell{margin-left:var(--dashboard-sidebar-width)}
:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar) nav{display:grid;gap:3px;padding:0!important;position:relative;z-index:2}
:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar) nav :is(a,button){box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;min-height:51px;margin:0;padding:12px 10px!important;border:1px solid transparent!important;border-radius:9px;background:transparent!important;color:#fff5dd!important;box-shadow:none!important;text-align:left;text-decoration:none;font:normal 17px/1.25 Georgia,'Times New Roman',serif!important;white-space:normal}
:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar) nav .icon{width:28px;height:28px;flex:none;color:#ffe592!important}
:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar) nav [aria-current=page]{background:linear-gradient(#fff6cd,#ffd871)!important;border-color:#f3c451!important;color:#790000!important;font-weight:bold!important;box-shadow:0 2px 6px #20000055!important}
:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar) nav [aria-current=page] .icon{color:#850500!important}
:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar) nav :is(a,button):hover{background:#fff0bd19!important;border-color:#e8b54166!important}
:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar) nav [aria-current=page]:hover{background:linear-gradient(#fff6cd,#ffd871)!important}
:is(.student-sidebar-brand,.cd-sidebar-brand,.ap-brand){display:flex!important;align-items:center;justify-content:center;min-height:82px;padding:10px 8px!important;margin:4px 0 14px!important;border:1px solid #f5cb69!important;border-radius:7px!important;background:#fff7e2!important}
:is(.student-sidebar-brand,.cd-sidebar-brand,.ap-brand) img{display:block;width:100%!important;height:auto!important;max-height:90px!important;object-fit:contain;border-radius:0!important}
.cd-page .sd-sidebar:after{display:none}
.cd-page .sd-sidebar-art,.ap-sidebar-art{position:relative;inset:auto;height:160px;margin:16px -9px -24px;background:url('../images/registration/corner.svg') right bottom/100px no-repeat;opacity:1;filter:none;pointer-events:none}
.cd-page.nav-collapsed .sd-layout{grid-template-columns:0 minmax(0,1fr)}
@media(max-width:1300px){body{--dashboard-sidebar-width:240px}:is(.student-sidebar.student-sidebar,.cd-page .sd-sidebar,.ap-sidebar) nav :is(a,button){font-size:16px!important}}
@media(max-width:900px){.ap-shell{margin-left:0}.ap-sidebar{top:68px;width:min(290px,86vw);height:calc(100dvh - 68px);padding-top:12px}.nav-open .ap-sidebar{transform:none}}
@media(max-width:760px){.cd-page .sd-layout{display:block}.cd-page .sd-sidebar{position:fixed;top:68px;bottom:0;left:0;width:min(290px,86vw);height:calc(100dvh - 68px);min-height:0;z-index:45;padding:12px 9px 75px!important}.cd-page.mobile-menu-open .sd-sidebar{display:block;box-shadow:7px 0 25px #20000066}.cd-page .sd-sidebar-art{display:block}.student-sidebar.student-sidebar{top:68px;height:calc(100dvh - 68px)!important;max-height:calc(100dvh - 68px)!important}.cd-page.nav-collapsed .sd-layout{display:block}}

/* Small mobile headers and lesson quiz forms. */
@media(max-width:380px){:is(.student-header,.cd-page .sd-header,.ap-top) .language .language-label{display:none!important}:is(.student-header,.cd-page .sd-header,.ap-top) .language .icon{display:block!important;width:18px;height:18px}:is(.student-header,.cd-page .sd-header,.ap-top) .language{padding:6px!important;gap:3px!important}}
@media(max-width:760px){.cc-page .cc-main,.cc-page .cc-lesson,.cc-page .cc-module{min-width:0;overflow-wrap:anywhere}.cc-page .cc-lesson :is(input,textarea,select){box-sizing:border-box;max-width:100%}.cc-page .ag-quiz button{min-height:44px}.cc-page .ag-options{grid-template-columns:1fr}}


/* Compact mobile header with the original search toggle. */
@media(max-width:600px){body .ag-site-header.student-header{flex-wrap:nowrap!important;gap:6px!important;padding:9px 10px!important;min-height:68px!important}body .ag-site-header.student-header .student-header-brand{width:155px!important;min-width:0!important;max-width:none!important;flex:0 0 155px!important}body .ag-site-header.student-header .student-header-brand img{width:155px!important;height:auto!important;max-height:48px!important;object-fit:contain!important}body .ag-site-header.student-header>.student-header-search{border-radius:8px!important;height:34px!important;width:34px!important;min-width:34px!important;flex:0 0 34px!important}body .ag-site-header.student-header>form.dh-search-open{position:fixed!important;top:72px!important;left:10px!important;right:10px!important;width:calc(100vw - 20px)!important;max-width:none!important;height:42px!important;border-radius:10px!important;box-shadow:0 6px 20px #50200022!important}body .ag-site-header.student-header>form.dh-search-open input{display:block!important;padding:10px 12px!important;font-size:13px!important}body .ag-site-header.student-header .student-header-actions{gap:5px!important}body .ag-site-header.student-header .language{font-size:11px!important;padding:4px!important}}@media(max-width:360px){body .ag-site-header.student-header .student-header-brand,body .ag-site-header.student-header .student-header-brand img{width:140px!important}body .ag-site-header.student-header .student-header-brand{flex-basis:140px!important}}

/* Center mobile menu and search icons inside their controls. */
@media(max-width:760px){body :is(.student-header,.sd-header,.ap-top) :is(.student-header-menu,.sd-menu-button,.ap-menu){display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:1!important;box-sizing:border-box!important}body :is(.student-header,.sd-header,.ap-top) :is(.student-header-menu,.sd-menu-button,.ap-menu) svg{display:block!important;margin:0!important;flex:none!important;width:20px!important;height:20px!important}body :is(.student-header,.sd-header,.ap-top) :is(.student-header-search,.sd-search,.ap-search){align-items:center!important;justify-content:center!important;box-sizing:border-box!important}body :is(.student-header,.sd-header,.ap-top) :is(.student-header-search,.sd-search,.ap-search)>button{display:flex!important;align-items:center!important;justify-content:center!important;align-self:center!important;padding:0!important;margin:0!important;flex:0 0 34px!important;width:34px!important;height:34px!important;line-height:1!important;box-sizing:border-box!important}body :is(.student-header,.sd-header,.ap-top) :is(.student-header-search,.sd-search,.ap-search)>button svg{display:block!important;margin:0!important;flex:none!important;width:18px!important;height:18px!important}body .student-header-search:not(.dh-search-open){padding:0!important}body .student-header-search.dh-search-open{justify-content:space-between!important}}
