/* ==========================================================================
   Student shell v2 — sidebar IA + topbar identity pass
   Approved mockup: docs/student-shell-redesign.html
   Loads AFTER today-redesign.css on every student page; additions use fresh
   pf-shell classes, the few upgrades to existing chrome are scoped to
   body.student-shell-unified (present in student HTML before first paint).
   ========================================================================== */

/* ---- accessibility: student-chosen text size (Settings > Accessibility) ----
   Device-local, applied from localStorage pp_pref_text_size_v1 by
   shared/student-sidebar.js on every student page. `zoom` scales the whole
   px-based UI proportionally; the @supports fallback covers engines without
   it. Default (unset) leaves everything at 1x. */
html[data-pf-text-size="large"] { zoom: 1.1; }
html[data-pf-text-size="larger"] { zoom: 1.2; }
@supports not (zoom: 1) {
  html[data-pf-text-size="large"] body { font-size: 110%; }
  html[data-pf-text-size="larger"] body { font-size: 120%; }
}

/* Your Future/Foundation author the same neutral mobile head that the shared
   sidebar otherwise inserts after the SDK. Keep its first layout identical
   to the adopted head, including the existing instrument-pill preference.
   The runtime styles remain for older documents and the other shell routes. */
body[data-pf-static-mobile-header] .pp-mobhead { display:none; }
@media (max-width:768px) {
  body[data-pf-static-mobile-header].pp-has-mobhead .navbar-app { display:none !important; }
  body[data-pf-static-mobile-header] .pp-mobhead {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:calc(env(safe-area-inset-top,0px) + 10px) 4px 12px; margin:0;
  }
  body[data-pf-static-mobile-header] .pp-mobhead-main { min-width:0; }
  body[data-pf-static-mobile-header] .pp-mobhead-eyebrow {
    margin:0; font-size:10.5px; font-weight:500; letter-spacing:.12em;
    text-transform:uppercase; color:#8a97ad;
  }
  body[data-pf-static-mobile-header] .pp-mobhead-title {
    margin:2px 0 0; font-size:20px; font-weight:600; letter-spacing:-.02em;
    color:#16233f; line-height:1.1;
  }
  body[data-pf-static-mobile-header] .pp-mobhead-side { display:flex; align-items:center; gap:8px; flex:none; }
  body[data-pf-static-mobile-header] .pp-mobhead-search {
    width:34px; height:34px; border-radius:50%; border:1px solid #e6ebf3;
    background:#fff; display:grid; place-items:center; color:#5d6b84; cursor:pointer; padding:0;
  }
  body[data-pf-static-mobile-header] .pp-mobhead-search svg { width:17px; height:17px; }
  body[data-pf-static-mobile-header] .pp-mobhead-avatar {
    width:34px; height:34px; border-radius:50%; color:#fff; font-size:12.5px;
    font-weight:600; display:grid; place-items:center; border:2px solid #fff; text-decoration:none;
    background:linear-gradient(160deg,#1f6fd6,#7c5cd6); box-shadow:0 2px 8px rgba(20,33,64,.18);
  }
  html.pf-th-on body[data-pf-static-mobile-header] .pp-mobhead-side { display:none !important; }
  html.pf-th-on body[data-pf-static-mobile-header] .pp-mobhead-main { padding-right:112px !important; }
  html.pf-th-on body[data-pf-static-mobile-header] .pp-mobhead-eyebrow {
    font-size:9.5px !important; font-weight:600 !important; letter-spacing:.16em !important; color:#9aa6ba !important;
  }
  html.pf-th-on body[data-pf-static-mobile-header] .pp-mobhead .pp-mobhead-title {
    font-size:24px !important; font-weight:600 !important; letter-spacing:-.025em !important; line-height:1.1 !important;
  }
}

/* ---- base shell reskin (white topbar + sidebar) ----
   Extracted from today-redesign.css so EVERY student page gets the same
   shell; previously only 4 of 12 pages loaded it and the rest fell back
   to the legacy dark sidebar. Kept verbatim (incl. !important vs the
   737KB legacy sheet); the v2 rules further down override where needed. */
:root{
  --pf-brand:#1f6fd6; --pf-brand-2:#1559b0; --pf-brand-tint:#eaf2fd; --pf-brand-ink:#16233f;
  --pf-teal:#0d9488; --pf-teal-tint:#e3f5f2;
  --pf-red:#e0493b; --pf-red-tint:#fdecea;
  --pf-amber:#e08a1e; --pf-amber-tint:#fdf1df;
  --pf-green:#1a9e54;
  --pf-ink:#1b2740; --pf-ink-2:#5d6b84; --pf-ink-3:#8a97ad;
  --pf-line:#e9edf4; --pf-bg:#f6f8fc; --pf-surface:#fff;
  --pf-r:14px; --pf-r-sm:10px; --pf-r-pill:999px;
  --pf-sh:0 1px 2px rgba(20,33,64,.04),0 2px 8px rgba(20,33,64,.05);
  --pf-font: var(--font-application-ui);
}

/* ---------- APPLICATION CANVAS (single source of truth) ----------
   The Premium V1 shell already declares a white page ground (style.css,
   `body.app-dashboard.student-shell-unified`), but style.css loads first and
   declares it without !important, so every legacy per-route reskin sheet that
   loads after it re-asserted the old #f6f8fc ground and won: today-redesign
   and timetable with !important, the route sheets (electives/foundation/
   teaching/thread/examination) by source order. That is the whole reason
   Teaching looked white — teaching-experience.css happens to load last and
   re-states #fff — while Today and Timetable did not.

   --pf-canvas is now the one value the outer page ground of every student
   route resolves to. The canvas declarations in those sheets point here, so
   there is a single place to change it and no route can drift again.

   Scope: this sheet is loaded by the student pages only (no clinician, admin
   or marketing surface links it), so the shell selectors below are already
   confined to the Student Shell.

   NOT the same thing as --pf-bg: that stays #f6f8fc and keeps tinting the
   component surfaces that are meant to read as recessed (sidebar link hover,
   notice threads, tips items, weekend timetable columns, empty states). Only
   the page canvas turns white. */
:root{ --pf-canvas:#ffffff; }

html,
body.app-dashboard,
body.app-dashboard .app-shell,
body.app-dashboard .app-content{
  background:var(--pf-canvas);
}

/* ---------- TOPBAR (.navbar-app) ---------- */
body.app-dashboard .navbar-app{
  background:var(--pf-surface) !important;border-bottom:1px solid var(--pf-line) !important;box-shadow:none !important;
}
body.app-dashboard .navbar-app .nav-logo-text{font-weight:600;letter-spacing:-0.02em}
body.app-dashboard .navbar-app .nav-logo-mark{
  width:32px !important;height:32px !important;flex:0 0 32px !important;border-radius:8px !important;
  display:inline-flex;align-items:center;justify-content:center;
  background:linear-gradient(180deg,#075ff0,#0454d8) !important;color:#fff;
  font-size:12.5px;font-weight:600;line-height:1;letter-spacing:0;
  box-shadow:0 4px 12px rgba(7,95,240,.28) !important;
}
body.app-dashboard .navbar-app .nav-logo-mark::before,
body.app-dashboard .navbar-app .nav-logo-mark::after{content:none !important}
body.app-dashboard .nav-search input{
  background:var(--pf-surface) !important;border:1px solid #d8e0ec !important;border-radius:8px !important;
  color:#101a2e !important;
}
body.app-dashboard .dm-trigger,
body.app-dashboard .nav-profile-trigger{border-radius:var(--pf-r-pill) !important}
body.app-dashboard .dm-unread-badge{background:var(--pf-red) !important}
body.app-dashboard .nav-profile-avatar{background:var(--pf-brand-tint) !important;color:var(--pf-brand) !important}

/* ---------- SIDEBAR (.app-sidebar) ---------- */
body.app-dashboard .app-sidebar{
  background:var(--pf-surface) !important;border-right:1px solid #e7ecf3 !important;box-shadow:none !important;
  padding:14px 12px 10px !important;
  /* The sidebar is position:fixed between the navbar and the viewport bottom
     with no overflow set — so on short screens (or with the Learn/More groups
     expanded) the lower links were clipped and unreachable. Let it scroll its
     own overflow, contained so it never chains to the page. */
  overflow-y:auto !important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:transparent transparent;
}
body.app-dashboard .app-sidebar:hover{scrollbar-color:#d8e0ec transparent}
body.app-dashboard .app-sidebar-header{padding:4px 10px 14px !important}
body.app-dashboard .app-sidebar-title{color:var(--pf-brand-ink) !important;font-weight:600 !important;font-size:15px}
body.app-dashboard .app-sidebar-subtitle{color:var(--pf-ink-3) !important;font-size:12px}
body.app-dashboard .app-sidebar-link{
  color:var(--pf-ink) !important;font-weight:500 !important;font-size:13.5px !important;
  border-radius:8px !important;padding:8px 10px !important;background:transparent !important;border:0 !important;
  transition:background-color 140ms cubic-bezier(.3,.7,.4,1),color 140ms cubic-bezier(.3,.7,.4,1);
}
body.app-dashboard .app-sidebar-link:hover{background:var(--pf-bg) !important;color:var(--pf-ink) !important}
body.app-dashboard .app-sidebar-link:active{transform:scale(.985)}
body.app-dashboard .app-sidebar-link--active{background:var(--pf-brand-tint) !important;color:var(--pf-brand-2) !important;font-weight:600 !important}
body.app-dashboard .app-sidebar-link--active .app-sidebar-icon{color:var(--pf-brand) !important}
body.app-dashboard .app-sidebar-icon{color:var(--pf-ink-2) !important}
body.app-dashboard .app-sidebar-dot{display:none !important}
body.app-dashboard .app-sidebar-chevron{color:var(--pf-ink-3) !important}
body.app-dashboard .app-sidebar-subitem{color:var(--pf-ink-3) !important;font-weight:500 !important}
body.app-dashboard .app-sidebar-divider{background:var(--pf-line) !important}

body.student-shell-unified {
  --pfs-brand: #1f6fd6;
  --pfs-brand-2: #1559b0;
  --pfs-brand-tint: #eaf2fd;
  --pfs-ink: #16233f;
  --pfs-slate: #5d6b84;
  --pfs-mist: #8a97ad;
  --pfs-line: #e9edf4;
}

/* ---- topbar: PF monogram + wordmark ---- */
body.student-shell-unified .navbar-app .nav-logo-mark {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #075ff0, #0454d8) !important;
  box-shadow: 0 4px 12px rgba(7, 95, 240, 0.28) !important;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 30px;
  text-align: center;
  letter-spacing: 0;
}
body.student-shell-unified .navbar-app .nav-logo-mark::before,
body.student-shell-unified .navbar-app .nav-logo-mark::after {
  content: none !important;
}
body.student-shell-unified .navbar-app .nav-logo-text {
  font-weight: 600;
}
body.student-shell-unified .navbar-app .nav-logo-text .nav-logo-flow {
  color: var(--pfs-brand);
  font-weight: 600;
}

/* ---- topbar: right-sized centred search with shortcut hint ---- */
body.student-shell-unified .navbar-app .nav-search {
  max-width: 520px;
  position: relative;
}
body.student-shell-unified .navbar-app .nav-search .nav-search-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--pfs-mist);
  border: 1px solid var(--pfs-line);
  border-radius: 5px;
  padding: 1px 6px;
  background: #fff;
  pointer-events: none;
}
@media (max-width: 900px) {
  body.student-shell-unified .navbar-app .nav-search .nav-search-kbd {
    display: none;
  }
}

/* ---- sidebar: placement context chip (the one persistent indicator) ----
   Approved V1: whole chip is the "View placements" affordance — a bordered
   card with the per-hospital accent as a 3px left edge + dot, title/site
   lines that truncate (full text in the tooltip), and a quiet chevron. */
body.student-shell-unified .pf-side-context {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--pfs-line);
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px 10px 14px;
  margin: 2px 0 12px;
  overflow: hidden;
  text-align: left;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1), background-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
body.student-shell-unified .pf-side-context::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--pfs-site-accent, #c3ccda);
}
body.student-shell-unified .pf-side-context:hover {
  background: #f7f9fc;
  border-color: #d8e0ec;
  text-decoration: none;
}
body.student-shell-unified .pf-side-context .pf-sc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pfs-site-accent, #c3ccda);
  margin-top: 5px;
  flex: none;
}
body.student-shell-unified .pf-side-context .pf-sc-copy {
  min-width: 0;
  flex: 1;
}
/* Real placement names ("5th year · Women's Health (Obs & Gynae)") are far
   longer than the chip is wide, and a single ellipsised line amputated the
   one fact the chip exists to carry. Wrap to two lines instead; only the
   genuinely extreme names clamp, and those keep the full text in the
   tooltip and aria-label. */
