/* =========================================================
   مدار — MADAR
   منصة تعلّم الذكاء الاصطناعي
   Design system: dark · aurora · orbital
   ========================================================= */

:root {
  --bg: #14112d;
  --bg-2: #1e1b4b;
  --ink: #f4f3ee;
  --muted: #c9c7dd;
  --faint: #9b97ba;
  --cyan: #ffd166;
  --violet: #ff6b4a;
  --pink: #ff8a6b;
  --lime: #9fe8c8;
  --warn: #ffd166;
  --danger: #ff8a7a;
  --line: rgba(244, 243, 238, 0.12);
  --line-strong: rgba(244, 243, 238, 0.24);
  --glass: rgba(244, 243, 238, 0.05);
  --glass-2: rgba(244, 243, 238, 0.085);
  --radius: 24px;
  --radius-sm: 14px;
  --grad: linear-gradient(100deg, #ffd166, #ff6b4a 58%, #ff8a6b);
  --grad-soft: linear-gradient(120deg, rgba(255, 209, 102, 0.16), rgba(255, 107, 74, 0.16) 55%, rgba(255, 138, 107, 0.12));
  --shadow: 0 30px 90px -40px rgba(0, 0, 0, 0.95);
  --font: "IBM Plex Sans Arabic", "SF Arabic", "Tajawal", "Almarai", system-ui, -apple-system, sans-serif;
  --mono: "Space Grotesk", "SF Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: rgba(255, 209, 102, 0.28); color: #fff; }

img, svg, canvas { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- background layers ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(255, 107, 74, 0.18), transparent 60%),
    radial-gradient(900px 600px at 10% 10%, rgba(255, 209, 102, 0.12), transparent 60%),
    radial-gradient(800px 800px at 50% 110%, rgba(255, 138, 107, 0.08), transparent 60%),
    var(--bg);
}
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}
.aurora {
  position: absolute;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 24s ease-in-out infinite alternate;
}
.aurora.a1 { background: radial-gradient(circle, rgba(255, 209, 102, 0.55), transparent 62%); top: -12vw; inset-inline-end: -8vw; }
.aurora.a2 { background: radial-gradient(circle, rgba(255, 107, 74, 0.5), transparent 62%); top: 24vh; inset-inline-start: -14vw; animation-delay: -8s; }
.aurora.a3 { background: radial-gradient(circle, rgba(255, 138, 107, 0.35), transparent 62%); bottom: -18vw; inset-inline-end: 18vw; animation-delay: -14s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, 5vh, 0) scale(1.18); }
}

.cursor-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.07), transparent 65%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s;
}
@media (hover: hover) { body.has-cursor .cursor-glow { opacity: 1; } }

/* ---------- utilities ---------- */
.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: -80px; inset-inline-start: 16px; z-index: 200;
  background: var(--cyan); color: #14112d; padding: 10px 18px; border-radius: 10px;
  font-weight: 700; transition: top 0.2s;
}
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); direction: ltr; unicode-bidi: embed; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.sec-head .side .ic { width: 14px; height: 14px; vertical-align: -2px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.section { padding-block: clamp(56px, 7vw, 96px); position: relative; }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.section-line { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em;
  color: var(--cyan); text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 14px var(--cyan);
}
.eyebrow .ar { letter-spacing: 0; color: var(--muted); font-weight: 500; }

.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 44px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.9rem); margin-top: 14px; }
.sec-head p { color: var(--muted); max-width: 52ch; margin-top: 12px; }
.sec-head .side { color: var(--muted); font-size: 14.5px; }

