/* "رازي AI" course site — dark espresso + copper by default; white/cream light theme via the theme button.
   Colors are tokens on :root; the dark theme only redefines tokens. Motion lives in js/motion.js. */
:root {
  --bg: #fbf8f2;
  --bg-2: #f4eee3;
  --surface: #ffffff;
  --surface-2: #f7f1e7;
  --ink: #2b211a;
  --muted: #7a6a5c;
  --line: rgb(60 40 25 / 0.1);
  --line-strong: rgb(60 40 25 / 0.18);
  --accent: #8b5a3c;
  --accent-2: #b8875c;
  --accent-3: #c9a27e;
  --accent-ink: #fffaf3;
  --accent-soft: rgb(139 90 60 / 0.08);
  --grad: linear-gradient(100deg, #6f3d24 0%, #b0623a 55%, #c98a5c 100%);
  --mark-soft: rgb(184 135 92 / 0.14);
  --mark-ink: #7a4f2e;
  --hl: rgb(184 135 92 / 0.2);
  --dots: rgb(60 40 25 / 0.08);
  --glass: rgb(251 248 242 / 0.82);
  --shadow: 0 1px 2px rgb(60 40 25 / 0.05), 0 18px 50px -26px rgb(60 40 25 / 0.28);
  --glow: 0 0 0 1px rgb(139 90 60 / 0.22), 0 10px 30px -14px rgb(139 90 60 / 0.4);
  --aurora-1: #ecd9c2; --aurora-2: #f3e6d3; --aurora-3: #e6cfb6;
  --radius: 18px;
  /* Latin and digits come from Space Grotesk, Arabic from Noto Kufi (headings) / Readex Pro (text) */
  --font-display: "Space Grotesk", "Noto Kufi Arabic", system-ui, sans-serif;
  --font-body: "Readex Pro", system-ui, sans-serif;
  --font-latin: "Space Grotesk", "Readex Pro", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #110b08; --bg-2: #160f0b; --surface: #1b130e; --surface-2: #251a13;
  --ink: #f7eee3; --muted: #bba795; --line: rgb(247 238 227 / 0.08); --line-strong: rgb(247 238 227 / 0.16);
  --accent: #eca77b; --accent-2: #f2d6b3; --accent-3: #e2915f; --accent-ink: #1a100a; --accent-soft: rgb(236 167 123 / 0.1);
  --grad: linear-gradient(100deg, #f2d6b3 0%, #e2915f 55%, #cd7047 100%);
  --mark-soft: rgb(242 214 179 / 0.12); --mark-ink: #f2d6b3; --hl: rgb(236 167 123 / 0.2); --dots: rgb(247 238 227 / 0.07);
  --glass: rgb(17 11 8 / 0.72);
  --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 24px 70px -28px rgb(0 0 0 / 0.85);
  --glow: 0 0 0 1px rgb(236 167 123 / 0.32), 0 14px 40px -12px rgb(226 145 95 / 0.55);
  --aurora-1: #7a3f20; --aurora-2: #5c2f18; --aurora-3: #9a5530;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; }
svg { display: block; }
img, video { max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }
.icon { width: 22px; height: 22px; flex: none; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1rem; white-space: nowrap; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: var(--accent-ink); box-shadow: var(--glow);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-logo { display: block; width: 36px; height: 36px; filter: drop-shadow(0 4px 10px rgb(226 145 95 / .45)); transition: transform .3s; }
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.05); }
.footer-inner .brand-logo { width: 30px; height: 30px; border-radius: 9px; }
.nav { display: none; gap: 4px; margin-inline-start: 12px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color .2s, background .2s; }
.nav a:hover, .nav a.active { color: var(--ink); background: var(--surface-2); }
@media (min-width: 900px) { .nav { display: flex; } }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.header-actions .button { white-space: nowrap; }
@media (max-width: 520px) { #header-cta { display: none; } }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn .icon { width: 19px; height: 19px; }
.progress-bar { position: absolute; inset: auto 0 -1px 0; height: 2px; background: var(--grad); transform-origin: right; transform: scaleX(0); }

/* ---------- Buttons ---------- */
.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s;
  will-change: transform;
}
.button.primary { background: var(--grad); color: var(--accent-ink); box-shadow: var(--glow); }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.button.ghost:hover { border-color: var(--accent); }
.button.big { font-size: 1.08rem; padding: 15px 30px; }
.button.small { padding: 8px 16px; font-size: 0.92rem; }
.button:disabled { opacity: .6; cursor: progress; }
.btn-ic {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin-inline-end: -12px; border-radius: 50%;
  background: rgb(255 255 255 / 0.16); font-size: .95rem; line-height: 1; transition: transform .45s cubic-bezier(.32,.72,0,1);
}
.button:hover .btn-ic { transform: translateX(-3px) scale(1.06); }
.button:active { transform: scale(.98); }

/* ---------- Shared ---------- */
.view { position: relative; }
.block { margin-top: 96px; }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 720px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: 0.88rem; font-weight: 500;
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); }
.h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.35; }
.label { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin: 0 0 18px; line-height: 1.6; }
.lede { color: var(--muted); font-size: 1.12rem; line-height: 1.95; margin: 0; max-width: 62ch; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 18px 0 0; color: var(--muted); font-size: 0.95rem; }
.tile {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line);
}
.tile-lg { width: 60px; height: 60px; border-radius: 18px; }
.tile-lg .icon { width: 28px; height: 28px; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; line-height: 1.9; padding: 0 9px; border-radius: 999px; background: var(--mark-soft); color: var(--mark-ink); }
.empty { margin: 0; padding: 36px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.92rem; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Shiny text (inspired by React Bits "ShinyText") */
.shiny {
  background: linear-gradient(110deg, var(--muted) 35%, var(--ink) 50%, var(--muted) 65%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 4s linear infinite;
}
@keyframes shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* Spotlight card (inspired by React Bits "SpotlightCard"): js sets --mx/--my */
.spot { position: relative; isolation: isolate; overflow: hidden; }
.spot::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
}
.spot:hover::after { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; min-height: min(92vh, 900px); display: flex; align-items: center; padding: 70px 0 60px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.aurora { position: absolute; inset: -20% -10% auto; height: 80%; filter: blur(80px); opacity: .7; }
:root[data-theme="dark"] .aurora { opacity: .45; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 18s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 46%; height: 70%; right: 8%; top: 10%; background: var(--aurora-1); }
.aurora span:nth-child(2) { width: 40%; height: 60%; left: 12%; top: 0; background: var(--aurora-2); animation-delay: -6s; }
.aurora span:nth-child(3) { width: 34%; height: 50%; left: 38%; top: 30%; background: var(--aurora-3); animation-delay: -12s; opacity: .6; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6%, 8%) scale(1.15); } }
.hero-fade { position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, var(--bg)); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; justify-items: center; text-align: center; }
.hero h1 {
  margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em;
  font-size: clamp(2.5rem, 7.5vw, 5.4rem); line-height: 1.22; max-width: 16ch;
}
.hero h1 .w, .article h1 .w { display: inline-block; }
/* gradient words: extra room below so the dots under ي / ب stay inside the painted box */
.grad-text.w, h1 .grad-text { padding-block: 0.06em 0.28em; margin-block: -0.06em -0.28em; }
.hero .lede { text-align: center; font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 58ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.search {
  display: flex; align-items: center; gap: 10px; width: min(560px, 100%); height: 56px; padding-inline: 18px;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong); border-radius: 16px; color: var(--muted); transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 1.02rem; }