body.student-shell-unified .pf-side-context b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pfs-ink);
  line-height: 1.35;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.student-shell-unified .pf-side-context .pf-sc-site {
  display: block;
  font-size: 12px;
  color: var(--pfs-slate);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.student-shell-unified .pf-side-context .pf-sc-chev {
  flex: none;
  align-self: center;
  width: 14px;
  height: 14px;
  color: var(--pfs-mist);
}
body.student-shell-unified .pf-side-context .pf-sc-chev svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- sidebar column: the chip stays put, only the destinations scroll ----
   The base rule scrolls the WHOLE rail, so on a short screen the placement
   context scrolled away (and could sit half-cut under the app bar). The
   approved design keeps the chip above the scrolling list: make the rail a
   column — chip and collapse control fixed at the two ends, destination list
   takes the remaining height and scrolls on its own. That is also what keeps
   the collapse control clear of the last destination: it reserves its own
   height in the column rather than floating over the list. Every row stays
   reachable, which is what the base overflow rule was there to guarantee.
   (The footer rows this used to pin are gone: Settings, Help & support and
   Report a bug now live in the account popover, which is the whole reason a
   laptop-height viewport no longer has to scroll the rail at all.)

   Desktop/drawer widths only: at ≤768px the rail is display:none and the
   bottom tab bar owns navigation — an unscoped display:flex here would load
   after style.css and win that tie, painting the sidebar over the page. */
@media (min-width: 769px) {
  body.app-dashboard.student-shell-unified .app-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden !important;
  }
  body.app-dashboard.student-shell-unified .pf-side-context,
  body.app-dashboard.student-shell-unified .pf-side-rail-foot {
    flex: none;
  }
  body.app-dashboard.student-shell-unified .app-sidebar-nav {
    flex: 1;
    min-height: 0;
    height: auto;
  }
  body.app-dashboard.student-shell-unified .app-sidebar-section {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }
  body.app-dashboard.student-shell-unified .app-sidebar-section:hover {
    scrollbar-color: #d8e0ec transparent;
  }
  body.app-dashboard.student-shell-unified .app-sidebar-section::-webkit-scrollbar {
    width: 8px;
  }
  body.app-dashboard.student-shell-unified .app-sidebar-section::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 8px;
  }
  body.app-dashboard.student-shell-unified .app-sidebar-section:hover::-webkit-scrollbar-thumb {
    background: #d8e0ec;
  }
}

/* ---- sidebar: group labels ---- */
body.student-shell-unified .pf-side-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--pfs-slate);
  text-transform: uppercase;
  padding: 14px 10px 5px;
}

/* ---- sidebar: clearing count pills (hidden at zero) ---- */
body.student-shell-unified .app-sidebar-badge {
  margin-left: auto;
  background: var(--pfs-brand-tint);
  color: var(--pfs-brand-2);
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  min-width: 20px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex: none;
}
body.student-shell-unified .app-sidebar-badge--soft {
  background: var(--pfs-brand-tint);
  color: var(--pfs-brand-2);
}
body.student-shell-unified .app-sidebar-link--active .app-sidebar-badge {
  background: #fff;
}
body.student-shell-unified .app-sidebar-badge[hidden] {
  display: none;
}

/* ---- sidebar: active-item left-edge flag ---- */
body.student-shell-unified .app-sidebar-link {
  position: relative;
}
body.student-shell-unified .app-sidebar-link--active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--pfs-brand);
  border-radius: 2px;
}

/* ===== mobile top-nav standard (2026-07-18) =====================
   One height contract for every student header variant. This block loads
   after today-redesign.css on every page and out-!importants the four
   runtime-injected <style> tags, so it is the single source of truth:
   - top padding: calc(safe + 8px), bottom 10px
   - title 20px/800; controls (search/messages/avatar) 36px circles
   - the classic navbar always takes its COMPACT one-row form
   - a page showing the injected section header never also shows the navbar */
