/* ==========================================================================
   Game Academy — design system "Carbon"
   Carbon-black surfaces with a blue undertone, one cobalt brand colour used sparingly,
   hairline borders, quiet depth, tight radii, RTL.
   Every colour lives in the tokens below: change them here to re-skin the site.
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-wght.f6d31671339d.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-wght.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --brand: #2f74ff;
  --brand-600: #1f5fe6;
  --brand-700: #1748b8;
  --brand-2: #38d0ff;
  --brand-soft: rgba(47, 116, 255, .14);
  --grad: linear-gradient(120deg, var(--brand) 0%, #4f8dff 45%, var(--brand-2) 100%);
  --accent: #38d0ff;
  --accent-ink: #001a26;
  --ok: #22c58b;
  --ok-soft: rgba(34, 197, 139, .14);
  --warn: #ffb547;
  --danger: #ff5468;
  --info: #38d0ff;

  --bg: #070b11;
  --bg-2: #0a1018;
  --surface: #0e151f;
  --surface-2: #131c28;
  --surface-3: #1a2533;
  --line: #243245;
  --line-soft: #172130;
  --text: #e9eff8;
  --text-2: #aab7c9;
  --muted: #7d8ca2;
  --weave: rgba(255, 255, 255, .022);
  --weave-dark: rgba(0, 0, 0, .35);
  --elev-1: inset 0 1px 0 rgba(255, 255, 255, .04), 0 6px 18px -10px rgba(0, 0, 0, .8);
  --elev-2: inset 0 1px 0 rgba(255, 255, 255, .05), 0 22px 48px -22px rgba(0, 0, 0, .9);
  --glow: 0 0 0 1px rgba(47, 116, 255, .45), 0 18px 50px -16px rgba(47, 116, 255, .55);
  --soft: 0 10px 30px rgba(0, 0, 0, .45);

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --container: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --brand: #1f66f2;
  --brand-600: #1753d1;
  --brand-700: #1240a8;
  --brand-2: #0aa7d8;
  --brand-soft: rgba(31, 102, 242, .09);
  --accent: #0aa7d8;
  --accent-ink: #ffffff;
  --bg: #f3f6fa;
  --bg-2: #eaeff6;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --surface-3: #e4eaf2;
  --line: #cfd8e4;
  --line-soft: #e1e7ef;
  --text: #0b1320;
  --text-2: #3a4859;
  --muted: #5f6d80;
  --weave: rgba(15, 30, 60, .035);
  --weave-dark: rgba(15, 30, 60, .02);
  --ok-soft: rgba(34, 197, 139, .12);
  --elev-1: 0 1px 2px rgba(15, 30, 60, .06), 0 6px 18px -10px rgba(15, 30, 60, .18);
  --elev-2: 0 1px 2px rgba(15, 30, 60, .05), 0 22px 44px -22px rgba(15, 30, 60, .30);
  --glow: 0 0 0 1px rgba(31, 102, 242, .35), 0 18px 44px -18px rgba(31, 102, 242, .45);
  --soft: 0 10px 30px rgba(15, 30, 60, .10);
  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand); color: #fff; }
[hidden] { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { inset-inline-start: 8px; }
.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; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.only-light { display: none; }
[data-theme="light"] .only-light { display: inline-flex; }
[data-theme="light"] .only-dark { display: none; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--surface-2); --b-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 700; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  box-shadow: var(--elev-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .2s, background-position .6s var(--ease), border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.btn:active { transform: translateY(0); transition-duration: .08s; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; box-shadow: none; }
.btn-primary {
  --b-fg: #fff; border-color: transparent;
  --b-bg: var(--brand-600); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .3);
}
.btn-primary:hover { --b-bg: var(--brand-700); border-color: transparent; }
.btn-accent { --b-bg: var(--accent); --b-fg: var(--accent-ink); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .3); }
.btn-accent:hover { --b-bg: color-mix(in srgb, var(--accent) 88%, #fff); border-color: transparent; }
.btn-ok { --b-bg: var(--ok); --b-fg: #04170f; border-color: transparent; }
.btn-ghost { --b-bg: transparent; box-shadow: none; border-color: var(--line); }
.btn-ghost:hover { --b-bg: var(--surface-2); box-shadow: none; transform: none; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--brand); font-weight: 700; box-shadow: none; }
.btn-link:hover { transform: none; box-shadow: none; text-decoration: underline; }
.btn-danger { --b-bg: transparent; --b-fg: var(--danger); border-color: var(--danger); box-shadow: none; }
.btn-danger:hover { --b-bg: rgba(255, 84, 104, .1); box-shadow: none; transform: none; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .875rem; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.05rem; border-radius: var(--r); }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; position: relative;
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text-2);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-soft); }

/* ---------- badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; line-height: 1.6; background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge-brand { background: var(--brand-600); color: #fff; }
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-soft { background: var(--brand-soft); color: var(--brand); }
.badge-warn { background: rgba(255, 181, 71, .15); color: var(--warn); }
.badge-danger { background: rgba(255, 84, 104, .14); color: var(--danger); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: var(--surface); font-weight: 600; font-size: .9rem; color: var(--text-2);
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--line); color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- announce + header ---------- */
.announce {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px;
  background: var(--brand-700); color: #fff; font-weight: 600; font-size: .9rem; text-align: center;
}
.announce a { text-decoration: underline; text-underline-offset: 3px; }

