/* The navigation stays in the same place as the page's content changes. */
.app-shell > .sidebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding-inline: max(24px, calc((100% - 74rem) / 2));
  background: var(--study-surface);
}
.sidebar .brand { justify-self: start; gap: 11px; }
.sidebar .brand strong { font: 720 1.12rem/1.35 var(--study-title); letter-spacing: .015em; }
.sidebar #sideNav { align-self: stretch; gap: 4px; align-items: center; }
.sidebar #sideNav a {
  position: relative;
  align-self: center;
  min-height: 38px;
  padding-inline: 19px;
  border-radius: var(--study-radius);
  font: 520 .92rem/1.45 var(--study-body);
}
.sidebar #sideNav a[aria-current=page] { color: var(--study-action); background: var(--study-active); font-weight: 680; }
.sidebar #sideNav a.active::after { content: none; }
.sidebar #sideNav a:hover { color: var(--study-action-hover); background: var(--study-side); }
.sidebar-foot { justify-self: end; color: var(--study-muted); }
.sidebar-foot button { min-height: 38px; padding-inline: 8px; color: var(--study-action); text-decoration: none; }
.sidebar-foot button:hover { text-decoration: underline; }

.community-search > div:focus-within {
  outline: 2px solid var(--study-action);
  outline-offset: 1px;
}
.community-search > div input[type=search]:focus-visible { outline: none; }

.community-page.community-composing .community-form,
.community-page .community-panel { background-color: var(--study-surface); }
.community-page.community-composing .community-form {
  padding: clamp(16px, 2.8vw, 30px);
  margin-top: 20px;
}
.community-form :where(input, select, textarea) { accent-color: var(--study-action); }
.community-page.community-composing .community-form label { font: 590 .9rem/1.55 var(--study-body); }
.community-form textarea { line-height: 1.72; }

dialog:is(.work-dialog, .community-dialog, .note-picker, .standard-teacher) {
  border-radius: 9px;
  border-color: var(--study-control-line);
  background: var(--study-surface);
  box-shadow: 0 16px 55px rgb(43 31 47 / .16);
  color: var(--study-ink);
}
dialog::backdrop, .work-dialog::backdrop, .community-dialog::backdrop { background: rgb(42 33 46 / .42); }
.work-dialog > header {
  padding: 10px clamp(16px, 2vw, 24px);
  background-color: var(--study-surface);
  border-color: var(--study-line);
}
.work-dialog > header h3 { font: 660 1.24rem/1.5 var(--study-title); }
.work-dialog > header > button:hover { background: var(--study-side); }
:is(.primary, .secondary, button, input, textarea, select, summary) { accent-color: var(--study-action); }

@media (prefers-reduced-motion: no-preference) {
  :where(a,button,summary,input,textarea,select) {
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
  }
}
@media (max-width: 700px) {
  .app-shell > .sidebar { display: none; }
  #mobileNav {
    background: var(--study-surface);
    border-color: var(--study-line);
  }
  #mobileNav a { position: relative; gap: 3px; }
  #mobileNav a .study-icon { position: relative; }
  #mobileNav a[aria-current=page]::before {
    content: '';
    position: absolute;
    top: 1px;
    width: 42px;
    height: 27px;
    border-radius: 15px;
    background: var(--study-active);
  }
  #mobileNav a.active::after { content: none; }
}
