/* NOUN Student Portal 6.31.59 — device-aware tablet shell authority.
 * Loaded last on private Workspace pages. Tablet mode is applied by the
 * early head bootstrap (html.nsp-tablet-workspace), not by one fragile CSS
 * viewport breakpoint. Phones keep the drawer/bottom-nav experience. */

html.nsp-tablet-workspace body.nsp-private-workspace{
  --nsp59-tablet-sidebar:190px;
  --nsw-sidebar:190px!important;
}

html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-dash.nsp-workspace{
  display:grid!important;
  grid-template-columns:var(--nsp59-tablet-sidebar) minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:100dvh!important;
  margin:0!important;
  padding:0!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-workspace-column{
  display:flex!important;
  grid-column:2!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  min-height:100dvh!important;
  margin:0!important;
  padding:0!important;
}

/* Tablet owns the sidebar completely. Never expose the phone service drawer. */
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar:not(.open),
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar.open{
  display:flex!important;
  position:fixed!important;
  inset:0 auto 0 0!important;
  flex-direction:column!important;
  width:var(--nsp59-tablet-sidebar)!important;
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  transform:none!important;
  translate:none!important;
  visibility:visible!important;
  opacity:1!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,#0d2b22 0%,#10251f 62%,#0c211a 100%)!important;
  border:0!important;
  border-right:1px solid rgba(255,255,255,.11)!important;
  box-shadow:none!important;
  color:#fff!important;
  z-index:1000!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar:not(.open) *{visibility:visible!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-mobile-directory,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar .nsw-mobile-directory,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar.open .nsw-mobile-directory{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
  width:0!important;
  height:0!important;
  overflow:hidden!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace :is(.nsp-overlay,.nsp-side-overlay,.nsw-sidebar-overlay),
html.nsp-tablet-workspace body.nsp-private-workspace :is(.nsp-overlay.show,.nsp-side-overlay.show,.nsw-sidebar-overlay.show){
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* Brand and student identity remain readable on tablet rather than collapsing
   into a desktop logo or an icon-only rail. */
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand-block{
  display:block!important;
  flex:0 0 auto!important;
  padding:18px 14px 15px!important;
  border-bottom:1px solid rgba(255,255,255,.10)!important;
  background:transparent!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
  color:#fff!important;
  text-decoration:none!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand>span:first-child{
  display:grid!important;
  place-items:center!important;
  width:38px!important;
  height:38px!important;
  margin:0!important;
  background:rgba(255,255,255,.10)!important;
  color:#a6efc1!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand>span:first-child svg{width:20px!important;height:20px!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand>span:last-child{
  display:block!important;
  min-width:0!important;
  color:#fff!important;
  font-size:13px!important;
  line-height:1.05!important;
  font-weight:650!important;
  white-space:normal!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand>span:last-child strong{display:inline!important;color:#fff!important;font-weight:850!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand>span:last-child small{
  display:block!important;
  margin-top:4px!important;
  color:#b8c9c0!important;
  font-size:8.5px!important;
  line-height:1.2!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}

html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-side-hdr.nsw-student-compact{
  display:grid!important;
  grid-template-columns:36px minmax(0,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:13px 13px!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  background:rgba(255,255,255,.035)!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-small-avatar{width:36px!important;height:36px!important;min-width:36px!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-student-compact .nsp-side-name{
  display:block!important;color:#fff!important;font-size:11px!important;line-height:1.2!important;font-weight:780!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-student-compact .nsp-side-meta{
  display:block!important;margin-top:3px!important;color:#b9c9c0!important;font-size:9px!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}

/* Horizontal, legible tablet navigation — no vertically clipped rail labels. */
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-nav.nsw-primary-nav{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  gap:5px!important;
  min-height:0!important;
  padding:12px 9px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:none!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-nav.nsw-primary-nav::-webkit-scrollbar{display:none!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item{
  position:relative!important;
  display:grid!important;
  grid-template-columns:22px minmax(0,1fr)!important;
  align-items:center!important;
  justify-content:stretch!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  min-height:47px!important;
  margin:0!important;
  padding:9px 10px!important;
  border:0!important;
  background:transparent!important;
  color:#d5e2db!important;
  font-size:11.5px!important;
  font-weight:720!important;
  line-height:1.2!important;
  text-align:left!important;
  transform:none!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item>svg{
  width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important;color:inherit!important;stroke:currentColor!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item>span{
  display:block!important;min-width:0!important;max-width:none!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:inherit!important;-webkit-text-fill-color:currentColor!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item.active,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item:hover,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item:focus-visible{
  background:rgba(255,255,255,.11)!important;
  color:#fff!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item.active:before{
  display:block!important;content:""!important;position:absolute!important;left:-9px!important;top:10px!important;bottom:10px!important;width:3px!important;background:#73e0a2!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsw-nav-badge{
  position:absolute!important;top:5px!important;right:5px!important;min-width:17px!important;height:17px!important;padding:0 4px!important;font-size:8.5px!important;
}

html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar.open .nsw-sidebar-help{
  display:grid!important;
  position:relative!important;
  inset:auto!important;
  flex:0 0 auto!important;
  grid-template-columns:30px minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  width:auto!important;
  min-height:54px!important;
  margin:6px 9px 8px!important;
  padding:9px!important;
  border:1px solid rgba(255,255,255,.14)!important;
  background:rgba(255,255,255,.06)!important;
  color:#fff!important;
  box-shadow:none!important;
  text-align:left!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help>span{
  display:grid!important;place-items:center!important;width:30px!important;height:30px!important;background:rgba(112,224,158,.13)!important;color:#9aebbb!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help>span svg{width:16px!important;height:16px!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help>div{display:block!important;min-width:0!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help strong{display:block!important;color:#fff!important;font-size:10px!important;line-height:1.2!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help small{display:block!important;margin-top:2px!important;color:#c7d6ce!important;font-size:8.5px!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help>svg{display:none!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-support-badge{position:absolute!important;top:4px!important;right:5px!important}

html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-logout{
  position:relative!important;
  inset:auto!important;
  display:grid!important;
  flex:0 0 auto!important;
  grid-template-columns:20px minmax(0,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  width:100%!important;
  min-height:54px!important;
  margin:0!important;
  padding:11px 16px!important;
  border:0!important;
  border-top:1px solid rgba(255,255,255,.10)!important;
  background:transparent!important;
  color:#efb8bc!important;
  font-size:10.5px!important;
  line-height:1.15!important;
  text-align:left!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-logout svg{width:18px!important;height:18px!important;color:inherit!important;stroke:currentColor!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-logout span{display:block!important;color:inherit!important;white-space:nowrap!important}

/* Tablet never exposes phone-only navigation controls. The ID selector is
   intentional: older <=930px rules also target #nsp-mob-menu with !important. */
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app #nsp-mob-menu,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-topbar #nsp-mob-menu,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-topbar .nsp-hdr-hamburger{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-mobile-nav{
  display:none!important;
  visibility:hidden!important;
  height:0!important;
  padding:0!important;
  pointer-events:none!important;
}

/* Tablet header: desktop information density with touch-size controls. */
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-topbar{width:100%!important;max-width:none!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-topbar-inner{
  display:grid!important;
  grid-template-columns:minmax(74px,auto) minmax(180px,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  min-height:64px!important;
  padding:9px 14px!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-hdr-left{display:flex!important;min-width:0!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-topbar .nsp-hdr-title{
  display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:.82rem!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-global-search{
  display:flex!important;position:relative!important;inset:auto!important;width:100%!important;min-width:0!important;height:42px!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-mobile-search-button{display:none!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-support-button{display:grid!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-topbar-actions{display:flex!important;position:static!important;gap:7px!important;min-width:0!important;margin:0!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-user-button{display:flex!important;padding:4px!important;min-width:44px!important;min-height:44px!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-user-button .nsp-user-name,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-user-button .nsp-user-chevron{display:none!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app :is(.nsw-icon-button,.nsp-user-button,.nsw-primary-button,.nsw-secondary-button){min-height:44px!important;touch-action:manipulation}

html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-main.nsw-main{
  width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:22px 18px 34px!important;overflow-x:hidden!important;
}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-page,
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-content{width:100%!important;max-width:100%!important;min-width:0!important}
html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-footer{width:100%!important;padding:16px 18px 18px!important}

/* Narrow portrait tablets still get a tablet sidebar, but content stacks. */
@media (max-width:719px){
  html.nsp-tablet-workspace body.nsp-private-workspace{--nsp59-tablet-sidebar:166px;--nsw-sidebar:166px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand-block{padding:15px 10px 13px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand{grid-template-columns:34px minmax(0,1fr)!important;gap:8px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand>span:first-child{width:34px!important;height:34px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-brand>span:last-child{font-size:11.5px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-side-hdr.nsw-student-compact{grid-template-columns:32px minmax(0,1fr)!important;padding:11px 10px!important;gap:7px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-small-avatar{width:32px!important;height:32px!important;min-width:32px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item{grid-template-columns:20px minmax(0,1fr)!important;gap:8px!important;min-height:44px!important;padding:8px!important;font-size:10.5px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help{margin-inline:7px!important;padding:8px!important;grid-template-columns:28px minmax(0,1fr)!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help>span{width:28px!important;height:28px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help small{display:none!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-topbar-inner{grid-template-columns:minmax(0,1fr) auto!important;padding-inline:11px!important;gap:8px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-hdr-left{display:none!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-main.nsw-main{padding:18px 14px 30px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app :is(.nsw-service-grid,.nsw-account-grid,.nsw-tool-grid,.nsw-study-overview-grid,.nsw-minimal-recent-grid,.nsw-profile-grid,.nsw-today-side,.nsw-profile-editor-layout){grid-template-columns:minmax(0,1fr)!important}
}

/* Mid/large tablets can use paired cards where the component supports them. */
@media (min-width:720px){
  html.nsp-tablet-workspace body.nsp-private-workspace{--nsp59-tablet-sidebar:190px;--nsw-sidebar:190px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app :is(.nsw-service-grid,.nsw-account-grid,.nsw-tool-grid,.nsw-study-overview-grid,.nsw-minimal-recent-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (min-width:980px){
  html.nsp-tablet-workspace body.nsp-private-workspace{--nsp59-tablet-sidebar:204px;--nsw-sidebar:204px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-topbar-inner{padding-inline:18px!important;gap:12px!important}
  html.nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsp-main.nsw-main{padding:24px 22px 36px!important}
}

/* Dark mode keeps the same tablet information architecture with explicit
   readable foregrounds. */
html[data-theme="dark"].nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar{
  background:linear-gradient(180deg,#07120d 0%,#091710 64%,#06100b 100%)!important;
  border-right-color:#30443a!important;
}
html[data-theme="dark"].nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-primary-nav .nsp-nav-item{color:#d7e3dc!important}
html[data-theme="dark"].nsp-tablet-workspace body.nsp-private-workspace #nsp-app#nsp-app .nsw-sidebar-help{background:#0f2419!important;border-color:#385244!important}