@media (max-width: 768px) {
  /* pages with the injected section trio: the navbar must not stack above it */
  body.app-dashboard:has(#pp-section-head.is-on) .navbar-app {
    display: none !important;
  }

  /* the classic navbar's compact one-row form, universally (this previously
     only applied on pages that happened to load today-redesign.css, leaving
     forms.html and teaching-home.html with a ~110px two-row header) */
  body.app-dashboard .navbar-app .nav-container {
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 58px !important;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 10px !important;
  }
  /* .student-shell-unified variant included for specificity: style.css's
     unified-shell block still carries the old two-row form (order:3,
     flex-basis 100% !important) — under the nowrap container above, that
     basis pushed the profile cluster ~120px past the right edge on every
     app.html drill-down (placement details, tips) */
  body.app-dashboard .navbar-app .nav-search,
  body.app-dashboard.student-shell-unified .navbar-app .nav-search {
    order: 0 !important;
    flex: 1 1 auto !important;
    width: auto !important;
    margin: 0 10px !important;
    min-width: 0;
  }
  body.app-dashboard .navbar-app .nav-search input {
    height: 36px !important;
    padding: 0 14px 0 2.2rem !important;
    font-size: 14px !important;
  }
  body.app-dashboard .navbar-app .nav-profile-avatar,
  body.app-dashboard .navbar-app .nav-logo-mark {
    width: 36px !important;
    height: 36px !important;
  }

  /* injected section header (app.html sections) */
  #pp-section-head.is-on {
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 10px !important;
  }
  #pp-section-head .psh-title { font-size: 19px !important; font-weight: 600 !important; letter-spacing: -.02em !important; }
  #pp-section-head .psh-search,
  #pp-section-head .pp-mobhead-avatar { width: 36px !important; height: 36px !important; border-radius: 999px !important; }

  /* standalone-page mobhead (profile / settings / help / opportunities) */
  .pp-mobhead {
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 10px !important;
  }
  .pp-mobhead .pp-mobhead-title { font-size: 19px !important; font-weight: 600 !important; letter-spacing: -.02em !important; }
  .pp-mobhead .pp-mobhead-search,
  .pp-mobhead .pp-mobhead-avatar { width: 36px !important; height: 36px !important; border-radius: 999px !important; }

  /* native shell-view head */
  body.app-dashboard.has-external-shell-view .student-shell-view-head {
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 10px !important;
  }
  body.app-dashboard.has-external-shell-view .student-shell-view-head .student-shell-view-title { font-size: 19px !important; font-weight: 600 !important; letter-spacing: -.02em !important; }
  .pp-mh-search, .pp-mh-avatar { width: 36px !important; height: 36px !important; border-radius: 999px !important; }

  /* Today keeps its hero greeting, but its controls join the standard */
  .tm-whisper .tm-search-btn,
  .tm-whisper .tm-avatar,
  .pp-dm-btn { width: 36px !important; height: 36px !important; border-radius: 999px !important; }
}

/* headers are exactly one title line tall — long titles ellipsize */
@media (max-width: 768px) {
  #pp-section-head .psh-title,
  .pp-mobhead .pp-mobhead-title,
  body.app-dashboard.has-external-shell-view .student-shell-view-title {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.25 !important;
  }
  #pp-section-head .psh-main { min-width: 0; }
  /* ===== one vertical origin for every header (2026-07-19) ===============
     The four header systems started at four different heights: shell views
     hugged the top (safe+8), sections and standalone pages sat ~29px lower
     (app-shell 16px + app-content 13px above the header), Today ~18px lower
     (app-inner + card + tm-shell offsets) — and on native the app-shell's
     own safe-top padding stacked UNDER the headers' calc(safe+8), a double
     notch gap on everything except Today. One contract: the header element
     ALONE carries calc(safe-area + 8px); no container above it adds top
     spacing, so the eyebrow/title row lands at the same y on every page.
     The :not(:has(#id)) pairs are a specificity ladder — today-redesign.css
     pads .app-content via ID-level :has() selectors with !important, so
     these pins need two ID-level units to win. */

  /* native: app-shell's safe-top padding duplicated the headers' own inset
     (student shell only — the clinician shell keeps its padding) */
  html.is-capacitor body.app-dashboard .app-shell {
    padding-top: 0 !important;
  }

  /* standalone mobhead pages: the scroll container's 13px sat above the head */
  body.pp-has-mobhead:not(:has(#pf-navstd-a)):not(:has(#pf-navstd-b)) .app-content {
    padding-top: 0 !important;
  }

  /* app.html sections showing the injected trio: same container pad above it */
  body.app-dashboard:has(#pp-section-head.is-on):not(:has(#pf-navstd-a)) .app-content {
    padding-top: 0 !important;
  }

  /* Today: its whisper is the model for the standard, but it rested ~18px
     lower (app-inner 10px + dashboard card 10px + tm-shell 4px + whisper 2px).
     Give tm-shell the standard calc(safe+8) and zero everything else. */
  /* Frame pages place their page heading before the Meridian content, so the
     frame's own top gutter must survive this older greeting-only reset. */
  body.app-dashboard.today-mobile-mock:not(.pf-frame-v1):not(:has(#pf-navstd-a)) .app-inner,
  body.app-dashboard.today-mobile-mock:not(:has(#pf-navstd-a)) #section-dashboard {
    padding-top: 0 !important;
  }
  body.app-dashboard.today-mobile-mock .tm-shell {
    padding-top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
  }
  body.app-dashboard.today-mobile-mock .tm-whisper {
    margin-top: 0 !important;
  }
  /* …and the title rows land on the same line: the shell-view kicker ran a
     touch shorter+tighter than the standard eyebrow (10px font, 4.8px flex
     gap) and Today's greeting a hair higher — pin all three to the eyebrow
     spec: 10.5px/800/.12em, then title 2px below. */
  body.app-dashboard.has-external-shell-view .student-shell-view-head-copy {
    gap: 0 !important;
  }
  body.app-dashboard.has-external-shell-view .student-shell-view-kicker {
    font-size: 10.5px !important;
    letter-spacing: 0.12em !important;
    margin: 0 !important;
  }
  body.app-dashboard.has-external-shell-view .student-shell-view-head .student-shell-view-title {
    margin: 2px 0 0 !important;
  }
  body.app-dashboard.today-mobile-mock .tm-whisper p#tm-greeting {
    margin-top: 2px !important;
  }
  /* the header always layers above page art — with the container padding
     gone, decorative pieces that rise to the top edge (the profile lanyard
     straps) would otherwise paint over the search/avatar cluster */
  #pp-section-head.is-on,
  .pp-mobhead,
  body.app-dashboard.has-external-shell-view .student-shell-view-head {
    position: relative !important;
    z-index: 30 !important;
  }
  /* profile: the lanyard straps rise to the top edge — an opaque band makes
     them read as hanging from behind the header instead of through the title.
     Opacity is what this rule needs, not a tint, so it rides the canvas. */
  body.student-profile-page .pp-mobhead {
    background: var(--pf-canvas, #fff);
  }

  /* Settings builds its own mobile view (#st-mobile) whose home screen prints a
     second "Your account / Settings" title — the injected mobhead already
     carries it, so the two stacked identically. Hide the home view's title
     block only (its direct-child div holding .stm-h); sub-view headers keep
     their .stm-headrow because that row owns the back button. */
  body.student-settings-page.pp-has-mobhead #st-mobile > div:has(> .stm-h) {
    display: none !important;
  }

  /* Profile prints its own "My profile" heading above the lanyard hero; the
     mobhead already carries it (the JS suppression list covers help/feedback/
     settings but missed this one), so drop the redundant page head on mobile. */
  body.student-profile-page.pp-has-mobhead .student-profile-page-head {
    display: none !important;
  }

  /* The four pages newly promoted onto the Today-style mobhead (timetable /
     sign-offs / teaching / messages) each still print their own <h1> in the
     body — hide the redundant title now that the header carries it. Controls
     that live beside the title (the sign-offs funnel, the "New message" CTA)
     are preserved by hiding only the heading, never the whole row. */
  body.student-schedule-page.pp-has-mobhead #schedule-page-title {
    display: none !important;
  }
  body.forms-page.pp-has-mobhead .forms-title-block h1 {
    display: none !important;
  }
  body.teaching-home-page.pp-has-mobhead .teaching-home-header {
    display: none !important;
  }
  /* teaching.html is the specialty-detail page — hide only its <h1>, keeping
     the "\2190 Back to specialties" link, the placement context line, and the
     folder actions that share its header row. */
  body.teaching-page.pp-has-mobhead .teaching-header h1 {
    display: none !important;
  }
  body.messages-workspace.pp-has-mobhead .bleep-head > div:first-child {
    display: none !important;
  }
}

/* ============================================================
   Full-width mobile content (2026-07-18). Non-Today sections
   were doubly inset — main.app-content (~11px) + div.app-inner
   (~16px, plus per-section overrides up to 1.4rem) = ~27px each
   side, so cards felt cramped vs Today (which zeroes both via
   .today-mobile-mock and sits at ~10px). Match Today: collapse
   the two wrappers to one tight inset on phones. Dashboard is
   excluded (already full-bleed); desktop (>768px) untouched so
   the centered 1100px column stays. High specificity + !important
   to beat the per-section .app-inner padding overrides. */
/* Student page frame v1 supersedes the mobile gutter on adopting pages (16px
   from --pf-page-gutter). Pages that have not adopted it keep this 12px inset
   unchanged. See styles/student-page-frame.css. */
@media (max-width: 768px) {
  body.app-dashboard.student-shell-unified:not(.today-mobile-mock) .app-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.app-dashboard.student-shell-unified:not(.pf-frame-v1):not(.today-mobile-mock) .app-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
    max-width: none !important;
  }
}

/* Card-classed student sections (Notices, My progress) were opaque white
   cards on mobile, so their own inner content cards nested card-in-card and
   the real content sat ~40px from the screen edge. They were redesigned with
   their OWN cards on canvas (Evidence File doc cards, notices rows) — so on
   phones the outer section goes full-bleed like Today/Casebook: content sits
   directly on the canvas at the 12px wrapper inset. Desktop keeps the card. */
@media (max-width: 768px) {
  body.app-dashboard.student-shell-unified .app-page-section.card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ==========================================================================
   Student shell — Premium V1 (approved 2026-09-02)
   Direction: calm clinical logbook. White canvas, hairline rules, brand blue
   as a scalpel (active states, focus, one primary action), the per-hospital
   site accent as a quiet signature thread. Desktop chrome only — the ≤768px
   phone shell (tab bar, sheets, mobhead, Instrument Pill) is untouched.
   ========================================================================== */

/* ---- visible keyboard focus, one ring everywhere in the shell ---- */
body.student-shell-unified .navbar-app :focus-visible,
body.student-shell-unified .app-sidebar :focus-visible,
body.student-shell-unified .pf-keys-wrap :focus-visible {
  outline: 2px solid var(--pfs-brand);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---- skip to content (injected by shared/student-sidebar.js) ---- */
.pf-skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 2000;
  padding: 10px 16px;
  background: #101a2e;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: top 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
.pf-skip-link:focus-visible {
  top: 10px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---- topbar: drawer menu button (visible only in the drawer range) ---- */
.pf-drawer-btn {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--pfs-slate);
  cursor: pointer;
  transition: background-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1), color 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
.pf-drawer-btn:hover {
  background: #f7f9fc;
  color: var(--pfs-ink);
}
.pf-drawer-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* ---- drawer scrim (also used by nothing else; z just under the sidebar) ---- */
.pf-shell-scrim {
  position: fixed;
  inset: 0;
  z-index: 1290;
  background: rgba(16, 26, 46, 0.4);
  opacity: 0;
  transition: opacity 210ms cubic-bezier(0.32, 0.72, 0.28, 1);
}
.pf-shell-scrim.is-open {
  opacity: 1;
}
body.pf-drawer-open {
  overflow: hidden;
}

/* ---- topbar: messages as a compact 36px icon button ---- */
body.student-shell-unified .navbar-app .dm-trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 8px !important;
  color: var(--pfs-slate);
  cursor: pointer;
  transition: background-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1), color 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
body.student-shell-unified .navbar-app .dm-trigger:hover {
  background: #f7f9fc;
  color: var(--pfs-ink);
}
body.student-shell-unified .navbar-app .dm-trigger:active {
  transform: scale(0.96);
}
body.student-shell-unified .navbar-app .dm-trigger-icon,
body.student-shell-unified .navbar-app .dm-trigger-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
body.student-shell-unified .navbar-app .dm-trigger-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
body.student-shell-unified .navbar-app .dm-unread-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  background: #e0493b !important;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  border: 2px solid #fff;
}
body.student-shell-unified .navbar-app .dm-unread-badge.is-hidden {
  display: none;
}

/* hairline divider between the messages icon and the account trigger */
body.student-shell-unified .navbar-app .nav-messages {
  position: relative;
  padding-right: 11px;
  margin-right: 1px;
}
body.student-shell-unified .navbar-app .nav-messages::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: var(--pfs-line);
}
/* flag off → the whole cluster (icon + divider + spacing) retires together */
body.student-shell-unified .navbar-app .nav-messages:has(> .dm-trigger[hidden]) {
  padding-right: 0;
  margin-right: 0;
}
body.student-shell-unified .navbar-app .nav-messages:has(> .dm-trigger[hidden])::after {
  content: none;
}
/* Today loads today-redesign.css, whose compact-icon rule
   (body.app-dashboard .nav-links .nav-messages .dm-trigger, 0-4-1,
   display:inline-flex !important) out-weighs the global [hidden] reset
   (0-1-0) — so a retired trigger kept painting on Today only. Restore
   native [hidden] semantics with more weight than that rule. */
