/* =========================================================================
   Vision Point Academy — design system
   RTL-first, dark/light themes, motion-rich but respectful of reduced motion.
   ========================================================================= */

:root {
  --brand-1: #3566E8;
  --brand-2: #F5AC1B;
  --navy: #15213B;
  /* Primary surfaces go from the accent blue into the brand navy; amber (brand-2) is kept for sparks and highlights. */
  --grad: linear-gradient(135deg, var(--brand-1), color-mix(in srgb, var(--brand-1) 45%, var(--navy)));
  --grad-soft: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 18%, transparent), color-mix(in srgb, var(--brand-2) 14%, transparent));

  --bg: #f5f6fc;
  --bg-2: #eceffa;
  --surface: #ffffff;
  --surface-2: #f2f4fb;
  --surface-3: #e8ebf7;
  --glass: rgba(255, 255, 255, .72);
  --border: rgba(17, 22, 56, .09);
  --border-strong: rgba(17, 22, 56, .16);
  --text: #12152b;
  --text-2: #33385a;
  --muted: #676d90;
  --shadow-sm: 0 1px 2px rgba(17, 22, 56, .06), 0 2px 8px rgba(17, 22, 56, .05);
  --shadow: 0 10px 30px -12px rgba(30, 30, 90, .22);
  --shadow-lg: 0 30px 60px -20px rgba(30, 30, 90, .35);
  --glow: 0 10px 40px -10px color-mix(in srgb, var(--brand-1) 65%, transparent);

  --success: #16a34a;
  --danger: #e11d48;
  --warning: #d97706;
  --info: #2563eb;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --font-display: "Alexandria", "Cairo", system-ui, sans-serif;
  --font: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --nav-h: 72px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #060913;
  --bg-2: #0a0f22;
  --surface: #0f1429;
  --surface-2: #151b36;
  --surface-3: #1c2345;
  --glass: rgba(12, 16, 36, .66);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eef0ff;
  --text-2: #c9cdef;
  --muted: #8f95bd;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 16px 40px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, .85);
  --success: #22c55e;
  --danger: #fb4a6b;
  --warning: #f59e0b;
  --info: #60a5fa;
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; font-size: .9em; direction: ltr; unicode-bidi: embed; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
::selection { background: color-mix(in srgb, var(--brand-1) 35%, transparent); }
:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 3px; border-radius: 8px; }
.i { width: 1.15em; height: 1.15em; flex-shrink: 0; display: inline-block; vertical-align: -.2em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.ltr { direction: ltr; unicode-bidi: embed; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.grad-text { background: linear-gradient(135deg, var(--brand-1) 15%, color-mix(in srgb, var(--brand-1) 55%, #29b6f6)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 } .mb-0 { margin-bottom: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mt-4 { margin-top: 40px }
.mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }

/* ---------- layout ---------- */
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.container-sm { width: min(760px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 110px) 0; position: relative; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 700; color: var(--brand-1);
  background: color-mix(in srgb, var(--brand-1) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-1) 25%, transparent);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
[data-theme="dark"] .eyebrow { color: color-mix(in srgb, var(--brand-1) 55%, white); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* ---------- background art ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5;
  animation: orb 22s ease-in-out infinite alternate;
}
.bg-orbs span:nth-child(1) { width: 520px; height: 520px; background: var(--brand-1); top: -160px; right: -120px; }
.bg-orbs span:nth-child(2) { width: 420px; height: 420px; background: var(--brand-2); bottom: -140px; left: -100px; animation-delay: -7s; opacity: .35; }
.bg-orbs span:nth-child(3) { width: 300px; height: 300px; background: #ff5ca8; top: 40%; left: 45%; animation-delay: -14s; opacity: .18; }
[data-theme="light"] .bg-orbs span { opacity: .22; }
[data-theme="light"] .bg-orbs span:nth-child(3) { opacity: .1; }
@keyframes orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 40px) scale(1.1); }
  100% { transform: translate(40px, -30px) scale(.95); }
}
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}

/* ---------- top progress bar ---------- */
.topbar-progress { position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 1000; pointer-events: none; }
.topbar-progress::after {
  content: ""; display: block; height: 100%; width: var(--p, 0%); background: var(--grad);
  box-shadow: 0 0 12px var(--brand-1); transition: width .3s var(--ease), opacity .4s;
  opacity: var(--o, 0);
}

/* ---------- navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  transition: background .3s, box-shadow .3s, height .3s var(--ease), border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled, .nav.solid {
  background: var(--glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--border); box-shadow: var(--shadow-sm);
}
.nav.scrolled { height: 64px; }
.nav .container { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.brand small { display: block; font-family: var(--font); font-weight: 600; font-size: .72rem; color: var(--muted); line-height: 1.2; }
.brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: start; }
.brand .logo-mark { flex-shrink: 0; transition: transform .6s var(--spring); }
.brand:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }
[data-theme="dark"] .logo-mark .logo-tile { stroke: rgba(255, 255, 255, .14); stroke-width: 1.5; }
.brand-img { height: 40px; width: auto; border-radius: 10px; }
.brand-lg { justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: 18px; }
.nav-links a {
  white-space: nowrap;
  position: relative; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--text-2);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: 2px; right: 50%; transform: translateX(50%);
  width: 18px; height: 3px; border-radius: 3px; background: var(--grad);
}
.nav-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }
@media (max-width: 520px) {
  .nav .container { gap: 8px; }
  .brand { font-size: .95rem; gap: 8px; }
  .brand small { display: none; }
  .brand .logo-mark { width: 36px; height: 36px; }
  .nav-actions { gap: 4px; }
  .nav-actions .btn-primary { padding: 9px 12px; font-size: .85rem; }
  .nav .theme-toggle, .nav .nav-toggle { width: 38px; height: 38px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .hide-sm { display: none; }
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; padding: 90px 24px 24px; gap: 6px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-size: 1.3rem; font-weight: 700; padding: 14px 16px; border-radius: 14px; display: flex; align-items: center; gap: 12px;
  transform: translateY(12px); opacity: 0; transition: transform .4s var(--ease), opacity .4s, background .2s;
}
.mobile-menu.open a { transform: none; opacity: 1; }
.mobile-menu.open a:nth-child(2) { transition-delay: .04s } .mobile-menu.open a:nth-child(3) { transition-delay: .08s }
.mobile-menu.open a:nth-child(4) { transition-delay: .12s } .mobile-menu.open a:nth-child(5) { transition-delay: .16s }
.mobile-menu.open a:nth-child(6) { transition-delay: .2s } .mobile-menu.open a:nth-child(7) { transition-delay: .24s }
.mobile-menu a:hover, .mobile-menu a.active { background: var(--surface-2); }
.mobile-menu .close { position: absolute; top: 16px; left: 16px; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--surface-2); --b-fg: var(--text);
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
  background: var(--b-bg); color: var(--b-fg); font-weight: 700; font-size: .95rem; line-height: 1.2;
  transition: transform .25s var(--spring), box-shadow .25s, background .25s, border-color .25s, opacity .2s;
  white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-primary { --b-fg: #fff; background: var(--grad); box-shadow: var(--glow); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 78%, white), var(--brand-1));
  opacity: 0; transition: opacity .35s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { box-shadow: 0 16px 40px -10px color-mix(in srgb, var(--brand-1) 80%, transparent); }
.btn-outline { --b-bg: transparent; border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--brand-1); color: var(--brand-1); }
[data-theme="dark"] .btn-outline:hover { color: color-mix(in srgb, var(--brand-1) 50%, white); }
.btn-ghost { --b-bg: transparent; }
.btn-ghost:hover { --b-bg: var(--surface-2); }
.btn-danger { --b-bg: color-mix(in srgb, var(--danger) 12%, transparent); --b-fg: var(--danger); }
.btn-danger:hover { --b-bg: var(--danger); --b-fg: #fff; }
.btn-success { --b-bg: var(--success); --b-fg: #fff; }
.btn-white { --b-bg: #fff; --b-fg: #12152b; }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 42px; height: 42px; border-radius: 12px; }
.btn-icon.btn-sm { width: 34px; height: 34px; }
.btn .i { width: 1.2em; height: 1.2em; }
.btn .arrow { transition: transform .3s var(--spring); }
.btn:hover .arrow { transform: translateX(-4px); }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .45); animation: ripple .6s linear; pointer-events: none; z-index: 0; }
@keyframes ripple { to { transform: scale(3); opacity: 0; } }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-outline.loading::after, .btn-ghost.loading::after { border-color: var(--border-strong); border-top-color: var(--brand-1); }
@keyframes spin { to { transform: rotate(360deg); } }

.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.card-sm { padding: 16px; border-radius: var(--radius); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.card-head h3 .i { color: var(--brand-1); }
.glass { background: var(--glass); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); }
.spotlight { overflow: hidden; }
.spotlight::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand-1) 14%, transparent), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }
.hover-lift { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.hover-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand-1) 35%, var(--border)); }
.gradient-border { position: relative; }
.gradient-border::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- badges, chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge .i { width: 13px; height: 13px; }
.badge-primary { background: color-mix(in srgb, var(--brand-1) 14%, transparent); color: var(--brand-1); }
[data-theme="dark"] .badge-primary { color: color-mix(in srgb, var(--brand-1) 45%, white); }
.badge-success { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.badge-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge-warning { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.badge-info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-grad { background: var(--grad); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot-pulse { position: relative; }
.dot-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; transition: all .25s var(--ease);
}
.chip:hover { border-color: var(--brand-1); transform: translateY(-1px); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: .9rem; color: var(--text-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .7; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 16%, transparent); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.select {
  appearance: none; -webkit-appearance: none; padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center;
}
input[type="file"].input { padding: 9px; }
input[type="color"] { width: 56px; height: 44px; padding: 4px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); }
.input-icon { position: relative; }
.input-icon > .i { position: absolute; top: 50%; transform: translateY(-50%); right: 14px; color: var(--muted); pointer-events: none; transition: color .2s; }
.input-icon .input { padding-right: 44px; }
.input-icon:focus-within > .i { color: var(--brand-1); }
.input-icon .pw-toggle { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; color: var(--muted); border-radius: 8px; }
.input-icon .pw-toggle:hover { color: var(--text); }
.input-icon .pw-toggle .i-eye-off { display: none; }
.input-icon .pw-toggle.on .i-eye-off { display: block; }
.input-icon .pw-toggle.on .i-eye { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2, .form-section { grid-column: 1 / -1; }
.form-section { margin: 12px 0 0; font-size: 1rem; padding-top: 8px; border-top: 1px dashed var(--border-strong); }
.form-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui {
  position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--surface-3);
  border: 1px solid var(--border-strong); transition: background .3s; flex-shrink: 0;
}
.switch-ui::after {
  content: ""; position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .35s var(--spring);
}
.switch input:checked + .switch-ui { background: var(--grad); border-color: transparent; }
.switch input:checked + .switch-ui::after { transform: translateX(-20px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--brand-1); outline-offset: 2px; }
.pw-meter { height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .35s var(--ease), background .35s; }

/* ---------- alerts & toasts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-weight: 600; margin-bottom: 12px; border: 1px solid; }
.alert-success { background: color-mix(in srgb, var(--success) 10%, transparent); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }
.alert-error { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.alert-warning { background: color-mix(in srgb, var(--warning) 10%, transparent); border-color: color-mix(in srgb, var(--warning) 30%, transparent); color: var(--warning); }
.alert-info { background: color-mix(in srgb, var(--info) 10%, transparent); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--info); }
.toasts { position: fixed; top: 20px; left: 20px; z-index: 1100; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 40px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-weight: 600; font-size: .95rem;
  animation: toast-in .5s var(--spring) both; position: relative; overflow: hidden;
}
.toast.out { animation: toast-out .35s var(--ease) forwards; }
.toast .t-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.toast .t-icon .i { width: 18px; height: 18px; }
.toast-success .t-icon { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.toast-error .t-icon { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.toast-warning .t-icon { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.toast-info .t-icon { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.toast .t-bar { position: absolute; bottom: 0; right: 0; height: 3px; background: var(--grad); animation: t-bar linear forwards; }
.toast .t-close { margin-inline-start: auto; background: none; border: 0; color: var(--muted); padding: 2px; }
@keyframes toast-in { from { transform: translateX(-120%) scale(.9); opacity: 0; } }
@keyframes toast-out { to { transform: translateX(-120%); opacity: 0; } }
@keyframes t-bar { from { width: 100%; } to { width: 0; } }
@media (max-width: 640px) { .toasts { top: auto; bottom: 84px; left: 16px; right: 16px; width: auto; } }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 20, .55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-box {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px;
  transform: translateY(30px) scale(.96); opacity: 0; transition: transform .45s var(--spring), opacity .3s;
}
.modal-box.wide { width: min(980px, 100%); }
.modal.open .modal-box { transform: none; opacity: 1; }
.modal-close { position: absolute; top: 14px; left: 14px; }

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(.92); transition: opacity .7s var(--ease), transform .7s var(--spring); transition-delay: var(--d, 0s); }
.reveal-scale.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-scale { opacity: 1; transform: none; }
}

/* =========================================================================
   Public: hero
   ========================================================================= */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 clamp(60px, 8vw, 110px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.1rem); line-height: 1.2; margin-bottom: 18px; }
