/* ─── Fonts (local Vazirmatn) ───────────────────────────────────────────── */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Black.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ─── Design tokens ─────────────────────────────────────────────────────── */
:root {
  --bg: #f7f8fc;
  --bg-soft: #eef0f7;
  --card: #ffffff;
  --card-2: #fafbff;
  --card-hover: #f3f5ff;
  --line: #e3e6f0;
  --line-soft: #ecedf4;
  --fg: #0f1424;
  --fg-dim: #4a5168;
  --fg-mute: #8a90a4;
  --brand: #6c63ff;
  --brand-2: #00b89a;
  --brand-3: #8b5cf6;
  --premium: #d97706;
  --premium-bg: rgba(245, 158, 11, 0.14);
  --success: #16a34a;
  --shadow-sm: 0 6px 18px -10px rgba(20, 24, 60, 0.18);
  --shadow: 0 22px 50px -24px rgba(20, 24, 60, 0.28);
  --shadow-glow: 0 10px 40px -12px rgba(108, 99, 255, 0.45);
  --radius: 18px;
  --radius-lg: 24px;
  --radius-sm: 12px;
  --grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --grad-soft: linear-gradient(135deg, rgba(108, 99, 255, 0.14), rgba(0, 184, 154, 0.12));
}

/* ─── Reset / base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }

/* ─── Layout ────────────────────────────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

/* ─── Decorative background ─────────────────────────────────────────────── */
.bg-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-fx .blob {
  position: absolute;
  width: 620px; height: 620px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}
.bg-fx .blob-1 {
  top: -200px; right: -140px;
  background: radial-gradient(circle, var(--brand), transparent 65%);
}
.bg-fx .blob-2 {
  top: 280px; left: -180px;
  background: radial-gradient(circle, var(--brand-2), transparent 65%);
  opacity: 0.28;
}
.bg-fx .grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 24, 60, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 24, 60, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
}
body > header,
body > main,
body > footer { position: relative; z-index: 1; }

/* ─── Header ────────────────────────────────────────────────────────────── */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 252, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--grad);
  padding: 4px;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(108, 99, 255, 0.65);
}
.brand-mark img {
  width: 100%; height: 100%;
  border-radius: 8px;
  object-fit: cover;
}
.site-nav {
  display: flex;
  gap: 6px;
  margin-inline-start: 18px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--fg-dim);
  font-weight: 500;
  transition: background .15s, color .15s;
}
.site-nav a:hover { background: rgba(108, 99, 255, 0.08); color: var(--fg); }
@media (max-width: 720px) {
  .site-nav { display: none; }
}
.spacer { flex: 1; }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--grad);
  color: white;
  font-weight: 700;
  font-size: 14px;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  box-shadow: var(--shadow-glow);
  white-space: nowrap;
}
.cta:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 36px -10px rgba(108, 99, 255, 0.7); }
.cta svg { width: 16px; height: 16px; }
.cta-sm { padding: 9px 14px; font-size: 13.5px; }
.cta-lg { padding: 14px 22px; font-size: 15px; border-radius: 14px; }
.cta-lg svg { width: 18px; height: 18px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  transition: background .15s, border-color .15s, transform .15s;
}
.btn-ghost:hover { background: var(--card-hover); border-color: rgba(108, 99, 255, 0.45); transform: translateY(-1px); }
.btn-ghost svg { width: 14px; height: 14px; }

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 72px 22px 56px;
}
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
  .hero-art { order: -1; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.28);
  color: #4a3fcc;
  font-size: 12.5px;
  font-weight: 700;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(0, 184, 154, 0.18);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  margin: 18px 0 14px;
  letter-spacing: -0.02em;
  line-height: 1.18;
  background: linear-gradient(180deg, #0f1424 0%, #4a5168 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--fg-dim);
  max-width: 540px;
  margin: 0;
  font-size: 16.5px;
  line-height: 1.85;
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-stats {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 24px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.hero-stats small {
  color: var(--fg-mute);
  font-size: 12.5px;
  margin-top: 2px;
}

/* ─── Hero art: mock spreadsheet device ─────────────────────────────────── */
.hero-art {
  position: relative;
  min-height: 380px;
}
.device {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f5f7ff);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px rgba(20, 24, 60, 0.35),
              0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  transition: transform .4s ease;
}
.device:hover { transform: perspective(1200px) rotateY(-2deg) rotateX(1deg); }
.device-head {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-soft);
}
.device-head span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #d4d6e0;
}
.device-head span:nth-child(1) { background: #ff5f57; }
.device-head span:nth-child(2) { background: #febc2e; }
.device-head span:nth-child(3) { background: #28c840; }
.device-body { padding: 16px; display: grid; gap: 14px; }
.cells {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  font-size: 12px;
  background: white;
}
.cells .row {
  display: grid;
  grid-template-columns: 28px 1.4fr 1fr 0.7fr 1fr;
  align-items: center;
}
.cells .row > * {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  border-inline-start: 1px solid var(--line-soft);
  color: var(--fg-dim);
}
.cells .row > b {
  border-inline-start: 0;
  background: var(--bg-soft);
  color: var(--fg-mute);
  font-weight: 600;
  text-align: center;
}
.cells .row.head > * {
  background: var(--bg-soft);
  color: var(--fg-mute);
  font-weight: 700;
  text-align: center;
}
.cells .row.head > span:first-child { grid-column: 1 / 2; }
.cells .row .hl { color: var(--fg); font-weight: 700; }
.cells .row .hl.big { color: var(--brand-2); font-weight: 800; }
.cells .row.total {
  background: rgba(108, 99, 255, 0.07);
}
.cells .row.total > * { border-bottom: 0; color: var(--fg); }
.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 70px;
  padding: 8px 4px 0;
}
.chart span {
  flex: 1;
  background: var(--grad);
  border-radius: 6px 6px 2px 2px;
  opacity: 0.85;
  animation: rise .8s ease-out backwards;
}
.chart span:nth-child(1) { animation-delay: .05s; }
.chart span:nth-child(2) { animation-delay: .15s; }
.chart span:nth-child(3) { animation-delay: .25s; }
.chart span:nth-child(4) { animation-delay: .35s; }
.chart span:nth-child(5) { animation-delay: .45s; }
@keyframes rise { from { transform: scaleY(0); transform-origin: bottom; opacity: 0; } }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: floaty 5s ease-in-out infinite;
}
.float-card .emoji {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--grad-soft);
  color: var(--brand-2);
  font-size: 14px;
  font-weight: 800;
}
.float-card strong { display: block; font-size: 13px; font-weight: 700; }
.float-card small { color: var(--fg-mute); font-size: 11px; }
.float-card.f1 { top: 14%; inset-inline-start: -18px; animation-delay: 0s; }
.float-card.f2 { bottom: 10%; inset-inline-end: -10px; animation-delay: 1.5s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@media (max-width: 560px) {
  .float-card.f1 { inset-inline-start: 8px; top: 6%; }
  .float-card.f2 { inset-inline-end: 8px; bottom: 6%; }
}

/* ─── Section heads ─────────────────────────────────────────────────────── */
.section-head {
  text-align: center;
  margin: 0 auto 36px;
  max-width: 640px;
}
.section-head h3 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.section-head p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 15px;
}