body.app-dashboard .nav-links .nav-messages .dm-trigger[hidden],
body.student-shell-unified .navbar-app .nav-messages .dm-trigger[hidden] {
  display: none !important;
}

/* ---- topbar: account trigger — identity once, compact ---- */
body.student-shell-unified .navbar-app .nav-profile-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 8px 0 5px;
  border-radius: 8px !important;
  transition: background-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
body.student-shell-unified .navbar-app .nav-profile-trigger:hover {
  background: #f7f9fc;
}
body.student-shell-unified .navbar-app .nav-profile-trigger:active {
  transform: scale(0.98);
}
body.student-shell-unified .navbar-app .nav-profile-avatar {
  width: 30px;
  height: 30px;
  border: 0;
  background: var(--pfs-brand-tint) !important;
  color: var(--pfs-brand-2) !important;
  font-size: 13px;
  font-weight: 600;
}
body.student-shell-unified .navbar-app .nav-profile-id-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pfs-ink);
  /* extreme names truncate on one line instead of wrapping the 40px bar
     taller; the full name stays on the trigger's aria-label */
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* identity appears once: the role line lives in the popover, not the bar */
body.student-shell-unified .navbar-app .nav-profile-id-role {
  display: none;
}
body.student-shell-unified .navbar-app .nav-profile-caret {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: var(--pfs-slate);
  transition: transform 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
body.student-shell-unified .navbar-app .nav-profile-caret svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.student-shell-unified .navbar-app .nav-profile-trigger[aria-expanded="true"] .nav-profile-caret {
  transform: rotate(180deg);
}

/* ---- account popover: click-to-open only (hover-open retired) ---- */
body.student-shell-unified .nav-profile .nav-profile-dropdown {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
body.student-shell-unified .nav-profile.is-open .nav-profile-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.student-shell-unified .nav-profile-dropdown {
  min-width: 292px;
  width: 292px;
  padding: 8px;
  border: 1px solid var(--pfs-line);
  border-radius: 12px;
  box-shadow: 0 12px 32px -12px rgba(16, 26, 46, 0.18), 0 2px 8px rgba(16, 26, 46, 0.06);
  gap: 0;
}
body.student-shell-unified .nav-profile-header {
  padding: 8px 8px 10px;
  gap: 2px;
}
body.student-shell-unified .nav-profile-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--pfs-ink);
}
body.student-shell-unified .nav-profile-meta {
  font-size: 12.5px;
  color: var(--pfs-slate);
}
body.student-shell-unified .nav-profile-divider {
  height: 1px;
  margin: 4px 6px;
  background: var(--pfs-line);
}
body.student-shell-unified .nav-profile-dropdown > a,
body.student-shell-unified .nav-profile-dropdown > .pf-pop-action {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pfs-ink);
  text-decoration: none;
  transition: background-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
body.student-shell-unified .nav-profile-dropdown > a:hover,
body.student-shell-unified .nav-profile-dropdown > a:focus-visible,
body.student-shell-unified .nav-profile-dropdown > .pf-pop-action:hover,
body.student-shell-unified .nav-profile-dropdown > .pf-pop-action:focus-visible {
  background: #f7f9fc;
}
body.student-shell-unified .nav-profile-dropdown > a .pf-pop-ico,
body.student-shell-unified .nav-profile-dropdown > .pf-pop-action .pf-pop-ico {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: var(--pfs-slate);
  flex: none;
}
body.student-shell-unified .nav-profile-dropdown > a .pf-pop-ico svg,
body.student-shell-unified .nav-profile-dropdown > .pf-pop-action .pf-pop-ico svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.student-shell-unified .nav-profile-dropdown > a#nav-logout-link {
  color: var(--pfs-slate);
}