/* ---------- buttons ---------- */
.btn {
  --pad: 13px 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--pad);
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--grad);
  color: #1e1b4b;
  font-weight: 700;
  box-shadow: 0 12px 40px -14px rgba(255, 209, 102, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -14px rgba(255, 107, 74, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-ghost {
  background: var(--glass);
  border-color: var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--glass-2); border-color: rgba(255, 209, 102, 0.45); transform: translateY(-2px); }
.btn-quiet { color: var(--muted); padding: 10px 14px; }
.btn-quiet:hover { color: var(--ink); background: var(--glass); }
.btn-sm { --pad: 9px 16px; font-size: 13.5px; }
.btn-lg { --pad: 16px 30px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-danger { border: 1px solid rgba(255, 138, 122, 0.4); color: var(--danger); background: rgba(255, 138, 122, 0.08); }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--line);
  color: var(--ink); transition: background 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--glass-2); border-color: var(--line-strong); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(4, 5, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand svg { width: 34px; height: 34px; }
.brand-lockup { height: 30px; width: auto; display: block; }
.brand-divider { width: 1px; height: 26px; background: var(--line-strong); display: inline-block; }
.brand-word small { letter-spacing: 0.14em; }
.brand-word { font-size: 21px; font-weight: 700; line-height: 1; }
.brand-word small { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.32em; color: var(--faint); margin-top: 5px; font-weight: 500; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
  padding: 8px 13px; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover, .nav a.active { color: var(--ink); background: var(--glass); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { --pad: 10px 18px; font-size: 14px; }
.menu-toggle { display: none; }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 55;
  background: rgba(5, 7, 13, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 20px 24px 28px;
  display: none;
  flex-direction: column; gap: 6px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 14px; border-radius: 12px; color: var(--muted); font-size: 16px; }
.mobile-menu a:hover { background: var(--glass); color: var(--ink); }
.mobile-menu .btn { margin-top: 10px; }
.mobile-menu a.btn-primary { color: #1e1b4b; padding: 13px 22px; font-weight: 700; }
.mobile-menu a.btn-ghost { color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(120px, 15vh, 168px); padding-bottom: clamp(48px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px; color: var(--muted);
}
.badge-pill b { color: var(--ink); font-weight: 600; }
.badge-pill .dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(159, 232, 200, 0.14); color: var(--lime);
}
.badge-pill .dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-size: clamp(2.35rem, 5.6vw, 4.6rem);
  line-height: 1.16;
  margin: 22px 0 20px;
  letter-spacing: -0.01em;
}
.hero h1 .line { display: block; }
.hero h1 .thin { font-weight: 300; color: var(--muted); }
.hero-sub { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--muted); max-width: 50ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-micro { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; color: var(--faint); font-size: 13px; }
.hero-micro span { display: inline-flex; align-items: center; gap: 6px; }
.hero-micro svg { width: 15px; height: 15px; color: var(--cyan); }
.hero-presenter { display: flex; align-items: center; gap: 11px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); max-width: 470px; }
.hero-presenter img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); background: #f4f3ee; flex: none; }
.hero-presenter div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.hero-presenter span { font-size: 10px; color: var(--faint); letter-spacing: 0.08em; }
.hero-presenter b { font-size: 14px; }
.hero-presenter small { font-size: 11.5px; color: var(--faint); }
.hero-presenter .btn { margin-inline-start: auto; flex: none; }

.hero-visual { position: relative; min-height: 480px; display: grid; place-items: center; }
.orb { position: relative; width: min(100%, 520px); aspect-ratio: 1; }
.orb canvas { width: 100%; height: 100%; display: block; }
.orb::after {
  content: ""; position: absolute; inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 209, 102, 0.16), transparent 62%);
  filter: blur(30px); pointer-events: none;
}
.float-card {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 15px;
  border-radius: 16px;
  background: rgba(9, 12, 22, 0.78);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  font-size: 12.5px; color: var(--muted);
  animation: floaty 7s ease-in-out infinite;
}
.float-card b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.float-card .fi {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--grad-soft); color: var(--cyan);
}
.float-card .fi svg { width: 17px; height: 17px; }
.fc1 { top: 6%; inset-inline-start: -2%; }
.fc2 { bottom: 20%; inset-inline-end: -4%; animation-delay: -2.4s; }
.fc3 { bottom: 2%; inset-inline-start: 10%; animation-delay: -4.8s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 72px);
}
.stat-strip div { padding: 26px 8px; text-align: center; position: relative; }
.stat-strip div + div::before { content: ""; position: absolute; inset-block: 18px; inset-inline-start: 0; width: 1px; background: var(--line); }
.stat-strip b { display: block; font-family: var(--mono); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; }
.stat-strip span { color: var(--faint); font-size: 12.5px; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; position: relative; padding-block: 8px; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 54px; animation: slide 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; white-space: nowrap; }
.marquee-item .sq { width: 6px; height: 6px; background: var(--violet); border-radius: 1px; opacity: 0.7; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(50%); } }
html[dir="rtl"] .marquee-track { animation-name: slide-rtl; }
@keyframes slide-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- cards / grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.outcome {
  padding: 28px 26px; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.outcome:hover { transform: translateY(-4px); border-color: rgba(255, 209, 102, 0.3); }
.outcome::before {
  content: ""; position: absolute; inset-inline-end: -40px; top: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 74, 0.18), transparent 70%);
}
.outcome .idx { font-family: var(--mono); font-size: 12px; color: var(--cyan); letter-spacing: 0.1em; }
.outcome h3 { font-size: 1.12rem; margin: 14px 0 8px; }
.outcome p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.outcome .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); color: var(--cyan); margin-top: 20px; }
.outcome .ico svg { width: 20px; height: 20px; }

