:root {
  color: #1f2937;
  background: #f7f9fc;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bg: #f7f9fc;
  --panel: #ffffff;
  --line: #e6ebf2;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --ok: #16a34a;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-lift: 0 12px 32px rgba(15, 23, 42, 0.1);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
a { color: inherit; }

.app-shell {
  min-height: 100vh; background: var(--bg);
  --side: 240px;
  --side-collapsed: 72px;
}
.app-shell.is-nav-collapsed { --side: var(--side-collapsed); }
.landing-shell { min-height: 100vh; background: var(--bg); }
.landing-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; position: sticky; top: 0; z-index: 8;
  background: rgba(247, 249, 252, 0.92); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.landing-body .browse { padding-top: 20px; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side); z-index: 30;
  background: var(--panel); box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
  display: flex; flex-direction: column; padding: 20px 14px 16px;
  transition: width 0.22s ease;
  overflow: hidden;
}
.sidebar-top { display: flex; flex-direction: column; gap: 18px; flex: 1; min-height: 0; }
.side-brand-row {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  min-width: 0;
}
.side-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 800; font-size: 16px; padding: 4px 8px; min-width: 0;
}
.side-brand-word {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mark {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; font-weight: 800; font-size: 12px;
  flex-shrink: 0;
}
.nav-rail-toggle {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border: 0; border-radius: 999px; background: #f1f5f9; color: var(--text);
  font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}
.nav-rail-toggle:hover { background: #e2e8f0; }
.nav-rail-toggle[hidden] { display: none !important; }
.nav-rail-toggle-open { margin-right: 4px; }
.shell-scrim {
  position: fixed; inset: 0; z-index: 28; border: 0;
  background: rgba(15, 23, 42, 0.42); cursor: pointer;
}
.shell-scrim[hidden] { display: none !important; }
.app-shell:not(.is-nav-collapsed) .nav-rail-toggle-open { display: none !important; }
.app-shell.is-nav-collapsed #lms-nav-collapse { display: none !important; }
.app-shell.is-nav-collapsed .side-brand-word,
.app-shell.is-nav-collapsed .nav-label,
.app-shell.is-nav-collapsed .side-user-copy { display: none; }
.app-shell.is-nav-collapsed .side-brand-row { justify-content: center; }
.app-shell.is-nav-collapsed .side-brand { justify-content: center; padding: 4px; }
.app-shell.is-nav-collapsed .sidebar nav a { justify-content: center; padding: 11px; }
.app-shell.is-nav-collapsed .side-user { justify-content: center; padding: 10px 4px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  border-radius: 10px; padding: 11px 12px; color: #4b5563; font-weight: 650;
}
.sidebar nav a .lms-icon { flex-shrink: 0; }
.sidebar nav a.active, .sidebar nav a:hover { background: #eff6ff; color: var(--brand); }
.sidebar-foot {
  margin-top: auto; padding-top: 14px;
  box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.03);
}
.side-user {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border: 0; border-radius: 12px; background: transparent;
  text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.side-user:hover, .side-user:focus-visible {
  background: #f8fafc; outline: 0;
}
.side-user-link { text-decoration: none; color: inherit; box-sizing: border-box; }
.side-user-copy { display: grid; gap: 2px; min-width: 0; }
.side-user-copy strong {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-user-copy span {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.lms-modal-open { overflow: hidden; }
.lms-modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px;
}
.lms-modal[hidden] { display: none; }
.lms-modal-scrim {
  position: absolute; inset: 0; border: 0; background: rgba(15, 23, 42, 0.42); cursor: pointer;
}
.lms-modal-card {
  position: relative; z-index: 1; width: min(360px, 100%);
  background: var(--panel); border-radius: 18px; padding: 18px;
  box-shadow: var(--shadow-lift); display: grid; gap: 14px;
}
.lms-modal-head {
  display: flex; align-items: center; gap: 12px; padding: 4px 4px 10px;
}
.lms-modal-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.lms-modal-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.lms-modal-actions { display: grid; gap: 4px; }
.lms-modal-actions a {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  border-radius: 10px; padding: 12px; color: var(--text); font-weight: 650;
}
.lms-modal-actions a:hover { background: #eff6ff; color: var(--brand); }
.lms-modal-actions a.danger { color: #b91c1c; }
.lms-modal-actions a.danger:hover { background: #fef2f2; color: #991b1b; }

.profile-card {
  background: var(--panel); border-radius: 18px; padding: 22px;
  box-shadow: var(--shadow); display: grid; gap: 20px; max-width: 640px;
}
.profile-hero { display: flex; align-items: center; gap: 14px; }
.profile-avatar { width: 56px; height: 56px; border-radius: 16px; }
.profile-hero h2 { margin: 0; font-size: 22px; font-weight: 800; }
.profile-facts {
  margin: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-facts > div {
  background: #f8fafc; border-radius: 12px; padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}
.profile-facts dt {
  margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.profile-facts dd { margin: 0; font-weight: 650; }
@media (max-width: 640px) {
  .profile-facts { grid-template-columns: 1fr; }
}
.lms-icon { display: block; }
.top-search .lms-icon { color: var(--muted); flex-shrink: 0; }
.user-icon {
  width: 34px; height: 34px; border-radius: 50%; background: #dbeafe; color: var(--brand);
  display: grid; place-items: center; flex-shrink: 0;
}
.user-menu { display: flex; align-items: center; gap: 8px; }
.category {
  background: var(--panel); border: 0; border-radius: 16px; padding: 16px;
  display: grid; gap: 10px; min-width: 160px; box-shadow: var(--shadow-soft);
}
.category-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
}
.tone-purple { background: #f3e8ff; color: #7c3aed; }
.tone-green { background: #dcfce7; color: #15803d; }
.tone-amber { background: #fef3c7; color: #b45309; }
.tone-rose { background: #ffe4e6; color: #e11d48; }
.tone-blue { background: #dbeafe; color: #2563eb; }
.tone-teal { background: #ccfbf1; color: #0f766e; }
.stat-icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 4px;
}
.poster {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #dbeafe;
}
.play-badge {
  position: absolute; left: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: #fff; color: var(--brand); display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}
.journey-thumb {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: #eff6ff; color: var(--brand); display: grid; place-items: center;
  background-size: cover; background-position: center;
}
.journey-thumb.has-poster { color: transparent; }
.journey-copy { flex: 1; display: grid; gap: 6px; min-width: 0; }
.journey-copy h3 { margin: 0; font-size: 16px; }
.cta .lms-icon { display: inline-block; vertical-align: middle; }
.shell-main {
  margin-left: var(--side); min-height: 100vh; padding-bottom: 24px;
  transition: margin-left 0.22s ease;
}
.portal-body .shell-main:has(.courses-shell) { padding-bottom: 0; }
.topbar {
  position: sticky; top: 0; z-index: 8; height: 72px; display: flex; align-items: center;
  gap: 16px; padding: 0 28px 0 16px; background: rgba(247, 249, 252, 0.92); backdrop-filter: blur(8px);
}
.top-search {
  position: relative;
  flex: 1; max-width: 420px; margin: 0; margin-right: auto; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 0; border-radius: 999px; padding: 11px 18px; color: var(--muted);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, border-radius 0.16s ease;
}
.top-search:focus-within,
.top-search.is-search-open {
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.14);
}
.top-search.is-search-open {
  border-radius: 18px 18px 0 0;
  z-index: 20;
}
.top-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
.live-search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  background: var(--panel);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
  padding: 8px;
  max-height: min(60vh, 420px);
  overflow: auto;
  z-index: 21;
}
.live-search-label {
  margin: 6px 10px 4px;
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.live-search-status,
.live-search-empty {
  margin: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.live-search-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.live-search-panel li a,
.live-search-panel li button {
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  font: inherit;
}
.live-search-panel li a:hover,
.live-search-panel li button:hover {
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.live-search-panel li strong {
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
}
.live-search-panel li span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}
.live-search-panel li button {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.nav-end { margin-left: 0; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sign-link, .cta, .login-form button, .ghost-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; text-decoration: none; cursor: pointer; font-weight: 700;
}
.sign-link, .login-form button, .cta {
  background: var(--brand); color: #fff; padding: 10px 18px;
}
.cta:hover, .sign-link:hover { background: var(--brand-dark); }
.ghost-cta {
  background: #eff6ff; color: var(--brand); padding: 8px 14px; width: fit-content;
  box-shadow: var(--shadow-soft);
}
.sign-link, .cta, .login-form button {
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}
.user-hello { font-weight: 650; font-size: 14px; }

.browse { padding: 8px 24px 48px; display: grid; gap: 28px; }
.kicker { margin: 0 0 8px; color: #93c5fd; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12px; }
.hero-banner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; min-height: 280px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(120deg, #1d4ed8 0%, #3b82f6 55%, #60a5fa 100%); color: #fff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.18);
}
.hero-copy { padding: 36px 32px; display: grid; align-content: center; gap: 10px; }
.hero-copy h1 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.hero-copy > p { margin: 0; color: rgba(255, 255, 255, 0.88); max-width: 40ch; line-height: 1.45; }
.hero-progress { display: grid; gap: 6px; max-width: 260px; margin: 4px 0 8px; }
.hero-progress > span { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.bar { height: 7px; border-radius: 999px; background: #e8eef7; overflow: hidden; }
.hero-banner .bar { background: rgba(255, 255, 255, 0.28); }
.bar span { display: block; height: 100%; background: var(--brand); }
.hero-banner .bar span { background: #fff; }
.hero-media {
  position: relative; min-height: 240px; background-size: cover; background-position: center;
  overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #0f172a; opacity: 0;
  transition: opacity 0.35s ease;
}
.hero-media.is-playing .hero-video { opacity: 1; }
.hero-play {
  position: absolute; z-index: 2; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--brand);
  display: grid; place-items: center; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
  border: 0; cursor: pointer; padding: 0;
}
.hero-media.is-playing .hero-play { display: none; }
.hero-sound-toggle {
  position: absolute; z-index: 3; right: 14px; bottom: 14px;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(15, 23, 42, 0.72); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
  transition: background 0.16s ease;
}
.hero-sound-toggle:hover { background: rgba(15, 23, 42, 0.9); }
.hero-sound-toggle svg { display: block; }

.poster-link { display: block; text-decoration: none; color: inherit; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--brand); text-decoration: none; font-weight: 700; font-size: 14px;
  margin-bottom: 4px;
}
.lesson-stage {
  background: #0f172a; border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.lesson-video {
  display: block; width: 100%; max-height: min(70vh, 720px);
  background: #0f172a; aspect-ratio: 16 / 9; object-fit: contain;
}
.lesson-missing {
  padding: 48px 24px; text-align: center;
}

.section { display: grid; gap: 14px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.section-head a { color: var(--brand); text-decoration: none; font-weight: 700; font-size: 14px; }
.muted { color: var(--muted); }
.category-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr);
  gap: 12px; overflow-x: auto; padding-bottom: 4px;
}

.lesson-grid-home {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.lesson-card {
  background: var(--panel); border: 0; border-radius: 16px; overflow: hidden;
  display: grid; box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.lesson-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.poster { height: 140px; }
.lesson-body { padding: 14px; display: grid; gap: 8px; }
.lesson-body h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.lesson-body .meta { margin: 0; color: var(--muted); font-size: 12px; font-weight: 650; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px;
  background: #eff6ff; color: var(--brand); text-decoration: none; font-weight: 650; font-size: 13px;
  border: 0; box-shadow: var(--shadow-soft);
}

.meta { color: var(--muted); font-size: 13px; margin: 0; }

/* Account login (Thabo layout, LMS look) */
body.account-login {
  --ink: #1f2937;
  --paper: #f7f9fc;
  --surface: #ffffff;
  --muted: #6b7280;
  --soft: #eff6ff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --radius-sm: 12px;
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lift: 0 12px 32px rgba(15, 23, 42, 0.1);
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
body.account-login h1,
body.account-login h2 {
  margin-top: 0;
  line-height: 1.15;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.02em;
}
body.account-login .account-page {
  display: flex;
  flex-direction: column;
  padding:
    max(24px, env(safe-area-inset-top, 0px))
    max(5vw, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px))
    max(5vw, env(safe-area-inset-left, 0px));
  min-height: 100dvh;
  min-height: 100svh;
}
body.account-login .account-grid {
  max-width: 1050px;
  width: 100%;
  margin: 70px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  flex: 1;
}
body.account-login .brand {
  font-size: 16px;
  letter-spacing: 0;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 28px;
}
body.account-login .brand-mark {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}
body.account-login .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  font-weight: 700;
  color: #93c5fd;
  margin: 0 0 8px;
}
body.account-login .account-grid h1 {
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  line-height: 1.02;
  margin-bottom: 16px;
}
body.account-login .account-intro .lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 380px;
  margin: 0;
}
body.account-login .surface {
  background: var(--surface);
  padding: 28px;
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
}
body.account-login .profile-form {
  max-width: 520px;
}
body.account-login .profile-form h2 {
  font-size: clamp(24px, 3vw, 30px);
  margin-bottom: 18px;
}
body.account-login .profile-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 650;
}
body.account-login .profile-form input,
body.account-login .profile-form select {
  border: 0;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--radius-sm);
  color: var(--ink);
  width: 100%;
  min-width: 0;
  font: inherit;
  box-shadow: var(--shadow-soft);
}
body.account-login .profile-form input:focus,
body.account-login .profile-form select:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), var(--shadow-soft);
  outline: none;
}
body.account-login .field-control {
  position: relative;
  display: block;
}
body.account-login .field-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}
body.account-login .field-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}
body.account-login .field-control input,
body.account-login .field-control select {
  width: 100%;
  padding-left: 42px;
}
body.account-login .demo-login {
  padding: 14px;
  background: var(--soft);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  box-shadow: inset 0 0 0 1px #dbeafe;
}
body.account-login .demo-login label { margin-bottom: 8px; }
body.account-login .demo-login small {
  display: block;
  margin-top: 8px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
  font-size: 11px;
}
body.account-login .auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
body.account-login .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
body.account-login .button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}
body.account-login .button.primary:hover { background: var(--accent-hover); }
body.account-login .button.secondary {
  background: #eff6ff;
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}
body.account-login .button.secondary:hover { background: #dbeafe; }
body.account-login .feedback {
  color: var(--danger);
  min-height: 16px;
  margin: 14px 0 0;
  font-size: 12px;
}
body.account-login .account-footer {
  margin-top: auto;
  padding-top: 24px;
}
body.account-login .account-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 760px) {
  body.account-login .account-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 28px 0 0;
  }
  body.account-login .account-grid h1 {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }
  body.account-login .account-intro .lede { font-size: 15px; max-width: none; }
  body.account-login .profile-form { max-width: none; }
  body.account-login .auth-actions { grid-template-columns: 1fr; }
  body.account-login .surface { padding: 20px; }
  body.account-login .brand { font-size: 24px; margin-bottom: 20px; }
}

.page-head h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.stat {
  background: var(--panel); border: 0; border-radius: 16px; padding: 16px;
  display: grid; gap: 4px; box-shadow: var(--shadow);
}
.stat strong { font-size: 28px; }
.stat span { color: var(--muted); font-weight: 650; }
.dashboard-profile-meta { margin: 4px 0 0; }
.grade-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.grade-board-card {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
}
.grade-board-link {
  display: grid;
  gap: 6px;
  padding: 16px 16px 12px;
  text-decoration: none;
  color: inherit;
}
.grade-board-link h3 { margin: 0; font-size: 22px; font-weight: 800; }
.grade-board-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.grade-board-classes {
  list-style: none;
  margin: 0;
  padding: 0 8px 10px;
  display: grid;
  gap: 4px;
  border-top: 1px solid color-mix(in srgb, var(--line, #e6ebf2) 80%, transparent);
}
.grade-board-classes a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
}
.grade-board-classes a:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.grade-board-classes small { color: var(--muted); font-weight: 650; white-space: nowrap; }
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; }
.tile {
  background: var(--panel); border: 0; border-radius: 16px; overflow: hidden; padding-bottom: 12px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block;
}
.tile h3 { margin: 10px 12px 4px; font-size: 15px; }
.tile .muted { margin: 0 12px; font-size: 13px; }
.journey-list { display: grid; gap: 10px; }
.journey-card {
  background: var(--panel); border: 0; border-radius: 14px; padding: 14px 16px;
  display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-soft);
  text-decoration: none; color: inherit;
}
.journey-card:hover, .tile:hover { box-shadow: var(--shadow-lift); }

/* Courses chat shell (Thabo-style rail, LMS palette) */
.courses-shell {
  --courses-rail: 288px;
  position: relative;
  display: grid;
  grid-template-columns: var(--courses-rail) minmax(0, 1fr);
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  min-height: 480px;
  overflow: hidden;
  background: var(--bg);
  transition: grid-template-columns 0.22s ease;
}
.courses-shell.is-rail-collapsed {
  --courses-rail: 0px;
}
.courses-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: opacity 0.18s ease, transform 0.22s ease;
}
.courses-shell.is-rail-collapsed .courses-rail {
  opacity: 0;
  transform: translateX(-12px);
  pointer-events: none;
}
.courses-rail-scrim {
  z-index: 24;
}
.courses-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 18px 10px;
  flex: 0 0 auto;
}
.courses-rail-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.courses-rail-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.courses-rail-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}
.courses-shell:not(.is-rail-collapsed) .courses-rail-toggle-open {
  display: none !important;
}
.courses-shell.is-rail-collapsed #courses-rail-collapse {
  display: none !important;
}
.courses-rail-list {
  padding: 4px 10px 16px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.courses-rail-empty { padding: 12px 8px; margin: 0; }
.course-chat-item {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 4px;
}
.course-chat-item:hover,
.course-chat-item.active {
  background: #f1f5f9;
}
.course-chat-item.active {
  background: #eff6ff;
}
.course-chat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.course-chat-item.active .course-chat-icon.tone-blue,
.course-chat-item.active .course-chat-icon.tone-purple,
.course-chat-item.active .course-chat-icon.tone-green,
.course-chat-item.active .course-chat-icon.tone-amber,
.course-chat-item.active .course-chat-icon.tone-rose,
.course-chat-item.active .course-chat-icon.tone-teal {
  background: var(--brand);
  color: #fff;
}
.course-chat-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.course-chat-copy strong,
.course-chat-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.course-chat-copy strong {
  font-size: 13px;
  font-weight: 650;
}
.course-chat-copy small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.courses-stage {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.courses-chat-stage { padding: 0; }
.courses-chat-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
}
.courses-chat-header .courses-rail-toggle-open,
.courses-chat-header .nav-rail-toggle {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  flex: 0 0 auto;
}
.courses-chat-header .courses-rail-toggle-open:hover,
.courses-chat-header .nav-rail-toggle:hover {
  background: rgba(255, 255, 255, 0.28);
}
.courses-chat-reel {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 28px), transparent 100%);
}
.courses-chat-reel-meta {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.courses-chat-reel-dot {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 700;
}
.courses-chat-reel-title {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}
.courses-chat-reel-status {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.courses-chat-thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px max(20px, calc((100% - 920px) / 2)) 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.timeline-day {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}
.chat-day {
  position: sticky;
  top: 8px;
  z-index: 2;
  align-self: center;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e8eef7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  background: #dbeafe;
  color: var(--brand);
}
.chat-avatar.lc {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
}
.chat-bubble {
  max-width: min(720px, calc(100% - 42px));
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.chat-bubble.lc { background: #fff; }
.chat-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.chat-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.chat-meta time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.chat-bubble p {
  margin: 0;
  line-height: 1.45;
  font-size: 14px;
}
.timeline-event {
  background: var(--panel);
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  max-width: min(820px, 100%);
}
.timeline-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.timeline-event-kind {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}
.timeline-event-head time {
  font-size: 11px;
  color: var(--muted);
}
.timeline-event > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.timeline-event-actor {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.chat-video-activity {
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.chat-video-activity .lesson-video {
  display: block;
  width: 100%;
  max-height: min(52vh, 460px);
  aspect-ratio: 16 / 9;
  background: #0f172a;
}
.chat-video-activity .lesson-missing {
  padding: 28px 16px;
  text-align: center;
  background: #f8fafc;
}
.courses-chat-composer {
  flex: 0 0 72px;
  min-height: 72px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
  background: var(--panel);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.04);
}
.courses-composer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dbeafe;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}
.courses-note-field { margin: 0; min-width: 0; }
.courses-note-field input {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: #f1f5f9;
  color: var(--text);
}
.courses-note-field input:disabled {
  color: var(--muted);
  cursor: not-allowed;
}
.courses-chat-send {
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
}
.courses-chat-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.courses-stage-empty {
  padding: 48px 28px;
  max-width: 40ch;
}
.courses-stage-empty h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
}
.courses-stage-empty .muted { margin: 0; }

@media (max-width: 860px) {
  .hero-banner { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .shell-main {
    margin-left: 0;
    min-height: 100dvh;
    min-height: 100svh;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  .topbar {
    height: 60px;
    padding: 0 12px;
    gap: 10px;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .top-search {
    max-width: none;
    padding: 9px 14px;
  }
  .top-search input { font-size: 16px; }

  /* Main nav = sideways drawer */
  .sidebar {
    display: flex;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: none;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
  }
  .app-shell.is-nav-collapsed {
    --side: 0px;
  }
  .app-shell.is-nav-collapsed .side-brand-word,
  .app-shell.is-nav-collapsed .nav-label,
  .app-shell.is-nav-collapsed .side-user-copy {
    display: initial;
  }
  .app-shell.is-nav-collapsed .side-brand-row { justify-content: space-between; }
  .app-shell.is-nav-collapsed .side-brand { justify-content: flex-start; padding: 4px 8px; }
  .app-shell.is-nav-collapsed .sidebar nav a { justify-content: flex-start; padding: 11px 12px; }
  .app-shell.is-nav-collapsed .side-user { justify-content: flex-start; padding: 10px 8px; }
  .app-shell.is-nav-open .sidebar,
  .app-shell:not(.is-nav-collapsed) .sidebar {
    transform: translateX(0);
    box-shadow: 12px 0 32px rgba(15, 23, 42, 0.18);
  }
  .app-shell.is-nav-collapsed #lms-nav-collapse { display: inline-grid !important; }
  .app-shell:not(.is-nav-collapsed) .nav-rail-toggle-open,
  .app-shell.is-nav-open .nav-rail-toggle-open {
    display: none !important;
  }
  .app-shell.is-nav-collapsed .nav-rail-toggle-open {
    display: inline-grid !important;
  }

  .courses-shell {
    --courses-rail: 0px;
    grid-template-columns: minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    height: calc(100dvh - 60px - env(safe-area-inset-top, 0px));
    height: calc(100svh - 60px - env(safe-area-inset-top, 0px));
  }
  .courses-shell:not(.has-lesson) {
    --courses-rail: 0px;
  }
  .courses-shell:not(.has-lesson):not(.is-rail-collapsed) .courses-stage {
    display: none;
  }
  .courses-shell:not(.has-lesson):not(.is-rail-collapsed) {
    grid-template-columns: minmax(0, 1fr);
  }
  .courses-shell:not(.has-lesson):not(.is-rail-collapsed) .courses-rail {
    position: relative;
    width: 100%;
    height: 100%;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
  }

  /* Courses rail = sideways drawer over chat when lesson is open */
  .courses-shell.has-lesson .courses-rail {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    z-index: 26;
    transform: translateX(-105%);
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
  }
  .courses-shell.has-lesson:not(.is-rail-collapsed) .courses-rail {
    transform: translateX(0);
    box-shadow: 12px 0 32px rgba(15, 23, 42, 0.18);
  }
  .courses-shell.has-lesson.is-rail-collapsed .courses-rail {
    transform: translateX(-105%);
    opacity: 1;
    pointer-events: none;
  }
  .courses-shell.has-lesson:not(.is-rail-collapsed) .courses-rail-toggle-open {
    display: none !important;
  }
  .courses-shell.has-lesson.is-rail-collapsed .courses-rail-toggle-open {
    display: inline-grid !important;
  }
  .courses-shell.has-lesson.is-rail-collapsed #courses-rail-collapse {
    display: inline-grid !important;
  }

  .courses-chat-stage {
    min-height: 0;
    height: 100%;
  }
  .courses-chat-header {
    min-height: 48px;
    padding: 8px 12px;
    gap: 8px;
  }
  .courses-chat-reel { gap: 8px; }
  .courses-chat-reel-meta { font-size: 10px; }
  .courses-chat-reel-title { font-size: 13px; }
  .courses-chat-reel-status {
    padding: 3px 8px;
    font-size: 10px;
  }
  .courses-chat-thread {
    padding: 12px 12px 16px;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
  }
  .chat-day { top: 4px; font-size: 10px; }
  .chat-row { gap: 8px; }
  .chat-avatar { width: 28px; height: 28px; font-size: 10px; }
  .chat-bubble {
    max-width: calc(100% - 36px);
    padding: 12px 12px;
    border-radius: 12px;
  }
  .chat-bubble p { font-size: 14px; }
  .timeline-event {
    padding: 12px;
    border-radius: 14px;
    max-width: 100%;
  }
  .chat-video-activity {
    border-radius: 12px;
    margin-inline: -2px;
  }
  .chat-video-activity .lesson-video {
    max-height: min(42vh, 280px);
    width: 100%;
  }
  .courses-chat-composer {
    flex: 0 0 auto;
    min-height: 64px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    grid-template-columns: 32px minmax(0, 1fr) max-content;
  }
  .courses-composer-avatar { width: 32px; height: 32px; font-size: 12px; }
  .courses-note-field input {
    height: 42px;
    font-size: 16px; /* avoid iOS zoom */
  }
  .courses-chat-send {
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
  }
  .courses-stage-empty { padding: 32px 16px; }
}

/* Netflix-style grade pick landing */
body.landing-pick-body {
  background: #0b1220;
  color: #fff;
  min-height: 100dvh;
  min-height: 100svh;
}
.landing-pick {
  position: relative;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.landing-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0b1220;
}
.landing-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.9s ease, transform 6s ease;
}
.landing-slide.is-active {
  opacity: 1;
  transform: scale(1);
}
.landing-slide.is-logo-slide {
  background-color: #0b1220;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
}
.landing-slide-logo {
  position: relative;
  z-index: 1;
  width: min(720px, 78vw);
  height: auto;
  max-height: 28vh;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  opacity: 0.96;
  transform: translateY(-6%);
  pointer-events: none;
}
.landing-slider-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.55) 0%, rgba(11, 18, 32, 0.2) 35%, rgba(11, 18, 32, 0.55) 62%, rgba(11, 18, 32, 0.96) 100%),
    linear-gradient(90deg, rgba(11, 18, 32, 0.55) 0%, transparent 45%);
  pointer-events: none;
}
.landing-slider:has(.landing-slide.is-logo-slide.is-active) .landing-slider-shade {
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.45) 0%, rgba(11, 18, 32, 0.18) 38%, rgba(11, 18, 32, 0.58) 68%, rgba(11, 18, 32, 0.96) 100%),
    linear-gradient(90deg, rgba(11, 18, 32, 0.4) 0%, transparent 50%);
}
.landing-pick-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 28px 12px;
}
.landing-pick-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.landing-pick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.landing-pick-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
}
.landing-pick-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  background: var(--brand);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}
.landing-pick-login:hover { background: var(--brand-dark); }
.landing-pick-hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 28px 18px;
  max-width: 760px;
  min-height: 0;
}
.landing-pick-copy {
  display: none;
  animation: landingCopyIn 0.55s ease;
}
.landing-pick-copy.is-active { display: block; }
.landing-pick-copy.is-logo-copy h1 {
  font-size: clamp(22px, 3vw, 34px);
  max-width: 18ch;
}
.landing-pick-copy.is-logo-copy .landing-pick-lede {
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.78);
}
@keyframes landingCopyIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.landing-pick-eyebrow {
  margin: 0 0 10px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.landing-pick-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.landing-pick-lede {
  margin: 12px 0 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 1.45;
}
.landing-slider-dots {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.landing-slider-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  padding: 0;
}
.landing-slider-dot.is-active { background: #fff; }
.landing-grades {
  position: relative;
  z-index: 3;
  padding: 8px 20px calc(28px + env(safe-area-inset-bottom, 0px));
}
.landing-grades h2 {
  margin: 0 0 16px;
  text-align: center;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 750;
  color: rgba(255, 255, 255, 0.92);
}
.landing-grade-reel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto;
}
.landing-grade-arrow {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.landing-grade-arrow:hover { background: rgba(255, 255, 255, 0.24); }
.landing-grade-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}
.landing-grade-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 12px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.landing-grade-row::-webkit-scrollbar { display: none; }
.landing-grade {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  width: 88px;
  scroll-snap-align: start;
}
.landing-grade-tile {
  width: 84px;
  aspect-ratio: 1;
  border-radius: 14px;
  display: grid;
  place-items: center;
  gap: 2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
}
.landing-grade-tile.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.55) 100%);
  pointer-events: none;
}
.landing-grade-tile.has-photo strong {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  background: rgba(15, 23, 42, 0.42);
  border-radius: 999px;
  min-width: 2rem;
  padding: 4px 8px;
  text-align: center;
}
.landing-grade-tile strong {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.landing-grade:hover .landing-grade-tile,
.landing-grade:focus-visible .landing-grade-tile {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}
.landing-grade-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .landing-pick-top { padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px; }
  .landing-pick-brand span:last-child { display: none; }
  .landing-pick-hero {
    padding: 16px 16px 10px;
    justify-content: center;
  }
  .landing-pick-hero h1 { font-size: clamp(28px, 8vw, 36px); }
  .landing-pick-lede { font-size: 14px; }
  .landing-grades { padding: 4px 8px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .landing-grades h2 { margin-bottom: 12px; font-size: 17px; }
  .landing-grade-reel {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 4px;
  }
  .landing-grade-arrow {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
  .landing-grade {
    width: 74px;
  }
  .landing-grade-tile {
    width: 68px;
    border-radius: 12px;
  }
  .landing-grade-tile .lms-icon { width: 22px; height: 22px; }
  .landing-grade-tile strong { font-size: 15px; }
  .landing-grade-label { font-size: 11px; }
}

/* Signup / auth extras */
body.account-login .auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
body.account-login .req { color: #dc2626; font-weight: 700; }
body.account-login .opt {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
body.account-login .field-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
body.account-login .field-hint a { color: var(--brand); font-weight: 650; }
@media (max-width: 640px) {
  body.account-login .auth-field-row { grid-template-columns: 1fr; }
}

.courses-rail-filters {
  display: flex;
  gap: 8px;
  padding: 0 14px 8px;
}
.courses-rail-filters .chip {
  text-decoration: none;
  background: #eff6ff;
  color: var(--brand);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.timeline-event .chat-actions,
.timeline-event .portal-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.timeline-event .portal-action-stack .cta,
.timeline-event .portal-action-stack .ghost-cta {
  min-width: 0;
}
a.courses-chat-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