.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid transparent;
}
.header-row { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; flex: none; }
.logo-text { letter-spacing: -.02em; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav > a { padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; transition: color .15s, background .15s; }
.nav > a:hover { color: var(--text); background: var(--surface-2); }
.nav > a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-search {
  margin-inline-start: auto; display: flex; align-items: center; gap: 8px; width: 240px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 0 12px; color: var(--muted);
  transition: border-color .15s, width .25s var(--ease);
}
.nav-search:focus-within { border-color: var(--brand); width: 280px; }
.nav-search input { border: 0; background: none; outline: 0; height: 40px; width: 100%; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.cart-count {
  position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 99px; background: var(--brand-600); color: #fff; font-size: .72rem; font-weight: 800;
  display: grid; place-items: center; line-height: 1; border: 1px solid var(--bg);
}
.user-btn { padding-inline: 6px 14px; }
.avatar-xs { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: var(--brand); color: #fff; font-size: .85rem; font-weight: 800; }
.menu-btn { display: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 80; inset-inline-start: 20px; bottom: 20px; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--elev-2); font-weight: 600;
  border-inline-start: 6px solid var(--info); animation: toast-in .35s var(--ease);
}
.toast-success { border-inline-start-color: var(--ok); }
.toast-error { border-inline-start-color: var(--danger); }
.toast-warning { border-inline-start-color: var(--warn); }
.toast-x { margin-inline-start: auto; background: none; border: 0; color: var(--muted); padding: 2px; }
.toast.is-out { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }

/* ---------- sections ---------- */
.section { padding-block: 72px; }
.section-tight { padding-block: 40px; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.kicker::before { content: ""; width: 16px; height: 2px; background: currentColor; }

/* ---------- hero ----------
   Layers: a slow brand glow (::before), carbon weave (::after) and a light beam that
   crosses the bottom edge now and then (background). */
.hero {
  position: relative; padding-block: 64px 80px; overflow: hidden; isolation: isolate;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent) no-repeat;
  background-size: 28% 1px; background-position: 120% 100%;
  border-bottom: 1px solid var(--line-soft);
}
.hero::before {
  content: ""; position: absolute; inset: -30% -15% -10% -15%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 46% at 74% 32%, rgba(47, 116, 255, .24), transparent 70%),
    radial-gradient(28% 36% at 22% 74%, rgba(56, 208, 255, .08), transparent 70%);
  filter: blur(24px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(45deg, var(--weave) 25%, transparent 25% 75%, var(--weave) 75%),
    linear-gradient(-45deg, var(--weave-dark) 25%, transparent 25% 75%, var(--weave-dark) 75%);
  background-size: 6px 6px;
  mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .88rem; margin-bottom: 22px;
}
.hero-kicker .badge { padding: 1px 9px; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); line-height: 1.35; font-weight: 800; letter-spacing: -.015em; margin-bottom: 18px; }
/* highlighted words: brand colour over a marker stroke that is drawn once */
.hero h1 .hl { position: relative; z-index: 0; white-space: nowrap; color: var(--brand); }
.hero h1 .hl::after {
  content: ""; position: absolute; z-index: -1; inset-inline: -.08em; bottom: .1em; height: .3em; border-radius: 2px;
  background: color-mix(in srgb, var(--brand) 22%, transparent);
}
.hero-text { font-size: 1.12rem; color: var(--text-2); max-width: 560px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats > div + div { padding-inline-start: 28px; border-inline-start: 1px solid var(--line); }
.hero-stats b { display: block; font-size: 1.6rem; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-stats span { color: var(--muted); font-size: .9rem; }
.hero-art { position: relative; }
.hero-art img { border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--elev-2); }
.hero-stack { position: relative; display: grid; gap: 14px; padding-bottom: 34px; }
.hero-stack .card { rotate: var(--rot, 0deg); box-shadow: var(--elev-2); }
.hero-stack .card:nth-child(1) { --rot: -2deg; }
.hero-stack .card:nth-child(2) { --rot: 1.5deg; margin-inline-start: 48px; }
.hero-float {
  position: absolute; inset-inline-start: -18px; bottom: -18px; z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent); color: var(--text);
  backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: var(--elev-2); font-weight: 700;
}
.hero-float svg { color: var(--brand-2); }
.hero-float::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); flex: none; }

/* ---------- engines strip ---------- */
.engines { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.engine-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-soft); font-weight: 700;
}
.engine-pill img { width: 22px; height: 22px; }
.engine-pill small { color: var(--muted); font-weight: 500; }