.hero .lead { font-size: clamp(1.02rem, .95rem + .4vw, 1.2rem); color: var(--text-2); max-width: 560px; margin-bottom: 30px; }
.typer { display: inline-block; min-width: 3ch; }
.typer::after { content: ""; display: inline-block; width: 3px; height: .9em; margin-inline-start: 4px; background: var(--brand-2); vertical-align: -.08em; animation: blink 1s steps(2) infinite; border-radius: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; color: var(--muted); font-weight: 600; font-size: .92rem; list-style: none; margin: 0; padding: 0; }
.hero-trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .i { width: 18px; height: 18px; color: var(--brand-1); }
.avatars { display: flex; }
.avatars span {
  width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--bg); margin-inline-start: -10px;
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .8rem;
}
.avatars span:first-child { margin-inline-start: 0; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
/* Hero card: a sample study plan on the road to the final mark (the brand's "vanishing point"). */
.hero-visual { position: relative; max-width: 440px; margin-inline: auto; width: 100%; }
.hero-photo-frame { margin: 0 0 -56px; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-lg); }
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.has-photo .roadmap { margin-inline-start: 28px; }
.roadmap { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 24px 22px 20px; box-shadow: var(--shadow-lg); }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-inline: 4px; }
.rm-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.rm-label .i { width: 20px; height: 20px; color: var(--brand-1); }
.rm-pill { font-size: .75rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.rm-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.rm-steps li, .rm-goal { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 16px; }
.rm-steps li > div, .rm-goal > div { display: grid; line-height: 1.45; min-width: 0; }
.rm-steps b { font-weight: 800; font-size: .97rem; }
.rm-steps small, .rm-goal small { color: var(--muted); font-size: .8rem; font-weight: 600; }
/* the road between the steps: solid where the student has been, road markings ahead */
.rm-steps li::after { content: ""; position: absolute; inset-inline-start: 28px; top: calc(50% + 17px); height: calc(100% - 34px); width: 2px;
  background: repeating-linear-gradient(to bottom, var(--border-strong) 0 6px, transparent 6px 11px); }
.rm-steps li.done::after { background: var(--brand-1); }
.rm-node { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); background: var(--surface); position: relative; z-index: 1; }
.rm-node .i { width: 16px; height: 16px; }
.rm-steps li.done .rm-node { background: var(--brand-1); border-color: var(--brand-1); color: #fff; }
.rm-steps li.now { background: color-mix(in srgb, var(--brand-2) 15%, transparent); }
.rm-steps li.now .rm-node { border-color: var(--brand-2); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-2) 22%, transparent); }
.rm-steps li.now .rm-node::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); }
.rm-state { font-size: .75rem; font-weight: 800; color: var(--muted); }
.rm-steps li.now .rm-state { color: color-mix(in srgb, var(--brand-2) 62%, var(--text)); }
.rm-score { font-family: var(--font-display); font-weight: 800; color: var(--success); direction: ltr; }
.rm-goal { grid-template-columns: 34px minmax(0, 1fr); }
.rm-goal b { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.rm-point { width: 22px; height: 22px; border-radius: 50%; justify-self: center; background: var(--brand-2);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand-2) 22%, transparent), 0 0 26px color-mix(in srgb, var(--brand-2) 55%, transparent); }
.rm-foot { margin: 10px 4px 0; padding-top: 14px; border-top: 1px dashed var(--border); display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; color: var(--text-2); }
.rm-foot .i { width: 18px; height: 18px; color: var(--brand-1); }
.rm-foot small { color: var(--muted); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .rm-steps li.now .rm-node { animation: rm-pulse 2.6s ease-in-out infinite; }
  @keyframes rm-pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand-2) 10%, transparent); } }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
}

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--border); padding: 18px 0; background: var(--surface); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; }
.marquee-track .i { color: var(--brand-1); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(50%); } }

