/* ============================================================================
   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; }

/* Course hub: full-width course context, then module-scoped learning. */
.app.is-full { grid-template-columns: 1fr; }
.app.is-full .sidebar,
.app.is-full .topbar__hamburger,
.app.is-full .scrim { display: none; }
.hub-tabs { display: flex; align-items: baseline; gap: var(--sp-5); }
.course-view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); margin-bottom: var(--sp-2); }
.course-view-note { min-height: 20px; margin-bottom: var(--sp-5); text-align: right; }
.hub-tab { position: relative; padding-bottom: 7px; color: var(--text-faint); font: 700 var(--fs-xl)/1.2 var(--font-display); }
.hub-tab:hover { color: var(--text-muted); }
.hub-tab.is-active { color: var(--text); }
.hub-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.hub-tab--revision { display: inline-flex; align-items: center; gap: var(--sp-2); }
.hub-tab--revision svg { width: 18px; height: 18px; }
.topic-ov__title { display: flex; min-width: 0; flex-direction: column; }
.topic-ov__title small { color: var(--text-faint); font: 500 9px/1.2 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; }
.revision-stack { display: flex; flex-direction: column; gap: var(--sp-5); }
.revision-module { padding: 0; overflow: hidden; }
.revision-module__head { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); }
.revision-module__head > span:nth-child(2) { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.revision-module__head small { color: var(--text-faint); font: 500 9px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.revision-module__head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revision-module__head > svg { width: 17px; height: 17px; color: var(--text-faint); }
.revision-visual { display: block; margin: var(--sp-5); overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; }
.revision-visual img { display: block; width: 100%; height: auto; object-fit: contain; }
.revision-visual:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.rev-visual { display: flex; min-height: 220px; align-items: center; justify-content: center; gap: var(--sp-3); margin: var(--sp-5); border: 1px dashed var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); color: var(--text-faint); font: 500 var(--fs-xs)/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.rev-visual svg { width: 22px; height: 22px; }
.module-product .module__body { margin-top: var(--sp-3); }
.module-product.is-done .module__no { background: var(--accent); color: var(--on-accent, #fff); border-color: transparent; }
.module__go { width: 17px; height: 17px; color: var(--text-faint); opacity: 0; margin-left: auto; }
.module__enter:hover .module__go { opacity: 1; }
.module__toggle svg { transition: transform var(--dur-2) var(--ease); }
.module__toggle.is-open svg { transform: rotate(90deg); }
.flow { --dot: 44px; --flow-gap: 50px; display: flex; flex-direction: column; gap: var(--flow-gap); padding: var(--sp-4) 0; }
.flow__row { position: relative; display: flex; justify-content: space-between; padding: 0 var(--sp-6); }
.flow__row:nth-child(even) { flex-direction: row-reverse; }
.flow__row::before { content: ""; position: absolute; top: calc(var(--dot) / 2 - 1px); left: var(--sp-6); right: var(--sp-6); height: 2px; background: var(--border-strong); }
.flow__row:not(:last-child)::after { content: ""; position: absolute; top: calc(var(--dot) / 2 - 1px); bottom: calc(-1 * var(--flow-gap) - var(--dot) / 2 + 1px); width: 28px; border: 2px solid var(--border-strong); }
.flow__row:nth-child(odd):not(:last-child)::after { right: 0; border-left: 0; border-radius: 0 24px 24px 0; }
.flow__row:nth-child(even):not(:last-child)::after { left: 0; border-right: 0; border-radius: 24px 0 0 24px; }
.flow__node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; width: clamp(100px, 22%, 170px); text-align: center; }
.flow__dot { display: grid; place-items: center; width: var(--dot); height: var(--dot); margin-bottom: var(--sp-2); border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface-2); box-shadow: 0 0 0 5px var(--bg); font: 700 var(--fs-sm)/1 var(--font-mono); }
.flow__node.is-done .flow__dot { background: var(--accent); border-color: transparent; color: var(--on-accent, #fff); }
.flow__node.is-current .flow__dot, .flow__node.is-open .flow__dot { border-color: var(--accent); }
.flow__wk { color: var(--text-faint); font: 500 10px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.flow__focus { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: var(--fs-sm); }
.flow__count { color: var(--text-muted); font-size: var(--fs-xs); }
.flow__panel { margin-top: var(--sp-6); }
@media (max-width: 720px) { .course-view-head { align-items: flex-start; } .hub-tab, .hub-tab--revision { font-size: var(--fs-base); } .flow__row { padding-inline: var(--sp-3); } .flow__row::before { left: var(--sp-3); right: var(--sp-3); } .flow__node { width: 24%; } .flow__focus { font-size: var(--fs-xs); } }
.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);
}
/* one chrome height for the whole shell: the sidebar head and the topbar keep
   their divider lines on the same y — symmetric, never up-down */
.app { --topbar-h: 72px; }
.app .sidebar__head { padding-inline: 24px; }
.app .brand-mark {
  width: 40px; height: 24px; border-radius: 0;
  box-shadow: none;
}
.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 .topbar {
  height: var(--topbar-h); 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 {
  background: linear-gradient(145deg, #7668e8 0%, #5548c8 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32), 0 2px 7px rgba(43,35,92,.12);
}
.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 -> compact schedule rail -> resume/explore. */
.home-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  margin-bottom: 22px;
}
.home-head h1 {
  font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -.04em; margin: 5px 0 0;
}
.home-head .lead { font-size: 1rem; }
.home-resume { margin-bottom: 42px; }
.home-primary { position: relative; overflow: hidden; min-height: 210px; padding: 23px 25px; display: flex; flex-direction: column; color: #fff; background: #1e2926; border-radius: 20px; box-shadow: 0 28px 54px -34px rgba(23,33,31,.65); }
.home-primary__glow { 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%); }
.home-primary__top, .home-primary__body, .home-primary > .btn { position: relative; z-index: 1; }
.home-primary__top { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.home-primary__label, .home-primary__kind { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.76); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.home-primary__label svg { width: 16px; }
.home-primary__kind { color: #a9ded5; font-size: 10px; letter-spacing: .04em; }
.home-primary__body { margin: auto 0 18px; max-width: 34ch; }
.home-primary__body p { color: #a9ded5; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.home-primary__body h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.home-primary > .btn { align-self: flex-start; background: #fff; color: #202b28; box-shadow: none; }
.home-primary > .btn:hover { background: #f5f4ff; box-shadow: none; }
.home-timeline { margin-bottom: 30px; }
.home-timeline__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border-strong); }
.home-timeline__head h2 { max-width: 34ch; color: var(--heading); font-size: var(--fs-xl); line-height: 1.3; letter-spacing: -.025em; }
.home-timeline__nav { display: flex; gap: var(--sp-2); }
.home-timeline__nav .icon-btn { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); box-shadow: none; }
.home-timeline__filters { display: flex; align-items: center; gap: var(--sp-5); margin: var(--sp-3) 0; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.home-timeline__filters::-webkit-scrollbar { display: none; }
.home-timeline__filters button { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); flex: none; min-height: 38px; padding: 0; border: 0; color: var(--text-muted); background: transparent; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.home-timeline__filters button::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.home-timeline__filters button span { color: var(--text-faint); font: 600 10px var(--font-mono); }
.home-timeline__filters button:hover { color: var(--heading); }
.home-timeline__filters button.is-active { color: var(--heading); font-weight: 750; }
.home-timeline__filters button.is-active::after { background: var(--accent); }
.home-timeline__rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 1fr); overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory; scrollbar-color: var(--border-strong) transparent; }
.home-timeline__item { display: grid; grid-template-columns: 66px minmax(0, 1fr) 18px; gap: var(--sp-4); align-items: center; min-height: 118px; padding: var(--sp-4); border-right: 1px solid var(--border); color: inherit; scroll-snap-align: start; }
.home-timeline__item:last-of-type { border-right: 0; }
.home-timeline__item:hover { background: color-mix(in srgb, var(--surface-2) 52%, transparent); }
.home-timeline__when { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); padding-right: var(--sp-4); border-right: 1px solid var(--border); font-style: normal; }
.home-timeline__when strong { color: var(--heading); font-size: var(--fs-sm); font-weight: 700; }
.home-timeline__when span { color: var(--text-faint); font-size: var(--fs-xs); font-weight: 600; }
.home-timeline__main { display: block; min-width: 0; }
.home-timeline__status { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-1); color: var(--text-faint); font-size: var(--fs-xs); line-height: 1.4; }
.home-timeline__state { display: inline-flex; align-items: center; min-height: 24px; padding: 2px var(--sp-2); border: 1px solid var(--border-strong); border-radius: var(--r-xs); background: var(--surface-2); color: var(--heading); font-weight: 750; }
.home-timeline__item.is-overdue .home-timeline__state { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.home-timeline__item.is-urgent .home-timeline__state { color: var(--accent-text); }
.home-timeline__title { display: -webkit-box; margin-top: var(--sp-2); overflow: hidden; color: var(--heading); font-size: var(--fs-md); font-weight: 650; letter-spacing: -.018em; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-timeline__summary { display: block; margin-top: var(--sp-1); overflow: hidden; color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.home-timeline__chevron { width: 16px; height: 16px; color: var(--text-faint); }
.home-timeline__item:hover .home-timeline__chevron { color: var(--accent-text); }
.home-timeline__empty { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: var(--sp-4); width: 100%; padding: var(--sp-6); color: var(--text-muted); font-size: var(--fs-sm); }
.home-timeline__empty > svg { width: 20px; height: 20px; flex: none; color: var(--text-faint); }
.home-timeline__empty h3 { color: var(--heading); font-size: var(--fs-md); }
.home-timeline__empty p { margin-top: var(--sp-1); line-height: 1.55; }
.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: 18px 20px; 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; }

/* ============================================================= COMMUNITY */
/* Discussion-first rather than dashboard-like: one warm invitation, a quiet
   composer, readable feed rows, and a compact social-context rail. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.community-page { max-width: 1180px !important; }
.community-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .8fr);
  min-height: 315px; margin-bottom: 28px; padding: 42px 46px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 24px;
  background:
    radial-gradient(circle at 82% 20%, color-mix(in srgb, var(--cyan) 15%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, var(--soft-violet)), var(--surface));
}
.community-hero::after {
  content: ""; position: absolute; width: 280px; height: 280px; right: -90px; bottom: -170px;
  border: 52px solid color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 50%; pointer-events: none;
}
.community-hero__copy { position: relative; z-index: 1; align-self: center; }
.community-hero__copy h1 {
  max-width: 16ch; margin-top: 11px; color: var(--heading);
  font-size: clamp(2rem, 3.5vw, 3.25rem); line-height: 1.05; letter-spacing: -.052em;
}
.community-hero__copy .lead { max-width: 57ch; margin-top: 17px; font-size: .96rem; line-height: 1.65; }
.community-hero__actions { display: flex; align-items: center; gap: 18px; margin-top: 27px; }
.community-hero__count { color: var(--text-muted); font-size: .76rem; }
.community-hero__count strong { color: var(--heading); font-size: .9rem; }
.community-hero__scene { position: relative; min-height: 220px; z-index: 1; }
.community-hero__bubble {
  position: absolute; display: flex; align-items: center; gap: 12px; width: 210px; padding: 15px 17px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 72%, transparent); border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: var(--shadow-2);
  backdrop-filter: blur(12px);
}
.community-hero__bubble--question { top: 9px; left: 4px; transform: rotate(-2deg); }
.community-hero__bubble--feedback { right: -2px; bottom: 26px; transform: rotate(2deg); }
.community-hero__bubble-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 12px; color: var(--soft-violet-text); background: var(--soft-violet);
}
.community-hero__bubble--feedback .community-hero__bubble-icon { color: var(--cyan-300); background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.community-hero__bubble-icon svg { width: 18px; height: 18px; }
.community-hero__bubble strong, .community-hero__bubble small { display: block; }
.community-hero__bubble strong { color: var(--heading); font-size: .79rem; }
.community-hero__bubble small { margin-top: 2px; color: var(--text-muted); font-size: .68rem; }
.community-hero__people { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; transform: translate(-45%, -38%); }
.community-hero__people .avatar { width: 43px; height: 43px; margin-left: -9px; border: 3px solid var(--surface); box-shadow: var(--shadow-1); }
.community-hero__pulse {
  display: grid; place-items: center; width: 54px; height: 54px; margin-left: 7px;
  border-radius: 50%; color: #fff; background: var(--grad); box-shadow: var(--glow-violet);
}
.community-hero__pulse svg { width: 22px; height: 22px; }

.community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.community-main { min-width: 0; }
.community-composer {
  margin-bottom: 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 17px;
  background: var(--surface); transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.community-composer.is-open { border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); box-shadow: var(--shadow-2); }
.community-composer__prompt { display: flex; align-items: center; gap: 12px; padding: 13px 15px; }
.community-composer__prompt .avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: .75rem; }
.community-composer__trigger {
  min-width: 0; flex: 1; padding: 10px 14px; overflow: hidden; border: 0; border-radius: 999px;
  color: var(--text-muted); background: var(--surface-2); text-align: left; text-overflow: ellipsis; white-space: nowrap;
}
.community-composer__trigger:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 72%, var(--soft-violet)); }
.community-composer__form { display: grid; gap: 17px; padding: 4px 20px 22px; border-top: 1px solid var(--border); }
.community-composer__form > :first-child { margin-top: 20px; }
.community-field { display: grid; gap: 7px; min-width: 0; }
.community-field .eyebrow { font-size: .62rem; }
.community-field .input { background: var(--surface-2); }
.community-field textarea { min-height: 105px; resize: vertical; }
.community-field .segmented { width: fit-content; background: var(--surface-2); }
.community-field .segmented label { cursor: pointer; }
.community-field .segmented input { position: absolute; opacity: 0; pointer-events: none; }
.community-composer__extras { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.community-composer__actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.community-composer__actions > span { max-width: 46ch; font-size: .72rem; }

.community-filters {
  display: flex; align-items: center; gap: 8px; margin-bottom: 29px; padding: 9px;
  overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  scrollbar-width: none;
}
.community-filters::-webkit-scrollbar { display: none; }
.community-filters__label { display: flex; align-items: center; gap: 7px; padding: 0 9px; color: var(--text-muted); font-size: .72rem; font-weight: 700; }
.community-filters__label svg { width: 15px; height: 15px; }
.community-filters label { flex: 0 0 auto; }
.community-filters .input { width: auto; min-height: 34px; padding: 6px 31px 6px 10px; border: 0; border-radius: 9px; background-color: var(--surface-2); font-size: .72rem; }
.community-filters__clear { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; margin-left: auto; padding: 7px 9px; color: var(--text-muted); font-size: .7rem; font-weight: 650; }
.community-filters__clear:hover { color: var(--danger); }
.community-filters__clear svg { width: 13px; height: 13px; }

.community-feed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.community-feed-head h2 { margin-top: 5px; color: var(--heading); font-size: 1.2rem; letter-spacing: -.025em; }
.community-feed-head__count { padding-bottom: 2px; color: var(--text-muted); font-size: .72rem; }
.community-feed { overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.community-thread {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 64px; gap: 14px;
  padding: 19px 18px; color: inherit; text-decoration: none;
  transition: background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.community-thread + .community-thread { border-top: 1px solid var(--border); }
.community-thread:hover { background: color-mix(in srgb, var(--surface-2) 62%, var(--surface)); }
.community-thread__avatar { width: 38px; height: 38px; font-size: .75rem; }
.community-thread__body { display: block; min-width: 0; }
.community-thread__topline { display: flex; align-items: center; gap: 6px; color: var(--text-faint); font-size: .67rem; }
.community-thread__author { max-width: 32ch; overflow: hidden; color: var(--text-muted); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.community-thread__pinned {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px;
  color: var(--ember); background: color-mix(in srgb, var(--ember) 9%, transparent); font-size: .62rem; font-weight: 700;
}
.community-thread__pinned svg { width: 11px; height: 11px; }
.community-thread__title {
  display: block; margin-top: 6px; overflow: hidden; color: var(--heading);
  font-size: .98rem; font-weight: 730; letter-spacing: -.018em; text-overflow: ellipsis; white-space: nowrap;
}
.community-thread__excerpt { display: -webkit-box; margin-top: 5px; overflow: hidden; color: var(--text-muted); font-size: .76rem; line-height: 1.52; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.community-thread__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.community-kind, .community-chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); background: var(--surface-2); font-size: .62rem; font-weight: 650;
}
.community-kind svg, .community-chip svg { width: 12px; height: 12px; }
.community-kind--question { border-color: transparent; color: var(--soft-violet-text); background: var(--soft-violet); }
.community-kind--feedback { border-color: transparent; color: var(--cyan-300); background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.community-thread__activity {
  display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: center;
  min-height: 62px; border-left: 1px solid var(--border); color: var(--text-muted); font-size: .61rem;
}
.community-thread__activity svg { width: 16px; height: 16px; margin-bottom: 4px; }
.community-thread__activity strong { color: var(--heading); font-size: .85rem; line-height: 1; }
.community-empty { border: 0; background: transparent; }
.community-empty .btn { margin-top: 18px; }
.community-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-top: 15px; color: var(--text-muted); font-size: .72rem; }
.community-pagination > :last-child { justify-self: end; }

.community-rail { position: sticky; top: 86px; display: grid; gap: 14px; }
.community-rail-card { padding: 20px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.community-rail-card__head { display: flex; align-items: center; gap: 11px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.community-rail-card__head .eyebrow { font-size: .59rem; }
.community-rail-card__head h2 { margin-top: 3px; color: var(--heading); font-size: .91rem; letter-spacing: -.018em; }
.community-rail-card__icon { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 auto; border-radius: 11px; color: var(--soft-violet-text); background: var(--soft-violet); }
.community-rail-card__icon--teal { color: var(--cyan-300); background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.community-rail-card__icon svg { width: 17px; height: 17px; }
.community-members { display: grid; gap: 13px; margin-top: 16px; }
.community-member { display: flex; align-items: center; gap: 10px; min-width: 0; }
.community-member > .avatar {
  display: grid; place-items: center; width: 32px; height: 32px; flex-basis: 32px;
  overflow: hidden; color: #fff; font-size: .7rem; line-height: 1;
  text-align: center; text-overflow: clip; white-space: normal;
}
.community-member > div { min-width: 0; }
.community-member strong, .community-member span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-member strong { color: var(--heading); font-size: .72rem; }
.community-member > div span { margin-top: 2px; color: var(--text-faint); font-size: .61rem; }
.community-tags { display: grid; gap: 7px; margin-top: 13px; }
.community-tag { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 9px; border-radius: 9px; color: var(--text-muted); background: var(--surface-2); font-size: .69rem; }
.community-tag strong { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 7px; color: var(--text); background: var(--surface); font-size: .62rem; }
.community-guide { display: flex; gap: 11px; padding: 17px; border: 1px solid color-mix(in srgb, var(--ember) 22%, var(--border)); border-radius: 15px; color: var(--streak-text); background: var(--streak-bg); }
.community-guide > svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.community-guide strong { display: block; font-size: .73rem; }
.community-guide p { margin-top: 4px; color: var(--text-muted); font-size: .64rem; line-height: 1.48; }

/* Thread detail */
.community-detail { max-width: 1040px !important; }
.community-detail__back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 25px; color: var(--text-muted); font-size: .74rem; font-weight: 650; }
.community-detail__back:hover { color: var(--accent-text); }
.community-detail__back svg { width: 15px; height: 15px; }
.community-detail__head { max-width: 800px; margin-bottom: 28px; }
.community-detail__labels { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.community-detail__head h1 { margin-top: 12px; color: var(--heading); font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.09; letter-spacing: -.046em; }
.community-detail__byline { display: flex; align-items: center; gap: 10px; margin-top: 20px; color: var(--text-muted); }
.community-detail__byline .avatar { width: 38px; height: 38px; flex-basis: 38px; }
.community-detail__byline > span:nth-child(2) { min-width: 0; }
.community-detail__byline strong, .community-detail__byline small { display: block; }
.community-detail__byline strong { color: var(--heading); font-size: .76rem; }
.community-detail__byline small { margin-top: 2px; font-size: .66rem; }
.community-detail__reply-count { display: inline-flex !important; align-items: center; gap: 5px; margin-left: 8px; padding-left: 18px; border-left: 1px solid var(--border); font-size: .7rem; }
.community-detail__reply-count svg { width: 14px; height: 14px; }
.community-detail__layout { display: grid; grid-template-columns: minmax(0, 1fr) 255px; gap: 26px; align-items: start; }
.community-detail__main { min-width: 0; }
.community-post { padding: 27px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.community-post__body { color: var(--text); font-size: .91rem; line-height: 1.78; white-space: pre-line; }
.community-post__image { display: block; margin-top: 22px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.community-post__image img { display: block; max-width: 100%; max-height: 460px; margin: auto; }
.community-post__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--border); }
.community-post__tags span { color: var(--accent-text); font-size: .69rem; font-weight: 650; }
.community-replies-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 32px 0 13px; }
.community-replies-head h2 { margin-top: 4px; color: var(--heading); font-size: 1.18rem; }
.community-replies-head > a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: .72rem; font-weight: 650; }
.community-replies-head > a svg { width: 14px; height: 14px; }
.community-replies { display: grid; gap: 9px; }
.community-reply {
  position: relative; margin-left: min(calc(var(--reply-depth) * 22px), 110px); padding: 17px 18px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.community-reply[style*="--reply-depth: 0"] { margin-left: 0; }
.community-reply:not([style*="--reply-depth: 0"])::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -12px; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 24%, var(--border));
}
.community-reply__identity { display: flex; align-items: center; gap: 9px; }
.community-reply__identity > .avatar,
.community-reply-box__head > .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: .7rem; }
.community-reply__identity strong, .community-reply__identity span { display: block; }
.community-reply__identity strong { color: var(--heading); font-size: .72rem; }
.community-reply__identity span { margin-top: 2px; color: var(--text-faint); font-size: .62rem; }
.community-reply__body { margin-top: 13px; color: var(--text); font-size: .78rem; line-height: 1.67; white-space: pre-line; }
.community-reply__actions { margin-top: 11px; }
.community-reply__actions button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; border: 0; color: var(--text-muted); background: transparent; font-size: .67rem; font-weight: 650; }
.community-reply__actions button:hover { color: var(--accent-text); }
.community-reply__actions svg { width: 13px; height: 13px; }
.community-reply__form { display: grid; gap: 8px; margin-top: 9px; }
.community-reply-box { display: grid; gap: 15px; margin-top: 24px; padding: 22px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); scroll-margin-top: 90px; }
.community-reply-box__head { display: flex; align-items: center; gap: 10px; }
.community-reply-box__head .eyebrow { font-size: .58rem; }
.community-reply-box__head strong { display: block; margin-top: 3px; color: var(--heading); font-size: .8rem; }
.community-reply-box textarea { min-height: 110px; resize: vertical; background: var(--surface-2); }
.community-reply-box__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.community-reply-box__foot > span { color: var(--text-muted); font-size: .67rem; }
.community-thread-guide { position: sticky; top: 86px; padding: 23px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.community-thread-guide__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 20px; border-radius: 13px; color: var(--soft-violet-text); background: var(--soft-violet); }
.community-thread-guide__icon svg { width: 19px; height: 19px; }
.community-thread-guide h2 { margin-top: 7px; color: var(--heading); font-size: 1.12rem; line-height: 1.28; }
.community-thread-guide ul { display: grid; gap: 13px; margin-top: 20px; padding: 17px 0 0; border-top: 1px solid var(--border); list-style: none; }
.community-thread-guide li { display: flex; align-items: flex-start; gap: 8px; color: var(--text-muted); font-size: .68rem; line-height: 1.48; }
.community-thread-guide li svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: var(--success); }