/* ---------- course cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  box-shadow: var(--elev-1); transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: var(--elev-2); }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.card-tags { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; z-index: 2; }
.card-body { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 1.1rem; font-weight: 800; margin: 0; line-height: 1.6; }
.card-sub { color: var(--muted); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: .85rem; margin-top: auto; padding-top: 6px; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px dashed var(--line-soft); }
.instructor-mini { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-2); min-width: 0; }
.instructor-mini img, .instructor-mini .ph { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.instructor-mini .ph { display: grid; place-items: center; background: var(--surface-3); font-weight: 800; font-size: .8rem; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.price b { font-size: 1.1rem; font-weight: 900; }
.price s { color: var(--muted); font-size: .85rem; }
.price small { color: var(--muted); font-size: .78rem; }
.price .free { color: var(--ok); font-weight: 900; }

/* generated cover (no image uploaded) */
.cover-gen {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px;
  background:
    radial-gradient(circle at 85% 15%, rgba(56, 208, 255, .38), transparent 45%),
    radial-gradient(circle at 10% 110%, color-mix(in srgb, var(--c, var(--brand)) 70%, transparent), transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--c, var(--brand)) 45%, var(--brand)) 0%, color-mix(in srgb, var(--c, var(--brand)) 35%, #0a1220) 55%, #070b11 100%);
  color: #fff; overflow: hidden;
}
.cover-gen::before {
  content: ""; position: absolute; inset: 0; opacity: .07;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 24px 24px;
}
.cover-gen .cg-engine { position: relative; font-size: .78rem; font-weight: 800; opacity: .85; letter-spacing: .04em; }
.cover-gen .cg-title { position: relative; font-size: 1.25rem; font-weight: 900; line-height: 1.5; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.cover-gen .cg-icon { position: absolute; top: 16px; inset-inline-end: 16px; opacity: .9; }

/* ---------- features ---------- */
.features {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden;
  background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
}
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { padding: 28px 24px; background: var(--surface); transition: background-color .2s; }
.feature:hover { background: var(--surface-2); }
.feature-icon { width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.feature h3 { font-size: 1.08rem; margin-bottom: 6px; }
.feature p { color: var(--text-2); margin: 0; font-size: .95rem; }

/* ---------- stats band ---------- */
.stats-band {
  display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface);
}
.stat { padding: 26px 20px; text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--line-soft); }
.stat b { display: block; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 800; line-height: 1.3; color: var(--text); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-weight: 600; }

/* ---------- testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.quote { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 16px; }
.quote p { margin: 0; color: var(--text-2); }
.quote p::before { content: "«"; color: var(--brand); font-weight: 900; margin-inline-end: 2px; }
.quote p::after { content: "»"; color: var(--brand); font-weight: 900; margin-inline-start: 2px; }
.quote-who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote-who img, .quote-who .ph { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.quote-who .ph { display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-weight: 800; }
.quote-who b { display: block; line-height: 1.4; }
.quote-who small { color: var(--muted); }

/* ---------- FAQ / accordion ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq details { border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--surface); transition: border-color .2s; }
.faq details[open] { border-color: var(--line); box-shadow: var(--elev-1); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-inline-start: auto; font-size: 1.4rem; line-height: 1; color: var(--brand); transition: transform .35s var(--spring); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: var(--text-2); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; padding: 44px; border-radius: var(--r-xl);
  background: var(--brand-700); color: #fff; border: 1px solid rgba(255, 255, 255, .12);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; isolation: isolate;
}
.cta-band h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.cta-band p { margin: 0; }
.cta-band .btn { position: relative; z-index: 1; }

/* ---------- footer ---------- */
.footer { margin-top: 80px; border-top: 1px solid var(--line-soft); background: var(--bg-2); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer h2 { font-size: 1rem; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer li { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.footer li a:hover { color: var(--brand); }
.footer-about p { color: var(--muted); margin-top: 12px; max-width: 360px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--text-2); transition: color .15s, border-color .15s; }
.socials a:hover { color: var(--brand); border-color: var(--brand); }
.enamad { margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px; margin-top: 40px; border-top: 1px solid var(--line-soft); font-size: .88rem; color: var(--text-2); }

/* ---------- page head / breadcrumbs ---------- */
.page-head { padding-block: 40px 28px; }
.page-head h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: 6px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.crumbs a:hover { color: var(--brand); }
.crumbs .sep { opacity: .5; }

/* ---------- course list filters ---------- */
.filters { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); margin-bottom: 28px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-row > .label { color: var(--muted); font-size: .88rem; font-weight: 700; min-width: 64px; }
.filter-search { display: flex; gap: 10px; }
.filter-search .input { flex: 1; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; color: var(--text-2); }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--surface); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 440px; margin: 0 auto 20px; }