/* stats */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-tile { text-align: center; padding: 28px 16px; }
.stat-tile .num { font-family: var(--font-display); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); font-weight: 800; line-height: 1.1; }
.stat-tile .lbl { color: var(--muted); font-weight: 600; }
.stat-tile .ic { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand-1); }
@media (max-width: 760px) { .stats-band { grid-template-columns: repeat(2, 1fr); } }

/* grade cards */
.grade-card { display: block; padding: 28px; overflow: hidden; }
.grade-card .g-num {
  position: absolute; left: 14px; bottom: -28px; font-family: var(--font-display); font-weight: 800; font-size: 7.5rem; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .16; transition: transform .6s var(--spring), opacity .4s;
}
.grade-card:hover .g-num { transform: scale(1.15) rotate(-6deg); opacity: .3; }
.grade-card .g-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 18px; box-shadow: var(--glow); }
.grade-card .g-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand-1); margin-top: 8px; }
[data-theme="dark"] .grade-card .g-link { color: color-mix(in srgb, var(--brand-1) 50%, white); }

/* course card */
.course-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; transform-style: preserve-3d; will-change: transform; }
.course-card .cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--grad); }
.course-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.course-card:hover .cover img { transform: scale(1.07); }
.cover-art { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .92); overflow: hidden; }
.cover-art::before, .cover-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.cover-art::before { width: 70%; aspect-ratio: 1; top: -30%; left: -15%; }
.cover-art::after { width: 45%; aspect-ratio: 1; bottom: -25%; right: -8%; }
.cover-art strong { position: relative; z-index: 1; font-family: var(--font-display); font-size: 1.35rem; padding: 0 24px; text-align: center; line-height: 1.4; text-shadow: 0 2px 20px rgba(0, 0, 0, .25); }
.course-card .cover .badges { position: absolute; top: 12px; right: 12px; left: 12px; display: flex; justify-content: space-between; z-index: 2; }
.course-card .cover .badge { background: rgba(10, 12, 30, .6); color: #fff; backdrop-filter: blur(8px); }
.course-card .cover .play {
  position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .95); color: var(--brand-1); z-index: 2; transform: scale(.6); opacity: 0; transition: all .45s var(--spring);
}
.course-card:hover .cover .play { transform: scale(1); opacity: 1; }
.course-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card h3 { margin: 0; font-size: 1.12rem; }
.course-card .meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.course-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.course-card .foot { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; margin-top: auto; border-top: 1px dashed var(--border-strong); }
.price { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.price del { font-size: .85rem; color: var(--muted); font-weight: 600; margin-inline-start: 6px; }
.price.free { color: var(--success); }
.progress-line { height: 6px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.progress-line span { display: block; height: 100%; background: var(--grad); border-radius: 6px; width: 0; transition: width 1.2s var(--ease); }

/* features */
.feature { padding: 28px; }
.feature .f-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 18px; background: var(--grad-soft); color: var(--brand-1); transition: transform .5s var(--spring), background .3s, color .3s; }
.feature:hover .f-icon { transform: rotate(-8deg) scale(1.1); background: var(--grad); color: #fff; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; position: relative; }
.step { padding: 32px 26px; text-align: center; }
.step .s-num {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: #fff; background: var(--grad); box-shadow: var(--glow); position: relative;
}
.step .s-num::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--brand-1) 40%, transparent); animation: spin 18s linear infinite; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* faq / accordion */
.accordion { display: flex; flex-direction: column; gap: 12px; }
.acc-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.acc-item.open { border-color: color-mix(in srgb, var(--brand-1) 40%, var(--border)); box-shadow: var(--shadow); }
.acc-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 18px 20px; background: none; border: 0; text-align: start; font-weight: 700; font-size: 1.02rem; }
.acc-head .chev { margin-inline-start: auto; transition: transform .4s var(--spring); color: var(--muted); }
.acc-item.open .acc-head .chev { transform: rotate(180deg); color: var(--brand-1); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.acc-body .acc-inner { padding: 0 20px 18px; color: var(--muted); }

/* cta band */
.cta-band { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(36px, 6vw, 70px); background: var(--grad); color: #fff; text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .25), transparent 40%), radial-gradient(circle at 80% 90%, rgba(0, 0, 0, .2), transparent 45%); }
.cta-band > * { position: relative; }
.cta-band p { opacity: .9; max-width: 560px; margin: 0 auto 26px; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 40px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: 1rem; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a:hover { color: var(--brand-1); }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); transition: all .3s var(--spring); }
.socials a:hover { background: var(--grad); color: #fff; transform: translateY(-3px) rotate(-6deg); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.wa-float {
  position: fixed; bottom: 22px; left: 22px; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .7);
  transition: transform .3s var(--spring);
}
.wa-float:hover { transform: scale(1.1) rotate(-8deg); }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; animation: pulse 2.2s infinite; z-index: -1; }
.wa-float .i { width: 28px; height: 28px; }
.has-bottom-nav .wa-float { bottom: 92px; }