/* ---- academic year: a grouped study-context control in the popover ---- */
body.student-shell-unified #student-year-switcher {
  padding: 2px;
}
body.student-shell-unified .student-year-switcher-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  background: #f7f9fc;
  border: 1px solid var(--pfs-line);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1), background-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
body.student-shell-unified .student-year-switcher-trigger:hover {
  border-color: #d8e0ec;
}
body.student-shell-unified .student-year-switcher-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pfs-slate);
}
body.student-shell-unified .student-year-switcher-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pfs-ink);
}
body.student-shell-unified .student-year-switcher-chevron {
  color: var(--pfs-slate);
  font-size: 11px;
  line-height: 1;
}

/* ---- account popover: Report a bug ----
   A <button> among the popover's links (it opens a modal rather than
   navigating), so it inherits the same row treatment and needs the usual
   button reset. Built by shared/student-sidebar.js. */
body.student-shell-unified .nav-profile-dropdown > .pf-pop-action {
  width: 100%;
  border: 0;
  background: transparent;
  /* font-family only: the shared row rule above owns size and weight, and the
     `font` shorthand here would reset both back to the UA button defaults. */
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  /* The popover's links are pill rows in practice: style.css's
     `body.app-dashboard .nav-links li a` out-weighs the shell rule above and
     restates padding and radius. A <button> can never match that selector, so
     carry the same measured values here — the point is that Report a bug is
     indistinguishable from the rows it sits with. */
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}
/* The bug reporter's home is the account popover (desktop/tablet) and the More
   sheet (phones); the floating FAB retires visually but stays in the DOM as
   the engine both triggers click. ≤768px it was already hidden. The
   pf-bug-relocated gate is set only once a popover trigger actually exists,
   so a student page without that popover keeps its FAB rather than losing the
   reporter altogether. */
@media (min-width: 769px) {
  body.student-shell-unified.pf-bug-relocated .bug-report-fab {
    display: none;
  }
}

/* ---- sidebar foot: the collapse control ----
   Icon-only, docked at the rail's bottom-right, replacing the full-width
   footer row. It aligns right instead of filling the row like every
   navigation item, which is what makes it read as shell furniture.

   The 12px of padding below sits on top of the sidebar's own 10px, so the
   control rests 22px above the bottom edge — lifted clear of it rather than
   pinned to it. The 4px above is the smallest gap the scrolling list can
   close to when scrolled to its end. Both are reserved height in the column,
   never an overlay, so the last destination can never end up underneath.

   Its hit area ends 13px from the right, which is exactly where the
   destination rows and the placement chip's card end — the rail's real right
   edge. (The chip's chevron sits further in at 26px, but that is an inner
   detail of the card; matching it would push this control's hit area out to
   18px and break the shared edge.)

   Desktop affordance only: inside the tablet drawer (and below, where the
   bottom tab bar owns navigation) it retires, exactly as the old row did. */
body.student-shell-unified .pf-side-rail-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 0 12px;
}
@media (max-width: 1023px) {
  body.student-shell-unified .pf-side-rail-foot {
    display: none;
  }
}
body.student-shell-unified .pf-side-rail-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pfs-mist);
  cursor: pointer;
  transition: background-color 140ms cubic-bezier(0.3, 0.7, 0.4, 1),
    color 140ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
/* Hover and keyboard focus land the same soft rounded plate, on the 8px
   radius the destination rows use; the shell's shared :focus-visible rule
   adds the brand ring on top. At rest the plate is transparent, so all that
   shows is the understated 18px glyph. */
body.student-shell-unified .pf-side-rail-toggle:hover,
body.student-shell-unified .pf-side-rail-toggle:focus-visible {
  background: var(--pf-bg);
  color: var(--pfs-slate);
}
body.student-shell-unified .pf-side-rail-toggle:active {
  transform: scale(0.94);
}
body.student-shell-unified .pf-collapse-icon {
  display: block;
  width: 18px;
  height: 18px;
}
body.student-shell-unified .pf-collapse-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
/* State reads off the panel's rail column: filled while the sidebar is
   showing, empty once it is collapsed. The label says the rest. */
body.student-shell-unified .pf-collapse-icon .pf-panel-fill {
  transition: opacity 210ms cubic-bezier(0.32, 0.72, 0.28, 1);
}
body.pf-nav-collapsed .pf-collapse-icon .pf-panel-fill {
  opacity: 0;
}

/* ---- collapsed icon rail internals (desktop only) ----
   Labels are hidden visually (font-size: 0) but stay in the accessibility
   tree; tooltips carry each label for pointer users; count pills become
   mini corner pills; section labels become hairline dividers. */
@media (min-width: 1024px) {
  body.student-shell-unified.pf-nav-collapsed .app-sidebar-link {
    justify-content: center !important;
    gap: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    min-height: 36px;
  }
  body.student-shell-unified.pf-nav-collapsed .pf-side-label {
    font-size: 0;
    height: 1px;
    padding: 0;
    margin: 12px 8px 11px;
    background: var(--pfs-line);
  }
  body.student-shell-unified.pf-nav-collapsed .app-sidebar-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    margin: 0;
    min-width: 15px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    border: 1px solid #fff;
  }
  body.student-shell-unified.pf-nav-collapsed .pf-side-context {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
  }
  body.student-shell-unified.pf-nav-collapsed .pf-side-context .pf-sc-copy,
  body.student-shell-unified.pf-nav-collapsed .pf-side-context .pf-sc-chev {
    display: none;
  }
  body.student-shell-unified.pf-nav-collapsed .pf-side-context .pf-sc-dot {
    margin: 0;
  }
  body.student-shell-unified.pf-nav-collapsed .app-sidebar-header {
    display: none;
  }
  body.student-shell-unified.pf-nav-collapsed .pf-side-rail-foot {
    justify-content: center;
  }
}

/* ---- short viewports: the whole navigation, no scrolling ----
   On a 768px-high viewport the rail runs 27px past its scroll region, which
   put exactly one row — Opportunities, the last destination — below the fold.
   The point of this navigation is that all of it is visible, so recover that
   here and only here: at 900px and above nothing below changes.

   The saving is deliberately spread across the spacing BETWEEN things, never
   the things themselves. Row heights, type, icon sizes, hit targets, the
   placement chip and the collapse control are all untouched — a destination
   is still a 36px row you click, it just sits 1px closer to its neighbour.

   Budget at 768px: 3 group labels x 7px = 21px, plus 13 row gaps x 1px = 13px,
   so 34px recovered against 27px needed. Scoped to >=1024px because the
   769-1023px drawer is full viewport height and never had the problem, and
   :not(.pf-nav-collapsed) because the 68px rail already fits at every height. */
@media (min-width: 1024px) and (max-height: 800px) {
  body.app-dashboard.student-shell-unified:not(.pf-nav-collapsed) .app-sidebar-section {
    gap: 4.6px;
  }
  body.app-dashboard.student-shell-unified:not(.pf-nav-collapsed) .pf-side-label {
    padding-top: 8px;
    padding-bottom: 4px;
  }
}

/* ---- keyboard shortcuts sheet (built lazily by shared/student-sidebar.js) ---- */
.pf-keys-wrap {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 26, 46, 0.4);
}
.pf-keys {
  width: min(440px, 100%);
  padding: 20px;
  background: #fff;
  border: 1px solid #e7ecf3;
  border-radius: 12px;
  box-shadow: 0 12px 32px -12px rgba(16, 26, 46, 0.18), 0 2px 8px rgba(16, 26, 46, 0.06);
}
.pf-keys h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #101a2e;
}
.pf-keys-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
}
.pf-keys-table td {
  padding: 8px 0;
  font-size: 13.5px;
  color: #1b2740;
  border-bottom: 1px solid #e7ecf3;
}
.pf-keys-table tr:last-child td {
  border-bottom: 0;
}
.pf-keys-table td:last-child {
  text-align: right;
  white-space: nowrap;
}
.pf-keys-table kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  margin-left: 3px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  color: #1b2740;
  background: #f7f9fc;
  border: 1px solid #d8e0ec;
  border-bottom-width: 2px;
  border-radius: 6px;
}
.pf-keys-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
.pf-keys-close {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: #fff;
  color: #1b2740;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.pf-keys-close:hover {
  background: #f7f9fc;
  border-color: #b9c6d9;
}