/* ---------- course detail ---------- */
.course-hero { padding-block: 36px 40px; background: var(--bg-2); border-bottom: 1px solid var(--line-soft); position: relative; overflow: hidden; }
.course-hero::before { content: ""; position: absolute; inset-inline-end: -200px; top: -200px; width: 600px; height: 600px; background: radial-gradient(closest-side, color-mix(in srgb, var(--c, var(--brand)) 30%, transparent), transparent); }
.course-hero .container { position: relative; }
.course-hero h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); font-weight: 900; margin: 10px 0 10px; }
.course-hero .lead { font-size: 1.1rem; color: var(--text-2); max-width: 720px; }
.course-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; color: var(--text-2); font-weight: 600; font-size: .95rem; }
.course-facts span { display: inline-flex; align-items: center; gap: 7px; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 36px; align-items: start; padding-top: 32px; }
.course-main { min-width: 0; }
.buy-box { position: sticky; top: calc(var(--header-h) + 18px); margin-top: -150px; z-index: 5; }
.buy-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--elev-2); overflow: hidden; }
.buy-media { position: relative; aspect-ratio: 16/9; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.buy-media img, .buy-media video, .buy-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.buy-media .play-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.25); color: #fff; z-index: 2; }
.buy-media .cover-gen .cg-title, .buy-media .cover-gen .cg-engine { display: none; }
.play-overlay span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); border: 1px solid rgba(255,255,255,.2); box-shadow: var(--elev-1); transition: transform .2s var(--ease); }
.play-overlay:hover span { transform: scale(1.08); }
.buy-body { padding: 20px; display: grid; gap: 14px; }
.buy-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.buy-price b { font-size: 1.8rem; font-weight: 900; line-height: 1.2; }
.buy-price s { color: var(--muted); }
.countdown { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(255, 181, 71, .12); color: var(--warn); font-weight: 700; font-size: .9rem; }
.includes { list-style: none; display: grid; gap: 8px; font-size: .92rem; color: var(--text-2); }
.includes li { display: flex; align-items: center; gap: 10px; }
.includes svg { color: var(--ok); flex: none; }
.progress-wrap { display: grid; gap: 6px; }
.progress { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; border: 1px solid var(--line-soft); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--brand); width: var(--p, 0%); transition: width .6s var(--ease); }
.progress-label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-2); font-weight: 600; }