/* ─── Features ──────────────────────────────────────────────────────────── */
.features { padding: 60px 22px; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feat {
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform .2s, border-color .2s, background .2s;
}
.feat:hover {
  transform: translateY(-3px);
  border-color: rgba(108, 99, 255, 0.4);
  background: var(--card-2);
}
.feat-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  margin-bottom: 14px;
  background: var(--grad-soft);
  color: var(--brand-2);
}
.feat-icon svg { width: 22px; height: 22px; fill: currentColor; }
.feat-icon.i1 { color: var(--brand); }
.feat-icon.i2 { color: var(--brand-2); }
.feat-icon.i3 { color: var(--premium); background: var(--premium-bg); }
.feat-icon.i4 { color: var(--brand-3); background: rgba(139, 92, 246, 0.15); }
.feat h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.feat p { margin: 0; color: var(--fg-dim); font-size: 13.5px; line-height: 1.75; }

/* ─── Catalog ───────────────────────────────────────────────────────────── */
.catalog { padding: 60px 22px 20px; }

section.category { padding: 18px 0 8px; }
.category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.category-title::before {
  content: '';
  width: 4px; height: 22px;
  border-radius: 4px;
  background: var(--grad);
}
.category-sub {
  color: var(--fg-mute);
  font-size: 13px;
}
.premium-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--premium-bg);
  color: var(--premium);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.32);
}