.search input::placeholder { color: var(--muted); }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; margin-top: 8px; }
.stat { display: grid; justify-items: center; }
.stat b { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.9rem; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 24px; height: 38px; border: 2px solid var(--line-strong); border-radius: 14px; }
.scroll-hint::after { content: ""; position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--muted); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Marquee ---------- */
.marquee { position: relative; overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 38s linear infinite; direction: ltr; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.92rem; color: var(--muted);
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); }

/* ---------- Tracks (sections) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 26px; min-height: 250px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color .3s, transform .3s; will-change: transform;
}
.card:hover { border-color: var(--line-strong); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.card h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; line-height: 1.5; }
.card p { margin: 0; flex: 1; color: var(--muted); font-size: 0.98rem; line-height: 1.8; }
.count { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--accent); font-size: 0.9rem; font-weight: 600; }
.count::after { content: "←"; transition: transform .25s; }
.card:hover .count::after { transform: translateX(-5px); }

/* ---------- Showcase ("what you'll build") ---------- */
.showcase { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .showcase { grid-template-columns: 1fr 1fr; }
  .show-video { grid-column: 1 / -1; } /* the video card takes the full row */
}
.show {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 24px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-height: 260px;
}
.show h3 { margin: 0; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.5; }
.show p { margin: 0; color: var(--muted); line-height: 1.85; }
.show .tag { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); letter-spacing: 1px; direction: ltr; text-align: right; }
.show-media { position: relative; margin-top: auto; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.show-video .show-media { padding: 6px; background: var(--surface-2); border-radius: 20px; }
.show-video video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 15px; background: var(--bg); }
.show-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.show .link { color: var(--accent); font-weight: 600; font-size: .95rem; }
.show-jarvis { background: linear-gradient(160deg, #f8e6dd, var(--surface) 55%); }
:root[data-theme="dark"] .show-jarvis { background: linear-gradient(160deg, #2a1712, var(--surface) 55%); }

/* ---------- Path (timeline) ---------- */
.path { position: relative; display: grid; gap: 18px; padding-inline-start: 46px; }
.path-line { position: absolute; top: 8px; bottom: 8px; right: 15px; width: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.path-line i { position: absolute; inset: 0; background: var(--grad); transform-origin: top; transform: scaleY(0); }
.step.spot { overflow: visible; }
.step { position: relative; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; display: grid; gap: 6px; }
.step::before {
  content: attr(data-n); position: absolute; top: 22px; right: -46px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--accent); color: var(--accent); font-family: var(--font-mono); font-size: .85rem; font-weight: 700;
}
.step h3 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }
.step-lessons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.step-lessons span { font-size: .84rem; padding: 3px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* A track with its own block (thumbnail + every lesson) */
.track-feature {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: center;
  padding: clamp(14px, 2vw, 24px); margin-bottom: 26px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tf-cover { order: 2; position: relative; display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: #1a120d;
  box-shadow: 0 30px 60px -24px rgb(43 33 26 / .55); }
.tf-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.tf-cover:hover img { transform: scale(1.035); }
.tf-play { position: absolute; left: 16px; bottom: 16px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(255 250 243 / .94); color: #6f4630; box-shadow: 0 10px 26px rgb(0 0 0 / .35); transition: transform .3s; }
.tf-play svg { width: 22px; height: 22px; margin-inline-end: -3px; }
.tf-cover:hover .tf-play { transform: scale(1.08); }
.tf-body { min-width: 0; padding-inline: 6px; }
.tf-label { font-family: var(--font-display); font-size: .88rem; font-weight: 600; color: var(--accent); }
.tf-body h3 { margin: 6px 0 8px; font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.35; }
.tf-body > p { margin: 0 0 14px; color: var(--muted); line-height: 1.85; }
.tf-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tf-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft);
  font-size: .87rem; font-weight: 600; }
.tf-meta svg { width: 15px; height: 15px; color: var(--accent); }
.tf-lessons { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.tf-lessons li { min-width: 0; }
.tf-lessons a { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 8px; border-radius: 10px; color: var(--ink);
  text-decoration: none; font-size: .9rem; transition: background .2s; }
.tf-lessons a:hover { background: var(--surface-2); }
.tf-lessons .n { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font: 700 .76rem var(--font-mono);
  background: var(--surface-2); color: var(--accent); }
.tf-lessons .t { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.6; }
.tf-lessons em { flex: none; margin-inline-start: auto; font-style: normal; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--grad); color: var(--accent-ink); }
.tf-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
/* a course: its parts sit under the cover and text, full width */
.tf-parts { grid-column: 1 / -1; order: 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tf-part { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 18px 16px; border-radius: 18px;
  background: var(--bg-2, var(--bg)); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: border-color .25s, transform .25s, box-shadow .25s; }
.tf-part:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.tf-part-n { font: 700 .8rem var(--font-display); color: var(--accent); }
.tf-part b { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.45; }
.tf-part-meta { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.tf-part-meta svg { width: 15px; height: 15px; color: var(--accent); }
.tf-part ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.tf-part li { position: relative; padding-inline-start: 14px; font-size: .88rem; line-height: 1.6; color: var(--muted);
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.tf-part li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-3); }
.tf-part li em { font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--grad); color: var(--accent-ink); }
.tf-part-more { margin-top: auto; padding-top: 6px; font-size: .86rem; font-weight: 600; color: var(--accent); }
/* part headings inside the lesson list */
.pl-part { position: sticky; top: 0; z-index: 1; display: grid; gap: 1px; padding: 12px 18px 10px; font-family: var(--font-display); font-size: .95rem; font-weight: 700;
  background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pl-part small { font: 700 .74rem var(--font-display); color: var(--accent); }
@media (max-width: 900px) {
  .track-feature { grid-template-columns: 1fr; }
  .tf-parts { grid-template-columns: 1fr; }
  .tf-cover { order: 0; }
}
@media (max-width: 520px) {
  .tf-lessons { grid-template-columns: 1fr; }
  .tf-ctas { flex-direction: column; }
  .tf-ctas .button { justify-content: center; white-space: nowrap; }
}
@media (max-width: 560px) {
  .path { padding-inline-start: 40px; }
  .step { padding: 18px; }
  .step::before { right: -40px; }
  .step-lessons span:nth-child(n+3) { display: none; }
}

/* ---------- Rows (lesson lists) ---------- */
.rows { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { position: relative; display: flex; justify-content: space-between; gap: 18px; padding: 20px 24px; text-decoration: none; border-bottom: 1px solid var(--line); transition: background .2s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 3px; background: var(--grad); transform: scaleY(0); transition: transform .25s; }
.row:hover::before { transform: scaleY(1); }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; font-size: 1.04rem; }
.row-summary { display: block; margin-top: 3px; color: var(--muted); font-size: 0.95rem; line-height: 1.75; }
.row-meta { align-self: center; flex: none; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 560px) { .row { flex-direction: column; gap: 4px; padding: 16px 18px; } .row-meta { align-self: flex-start; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); line-height: 1.9; }

/* ---------- CTA band + about ---------- */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate; text-align: center; display: grid; gap: 18px; justify-items: center;
  padding: clamp(40px, 7vw, 80px) 24px; border-radius: 28px; border: 1px solid var(--line-strong);
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--surface);
}
.cta-band .h2 { max-width: 20ch; }
.about { display: flex; gap: 18px; align-items: flex-start; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.about-title { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.6; }
.about p { margin: 0; line-height: 1.95; color: var(--muted); }
@media (max-width: 560px) { .about { flex-direction: column; padding: 22px; } }

/* ---------- Section page ---------- */
.page-head { position: relative; padding: 56px 0 36px; }
.page-head::before { content: ""; position: absolute; inset: -60px -50vw auto; height: 320px; z-index: -1; background: radial-gradient(50% 100% at 70% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }
.page-title { display: flex; gap: 18px; align-items: center; margin-top: 20px; }
.page-head h1 { margin: 0; font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.4; }
.notfound { text-align: center; padding-top: 100px; }
.notfound .lede { margin: 8px auto 24px; }

/* ---------- Article ---------- */
.article-layout { display: grid; gap: 48px; padding-top: 44px; }
@media (min-width: 1080px) { .article-layout { grid-template-columns: minmax(0, 1fr) 240px; } }
.article { max-width: 760px; width: 100%; margin-inline: auto; }
.article h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1.45; margin: 18px 0 12px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 24px; color: var(--muted); font-size: 0.92rem; }
.article > .lede { max-width: none; padding-bottom: 26px; margin-bottom: 28px; border-bottom: 1px solid var(--line); font-size: 1.17rem; }
.draft-note { margin: 0 0 26px; padding: 12px 16px; border-radius: 12px; background: var(--mark-soft); color: var(--mark-ink); font-size: 0.95rem; }
.toc { display: none; }
@media (min-width: 1080px) {
  .toc { display: block; position: sticky; top: 100px; align-self: start; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
}
.toc b { display: block; margin-bottom: 8px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.6; border-inline-start: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-inline-start-color: var(--accent); background: var(--accent-soft); }

.prose { font-size: 1.08rem; line-height: 2.05; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.6; margin: 2em 0 0.6em; scroll-margin-top: 90px; }
.prose h3, .prose h4 { font-size: 1.15rem; line-height: 1.6; margin: 1.6em 0 0.4em; }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { margin: 0 0 1.25em; padding-inline-start: 1.4em; }
.prose li { margin: 0.45em 0; padding-inline-start: 0.2em; }
.prose li::marker { color: var(--accent); font-weight: 600; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--accent); text-underline-offset: 4px; }
.prose blockquote {
  margin: 1.7em 0; padding: 18px 22px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, var(--accent-soft)); border-inline-start: 3px solid var(--accent);
}
.prose blockquote p { margin: 0; }
.prose code { font-family: var(--font-mono), var(--font-body); font-size: 0.86em; background: var(--surface-2); border: 1px solid var(--line); padding: 0.1em 0.45em; border-radius: 6px; }
.prose pre { margin: 0 0 1.3em; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; white-space: pre-wrap; line-height: 1.95; font-size: 0.97rem; }
.prose pre code { background: none; border: 0; padding: 0; font-family: var(--font-body); font-size: inherit; }

.prose .prompt { margin: 0 0 1.6em; border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.prompt figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 0.88rem; font-weight: 600; color: var(--muted);
}
.prompt figcaption span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 8px var(--accent-3); }
.copy-btn { padding: 7px 16px; border: 0; border-radius: 999px; background: var(--grad); color: var(--accent-ink); font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer; }
.copy-btn.done { background: var(--accent-3); }
.prose .prompt pre { margin: 0; border: 0; border-radius: 0; box-shadow: none; max-height: 420px; overflow-y: auto; text-align: left; font-size: 0.84rem; line-height: 1.75; background: transparent; }
.prose .prompt pre code { font-family: var(--font-mono); }
/* Arabic prompts: normal reading font and right alignment (mono fonts break the joined letters apart) */
.prose .prompt pre:dir(rtl) { text-align: right; font-size: 0.98rem; line-height: 1.9; }
.prose .prompt pre:dir(rtl) code { font-family: var(--font-body); white-space: pre-wrap; }

.prose .media { margin: 0 0 1.5em; }
.prose .media video, .prose .media img { display: block; max-width: 100%; border-radius: 16px; border: 1px solid var(--line); background: #000; }
.prose .media video { max-height: 640px; margin-inline: auto; }
.prose .media figcaption { margin-top: 8px; color: var(--muted); font-size: 0.9rem; text-align: center; }
.prose .download { margin: 0 0 1.5em; }
.prose .download .button { font-size: 1.05rem; padding: 13px 28px; background: var(--grad); color: var(--accent-ink); text-decoration: none; box-shadow: var(--glow); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.pager a { display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; line-height: 1.6; transition: border-color .2s, transform .2s; }
.pager a:hover { border-color: var(--accent); transform: translateY(-2px); }
.pager small { display: block; margin-bottom: 2px; color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.pager .next { text-align: end; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 120px; border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 0.92rem; background: var(--bg-2); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Reveal (js adds .in); without js/motion everything stays visible ---------- */
.motion-on [data-reveal] { opacity: 0; transform: translateY(28px); }

/* ── SET UP YOUR OWN JARVIS (#/jarvis) ─────────────────────────────────────── */
.jarvis-hero { position: relative; padding: 70px 0 10px; }
.jarvis-hero::before { content: ""; position: absolute; inset: -80px -50vw auto; height: 420px; z-index: -1; background: radial-gradient(45% 100% at 60% 0%, rgb(239 68 68 / .22), transparent 70%); }
.jarvis-kicker { margin: 0; direction: ltr; text-align: right; font-family: var(--font-mono); letter-spacing: 6px; color: #f87171; font-weight: 500; }
.jarvis-hero h1 { font-family: var(--font-mono); font-weight: 600; letter-spacing: 1px; direction: ltr; text-align: right; font-size: clamp(2rem, 6vw, 3.8rem); margin: 10px 0 16px; line-height: 1.2; }
.jarvis-steps { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 24px 0 0; list-style: none; counter-reset: s; }
.jarvis-steps li { counter-increment: s; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.jarvis-steps li::before { content: counter(s) " · "; color: #f87171; font-weight: 600; }
.jarvis-page .block { margin-top: 64px; }
.jarvis-page .muted { color: var(--muted); font-weight: 400; font-size: .95rem; }
.jarvis-page .hint { color: var(--muted); line-height: 1.8; margin: 0 0 16px; }
.jarvis-page .hint a { color: var(--accent); }
.jt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.jt-card { position: relative; padding: 0; border: 2px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; background: #0a0a0a; color: #fff; font: inherit; text-align: right; transition: transform .2s, border-color .2s, box-shadow .2s; }
.jt-card:hover { transform: translateY(-3px); }
.jt-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.jt-name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; }
.jt-name small { font-family: var(--font-mono); color: #aaa; font-size: .78rem; direction: ltr; }
.jt-check { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; display: none; place-items: center; border-radius: 50%; background: var(--tc); color: #000; font-weight: 700; }
.jt-card.on { border-color: var(--tc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 35%, transparent), 0 16px 40px -16px var(--tc); }
.jt-card.on .jt-check { display: grid; }
.jv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.jv-card { border: 2px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; transition: border-color .2s; }
.jv-card.on { border-color: var(--accent); box-shadow: var(--glow); }
.jv-pick { display: grid; gap: 4px; width: 100%; padding: 14px 14px 10px; border: 0; background: none; text-align: right; color: var(--ink); font: inherit; cursor: pointer; }
.jv-pick b { font-size: 1.1rem; } .jv-pick small { color: var(--muted); }
.jv-gender { font-size: .8rem; color: var(--accent); }
.jv-play { display: flex; border-top: 1px solid var(--line); }
.jv-play button { flex: 1; padding: 9px 4px; border: 0; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; }
.jv-play button + button { border-inline-start: 1px solid var(--line); }
.jv-play button:hover, .jv-play button.playing { background: var(--accent); color: var(--accent-ink); }
.jarvis-get { padding: 30px; border: 1px solid var(--line-strong); border-radius: 24px; background: radial-gradient(120% 120% at 100% 0%, rgb(239 68 68 / .14), transparent 60%), var(--surface); box-shadow: var(--shadow); }
.jarvis-get .button.big { background: linear-gradient(100deg, #ef4444, #f97316); color: #fff; box-shadow: 0 10px 40px -12px #ef4444; }
.jarvis-summary { font-size: 1.05rem; margin: 0 0 16px; }
.jarvis-howto { line-height: 2; padding-inline-start: 22px; margin: 18px 0 12px; }
.jarvis-howto code { font-family: var(--font-mono); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
.jlive { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .8); backdrop-filter: blur(6px); }
.jlive-box { position: relative; width: min(1200px, 100%); aspect-ratio: 16 / 9; max-height: 90vh; border-radius: 16px; overflow: hidden; background: #000; }
.jlive-box iframe { width: 100%; height: 100%; border: 0; }
.jlive-close { position: absolute; top: 10px; left: 10px; z-index: 1; background: rgb(0 0 0 / .6); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── Course player (#/section/… and #/article/…): lessons list on the right, video + notes on the left ── */
.course { display: grid; gap: 24px; width: 100%; max-width: 1440px; margin-inline: auto; padding: 24px 16px 0; }
@media (min-width: 720px) { .course { padding-inline: 32px; } }
@media (min-width: 1000px) { .course { grid-template-columns: 340px minmax(0, 1fr); align-items: start; padding-top: 28px; } }

.playlist { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
@media (min-width: 1000px) { .playlist { position: sticky; top: 88px; max-height: calc(100vh - 108px); display: flex; flex-direction: column; } }
.pl-head { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.pl-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.5; }
.pl-progress { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.pl-progress i { position: relative; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pl-progress i::after { content: ""; position: absolute; inset: 0 0 0 auto; width: calc(var(--p) * 100%); background: var(--grad); border-radius: 99px; }
.pl-list { overflow-y: auto; overscroll-behavior: contain; }
.pl-item { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; text-decoration: none; border-bottom: 1px solid var(--line); transition: background .2s; }
.pl-item:last-child { border-bottom: 0; }
.pl-item:hover { background: var(--surface-2); }
.pl-item.on { background: var(--accent-soft); }
.pl-item.on::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 3px; background: var(--accent); }
.pl-num {
  flex: none; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--muted); font-family: var(--font-mono); font-size: .8rem; font-weight: 600;
}
.pl-item.seen .pl-num { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pl-item.on .pl-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pl-icon { width: 13px; height: 13px; transform: scaleX(-1); }
.pl-text { display: grid; gap: 2px; min-width: 0; }
.pl-text b { font-weight: 600; font-size: .97rem; line-height: 1.6; }
.pl-item.on .pl-text b { color: var(--ink); }
.pl-text small { color: var(--muted); font-size: .8rem; }

.lesson { min-width: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: var(--shadow); }
.screen video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lesson-body { max-width: 860px; padding: 26px 2px 0; }
.lesson-kicker { margin: 0 0 4px; color: var(--accent); font-size: .9rem; font-weight: 600; }
.lesson-body h1 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.45; }
.lesson-body > .lede { max-width: none; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }

/* Phones and tablets: lessons become a sideways strip above the video */
@media (max-width: 999px) {
  .pl-head { padding: 14px 16px 12px; }
  .pl-head h2 { font-size: 1.1rem; }
  .pl-list { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
  .pl-item { flex: 0 0 min(78%, 280px); scroll-snap-align: start; border-bottom: 0; border-inline-start: 1px solid var(--line); }
  .pl-part { position: static; flex: 0 0 auto; align-content: center; max-width: 150px; padding: 10px 14px; border-bottom: 0; border-inline-start: 1px solid var(--line); font-size: .82rem; line-height: 1.45; }
  .pl-item.on::before { inset: auto 0 0 0; width: auto; height: 3px; }
}

/* the "AI" in the brand name */
.brand-ai { color: var(--accent-2); font-family: var(--font-display); }
.brand-name { font-family: "Alexandria", var(--font-display); letter-spacing: .01em; }

/* ---------- How a lesson works (3 steps) ---------- */
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
/* outer shell + inner core ("double bezel") */
.how-card { padding: 6px; border-radius: 26px; background: var(--surface-2); border: 1px solid var(--line); }
.how-core {
  position: relative; height: 100%; padding: 26px 24px 24px; border-radius: 20px; background: var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), var(--shadow);
}
.how-n { position: absolute; top: 18px; left: 20px; font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--line-strong); }
.how-ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); color: var(--accent); margin-bottom: 14px; }
.how-ic .icon { width: 22px; height: 22px; }
.how h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.2rem; }
.how p { margin: 0; color: var(--muted); line-height: 1.85; }
:root[data-theme="dark"] .how-core { box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), var(--shadow); }

/* ---------- Paper grain (fixed layer, never scrolls) ---------- */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::after { opacity: .05; }

/* readable contrast for small coloured labels (light theme); dark theme keeps the brighter tones */
.show-jarvis .tag, .show-jarvis .link { color: #b42318 !important; }
:root[data-theme="dark"] .show-jarvis .tag, :root[data-theme="dark"] .show-jarvis .link { color: #f87171 !important; }
:root:not([data-theme="dark"]) .brand-ai { color: var(--accent); }

/* ---------- Pricing ---------- */
.price-card { max-width: 460px; margin-inline: auto; padding: 6px; border-radius: 30px; background: var(--surface-2); border: 1px solid var(--line); }
.price-core {
  display: grid; justify-items: center; gap: 6px; padding: 34px 30px 30px; border-radius: 24px; text-align: center;
  background: var(--surface); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), var(--shadow);
}
:root[data-theme="dark"] .price-core { box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), var(--shadow); }
.price-amount { display: flex; align-items: flex-start; gap: 4px; font-family: var(--font-display); color: var(--ink); line-height: 1; }
.price-amount .cur { font-size: 1.6rem; font-weight: 700; color: var(--accent); margin-top: 8px; }
.price-amount b { font-size: 4rem; font-weight: 800; letter-spacing: -0.02em; }
.price-period { color: var(--muted); margin-bottom: 14px; }
.price-list { list-style: none; margin: 0 0 22px; padding: 18px 0 0; display: grid; gap: 12px; width: 100%; border-top: 1px solid var(--line); text-align: start; }
.price-list li { display: flex; align-items: center; gap: 10px; }
.price-list .icon { flex: none; width: 20px; height: 20px; color: var(--accent); }
.price-note { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }

/* ---------- Members: lock screen, login, account ---------- */
.screen.locked { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.screen.locked img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(6px) saturate(.8); transform: scale(1.06); opacity: .75; }
.lock-over { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink); background: rgb(251 248 242 / .35); }
:root[data-theme="dark"] .lock-over { background: rgb(26 20 16 / .45); }
.lock-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); color: var(--accent); }
.lock-ic .icon { width: 28px; height: 28px; }
.lock-over b { font-family: var(--font-display); font-size: 1.15rem; padding: 4px 14px; border-radius: 999px; background: var(--surface); }
.lock-panel { display: grid; justify-items: start; gap: 12px; margin-top: 8px; padding: 24px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.lock-panel p { margin: 0; }
.lock-panel .lock-h { margin: 0; font-size: 1.1rem; }
.lock-outline { margin: 0 0 4px; padding-inline-start: 1.2em; display: grid; gap: 6px; color: var(--muted, inherit); }
/* the page text the server sends for Google, before the app draws the page */
.seo-page { padding-block: 48px; }
.seo-page ul, .seo-page ol { padding-inline-start: 1.2em; }
.seo-page img { max-width: 100%; height: auto; border-radius: var(--radius); }
.lock-alt { color: var(--muted); font-size: .95rem; }
.lock-alt a { color: var(--accent); font-weight: 600; }
.free-tag { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--accent); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.account-page { max-width: 460px; margin: 60px auto 80px; display: grid; gap: 14px; }
.account-page h1 { margin: 0; font-family: var(--font-display); font-size: 2rem; }
.account-page .lede { margin: 0; }
.button.wide { width: 100%; }
.login-form { display: grid; gap: 10px; }
.login-form label { font-weight: 600; font-size: .95rem; }
.login-form input {
  font: inherit; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.login-form input:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
.form-msg { margin: 0; min-height: 1.4em; color: var(--muted); font-size: .92rem; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.status-pill { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); color: var(--muted); }
.status-pill.ok { color: var(--accent); font-weight: 600; }
#account-slot:empty { display: none; }
.view-legal { overflow-x: clip; }
.legal-page { max-width: 760px; margin: 0 auto 80px; }

/* ---------- Tables in lessons (prices) ---------- */
.prose .table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 420px; }
.prose th, .prose td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 700; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child, .prose th:first-child { min-width: 8em; font-weight: 600; }
@media (max-width: 560px) {
  .prose table { min-width: 0; font-size: .92rem; }
  .prose th, .prose td { padding: 10px 11px; }
  .prose td:first-child, .prose th:first-child { min-width: 6.5em; }
}

/* ---------- Private library (#/library) ---------- */
.library { padding-bottom: 80px; overflow-x: clip; }
.lib-head { padding-bottom: 20px; }
.lib-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.lib-tab { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.lib-tab.on { background: var(--grad); color: var(--accent-ink); border-color: transparent; }
/* no text highlight on quick double-clicks (it drew a sharp brown box inside the round button) */
.lib-tab, .lib-chip, .button, .pl-item, .copy-btn { -webkit-user-select: none; user-select: none; }
.lib-tab { border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); transition: border-color .2s, color .2s, transform .2s; }
.lib-tab:not(.on):hover { border-color: var(--accent); color: var(--accent); }
.lib-tab:active { transform: scale(.97); }
.lib-tab.on { box-shadow: var(--glow); }
.lib-chip { transition: border-color .2s, color .2s; }
.lib-chip:not(.on):hover { border-color: var(--accent); color: var(--ink); }
.lib-tabs [data-lib-lock] { margin-inline-start: auto; }
.lib-filters { display: grid; gap: 10px; margin-bottom: 8px; }
.lib-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-chip { font: inherit; font-size: .92rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.lib-chips.small .lib-chip { font-size: .85rem; padding: 4px 12px; }
.lib-chip.on { color: var(--accent); border-color: var(--accent); background: var(--surface-2); font-weight: 600; }
.lib-search { font: inherit; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); max-width: 420px; }
.lib-search:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
.lib-count { margin: 6px 0 14px; }
.lib-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.lib-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.lib-thumb { aspect-ratio: 16 / 10; background: var(--surface-2); }
.lib-thumb img, .lib-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.lib-body h3 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; direction: ltr; text-align: right; }
.lib-body p { margin: 0; font-size: .9rem; color: var(--muted); }
.lib-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-prompt { margin: 4px 0 0; max-height: 280px; overflow: auto; white-space: pre-wrap; font-family: var(--font-mono); font-size: .78rem; line-height: 1.6; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; }
.lib-more { text-align: center; margin-top: 22px; }
.lib-guides { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.lib-guide { display: grid; gap: 6px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.lib-guide b { direction: ltr; text-align: right; }
.lib-guide span { color: var(--accent); font-size: .9rem; font-weight: 600; }
.lib-guide:hover { border-color: var(--accent); }

/* ---------- Gemini prompts (library tab) ---------- */
.gem-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.gem-card { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.gem-top { display: flex; gap: 12px; align-items: flex-start; }
.gem-n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font-family: var(--font-mono); font-weight: 700; font-size: .9rem; }
.gem-top h3 { margin: 0; font-family: var(--font-display); font-size: 1.02rem; direction: ltr; text-align: right; }
.gem-topic { margin: 2px 0 0; font-size: .82rem; color: var(--muted); direction: ltr; text-align: right; }
.gem-use, .gem-tip { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.7; }
.gem-use b, .gem-tip b { color: var(--ink); }
.gem-tip { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.gem-prompt { margin: 0; max-height: 240px; overflow: auto; white-space: pre-wrap; font-family: var(--font-mono); font-size: .8rem; line-height: 1.65; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; }
.gem-use b, .gem-tip b { display: block; margin-bottom: 2px; }
.gem-use span, .gem-tip span { display: block; text-align: left; }

/* ---------- Library: lessons, Jarvis box, Motion Studio tool ---------- */
.lib-h2 { margin: 28px 0 12px; font-family: var(--font-display); font-size: 1.35rem; }
.lib-lessons { display: grid; gap: 12px; }
.lib-lesson { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.lib-lesson summary { display: flex; gap: 12px; align-items: center; padding: 16px 18px; cursor: pointer; list-style: none; -webkit-user-select: none; user-select: none; }
.lib-lesson summary::-webkit-details-marker { display: none; }
.lib-lesson summary b { display: block; font-family: var(--font-display); }
.lib-lesson summary small { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.lib-lesson[open] summary { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.lib-lesson .prose { padding: 6px 20px 20px; }
.lib-jarvis { margin: 0 calc(var(--gutter, 0px) * -1); }
.lib-jarvis .view { overflow-x: clip; }
.tool-hero { display: grid; gap: 22px; align-items: center; grid-template-columns: 1fr; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 900px) { .tool-hero { grid-template-columns: 1.1fr 1fr; } }
.tool-hero .lib-h2 { margin-top: 0; }
.tool-note { margin: 10px 0 0; font-size: .9rem; }
.tool-demos { display: flex; gap: 12px; justify-content: center; }
.tool-demos video { width: min(46%, 220px); aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; background: #111; box-shadow: var(--shadow); }
.tool-facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); margin-top: 18px; }
.tool-fact { display: grid; gap: 4px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tool-fact b { font-family: var(--font-display); font-size: 1.9rem; color: var(--accent); line-height: 1; }
.tool-fact span { color: var(--muted); font-size: .92rem; }
.tool-list { display: grid; gap: 8px; padding-inline-start: 22px; line-height: 1.85; }

/* ═══════════ Premium layer (2026-11-09): grain, warm light, glass cards, bigger type, hero window ═══════════ */
/* film grain over everything (very faint) + warm light leaks behind the page */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22160%22 height=%22160%22%3E%3Cfilter id=%22n%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.85%22 numOctaves=%223%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::before { opacity: .045; mix-blend-mode: multiply; }
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 620px at 88% -8%, rgb(226 145 95 / .17), transparent 62%),
              radial-gradient(760px 560px at -6% 108%, rgb(205 112 71 / .13), transparent 60%);
}
:root[data-theme="light"] body::after { background: radial-gradient(900px 620px at 88% -8%, rgb(201 138 92 / .14), transparent 62%), radial-gradient(760px 560px at -6% 108%, rgb(176 98 58 / .08), transparent 60%); }

/* type: Kufi headings need more room; titles bigger and heavier */
h1, h2, h3 { text-wrap: balance; }
.hero h1 { font-weight: 900; line-height: 1.45; letter-spacing: -0.015em; font-size: clamp(2.2rem, 4.9vw, 3.9rem); }
.h2 { font-weight: 800; font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.5; letter-spacing: -0.01em; }
.hero .lede, .lede { line-height: 2; }
.stat b, .price-amount, .tf-lessons .n, .hv-f2 b { font-family: var(--font-latin); }

/* kicker: copper glass pill */
.kicker { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }

/* buttons: a light sweep on hover */
.button.primary { overflow: hidden; }
.button.primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .38) 50%, transparent 70%); transform: translateX(110%); transition: transform .7s ease;
}
.button.primary:hover::after { transform: translateX(-110%); }

/* glass cards with a fine copper edge (dark) */
:root[data-theme="dark"] :is(.track-feature, .show, .faq details, .step, .rows, .about, .pager a, .how-card, .tf-part, .playlist, .prose .prompt) {
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgb(255 244 232 / .05), rgb(255 244 232 / .015)) padding-box,
              linear-gradient(150deg, rgb(242 214 179 / .3), rgb(242 214 179 / .05) 40%, rgb(226 145 95 / .24)) border-box;
}
:root[data-theme="dark"] :is(.track-feature, .show, .playlist) { box-shadow: 0 30px 80px -40px rgb(0 0 0 / .9), inset 0 1px 0 rgb(255 255 255 / .05); }
:root[data-theme="dark"] .tf-part:hover { box-shadow: 0 0 0 1px var(--accent), 0 20px 50px -24px rgb(226 145 95 / .5); }
:root[data-theme="light"] :is(.track-feature, .show) { box-shadow: 0 1px 2px rgb(60 40 25 / .05), 0 30px 70px -40px rgb(60 40 25 / .35); }

/* price: a slowly turning copper ring */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.price-card.is-pro { padding: 1.5px; border: 0; background: conic-gradient(from var(--ang), #e2915f, transparent 25%, #f2d6b3 50%, transparent 75%, #e2915f);
  animation: ring 7s linear infinite; box-shadow: 0 30px 90px -40px rgb(226 145 95 / .6); }
.price-card.is-pro .price-core { border-radius: 28.5px; }
@keyframes ring { to { --ang: 360deg; } }

/* ── hero: copy + live course window ── */
.hero { min-height: min(94vh, 940px); }
.hero-copy { display: grid; gap: 26px; justify-items: center; min-width: 0; }
.hero-visual { position: relative; width: 100%; max-width: 580px; justify-self: center; margin-top: 18px; perspective: 1600px; }
.hv-glow { position: absolute; inset: 6% 2% 0; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgb(226 145 95 / .5), transparent); filter: blur(44px); }
.hv-window {
  border-radius: 22px; overflow: hidden; transform: rotateY(7deg) rotateX(3deg); transform-origin: 30% 50%;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line-strong);
  box-shadow: 0 50px 110px -40px rgb(0 0 0 / .75), inset 0 1px 0 rgb(255 255 255 / .07);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.hv-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hv-dots { display: flex; gap: 6px; direction: ltr; }
.hv-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.hv-url { margin-inline: auto; padding: 4px 14px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 12px; padding: 14px; }
.hv-player { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; background: #000; }
.hv-player img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hv-play { position: absolute; left: 12px; bottom: 24px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(255 250 243 / .92); color: #6f3d24; box-shadow: 0 10px 30px rgb(0 0 0 / .4); }
.hv-play svg { width: 17px; height: 17px; margin-inline-end: -2px; }
.hv-progress { position: absolute; inset: auto 12px 10px; height: 4px; border-radius: 4px; background: rgb(255 255 255 / .25); overflow: hidden; }
.hv-progress i { position: absolute; inset: 0 auto 0 0; width: 62%; border-radius: inherit; background: var(--grad); animation: hvprog 9s ease-in-out infinite; }
@keyframes hvprog { from { width: 8%; } to { width: 92%; } }
.hv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.hv-list li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: .76rem; line-height: 1.5; text-align: start; }
.hv-list li span { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font: 700 .7rem var(--font-latin); background: var(--line); color: var(--ink); }
.hv-list li em { font-style: normal; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.hv-list li.on { color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.hv-list li.done span { background: var(--grad); color: var(--accent-ink); }
.hv-float {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; white-space: nowrap;
  background: var(--glass); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: .86rem; font-weight: 600;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: hvfloat 6s ease-in-out infinite;
}
.hv-float svg { width: 16px; height: 16px; color: var(--accent); }
.hv-f1 { top: -16px; right: -8px; }
.hv-f2 { top: -26px; left: 22px; flex-direction: column; gap: 0; padding: 8px 18px; animation-delay: -2s; }
.hv-f2 b { font-size: 1.7rem; line-height: 1.15; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hv-f2 span { font-size: .78rem; color: var(--muted); font-weight: 500; }
.hv-f3 { bottom: -16px; right: 16%; animation-delay: -4s; }
@keyframes hvfloat { 50% { transform: translateY(-9px); } }
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 56px; text-align: start; justify-items: stretch; }
  .hero-copy { justify-items: start; }
  .hero .lede { text-align: start; }
  .hero-ctas, .hero-stats { justify-content: flex-start; }
  .hero-stats { gap: 12px 34px; }
  .stat { justify-items: start; }
  .hero h1 { max-width: 17ch; }
  .hero-visual { margin-top: 0; }
}
@media (max-width: 640px) {
  .hv-body { grid-template-columns: 1fr; }
  .hv-list { display: none; }
  .hv-window { transform: none; }
  .hv-f2 { display: none; }
  .hv-f1 { right: 6px; } .hv-f3 { right: auto; left: 10px; }
  .hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .stat b { font-size: 1.6rem; }
  .stat span { font-size: .78rem; text-align: center; }
}

/* ── "what you'll build": phone call + browser visuals ── */
.show-call { margin-top: auto; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.call-av { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--accent-ink); animation: ringpulse 2.4s ease-out infinite; }
.call-av svg { width: 22px; height: 22px; }
@keyframes ringpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
.call-text { display: grid; min-width: 0; }
.call-text b { font-size: .98rem; white-space: nowrap; } .call-text small { color: var(--muted); font-size: .8rem; }
.call-wave { margin-inline-start: auto; display: flex; align-items: center; justify-content: flex-end; gap: 3px; height: 30px; direction: ltr; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.call-wave i { width: 3px; height: 30%; border-radius: 3px; background: var(--accent); animation: wave 1.1s ease-in-out infinite; }
.call-wave i:nth-child(3n) { animation-delay: -.3s; } .call-wave i:nth-child(3n+1) { animation-delay: -.6s; } .call-wave i:nth-child(4n) { animation-delay: -.85s; }
@keyframes wave { 50% { height: 100%; } }
.show-browser { padding: 0; background: var(--surface-2); }
.sb-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; direction: ltr; border-bottom: 1px solid var(--line); }
.sb-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.sb-bar span { margin-inline: auto; font: 500 .74rem var(--font-latin); color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .price-card, .hv-float, .hv-progress i, .call-av, .call-wave i { animation: none; }
  .button.primary::after { display: none; }
}

/* library: locked prompts for visitors */
.gem-locked { filter: blur(3.5px); user-select: none; pointer-events: none; opacity: .7; }
.lib-lockbtn { gap: 6px; }
.nav a#nav-library[hidden] { display: none; }

/* two plans side by side */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 22px; max-width: 900px; margin-inline: auto; align-items: stretch; }
.price-grid .price-card { max-width: none; margin: 0; display: flex; }
.price-grid .price-core { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; }
.price-grid .price-core .button { margin-top: auto; }
.price-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.price-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 5px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  background: var(--grad); color: var(--accent-ink); box-shadow: var(--glow); white-space: nowrap; }
.price-list li.plus b { font-weight: 700; }
.price-list li.plus .icon { color: var(--accent-3); }
.price-card.is-basic { opacity: .96; }

/* ---------- Site guide (js/guide.js): welcome card, tour ring + bubble, corner button ---------- */
.guide { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.guide > * { pointer-events: auto; }
.guide-dim { position: absolute; inset: 0; background: rgb(12 8 5 / 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.guide.in .guide-dim { opacity: 1; }
.guide-card { position: absolute; left: 50%; top: 50%; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  translate: -50% -46%; opacity: 0; scale: .94; transition: translate .5s cubic-bezier(.2,.9,.3,1.2), opacity .35s, scale .5s cubic-bezier(.2,.9,.3,1.2);
  padding: 30px 26px 26px; border-radius: 26px; text-align: center; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 40px 90px -30px rgb(0 0 0 / .55); }
.guide.in .guide-card { translate: -50% -50%; opacity: 1; scale: 1; }
.guide-face { width: 150px; height: 150px; margin: -6px auto 14px; border-radius: 50%; overflow: hidden; position: relative;
  background: radial-gradient(circle at 50% 38%, var(--accent-2), var(--accent) 62%, color-mix(in srgb, var(--accent) 60%, #000));
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--accent-2) 70%, transparent), 0 18px 40px -16px var(--accent); animation: guide-bob 3.2s ease-in-out infinite; }
.guide-face img { position: absolute; inset: 6% 0 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
@keyframes guide-bob { 50% { transform: translateY(-5px); } }
.guide-card h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; margin: 0 0 8px; }
.guide-card p { color: var(--muted); line-height: 1.85; margin: 0 0 20px; }
.guide-card p b { color: var(--ink); }
.guide-actions { display: grid; gap: 10px; }
.guide-actions .button { width: 100%; justify-content: center; }

.guide-ring { position: fixed; left: 0; top: 0; border-radius: 18px; pointer-events: none !important; opacity: 0;
  box-shadow: 0 0 0 9999px rgb(12 8 5 / 0.58), 0 0 0 2px var(--accent-2), 0 0 30px 4px color-mix(in srgb, var(--accent-2) 45%, transparent);
  transition: transform .45s cubic-bezier(.3,.8,.3,1), width .45s, height .45s, opacity .3s; }
.guide-tour.moving .guide-ring { transition: none; }
.guide-bubble { position: fixed; left: 0; top: 0; width: min(400px, calc(100vw - 32px)); max-height: min(62vh, 560px); overflow: auto;
  padding: 16px 18px 14px; border-radius: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 30px 70px -24px rgb(0 0 0 / .6); transition: transform .45s cubic-bezier(.3,.8,.3,1); }
.guide-bubble.free { transform: none !important; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 48vh; }
.guide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.guide-head img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 0; flex: none;
  background: radial-gradient(circle at 50% 38%, var(--accent-2), var(--accent) 65%); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent-2); }
.guide-head div { flex: 1; min-width: 0; }
.guide-count { color: var(--accent-2); font-family: var(--font-latin); font-size: .78rem; font-weight: 700; }
.guide-title { margin: 2px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; line-height: 1.5; }
.guide-x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.guide-x:hover { color: var(--ink); background: var(--surface-2); }
.guide-body { color: var(--muted); line-height: 1.85; font-size: .95rem; }
.guide-body p { margin: 0 0 8px; }
.guide-body b { color: var(--ink); }
.guide-body ul { margin: 4px 0 10px; padding: 0 18px 0 0; }
.guide-body li { margin: 3px 0; }
.guide-body li::marker { color: var(--accent-2); }
.guide-diff { display: grid; gap: 6px; }
.guide-diff span { padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.guide-diff span + span { background: color-mix(in srgb, var(--accent-2) 22%, transparent); }
.guide-dots { display: flex; justify-content: center; gap: 5px; margin: 10px 0; }
.guide-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line-strong); transition: width .3s, background .3s; }
.guide-dots i.on { width: 20px; background: var(--accent-2); }
.guide-nav { display: flex; justify-content: space-between; gap: 10px; }
.guide-nav .button[disabled] { opacity: .35; pointer-events: none; }
html.guide-on .guide-launch { opacity: 0; pointer-events: none; }

.guide-launch { position: fixed; z-index: 900; inset-inline-start: 16px; bottom: 16px; display: none; align-items: center; gap: 8px;
  padding: 4px 4px 4px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 600 .9rem var(--font-body); cursor: pointer; box-shadow: var(--shadow); transition: transform .2s, opacity .3s; }
html.guide-home .guide-launch { display: flex; }
.guide-launch:hover { transform: translateY(-2px); }
.guide-launch img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 0; order: -1;
  background: radial-gradient(circle at 50% 38%, var(--accent-2), var(--accent) 65%); }
@media (max-width: 520px) { .guide-launch span { display: none; } .guide-launch { padding: 4px; } }
@media (prefers-reduced-motion: reduce) { .guide-face { animation: none; } .guide-card, .guide-ring, .guide-bubble { transition: none; } }

/* ---- home: people online now + members' reviews strip (2026-11-09) ---- */
.home-social { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.home-social > * { min-width: 0; }
.live-pill { justify-self: center; display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 8px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.live-pill b { color: var(--ink); font-family: var(--font-latin); font-variant-numeric: tabular-nums; }
.live-pill i { width: 9px; height: 9px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 0 rgba(47,191,113,.6); animation: live-dot 1.8s infinite; }
.live-pill.bump b { animation: live-bump .5s ease; }
@keyframes live-dot { 70% { box-shadow: 0 0 0 9px rgba(47,191,113,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); } }
@keyframes live-bump { 40% { transform: translateY(-3px); color: var(--accent); } }
.reviews-marquee .marquee-track { gap: 16px; animation-duration: 60s; }
.review-chip { direction: rtl; margin: 0; width: 300px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  display: grid; gap: 8px; align-content: start; }
.review-chip .stars { color: #f5b301; letter-spacing: 2px; font-size: .95rem; }
.review-chip blockquote { margin: 0; color: var(--ink); line-height: 1.7; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.review-chip figcaption { color: var(--muted); font-size: .88rem; }
.reviews-cta { margin: 0; text-align: center; font-size: .92rem; }
.reviews-cta a { color: var(--accent); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .live-pill i, .live-pill.bump b { animation: none; } }

/* ---- account: rate the course ---- */
.review-form { display: grid; gap: 10px; margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.review-form h2 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; }
.review-form p { margin: 0; }
.review-form input, .review-form textarea, .cm-form textarea, .cm-form input {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; }
.stars-pick { display: flex; gap: 6px; direction: ltr; justify-content: flex-end; }
.stars-pick button { background: none; border: 0; padding: 0 2px; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--line-strong); }
.stars-pick button.on { color: #f5b301; }

/* ---- library: Pro lock for Jarvis / Motion Studio ---- */
.lib-pro-lock { max-width: 560px; margin: 30px auto; text-align: center; justify-items: center; }

/* ---- community ---- */
.community { max-width: 720px; margin: 0 auto; padding-bottom: 80px; }
.cm-form { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.cm-new { grid-template-columns: auto 1fr; align-items: start; }
.cm-row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.cm-row .form-msg { margin-inline-end: auto; }
.cm-name .cm-row input { flex: 1; min-width: 180px; }
.cm-feed { display: grid; gap: 12px; }
.cm-post { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.cm-post.reply { padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.cm-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 1.05rem; }
.cm-post.reply .cm-avatar { width: 32px; height: 32px; font-size: .9rem; }
.cm-main { min-width: 0; display: grid; gap: 6px; }
.cm-main header { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.cm-email { font-size: .8rem; }
.cm-text { margin: 0; line-height: 1.8; overflow-wrap: anywhere; white-space: normal; }
.cm-text a { color: var(--accent); }
.cm-main footer { display: flex; gap: 6px; }
.cm-act { background: none; border: 0; color: var(--muted); font: inherit; font-size: .9rem; padding: 4px 8px; border-radius: 10px; cursor: pointer; }
.cm-act:hover { background: var(--surface-2); color: var(--ink); }
.cm-act.on { color: #e5484d; }
.cm-act.danger:hover { color: #e5484d; }
.cm-replies { display: grid; gap: 4px; }
.cm-reply-form { margin: 6px 0 0; padding: 10px; background: var(--surface-2); }
.cm-more { text-align: center; margin-top: 18px; }
@media (max-width: 560px) { .cm-new { grid-template-columns: 1fr; } .cm-new .cm-avatar { display: none; } }

/* decorative glows (e.g. behind page titles) must never make the page scroll sideways on phones */
#app { overflow-x: clip; }

/* ---- library: AI tools catalog + prompt library (2026-11-10) ---- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tool-card { display: grid; gap: 8px; align-content: start; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tool-card header { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tool-card header b { font-family: var(--font-latin); }
.tool-card p { margin: 0; color: var(--ink); line-height: 1.7; font-size: .95rem; }
.tool-card footer { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .85rem; }
.tool-card .tag { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pl-list { display: grid; gap: 10px; }
.pl-item { display: grid; gap: 8px; justify-items: start; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pl-item h3 { margin: 0; font-size: 1rem; font-family: var(--font-latin); text-align: left; width: 100%; }
.pl-text { margin: 0; color: var(--muted); line-height: 1.7; font-size: .92rem; text-align: left; width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
