/* ============================================================================
   OnLearn — Elevation layer (loaded AFTER app.css, app-wide via base.html).
   Refines the existing design system toward a cinematic, spacious, Kaya-inspired
   feel — fully-rounded pills, softer cards, larger tighter display headings,
   a richer ambient aura, and a shared scroll-reveal + count-up mechanism — while
   keeping OnLearn's violet→cyan identity and every existing component working.
   Additive only: no component is removed, only refined.
   ========================================================================== */

/* ----------------------------------------------------- buttons → pills */
.btn { border-radius: var(--r-pill); }
.btn--lg { border-radius: var(--r-pill); }
.btn--sm { border-radius: var(--r-pill); }
/* give the quiet button variants a touch of the primary's life */
.btn--ghost:hover, .btn--outline:hover { transform: translateY(-1px); }

/* --------------------------------------------------------- cards refined */
.card { border-radius: var(--r-xl); }
/* a faint top highlight gives raised surfaces a lit-from-above feel */
.card--raise { position: relative; }
.card--raise:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2), 0 0 0 1px rgba(124,58,237,.10), 0 24px 60px -24px rgba(124,58,237,.35); }

/* ----------------------------------------------- display headings (Kaya) */
/* Page titles read larger and tighter; the display font does more of the work. */
.h1, .page-head h1 { font-size: clamp(2rem, 3.6vw, var(--fs-4xl)); letter-spacing: -.03em; line-height: 1.05; }
.h2 { letter-spacing: -.025em; }
.eyebrow { color: var(--text-muted); }
/* opt-in gradient eyebrow for section heads that want the accent */
.eyebrow--grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* page headers get more breathing room */
.page-head { margin-bottom: var(--sp-10); }

/* ----------------------------------------------------- richer ambient aura */
.aura {
  background:
    radial-gradient(58vw 48vh at 10% -10%, rgba(124,58,237,.20), transparent 60%),
    radial-gradient(52vw 44vh at 100% -4%, rgba(6,182,212,.15), transparent 56%),
    radial-gradient(40vw 40vh at 50% 120%, rgba(124,58,237,.10), transparent 60%);
}

/* ---------------------------------------- shared scroll reveal + count-up */
/* Progressive enhancement: elements only hide when JS is present (.has-js,
   added synchronously by shell.js). Reduced-motion shows the final state. */
.has-js [data-reveal-scroll] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transition-delay: calc(var(--ri, 0) * 80ms);
}
.has-js [data-reveal-scroll].is-inview { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .has-js [data-reveal-scroll] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn--ghost:hover, .btn--outline:hover { transform: none; }
}

/* ===================================================================== AUTH */
/* Make the split-screen aside cinematic, matching the landing's stage feel. */
.auth-aside { background: linear-gradient(160deg, #0E1320 0%, var(--lp-stage, #080A0F) 100%); }
.auth-quote { font-size: clamp(1.5rem, 2.4vw, 2.25rem); line-height: 1.18; letter-spacing: -.02em; max-width: 18ch; }
.auth-points { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-8); }
.auth-points li { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-muted); font-size: var(--fs-sm); }
.auth-points i, .auth-points svg { width: 18px; height: 18px; color: var(--violet-300); flex-shrink: 0; }
.auth-box h1 { font-size: clamp(1.75rem, 2.6vw, var(--fs-3xl)); letter-spacing: -.03em; }
/* inputs pick up a slightly softer radius to sit well under the pill buttons */
.auth-box .field input, .auth-box .field select { border-radius: var(--r-md); }

/* ================================================================= APP SHELL */
/* The shell already carries the brand (gradient active-nav, pill search/streak);
   a light cohesion pass only — round topbar controls to the pill language. */
.icon-btn { border-radius: var(--r-md); }
.nav-item { border-radius: var(--r-md); }
.nav-item.is-active { font-weight: 600; }
/* avatar button reads as a circle, matching the pill family */
.avatar { border-radius: var(--r-pill); }

/* ============================================================================
   LEARNER WORKSPACE REFRESH
   A quiet, daylight study environment. Marketing and auth keep the expressive
   dark brand; the signed-in product prioritises reading, orientation and focus.
   ========================================================================== */