/* page header */
.page-head { padding: 40px 0 24px; position: relative; }
.page-head h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem); margin-bottom: 6px; }
.page-head p { color: var(--muted); margin: 0; }
.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--brand-1); }
.breadcrumbs .i { width: 14px; height: 14px; }

/* filters bar */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.search-box { position: relative; min-width: 240px; flex: 0 1 320px; }
.search-box .i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-right: 42px; border-radius: 999px; }

/* course page */
.course-hero { position: relative; padding: 36px 0 48px; overflow: hidden; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.course-aside { position: sticky; top: calc(var(--nav-h) + 16px); }
.course-aside .cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; position: relative; background: var(--grad); margin-bottom: 18px; }
.course-aside .cover img { width: 100%; height: 100%; object-fit: cover; }
.course-facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.course-facts li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 600; font-size: .92rem; }
.course-facts li .i { color: var(--brand-1); }
.redeem-inline { display: flex; gap: 8px; margin-top: 12px; }
.redeem-inline .input { direction: ltr; text-align: center; letter-spacing: .12em; font-family: ui-monospace, monospace; text-transform: uppercase; }
@media (max-width: 980px) { .course-layout { grid-template-columns: 1fr; } .course-aside { position: static; } }
.curriculum .sec { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.curriculum .sec-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 700; width: 100%; background: none; border: 0; text-align: start; }
.curriculum .sec-head .count { color: var(--muted); font-size: .85rem; font-weight: 600; margin-inline-start: auto; }
.curriculum .sec-head .chev { transition: transform .35s var(--spring); color: var(--muted); }
.curriculum .sec.open .sec-head .chev { transform: rotate(180deg); }
.curriculum .sec-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.curriculum .sec.open .sec-body { grid-template-rows: 1fr; }
.curriculum .sec-body > div { overflow: hidden; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); font-weight: 600; font-size: .95rem; transition: background .2s; }
a.lesson-row:hover { background: var(--surface-2); }
.lesson-row .l-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-1); flex-shrink: 0; }
.lesson-row .l-meta { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; }
.lesson-row.done .l-icon { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.lesson-row.locked { opacity: .6; }
.prose { color: var(--text-2); }
.prose p:last-child { margin-bottom: 0; }

/* =========================================================================
   Auth
   ========================================================================= */
.auth-body { min-height: 100vh; display: flex; }
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; width: 100%; }
.auth-art {
  position: relative; overflow: hidden; background: var(--grad); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-art .brand { color: #fff; }
.auth-art .brand small { color: rgba(255, 255, 255, .75); }
.auth-art h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); max-width: 460px; }
.auth-art p { opacity: .88; max-width: 440px; }
.auth-art .art-lens { position: absolute; left: -120px; bottom: -120px; width: 520px; height: 520px; opacity: .22; animation: spin 60s linear infinite; }
.auth-art .art-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.auth-art .art-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.auth-art .art-list .i { background: rgba(255, 255, 255, .2); padding: 6px; width: 30px; height: 30px; border-radius: 10px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 16px; position: relative; }
.auth-wrap { width: 100%; max-width: 480px; margin: auto; padding: 32px 16px; }
.auth-card { padding: clamp(24px, 4vw, 40px); }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 1.8rem; margin: 16px 0 6px; }
.auth-foot { text-align: center; margin-top: 20px; color: var(--muted); font-weight: 600; }
.auth-foot a { color: var(--brand-1); font-weight: 700; }
.auth-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; }
.auth-steps { display: flex; gap: 8px; margin-bottom: 22px; }
.auth-steps span { flex: 1; height: 5px; border-radius: 5px; background: var(--surface-3); transition: background .4s; }
.auth-steps span.on { background: var(--grad); }
.wizard-step { display: none; animation: step-in .5s var(--ease); }
.wizard-step.active { display: grid; }
@keyframes step-in { from { opacity: 0; transform: translateX(-24px); } }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } .auth-art { display: none; } }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.check.ok span { color: var(--success); } .check.bad span { color: var(--danger); }
.install-steps { line-height: 2.2; }

/* =========================================================================
   Student app
   ========================================================================= */
.app-main { padding: 28px 0 60px; min-height: calc(100vh - var(--nav-h)); }
.wallet-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 800;
  background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--brand-1) 25%, transparent); transition: transform .25s var(--spring);
}
.wallet-chip:hover { transform: scale(1.05); }
.wallet-chip .i { color: var(--brand-1); }
.avatar {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff;
  font-weight: 800; font-size: .95rem; flex-shrink: 0; letter-spacing: -.02em;
}
.avatar-lg { width: 72px; height: 72px; border-radius: 22px; font-size: 1.5rem; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 70;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: top left; transition: all .25s var(--ease);
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-weight: 600; background: none; border: 0; text-align: start; font-size: .95rem; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu .dd-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-menu .dd-head small { color: var(--muted); display: block; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px; border-radius: 16px; }
.user-btn:hover { background: var(--surface-2); }

.bottom-nav {
  display: none; position: fixed; bottom: 0; right: 0; left: 0; z-index: 45; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--border);
}
.bottom-nav .bn-inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 700; color: var(--muted); padding: 6px 0; border-radius: 12px; position: relative; transition: color .2s; }
.bottom-nav a .i { width: 22px; height: 22px; transition: transform .3s var(--spring); }
.bottom-nav a.active { color: var(--brand-1); }
.bottom-nav a.active .i { transform: translateY(-2px) scale(1.12); }
.bottom-nav a.active::before { content: ""; position: absolute; top: -9px; width: 26px; height: 3px; border-radius: 3px; background: var(--grad); }
@media (max-width: 900px) { .bottom-nav { display: block; } .has-bottom-nav { padding-bottom: 76px; } }

.welcome {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 36px); color: #fff; background: var(--grad);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; box-shadow: var(--glow);
}
.welcome::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; left: -120px; top: -160px; background: rgba(255, 255, 255, .12); }
.welcome > * { position: relative; z-index: 1; }
.welcome h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); margin-bottom: 6px; }
.welcome p { opacity: .9; margin: 0; }
.welcome .w-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.welcome .btn-glass { --b-bg: rgba(255, 255, 255, .18); --b-fg: #fff; border-color: rgba(255, 255, 255, .3); }
.welcome .w-balance { text-align: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); border-radius: 20px; padding: 18px 26px; backdrop-filter: blur(10px); }
.welcome .w-balance .num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1.2; }
@media (max-width: 640px) { .welcome { grid-template-columns: 1fr; } }