/* =============================================================== 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-row .author-row__actions { flex-wrap: nowrap; justify-content: flex-end; }
.faculty .faculty-row .author-row__menu .menu__panel { flex-wrap: nowrap; }
.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; }

/* Student profile: identity first, then compact account and learning details. */
.profile-page { max-width: 1040px; }
.profile-hero {
  display: flex; align-items: center; gap: 22px; margin-bottom: 16px; padding: 30px 32px;
  color: var(--text); background:
    radial-gradient(circle at 92% 15%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 34%),
    var(--surface);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-1);
}
.profile-hero__avatar {
  display: grid; flex: 0 0 auto; place-items: center; width: 82px; height: 82px;
  color: #fff; background: linear-gradient(145deg, #7668e8, #5144bd);
  border: 4px solid var(--surface); border-radius: 24px;
  box-shadow: 0 0 0 1px var(--border), 0 12px 28px -16px rgba(76,62,176,.8);
  font-size: 1.8rem; font-weight: 750;
}
.profile-hero__identity { min-width: 0; }
.profile-hero__identity .eyebrow { margin-bottom: 5px; }
.profile-hero__identity h1 {
  overflow: hidden; color: var(--heading); font-size: clamp(2rem, 4vw, 2.65rem);
  letter-spacing: -.035em; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap;
}
.profile-hero__identity > p:not(.eyebrow) { margin-top: 7px; color: var(--text-muted); font-size: .86rem; }
.profile-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 17px; }
.profile-hero__meta span { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: .75rem; font-weight: 600; }
.profile-hero__meta svg { width: 15px; height: 15px; color: var(--accent-text); }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.profile-stat {
  display: flex; align-items: center; gap: 14px; min-width: 0; padding: 17px 19px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 15px;
}
.profile-stat__icon {
  display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px;
  color: var(--soft-violet-text); background: var(--soft-violet); border-radius: 11px;
}
.profile-stat__icon--warm { color: var(--ember); background: color-mix(in srgb, var(--ember) 11%, transparent); }
.profile-stat__icon svg { width: 18px; height: 18px; }
.profile-stat strong { display: block; color: var(--heading); font-size: 1.25rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.profile-stat div span { display: block; margin-top: 4px; color: var(--text-muted); font-size: .72rem; }
.profile-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 16px; }
.profile-panel { padding: 25px; box-shadow: none !important; }
.profile-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 21px; }
.profile-panel__head .eyebrow { margin-bottom: 5px; }
.profile-panel__head h2 { color: var(--heading); font-size: 1.1rem; }
.profile-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px;
  color: var(--success); background: color-mix(in srgb, var(--success) 9%, transparent);
  border-radius: var(--r-pill); font-size: .66rem; font-weight: 700;
}
.profile-status span { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.profile-details > div { min-width: 0; padding: 15px 0; border-top: 1px solid var(--border); }
.profile-details > div:nth-child(odd) { padding-right: 18px; }
.profile-details > div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--border); }
.profile-details dt { display: flex; align-items: center; gap: 7px; color: var(--text-faint); font-size: .68rem; font-weight: 600; }
.profile-details dt svg { width: 14px; height: 14px; }
.profile-details dd { overflow: hidden; margin: 7px 0 0; color: var(--text); font-size: .78rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.profile-panel__link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-size: .7rem; font-weight: 700; }
.profile-panel__link svg { width: 14px; height: 14px; }
.profile-course { display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; align-items: center; gap: 13px; padding: 15px 0; border-top: 1px solid var(--border); }
.profile-course:first-child { padding-top: 2px; border-top: 0; }
.profile-course:last-child { padding-bottom: 0; }
.profile-course__icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--soft-violet-text); background: var(--soft-violet); border-radius: 11px; }
.profile-course__icon svg { width: 18px; height: 18px; }
.profile-course__body { min-width: 0; }
.profile-course__top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--text); font-size: .76rem; }
.profile-course__top > span { color: var(--text-faint); font-size: .68rem; font-variant-numeric: tabular-nums; }
.profile-course small { display: block; margin-top: 7px; color: var(--text-faint); font-size: .64rem; }
.profile-course__arrow { width: 16px; height: 16px; color: var(--text-faint); transition: transform var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.profile-course:hover .profile-course__arrow { color: var(--accent-text); transform: translateX(2px); }
.profile-empty { display: flex; align-items: center; gap: 13px; min-height: 112px; padding-top: 12px; border-top: 1px solid var(--border); }
.profile-empty > span { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; color: var(--text-faint); background: var(--surface-2); border-radius: 11px; }
.profile-empty > span svg { width: 18px; height: 18px; }
.profile-empty > div { flex: 1; }
.profile-empty strong { font-size: .78rem; }
.profile-empty p { margin-top: 3px; color: var(--text-muted); font-size: .68rem; }

@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)); }
  .community-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .community-hero { grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr); padding-inline: 34px; }
  .community-hero__bubble { width: 190px; }
  .community-detail__layout { grid-template-columns: minmax(0, 1fr) 225px; }
  .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-h: 64px; }
  .app .topbar { padding-inline: 14px; }
  .faculty .faculty-topbar__collapse { display: none; }
  .faculty .faculty-content { padding-top: 24px; }
  .home-head { align-items: flex-start; }
  .app .col-2 { grid-template-columns: minmax(0, 1fr); }
  .community-hero { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .community-hero__copy h1 { max-width: 18ch; }
  .community-hero__scene { display: none; }
  .community-layout, .community-detail__layout { grid-template-columns: minmax(0, 1fr); }
  .community-rail { position: static; grid-template-columns: 1fr 1fr; }
  .community-guide { grid-column: 1 / -1; }
  .community-thread-guide { display: none; }
}

