/* ============================================================
   ClickMagik — design system
   ============================================================ */
/* ============================================================
   ClickMagik — design system · DARK
   ------------------------------------------------------------
   One palette, taken straight off the logo: the black tile and the navy it sits on, the
   green swoosh, the gold wand, the blue arc, the red candle. Every surface reads from these
   tokens — landing page, student view, admin screens, modals, OTP boxes, lesson
   flowcharts — so the theme lives in this block alone.
   ------------------------------------------------------------
   Tints (--*-soft), their hairlines (--*-line) and the text that sits on them (--*-ink) are
   tokens too, which is why a component painted amber or red somewhere else needs no second,
   light-only copy of itself to stay readable here.
   Two names mean something slightly different from the set they grew out of: --brand-600 is a
   *fill* you hover into, --brand-700 is brand-coloured *text* on a dark surface. Nothing uses
   700 as a shadow.
   ============================================================ */
:root {
  color-scheme: dark;

  /* ink — the logo tile and the navy around it */
  --ink: #05070F;
  --bg: #080C18;
  --surface: #0E1424;
  --surface-2: #151D31;
  --surface-3: #1D2740;
  --field: #0B1120;
  --border: #22304B;
  --border-strong: #35486E;
  --text: #E9EFFA;
  --text-1: #E9EFFA;
  --text-2: #A9B8D2;
  --text-3: #7E8EB0;
  --muted: #8494B4;   /* placeholders and icons: the faintest text in the app, so it clears 6:1 on a card */

  /* brand green — the swoosh */
  --brand: #52A821;
  --brand-bright: #7ED84A;
  --brand-600: #47931D;
  --brand-700: #A3E97C;
  --brand-soft: rgba(82, 168, 33, .13);
  --brand-soft-2: rgba(82, 168, 33, .32);
  --brand-ink: #C6F3AB;

  /* gold — the wand and its sparks */
  --gold: #DFB52F;
  --gold-deep: #F2CE55;
  --gold-soft: rgba(223, 181, 47, .13);
  --gold-line: rgba(223, 181, 47, .40);
  --gold-ink: #F5DA92;

  /* blue arc and red candle, plus the accents that sit beside them */
  --blue: #4C8DFB;
  --blue-soft: rgba(76, 141, 251, .15);
  --blue-line: rgba(76, 141, 251, .38);
  --blue-ink: #AFCBFF;
  --rose: #D9573A;
  --rose-soft: rgba(224, 103, 74, .15);
  --rose-soft-2: rgba(224, 103, 74, .24);
  --rose-line: rgba(224, 103, 74, .40);
  --rose-ink: #F7AC97;
  --danger-text: #FF9C85;
  /* the two solid-red moments in the app (a blocker count, a paused sign-in) need a fill of their
     own: --danger-text is the *light* red for reading on ink, and it is a poor background */
  --danger-fill: #A82C13;
  --on-danger: #FFE4DA;
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, .17);
  --violet-ink: #CBB9FF;
  --teal: #2DD4BF;
  --teal-soft: rgba(20, 184, 166, .15);
  --teal-ink: #93EADB;
  --cyan: #22D3EE;
  --cyan-soft: rgba(34, 211, 238, .13);
  --cyan-ink: #9FECF8;
  --amber: #F59E0B;
  --orange-soft: rgba(249, 115, 22, .16);
  --orange-ink: #FBB47F;

  --radius: 14px;
  --radius-sm: 9px;
  /* on ink a soft grey drop reads as dirt: shadows go deeper and blacker, and raised
     surfaces get a one-pixel highlight along the top edge instead */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .035);
  --shadow-md: 0 10px 28px -12px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .035);
  --shadow-lg: 0 26px 60px -20px rgba(0, 0, 0, .9);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(1100px 520px at 82% -8%, rgba(82, 168, 33, .10), transparent 62%),
                     radial-gradient(900px 460px at -6% 0%, rgba(17, 107, 219, .12), transparent 58%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
::selection { background: rgba(82, 168, 33, .38); color: #fff; }
html { scrollbar-color: #2A3A5C transparent; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.semibold { font-weight: 600; }
.bold { font-weight: 700; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.right { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 6px; } .mt2 { margin-top: 12px; } .mt3 { margin-top: 18px; } .mt4 { margin-top: 26px; }
.mb2 { margin-bottom: 12px; }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2A3A5C; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3A4E77; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  padding: 9px 16px; font-weight: 600; font-size: 13.5px; line-height: 1.2;
  background: var(--surface); color: var(--text);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s, opacity .15s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { flex: none; }
.btn-primary { background: var(--brand); color: #06140B; text-shadow: 0 1px 0 rgba(255,255,255,.18); box-shadow: 0 6px 18px -10px rgba(82,168,33,.9), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); }
.btn-dark { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.btn-dark:hover:not(:disabled) { background: #263452; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-soft { background: var(--brand-soft); color: var(--brand-700); border-color: var(--brand-soft-2); }
.btn-soft:hover:not(:disabled) { background: var(--brand-soft-2); }
.btn-danger { background: var(--rose-soft); color: var(--rose-ink); border-color: var(--rose-line); }
.btn-danger:hover:not(:disabled) { background: var(--rose-soft-2); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-icon { padding: 8px; border-radius: 9px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--text-3); cursor: pointer; transition: all .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--rose-soft); color: var(--rose-ink); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--field); font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:-webkit-autofill, .input:-webkit-autofill:hover, .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text); caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #16233C inset; transition: background-color 9999s ease-in-out 0s;
}
.select option { background: var(--surface); color: var(--text); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(82, 168, 33, .22); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer; }
.search-wrap { position: relative; }
.search-wrap .input { padding-left: 34px; }
.search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.checkbox input { width: 15px; height: 15px; accent-color: var(--brand); }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: #2A3A5C; border-radius: 20px; transition: background .2s; cursor: pointer; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #E9EFFA; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }

/* ---------- cards / surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
.card-hover { transition: box-shadow .18s, transform .18s, border-color .18s; cursor: pointer; }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.divider { height: 1px; background: var(--border); border: 0; margin: 14px 0; }
.section-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-sub { font-size: 12.5px; color: var(--text-3); }

/* ---------- badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.badge-green { background: var(--brand-soft); color: var(--brand-700); }
.badge-amber { background: var(--gold-soft); color: var(--gold-deep); }
.badge-red { background: var(--rose-soft); color: var(--rose-ink); }
.badge-blue { background: var(--blue-soft); color: var(--blue-ink); }
.badge-violet { background: var(--violet-soft); color: var(--violet-ink); }
.badge-slate { background: var(--surface-2); color: var(--text-2); }
.badge-teal { background: var(--teal-soft); color: var(--teal-ink); }
.badge-cyan { background: var(--cyan-soft); color: var(--cyan-ink); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 600; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- avatars ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; user-select: none; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-md { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-xl { width: 64px; height: 64px; font-size: 22px; }

/* ---------- progress ---------- */
.progress { background: var(--surface-2); border-radius: 999px; height: 7px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #8CC63F); transition: width .4s ease; }
.progress.thin { height: 5px; }

/* ---------- landing ---------- */
.landing { background: var(--bg); min-height: 100vh; }
.navbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); background: rgba(8, 12, 24, .82); border-bottom: 1px solid var(--border); }
.navbar-in { max-width: 1180px; margin: 0 auto; padding: 13px 24px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; cursor: pointer; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #52A821, #116BDB); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 10px -2px rgba(82,168,33,.5); }
.logo-img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: none; display: inline-block; box-shadow: 0 3px 8px -2px rgba(6,45,93,.35); vertical-align: middle; }
.foot-social { display: flex; gap: 8px; margin-top: 12px; }
.foot-social a { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: all .15s; }
.foot-social a:hover { color: var(--brand); border-color: var(--brand-soft-2); background: var(--brand-soft); }
.logo-img-sm { width: 28px; height: 28px; border-radius: 8px; }
.logo-img-lg { width: 44px; height: 44px; border-radius: 12px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
/* The header is one flex row with a fixed-size logo, a wordmark and two buttons. Nothing in it was allowed
   to yield, so on a phone the row simply ran past its own width and the two groups painted over each other —
   a couple of pixels of difference in the system font is all it took, which is why Android was fine and the
   iPhone was not. Declared outside a media query on purpose: it does nothing while there is room, and it is
   the part the tests can actually check (jsdom does no layout). */
.navbar-in .brand { min-width: 0; flex: 0 1 auto; }
.navbar-in .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar-in .right { flex: 0 0 auto; }
.hero-wrap { position: relative; overflow: hidden; }
.hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(126,216,74,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(126,216,74,.10) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%); }
.hero { max-width: 1180px; margin: 0 auto; padding: 64px 24px 40px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; position: relative; }
.hero h1 { font-size: 2.55rem; line-height: 1.12; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { font-size: 16.5px; color: var(--text-2); max-width: 480px; margin-top: 16px; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats .num { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.hero-stats .lbl { font-size: 12px; color: var(--text-3); font-weight: 600; }

/* The hero's right-hand side is the school's newest blog post, and the picture you can click is the
   post's own. The frame is built to look finished before the blog has answered: the sheen below is what
   loads, not a spinner, and it stops the moment a picture arrives. If the blog gives no picture the
   caption stands on its own, which is why the card is styled without one too. */
.hero-side { width: 100%; max-width: 470px; margin-left: auto; }
.blog-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; color: inherit; text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.blog-card:hover { transform: translateY(-2px); border-color: rgba(82,168,33,.55); }
.blog-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.blog-shot { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.blog-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s ease; }
.blog-card[data-shot="on"] .blog-shot img { opacity: 1; }
.blog-card[data-shot="none"] .blog-shot { display: none; }
.blog-shot::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 32%, rgba(82,168,33,.14) 50%, transparent 68%); animation: blogSheen 1.5s ease-in-out infinite; }
.blog-card[data-shot="on"] .blog-shot::after, .blog-card[data-shot="none"] .blog-shot::after { display: none; }
@keyframes blogSheen { 0% { transform: translateX(-46%); } 60%, 100% { transform: translateX(46%); } }
.blog-meta { padding: 14px 18px 16px; }
.blog-kicker { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.blog-title { font-size: 17px; font-weight: 800; line-height: 1.32; letter-spacing: -.01em; margin-top: 7px; }
.blog-excerpt { font-size: 12.5px; line-height: 1.5; color: var(--text-2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-excerpt:empty { display: none; }
.blog-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; font-weight: 800; color: var(--brand-700); }
.blog-all { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--text-3); text-decoration: none; }
.blog-all:hover { color: var(--brand-700); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .blog-card { transition: none; } .blog-shot::after { animation: none; } }

.announce-bar { background: linear-gradient(90deg, rgba(82,168,33,.16), rgba(76,141,251,.13), rgba(223,181,47,.13)); border-bottom: 1px solid var(--border); }
.announce-bar-in { max-width: 1180px; margin: 0 auto; padding: 9px 24px; font-size: 13px; font-weight: 600; color: var(--brand-ink); display: flex; align-items: center; gap: 8px; }

.section { max-width: 1180px; margin: 0 auto; padding: 52px 24px; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; gap: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.45rem; letter-spacing: -.02em; }
.section-head .sub { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }

.pill-tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.pill-tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--text-3); cursor: pointer; transition: all .15s; }
.pill-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* course card */
.course-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s; cursor: pointer; display: flex; flex-direction: column; }
.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.course-cover { height: 138px; position: relative; overflow: hidden; }
.course-cover .cover-art { position: absolute; inset: 0; }
.course-cover .level-chip { position: absolute; top: 10px; left: 10px; }
/* A second chip on the same cover has to let go of `left`. Kept, the two rules stretch the chip from edge
   to edge and its text lands on top of the level chip — which is the "Active" printed over "Beginner" a
   student saw on every My Courses card. The landing page had to do the same thing inline; now it is one rule. */
.course-cover .level-chip.chip-right { left: auto; right: 10px; }
.course-cover .price-chip { position: absolute; top: 10px; right: 10px; }
.cover-emerald .cover-art { background: linear-gradient(135deg, #21540D, #44871A 55%, #8CC63F); }
.cover-blue .cover-art { background: linear-gradient(135deg, #172554, #2563eb 55%, #60a5fa); }
.cover-violet .cover-art { background: linear-gradient(135deg, #2e1065, #7c3aed 55%, #a78bfa); }
.cover-amber .cover-art { background: linear-gradient(135deg, #78350f, #d97706 55%, #fbbf24); }
.cover-rose .cover-art { background: linear-gradient(135deg, #3A150A, #BB4221 55%, #E06A3C); }
.cover-teal .cover-art { background: linear-gradient(135deg, #042f2e, #0d9488 55%, #2dd4bf); }
.cover-slate .cover-art { background: linear-gradient(135deg, var(--text), #334155 55%, #64748b); }
.cover-indigo .cover-art { background: linear-gradient(135deg, #1e1b4b, #4f46e5 55%, #818cf8); }
.cover-cyan .cover-art { background: linear-gradient(135deg, #083344, #0891b2 55%, #22d3ee); }
.cover-art::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 75% 20%, rgba(255,255,255,.18) 0, transparent 42%), radial-gradient(circle at 20% 90%, rgba(255,255,255,.1) 0, transparent 40%); }
.cover-art::before { content: '📈'; position: absolute; right: 14px; bottom: -18px; font-size: 74px; opacity: .28; transform: rotate(-8deg); }
.course-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.course-tagline { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.course-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-3); font-weight: 500; margin-top: auto; padding-top: 8px; }
.course-meta .sep { opacity: .5; }
.course-price { display: flex; align-items: baseline; gap: 8px; }
.course-price .now { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.course-price .was { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.course-price .off { font-size: 11px; font-weight: 700; color: var(--brand-700); background: var(--brand-soft); padding: 2px 6px; border-radius: 6px; }

/* ---------- auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, #05080F 0%, #0A2A5E 55%, #2E6B14 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 80% 15%, rgba(255,255,255,.14) 0, transparent 34%), radial-gradient(circle at 15% 85%, rgba(52,211,153,.25) 0, transparent 40%); }
.auth-side .content { position: relative; z-index: 1; }
.auth-side h2 { font-size: 1.9rem; line-height: 1.2; letter-spacing: -.02em; max-width: 380px; }
.auth-side p { color: rgba(255,255,255,.78); margin-top: 14px; max-width: 360px; }
.auth-quote { position: relative; z-index: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 18px; backdrop-filter: blur(6px); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; margin-bottom: 26px; }
.otp-boxes { display: flex; gap: 10px; }
.otp-boxes input { width: 52px; height: 60px; text-align: center; font-size: 22px; font-weight: 800; font-family: var(--mono); border: 1.5px solid var(--border-strong); border-radius: 12px; outline: none; transition: all .15s; }
.otp-boxes input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(82,168,33,.18); }
.otp-boxes input:disabled { opacity: .5; }

/* ---------- app shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns .2s ease; }
.app-shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #2A3A5C; display: flex; flex-direction: column; overflow: hidden; }
.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.sidebar-head .brand { color: #fff; font-size: 15px; }
.sidebar-head .brand .logo { width: 32px; height: 32px; }
.sidebar .collapse-btn { margin-left: auto; color: #7E8EB0; border: 0; background: transparent; cursor: pointer; display: flex; padding: 6px; border-radius: 8px; }
.sidebar .collapse-btn:hover { background: rgba(255,255,255,.08); color: #e2e8f0; }
.nav-group-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: #7E8EB0; padding: 14px 20px 6px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 11px; margin: 2px 10px; padding: 9px 11px; border-radius: 10px; color: #94a3b8; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .14s, color .14s; white-space: nowrap; position: relative; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #e2e8f0; }
.nav-item.active { background: linear-gradient(90deg, rgba(82,168,33,.22), rgba(82,168,33,.08)); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item svg { flex: none; opacity: .9; }
.nav-item .nav-count { margin-left: auto; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.12); color: #2A3A5C; padding: 1px 7px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-foot .user-box { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.sidebar-foot .user-box:hover { background: rgba(255,255,255,.07); }
.app-shell.collapsed .sidebar .nav-label, .app-shell.collapsed .nav-group-label, .app-shell.collapsed .sidebar-head .brand span, .app-shell.collapsed .user-meta, .app-shell.collapsed .nav-count { display: none; }
.app-shell.collapsed .nav-item { justify-content: center; padding: 10px; }
/* The button that folds the rail away is the one that brings it back. It used to be hidden while folded,
   beside a `.collapse-fab` that nothing in the app ever rendered — so a folded menu stayed folded, and the
   only way out was knowing the localStorage key by hand. A control that vanishes along with its own undo is
   not a collapse, it is a trap; the arrow stays, turns around, and the head stacks instead of clipping. */
.app-shell.collapsed .sidebar-head { flex-direction: column; gap: 6px; justify-content: center; padding: 14px 8px 10px; }
.app-shell.collapsed .sidebar-foot .user-box { justify-content: center; }
.app-shell.collapsed .collapse-btn { transform: rotate(180deg); margin-left: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(8, 12, 24, .8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 12px 26px; display: flex; align-items: center; gap: 14px; }
.topbar .crumb { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.topbar .sub-crumb { font-size: 12px; color: var(--text-3); }
.content { padding: 24px 26px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }
.content.wide { max-width: 1400px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.45rem; letter-spacing: -.02em; }
.page-head .sub { color: var(--text-3); font-size: 13px; margin-top: 3px; }

/* ---------- kpi cards ---------- */
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi-card .lbl { font-size: 12px; font-weight: 600; color: var(--text-3); }
.kpi-card .val { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.kpi-card .sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.kpi-card .kpi-icon { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.delta-up { color: var(--brand-700); font-weight: 700; }
.delta-down { color: var(--rose-ink); font-weight: 700; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .row-click { cursor: pointer; }

/* ---------- modal / drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(2,4,10,.74); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 18px 18px; overflow-y: auto; animation: fadeIn .15s ease; }
.modal { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: popIn .18s ease; margin-bottom: 30px; }
.modal.lg { max-width: 780px; }
.modal.xl { max-width: 980px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal-head h3 { font-size: 16.5px; letter-spacing: -.01em; }
.modal-body { padding: 14px 20px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); padding: 12px 15px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; animation: toastIn .2s ease; }
.toast.success { background: #14320A; border-color: rgba(82,168,33,.5); color: #D6F7BD; }
.toast.error { background: #3A140A; border-color: rgba(224,103,74,.5); color: #FFD3C4; }
.toast.info { background: var(--surface-3); }
.toast .t-close { margin-left: auto; cursor: pointer; opacity: .6; display: flex; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- skeleton / spinner ---------- */
.skel { background: linear-gradient(90deg, #121A2B 25%, #1C2740 50%, #121A2B 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--brand-soft-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.lg { width: 34px; height: 34px; border-width: 3px; }
.spinner.white { border-color: rgba(255,255,255,.3); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; color: var(--text-3); }

/* ---------- empty state ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 52px 24px; gap: 7px; }
.empty .empty-icon { width: 62px; height: 62px; border-radius: 18px; background: var(--surface-2); border: 1px dashed var(--border-strong); display: flex; align-items: center; justify-content: center; color: var(--muted); margin-bottom: 6px; }
.empty h3 { font-size: 15px; }
.empty p { color: var(--text-3); font-size: 13px; max-width: 300px; }

/* ---------- lesson list ---------- */
.lesson-item { display: flex; align-items: center; gap: 13px; padding: 11px 14px; border-radius: 12px; border: 1px solid transparent; transition: all .14s; }
.lesson-item:hover { background: var(--surface-2); }
.lesson-item.active { background: var(--brand-soft); border-color: var(--brand-soft-2); }
.lesson-item.locked { opacity: .55; }
.lesson-item.locked:hover { background: transparent; }
.lchip { font-size: 11px; flex: none; }
.lesson-num { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--text-3); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.lesson-item.active .lesson-num { background: var(--brand); color: #06140B; }
.lesson-icon { color: var(--text-3); display: flex; flex: none; }
.drag-handle { color: var(--muted); cursor: grab; display: flex; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--brand-700); border-bottom-color: var(--brand); }

/* ---------- home welcome ---------- */
.welcome-banner { border: 1px solid var(--border-strong); border-radius: 18px; padding: 26px 28px; background: linear-gradient(120deg, #0A1024 0%, #123F82 55%, #2E6B14 100%); color: #fff; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.welcome-banner::after { content: '📈'; position: absolute; right: 30px; bottom: -26px; font-size: 130px; opacity: .14; transform: rotate(-6deg); }
.welcome-banner h1 { color: #fff; font-size: 1.5rem; }
.welcome-banner p { color: rgba(255,255,255,.82); margin-top: 6px; font-size: 13.5px; max-width: 560px; }

/* ---------- payments / checkout ---------- */
.checkout-amount { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.razorpay-style { background: #0b2545; border-radius: 14px; padding: 16px; color: #e2e8f0; }
.rzp-logo { font-weight: 800; letter-spacing: .5px; color: #fff; display: inline-flex; align-items: center; gap: 7px; }
.rzp-logo .bolt { color: #3395ff; }
.pay-methods { display: grid; gap: 8px; margin-top: 12px; }
.pay-method { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 11px; cursor: pointer; transition: all .13s; background: var(--surface); }
.pay-method:hover { border-color: var(--border-strong); }
.pay-method.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(82,168,33,.14); }
.pay-method .pm-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; background: var(--surface-2); flex: none; }
.pay-method b { font-size: 13.5px; }
.pay-method span { display: block; font-size: 11.5px; color: var(--text-3); }
.radio-dot { margin-left: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; position: relative; }
.pay-method.selected .radio-dot { border-color: var(--brand); }
.pay-method.selected .radio-dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand); }

/* ---------- code / lesson content ---------- */
.lesson-content h2 { font-size: 1.25rem; margin: 1.2em 0 .5em; }
.lesson-content h3 { font-size: 1.05rem; margin: 1.1em 0 .4em; }
.lesson-content p { margin: .55em 0; color: var(--text-2); }
.lesson-content ul, .lesson-content ol { margin: .5em 0; padding-left: 1.4em; color: var(--text-2); }
.lesson-content li { margin: .3em 0; }
.lesson-content blockquote { margin: .8em 0; padding: 10px 16px; background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; color: var(--brand-ink); font-weight: 500; }
.lesson-content table { border-collapse: collapse; margin: .8em 0; width: 100%; font-size: 13px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.lesson-content th, .lesson-content td { border: 1px solid var(--border); padding: 7px 11px; text-align: left; }
.lesson-content th { background: var(--surface-2); font-weight: 700; color: var(--text-1); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
.lesson-content tbody tr:nth-child(even) { background: rgba(255,255,255,.028); }
.lesson-content pre.flow { margin: .8em 0; padding: 16px 18px; background: var(--ink); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.65; color: #d9e6f7; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.lesson-content pre.flow .fbox { display: block; }
@media (max-width: 640px) { .lesson-content pre.flow { font-size: 11px; padding: 12px; } }
.lesson-content th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); }
.lesson-content strong { color: var(--text); }

/* ---------- quiz ---------- */
.quiz-q { border: 1px solid var(--border); border-radius: 13px; padding: 16px; background: var(--surface); }
.quiz-opt { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 11px; cursor: pointer; transition: all .13s; font-size: 13.5px; }
.quiz-opt:hover { border-color: var(--border-strong); background: var(--surface-2); }
.quiz-opt.selected { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.quiz-opt.correct { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; color: var(--brand-700); }
.quiz-opt.wrong { border-color: var(--rose); background: var(--rose-soft); color: var(--rose-ink); }
.quiz-letter { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }

/* ---------- footer (public site) ---------- */
.foot-main { max-width: 1180px; margin: 0 auto; padding: 36px 24px 22px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
.foot-col a { display: block; padding: 5px 0; color: var(--text-2); font-size: 13px; font-weight: 500; }
.foot-col a:hover { color: var(--brand-700); }
.foot-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 9px; }
.foot-bottom { max-width: 1180px; margin: 0 auto; padding: 16px 24px 26px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }

/* ---------- legal pages ---------- */
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 44px 24px 90px; }
.legal-crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.legal-crumb a:hover { color: var(--brand-700); }
.legal-head h1 { font-size: 1.95rem; letter-spacing: -.025em; margin-top: 12px; }
.legal-head .badge { margin-top: 12px; }
.legal-body { margin-top: 26px; font-size: 14.5px; color: var(--text-2); }
.legal-body h2 { font-size: 1.05rem; margin: 32px 0 10px; color: var(--text); letter-spacing: -.01em; padding-top: 14px; border-top: 1px solid var(--border); }
.legal-body h3 { font-size: .93rem; margin: 20px 0 6px; color: var(--text); }
.legal-body p { margin: .6em 0; }
.legal-body ul, .legal-body ol { padding-left: 1.35em; margin: .6em 0; }
.legal-body li { margin: .32em 0; }
.legal-body a { color: var(--brand-700); font-weight: 600; }
.legal-body strong { color: var(--text); }
.legal-body table { border-collapse: collapse; margin: .8em 0; width: 100%; font-size: 13px; }
.legal-body th, .legal-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.legal-body th { background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.legal-note { background: var(--brand-soft); border: 1px solid var(--brand-soft-2); border-radius: 12px; padding: 13px 16px; margin: 18px 0; font-size: 13.5px; color: var(--brand-ink); }
.legal-note.warn { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-ink); }
.legal-back { margin-top: 40px; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.contact-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.contact-card .ic { font-size: 19px; }
.contact-card b { display: block; font-size: 13px; margin-top: 7px; color: var(--text); }
.contact-card span { font-size: 12.5px; color: var(--text-3); display: block; margin-top: 2px; word-break: break-word; }
@media (max-width: 760px) { .foot-main { grid-template-columns: 1fr; gap: 20px; } .contact-cards { grid-template-columns: 1fr; } }

/* ---------- app footer ---------- */
.app-foot { margin: 44px 26px 22px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.app-foot a { color: var(--text-3); font-weight: 600; }
.app-foot a:hover { color: var(--brand-700); }
@media (max-width: 900px) { .app-foot { margin: 24px 16px 20px; } }

/* ---------- responsive ---------- */
.hamburger { display: none; }
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } .hero { grid-template-columns: 1fr; padding-top: 40px; } .hero-side { max-width: 560px; margin-left: 0; } }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-shell.collapsed { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 90;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg);
    /* `height: auto` so the panel is the screen and not the base rule's 100vh — on iOS that is taller than
       what you can see, and the bottom of the menu falls off the device. */
    height: auto;
    /* The part that made the three-line button look dead in the installed app: an off-canvas panel is still
       a 272px-tall-by-272px-wide box sitting over the top-left corner of the screen, one layer above the
       top bar, and it is the first thing under a finger. Safari answers the tap itself. A panel that is
       shut has no business being tappable at all, so say so — the open state takes it back. */
    pointer-events: none;
  }
  .sidebar.open { transform: none; pointer-events: auto; }
  .sidebar .collapse-btn { display: none; }
  .app-shell.collapsed .sidebar .nav-label, .app-shell.collapsed .nav-group-label, .app-shell.collapsed .sidebar-head .brand span, .app-shell.collapsed .user-meta, .app-shell.collapsed .nav-count { display: block; }
  .app-shell.collapsed .nav-item { justify-content: flex-start; padding: 9px 11px; }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(2,4,10,.66); z-index: 80; }
  .hamburger { display: inline-flex; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .content { padding: 18px 16px 70px; }
  .topbar { padding: 10px 16px; }
  .hero h1 { font-size: 2rem; }
  .otp-boxes input { width: 46px; height: 54px; font-size: 19px; }
  .hide-sm { display: none !important; }
}
@media (max-width: 400px) {
  /* “Explore Courses” is the same thing the first button in the hero does, one screen down. On a 320–375px
     phone it is the one thing that can be given back so “Sign in” never rides over the logo. */
  .navbar-in .right .btn-primary { display: none; }
}
@media (max-width: 560px) {
  .navbar-in { padding: 10px 14px; gap: 10px; }
  .navbar-in .btn { padding: 7px 11px; font-size: 13px; }
  .nav-links { display: none; }
  .section { padding: 36px 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1080px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─────────────────────────────────────────────────────────────────────────────
   Live sessions — the booking calendar.
   Three hosts, one set of parts: the reading panel's sidebar (about 300px wide),
   the student's own page, and the school's grid editor. Everything is built to sit
   inside a narrow column first, because that is where a student meets it.
   ───────────────────────────────────────────────────────────────────────────── */
.lsess-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.lsess-day { display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 6px 9px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.lsess-day b { font-size: 12.5px; font-weight: 700; color: var(--text-1); }
.lsess-day span { font-size: 10.5px; color: var(--muted); }
.lsess-day.is-on { border-color: var(--brand); background: var(--brand-soft); }
.lsess-slots { display: flex; flex-direction: column; gap: 6px; }
.lsess-slot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.lsess-slot--mine { border-color: var(--brand); background: var(--brand-soft); }
.lsess-slot--off { border-style: dashed; background: transparent; opacity: .72; }
.lsess-slot__main { min-width: 0; }
.lsess-slot__acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.lsess-time { font-size: 13px; font-weight: 700; letter-spacing: .2px; color: var(--text-1); font-variant-numeric: tabular-nums; }
.lsess-time--big { font-size: 12.5px; }
.lsess-tiny { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.lsess-off { white-space: nowrap; font-size: 10.5px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 8px; }
.lsess-credits { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 4px 0 10px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.lsess-credits__n { display: flex; flex-direction: column; align-items: center; min-width: 46px; }
.lsess-credits__n b { font-size: 24px; line-height: 1; color: var(--brand-bright); }
.lsess-credits--empty .lsess-credits__n b { color: var(--gold); }
.lsess-credits__n span { margin-top: 3px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); text-align: center; }
.lsess-credits__why { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.lsess-credits__why b { font-size: 12px; color: var(--text-1); }
.lsess-credits__why span { color: var(--muted); }
.lsess-policy { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 10px 0 0; padding-left: 8px;
  border-left: 2px solid var(--border-strong); }
.lsess-err { font-size: 12px; color: var(--danger-text); background: var(--rose-soft); border: 1px solid var(--rose-line);
  border-radius: 10px; padding: 8px 10px; margin: 8px 0 0; }
.lsess-ok { font-size: 12px; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-soft-2);
  border-radius: 10px; padding: 8px 10px; margin: 8px 0 0; }
.lsess-note { font-size: 11.5px; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: 10px; padding: 8px 10px; margin: 8px 0 0; }
.lsess-empty, .lsess-loading { display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; margin-top: 8px;
  border: 1px dashed var(--border-strong); border-radius: 12px; font-size: 11.5px; color: var(--muted); }
.lsess-empty b { font-size: 12.5px; color: var(--text-1); }
.lsess-mine { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.lsess-mine__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--brand); border-radius: 10px; background: var(--brand-soft); }
.lsess-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lsess-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.lsess-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); }
.lsess-title { font-size: 14px; font-weight: 700; color: var(--text-1); margin: 0; }
.lsess-sub { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.lsess-badge { margin: 0; font-size: 12px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft);
  border: 1px solid var(--brand-soft-2); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.lsess-card #live-cal-full { padding: 12px 16px 16px; }
.lsess-past { margin-top: 6px; }
/* the school's grid editor */
.lsess-daysrow { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.lsess-dow { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.lsess-dow.is-on { border-color: var(--brand); background: var(--brand-soft); }
.lsess-dow__d { min-width: 74px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.lsess-dow:not(.is-on) .lsess-clock { opacity: .4; }
.lsess-clock { width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
.lsess-dash { color: var(--muted); font-size: 12px; }
.lsess-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; margin: 10px 0; }
.lsess-field { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.lsess-field span { font-weight: 600; color: var(--text-1); }
.lsess-field em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.lsess-field--wide { grid-column: 1 / -1; }
.lsess-preview__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0;
  margin: 0; font-size: 12px; border-bottom: 1px dashed var(--border); }
.lsess-preview__row:last-child { border-bottom: 0; }
.lsess-preview__row span { color: var(--muted); font-size: 11px; }
.lsess-totals { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.lsess-totals b { color: var(--text-1); }
.lsess-acts { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) {
  .lsess-slot, .lsess-mine__row { flex-direction: column; align-items: flex-start; }
  .lsess-slot__acts { width: 100%; justify-content: flex-start; }
  .lsess-credits { align-items: flex-start; }
}