.kpi { display: flex; align-items: center; gap: 14px; padding: 18px; }
.kpi .k-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.kpi .k-num { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1.2; }
.kpi .k-lbl { color: var(--muted); font-size: .85rem; font-weight: 600; }
.k-purple { background: color-mix(in srgb, var(--brand-1) 14%, transparent); color: var(--brand-1); }
.k-cyan { background: color-mix(in srgb, var(--brand-2) 16%, transparent); color: #9a6200; }
[data-theme="dark"] .k-cyan { color: var(--brand-2); }
.k-green { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.k-amber { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.k-rose { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
@media (max-width: 640px) { .kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; } .kpi .k-num { font-size: 1.2rem; } }

.ring { --size: 64px; --stroke: 7px; position: relative; width: var(--size); height: var(--size); flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: var(--stroke); stroke-linecap: round; }
.ring .track { stroke: var(--surface-3); }
.ring .bar { stroke: url(#ringGrad); transition: stroke-dashoffset 1.4s var(--ease); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: .85rem; font-family: var(--font-display); }
.ring-lg { --size: 150px; --stroke: 11px; }
.ring-lg .val { font-size: 2rem; }

.continue-card { display: flex; align-items: center; gap: 16px; }
.continue-card .play-btn { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: var(--glow); transition: transform .3s var(--spring); }
.continue-card:hover .play-btn { transform: scale(1.1) rotate(-6deg); }
.ann { padding: 14px 0; border-bottom: 1px dashed var(--border-strong); }
.ann:last-child { border-bottom: 0; padding-bottom: 0; }
.ann:first-child { padding-top: 0; }
.ann h4 { margin: 0 0 4px; font-size: 1rem; }
.ann p { margin: 0; color: var(--muted); font-size: .92rem; }

.empty { text-align: center; padding: 48px 20px; }
.empty .e-icon { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 26px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand-1); animation: floaty 5s ease-in-out infinite; }
.empty .e-icon .i { width: 38px; height: 38px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; }

/* wallet */
.wallet-card {
  position: relative; overflow: hidden; border-radius: 28px; padding: 28px; color: #fff; min-height: 220px;
  background: linear-gradient(135deg, var(--navy), color-mix(in srgb, var(--brand-1) 70%, var(--navy)) 60%, var(--brand-1)); box-shadow: var(--glow);
  display: flex; flex-direction: column; justify-content: space-between; transform-style: preserve-3d;
}
.wallet-card::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, .1); top: -140px; left: -80px; }
.wallet-card::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08); bottom: -90px; right: 30px; }
.wallet-card > * { position: relative; z-index: 1; }
.wallet-card .w-num { font-family: var(--font-display); font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); font-weight: 800; line-height: 1.1; }
.wallet-card .w-chip { width: 46px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #ffe08a, #d4a53a); }
.wallet-card .shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .25) 45%, transparent 60%); transform: translateX(100%); animation: shine 5s ease-in-out infinite; z-index: 0; }
@keyframes shine { 0%, 60% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.code-input {
  width: 100%; padding: 18px; border-radius: 16px; border: 2px dashed var(--border-strong); background: var(--surface-2); text-align: center;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: clamp(1.1rem, .9rem + 1vw, 1.5rem); font-weight: 700; letter-spacing: .18em; direction: ltr;
  text-transform: uppercase; outline: none; transition: border-color .25s, background .25s, box-shadow .25s;
}
.code-input:focus { border-color: var(--brand-1); border-style: solid; background: var(--surface); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-1) 15%, transparent); }
.code-input.shake { animation: shake .5s; border-color: var(--danger); }
.code-input.ok { border-color: var(--success); border-style: solid; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.tx-list { display: flex; flex-direction: column; }
.tx { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.tx:last-child { border-bottom: 0; }
.tx .tx-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.tx .tx-amt { font-family: var(--font-display); font-weight: 800; margin-inline-start: auto; white-space: nowrap; direction: ltr; }
.tx .tx-amt.plus { color: var(--success); }
.tx .tx-amt.minus { color: var(--danger); }

/* tabs */
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); position: relative; flex-wrap: wrap; }
.tabs a, .tabs button { position: relative; z-index: 1; padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: .9rem; color: var(--muted); background: none; border: 0; transition: color .25s; display: inline-flex; align-items: center; gap: 6px; }
.tabs a.active, .tabs button.active { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; animation: step-in .4s var(--ease); }
.tab-panel.active { display: block; }

/* =========================================================================
   Learn (lesson player)
   ========================================================================= */
.learn-body { background: var(--bg); }
.learn-top {
  position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--border);
}
.learn-top .lt-title { min-width: 0; }
.learn-top .lt-title strong { display: block; font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.learn-top .lt-title small { display: block; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .learn-top { gap: 6px; padding: 0 10px; } .learn-top .learn-side-toggle span { display: none; } }
.learn-top .lt-progress { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; min-width: 180px; font-weight: 700; font-size: .85rem; }
.learn-top .lt-progress .progress-line { flex: 1; }
@media (max-width: 700px) { .learn-top .lt-progress { display: none; } }
.learn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100vh - 64px); }
.learn-main { padding: 24px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.learn-side { border-inline-start: 1px solid var(--border); background: var(--surface); height: calc(100vh - 64px); position: sticky; top: 64px; overflow-y: auto; transition: transform .4s var(--ease); }
.learn-side .ls-head { padding: 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.learn-side .sec { border: 0; border-radius: 0; margin: 0; border-bottom: 1px solid var(--border); }
.learn-side .lesson-row { padding: 11px 18px; font-size: .9rem; }
.learn-side .lesson-row.current { background: var(--grad-soft); box-shadow: inset -3px 0 0 var(--brand-1); }
.learn-side-toggle { display: none; }
@media (max-width: 1000px) {
  .learn-layout { grid-template-columns: 1fr; }
  .learn-side { position: fixed; top: 64px; bottom: 0; right: 0; width: min(360px, 88vw); z-index: 60; transform: translateX(105%); box-shadow: var(--shadow-lg); height: auto; }
  .learn-side.open { transform: none; }
  .learn-side-toggle { display: inline-flex; }
}
.side-backdrop { position: fixed; inset: 64px 0 0; background: rgba(5, 8, 20, .45); z-index: 55; opacity: 0; visibility: hidden; transition: opacity .3s; }
.side-backdrop.open { opacity: 1; visibility: visible; }

.player-shell { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; isolation: isolate; user-select: none; -webkit-user-select: none; }
.player-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-shell.fake-fs { position: fixed; inset: 0; z-index: 2000; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; height: 100dvh; }
.player-shell:fullscreen { border-radius: 0; aspect-ratio: auto; }
.player-gate { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; padding: 20px; z-index: 3; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--brand-1) 45%, #000), #05060d 70%); }
.player-gate .poster { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; filter: blur(2px); transform: scale(1.05); }
.player-gate > div { position: relative; }
.player-gate .big-play {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; border: 0;
  background: #fff; color: var(--brand-1); box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); animation: ring-pulse 2s infinite; transition: transform .3s var(--spring);
}
.player-gate .big-play:hover { transform: scale(1.1); }
.player-gate .big-play .i { width: 38px; height: 38px; margin-inline-start: 4px; fill: currentColor; }
@keyframes ring-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); } 100% { box-shadow: 0 0 0 28px rgba(255, 255, 255, 0); } }
.player-gate h3 { color: #fff; }
.player-gate p { opacity: .85; margin: 0; }
.player-gate.locked .big-play { background: rgba(255, 255, 255, .15); color: #fff; animation: none; }
.player-controls { position: absolute; top: 12px; left: 12px; z-index: 6; display: flex; gap: 8px; opacity: 0; transition: opacity .3s; }
.player-shell:hover .player-controls, .player-shell.fake-fs .player-controls { opacity: 1; }
.player-controls button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.player-controls button:hover { background: var(--brand-1); }
@media (hover: none) { .player-controls { opacity: 1; } }
/* the watermark */
.wm-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.wm {
  position: absolute; top: 0; left: 0; white-space: nowrap; font-family: var(--font); font-weight: 800; color: #fff;
  font-size: clamp(11px, 1.6vw, 17px); line-height: 1.35; text-align: center; padding: 6px 10px; border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 6px rgba(0, 0, 0, .6);
  transition: transform 2.4s cubic-bezier(.45, 0, .55, 1), opacity .8s; will-change: transform;
}
.wm small { display: block; font-weight: 700; font-size: .82em; direction: ltr; letter-spacing: .06em; }
.wm-tile { position: absolute; inset: -50%; transform: rotate(-24deg); display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; gap: 60px 90px; font-weight: 800; color: rgba(255, 255, 255, .06); font-size: 14px; direction: ltr; }
.player-blocked { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: #05060d; color: #fff; text-align: center; padding: 20px; }
.views-meter { display: flex; align-items: center; gap: 10px; }
.views-meter .pips { display: flex; gap: 4px; }
.views-meter .pips span { width: 22px; height: 8px; border-radius: 4px; background: var(--surface-3); }
.views-meter .pips span.used { background: var(--grad); }
.lesson-title-row { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; margin: 22px 0 10px; flex-wrap: wrap; }
.lesson-title-row h1 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); margin: 0; }
.lesson-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 28px; flex-wrap: wrap; }
.lesson-nav a { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.lesson-nav a small { display: block; color: var(--muted); font-weight: 600; }
.lesson-nav a.next { justify-content: flex-end; text-align: left; }
.file-card { display: flex; align-items: center; gap: 18px; padding: 28px; }
.file-card .f-big { width: 80px; height: 80px; border-radius: 24px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); flex-shrink: 0; }
.file-card .f-big .i { width: 36px; height: 36px; }
@media (max-width: 640px) { .file-card { flex-direction: column; text-align: center; } }
.pdf-frame { width: 100%; height: 75vh; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 18px; background: var(--surface-2); }
.lock-card { text-align: center; padding: 48px 24px; }
.lock-card .e-icon { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }

/* =========================================================================
   Exam
   ========================================================================= */
.focus-top { position: sticky; top: 0; z-index: 50; height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.timer { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; direction: ltr; }
.timer .ring { --size: 44px; --stroke: 5px; }
.timer.warn { color: var(--warning); }
.timer.danger { color: var(--danger); animation: heartbeat 1s infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; padding: 24px 0 80px; }
.exam-side { position: sticky; top: 88px; }
@media (max-width: 960px) { .exam-layout { grid-template-columns: 1fr; } .exam-side { position: static; order: -1; } }
.q-card { padding: clamp(20px, 3vw, 32px); margin-bottom: 18px; scroll-margin-top: 90px; }
.q-card .q-num { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--brand-1); font-size: .9rem; margin-bottom: 10px; }
[data-theme="dark"] .q-card .q-num { color: color-mix(in srgb, var(--brand-1) 50%, white); }
.q-card .q-body { font-size: 1.12rem; font-weight: 700; line-height: 1.8; margin-bottom: 16px; white-space: pre-line; }
.q-card .q-img { border-radius: var(--radius); margin: 0 auto 18px; max-height: 360px; border: 1px solid var(--border); background: #fff; }
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; transition: all .25s var(--ease); }
.choice:hover { border-color: var(--brand-1); transform: translateX(-4px); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .c-key { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; flex-shrink: 0; transition: all .3s var(--spring); }
.choice:has(input:checked), .choice.picked { border-color: var(--brand-1); background: var(--grad-soft); }
.choice:has(input:checked) .c-key, .choice.picked .c-key { background: var(--grad); color: #fff; transform: scale(1.1) rotate(-6deg); }
.choice.correct { border-color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); }
.choice.correct .c-key { background: var(--success); color: #fff; }
.choice.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.choice.wrong .c-key { background: var(--danger); color: #fff; }
.choice.static { cursor: default; }
.choice.static:hover { transform: none; }
.qnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 8px; }
.qnav a { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); border: 1.5px solid var(--border); transition: all .25s var(--spring); font-size: .9rem; }
.qnav a:hover { transform: scale(1.08); }
.qnav a.answered { background: var(--grad); color: #fff; border-color: transparent; }
.qnav a.correct { background: var(--success); color: #fff; border-color: transparent; }
.qnav a.wrong { background: var(--danger); color: #fff; border-color: transparent; }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.save-state.saving { color: var(--warning); }
.save-state.saved { color: var(--success); }
.save-state.error { color: var(--danger); }
.result-hero { text-align: center; padding: clamp(28px, 5vw, 48px); overflow: hidden; }
.result-hero .ring-lg { margin: 0 auto 18px; }
.result-hero.passed { background: linear-gradient(180deg, color-mix(in srgb, var(--success) 10%, var(--surface)), var(--surface)); }
.result-hero.failed { background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 8%, var(--surface)), var(--surface)); }
.explain { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--info) 8%, transparent); border: 1px solid color-mix(in srgb, var(--info) 20%, transparent); font-size: .92rem; }