/* ==========================================================================
   NAVIGATION INTERACTION — one small vocabulary for the top bar, the sidebar
   and the tablet drawer (desktop and tablet only: every rule below sits at
   ≥769px, so the phone shell's pill, tab bar and sheets are untouched).

   Hover lands quickly and leaves gently, so sweeping the pointer down the
   list leaves a short trail instead of a flicker. Press is a deeper plate,
   never a scale, so labels and icons stay exactly where they are. Menus and
   the drawer enter on a deceleration and leave faster than they came; a
   closed surface is also visibility:hidden, so it cannot take focus or
   clicks while (or after) it fades. Nothing here delays an action: routes,
   search and menus act on the click, the motion only follows.
   ========================================================================== */
:root {
  --pf-motion-quick: 90ms;   /* hover arriving, press releasing */
  --pf-motion-base: 150ms;   /* hover leaving, small state changes */
  --pf-motion-enter: 170ms;  /* menu / tooltip entrance */
  --pf-motion-exit: 110ms;   /* menu / tooltip exit */
  --pf-motion-panel: 200ms;  /* drawer slide, rail width */
  --pf-ease-standard: cubic-bezier(0.3, 0.7, 0.4, 1);
  --pf-ease-panel: cubic-bezier(0.32, 0.72, 0.28, 1);
  --pf-ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --pf-nav-hover: #f1f4f9;   /* the sidebar's approved quiet hover */
  --pf-nav-press: #e7ecf4;
}

@media (min-width: 769px) {
  /* ---- one hover / press / open treatment for every shell control ---- */
  body.student-shell-unified aside.app-sidebar .app-sidebar-link,
  body.student-shell-unified .pf-side-rail-toggle,
  body.student-shell-unified .pf-drawer-btn,
  body.app-dashboard.student-shell-unified .navbar-app .nav-links .nav-messages .dm-trigger,
  body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger,
  body.student-shell-unified .nav-profile-dropdown > a,
  body.student-shell-unified .nav-profile-dropdown > .pf-pop-action {
    transition: background-color var(--pf-motion-base) var(--pf-ease-standard),
      color var(--pf-motion-base) var(--pf-ease-standard);
  }
  body.student-shell-unified aside.app-sidebar .app-sidebar-link:hover,
  body.student-shell-unified .pf-side-rail-toggle:hover,
  body.student-shell-unified .pf-drawer-btn:hover,
  body.app-dashboard.student-shell-unified .navbar-app .nav-links .nav-messages .dm-trigger:hover,
  body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger:hover,
  body.student-shell-unified .nav-profile-dropdown > a:hover,
  body.student-shell-unified .nav-profile-dropdown > .pf-pop-action:hover {
    transition-duration: var(--pf-motion-quick);
  }
  /* The Today stylesheet (today-redesign.css, also loaded by several other
     student pages) pins these two triggers' backgrounds with !important —
     transparent on the account trigger even under the pointer — so the top
     bar answered hover on some pages and not others. Only the state colour
     is claimed back here; their size, radius and border stay as they are,
     and Messages keeps its own open (is-active) tint. */
  body.app-dashboard.student-shell-unified .navbar-app .nav-links .nav-messages .dm-trigger:not(.is-active):hover,
  body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger:hover,
  body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger[aria-expanded="true"] {
    background: var(--pf-nav-hover) !important;
  }
  body.student-shell-unified .pf-side-rail-toggle:hover,
  body.student-shell-unified .pf-drawer-btn:hover,
  body.student-shell-unified .pf-drawer-btn[aria-expanded="true"],
  body.student-shell-unified .nav-profile-dropdown > a:hover,
  body.student-shell-unified .nav-profile-dropdown > a:focus-visible,
  body.student-shell-unified .nav-profile-dropdown > .pf-pop-action:hover,
  body.student-shell-unified .nav-profile-dropdown > .pf-pop-action:focus-visible {
    background: var(--pf-nav-hover);
    color: var(--pfs-ink);
  }
  /* Press: the plate deepens at once; nothing scales. The current row is
     excluded — it never gains a filled container. */
  body.student-shell-unified aside.app-sidebar .app-sidebar-link:not(.app-sidebar-link--active):active,
  body.student-shell-unified .pf-side-rail-toggle:active,
  body.student-shell-unified .pf-drawer-btn:active,
  body.app-dashboard.student-shell-unified .navbar-app .nav-links .nav-messages .dm-trigger:not(.is-active):active,
  body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger:active,
  body.student-shell-unified .nav-profile-dropdown > a:active,
  body.student-shell-unified .nav-profile-dropdown > .pf-pop-action:active {
    background: var(--pf-nav-press) !important;
    transform: none;
    transition-duration: 0s;
  }
  body.student-shell-unified aside.app-sidebar .app-sidebar-link--active:active,
  body.app-dashboard.student-shell-unified .navbar-app .nav-links .nav-messages .dm-trigger:active {
    transform: none;
  }
  body.app-dashboard.student-shell-unified .navbar-app .nav-profile-caret {
    transition: transform var(--pf-motion-enter) var(--pf-ease-standard);
  }

  /* Search trigger: the same press plate as its neighbours. Its focus ring,
     shortcut hint and the panel it opens are unchanged. */
  body.app-dashboard.student-shell-unified .nav-search input {
    transition: border-color var(--pf-motion-base) var(--pf-ease-standard),
      box-shadow var(--pf-motion-base) var(--pf-ease-standard),
      background-color var(--pf-motion-base) var(--pf-ease-standard);
  }
  body.app-dashboard.student-shell-unified .nav-search input:active {
    background-color: var(--pf-nav-hover);
    transition-duration: 0s;
  }

  /* Keyboard focus on a destination: drawn inside the row. Outside it, the
     scrolling list clipped the ring's left and right edges. */
  body.student-shell-unified aside.app-sidebar .app-sidebar-link:focus-visible {
    outline-offset: -2px;
  }

  /* ---- account menu: anchored to its trigger, quick to leave ----
     It drops 4px from the trigger rather than rising toward it. Closed, it
     is visibility:hidden once its exit has played, so its buttons (Academic
     year, Report a bug) are out of the Tab order and cannot catch a click. */
  body.student-shell-unified .nav-profile .nav-profile-dropdown {
    visibility: hidden;
    transform: translateY(-4px);
    transform-origin: top right;
    transition: opacity var(--pf-motion-exit) var(--pf-ease-exit),
      transform var(--pf-motion-exit) var(--pf-ease-exit),
      visibility 0s linear var(--pf-motion-exit);
  }
  body.student-shell-unified .nav-profile.is-open .nav-profile-dropdown {
    visibility: visible;
    transform: none;
    transition: opacity var(--pf-motion-enter) var(--pf-ease-standard),
      transform var(--pf-motion-enter) var(--pf-ease-standard),
      visibility 0s;
  }
}

/* ---- tablet drawer: hidden when closed, scrim never outlives its job ---- */
@media (min-width: 769px) and (max-width: 1023px) {
  body.app-dashboard.student-shell-unified .app-sidebar:not(.pf-drawer-open) {
    visibility: hidden;
    transition: transform 160ms var(--pf-ease-exit), visibility 0s linear 160ms;
  }
  body.app-dashboard.student-shell-unified .app-sidebar.pf-drawer-open {
    visibility: visible;
    transition: transform var(--pf-motion-panel) var(--pf-ease-panel), visibility 0s;
  }
  .pf-shell-scrim:not(.is-open) {
    transition-duration: 160ms;
  }
}
/* A fading scrim never takes clicks, including after a resize closed it. */
.pf-shell-scrim:not(.is-open) {
  pointer-events: none;
}

/* ---- collapse and expand (≥1024px, user toggles only) ----
   The rail and the content column take their final widths at once: one
   layout, as before. Easing the rail's width was measured and rejected —
   the first toggle after each load stalled one frame for 60–80ms. Instead
   the rail's contents settle in place with a short fade, which softens the
   rows' re-arrangement without moving anything. body has pf-nav-shifting
   only after a click or the [ shortcut, never for the stored preference on
   load, so the first frame is already final; the two keyframe names let a
   quick reversal restart the fade rather than skip it. */