body.authenticated, .app {
  --bg: #f6f7f3;
  --bg-deep: #eef0eb;
  --surface: #ffffff;
  --surface-2: #f1f3ef;
  --surface-3: #e5e9e3;
  --border: #e1e5df;
  --border-strong: #cdd3cc;
  --overlay: rgba(20, 27, 25, .42);
  --text: #17211f;
  --text-muted: #60706b;
  --text-faint: #65756f;
  --violet: #6457d9;
  --violet-300: #5749ca;
  --cyan: #2aa896;
  --cyan-300: #178c7d;
  --accent: #6457d9;
  --accent-text: #5749ca;
  --grad: linear-gradient(135deg, #6c5ce7 0%, #5548c8 100%);
  --grad-text: linear-gradient(120deg, #5d50d2, #218e81);
  --grad-soft: linear-gradient(135deg, rgba(100,87,217,.10), rgba(42,168,150,.09));
  --success: #198a65;
  --warning: #b7791f;
  --danger: #c7445c;
  --info: #167c94;
  --ember: #e76f3c;
  --shadow-1: 0 1px 2px rgba(23,33,31,.06);
  --shadow-2: 0 16px 38px -24px rgba(23,33,31,.28);
  --shadow-3: 0 30px 70px -25px rgba(23,33,31,.34);
  --glow-violet: 0 12px 28px -16px rgba(100,87,217,.55);
  --glow-cyan: 0 12px 28px -16px rgba(42,168,150,.45);
  --ring: 0 0 0 3px rgba(100,87,217,.18);
  --sidebar-w: 248px;
  --chrome-bg: rgba(246,247,243,.86);
  --chrome-border: rgba(205,211,204,.75);
  --sidebar-bg: rgba(255,255,255,.88);
  --sidebar-shadow: 6px 0 30px rgba(23,33,31,.025);
  --nav-label: #65756f;
  --nav-text: #687772;
  --nav-hover: #f2f3ef;
  --nav-active-bg: #eeecfb;
  --nav-active-text: #5144c3;
  --search-bg: rgba(255,255,255,.8);
  --control-bg: #f4f5f2;
  --streak-bg: #fff8f0;
  --streak-border: #f3dfcc;
  --streak-text: #7d4a2f;
  --streak-icon-bg: #fff1e8;
  --streak-icon-text: #dd6535;
  --soft-violet: #eeecfb;
  --soft-violet-text: #5548c8;
  --bar-track: #e7e9e5;
  --heading: #18221f;
  --daily-bg: #e9f3df;
  --daily-border: #d8e8cb;
  --daily-icon: #3f6f3a;
  --daily-icon-bg: rgba(255,255,255,.7);
  --daily-eyebrow: #587252;
  --daily-heading: #264524;
  --daily-copy: #5a7456;
  --daily-link: #315f2d;
  --course-cover: linear-gradient(135deg, #e8e5fb, #f1f0fb);
  --course-cover-text: #5144c3;
  --course-cover-ds: linear-gradient(135deg, #dff2ec, #edf7f3);
  --course-cover-ds-text: #247d70;
  --course-glyph-bg: rgba(255,255,255,.72);
  --course-glyph-border: rgba(255,255,255,.55);
  --course-hero-bg: linear-gradient(135deg, #ffffff 55%, #f1effc);
  --course-hero-glyph-bg: #eeecfb;
  --course-hero-glyph-text: #5548c8;
  --heatmap-empty: #e5e8e3;
  color-scheme: light;
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] body.authenticated,
html[data-theme="dark"] .app {
  --bg: #101513;
  --bg-deep: #0c110f;
  --surface: #171e1b;
  --surface-2: #202824;
  --surface-3: #2a342f;
  --border: #29332e;
  --border-strong: #3b4942;
  --overlay: rgba(4, 8, 6, .7);
  --text: #edf3ef;
  --text-muted: #a5b2ab;
  --text-faint: #82928a;
  --violet: #8d80ee;
  --violet-300: #b7adff;
  --cyan: #43b9a8;
  --cyan-300: #77d6c8;
  --accent: #8d80ee;
  --accent-text: #b7adff;
  --grad: linear-gradient(135deg, #8173e8 0%, #6457d9 100%);
  --grad-text: linear-gradient(120deg, #b7adff, #77d6c8);
  --grad-soft: linear-gradient(135deg, rgba(141,128,238,.16), rgba(67,185,168,.12));
  --success: #59c79c;
  --warning: #e1ad55;
  --danger: #f07a91;
  --info: #65c4d5;
  --ember: #f18a5c;
  --shadow-1: 0 1px 2px rgba(0,0,0,.28);
  --shadow-2: 0 18px 42px -24px rgba(0,0,0,.7);
  --shadow-3: 0 30px 70px -25px rgba(0,0,0,.82);
  --glow-violet: 0 12px 28px -16px rgba(141,128,238,.65);
  --glow-cyan: 0 12px 28px -16px rgba(67,185,168,.55);
  --ring: 0 0 0 3px rgba(141,128,238,.26);
  --chrome-bg: rgba(16,21,19,.86);
  --chrome-border: rgba(59,73,66,.72);
  --sidebar-bg: rgba(23,30,27,.92);
  --sidebar-shadow: 8px 0 34px rgba(0,0,0,.14);
  --nav-label: #7b8b83;
  --nav-text: #9daba4;
  --nav-hover: #202824;
  --nav-active-bg: rgba(141,128,238,.15);
  --nav-active-text: #c0b7ff;
  --search-bg: rgba(23,30,27,.88);
  --control-bg: #202824;
  --streak-bg: rgba(241,138,92,.1);
  --streak-border: rgba(241,138,92,.22);
  --streak-text: #f2a27e;
  --streak-icon-bg: rgba(241,138,92,.13);
  --streak-icon-text: #f2a27e;
  --soft-violet: rgba(141,128,238,.15);
  --soft-violet-text: #c0b7ff;
  --bar-track: #2a342f;
  --heading: #f1f6f3;
  --daily-bg: #1b2a21;
  --daily-border: #2d4535;
  --daily-icon: #8ac48a;
  --daily-icon-bg: rgba(89,199,156,.1);
  --daily-eyebrow: #91aa91;
  --daily-heading: #dcebdc;
  --daily-copy: #a2b7a4;
  --daily-link: #a7d5a6;
  --course-cover: linear-gradient(135deg, #29263f, #222238);
  --course-cover-text: #bdb4ff;
  --course-cover-ds: linear-gradient(135deg, #1c3530, #1c2d29);
  --course-cover-ds-text: #7ed3c3;
  --course-glyph-bg: rgba(255,255,255,.07);
  --course-glyph-border: rgba(255,255,255,.08);
  --course-hero-bg: linear-gradient(135deg, #171e1b 55%, #25223b);
  --course-hero-glyph-bg: rgba(141,128,238,.16);
  --course-hero-glyph-text: #bdb4ff;
  --heatmap-empty: #29332e;
  color-scheme: dark;
}

.app .aura { display: none; }
.app .content { padding: 38px clamp(24px, 3vw, 52px) 72px; }
.app .content--narrow { max-width: 1200px; }
.app h1, .app h2, .app h3, .app h4, .app h5,
.wsx h1, .wsx h2, .wsx h3, .wsx h4, .wsx h5 { font-weight: 700; letter-spacing: -.025em; }

/* Navigation is a useful map, so it starts open and reads like part of the page. */
.app .sidebar {
  background: var(--sidebar-bg);
  border-right-color: var(--border);
  box-shadow: var(--sidebar-shadow);
}
.app .sidebar__brand { height: 72px; border-bottom: 0; padding-inline: 24px; }
.app .brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  box-shadow: none;
}
.app .brand-mark svg { width: 17px; height: 17px; }
.app .brand-word { color: var(--text); font-size: 1.2rem; letter-spacing: -.045em; }
.app .sidebar__nav { padding: 12px 14px 20px; gap: 3px; }
.app .nav-label { padding: 19px 12px 7px; color: var(--nav-label); font-size: 10px; font-weight: 700; }
.app .nav-item { min-height: 43px; padding: 10px 12px; border-radius: 11px; color: var(--nav-text); }
.app .nav-item:hover { background: var(--nav-hover); color: var(--text); }
.app .nav-item.is-active { background: var(--nav-active-bg); color: var(--nav-active-text); box-shadow: inset 0 0 0 1px rgba(100,87,217,.07); }
.app .nav-item.is-active::before { display: none; }
.app .nav-item.is-active svg { stroke-width: 2.25; }
.app .sidebar__foot { border-top-color: var(--border); padding: 12px 14px; }
.app .user-chip { padding: 9px 10px; }
.app .sidebar__collapse { color: var(--text-faint); }

.app .topbar {
  height: 72px; padding-inline: clamp(20px, 3vw, 44px);
  background: var(--chrome-bg);
  border-bottom-color: var(--chrome-border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.app .crumbs { font-size: 12px; }
.app .searchbox {
  width: min(330px, 30vw); min-width: 220px; padding: 9px 14px;
  background: var(--search-bg); border-color: var(--border);
  border-radius: 11px;
}
.app .searchbox kbd { background: var(--control-bg); border-color: var(--border); }
.app .streak { background: var(--streak-bg); border-color: var(--streak-border); color: var(--streak-text); }
.theme-toggle { flex: 0 0 auto; border: 1px solid var(--border); background: var(--search-bg); }
.theme-toggle__sun { display: none; }
html[data-theme="dark"] .theme-toggle__moon { display: none; }
html[data-theme="dark"] .theme-toggle__sun { display: block; }
.app .avatar { box-shadow: inset 0 0 0 1px rgba(255,255,255,.32); }
.app .menu__panel { box-shadow: var(--shadow-3); }

/* Softer component language: clear borders, restrained shadows, no glow haze. */
.app .card {
  border-color: var(--border); border-radius: 18px; box-shadow: var(--shadow-1);
}
.app .card--raise:hover {
  transform: translateY(-2px); border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
}
.app .card--glow::after { display: none; }
.app .btn { min-height: 40px; border-radius: 10px; }
.app .btn--primary { box-shadow: 0 8px 20px -12px rgba(85,72,200,.7); text-shadow: none; }
.app .btn--primary:hover { box-shadow: 0 12px 26px -14px rgba(85,72,200,.75); }
.app .btn--ghost { background: var(--surface); }
.app .badge { background: var(--control-bg); }
.app .badge--accent { background: var(--soft-violet); color: var(--soft-violet-text); }
.app .bar { height: 6px; background: var(--bar-track); }
.app .bar__fill { background: linear-gradient(90deg, #6c5ce7, #2aa896); }
.app .eyebrow { color: var(--text-faint); font-size: 10px; letter-spacing: .11em; }
.app .page-head { max-width: 780px; margin-bottom: 34px; }
.app .page-head h1 { color: var(--heading); font-size: clamp(2rem, 3.5vw, 3.3rem); }
.app .page-head .lead { color: var(--text-muted); max-width: 64ch; }
.app .section-head h2 { font-size: 1.35rem; color: var(--text); }
.app .page-head h1 + .lead { margin-top: 10px; }
.app .section-head > div > .eyebrow + h2 { margin-top: 4px; }
.app .section-head > div > .h2 { font-size: 1.35rem; }
.app .empty { border-color: var(--border); border-radius: 18px; background: var(--surface); }
.app .tile { min-height: 88px; align-items: center; }
.app .tile__icon { background: var(--soft-violet); border-color: transparent; color: var(--soft-violet-text); }
.app .segmented { background: var(--surface-2); border-color: var(--border); padding: 3px; }
.app .segmented button.is-on, .app .segmented label.is-on { background: var(--surface); box-shadow: var(--shadow-1); }
.app .input, .app input, .app select, .app textarea { accent-color: var(--accent); }
.app .col-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.app .col-2 > * { min-width: 0; }
.app select { max-width: 100%; }
.app a.q-row .q-row__title { display: block; max-width: 100%; }

/* Dashboard hierarchy: greeting -> one primary action -> supporting courses. */
.home-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  margin-bottom: 30px;
}
.home-head h1 {
  font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -.04em; margin: 5px 0 8px;
}
.home-head .lead { font-size: 1rem; }
.home-head__streak {
  display: flex; align-items: center; gap: 11px; min-width: 162px;
  padding: 11px 14px; background: var(--search-bg); border: 1px solid var(--border);
  border-radius: 14px;
}
.home-head__streak-icon {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px;
  color: var(--streak-icon-text); background: var(--streak-icon-bg);
}
.home-head__streak-icon svg { width: 18px; }
.home-head__streak span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.home-head__streak b { font-size: 13px; }
.home-head__streak small { color: var(--text-muted); font-size: 10px; margin-top: 3px; }

.today-grid {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, .82fr);
  gap: 18px; margin-bottom: 42px;
}
.focus-card {
  position: relative; overflow: hidden; min-height: 310px; padding: 26px 28px;
  display: flex; flex-direction: column; color: #fff;
  background: #1e2926; border-radius: 22px; box-shadow: 0 28px 54px -34px rgba(23,33,31,.65);
}
.focus-card__wash {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 87% 20%, rgba(108,92,231,.58), transparent 30%),
              radial-gradient(circle at 62% 115%, rgba(42,168,150,.34), transparent 45%);
}
.focus-card__top, .focus-card__body, .focus-card__foot { position: relative; z-index: 1; }
.focus-card__top { display: flex; justify-content: space-between; align-items: center; }
.focus-card__label {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.76);
}
.focus-card__label svg { width: 16px; }
.focus-card__pct { font: 600 12px var(--font-mono); color: rgba(255,255,255,.68); }
.focus-card__body { margin: auto 0 25px; max-width: 580px; }
.focus-card__body p { color: #a9ded5; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.focus-card__body h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.035em; max-width: 20ch; }
.focus-card__body span { display: block; color: rgba(255,255,255,.58); font-size: 12px; margin-top: 9px; }
.focus-card__foot { display: flex; align-items: center; gap: 22px; }
.focus-card__foot .bar { flex: 1; max-width: 280px; background: rgba(255,255,255,.14); }
.focus-card__foot .btn { margin-left: auto; background: #fff; color: #202b28; box-shadow: none; }
.focus-card__foot .btn:hover { background: #f5f4ff; box-shadow: none; }

.daily-card {
  padding: 24px; display: flex; flex-direction: column; align-items: flex-start;
  background: var(--daily-bg); border: 1px solid var(--daily-border); border-radius: 22px;
}
.daily-card__icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  color: var(--daily-icon); background: var(--daily-icon-bg); margin-bottom: auto;
}
.daily-card__icon svg { width: 21px; }
.daily-card .eyebrow { color: var(--daily-eyebrow); margin: 22px 0 5px; }
.daily-card h2 { font-size: 1.35rem; letter-spacing: -.025em; color: var(--daily-heading); }
.daily-card > p:not(.eyebrow) { font-size: 12px; line-height: 1.55; color: var(--daily-copy); margin: 9px 0 18px; }
.daily-card a { display: inline-flex; align-items: center; gap: 7px; color: var(--daily-link); font-size: 12px; font-weight: 700; }
.daily-card a svg { width: 14px; transition: transform .2s var(--ease); }
.daily-card a:hover svg { transform: translateX(3px); }

.home-section-head { margin-bottom: 17px; }
.app .card-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.app .course-card { gap: 14px; min-height: 330px; padding: 12px; }
.course-card__cover {
  height: 108px; padding: 17px; display: flex; align-items: flex-start; justify-content: space-between;
  border-radius: 13px; background: var(--course-cover); color: var(--course-cover-text);
}
.course-card__cover--ds { background: var(--course-cover-ds); color: var(--course-cover-ds-text); }
.course-card__cover > span { font: 700 10px var(--font-mono); letter-spacing: .14em; opacity: .7; }
.app .course-card .course-glyph {
  width: 42px; height: 42px; color: currentColor; background: var(--course-glyph-bg);
  border-color: var(--course-glyph-border); box-shadow: 0 8px 18px -14px currentColor;
}
.app .course-card__top { padding: 4px 8px 0; align-items: center; }
.course-card__kicker { font-size: 10px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .1em; }
.app .course-card > div:nth-child(3) { padding: 0 8px; }
.app .course-card__title { font-size: 1.14rem; letter-spacing: -.02em; margin-bottom: 6px; }
.app .course-card__desc { line-height: 1.55; }
.app .course-card__foot { margin: auto 8px 0; padding-top: 13px; }
.app .search-course-card { min-height: 292px; }
.app .search-course-card .course-card__foot { flex-direction: row; color: var(--text-muted); }
.app .search-course-card .course-card__foot svg { width: 16px; }

/* Course hub: a real header and scannable module list. */
.app .course-hero {
  position: relative; overflow: hidden; padding: 30px;
  background: var(--course-hero-bg);
}
.app .course-hero::after {
  content: ""; position: absolute; width: 230px; height: 230px; right: -75px; top: -105px;
  border: 38px solid rgba(100,87,217,.055); border-radius: 50%; pointer-events: none;
}
.app .course-hero > * { position: relative; z-index: 1; }
.app .course-hero__glyph { width: 58px; height: 58px; color: var(--course-hero-glyph-text); background: var(--course-hero-glyph-bg); border: 0; }
.app .module { border-radius: 14px; box-shadow: var(--shadow-1); }
.app .module__head { min-height: 68px; }
.app .module__no { border-radius: 10px; }
.app .ring::before { background: conic-gradient(from -90deg, #6c5ce7, #2aa896 calc(var(--p) * 1%), var(--surface-3) calc(var(--p) * 1%)); }
.app .heatmap__cell { background: var(--heatmap-empty); }

/* ================================================================= CONTENT */
/* Dense operational pages use a quieter hierarchy: titles lead, state follows,
   and supporting metadata reads as one calm line instead of a row of widgets. */
.page-summary {
  color: var(--text-muted); font-size: .78rem; font-weight: 500;
  letter-spacing: -.005em;
}

/* Assignments */
.assignment-section-head { align-items: center; margin: 0 0 14px; }
.assignment-section-head__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.assignment-section-head__icon {
  width: 36px; height: 36px; display: grid; place-items: center; flex: none;
  color: var(--soft-violet-text); background: var(--soft-violet); border-radius: 10px;
}
.assignment-section-head__icon svg { width: 17px; height: 17px; }
.assignment-section-head .eyebrow { margin-bottom: 2px; font-size: 9px; }
.app .assignment-section-head h2 { font-size: 1.15rem; letter-spacing: -.02em; }
.assignment-section-head__count {
  min-width: 28px; height: 28px; padding: 0 9px; display: grid; place-items: center;
  color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; font-size: .75rem; font-weight: 700;
}
.assignment-card {
  padding: 19px 21px; margin-bottom: 11px; border-radius: 15px !important;
  box-shadow: none !important;
}
.assignment-card__layout {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px;
}
.assignment-card__content { min-width: 0; }
.assignment-card__head { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; }
.assignment-card__title { font-size: .98rem; line-height: 1.35; color: var(--text); }
.assignment-card__head .badge { padding: 2px 8px; font-size: .67rem; }
.assignment-card__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px 18px;
  margin-top: 9px; color: var(--text-muted); font-size: .78rem; line-height: 1.4;
}
.assignment-card__meta > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.assignment-card__meta svg { width: 15px; height: 15px; flex: none; color: var(--text-faint); }
.assignment-card__desc {
  max-width: 70ch; margin-top: 10px; color: var(--text-muted);
  font-size: .8rem; line-height: 1.55;
}
.assignment-card__action { display: flex; align-items: center; justify-content: flex-end; flex: none; }
.assignment-card__action .btn { min-height: 38px; box-shadow: none; }
.assignment-card__action .btn--primary { background: var(--violet); }
.assignment-card--empty { padding: 18px 21px; font-size: .82rem; }

/* Live sessions */
.learning-section-head { align-items: flex-end; margin-bottom: 16px; }
.learning-section-head .eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.learning-section-head .eyebrow svg { width: 13px; height: 13px; }
.app .learning-section-head h2 { font-size: 1.3rem; }
.app .session-card {
  gap: 18px; padding: 20px; min-height: 236px; border-radius: 17px;
  box-shadow: none;
}
.app .session-card__date {
  width: 58px; padding: 12px 0; background: var(--surface-2);
  border-color: var(--border); border-radius: 12px;
}
.app .session-card__dow { font-size: 9px; color: var(--text-faint); }
.app .session-card__day { font-size: 1.8rem; letter-spacing: -.04em; }
.app .session-card__mon { font-family: var(--font-body); font-size: .7rem; font-weight: 600; }
.app .session-card__body { gap: 11px; }
.app .session-card__body .badge { padding: 3px 8px; font-size: .67rem; }
.app .session-card__title { font-size: 1rem; line-height: 1.35; letter-spacing: -.015em; }
.app .session-card__meta {
  display: flex; align-items: flex-start; gap: 6px; margin: 0;
  color: var(--text-muted); font-family: var(--font-body); font-size: .76rem;
  font-weight: 500; line-height: 1.5; letter-spacing: 0;
}
.app .session-card__foot { margin-top: auto; padding-top: 13px; }
.app .session-card__host { font-size: .78rem; }
.session-card__pending {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px;
  color: var(--text-muted); background: var(--surface-2); border-radius: 9px;
  font-size: .72rem; font-weight: 600;
}
.session-card__pending svg { width: 14px; height: 14px; }
.app .session-card__foot .btn { min-height: 36px; box-shadow: none; }

/* Blog index */
.blog-filters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 30px;
}
.app .blog-filters .pill {
  padding: 6px 12px; color: var(--text-muted); background: var(--surface-2);
  border-color: transparent; font-size: .74rem; font-weight: 600;
}
.app .blog-filters .pill:hover { color: var(--text); background: var(--surface-3); }
.app .blog-filters .pill--on {
  color: var(--soft-violet-text); background: var(--soft-violet);
  border-color: color-mix(in srgb, var(--violet) 28%, transparent);
}
.app .blog-hero {
  grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: stretch;
  padding: 20px; margin-bottom: 22px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, var(--soft-violet));
  box-shadow: none;
}
.app .blog-hero__art { min-height: 190px; border: 0; border-radius: 14px; }
.app .blog-hero__body { justify-content: center; gap: 11px; padding: 4px 12px 4px 0; }
.app .blog-hero__label { color: var(--soft-violet-text); }
.app .blog-hero__title {
  max-width: 28ch; font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.18; letter-spacing: -.035em;
}
.app .blog-hero .blog-card__excerpt { max-width: 68ch; line-height: 1.6; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app .blog-grid .blog-card {
  min-height: 250px; padding: 23px; gap: 13px; border-radius: 16px;
  box-shadow: none;
}
.app .blog-grid .blog-card__title { font-size: 1.03rem; line-height: 1.38; letter-spacing: -.018em; }
.app .blog-grid .blog-card__excerpt { line-height: 1.62; }
.app .blog-card__meta { padding-top: 13px; border-top: 1px solid var(--border); }
.app .blog-card__meta .avatar { width: 27px; height: 27px; font-size: .7rem; }
.app .blog-card__meta svg { width: 14px; height: 14px; }

/* =============================================================== FACULTY UI */
/* Faculty pages are operational rather than promotional: tighter display type,
   stable data rows, quiet status colour, and predictable action placement. */
.faculty .faculty-content { padding-top: 34px; }
.faculty .content--narrow { max-width: 1160px; }
.faculty .faculty-topbar .crumbs { font-size: .78rem; font-weight: 650; }
.faculty .faculty-topbar .crumbs__here { color: var(--text); }
.faculty .sidebar__brand .brand-word span { color: var(--text-muted); opacity: 1 !important; }
.faculty .sidebar__nav { padding-bottom: 26px; }
.faculty .nav-label { margin-top: 3px; }

.faculty .page-head {
  max-width: none; margin-bottom: 28px; padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}
.faculty .page-head h1 {
  max-width: 22ch; color: var(--heading);
  font-size: clamp(1.85rem, 3vw, 2.6rem); line-height: 1.08; letter-spacing: -.035em;
}
.faculty .page-head .lead {
  max-width: 72ch; margin-top: 10px; color: var(--text-muted);
  font-size: .92rem; line-height: 1.62;
}
.faculty .page-head .eyebrow { margin-bottom: 8px; }
.faculty .page-head .eyebrow a:hover { color: var(--accent-text) !important; }
.faculty .section-head { align-items: flex-end; margin: 30px 0 13px; }
.faculty .section-head h2, .faculty .faculty-section-head h2 {
  font-size: 1.18rem; line-height: 1.25; letter-spacing: -.02em;
}
.faculty .faculty-section-head .eyebrow { margin-bottom: 4px; }

.faculty .faculty-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  margin-bottom: 38px;
}
.faculty .faculty-stats .tile {
  position: relative; min-height: 102px; padding: 20px;
  border-radius: 15px; box-shadow: none; overflow: hidden;
}
.faculty .faculty-stats .tile::after {
  content: ""; position: absolute; inset: auto 0 0; height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan)); opacity: .55;
}
.faculty .tile__num {
  color: var(--heading); font-family: var(--font-body); font-size: 1.7rem;
  font-weight: 750; letter-spacing: -.035em;
}
.faculty .tile__lbl {
  color: var(--text-muted); font-family: var(--font-body); font-size: .72rem;
  font-weight: 650; letter-spacing: .015em; text-transform: none;
}

.faculty .card-grid { gap: 15px; }
.faculty .faculty-tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.faculty .faculty-tool-grid > .card,
.faculty .card-grid > .card:not(.course-card) {
  min-height: 210px; padding: 22px; display: flex; flex-direction: column;
  border-radius: 16px; box-shadow: none;
}
.faculty .faculty-tool-grid h3,
.faculty .card-grid > .card:not(.course-card) h3 {
  color: var(--heading); font-size: 1.02rem !important; letter-spacing: -.018em;
}
.faculty .faculty-tool-grid p,
.faculty .card-grid > .card:not(.course-card) p { line-height: 1.58; }
.faculty .faculty-tool-grid .btn,
.faculty .card-grid > .card:not(.course-card) .btn {
  width: fit-content; min-height: auto; margin-top: auto !important; padding: 12px 0 0;
  color: var(--accent-text); background: transparent; border: 0;
}
.faculty .faculty-course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.faculty .faculty-course-grid .course-card {
  min-height: 250px; padding: 22px; gap: 12px; border-radius: 16px; box-shadow: none;
}
.faculty .faculty-course-grid .course-card__top { padding: 0; }
.faculty .faculty-course-grid .course-card__title { margin-top: 2px; font-size: 1.12rem; }
.faculty .faculty-course-grid .course-card__desc { font-size: .82rem; line-height: 1.58; }
.faculty .faculty-course-grid .course-card__foot { margin: auto 0 0; }

.faculty .card { box-shadow: none; }
.faculty .faculty-row {
  min-width: 0; padding: 17px 19px; border-radius: 14px;
  background: var(--surface); box-shadow: none;
}
.faculty .faculty-row + .faculty-row { margin-top: 9px; }
.faculty .faculty-row h3,
.faculty .faculty-row strong,
.faculty .faculty-row > div:first-child > div:first-child {
  color: var(--heading); letter-spacing: -.012em;
}
.faculty .faculty-row p { line-height: 1.55; }
.faculty .faculty-row .cluster { flex-wrap: wrap; }
.faculty .faculty-row > .cluster:last-child { justify-content: flex-end; }
.faculty .faculty-row .course-glyph {
  color: var(--soft-violet-text); background: var(--soft-violet); border: 0; box-shadow: none;
}
.faculty .faculty-module {
  gap: 14px; padding: 20px; border-radius: 16px; background: var(--surface);
}
.faculty .faculty-module > .spread:first-child { padding-bottom: 4px; }
.faculty .faculty-topic-row { background: var(--surface-2); border-color: transparent; }
.faculty .faculty-module > form:last-of-type { padding-top: 4px; }

.faculty form.card,
.faculty .content--narrow > .card.stack:not(.faculty-module) {
  gap: 18px; padding: 25px; border-radius: 16px;
}
.faculty .field { gap: 7px; }
.faculty .field label,
.faculty label.check { color: var(--text); font-size: .78rem; font-weight: 650; }
.faculty .field small { color: var(--text-muted); line-height: 1.5; }
.faculty .input,
.faculty input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.faculty select,
.faculty textarea {
  min-height: 43px; border-radius: 10px; background: var(--surface-2);
  border-color: var(--border); font-family: var(--font-body); font-size: .84rem;
}
.faculty textarea { min-height: 88px; line-height: 1.55; }
.faculty .input:focus,
.faculty input:focus,
.faculty select:focus,
.faculty textarea:focus { background: var(--surface); border-color: var(--violet); box-shadow: var(--ring); }
.faculty details {
  background: var(--surface-2); border-color: var(--border) !important;
  border-radius: 12px !important;
}
.faculty .btn { font-family: var(--font-body); font-size: .78rem; font-weight: 650; box-shadow: none; }
.faculty .btn--sm { min-height: 36px; padding-inline: 12px; }
.faculty .btn--subtle { color: var(--text-muted); }
.faculty .badge {
  font-family: var(--font-body); font-size: .66rem; font-weight: 650;
  letter-spacing: .01em; text-transform: none;
}

.faculty .table {
  width: 100%; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); border-collapse: separate; border-spacing: 0;
  border-radius: 14px; font-family: var(--font-body); font-size: .8rem;
}
.faculty .table th {
  padding: 13px 15px; color: var(--text-muted); background: var(--surface-2);
  font-size: .68rem; font-weight: 700; letter-spacing: .055em;
}
.faculty .table td { padding: 14px 15px; }
.faculty .table tbody tr:last-child td { border-bottom: 0; }
.faculty .table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 72%, transparent); }
.faculty .table .mono { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.faculty .bar { min-width: 80px; }
.faculty .empty { min-height: 190px; padding: 34px; }

/* Full-screen learning flows still share the same chrome and theme controls. */
.onb { position: relative; width: 100%; }
.onb__theme { position: fixed; top: 18px; right: 22px; z-index: 10; }
.onb__head .brand-mark svg { width: 17px; height: 17px; }
.wsx .theme-toggle { width: 36px; height: 36px; border-radius: 10px; }
.wsx .theme-toggle svg { width: 17px; height: 17px; }

@media (max-width: 1000px) {
  .today-grid { grid-template-columns: 1fr; }
  .daily-card { min-height: 210px; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faculty .faculty-tool-grid,
  .faculty .faculty-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faculty .faculty-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  /* The fixed drawer leaves normal grid flow on mobile, so place main content
     explicitly in the full-width second track. */
  .app .app__main { grid-column: 2; grid-row: 1; }
  .app .content { padding: 24px 18px 56px; }
  .app .sidebar { background: var(--surface); }
  .app .topbar { height: 64px; padding-inline: 14px; }
  .faculty .faculty-topbar__collapse { display: none; }
  .faculty .faculty-content { padding-top: 24px; }
  .home-head { align-items: flex-start; }
  .home-head__streak { min-width: auto; }
  .app .col-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .home-head { display: block; }
  .home-head h1 { font-size: 2rem; }
  .home-head__streak { width: fit-content; margin-top: 18px; }
  .focus-card { min-height: 330px; padding: 22px; }
  .focus-card__foot { align-items: stretch; flex-direction: column; gap: 16px; }
  .focus-card__foot .bar { width: 100%; max-width: none; }
  .focus-card__foot .btn { width: 100%; margin: 0; }
  .app .card-grid { grid-template-columns: 1fr; }
  .app .course-hero { padding: 22px; }
  .app .course-hero .spread { display: block; }
  .app .course-hero .spread > div:last-child { margin-top: 20px; }
  .app .module__meta .bar { display: none; }
  .page-summary { width: 100%; }
  .assignment-card { padding: 17px; }
  .assignment-card__layout { display: block; }
  .assignment-card__action { justify-content: flex-start; margin-top: 15px; }
  .assignment-card__meta { display: grid; grid-template-columns: 1fr; gap: 7px; }
  .assignment-section-head .eyebrow { display: none; }
  .app .session-card { min-height: 0; padding: 17px; gap: 14px; }
  .app .session-card__date { width: 52px; }
  .blog-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .blog-filters::-webkit-scrollbar { display: none; }
  .blog-grid { grid-template-columns: 1fr; }
  .app .blog-hero { grid-template-columns: 1fr; padding: 14px; gap: 18px; }
  .app .blog-hero__art { min-height: 130px; }
  .app .blog-hero__body { padding: 0 5px 7px; }
  .faculty .page-head { margin-bottom: 23px; padding-bottom: 20px; }
  .faculty .page-head h1 { max-width: none; font-size: 1.85rem; }
  .faculty .page-head .lead { font-size: .85rem; }
  .faculty .page-head .spread { align-items: stretch !important; flex-direction: column; }
  .faculty .page-head .spread > .btn { width: fit-content; }
  .faculty .faculty-tool-grid,
  .faculty .faculty-course-grid { grid-template-columns: 1fr; }
  .faculty .faculty-stats { gap: 10px; }
  .faculty .faculty-stats .tile { min-height: 88px; padding: 15px; }
  .faculty .faculty-stats .tile__icon { width: 36px; height: 36px; }
  .faculty .faculty-stats .tile__num { font-size: 1.4rem; }
  .faculty .faculty-tool-grid > .card,
  .faculty .card-grid > .card:not(.course-card) { min-height: 185px; }
  .faculty .faculty-row { display: block; padding: 16px; }
  .faculty .faculty-row > .cluster:last-child { justify-content: flex-start; margin-top: 14px; }
  .faculty .faculty-row > .btn:last-child { margin-top: 14px; }
  .faculty .faculty-row .btn { min-height: 35px; }
  .faculty .faculty-module { padding: 16px; }
  .faculty .faculty-module > .spread:first-child { align-items: flex-start !important; flex-direction: column; }
  .faculty .faculty-module > .spread:first-child > .cluster:last-child { justify-content: flex-start; }
  .faculty .grid { grid-template-columns: minmax(0, 1fr) !important; }
  .faculty form.card,
  .faculty .content--narrow > .card.stack:not(.faculty-module) { padding: 18px; }
  .faculty .table { display: block; overflow-x: auto; white-space: nowrap; }
  .faculty .section-head { align-items: center; }
}