/* ---------- curriculum ---------- */
.modules { display: flex; flex-direction: column; gap: 12px; }
.module {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s;
}
.module[open] { border-color: rgba(255, 209, 102, 0.26); background: rgba(255, 255, 255, 0.035); }
.module > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px;
  padding: 18px 22px;
}
.module > summary::-webkit-details-marker { display: none; }
.module .m-no {
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line);
}
.module[open] .m-no { color: var(--cyan); border-color: rgba(255, 209, 102, 0.35); }
.module .m-title { font-weight: 600; font-size: 15.5px; }
.module .m-meta { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.module .m-caret { width: 18px; height: 18px; color: var(--faint); transition: transform 0.3s; }
.module[open] .m-caret { transform: rotate(180deg); color: var(--cyan); }
.lesson-list { border-top: 1px solid var(--line); padding: 6px 10px 10px; }
.lesson-row {
  display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 14px;
  padding: 11px 12px; border-radius: 10px; font-size: 14px;
  transition: background 0.2s;
}
.lesson-row:hover { background: rgba(255, 255, 255, 0.045); }
.lesson-row .l-no { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.lesson-row .l-title { display: flex; align-items: center; gap: 8px; color: #dbe3f8; }
.lesson-row .l-title .free { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: rgba(159, 232, 200, 0.12); color: var(--lime); border: 1px solid rgba(159, 232, 200, 0.25); }
.lesson-row .l-dur { color: var(--faint); font-size: 12px; font-family: var(--mono); direction: ltr; }
.lesson-row .l-ic { color: var(--faint); width: 16px; height: 16px; }
.lesson-row.is-done .l-title { color: var(--muted); }
.lesson-row.is-done .l-ic { color: var(--lime); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--glass); }
.step .n {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--cyan);
  display: inline-flex; align-items: center; gap: 8px;
}
.step .n::before { content: ""; width: 26px; height: 1px; background: var(--cyan); opacity: 0.5; }
.step h3 { margin: 16px 0 8px; font-size: 1.08rem; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- tutor ---------- */
.tutor-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.tutor-copy h2 { font-size: clamp(1.75rem, 3.4vw, 2.7rem); margin: 14px 0 16px; }
.tutor-copy p { color: var(--muted); max-width: 46ch; }
.tutor-points { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.tutor-points li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14.5px; }
.tutor-points svg { width: 18px; height: 18px; color: var(--cyan); flex: none; margin-top: 4px; }

.chat-window { border-radius: var(--radius); border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(12, 16, 28, 0.95), rgba(7, 10, 18, 0.95)); box-shadow: var(--shadow); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.chat-head .avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #1e1b4b; font-weight: 700; font-size: 13px; }
.chat-head b { font-size: 13.5px; display: block; }
.chat-head span { font-size: 11px; color: var(--lime); display: flex; align-items: center; gap: 5px; }
.chat-head span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.chat-body { height: 272px; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.7; }
.msg.bot { align-self: flex-start; background: rgba(255, 255, 255, 0.055); border: 1px solid var(--line); border-start-start-radius: 4px; }
.msg.me { align-self: flex-end; background: rgba(255, 209, 102, 0.12); border: 1px solid rgba(255, 209, 102, 0.22); border-start-end-radius: 4px; }
.chat-suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
.chat-suggest button { font-size: 11.5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.chat-suggest button:hover { color: var(--ink); border-color: var(--line-strong); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; font-size: 13px; color: var(--ink); }
.chat-form input:focus { outline: none; border-color: rgba(255, 209, 102, 0.45); }
.chat-form button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--grad); color: #1e1b4b; display: grid; place-items: center; }
.chat-note { font-size: 10.5px; color: var(--faint); padding: 0 16px 12px; }

/* ---------- instructor ---------- */
.instructor { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.portrait { position: relative; aspect-ratio: 1; max-width: 340px; margin-inline: auto; width: 100%; }
.portrait .ring1, .portrait .ring2 { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 209, 102, 0.25); }
.portrait .ring1 { inset: -4%; animation: spin 30s linear infinite; border-style: dashed; }
.portrait .ring2 { inset: 6%; border-color: rgba(255, 107, 74, 0.25); }
.portrait .core {
  position: absolute; inset: 12%; border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(255, 209, 102, 0.45), rgba(255, 107, 74, 0.25) 45%, rgba(9, 12, 22, 0.9) 72%);
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55), 0 0 80px -20px rgba(255, 209, 102, 0.4);
}
.portrait .core span { font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.portrait .core.photo { padding: 0; background: #f4f3ee; overflow: hidden; }
.portrait .core.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.portrait .badge { position: absolute; bottom: 4%; inset-inline-start: -4%; font-size: 11.5px; padding: 7px 12px; border-radius: 999px; background: rgba(4, 5, 10, 0.9); border: 1px solid var(--line-strong); color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

.instructor h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 12px 0 6px; }
.instructor .role { color: var(--cyan); font-size: 13.5px; margin-bottom: 18px; }
.instructor p { color: var(--muted); max-width: 58ch; }
.inst-stats { display: flex; gap: 32px; margin-top: 26px; flex-wrap: wrap; }
.inst-bio2 { margin-top: 10px; }
.inst-quote { margin: 18px 0 0; padding: 12px 16px; border-inline-start: 2px solid var(--violet); color: var(--ink); font-size: 14.5px; background: var(--glass); border-radius: 0 12px 12px 0; }
.inst-proof { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.inst-proof span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); background: var(--glass); border-radius: 999px; padding: 6px 11px; }
.inst-proof svg { width: 13px; height: 13px; color: var(--lime); }
.inst-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.inst-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--cyan); border: 1px solid rgba(255, 209, 102, 0.25); border-radius: 999px; padding: 6px 11px; background: rgba(255, 209, 102, 0.05); }
.inst-links a:hover { background: rgba(255, 209, 102, 0.12); }
.inst-links svg { width: 12px; height: 12px; }
.inst-card { display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: start; border: 1px solid var(--line); border-radius: 22px; padding: 24px; background: var(--glass); }
.inst-card-photo { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); background: #f4f3ee; }
.inst-card h3 { font-size: 1.25rem; margin-bottom: 2px; }
.inst-card .role { color: var(--cyan); font-size: 12.5px; margin-bottom: 10px; }
.inst-card p { font-size: 13.5px; color: var(--muted); line-height: 1.9; }
.inst-stats b { display: block; font-family: var(--mono); font-size: 1.4rem; }
.inst-stats span { color: var(--faint); font-size: 12px; }