@media (min-width: 1024px) {
  body.app-dashboard.student-shell-unified.pf-nav-shifting .app-sidebar-nav,
  body.app-dashboard.student-shell-unified.pf-nav-shifting .pf-side-context {
    animation: pf-rail-settle-open var(--pf-motion-enter) var(--pf-ease-standard);
  }
  body.app-dashboard.student-shell-unified.pf-nav-shifting.pf-nav-collapsed .app-sidebar-nav,
  body.app-dashboard.student-shell-unified.pf-nav-shifting.pf-nav-collapsed .pf-side-context {
    animation-name: pf-rail-settle-closed;
  }
}
@keyframes pf-rail-settle-open {
  from { opacity: 0.35; }
}
@keyframes pf-rail-settle-closed {
  from { opacity: 0.35; }
}

/* ---- collapsed rail labels (built by shared/student-sidebar.js) ----
   One shared label beside the hovered or keyboard-focused destination. It
   replaces the native tooltip, which took about a second to appear and never
   appeared for keyboard focus. Decorative for assistive technology: each
   destination's name is already its accessible name. */
.pf-rail-tip {
  position: fixed;
  z-index: 1350;
  top: 0;
  left: 0;
  max-width: 240px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #101a2e;
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  width: max-content;
  overflow-wrap: anywhere;
  pointer-events: none;
  opacity: 0;
  translate: -3px -50%;
  visibility: hidden;
  transition: opacity var(--pf-motion-exit) var(--pf-ease-exit),
    translate var(--pf-motion-exit) var(--pf-ease-exit),
    visibility 0s linear var(--pf-motion-exit);
}
/* Hoverable once shown: an invisible bridge spans the gap to the rail, so
   the pointer can move from the row onto the label without losing it. */
.pf-rail-tip::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  width: 10px;
}
.pf-rail-tip.is-visible {
  opacity: 1;
  translate: 0 -50%;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--pf-motion-quick) var(--pf-ease-standard),
    translate var(--pf-motion-enter) var(--pf-ease-standard),
    visibility 0s;
}

/* ==========================================================================
   FORCED COLORS (Windows High Contrast) — states must survive without colour
   ========================================================================== */
@media (forced-colors: active) {
  .pf-rail-tip {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
  }
  body.student-shell-unified .navbar-app .nav-profile-trigger[aria-expanded="true"],
  body.student-shell-unified .pf-drawer-btn[aria-expanded="true"] {
    outline: 1px solid CanvasText;
  }
  body.student-shell-unified .app-sidebar-link--active,
  body.student-shell-unified .student-mobile-nav-item.is-active {
    outline: 2px solid CanvasText;
    outline-offset: -2px;
  }
  body.student-shell-unified .app-sidebar-link--active::after,
  body.student-shell-unified .pf-side-context::before {
    background: CanvasText;
  }
  body.student-shell-unified .app-sidebar-badge,
  body.student-shell-unified .navbar-app .dm-unread-badge,
  body.student-shell-unified .pf-side-context {
    border: 1px solid CanvasText;
  }
}

/* ==========================================================================
   REDUCED MOTION — the shell's own transitions collapse
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  body.student-shell-unified .navbar-app,
  body.student-shell-unified .navbar-app .nav-search input,
  body.student-shell-unified .navbar-app .dm-trigger,
  body.student-shell-unified .navbar-app .nav-profile-trigger,
  body.student-shell-unified .navbar-app .nav-profile-caret,
  body.student-shell-unified .navbar-app .nav-profile-dropdown,
  body.student-shell-unified .app-sidebar-link,
  body.student-shell-unified .pf-side-context,
  body.student-shell-unified .pf-side-rail-toggle,
  body.student-shell-unified .pf-collapse-icon .pf-panel-fill,
  .pf-drawer-btn,
  .pf-shell-scrim,
  .pf-skip-link {
    transition: none !important;
    animation: none !important;
  }
  /* No slide, no width easing: surfaces appear and leave in place. The rail
     label keeps a brief fade so it does not flash. */
  body.app-dashboard.student-shell-unified .app-sidebar,
  body.app-dashboard.student-shell-unified .app-sidebar.pf-drawer-open,
  body.app-dashboard.student-shell-unified .app-sidebar:not(.pf-drawer-open),
  body.student-shell-unified .nav-profile .nav-profile-dropdown,
  body.student-shell-unified .nav-profile.is-open .nav-profile-dropdown {
    transition: none !important;
  }
  body.student-shell-unified .nav-profile .nav-profile-dropdown {
    transform: none;
  }
  body.app-dashboard.student-shell-unified.pf-nav-shifting .app-sidebar-nav,
  body.app-dashboard.student-shell-unified.pf-nav-shifting .pf-side-context {
    animation: none !important;
  }
  .pf-rail-tip,
  .pf-rail-tip.is-visible {
    translate: 0 -50%;
    transition: opacity 80ms linear, visibility 0s linear 80ms;
  }
  .pf-rail-tip.is-visible {
    transition: opacity 80ms linear, visibility 0s;
  }
}

/* ==========================================================================
   NAVIGATION N1.3 CALM — owner-approved desktop navigation (16 Oct 2026)

   Desktop and tablet only (>=769px): the phone shell (Instrument Pill, tab
   bar, Learn/More and account sheets) is outside every rule here. One left
   edge for mark, context and groups; search on the content gutter; the
   placement context as type on a hairline; quiet group labels; Messages and
   account as separate 36px controls with the pill's Messages glyph and badge;
   the initials avatar is a 28px navy circle (photos are left to the photo);
   the thin blue current-item line is unchanged. Rules keep the specificity
   they were reviewed at (html:root, 0-1-1).
   ========================================================================== */

html:root {
  --nv-ink: #16233f;
  --nv-text: #1b2740;
  --nv-slate: #5d6b84;
  --nv-mist: #8a97ad;
  --nv-rule: #e4e9f1;
  --nv-blue: #1f6fd6;
  --nv-rail: 264px;
  --nv-gutter: 32px;
}

@media (min-width: 1024px) and (max-width: 1279px) {
  html:root {
    --nv-rail: 248px;
    --nv-gutter: 28px;
  }
}

/* The search glyph sits in the trigger's existing left inset
   (the field already reserves 38px for it). Same 1.6 stroke as the shell. */
@media (min-width: 769px) {
  html:root body.student-shell-unified .navbar-app .nav-search {
    position: relative;
  }
  html:root body.student-shell-unified .navbar-app .nav-search::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    background: var(--nv-slate);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
    z-index: 1;
  }
  html:root body.student-shell-unified .navbar-app .nav-search input {
    padding-left: 38px !important;
    font-size: 14px !important;
  }
  html:root body.student-shell-unified .navbar-app .nav-search input::placeholder {
    color: var(--nv-slate);
    opacity: 1;
  }

  /* Placement context: type, not a card. The accent dot carries the site;
     no box, no side stripe. Without a placement (loading, none, failed),
     the dot is an empty ring and the line is slate: present and honest,
     never an empty placeholder box. */
  html:root body.student-shell-unified .pf-side-context {
    border: 0 !important;
    background: transparent;
    overflow: visible;
    gap: 10px;
  }
  html:root body.student-shell-unified .pf-side-context::before {
    content: none;
  }
  html:root body.student-shell-unified .pf-side-context b {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--nv-ink);
    letter-spacing: -0.005em;
  }
  html:root body.student-shell-unified .pf-side-context .pf-sc-site {
    font-size: 12.5px;
    color: var(--nv-slate);
    margin-top: 1px;
  }
  html:root body.student-shell-unified .pf-side-context:not([style*="--pfs-site-accent"]) .pf-sc-dot {
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--nv-mist);
  }
  html:root body.student-shell-unified .pf-side-context:not([style*="--pfs-site-accent"]) b {
    color: var(--nv-slate);
    font-weight: 500;
  }

  /* Group names: the B3.2 section label, quieter (slate, 11px). */
  html:root body.student-shell-unified .app-sidebar .pf-side-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
    color: var(--nv-slate) !important;
  }

  /* Account menu: one quiet surface, header set like the context block. */
  html:root body.student-shell-unified .nav-profile-dropdown {
    width: 300px;
    min-width: 300px;
    border-color: var(--nv-rule);
    border-radius: 10px;
    box-shadow: 0 18px 40px -18px rgba(16, 26, 46, 0.24), 0 1px 3px rgba(16, 26, 46, 0.06);
  }
  html:root body.student-shell-unified .nav-profile-name {
    font-size: 15px;
    letter-spacing: -0.01em;
    color: var(--nv-ink);
    overflow-wrap: anywhere;
  }
  html:root body.student-shell-unified .nav-profile-dropdown > a,
