/* The masthead has its own measurements, independent of the set beneath it. */
html:has(#app .school-bar) { scrollbar-gutter: stable; }
.school-paper {
  --student-bar-height: 76px;
  --student-bar-inset: clamp(20px, 5vw, 80px);
}
.school-bar.school-paper { display: block; min-height: 0; }
.school-bar {
  position: relative;
  z-index: 8;
  flex: none;
  color: #3b2a20;
  background: linear-gradient(104deg,#fff9e966,#fff1d543 66%,#ebd1a34a),var(--paper) center 37% / 360px;
  box-shadow: inset 0 2px #fffcf08c,0 2px 0 #b3956b,0 6px 9px -3px #67472f62;
}
.school-bar::before {
  content:"";position:absolute;inset:auto 0 -6px;height:7px;pointer-events:none;
  background:linear-gradient(#90683e22,#d6ac7154),var(--kraftimg) center 60% / 290px;
  clip-path:polygon(0 0,100% 0,100% 52%,95% 73%,89% 55%,80% 82%,73% 61%,65% 91%,52% 66%,42% 100%,32% 65%,22% 83%,14% 60%,5% 79%,0 63%);
}
.school-bar::after {
  content: "";
  position: absolute;
  inset:auto 0 -4px;height:5px;
  background:linear-gradient(#faf1dc62,#fff3dc43),var(--paper) center 40% / 360px;
  mask:radial-gradient(ellipse 11px 6px at 50% -1px,#000 90%,transparent 100%) 0 0 / 22px 6px repeat-x;
  pointer-events: none;
}
.school-bar-inner {
  width: min(calc(100% - 2 * var(--student-bar-inset)), 1344px);
  height: var(--student-bar-height);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  column-gap: 16px;
}
.school-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #3b2a20;
  text-decoration: none;
  white-space: nowrap;
}
.school-brand img {
  width: 43px;
  height: 43px;
  transform: rotate(-5deg);
  filter: drop-shadow(0 2px 1px #5b361936);
}
.school-brand span { font: 900 23px/1.12 var(--font-round); letter-spacing: .045em; }
.school-brand small { display: block; margin-top: 5px; color: #6b5444; font: 600 9px/1.1 var(--font-mono); letter-spacing: .19em; }
.school-tools {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.school-sound, .school-account, .school-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
.school-sound, .school-nav-toggle {
  flex: none;
  width: 42px;
  padding: 0;
  background: transparent;
  color: #a64230;
}
.school-sound[aria-pressed="true"], .school-nav-toggle { color: #654d3c; }
.school-account {
  gap: 7px;
  width: clamp(112px, 8.5vw, 140px);
  padding: 6px 13px;
  min-width: 0;
  color: #4d3526;
  border-color: #cdb390;
  background: linear-gradient(#fff9edcc, #fbefd9c9), var(--paper) center / 390px;
  box-shadow: var(--lift-1), 0 2px #b58b5f52;
  font: 800 15px/1.4 var(--font-round);
  white-space: nowrap;
}
.school-account span { overflow: hidden; text-overflow: ellipsis; }
.school-bar .icon { flex: none; }
.school-navigation { grid-column: 2; position: relative; }
.school-navigation nav { display: flex; align-items: center; gap: 6px; }
.school-navigation nav > * {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 15px;
  border-radius: 8px;
  white-space: nowrap;
  text-decoration: none;
  color: #664c38;
  font: 800 15px/1.4 var(--font-round);
}
.school-navigation nav > a {
  position:relative;
  background:linear-gradient(108deg,#fff8df60,#f7e5bd40),var(--paper) center / 240px;
  box-shadow:inset 0 0 0 1px #b69d795c,inset 0 2px #fff9e5,0 2px #baa0789e,1px 3px 3px #7153381f;
  border-radius:3px 5px 4px 3px;
}
.school-navigation nav > a[aria-current="page"] {
  color: #fffaf1;
  background:#bb513c var(--grain) center / 220px;background-blend-mode:multiply;
  box-shadow:inset 0 1px #e79a7b,0 2px #9c4430,1px 4px #c5a47a,2px 5px 4px #6544294f;
}
.school-navigation nav > a[aria-current]::after {
  content:"";position:absolute;top:0;right:0;width:7px;height:7px;pointer-events:none;
  background:linear-gradient(45deg,#d48668 49%,#f4dbae 51%);box-shadow:-1px 1px 1px #6b402b57;
}
.school-navigation [aria-disabled] { color: #8a7765; }
.school-nav-toggle { display: none; }
@media (hover:hover) {
  .school-sound:hover, .school-nav-toggle:hover, .school-navigation nav a:not([aria-current]):hover { background-color: #efdab9; }
  .school-account:hover { border-color: #a98862; }
}
@media (max-width: 760px) {
  .school-paper { --student-bar-height: 64px; --student-bar-inset: clamp(10px, 3.6vw, 24px); }
  .school-bar-inner { grid-template-columns: minmax(max-content,1fr) auto minmax(0,max-content); column-gap: 4px; }
  .school-brand { gap: 7px; }
  .school-brand img { width: 34px; height: 34px; }
  .school-brand span { font-size: 19px; }
  .school-brand small { margin-top: 4px; font-size: 7.5px; }
  .school-tools { gap: 2px; }
  .school-account { width: clamp(78px, 24vw, 116px); padding-inline: 6px; font-size: 14px; }
  .school-account > .icon:first-child { display: none; }
  .school-sound, .school-nav-toggle { width: 36px; }
  .school-nav-toggle { display: inline-flex; }
  .school-navigation nav {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 3;
    min-width: 141px;
    padding: 6px;
    border: 1px solid #b79c78;
    border-radius: 10px;
    background: #fff2db var(--paper) center / 400px;
    box-shadow: var(--lift-2);
  }
  .school-nav-toggle[aria-expanded="true"] + nav { display: grid; }
  .school-navigation nav > * { justify-content: start; min-height: 42px; }
  .school-bar:has([aria-expanded="true"]) { z-index: 35; }
}
@media (max-width: 360px) {
  .school-brand { gap: 5px; }
  .school-brand img { width: 30px; height: 30px; }
  .school-brand span { font-size: 17px; }
  .school-brand small { font-size: 6.5px; }
}

.school-bar .school-account.user-menu { margin: 0; min-height: 42px; }
.school-bar .user-menu span { display: block; color: inherit; }
.teacher-shell:has(> .projection) { display: flex; flex-direction: column; }
.teacher-shell > .projection { flex: 1; min-width: 0; }
@media (min-width: 761px) and (max-width: 1000px) {
  .teacher-shell .school-bar-inner { grid-template-columns: max-content minmax(0,1fr) max-content; column-gap: 8px; }
  .teacher-navigation { justify-self: center; }
  .teacher-navigation nav { gap: 2px; }
  .teacher-navigation nav > * { gap: 4px; padding-inline: 7px; font-size: 14px; }
}
@media (min-width: 761px) and (max-width: 850px) {
  .teacher-navigation nav .icon { display: none; }
}