.tabs { position: sticky; top: var(--header-h); z-index: 4; display: flex; gap: 4px; padding: 8px 0; margin-bottom: 8px; background: var(--bg); border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 16px; border-radius: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: color .15s, background .15s; }
.tabs a:hover, .tabs a.is-active { color: var(--text); background: var(--surface-2); }
.block { padding-block: 28px; border-bottom: 1px solid var(--line-soft); }
.block:last-child { border-bottom: 0; }
.block > h2 { font-size: 1.35rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.outcomes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; list-style: none; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: var(--surface); }
.outcomes li { display: flex; gap: 10px; align-items: flex-start; }
.outcomes svg { color: var(--ok); flex: none; margin-top: 5px; }
.bullets { list-style: none; display: grid; gap: 8px; }
.bullets li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.bullets li::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--brand); margin-top: 11px; flex: none; transform: rotate(45deg); }
.project-box { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--r-lg); background: rgba(56, 208, 255, .1); border: 1px solid rgba(56, 208, 255, .4); margin-top: 16px; }
.project-box .feature-icon { margin: 0; background: var(--brand); color: #fff; flex: none; }

/* syllabus */
.syllabus-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--text-2); font-size: .92rem; margin-bottom: 14px; }
.chapters { display: grid; gap: 10px; }
.chapter { border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.chapter[open] { border-color: var(--line); }
.chapter > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-weight: 800; }
.chapter > summary::-webkit-details-marker { display: none; }
.chapter > summary .chev { margin-inline-start: auto; transition: transform .2s; color: var(--muted); flex: none; }
.chapter[open] > summary .chev { transform: rotate(180deg); }
.chapter > summary small { color: var(--muted); font-weight: 600; white-space: nowrap; }
.ch-num { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); font-size: .9rem; flex: none; }
.episodes { list-style: none; border-top: 1px dashed var(--line-soft); }
.ep { display: flex; align-items: center; gap: 12px; padding: 11px 18px; font-size: .95rem; transition: background .15s; }
.ep + .ep { border-top: 1px solid var(--line-soft); }
.ep:hover { background: var(--surface-2); }
.ep-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.ep.is-open .ep-icon { background: var(--brand-soft); color: var(--brand); }
.ep.is-done .ep-icon { background: var(--ok); color: #fff; }
.ep.is-current { background: var(--brand-soft); }
.ep.is-current .ep-title { color: var(--brand); font-weight: 800; }
.ep-title { flex: 1; min-width: 0; }
.ep-dur { color: var(--muted); font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.instructor-card { display: flex; gap: 20px; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: var(--surface); }
.instructor-card img, .instructor-card .ph { width: 96px; height: 96px; border-radius: var(--r); object-fit: cover; flex: none; border: 1px solid var(--line); }
.instructor-card .ph { display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 2rem; font-weight: 900; }
.instructor-card h3 { margin: 0; }
.instructor-card .title { color: var(--brand); font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.instructor-card p { color: var(--text-2); margin: 0; white-space: pre-line; }

/* prose (markdown) */
.prose { color: var(--text-2); font-size: 1.02rem; }
.prose h2, .prose h3 { color: var(--text); margin-top: 1.4em; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: .3em; }
.prose img { border-radius: var(--r); margin-block: 1em; }
.prose code { background: var(--surface-3); padding: 2px 6px; border-radius: 6px; font-size: .9em; direction: ltr; unicode-bidi: isolate; }
.prose pre { background: #060a10; color: #eee; padding: 16px; border-radius: var(--r); overflow-x: auto; direction: ltr; text-align: left; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1em 0; padding: 10px 18px; border-inline-start: 4px solid var(--brand); background: var(--surface); border-radius: var(--r-sm); }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
.prose th, .prose td { border: 1px solid var(--line-soft); padding: 8px 12px; text-align: start; }

/* ---------- episode / player ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding-block: 24px 40px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: var(--elev-2); }
.player video, .player iframe { width: 100%; height: 100%; border: 0; background: #000; }
.player-state {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c, var(--brand)) 35%, transparent), transparent 60%), #070b11; color: #fff;
}
.player-state .lock { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); }
.player-state h2 { margin: 0; font-size: 1.3rem; }
.player-state p { margin: 0; color: #b9c6d8; max-width: 460px; }
.license-box { display: grid; gap: 10px; width: min(520px, 100%); text-align: start; }
.license-key { display: flex; gap: 8px; align-items: stretch; }
.license-key code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255,255,255,.06); border: 1px dashed rgba(255,255,255,.25); direction: ltr; text-align: left; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.watch-head h1 { font-size: 1.45rem; margin: 0; }
.watch-head .muted { font-size: .9rem; }
.watch-nav { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.watch-nav .btn { flex: 1; min-width: 160px; }
.watch-side { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.watch-side-head { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); display: grid; gap: 8px; }
.watch-side-head a { font-weight: 800; line-height: 1.5; }
.watch-side-body { overflow-y: auto; scrollbar-width: thin; }
.watch-side .chapter { border: 0; border-radius: 0; border-bottom: 1px solid var(--line-soft); }
.watch-side .chapter > summary { padding: 12px 16px; font-size: .92rem; }
.watch-side .ep { padding: 9px 16px; font-size: .9rem; }
.attachment { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px dashed var(--line); background: var(--surface); margin-top: 18px; }
.done-btn.is-done { --b-bg: var(--ok); --b-fg: #fff; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .label-strong { font-weight: 700; font-size: .92rem; }
.field .help { color: var(--muted); font-size: .84rem; }
.field .error, .errorlist { color: var(--danger); font-size: .86rem; font-weight: 600; list-style: none; padding: 0; margin: 0; }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-soft); background: var(--bg); color: var(--text); outline: 0; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.input-lg { min-height: 58px; font-size: 1.2rem; font-weight: 700; letter-spacing: .04em; }
.field input[type="file"] { width: 100%; padding: 8px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--muted); font-size: .9rem; cursor: pointer; }
.field input[type="file"]::file-selector-button { margin-inline-end: 12px; padding: 8px 16px; border: 1px solid var(--line); border-radius: calc(var(--r) - 4px); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.field input[type="file"]:hover::file-selector-button { border-color: var(--brand); color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.alert { padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; margin-bottom: 16px; border: 1px solid; }
.alert-error { color: var(--danger); background: rgba(255, 84, 104, .08); border-color: rgba(255, 84, 104, .35); }
.alert-info { color: var(--text-2); background: var(--surface-2); border-color: var(--line-soft); }
.alert-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(34, 197, 139, .35); }

/* ---------- auth ---------- */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 40px 16px; position: relative; isolation: isolate; }
.auth::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 400px at 70% 20%, rgba(47, 116, 255, .18), transparent 70%), radial-gradient(500px 400px at 20% 80%, rgba(56, 208, 255, .10), transparent 70%); }
.auth-card { width: min(440px, 100%); padding: 32px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--elev-2); }
.auth-icon { width: 56px; height: 56px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--brand); color: #fff; margin-bottom: 18px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.auth-alt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; font-size: .9rem; }
.auth-alt a { color: var(--brand); font-weight: 700; }
.otp { display: flex; gap: 10px; justify-content: center; direction: ltr; margin-bottom: 8px; }
.otp input {
  width: 56px; height: 64px; text-align: center; font-size: 1.6rem; font-weight: 800; border-radius: var(--r);
  border: 1px solid var(--line-soft); background: var(--bg); color: var(--text); outline: 0; transition: border-color .15s, transform .15s, box-shadow .15s; caret-color: var(--brand);
}
.otp input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); transform: translateY(-2px); }
.otp input.filled { border-color: var(--line); }
.otp.is-error input { border-color: var(--danger); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.resend { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .92rem; margin-top: 16px; }
.terms { color: var(--muted); font-size: .82rem; text-align: center; margin-top: 18px; }
.terms a { color: var(--text-2); text-decoration: underline; }

/* ---------- cart ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.cart-list { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.cart-thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .cover-gen { padding: 10px; }
.cart-thumb .cg-title { font-size: .8rem; }
.cart-thumb .cg-engine, .cart-thumb .cg-icon { display: none; }
.cart-item h3 { font-size: 1rem; margin: 0 0 4px; }
.cart-item .price { justify-content: flex-start; }
.summary { position: sticky; top: calc(var(--header-h) + 18px); padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--elev-2); display: grid; gap: 14px; }
.summary h2 { font-size: 1.15rem; margin: 0; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; color: var(--text-2); }
.sum-row.discount { color: var(--ok); }
.sum-row.total { color: var(--text); font-weight: 900; font-size: 1.2rem; padding-top: 12px; border-top: 1px dashed var(--line-soft); }
.coupon-form { display: flex; gap: 8px; }
.coupon-form .input { min-height: 44px; text-transform: uppercase; direction: ltr; text-align: center; }
.coupon-on { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.secure-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; justify-content: center; }

/* ---------- result / receipt ---------- */
.result { max-width: 640px; margin: 48px auto; text-align: center; }
.result-icon { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 30px; display: grid; place-items: center; border: 1px solid var(--line); box-shadow: var(--elev-2); }
.result-icon.ok { background: var(--ok); color: #fff; }
.result-icon.fail { background: var(--danger); color: #fff; }
.result-icon.wait { background: var(--accent); color: var(--accent-ink); }
.receipt { text-align: start; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.receipt-row + .receipt-row { border-top: 1px solid var(--line-soft); }
.receipt-row span:first-child { color: var(--muted); }
.receipt-row b { font-weight: 700; }
.text-ok { color: var(--ok); }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; padding-block: 32px 24px; align-items: start; }
.dash-side { position: sticky; top: calc(var(--header-h) + 18px); padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--elev-2); }
.dash-user { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 10px; border-bottom: 1px dashed var(--line-soft); }
.avatar { width: 52px; height: 52px; border-radius: 16px; object-fit: cover; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 900; font-size: 1.3rem; flex: none; border: 1px solid var(--line); }
.avatar-lg { width: 96px; height: 96px; border-radius: 26px; font-size: 2.2rem; }
.dash-user b { display: block; line-height: 1.4; }
.dash-user small { color: var(--muted); direction: ltr; display: inline-block; }
.dash-nav { display: grid; gap: 4px; }
.dash-nav a, .dash-nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 700; background: none; border: 0; width: 100%; text-align: start; transition: background .15s, color .15s; }
.dash-nav a:hover, .dash-nav button:hover { background: var(--surface-2); color: var(--text); }
.dash-nav a[aria-current="page"] { background: var(--brand); color: #fff; }
.dash-nav .sep { height: 1px; background: var(--line-soft); margin: 6px 0; }
.dash-nav .logout { color: var(--danger); }
.dash-main { min-width: 0; display: grid; gap: 24px; align-content: start; }
.dash-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-title h1 { font-size: 1.6rem; margin: 0; }
.panel { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.panel > h2 { font-size: 1.15rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); display: flex; gap: 14px; align-items: center; }
.kpi-icon { width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.kpi b { display: block; font-size: 1.5rem; font-weight: 900; line-height: 1.3; }
.kpi span { color: var(--muted); font-size: .86rem; }
.continue {
  display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; padding: 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--elev-1);
}
.continue .card-media { border-radius: var(--r); border: 1px solid var(--line); }
.continue h2 { font-size: 1.25rem; margin: 4px 0 10px; }
.my-courses { display: grid; gap: 14px; }
.my-course { display: grid; grid-template-columns: 180px 1fr auto; gap: 18px; align-items: center; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); transition: border-color .15s; }
.my-course:hover { border-color: var(--line); }
.my-course .card-media { border-radius: var(--r-sm); border: 0; }
.my-course h3 { font-size: 1.05rem; margin: 0 0 6px; }
.my-course .cg-engine, .my-course .cg-icon { display: none; }
.my-course .cg-title { font-size: .9rem; }
.license-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .88rem; }
.license-row code { direction: ltr; background: var(--bg); padding: 4px 10px; border-radius: 8px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: start; padding: 14px 16px; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; font-size: .85rem; }
.table td { padding: 14px 16px; border-top: 1px solid var(--line-soft); white-space: nowrap; }
.table tr:hover td { background: var(--surface-2); }
.devices { display: grid; gap: 12px; }
.device { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-soft); background: var(--bg); }
.device.is-current { border-color: var(--ok); }
.device-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.device b { display: block; line-height: 1.5; }
.device small { color: var(--muted); }
.welcome-box { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--r-lg); background: var(--brand-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); font-weight: 600; }
.welcome-box b { display: block; font-size: 1.1rem; }