/* ---------- testimonials ---------- */
.quote { padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); display: flex; flex-direction: column; gap: 14px; }
.stars { display: flex; gap: 3px; color: var(--warn); }
.stars svg { width: 14px; height: 14px; }
.quote p { color: #d5dcf0; font-size: 14.5px; line-height: 1.9; }
.quote footer { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.quote .av { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-soft); border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--cyan); }
.quote b { display: block; font-size: 13px; }
.quote span { color: var(--faint); font-size: 11.5px; }
.fineprint { color: var(--faint); font-size: 11.5px; margin-top: 14px; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.pricing-copy h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); margin: 14px 0 16px; }
.pricing-copy p { color: var(--muted); max-width: 46ch; }
.benefit-list { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.benefit-list li { display: flex; gap: 10px; color: #cfd7ea; font-size: 14.5px; }
.benefit-list svg { width: 18px; height: 18px; color: var(--lime); flex: none; margin-top: 4px; }
.glow-border { background: var(--grad); padding: 1px; border-radius: 26px; box-shadow: 0 30px 80px -40px rgba(255, 107, 74, 0.6); }
.price-card { border-radius: 25px; background: linear-gradient(180deg, #1e1b4b, #16132f); padding: 30px; position: relative; overflow: hidden; }
.price-card::before { content: ""; position: absolute; inset-inline-end: -60px; top: -60px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255, 209, 102, 0.22), transparent 70%); }
.plan-tag { display: inline-flex; padding: 4px 11px; border-radius: 999px; font-size: 11px; background: rgba(255, 209, 102, 0.12); color: var(--cyan); border: 1px solid rgba(255, 209, 102, 0.25); }
.price { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 4px; }
.price .num { font-family: var(--mono); font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 500; line-height: 1; }
.price .cur { color: var(--muted); font-size: 15px; }
.price-old { color: var(--faint); text-decoration: line-through; font-size: 14px; margin-inline-start: 6px; }
.price-note { color: var(--faint); font-size: 12px; }
.price-card hr { margin: 22px 0; }
.plan-features { display: flex; flex-direction: column; gap: 11px; margin-bottom: 24px; }
.plan-features li { display: flex; gap: 9px; font-size: 13.5px; color: #cbd3e8; }
.plan-features svg { width: 17px; height: 17px; color: var(--lime); flex: none; margin-top: 3px; }
.guarantee { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; color: var(--faint); font-size: 11.5px; line-height: 1.6; }
.guarantee svg { width: 16px; height: 16px; color: var(--muted); flex: none; margin-top: 2px; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 20px; font-weight: 600; font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pl { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--muted); transition: transform 0.3s, color 0.3s; }
.faq details[open] summary .pl { transform: rotate(45deg); color: var(--cyan); border-color: rgba(255, 209, 102, 0.4); }
.faq .answer { color: var(--muted); font-size: 14px; padding: 0 0 22px; max-width: 75ch; }

/* ---------- CTA ---------- */
.cta-panel {
  position: relative; overflow: hidden;
  border-radius: 30px; border: 1px solid var(--line-strong);
  background:
    radial-gradient(700px 300px at 85% 0%, rgba(255, 107, 74, 0.22), transparent 60%),
    radial-gradient(600px 300px at 10% 100%, rgba(255, 209, 102, 0.16), transparent 60%),
    #1a1740;
  padding: clamp(34px, 6vw, 64px);
  text-align: center;
}
.cta-panel .rings { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 900px; height: 900px; pointer-events: none; opacity: 0.5; }
.cta-panel .rings i { position: absolute; inset: 0; border: 1px solid rgba(255, 209, 102, 0.1); border-radius: 50%; }
.cta-panel .rings i:nth-child(2) { inset: 12%; }
.cta-panel .rings i:nth-child(3) { inset: 24%; }
.cta-panel > * { position: relative; }
.cta-panel h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); margin-bottom: 14px; }
.cta-panel p { color: var(--muted); max-width: 50ch; margin-inline: auto; }
.lead-form { display: flex; gap: 10px; max-width: 480px; margin: 26px auto 0; flex-wrap: wrap; }
.lead-form input { flex: 1; min-width: 200px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-strong); border-radius: 999px; padding: 13px 20px; font-size: 14px; color: var(--ink); }
.lead-form input:focus { outline: none; border-color: rgba(255, 209, 102, 0.5); }
.lead-form .btn { flex: none; }
.cta-note { font-size: 11.5px; color: var(--faint); margin-top: 12px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 40px; position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--faint); font-size: 13px; max-width: 34ch; margin-top: 14px; }
.footer-col h4 { font-size: 12px; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 14px; font-weight: 600; }
.footer-col a, .footer-col button { display: block; color: var(--muted); font-size: 13.5px; padding: 5px 0; background: none; border: 0; text-align: right; }
.footer-col a:hover, .footer-col button:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; color: var(--faint); font-size: 12px; }
body.app-mode .site-footer { display: none; }

/* ---------- inner page hero ---------- */
.page-hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 36px; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12.5px; margin-bottom: 18px; }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 14px; height: 14px; }
.course-brand { display: inline-block; background: #f4f3ee; border-radius: 14px; padding: 10px 14px; margin-bottom: 18px; }
.course-brand img { width: 260px; max-width: 100%; height: auto; display: block; }
.page-hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); }
.page-hero p { color: var(--muted); max-width: 60ch; margin-top: 12px; }
.page-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: var(--faint); font-size: 13px; }
.page-meta span { display: inline-flex; align-items: center; gap: 6px; }
.page-meta svg { width: 15px; height: 15px; color: var(--cyan); }

