:root{
  --teacher-rail-collapsed:84px;
  --teacher-rail-expanded:272px;
  --teacher-rail-bg:#071b23;
  --teacher-rail-text:#91a7b8;
  --teacher-rail-muted:#6f8899;
  --teacher-rail-accent:#168f73;
  --teacher-page-max:1240px;
  --teacher-page-gutter:clamp(30px,4.2vw,72px);
  --teacher-page-top:clamp(42px,5vw,68px);
}

.teacher-header.teacher-sidebar{
  position:fixed;inset:0 auto 0 0;width:var(--teacher-rail-collapsed);height:100vh;
  background:var(--teacher-rail-bg);border:0;z-index:1000;display:flex;flex-direction:column;
  align-items:stretch;padding:18px 12px;box-shadow:4px 0 18px #071b2322;
  transition:width .2s ease,box-shadow .2s ease;overflow:hidden;
}
.teacher-header.teacher-sidebar:hover,.teacher-header.teacher-sidebar:focus-within{
  width:var(--teacher-rail-expanded);box-shadow:14px 0 30px #071b2340;
}

/* Teacher branding has exactly two mutually-exclusive assets. */
.teacher-sidebar .student-brand{
  height:68px;min-height:68px;display:flex;align-items:center;justify-content:center;color:#fff;text-decoration:none;
  margin:0 0 18px;padding:0;white-space:nowrap;overflow:hidden;
}
.teacher-sidebar .teacher-brand-mark{display:block;width:52px;height:58px;object-fit:contain;flex:0 0 auto}
.teacher-sidebar .teacher-brand-lockup{display:none;width:220px;height:58px;object-fit:contain;object-position:left center;flex:0 0 auto}
.teacher-sidebar:hover .student-brand,.teacher-sidebar:focus-within .student-brand{justify-content:flex-start;padding-left:4px}
.teacher-sidebar:hover .teacher-brand-mark,.teacher-sidebar:focus-within .teacher-brand-mark{display:none!important}
.teacher-sidebar:hover .teacher-brand-lockup,.teacher-sidebar:focus-within .teacher-brand-lockup{display:block!important}
/* No old branding fragments are permitted in the teacher brand anchor. */
.teacher-sidebar .student-brand>:not(.teacher-brand-mark):not(.teacher-brand-lockup){display:none!important}
.teacher-sidebar .student-brand::before,.teacher-sidebar .student-brand::after{content:none!important;display:none!important}