/* ---------- fake gateway ---------- */
.gateway { max-width: 460px; margin: 60px auto; padding: 32px; border-radius: var(--r-xl); background: #fff; color: #1a1a1a; border: 1px solid #1a1a1a; box-shadow: 8px 8px 0 #1a1a1a; text-align: center; }
.gateway .tag { display: inline-block; padding: 4px 12px; border-radius: 99px; background: #fff3cd; color: #7a5b00; font-weight: 700; font-size: .85rem; margin-bottom: 14px; }
.gateway .receipt { background: #f6f6f8; border-color: #1a1a1a; }
.gateway .receipt-row + .receipt-row { border-top-color: #e2e2e6; }
.gateway .receipt-row span:first-child { color: #666; }
.gateway .amount { font-size: 1.25rem; font-weight: 900; }

/* ---------- error pages ---------- */
.error-page { text-align: center; padding: 80px 16px; }
.error-code { font-size: clamp(5rem, 3rem + 10vw, 9rem); font-weight: 800; line-height: 1; color: var(--brand); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }

/* ---------- motion ----------
   CSS + a few lines in site.js; no library. Motion explains, it doesn't decorate: things fade
   up once as they arrive, hover answers with a small lift, and only three things loop (hero glow,
   hero cards, presale dot). Every loop ends on the frame it starts from, so it never jumps.
   Reveal only hides things once JS has marked <html class="js">, so a script failure never
   leaves the page blank. The hero headline never animates (it is the LCP element). */
.js .reveal {
  opacity: 0; translate: 0 14px;
  transition: opacity .7s var(--ease) var(--d, 0s), translate .8s var(--ease) var(--d, 0s),
    transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s, background-color .2s;
}
.js .reveal.is-in { opacity: 1; translate: 0 0; }

@keyframes rise { from { opacity: 0; translate: 0 12px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes grow-x { from { width: 0; } }
@keyframes bump { 40% { scale: 1.3; } }
/* loops: first and last keyframe are identical */
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(3%, -2%) scale(1.05); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(56, 208, 255, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(56, 208, 255, 0); } }
/* the beam is fully off-screen at both ends (28%-wide line: 140% = past the right edge,
   -40% = past the left), then rests, so the restart is invisible */
@keyframes beam { 0% { background-position: 140% 100%; } 45%, 100% { background-position: -40% 100%; } }

/* hero: copy rises in, headline stays put, its marker stroke draws once */
.js .hero-in > :not(h1) { animation: rise .8s var(--ease) both; }
.js .hero-in > :nth-child(3) { animation-delay: .08s; }
.js .hero-in > :nth-child(4) { animation-delay: .16s; }
.js .hero-in > :nth-child(5) { animation-delay: .24s; }
.hero h1 .hl::after { transform-origin: right; animation: draw-x .9s var(--ease) .3s both; }
.hero::before { animation: drift 24s ease-in-out infinite; }
.hero { animation: beam 12s ease-in-out 2s infinite both; }
/* each card gets its own phase (negative delay) so they never bob in sync */
.js .hero-stack .card { animation: fade .8s var(--ease) both, float 8s ease-in-out infinite; animation-delay: calc(.2s + var(--i, 0) * .12s), calc(var(--i, 0) * -4s); }
.hero-stack .card:hover { animation-play-state: paused; }
.hero-float { animation: rise .8s var(--ease) .5s both; }
.hero-float::before { animation: ping 2s ease-out infinite; }

/* buttons: the trailing arrow slides toward where it points */
.btn > svg:last-child:not(:first-child) { transition: translate .3s var(--ease); }
.btn:hover > svg:last-child:not(:first-child) { translate: -4px 0; }

/* tiles: border answers the pointer, nothing spins or glows */
.engine-pill { transition: border-color .2s, color .2s; }
.engine-pill:hover { border-color: color-mix(in srgb, var(--pill, var(--brand)) 55%, var(--line)); }
.quote { transition: border-color .2s; }
.quote:hover { border-color: var(--line); }
.my-course { transition: border-color .2s; }
.my-course:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.kpi, .panel { transition: border-color .2s; }
.kpi:hover, .panel:hover { border-color: var(--line); }

/* small touches */
.cart-count.is-bump { animation: bump .45s var(--spring); }
.header { transition: border-color .3s, background-color .3s; }
.header.is-scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom-color: var(--line-soft); }
.faq details[open] .answer, .chapter[open] > :not(summary) { animation: rise .45s var(--ease); }
.js .progress > i { animation: grow-x 1.2s var(--ease) .2s both; }

/* above-the-fold blocks on inner pages come in from first paint (no JS needed) */
.page-head > *, .course-hero .container > *, .auth-card, .filters, .dash-main > :first-child { animation: rise .7s var(--ease) both; }
.page-head > :nth-child(2), .course-hero .container > :nth-child(2) { animation-delay: .08s; }
.page-head > :nth-child(3) { animation-delay: .16s; }
.filters { animation-delay: .12s; }

/* thin scroll progress line (site.js creates .scroll-bar) */
.scroll-bar { position: fixed; inset-inline: 0; top: 0; height: 2px; z-index: 60; pointer-events: none; background: var(--brand); transform-origin: right; transform: scaleX(var(--sp, 0)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; translate: 0 0; }
}

/* ---------- mobile buy bar ---------- */
.mobile-buy { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-search { display: none; }
  .course-layout, .watch { grid-template-columns: minmax(0, 1fr) 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .menu-btn { display: inline-grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px 20px 22px; background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-110%); opacity: 0; pointer-events: none; transition: transform .25s var(--ease), opacity .2s; z-index: -1;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav > a { padding: 12px 14px; font-size: 1.05rem; }
  .nav-search { display: flex; width: 100%; margin: 6px 0 0; }
  .nav-search:focus-within { width: 100%; }
  .hero-grid, .course-layout, .watch, .cart-layout, .dash { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 40px 56px; }
  .hero-art { order: -1; max-width: 520px; }
  .hero-stack .card:nth-child(2) { display: none; }
  .buy-box { position: static; margin-top: 0; }
  .course-hero { padding-bottom: 28px; }
  .watch-side { position: static; max-height: 520px; }
  .summary, .dash-side { position: static; }
  .dash-side { padding: 12px; }
  .dash-user { display: none; }
  .dash-nav { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav a, .dash-nav button { width: auto; white-space: nowrap; padding: 8px 12px; }
  .dash-nav .sep { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px dashed var(--line-soft); }
  .mobile-buy {
    display: flex; position: fixed; z-index: 40; inset: auto 0 0 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.25);
  }
  .has-mobile-buy .footer { padding-bottom: 80px; }
  .has-mobile-buy .toasts { bottom: 90px; }
}
@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .section { padding-block: 52px; }
  .hide-sm { display: none; }
  .header-row { gap: 10px; }
  .logo-text { font-size: 1rem; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .outcomes, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 28px 22px; }
  .cart-item { grid-template-columns: 96px 1fr; }
  .cart-item > form { grid-column: 1 / -1; }
  .continue { grid-template-columns: 1fr; }
  .my-course { grid-template-columns: 110px 1fr; }
  .my-course > .actions { grid-column: 1 / -1; }
  .instructor-card { flex-direction: column; }
  .auth-card { padding: 24px 20px; }
  .otp { gap: 8px; }
  .otp input { width: 48px; height: 58px; font-size: 1.4rem; }
  .watch-head h1 { font-size: 1.2rem; }
  .kpi { padding: 14px; gap: 10px; }
  .kpi b { font-size: 1.25rem; }
  .table th, .table td { padding: 12px; }
  .toasts { inset-inline: 16px; bottom: 16px; }
}

/* course hero copy leaves room for the overlapping buy box */
.course-hero .hero-copy { max-width: calc(100% - 406px); }
@media (max-width: 1080px) { .course-hero .hero-copy { max-width: calc(100% - 356px); } }
@media (max-width: 900px) {
  .course-hero .hero-copy { max-width: none; }
  .course-layout .buy-box { order: -1; }
}

/* ---------- blog ---------- */
.post-cat { color: var(--brand-2); font-size: .8rem; font-weight: 800; letter-spacing: .02em; }
.post-card .cover-gen .cg-title { font-size: 1.1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-cats { margin-bottom: 24px; }
.blog-lead { margin-bottom: 8px; }
.post-card-wide { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.post-card-wide .card-media { aspect-ratio: auto; min-height: 300px; border-bottom: 0; border-inline-start: 1px solid var(--line); }
.post-card-wide .card-body { padding: 28px; justify-content: center; gap: 12px; }
.post-card-wide .card-title { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); line-height: 1.5; }
.post-card-wide .card-sub { -webkit-line-clamp: 4; font-size: 1rem; }
.post-card-wide .card-meta { margin-top: 6px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding-block: 12px 48px; }

.admin-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 10px 14px; border-radius: var(--r); border: 1px dashed var(--line); color: var(--text-2); font-size: .9rem; }
.admin-bar.is-preview { border-color: var(--warn); color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.post-head { max-width: 860px; padding-block: 40px 24px; }
.post-head h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem); line-height: 1.45; margin-bottom: 12px; }
.post-lead { color: var(--text-2); font-size: 1.12rem; margin-bottom: 18px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; color: var(--muted); font-size: .9rem; }
.post-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.post-cover { max-width: 1040px; margin-bottom: 8px; }
.post-cover img { width: 100%; height: auto; border-radius: var(--r-lg); border: 1px solid var(--line-soft); box-shadow: var(--elev-2); }
.post-layout { max-width: 860px; padding-block: 24px 40px; }
.post-layout.has-toc { max-width: 1140px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; grid-template-areas: "main toc"; gap: 48px; align-items: start; }
.post-main { grid-area: main; min-width: 0; }
.post-toc { grid-area: toc; position: sticky; top: calc(var(--header-h) + 20px); }
.post-toc details { border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--surface); padding: 14px 16px; }
.post-toc summary { cursor: pointer; font-weight: 800; }
.post-toc ol { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.post-toc a { display: block; padding: 5px 8px; border-radius: 8px; color: var(--text-2); font-size: .9rem; line-height: 1.6; }
.post-toc a:hover, .post-toc a.is-active { color: var(--text); background: var(--brand-soft); }
.post-toc .toc-3 a { padding-inline-start: 22px; font-size: .85rem; }
.post-body { font-size: 1.08rem; line-height: 2.05; }
.post-body h2, .post-body h3 { scroll-margin-top: calc(var(--header-h) + 16px); }
.post-body h2 { font-size: 1.5rem; }
.post-body h3 { font-size: 1.2rem; }
.post-body p { margin-bottom: 1.1em; }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 24px; border-top: 1px solid var(--line-soft); margin-top: 24px; }
.post-main .block { border-bottom: 0; }

@media (max-width: 1000px) {
  .post-layout.has-toc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "toc" "main"; gap: 8px; max-width: 860px; }
  .post-toc { position: static; }
  .post-toc ol { max-height: none; }
}
@media (max-width: 760px) {
  .post-card-wide { grid-template-columns: minmax(0, 1fr); }
  .post-card-wide .card-media { aspect-ratio: 16 / 9; min-height: 0; border-inline-start: 0; border-bottom: 1px solid var(--line); }
  .post-card-wide .card-body { padding: 18px; }
}
