/*
 * NexGen Global Premium UIX Foundation — rc220
 * Presentation-only foundation. Existing routes, forms, permissions and workflows remain authoritative.
 */
:root{
  --ng-font-xs:.875rem;
  --ng-font-sm:.9375rem;
  --ng-font-md:1rem;
  --ng-font-lg:1.125rem;
  --ng-font-xl:1.375rem;
  --ng-font-2xl:1.75rem;
  --ng-font-3xl:2.25rem;
  --ng-line-body:1.58;
  --ng-radius-sm:10px;
  --ng-radius-md:14px;
  --ng-radius-lg:20px;
  --ng-shadow-soft:0 10px 32px rgba(15,23,42,.08);
  --ng-shadow-lift:0 18px 48px rgba(15,23,42,.14);
  --ng-motion-fast:160ms;
  --ng-motion-base:240ms;
  --ng-motion-slow:420ms;
  --ng-focus:0 0 0 4px rgba(79,70,229,.18);
}

html{font-size:16px}
body{font-size:var(--ng-font-md);line-height:var(--ng-line-body);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
body.admin-site,body.portal-site,body.teacher-site,body.public-site,body.auth-site{font-size:16px}

/* Readability floor: secondary content may be smaller, but never microscopic. */
body.admin-site :where(p,li,td,th,label,input,select,textarea,button,a),
body.portal-site :where(p,li,td,th,label,input,select,textarea,button,a),
body.teacher-site :where(p,li,td,th,label,input,select,textarea,button,a),
body.auth-site :where(p,label,input,select,textarea,button,a),
body.public-site :where(p,li,label,input,select,textarea,button,a){font-size:max(.9375rem,1em)}

body :where(input,select,textarea,button){font-family:inherit}
body :where(input,select,textarea){min-height:46px;font-size:1rem;line-height:1.4}
body textarea{min-height:110px}
body :where(button,.btn,[class*="button"],[class*="-btn"]){min-height:42px}
body :where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:none;box-shadow:var(--ng-focus)!important}

/* Stronger page hierarchy without rewriting individual views. */
body :where(h1){font-size:clamp(1.8rem,2.4vw,2.45rem);line-height:1.12;letter-spacing:-.025em}
body :where(h2){font-size:clamp(1.45rem,1.9vw,1.9rem);line-height:1.2;letter-spacing:-.018em}
body :where(h3){font-size:clamp(1.15rem,1.5vw,1.4rem);line-height:1.3}
body :where(small,.muted,.text-muted,[class*="subtitle"],[class*="-meta"]){font-size:.875rem;line-height:1.5}

/* Admin / portal shell navigation: larger targets, calmer rhythm, clearer active state. */
body.admin-site .sidebar,
body.portal-site .sidebar,
body.teacher-site .sidebar{font-size:.9375rem}
.sidebar-brand strong{font-size:1rem!important;line-height:1.2}
.sidebar-brand small{font-size:.8125rem!important;line-height:1.35}
.sidebar :where(a,button){min-height:46px}
.sidebar :where(.admin-nav-body a,.student-nav-group-body a){padding-top:11px!important;padding-bottom:11px!important}
.sidebar :where(.admin-nav-body a,.student-nav-group-body a) > span:not(.nav-icon):not(.student-item-chevron){font-size:.9375rem!important;font-weight:650}
.admin-nav-toggle,.student-nav-group-toggle{padding-top:12px!important;padding-bottom:12px!important}
.admin-nav-toggle strong,.student-nav-group-toggle strong{font-size:.9375rem!important}
.admin-nav-toggle small,.student-nav-group-toggle small{font-size:.8125rem!important;line-height:1.35}
.sidebar a.active{box-shadow:0 8px 22px rgba(59,91,219,.2)}

/* Top bars and search controls need to remain legible at normal viewing distance. */
.topbar{min-height:64px}
.topbar input,[class*="topbar"] input{font-size:.9375rem!important}
.user-menu strong{font-size:.9375rem!important}
.user-menu small{font-size:.8125rem!important}

/* Common content surfaces become more premium without changing markup contracts. */
.content :where(.card,.panel,[class*="-card"],[class*="-panel"]){
  border-radius:max(var(--ng-radius-md),inherit);
}
.content table{font-size:.9375rem;line-height:1.45}
.content table th{font-size:.875rem;font-weight:750;letter-spacing:.01em}
.content table td,.content table th{padding-top:12px;padding-bottom:12px}
.content :where(.badge,[class*="-badge"],[class*="status"]){font-size:.8125rem;line-height:1.25}

/* Public website: readable copy and touch-friendly navigation. */
body.public-site{line-height:1.65}
body.public-site main p,
body.public-site section p{font-size:clamp(.975rem,.22vw + .93rem,1.075rem);line-height:1.68}
body.public-site nav a,
body.public-site header a{font-size:.9375rem}
body.public-site :where(.btn,[class*="-btn"]){font-size:.9375rem;min-height:44px}
body.public-site footer{font-size:.875rem}

/* Authentication foundation. Full visual refinement follows in its dedicated pass. */
body.auth-site input{font-size:1rem!important;min-height:50px}
body.auth-site label>span:first-child{font-size:.9375rem!important;font-weight:700}
body.auth-site .ps-auth-submit{font-size:1rem!important;min-height:52px}
body.auth-site .ps-auth-welcome p,
body.auth-site .ps-auth-context small,
body.auth-site .ps-auth-access small{font-size:.9375rem!important;line-height:1.55}

/* Progressive motion. JS only adds these classes to visible content; functionality never depends on them. */
.ng-uix-enter{opacity:0;transform:translateY(12px);transition:opacity var(--ng-motion-slow) ease,transform var(--ng-motion-slow) cubic-bezier(.2,.8,.2,1)}
.ng-uix-enter.ng-uix-visible{opacity:1;transform:none}
body:not(.ng-reduced-motion) :where(.card,[class*="-card"],.panel,[class*="-panel"],.sidebar a,button,.btn,[class*="-btn"]){
  transition-property:transform,box-shadow,border-color,background-color,color,opacity;
  transition-duration:var(--ng-motion-base);
  transition-timing-function:ease;
}
@media (hover:hover) and (pointer:fine){
  body:not(.ng-reduced-motion) .content :where(.card,[class*="-card"],.panel,[class*="-panel"]):hover{transform:translateY(-2px)}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
  .ng-uix-enter{opacity:1!important;transform:none!important}
}

/* Mobile: prioritize reading and touch targets rather than squeezing desktop density. */
@media (max-width:760px){
  html{font-size:16px}
  body{font-size:1rem}
  body :where(input,select,textarea){font-size:16px!important}
  .content{line-height:1.6}
  .content table{font-size:.9375rem}
  body :where(h1){font-size:1.85rem}
  body :where(h2){font-size:1.5rem}
  body.public-site main p,body.public-site section p{font-size:1rem;line-height:1.7}
  .sidebar :where(a,button){min-height:48px}
}