html:root body.student-shell-unified .nav-profile-dropdown > .pf-pop-action {
    font-size: 14px !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
  }
  html:root body.student-shell-unified .nav-profile-divider {
    background: var(--nv-rule);
  }
}

/* ==========================================================================
   Bar and rail
   ========================================================================== */
@media (min-width: 769px) {
  html:root body.app-dashboard.student-shell-unified .navbar-app {
    border-bottom-color: var(--nv-rule) !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-logo-mark {
    box-shadow: none !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-logo {
    margin-left: 0 !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-logo {
    gap: 11px;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-logo-text {
    font-size: 17px !important;
    letter-spacing: -0.012em !important;
  }
  /* Search: a quieter field with the same reach. */
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-search input {
    height: 36px !important;
    border-color: #dfe4ec !important;
  }
  /* Messages and account share one 36px line and one hover plate. */
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-links .nav-messages .dm-trigger {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger {
    height: 36px !important;
    padding: 0 8px 0 4px !important;
    border-radius: 8px !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }

  /* Rail: one hairline colour; context and groups on one left edge. */
  html:root body.app-dashboard.student-shell-unified aside.app-sidebar {
    border-right-color: var(--nv-rule) !important;
  }
  html:root body.student-shell-unified .pf-side-context {
    padding: 8px 10px 9px 15px !important;
    margin: 2px 0 14px !important;
    gap: 14.6px !important;
    border-radius: 8px !important;
  }
  html:root body.student-shell-unified .pf-side-context::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -8px;
    height: 1px;
    background: var(--nv-rule);
  }
  html:root body.student-shell-unified .pf-side-context:hover {
    background: var(--pf-nav-hover, #f1f4f9);
  }
  html:root body.student-shell-unified .app-sidebar .pf-side-label {
    padding: 16px 10px 6px !important;
  }
}
@media (min-width: 1024px) {
  /* The brand column is the rail's width and starts on the rail's icon
     line; search starts on the content gutter instead of floating on the
     viewport's centre. The bar does not move when the rail collapses. */
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-container {
    grid-template-columns: calc(264px - 22px) minmax(0, 1fr) auto !important;
    padding: 0 20px 0 22px !important;
    column-gap: 0 !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-search {
    justify-self: start !important;
    width: min(500px, 100%) !important;
    max-width: 500px !important;
    margin-left: var(--nv-gutter) !important;
  }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-container {
    grid-template-columns: calc(248px - 22px) minmax(0, 1fr) auto !important;
  }
}

/* Collapsed rail: group names fold back into hairlines and
   the context dot sits on the icon column, exactly as the shell's rail. */
@media (min-width: 1024px) {
  html:root body.app-dashboard.student-shell-unified.pf-nav-collapsed aside.app-sidebar .pf-side-label {
    font-size: 0 !important;
    height: 1px;
    padding: 0 !important;
    background: var(--nv-rule);
  }
  html:root body.app-dashboard.student-shell-unified.pf-nav-collapsed aside.app-sidebar .pf-side-label {
    margin: 12px 8px 11px !important;
  }
  html:root body.app-dashboard.student-shell-unified.pf-nav-collapsed .pf-side-context {
    padding: 12px 0 !important;
    justify-content: center;
    gap: 0 !important;
  }

}

/* Forced colours: the split bar's hairlines are system lines. */

/* ==========================================================================
   Avatar — a true circle at every width and state.
   The Today stylesheet pins a 38px flex basis, a 2px border and a drop
   shadow; at the 28px height that drew a 38×28 ellipse with a halo.
   ========================================================================== */
@media (min-width: 769px) {
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-avatar {
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    aspect-ratio: 1;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    overflow: hidden;
    display: grid !important;
    place-items: center;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    line-height: 1;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
}

/* ==========================================================================
   Calm refinement layer
   One icon language for bar and rail: 18px glyphs on the shell's 1.6 stroke,
   slate at rest, ink under the pointer. Messages takes the phone pill's own
   glyph (a squared bubble with two lines) so desktop and phone say the same
   thing; its badge is the pill's badge, anchored to the glyph and growing
   outward so "99+" never covers it. Messages and account share one 36px
   line, one plate and one gap; the divider goes.
   ========================================================================== */
@media (min-width: 769px) {
  html:root body.app-dashboard.student-shell-unified .navbar-app .dm-trigger-icon {
    position: relative;
    width: 18px !important;
    height: 18px !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .dm-trigger-icon svg {
    visibility: hidden;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .dm-trigger-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5h16v10.2H8.7L4 19.5v-14z'/%3E%3Cpath d='M8 9h8M8 12h5'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5h16v10.2H8.7L4 19.5v-14z'/%3E%3Cpath d='M8 9h8M8 12h5'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-links .nav-messages .dm-trigger {
    color: var(--nv-slate) !important;
    border-color: transparent !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-links .nav-messages .dm-trigger:hover {
    color: var(--nv-ink) !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .dm-unread-badge {
    top: 3px !important;
    right: auto !important;
    left: calc(50% + 2px) !important;
    /* An inherited translate(30%, -30%) scaled with the badge's own width,
       pushing "99+" into the account control; the anchor is exact instead. */
    transform: none !important;
    min-width: 16px !important;
    height: 16px !important;
    padding: 0 4px !important;
    border-radius: 8px !important;
    border: 1.5px solid #fff !important;
    background: #e5484d !important;
    color: #fff !important;
    font-size: 9.5px !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums;
    line-height: 1 !important;
    letter-spacing: 0;
    box-sizing: border-box;
  }
  /* 10px between Messages and account: a three-character badge ("99+")
     ends just short of the avatar instead of running into it. */
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-links {
    gap: 10px !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-messages {
    padding-right: 0 !important;
    margin-right: 0 !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-messages::after {
    content: none !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger {
    gap: 8px !important;
    padding: 0 9px 0 4px !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-id-name {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: var(--nv-ink) !important;
    letter-spacing: -0.005em;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-caret {
    width: 12px !important;
    height: 12px !important;
    color: var(--nv-mist) !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-caret svg {
    width: 12px !important;
    height: 12px !important;
    stroke-width: 1.8 !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger:hover .nav-profile-caret,
html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-trigger[aria-expanded="true"] .nav-profile-caret {
    color: var(--nv-slate) !important;
  }
  /* Rail icons follow their label under the pointer, on the same timing. */
  html:root body.student-shell-unified aside.app-sidebar .app-sidebar-link .app-sidebar-icon {
    transition: color var(--pf-motion-base) var(--pf-ease-standard);
  }
  html:root body.student-shell-unified aside.app-sidebar .app-sidebar-link:hover .app-sidebar-icon {
    color: var(--nv-ink) !important;
    transition-duration: var(--pf-motion-quick);
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-search::before {
    -webkit-mask-size: contain;
  }
}

/* The initials avatar is the phone pill's navy monogram. Only the initials state: once an
   uploaded photograph is shown (an <img> inside the avatar) it is left to
   the photo, with no tint or ring over it. */
@media (min-width: 769px) {
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-avatar:not(:has(img)) {
    background: #0b2a5e !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.16) !important;
  }
  html:root body.app-dashboard.student-shell-unified .navbar-app .nav-profile-avatar:has(img) {
    background: transparent !important;
  }
}

/* Standalone student pages (every page but Today) keep a header rule in
   today-redesign.css at ID-level weight that re-imposes the earlier logo gap,
   container gap and search size. The bar is one shared component: these
   matching-weight rules give standalone pages exactly Today's N1.3 geometry. */
@media (min-width: 769px) {
  html:root body.app-dashboard.student-shell-unified:not(:has(#section-dashboard)) .navbar-app .nav-logo {
    gap: 11px !important;
  }
  html:root body.app-dashboard.student-shell-unified:not(:has(#section-dashboard)) .navbar-app .nav-search input {
    height: 36px !important;
  }
}
@media (min-width: 769px) and (max-width: 1023px) {
  html:root body.app-dashboard.student-shell-unified:not(:has(#section-dashboard)) .navbar-app .nav-container {
    gap: 0.62rem !important;
  }
}
@media (min-width: 1024px) {
  html:root body.app-dashboard.student-shell-unified:not(:has(#section-dashboard)) .navbar-app .nav-container {
    column-gap: 0 !important;
  }
  html:root body.app-dashboard.student-shell-unified:not(:has(#section-dashboard)) .navbar-app .nav-search input {
    width: 100% !important;
  }
}