/* ─── Course cards ──────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s, box-shadow .2s, background .2s;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0), rgba(0, 212, 180, 0));
  transition: background .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 99, 255, 0.45);
  background: var(--card-2);
  box-shadow: 0 24px 50px -18px rgba(108, 99, 255, 0.28);
}
.card:hover::after { background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), rgba(0, 212, 180, 0.05)); }
.card .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e7e9f2, #c9ccdb);
  overflow: hidden;
}
.card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s ease, transform .5s ease;
}
.card .thumb img.loaded { opacity: 1; }
.card:hover .thumb img.loaded { transform: scale(1.05); }
.card .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.card .thumb .duration {
  position: absolute;
  inset-inline-end: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 8px;
  backdrop-filter: blur(6px);
  z-index: 1;
}
.card .thumb .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}
.card .thumb .play span {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: grid; place-items: center;
  transition: transform .2s ease, background .2s ease;
}
.card:hover .thumb .play span {
  transform: scale(1.1);
  background: var(--brand);
  box-shadow: 0 10px 24px -8px rgba(108, 99, 255, 0.7);
}
.card .thumb .play svg { width: 20px; height: 20px; fill: white; margin-inline-start: 2px; }

.badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--premium-bg);
  color: var(--premium);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  z-index: 2;
}
.badge svg { width: 12px; height: 12px; fill: currentColor; }
.featured-badge {
  inset-inline-start: auto;
  inset-inline-end: 10px;
  background: rgba(108, 99, 255, 0.14);
  color: #4a3fcc;
  border-color: rgba(108, 99, 255, 0.35);
}

.card .meta {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card h4 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .desc {
  margin: 0;
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .author {
  font-size: 12.5px;
  color: var(--fg-mute);
  padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
  margin-top: auto;
}

.course-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 11.5px;
  font-weight: 600;
}
.chip svg { width: 12px; height: 12px; fill: currentColor; opacity: 0.85; }

/* Skeleton loader for thumbnails */
.skeleton {
  background:
    linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.7) 50%, transparent 70%)
    rgba(20, 24, 60, 0.05);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ─── Big CTA band ──────────────────────────────────────────────────────── */
.band {
  padding: 60px 22px 80px;
}
.band-inner {
  position: relative;
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(108, 99, 255, 0.22), transparent 55%),
    radial-gradient(circle at bottom left, rgba(0, 184, 154, 0.18), transparent 55%),
    var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.band-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 24, 60, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 24, 60, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.6;
}
.band-inner > * { position: relative; z-index: 1; }
.band-inner h3 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.band-inner p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14.5px;
  max-width: 520px;
}

/* ─── Course detail modal ───────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 60, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fade .2s ease;
  backdrop-filter: blur(8px);
}
.modal[aria-hidden="false"] { display: flex; }
.modal-box {
  width: min(960px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 50px 100px -20px rgba(20, 24, 60, 0.35);
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-close {
  border: 1px solid var(--line);
  color: var(--fg);
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.modal-close:hover { background: var(--bg-soft); border-color: rgba(108, 99, 255, 0.4); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body video {
  width: 100%;
  height: auto;
  max-height: 70vh;
  background: black;
  display: block;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.course-box { width: min(720px, 100%); max-height: 86vh; display: flex; flex-direction: column; }
.course-body {
  padding: 20px 24px 24px;
  overflow: auto;
}
.course-intro {
  margin: 0 0 22px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.8;
}
.chapter { margin-bottom: 20px; }
.chapter:last-child { margin-bottom: 0; }
.chapter-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.chapter-order {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--grad);
  color: white;
  font-size: 12px;
  font-weight: 800;
}
.chapter-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--fg);
  flex: 1;
}
.video-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.video-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.video-row:hover {
  background: var(--card-2);
  border-color: rgba(108, 99, 255, 0.45);
  transform: translateX(-3px);
}
.video-row:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.vr-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -6px rgba(108, 99, 255, 0.7);
}
.vr-icon svg { width: 14px; height: 14px; fill: white; }
.video-row.locked .vr-icon {
  background: var(--premium);
  box-shadow: 0 6px 14px -6px rgba(245, 158, 11, 0.6);
}
.vr-title {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vr-flag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--premium-bg);
  color: var(--premium);
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.vr-duration {
  color: var(--fg-mute);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
footer.site {
  margin-top: 20px;
  padding: 48px 0 28px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, transparent, rgba(108, 99, 255, 0.05)),
    var(--bg-soft);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
.foot-brand { display: flex; flex-direction: column; gap: 12px; max-width: 340px; }
.foot-brand-row { display: flex; align-items: center; gap: 10px; }
.foot-brand-row .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.foot-brand-row strong { font-size: 16px; font-weight: 800; }
.foot-brand p { margin: 0; color: var(--fg-mute); font-size: 13px; line-height: 1.85; }
.foot-col h6 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-col a { color: var(--fg-dim); font-size: 13.5px; transition: color .15s; }
.foot-col a:hover { color: var(--brand-2); }
.foot-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--fg-mute);
  font-size: 12.5px;
  flex-wrap: wrap;
}
.foot-bottom a { color: var(--fg-dim); }
.foot-bottom a:hover { color: var(--brand-2); }

/* ─── State ─────────────────────────────────────────────────────────────── */
.state {
  padding: 60px 20px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 14.5px;
}
.state code {
  direction: ltr;
  display: inline-block;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12.5px;
}