/* =========================================================================
   Admin
   ========================================================================= */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-inline-start: 0; border-inline-end: 1px solid var(--border);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; transition: transform .4s var(--ease);
}
.admin-side .brand { padding: 6px 10px 20px; }
.admin-side .side-label { font-size: .72rem; font-weight: 800; color: var(--muted); padding: 14px 12px 6px; letter-spacing: .04em; }
.admin-side a.side-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 700; color: var(--text-2);
  transition: background .2s, color .2s, transform .2s; position: relative;
}
.admin-side a.side-link:hover { background: var(--surface-2); color: var(--text); transform: translateX(-3px); }
.admin-side a.side-link.active { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.admin-side a.side-link .i { width: 20px; height: 20px; }
.admin-side .side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.admin-main { min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 40; height: 66px; display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 3vw, 32px); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.admin-top h1 { font-size: 1.2rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-content { padding: clamp(16px, 3vw, 32px); }
.admin-toggle { display: none; }
@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; right: 0; top: 0; bottom: 0; width: 280px; z-index: 80; transform: translateX(105%); box-shadow: var(--shadow-lg); }
  .admin-side.open { transform: none; }
  .admin-toggle { display: inline-flex; }
}
.side-scrim { position: fixed; inset: 0; background: rgba(5, 8, 20, .45); z-index: 75; opacity: 0; visibility: hidden; transition: opacity .3s; }
.side-scrim.open { opacity: 1; visibility: visible; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: start; font-weight: 800; font-size: .78rem; color: var(--muted); padding: 12px 14px; background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr { transition: background .2s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--brand-1) 4%, transparent); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .avatar { width: 36px; height: 36px; border-radius: 12px; font-size: .8rem; }
.user-cell small { display: block; color: var(--muted); direction: ltr; text-align: right; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; background: var(--surface); border: 1px solid var(--border); }
.pagination .active { background: var(--grad); color: #fff; border-color: transparent; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 10px; }
.chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; position: relative; }
.chart .bar { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: var(--grad); height: 0; transition: height 1.1s var(--spring); position: relative; min-height: 3px; }
.chart .bar-col:hover .bar { filter: brightness(1.15); }
.chart .bar-col .tip { position: absolute; bottom: calc(var(--h) + 30px); background: var(--text); color: var(--bg); font-size: .75rem; font-weight: 700; padding: 4px 8px; border-radius: 8px; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: all .2s; pointer-events: none; }
.chart .bar-col:hover .tip { opacity: 1; transform: none; }
.chart .bar-col small { font-size: .68rem; color: var(--muted); font-weight: 700; }
.hbar { display: flex; flex-direction: column; gap: 12px; }
.hbar .row { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; font-weight: 600; font-size: .9rem; }
.builder-sec { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; }
.builder-sec .bs-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.builder-sec .bs-head h3 { margin: 0; font-size: 1.05rem; }
.builder-list { min-height: 48px; padding: 6px; }
.builder-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid transparent; transition: background .2s, border-color .2s, box-shadow .2s, transform .2s; }
.builder-item:hover { background: var(--surface-2); }
.builder-item.dragging { opacity: .5; }
.builder-item.drag-over { border-color: var(--brand-1); }
.drag-handle { cursor: grab; color: var(--muted); padding: 4px; border-radius: 6px; touch-action: none; }
.drag-handle:active { cursor: grabbing; }
.builder-item .l-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-1); flex-shrink: 0; }
.builder-sec.dragging { opacity: .5; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.video-tile { padding: 0; overflow: hidden; cursor: pointer; }
.video-tile .thumb { aspect-ratio: 16/9; background: var(--surface-3) center/cover no-repeat; position: relative; }
.video-tile .thumb .dur { position: absolute; bottom: 8px; left: 8px; background: rgba(0, 0, 0, .75); color: #fff; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; direction: ltr; }
.video-tile .vt-body { padding: 12px 14px; }
.video-tile .vt-body strong { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-tile.selected { outline: 3px solid var(--brand-1); }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 40px 20px; text-align: center; transition: all .3s; cursor: pointer; background: var(--surface); }
.dropzone:hover, .dropzone.over { border-color: var(--brand-1); background: var(--grad-soft); transform: scale(1.01); }
.dropzone .dz-icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.upload-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-top: 10px; }
.upload-item .progress-line { flex: 1; }
.q-admin { padding: 18px 20px; margin-bottom: 12px; }
.q-admin .choices-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px; }
.q-admin .choices-mini div { padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: .88rem; }
.q-admin .choices-mini div.ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); font-weight: 700; }
.choice-edit { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.choice-edit input[type="radio"] { width: 22px; height: 22px; accent-color: var(--success); flex-shrink: 0; }
.cover-preview { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); background: var(--surface-2) center/cover no-repeat; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.color-row { display: flex; align-items: center; gap: 10px; }
.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.type-pick a { padding: 18px; text-align: center; border: 1.5px solid var(--border); border-radius: var(--radius); font-weight: 700; transition: all .25s var(--ease); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.type-pick a .i { width: 26px; height: 26px; color: var(--brand-1); }
.type-pick a:hover { border-color: var(--brand-1); transform: translateY(-3px); }
.type-pick a.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.type-pick a.active .i { color: #fff; }

/* print codes */
.print-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.print-code { border: 1.5px dashed #999; border-radius: 12px; padding: 14px; text-align: center; page-break-inside: avoid; background: #fff; color: #111; }
.print-code strong { font-family: ui-monospace, Menlo, monospace; font-size: 1.15rem; letter-spacing: .1em; direction: ltr; display: block; margin: 6px 0; }
@media print { .no-print { display: none !important; } body { background: #fff; } }

/* confetti canvas */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1500; }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
.table .mono { white-space: nowrap; }
.table td:has(> .mono) { white-space: nowrap; }
.admin-side .brand { font-size: 1rem; }

/* ---------- teachers ---------- */
.avatar-img { object-fit: cover; padding: 0; background: var(--surface-2); }
.teacher-card { text-align: center; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.teacher-card .t-photo { width: 116px; height: 116px; border-radius: 34px; font-size: 2rem; margin-bottom: 8px; box-shadow: var(--glow); transition: transform .5s var(--spring), border-radius .5s var(--ease); }
.teacher-card:hover .t-photo { transform: scale(1.06) rotate(-4deg); border-radius: 50%; }
.teacher-card h3 { margin: 0; }
.teacher-card .t-stats { display: flex; gap: 14px; color: var(--muted); font-size: .85rem; font-weight: 700; margin-top: 6px; }
.teacher-chip { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--text-2); }
.teacher-chip .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: .68rem; }
.teacher-box { display: flex; gap: 16px; align-items: center; }
.teacher-box .avatar { width: 64px; height: 64px; border-radius: 20px; font-size: 1.2rem; }
.teacher-hero { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.teacher-hero .avatar { width: 150px; height: 150px; border-radius: 44px; font-size: 2.6rem; box-shadow: var(--glow); }
@media (max-width: 640px) { .teacher-hero { flex-direction: column; text-align: center; } }

.nav-dd-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--text-2); background: none; border: 0; white-space: nowrap; }
.nav-dd-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-dd .dropdown-menu { left: auto; right: 0; transform-origin: top right; }
.nav-dd.open .nav-dd-btn .i { transform: rotate(180deg); }
.nav-dd-btn .i { transition: transform .3s var(--spring); }

/* ---------- validation ---------- */
.field-msg {
  display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--danger);
  animation: msg-in .3s var(--ease);
}
.field-msg::before { content: "!"; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; font-size: .7rem; flex-shrink: 0; }
@keyframes msg-in { from { opacity: 0; transform: translateY(-4px); } }
.has-error .input, .has-error .select, .has-error .textarea, .has-error .code-input { border-color: var(--danger) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
.has-error > label, .has-error .label { color: var(--danger); }
.has-error .input-icon > .i { color: var(--danger); }
.is-valid .input:not(:focus), .is-valid .select:not(:focus), .is-valid .textarea:not(:focus) { border-color: color-mix(in srgb, var(--success) 70%, var(--border-strong)); }
.is-valid .input-icon::after {
  content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); border-radius: 50%;
  background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
  animation: pop .35s var(--spring);
}
.is-valid .input-icon:has(.pw-toggle)::after { left: 46px; }
@keyframes pop { from { transform: translateY(-50%) scale(0); } }
.shake-field { animation: shake .45s; }
.choice-edit.has-error .input { border-color: var(--danger); }
.switch + .field-msg, .switch .field-msg { margin-top: 4px; }

/* ---------- Fawry ---------- */
.fawry-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: #0f3d91; direction: ltr; }
.fawry-logo b { color: #fbb41d; }
[data-theme="dark"] .fawry-logo { color: #7aa7ff; }
.fawry-logo.small { font-size: 1rem; }
.pay-methods { display: grid; gap: 10px; }
.pay-method { position: relative; cursor: pointer; }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method .pm-body {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border-strong);
  background: var(--surface); transition: all .25s var(--ease);
}
.pay-method .pm-body strong { display: block; }
.pay-method .pm-body small { color: var(--muted); font-weight: 600; }
.pay-method .pm-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-1); flex-shrink: 0; transition: all .3s var(--spring); }
.pay-method:hover .pm-body { border-color: var(--brand-1); transform: translateY(-2px); }
.pay-method input:checked + .pm-body { border-color: var(--brand-1); background: var(--grad-soft); box-shadow: var(--glow); }
.pay-method input:checked + .pm-body .pm-icon { background: var(--grad); color: #fff; transform: rotate(-8deg) scale(1.06); }
.pay-method input:focus-visible + .pm-body { outline: 2px solid var(--brand-1); outline-offset: 2px; }
.amount-chips { margin-bottom: 8px; }
.amount-chips .chip { cursor: pointer; }
.fawry-amount-note { padding: 12px 14px; border-radius: 12px; background: var(--grad-soft); font-weight: 600; font-size: .92rem; }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; margin: 16px 0; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.pay-card { padding: clamp(22px, 4vw, 36px); }
.ref-number {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-radius: 18px;
  background: linear-gradient(135deg, #0f3d91, #1a56c4); color: #fff; margin-bottom: 18px; box-shadow: 0 16px 40px -18px #0f3d91;
}
.ref-number .mono { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); font-weight: 800; letter-spacing: .08em; }
.ref-number .btn { color: #fff; }
.pay-amount { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pay-amount strong { font-family: var(--font-display); font-size: 1.8rem; }
.pay-steps { padding-inline-start: 22px; line-height: 2; margin: 12px 0 0; }
.pay-steps li::marker { color: var(--brand-1); font-weight: 800; }
.is-valid .input-icon .input { padding-left: 42px; }
.is-valid .input-icon:has(.pw-toggle) .input { padding-left: 74px; }
.input-icon:has(.pw-toggle) .input { padding-left: 44px; }

/* =========================================================================
   Mobile polish
   ========================================================================= */
.btn-icon { flex-shrink: 0; }
.exam-intro > .grow { flex: 1 1 260px; min-width: 0; }
.buy-bar { display: none; }

@media (max-width: 980px) {
  /* Course page: price + main action always within thumb reach; hides while the full purchase card is on screen. */
  .buy-bar {
    display: flex; align-items: center; gap: 14px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -14px rgba(5, 8, 20, .35);
    transition: transform .35s var(--ease);
  }
  .buy-bar.away { transform: translateY(115%); }
  .buy-bar .bb-price { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1.15; white-space: nowrap; }
  .buy-bar .bb-price small { display: block; font-family: var(--font); font-size: .72rem; font-weight: 600; color: var(--muted); }
  .buy-bar .bb-price.free { color: var(--success); }
  .buy-bar .btn { flex: 1; }
  body:has(.buy-bar) .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (max-width: 900px) {
  /* Home hero on phones: text and buttons only; the animated illustration is a desktop flourish. */
  .hero-visual { display: none; }
  .hero h1 { margin-bottom: 14px; }
  .hero .lead { margin-bottom: 22px; }
  .hero-cta { margin-bottom: 22px; }
}

@media (max-width: 640px) {
  .hero-cta .btn { flex: 1 1 100%; }
  .exam-intro { justify-content: center; text-align: center; }
  .exam-intro .flex { justify-content: center; }
  .exam-intro .ring-lg { --size: 120px; }
  .exam-intro .badge { white-space: normal; }
  /* Tables scroll sideways inside their frame instead of squeezing names into one word per line. */
  .table td { white-space: nowrap; }
  .table th, .table td { padding: 10px 12px; }
  /* 14-day chart: every other day label so they don't collide. */
  .chart { gap: 4px; height: 170px; }
  .chart .bar-col { min-width: 0; }
  .chart .bar-col small { font-size: .62rem; white-space: nowrap; }
  .chart .bar-col:nth-child(even) small { visibility: hidden; }
  .chart .bar-col:first-child .tip { right: 0; }
  .chart .bar-col:last-child .tip { left: 0; }
  /* Bigger touch targets for small inline links. */
  .breadcrumbs a { padding: 8px 2px; margin: -8px -2px; }
  .auth-card a.small, .flex.between > a.small { padding: 8px 0; margin: -8px 0; }
}

@media (max-width: 520px) {
  /* Keep the full platform name: let it wrap to two short lines instead of cutting it with "…". */
  .brand > span { white-space: normal; line-height: 1.1; font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 380px) {
  .brand > span { font-size: .8rem; }
  .nav-actions .btn-primary { padding: 8px 10px; font-size: .8rem; }
}
/* Mobile browsers: size to the visible screen (the address bar comes and goes), keep clear of the home indicator. */
.modal-box { max-height: calc(100dvh - 32px); }
.learn-side { padding-bottom: env(safe-area-inset-bottom); }
.mobile-menu { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* Persona cards: one message per audience, in the brand voice. */
.persona-card { display: flex; flex-direction: column; gap: 10px; }
.persona-card .p-who { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: .8rem; font-weight: 800; color: var(--brand-1);
  background: color-mix(in srgb, var(--brand-1) 10%, transparent); padding: 5px 12px; border-radius: 999px; }
.persona-card .p-who .i { width: 16px; height: 16px; }
.persona-card h3 { margin: 4px 0 0; font-size: 1.25rem; }
.persona-card p { color: var(--text-2); margin: 0; flex: 1; }
.persona-card .p-tag { font-family: var(--font-display); font-weight: 800; margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--border);
  background: linear-gradient(transparent 58%, color-mix(in srgb, var(--brand-2) 38%, transparent) 58%); background-size: auto; align-self: flex-start; }
[data-theme="dark"] .persona-card .p-who { color: color-mix(in srgb, var(--brand-1) 55%, white); }
.teacher-band { display: flex; align-items: center; gap: 28px; padding: clamp(24px, 4vw, 40px); border-inline-start: 4px solid var(--brand-2); }
.teacher-band h2 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); margin: 8px 0; }
.teacher-band p { margin: 0; max-width: 60ch; }
@media (max-width: 760px) { .teacher-band { flex-direction: column; align-items: stretch; text-align: center; } .teacher-band .eyebrow { align-self: center; } }
.auth-art .art-lens { opacity: .12; animation: none; left: -60px; bottom: -80px; width: 420px; height: 420px; }

/* Wallet balance always in view for students */
.wallet-chip .wc-cur { margin-inline-start: 2px; }
@media (max-width: 900px) {
  .nav-toggle.student-hide { display: none; }
  .has-bottom-nav .buy-bar { bottom: calc(72px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
}
@media (max-width: 520px) {
  .wallet-chip { padding: 7px 10px; gap: 5px; font-size: .85rem; }
  .wallet-chip .wc-cur { display: none; }
}
/* Floating WhatsApp button sits above whatever bars are pinned to the bottom of the screen. */
@media (max-width: 980px) {
  body:has(.buy-bar) .wa-float { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) {
  .has-bottom-nav .wa-float { bottom: calc(88px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav:has(.buy-bar) .wa-float { bottom: calc(154px + env(safe-area-inset-bottom)); }
}

/* Profile photo */
.avatar-xl { width: 104px; height: 104px; border-radius: 32px; font-size: 2rem; }
.avatar-edit { position: relative; width: 104px; margin: 0 auto 14px; }
.avatar-cam { position: absolute; bottom: -6px; left: -6px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--brand-1); color: #fff; border: 3px solid var(--surface); box-shadow: var(--shadow); transition: transform .25s var(--spring); }
.avatar-cam:hover { transform: scale(1.08); }
.avatar-cam:focus-within { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.avatar-cam .i { width: 18px; height: 18px; }
.admin-main .avatar-lg { margin: 0 auto 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

/* Full name next to the avatar (wide screens) */
.top-user { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.top-user > span:last-child, .user-btn .user-name { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-btn .user-name { font-weight: 700; color: var(--text); }
@media (max-width: 1100px) { .user-btn .user-name { display: none; } }
.admin-side .brand > span { white-space: normal; line-height: 1.2; font-size: 1rem; }