@media (max-width: 640px) {
  .home-head { display: block; }
  .home-head h1 { font-size: 2rem; }
  .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; }
  .profile-hero { align-items: flex-start; padding: 24px; }
  .profile-hero__avatar { width: 68px; height: 68px; font-size: 1.45rem; }
  .profile-hero__identity h1 { font-size: 1.8rem; }
  .profile-hero__meta { gap: 8px 14px; }
  .profile-stats { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-panel { padding: 20px; }
  .profile-details { grid-template-columns: 1fr; }
  .profile-course { grid-template-columns: 40px minmax(0, 1fr); }
  .profile-course__arrow { display: none; }
  .profile-empty { align-items: flex-start; flex-direction: column; }
  .home-primary { min-height: 210px; padding: 20px; }
  .home-primary__top { align-items: flex-start; flex-direction: column; gap: 8px; }
  .home-timeline { margin-inline: 0; padding: 0; }
  .home-timeline__head { align-items: flex-start; }
  .home-timeline__nav { display: none; }
  .home-timeline__rail { grid-auto-columns: minmax(280px, 86vw); }
  .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; }
  .community-hero { margin: -2px -2px 20px; padding: 28px 23px; border-radius: 19px; }
  .community-hero__copy h1 { font-size: 2.12rem; }
  .community-hero__copy h1 br { display: none; }
  .community-hero__copy .lead { font-size: .86rem; }
  .community-hero__actions { align-items: flex-start; flex-direction: column; gap: 12px; }
  .community-composer__prompt { padding: 11px; }
  .community-composer__prompt .avatar { display: none; }
  .community-composer__form { padding-inline: 15px; }
  .community-composer__extras { grid-template-columns: 1fr; }
  .community-composer__actions { align-items: stretch; flex-direction: column; }
  .community-composer__actions .btn { width: 100%; }
  .community-filters { margin-inline: -2px; }
  .community-filters__label { display: none; }
  .community-feed-head { margin-top: 3px; }
  .community-thread { grid-template-columns: 34px minmax(0, 1fr); padding: 17px 14px; }
  .community-thread__avatar { width: 34px; height: 34px; }
  .community-thread__activity { grid-column: 2; align-items: center; flex-direction: row; justify-content: flex-start; gap: 4px; min-height: 0; padding-top: 9px; border: 0; }
  .community-thread__activity svg { margin: 0; }
  .community-thread__title { white-space: normal; }
  .community-rail { grid-template-columns: 1fr; }
  .community-guide { grid-column: auto; }
  .community-detail__head h1 { font-size: 2.05rem; }
  .community-detail__byline { flex-wrap: wrap; }
  .community-detail__reply-count { margin-left: 48px; padding-left: 0; border: 0; }
  .community-post { padding: 21px; }
  .community-reply { margin-left: min(calc(var(--reply-depth) * 12px), 48px); }
  .community-reply-box { padding: 18px; }
  .community-reply-box__foot { align-items: stretch; flex-direction: column; }
  .community-reply-box__foot .btn { width: 100%; }
  .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 .author-row__actions { justify-content: flex-start; }
  .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; }
}