.teacher-sidebar-nav{display:flex;flex:1 1 auto;min-height:0;overflow-y:auto;flex-direction:column;gap:0;margin-top:2px}
.teacher-sidebar-group{position:relative;display:flex;flex-direction:column;gap:5px;padding:0 0 10px;margin:0 0 8px}
.teacher-sidebar-group.has-divider{padding-top:20px;border-top:1px solid #36505a}
.teacher-sidebar-section-label{
  height:20px;padding:0 14px;margin-bottom:3px;color:#d7e2e8;font-size:.72rem;font-weight:900;
  letter-spacing:.09em;text-transform:uppercase;white-space:nowrap;opacity:0;transform:translateX(-7px);transition:opacity .14s ease,transform .14s ease;
}
.teacher-sidebar:hover .teacher-sidebar-section-label,.teacher-sidebar:focus-within .teacher-sidebar-section-label{opacity:1;transform:none}

.teacher-sidebar-link{
  position:relative;height:54px;min-height:54px;display:flex;align-items:center;gap:16px;padding:0 14px;
  border-radius:9px;color:var(--teacher-rail-text);text-decoration:none;font-weight:750;font-size:1rem;white-space:nowrap;
  transition:background .14s ease,color .14s ease;
}
.teacher-sidebar-link:hover,.teacher-sidebar-link:focus-visible{color:#24c5a5;background:#0d3036;outline:2px solid transparent}
.teacher-sidebar-link:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #3f46a5}
.teacher-sidebar-link.is-active{background:var(--teacher-rail-accent);color:#fff}
.teacher-sidebar-icon{width:32px;min-width:32px;height:32px;display:grid;place-items:center;line-height:1}
.teacher-sidebar-icon svg{width:26px;height:26px;display:block}
.teacher-sidebar-label{opacity:0;transform:translateX(-7px);transition:opacity .14s ease,transform .14s ease}
.teacher-sidebar:hover .teacher-sidebar-label,.teacher-sidebar:focus-within .teacher-sidebar-label{opacity:1;transform:none}

.teacher-sidebar:not(:hover):not(:focus-within) .teacher-sidebar-link:hover::after,
.teacher-sidebar:not(:hover):not(:focus-within) .teacher-sidebar-link:focus-visible::after{
  content:attr(data-tooltip);position:fixed;left:90px;z-index:1200;background:#263347;color:#fff;padding:7px 10px;border-radius:7px;
  font-size:.82rem;font-weight:800;box-shadow:0 5px 14px #071b2330;pointer-events:none;
}

/* Reserve one stable row each for the teacher name, Profile, and Sign out. */
.teacher-sidebar .teacher-account.teacher-sidebar-account{
  flex:0 0 auto;margin-top:auto;min-height:122px;display:grid;grid-template-columns:44px minmax(0,1fr);
  grid-template-rows:repeat(3,minmax(28px,auto));align-content:center;align-items:center;column-gap:12px;row-gap:2px;
  padding:12px 8px;border-top:1px solid #36505a;color:#dbe7ec;white-space:nowrap;overflow:hidden;
}
.teacher-account-avatar{grid-column:1;grid-row:1/4;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#263f50;color:#fff;font-weight:900}
.teacher-sidebar .teacher-account>:not(.teacher-account-avatar){grid-column:2;min-width:0}
.teacher-sidebar .teacher-account>span:not(.teacher-account-avatar),.teacher-sidebar .teacher-account .text-button{opacity:0;pointer-events:none;transition:opacity .14s ease}
.teacher-sidebar:hover .teacher-account>span:not(.teacher-account-avatar),.teacher-sidebar:hover .teacher-account .text-button,
.teacher-sidebar:focus-within .teacher-account>span:not(.teacher-account-avatar),.teacher-sidebar:focus-within .teacher-account .text-button{opacity:1;pointer-events:auto}
.teacher-sidebar .teacher-account .text-button{color:#b8cad5;text-align:left;padding:0;min-height:28px}

.teacher-sidebar~.teacher-main{margin-left:var(--teacher-rail-collapsed);width:calc(100% - var(--teacher-rail-collapsed));max-width:none;padding:var(--teacher-page-top) var(--teacher-page-gutter) 72px}
.teacher-sidebar~.teacher-main>*{width:min(100%,var(--teacher-page-max));margin-left:auto;margin-right:auto}
.teacher-sidebar~.teacher-main>.page-heading,.teacher-sidebar~.teacher-main>.design-library-header{margin-top:0;margin-bottom:30px}
.teacher-sidebar~.teacher-main>.teacher-back-link{display:block;margin-bottom:24px}
.teacher-sidebar~.teacher-main>.page-heading h1,.teacher-sidebar~.teacher-main>.design-library-header h1{margin-top:6px}
.teacher-sidebar~.design-teacher-home{padding-top:0}
.teacher-sidebar~.design-teacher-home>.design-hero{width:min(100%,var(--teacher-page-max));padding-top:58px}
.teacher-sidebar~.design-teacher-home>.design-choice-grid,.teacher-sidebar~.design-teacher-home>.design-dashboard-section{width:min(100%,1120px)}

.teacher-assignment-hub-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:22px}
.teacher-assignment-hub-card{border:1px solid #d6ddea;border-radius:18px;padding:24px;background:#fff}
.teacher-assignment-hub-card h2{margin:.15rem 0 .5rem}.teacher-assignment-hub-card p{color:#62708a}
.teacher-assignment-hub-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}

@media(max-width:900px){
  :root{--teacher-rail-collapsed:72px;--teacher-rail-expanded:248px;--teacher-page-gutter:20px;--teacher-page-top:34px}
  .teacher-header.teacher-sidebar{padding:14px 9px}.teacher-sidebar-link{padding:0 11px}.teacher-sidebar~.teacher-main{padding-bottom:52px}
  .teacher-sidebar .teacher-brand-lockup{width:205px}
}
@media(max-width:620px){
  :root{--teacher-page-gutter:14px;--teacher-rail-collapsed:64px;--teacher-rail-expanded:min(286px,88vw)}
  .teacher-header.teacher-sidebar{padding-left:6px;padding-right:6px}.teacher-sidebar~.teacher-main>.page-heading{margin-bottom:22px}
  .teacher-sidebar .teacher-brand-mark{width:46px;height:52px}
}
@media(prefers-reduced-motion:reduce){
  .teacher-header.teacher-sidebar,.teacher-sidebar-label,.teacher-sidebar-section-label,.teacher-sidebar .teacher-account>*{transition:none!important}
}