/* ---------- course layout ---------- */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: clamp(28px, 4vw, 52px); align-items: start; }
.course-main > section + section { margin-top: 54px; }
.course-side { position: sticky; top: calc(var(--header-h) + 18px); }
.side-card { border-radius: 22px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #1e1b4b, #16132f); padding: 24px; }
.side-card h3 { font-size: 1rem; margin-bottom: 16px; }
.side-card .price { margin-top: 0; }
.side-card .btn + .btn { margin-top: 10px; }
.side-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.side-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 9px; }
.side-list li:last-child { border: 0; padding-bottom: 0; }
.side-list b { color: var(--ink); font-weight: 500; }
.side-note { display: flex; gap: 8px; color: var(--faint); font-size: 11px; margin-top: 14px; }
.side-note svg { width: 15px; height: 15px; flex: none; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 12.5px; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: rgba(255, 209, 102, 0.5); box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.1);
}
.field input::placeholder, .field textarea::placeholder { color: #586280; }
.field .hint { font-size: 11px; color: var(--faint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.6; }
.check input { width: 16px; height: 16px; margin-top: 3px; accent-color: #ffd166; }
.check a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.error-text { color: var(--danger); font-size: 12px; margin-top: 6px; display: none; }
.error-text.show { display: block; }

/* ---------- checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) 390px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 22px; background: var(--glass); padding: 26px; }
.panel + .panel { margin-top: 18px; }
.panel h2, .panel h3 { font-size: 1.05rem; margin-bottom: 6px; }
.panel .panel-sub { color: var(--faint); font-size: 12.5px; margin-bottom: 20px; }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pay-option { position: relative; }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-option label {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  font-size: 13px; color: var(--muted); transition: border-color 0.2s, background 0.2s;
}
.pay-option label:hover { border-color: var(--line-strong); }
.pay-option input:checked + label { border-color: rgba(255, 209, 102, 0.55); background: rgba(255, 209, 102, 0.07); color: var(--ink); }
.pay-option .pm-ico { width: 34px; height: 22px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; font-family: var(--mono); font-size: 9px; direction: ltr; color: #cfd7ea; flex: none; }
.summary { position: sticky; top: calc(var(--header-h) + 18px); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted); padding: 7px 0; }
.summary-row b { color: var(--ink); font-weight: 500; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; }
.summary-total .num { font-family: var(--mono); font-size: 1.9rem; }
.coupon-row { display: flex; gap: 8px; margin: 14px 0 4px; }
.coupon-row input { flex: 1; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; color: var(--ink); }
.coupon-row input:focus { outline: none; border-color: rgba(255, 209, 102, 0.4); }
.secure-note { display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: 11px; margin-top: 14px; justify-content: center; }
.secure-note svg { width: 14px; height: 14px; }
.success-box { text-align: center; padding: clamp(28px, 5vw, 54px); }
.success-icon { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: rgba(159, 232, 200, 0.1); border: 1px solid rgba(159, 232, 200, 0.35); color: var(--lime); box-shadow: 0 0 60px -10px rgba(159, 232, 200, 0.35); }
.success-icon svg { width: 34px; height: 34px; }
.success-box h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.success-box p { color: var(--muted); margin-top: 10px; }
.invoice { text-align: right; margin-top: 26px; border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, 0.25); padding: 20px; }
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px dashed var(--line); padding-bottom: 14px; margin-bottom: 10px; }
.invoice-head b { font-size: 14px; }
.invoice-head span { color: var(--faint); font-size: 11.5px; display: block; }
.invoice table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.invoice th { text-align: right; color: var(--faint); font-weight: 500; padding: 6px 0; }
.invoice td { padding: 8px 0; color: var(--muted); }
.invoice td.num { font-family: var(--mono); direction: ltr; text-align: left; color: var(--ink); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: calc(var(--header-h) + 30px) 20px 60px; }
.auth-card { width: min(430px, 100%); border: 1px solid var(--line-strong); border-radius: 26px; background: linear-gradient(180deg, rgba(12, 16, 28, 0.96), rgba(6, 8, 14, 0.98)); padding: 32px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset-inline-start: -80px; top: -80px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(255, 107, 74, 0.25), transparent 70%); }
.auth-card > * { position: relative; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-card h1 { font-size: 1.5rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 24px; }
.oauth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 11px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-switch { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 18px; }
.auth-switch button { background: none; border: 0; color: var(--cyan); font-size: 12.5px; padding: 0; }
.otp-input { text-align: center; font-family: var(--mono); font-size: 26px !important; letter-spacing: 0.5em; direction: ltr; padding-inline-start: 0.5em !important; }
.demo-code { background: rgba(159, 232, 200, 0.07); border: 1px dashed rgba(159, 232, 200, 0.3); color: var(--lime); border-radius: 10px; padding: 9px 12px; font-size: 11.5px; margin-bottom: 14px; text-align: center; }
.quick-demo { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; text-align: center; }
.quick-demo button { background: none; border: 0; color: var(--faint); font-size: 11.5px; text-decoration: underline; text-underline-offset: 3px; }
.quick-demo button:hover { color: var(--muted); }

/* ---------- dashboard ---------- */
.dash { padding-top: calc(var(--header-h) + 30px); padding-bottom: 60px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.dash-head h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.dash-head p { color: var(--faint); font-size: 13px; margin-top: 4px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-stack { display: flex; flex-direction: column; gap: 20px; }
.continue {
  position: relative; overflow: hidden; border-radius: 24px; border: 1px solid rgba(255, 209, 102, 0.24);
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(255, 107, 74, 0.28), transparent 60%),
    radial-gradient(500px 260px at 0% 100%, rgba(255, 209, 102, 0.16), transparent 60%),
    #1a1740;
  padding: 28px; display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap;
}
.continue .tag { color: var(--cyan); font-size: 11.5px; letter-spacing: 0.08em; }
.continue h2 { font-size: clamp(1.2rem, 2.4vw, 1.7rem); margin: 8px 0 6px; }
.continue p { color: var(--muted); font-size: 13px; }
.continue .actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ring-wrap { position: relative; width: 128px; height: 128px; flex: none; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .pct { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-wrap .pct b { font-family: var(--mono); font-size: 1.5rem; display: block; line-height: 1; }
.ring-wrap .pct span { font-size: 9.5px; color: var(--faint); display: block; margin-top: 4px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--glass); }
.kpi .k-label { color: var(--faint); font-size: 11px; display: flex; align-items: center; gap: 6px; }
.kpi .k-label svg { width: 13px; height: 13px; color: var(--cyan); }
.kpi b { display: block; font-family: var(--mono); font-size: 1.5rem; margin-top: 8px; font-weight: 500; }
.kpi small { color: var(--faint); font-size: 10.5px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h3 { font-size: 14.5px; }
.panel-head a, .panel-head button { font-size: 11.5px; color: var(--cyan); background: none; border: 0; }
.path-item { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.path-item:last-child { border-bottom: 0; }
.path-item .p-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); color: var(--muted); flex: none; }
.path-item.done .p-ic { background: rgba(159, 232, 200, 0.1); color: var(--lime); border-color: rgba(159, 232, 200, 0.25); }
.path-item .p-txt { flex: 1; min-width: 0; }
.path-item b { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.path-item span { color: var(--faint); font-size: 11px; }
.progress-line { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 6px; }
.progress-line i { display: block; height: 100%; background: var(--grad); border-radius: 4px; }
.cert-card { text-align: center; padding: 24px; }
.cert-card .seal { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: rgba(159, 232, 200, 0.08); border: 1px solid rgba(159, 232, 200, 0.25); color: var(--lime); }
.cert-card.locked .seal { background: var(--glass); border-color: var(--line); color: var(--faint); }
.cert-card h3 { font-size: 14px; }
.cert-card p { color: var(--faint); font-size: 11.5px; margin: 6px 0 14px; }
.referral { display: flex; gap: 8px; margin-top: 12px; }
.referral input { flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 11px; color: var(--muted); direction: ltr; text-align: left; }
.referral button { flex: none; }

/* ---------- lesson player ---------- */
.lesson-shell { padding-top: calc(var(--header-h) + 22px); padding-bottom: 60px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.player {
  position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(600px 300px at 70% 20%, rgba(255, 107, 74, 0.32), transparent 60%),
    radial-gradient(500px 300px at 20% 80%, rgba(255, 209, 102, 0.2), transparent 60%),
    #1a1740;
  display: grid; place-items: center;
}
.player::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}
.player .p-center { position: relative; text-align: center; }
.player.has-video { display: block; background: #000; }
.player.has-video video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.video-badge { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 3; font-size: 10.5px; color: #f4f3ee; background: rgba(20, 17, 45, 0.78); border: 1px solid rgba(244, 243, 238, 0.2); border-radius: 999px; padding: 5px 11px; backdrop-filter: blur(8px); }
.player .p-center .lesson-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--cyan); margin-bottom: 10px; display: block; }
.player .p-center h2 { font-size: clamp(1.1rem, 2.4vw, 1.6rem); max-width: 30ch; margin-inline: auto; }
.play-btn {
  width: 78px; height: 78px; border-radius: 50%; border: 0; margin-top: 22px;
  background: var(--grad); color: #1e1b4b;
  display: inline-grid; place-items: center;
  box-shadow: 0 0 0 12px rgba(255, 209, 102, 0.07), 0 20px 50px -12px rgba(255, 209, 102, 0.6);
  transition: transform 0.25s var(--ease);
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 30px; height: 30px; margin-inline-start: 3px; }
.player.is-playing .p-center { opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.player .fake-video { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.player.is-playing .fake-video { opacity: 1; }
.player .fake-video .wave { display: flex; gap: 5px; align-items: flex-end; height: 70px; }
.player .fake-video .wave i { width: 5px; background: linear-gradient(to top, var(--violet), var(--cyan)); border-radius: 4px; animation: eq 1.2s ease-in-out infinite; }
.player .fake-video .wave i:nth-child(2n) { animation-delay: -0.3s; }
.player .fake-video .wave i:nth-child(3n) { animation-delay: -0.6s; }
.player .fake-video .wave i:nth-child(4n) { animation-delay: -0.9s; }
@keyframes eq { 0%, 100% { height: 18%; } 50% { height: 100%; } }
.player .fake-video p { color: var(--faint); font-size: 11.5px; margin-top: 16px; }
.player-bar { position: absolute; bottom: 0; inset-inline: 0; padding: 14px 18px; display: flex; align-items: center; gap: 12px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); font-size: 11px; color: var(--muted); }
.player-bar .bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.player-bar .bar i { display: block; width: 0; height: 100%; background: var(--grad); transition: width 0.4s linear; }
.player-bar .t { font-family: var(--mono); direction: ltr; }
.lesson-head { margin-top: 20px; }
.lesson-head .l-meta { display: flex; gap: 14px; color: var(--faint); font-size: 11.5px; flex-wrap: wrap; }
.lesson-head h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 8px 0 10px; }
.lesson-head p { color: var(--muted); font-size: 14px; }
.lesson-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 26px; overflow-x: auto; }
.lesson-tabs button { background: none; border: 0; color: var(--faint); padding: 11px 14px; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.lesson-tabs button.active { color: var(--ink); border-bottom-color: var(--cyan); }
.tab-pane { padding-top: 22px; display: none; }
.tab-pane.active { display: block; }
.prose h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.prose h4 { font-size: 0.95rem; margin: 18px 0 6px; color: var(--cyan); }
.prose p { color: var(--muted); font-size: 14.5px; line-height: 1.95; margin-bottom: 12px; }
.prose ul { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 18px; }
.prose ul li { display: flex; gap: 9px; color: var(--muted); font-size: 14px; }
.prose ul li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); flex: none; margin-top: 9px; }
.prose .callout { border: 1px solid rgba(255, 209, 102, 0.22); background: rgba(255, 209, 102, 0.05); border-radius: 14px; padding: 16px 18px; margin: 18px 0; }
.prose .callout b { color: var(--cyan); font-size: 12px; display: block; margin-bottom: 4px; }
.prose .callout p { margin: 0; font-size: 13.5px; color: var(--muted); }
.transcript { display: flex; flex-direction: column; gap: 2px; }
.t-line { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.05); }
.t-line .t { font-family: var(--mono); font-size: 11px; color: var(--cyan); direction: ltr; padding-top: 4px; }
.t-line p { color: var(--muted); font-size: 13.5px; }
.notes-area { width: 100%; min-height: 180px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 13.5px; color: var(--ink); resize: vertical; }
.notes-area:focus { outline: none; border-color: rgba(255, 209, 102, 0.45); }
.resource-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.resource-row .r-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); color: var(--cyan); flex: none; }
.resource-row b { display: block; font-size: 13px; font-weight: 500; }
.resource-row span { color: var(--faint); font-size: 11px; }
.resource-row .btn { margin-inline-start: auto; }
.quiz { border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: var(--glass); margin-top: 26px; }
.quiz .q-tag { font-size: 10.5px; color: var(--cyan); letter-spacing: 0.1em; }
.quiz h3 { font-size: 1rem; margin: 8px 0 14px; }
.quiz-option { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; cursor: pointer; font-size: 13.5px; color: var(--muted); transition: border-color 0.2s, background 0.2s; }
.quiz-option:hover { border-color: var(--line-strong); }
.quiz-option.correct { border-color: rgba(159, 232, 200, 0.5); background: rgba(159, 232, 200, 0.07); color: var(--ink); }
.quiz-option.wrong { border-color: rgba(255, 138, 122, 0.5); background: rgba(255, 138, 122, 0.07); }
.quiz-option input { accent-color: #ffd166; }
.quiz-feedback { font-size: 12.5px; color: var(--muted); margin-top: 12px; display: none; }
.quiz-feedback.show { display: block; }
.lesson-side { position: sticky; top: calc(var(--header-h) + 18px); border: 1px solid var(--line); border-radius: 20px; background: rgba(9, 12, 21, 0.7); overflow: hidden; }
.lesson-side .ls-head { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.lesson-side .ls-head b { display: block; font-size: 13px; }
.lesson-side .ls-head span { color: var(--faint); font-size: 11px; }
.ls-body { max-height: 62vh; overflow-y: auto; padding: 10px; scrollbar-width: thin; }
.ls-module { margin-bottom: 8px; }
.ls-module > b { display: block; font-size: 11.5px; color: var(--faint); padding: 10px 10px 6px; }
.ls-lesson { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; font-size: 12px; color: var(--muted); }
.ls-lesson:hover { background: var(--glass); color: var(--ink); }
.ls-lesson.current { background: rgba(255, 209, 102, 0.09); color: var(--ink); border: 1px solid rgba(255, 209, 102, 0.22); }
.ls-lesson .st { width: 15px; height: 15px; flex: none; color: var(--faint); }
.ls-lesson.done .st { color: var(--lime); }
.ls-lesson.current .st { color: var(--cyan); }

/* ---------- certificate ---------- */
.cert-wrap { padding-top: calc(var(--header-h) + 40px); padding-bottom: 70px; }
.certificate {
  position: relative; border-radius: 24px; overflow: hidden; padding: clamp(26px, 5vw, 58px);
  border: 1px solid rgba(255, 209, 102, 0.3);
  background:
    radial-gradient(700px 400px at 80% 0%, rgba(255, 107, 74, 0.22), transparent 60%),
    radial-gradient(600px 400px at 10% 100%, rgba(255, 209, 102, 0.14), transparent 60%),
    linear-gradient(180deg, #1a1740, #14112d);
  box-shadow: 0 40px 120px -50px rgba(255, 209, 102, 0.4);
}
.certificate::before {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; pointer-events: none;
}
.certificate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 12px);
}
.cert-inner { position: relative; z-index: 1; text-align: center; }
.cert-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.cert-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.26em; color: var(--cyan); }
.certificate h1 { font-size: clamp(1.6rem, 4vw, 2.9rem); margin: 26px 0 6px; }
.cert-name { font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 12px 0; }
.cert-desc { color: var(--muted); font-size: 13.5px; max-width: 56ch; margin-inline: auto; }
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; border-top: 1px solid var(--line); padding-top: 22px; text-align: right; }
.cert-grid span { display: block; color: var(--faint); font-size: 10.5px; }
.cert-grid b { font-size: 12.5px; font-weight: 500; }
.cert-code { font-family: var(--mono); direction: ltr; color: var(--cyan); font-size: 12px; }
.cert-seal { position: absolute; bottom: 26px; inset-inline-end: 26px; width: 78px; height: 78px; opacity: 0.9; }
.cert-actions { display: flex; gap: 10px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.verify-card { max-width: 560px; margin: 0 auto; }

/* ---------- admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.demo-flag { font-size: 10.5px; color: var(--warn); border: 1px solid rgba(255, 204, 102, 0.3); background: rgba(255, 204, 102, 0.07); border-radius: 999px; padding: 3px 10px; }
.kpi-grid.four { grid-template-columns: repeat(4, 1fr); }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart .col i { width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, rgba(255, 209, 102, 0.25), rgba(255, 107, 74, 0.85)); min-height: 4px; }
.chart .col span { font-size: 9.5px; color: var(--faint); }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th { text-align: right; color: var(--faint); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font-size: 10px; padding: 3px 9px; border-radius: 999px; }
.badge.ok { background: rgba(159, 232, 200, 0.1); color: var(--lime); }
.badge.wait { background: rgba(255, 204, 102, 0.1); color: var(--warn); }
.badge.off { background: rgba(255, 138, 122, 0.1); color: var(--danger); }

/* ---------- palette ---------- */
.palette-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(2, 3, 7, 0.72); backdrop-filter: blur(8px); display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.palette-overlay.open { display: flex; }
.palette { width: min(620px, calc(100% - 32px)); border: 1px solid var(--line-strong); border-radius: 18px; background: #1a1740; box-shadow: 0 40px 120px -30px #000; overflow: hidden; }
.palette-search { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.palette-search svg { width: 18px; height: 18px; color: var(--faint); }
.palette-search input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; color: var(--ink); }
.palette-search kbd { font-family: var(--mono); font-size: 10px; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }
.palette-list { max-height: 360px; overflow-y: auto; padding: 8px; }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: right; padding: 11px 12px; border: 0; background: none; border-radius: 10px; color: var(--muted); font-size: 13.5px; }
.palette-item svg { width: 17px; height: 17px; color: var(--faint); }
.palette-item .p-k { margin-inline-start: auto; font-size: 10px; color: var(--faint); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; }
.palette-item:hover, .palette-item.sel { background: rgba(255, 209, 102, 0.08); color: var(--ink); }
.palette-item.sel svg { color: var(--cyan); }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 150; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto; min-width: 260px; max-width: 360px;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 15px; border-radius: 13px;
  background: rgba(10, 14, 24, 0.96); border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px -20px #000; font-size: 12.5px; color: var(--ink);
  animation: toastIn 0.35s var(--ease);
}
.toast.ok { border-color: rgba(159, 232, 200, 0.35); }
.toast.err { border-color: rgba(255, 138, 122, 0.4); }
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.toast.ok svg { color: var(--lime); }
.toast.err svg { color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 0; min-height: 380px; margin-top: 8px; margin-bottom: 8px; }
  .orb { width: min(76vw, 420px); }
  .fc1 { inset-inline-start: 0; }
  .fc2 { inset-inline-end: 0; }
  .course-layout, .checkout-grid { grid-template-columns: 1fr; }
  .course-side, .summary { position: static; }
  .lesson-shell { grid-template-columns: 1fr; }
  .lesson-side { position: static; }
  .ls-body { max-height: 320px; }
  .dash-grid { grid-template-columns: 1fr; }
  .tutor-grid, .instructor, .pricing-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 260px; }
  .inst-card { grid-template-columns: 1fr; }
  .inst-card-photo { width: 120px; height: 120px; }
  .hero-presenter .btn { display: none; }
  .kpi-grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .brand-word small { display: none; }
  .brand-lockup { height: 28px; }
  .header-actions .btn-ghost { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-inner { gap: 14px; }
  .brand { margin-inline-end: auto; }
  .header-actions { margin-inline-start: 0; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip div:nth-child(3)::before { display: none; }
  .stat-strip div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .brand-word { display: none; }
  .brand-divider { display: none; }
  .brand-lockup { height: 24px; }
  .course-brand img { width: 210px; }
  .container { width: calc(100% - 32px); }
  .header-inner { width: calc(100% - 32px); }
  .hero { padding-top: 100px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-micro { gap: 10px 16px; }
  .float-card { font-size: 11px; padding: 9px 11px; }
  .float-card .fi { width: 28px; height: 28px; }
  .fc3 { display: none; }
  .module > summary { padding: 14px 14px; gap: 10px; }
  .module .m-meta { display: none; }
  .lesson-row { grid-template-columns: 22px 1fr auto auto; }
  .hero-visual { min-height: 300px; }
  .orb { width: min(78vw, 320px); }
  .field-row { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
  .quote { padding: 20px; }
  .kpi-grid, .kpi-grid.four { grid-template-columns: 1fr 1fr; }
  .cert-grid { grid-template-columns: 1fr; text-align: center; }
  .continue { padding: 20px; }
  .ring-wrap { width: 104px; height: 104px; }
  .ring-wrap svg { width: 104px; height: 104px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .toasts { inset-inline: 16px; bottom: 16px; }
  .toast { width: 100%; max-width: none; }
  .certificate { padding: 26px 18px; }
  .cert-top { flex-direction: column; gap: 10px; }
}

/* ---------- motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
@media print {
  .site-header, .site-footer, .cert-actions, .bg, .toasts, .menu-toggle { display: none !important; }
  body { background: #fff; color: #111; }
  .cert-wrap { padding: 0; }
  .certificate { border: 1px solid #bbb; box-shadow: none; background: #fff; }
  .cert-name, .certificate h1 { color: #111 !important; -webkit-text-fill-color: #111; background: none; }
  .cert-desc, .cert-grid span, .cert-grid b { color: #333; }
}
