/* ==========================================================================
   آکادمی ویرگول — سیستم طراحی نسخه ۳ «طیف»
   صفحه اصلی ۱۴ «جهان رنگی» دارد (stage.css)؛ بقیه سایت قاب آرامی از کاغذ و جوهر است
   که رنگ را فقط از طیف همان حوزه‌ها (متغیر --h) و طلایی لوگو می‌گیرد.
   ========================================================================== */

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

:root {
  --font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;

  --gold-100: #f6ebcd;
  --gold-200: #ecd89f;
  --gold-300: #e2c373;
  --gold-400: #d4aa4a;
  --gold-500: #c0923a;
  --gold-600: #a2772b;
  --gold-700: #7e5b21;
  --ink-950: #0b0c0e;
  --ink-900: #111215;
  --ink-850: #16171b;
  --ink-800: #1c1e23;
  --ink-700: #2a2d34;

  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --surface-3: #e5e2d9;
  --text: #121316;
  --text-2: #464850;
  --muted: #7f8188;
  --border: #e6e3db;
  --border-strong: #d2cec3;
  --ink: #121316;
  --on-ink: #ffffff;
  --accent: #946c1e;
  --accent-soft: rgba(214, 173, 79, 0.15);
  --green: #1d8a5a;
  --green-soft: rgba(29, 138, 90, 0.11);
  --red: #c93e2d;
  --red-soft: rgba(201, 62, 45, 0.1);
  --blue: #2f6bc8;
  --blue-soft: rgba(47, 107, 200, 0.1);
  --amber: #b07419;
  --amber-soft: rgba(176, 116, 25, 0.12);

  --gold-gradient: linear-gradient(135deg, #f0d58e 0%, #d4aa4a 50%, #b4862f 100%);
  --on-gold: #1c1505;
  /* طیف ۱۴ حوزه؛ نقش امضای بصری سایت */
  --spectrum: linear-gradient(90deg, hsl(352 72% 58%), hsl(28 88% 56%), hsl(48 88% 52%), hsl(140 52% 44%), hsl(178 62% 42%), hsl(212 74% 56%), hsl(258 62% 62%), hsl(312 62% 58%));

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 34px;
  --shadow-sm: 0 1px 2px rgba(18, 19, 22, 0.04), 0 1px 1px rgba(18, 19, 22, 0.03);
  --shadow-md: 0 14px 34px -12px rgba(18, 19, 22, 0.16), 0 2px 6px rgba(18, 19, 22, 0.04);
  --shadow-lg: 0 34px 80px -24px rgba(18, 19, 22, 0.3), 0 6px 18px rgba(18, 19, 22, 0.06);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h: 84px;
  --container: 1280px;
  --gutter: 20px;
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0e;
  --surface: #141518;
  --surface-2: #1b1c20;
  --surface-3: #25272c;
  --text: #f1efe9;
  --text-2: #c4c2bb;
  --muted: #8b8d94;
  --border: #24262b;
  --border-strong: #35383f;
  --ink: #f1efe9;
  --on-ink: #0b0c0e;
  --accent: #e2bd69;
  --accent-soft: rgba(226, 189, 105, 0.13);
  --green: #4cc38a;
  --green-soft: rgba(76, 195, 138, 0.13);
  --red: #f07a6a;
  --red-soft: rgba(240, 122, 106, 0.13);
  --blue: #7fb0f5;
  --blue-soft: rgba(127, 176, 245, 0.13);
  --amber: #e8b35a;
  --amber-soft: rgba(232, 179, 90, 0.13);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 14px 34px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 34px 80px -24px rgba(0, 0, 0, 0.85);
}

/* ---------------------------------------------------------------- پایه */
*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.5; font-weight: 800; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gold-300); color: var(--on-gold); }
[hidden] { display: none !important; }
main, .header, .site-footer, .promo-bar { position: relative; z-index: 1; }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.32s; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 7vw, 96px); }
.section-tight { padding-block: clamp(28px, 4vw, 48px); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.6em; height: 1.6em; }
.icon-fill { fill: currentColor; }

/* ---------------------------------------------------------------- دکمه‌ها
   ابعاد پایه (۴۶ / ۵۶ پیکسل، کپسولی) با صحنه صفحه اصلی مشترک است؛ تغییرش ندهید. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding-inline: 24px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 14.5px; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.2s, border-color 0.2s, color 0.2s, filter 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-dark { background: var(--ink); color: var(--on-ink); box-shadow: 0 10px 24px -12px rgba(18, 19, 22, 0.55); }
.btn-primary:hover, .btn-dark:hover { transform: translateY(-2px); box-shadow: 0 0 0 4px var(--accent-soft), 0 16px 30px -12px rgba(18, 19, 22, 0.5); }
.btn-primary .icon, .btn-dark .icon { color: var(--gold-300); }
[data-theme="dark"] .btn-primary .icon, [data-theme="dark"] .btn-dark .icon { color: var(--gold-700); }
.btn-gold { background: var(--gold-gradient); color: var(--on-gold); box-shadow: 0 10px 24px -10px rgba(192, 146, 58, 0.6); }
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-outline { border-color: var(--border-strong); background: var(--surface); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: var(--gold-400); color: var(--on-gold); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: var(--green-soft); color: var(--green); }
.btn-success:hover { background: var(--green); color: #fff; }
.btn-sm { height: 36px; padding-inline: 16px; font-size: 13px; }
.btn-lg { height: 56px; padding-inline: 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.link { color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.link .icon { transition: transform 0.25s var(--ease); }
.link:hover .icon { transform: translateX(-4px); }
.link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }

/* ---------------------------------------------------------------- نشان‌ها */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.9; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.badge-gold { background: var(--gold-gradient); color: var(--on-gold); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-solid-red { background: #e0473a; color: #fff; }
.badge-solid-green { background: #1f9a63; color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2);
  transition: 0.2s;
}
a.chip:hover, .chip.is-active { border-color: var(--ink); color: var(--text); }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold-gradient); color: var(--on-gold);
  font-weight: 800; object-fit: cover; font-size: 17px; line-height: 1;
}
.avatar-xs { width: 26px; height: 26px; font-size: 12px; }
.avatar-sm { width: 34px; height: 34px; font-size: 14px; }
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.avatar-xl { width: 112px; height: 112px; font-size: 44px; }

/* ---------------------------------------------------------------- فرم‌ها */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-weight: 700; font-size: 13.5px; }
.field-label .req { color: var(--red); margin-inline-start: 2px; }
.field-help { font-size: 12.5px; color: var(--muted); }
.field-error, .errorlist { font-size: 12.5px; color: var(--red); font-weight: 600; }
.input {
  width: 100%; height: 50px; padding: 0 16px;
  border: 1px solid var(--border-strong); border-radius: 16px;
  background: var(--surface); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input::placeholder { color: var(--muted); }
.input:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--border-strong)); }
.input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.textarea { height: auto; padding: 13px 16px; resize: vertical; min-height: 104px; line-height: 1.9; }
.input.file { height: auto; padding: 10px 14px; }
.input.select { appearance: none; padding-inline-end: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; }
.input[dir="ltr"] { text-align: left; }
.check { width: 20px; height: 20px; accent-color: var(--ink); flex: none; cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.alert { padding: 13px 16px; border-radius: 16px; font-size: 14px; font-weight: 600; background: var(--surface-2); display: flex; gap: 10px; align-items: flex-start; }
.alert .icon { margin-top: 4px; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-success { background: var(--green-soft); color: var(--green); }
.alert-info { background: var(--blue-soft); color: var(--blue); }
.alert-warn { background: var(--amber-soft); color: var(--amber); }

/* ---------------------------------------------------------------- کارت */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; }
.card-flush { padding: 0; overflow: hidden; }
.card-title { font-size: 17px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.card-title .icon, .block-title .icon {
  width: 34px; height: 34px; padding: 8px; border-radius: 11px; background: var(--ink); color: var(--gold-300); stroke-width: 2;
}
[data-theme="dark"] .card-title .icon, [data-theme="dark"] .block-title .icon { background: var(--surface-3); color: var(--gold-300); }

/* ---------------------------------------------------------------- نوار اطلاع‌رسانی */
.promo-bar { position: relative; background: var(--ink-950); color: #f3ead2; text-align: center; font-size: 13.5px; font-weight: 600; padding: 9px 16px; }
.promo-bar::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--spectrum); background-size: 200% 100%; animation: spectrum-run 9s linear infinite; }
.promo-bar a { display: inline-flex; align-items: center; gap: 8px; }
.promo-bar .icon { color: var(--gold-300); }
@keyframes spectrum-run { to { background-position: 200% 0; } }

/* ---------------------------------------------------------------- هدر: جزیره‌های شناور */
.header { position: sticky; top: 0; z-index: 50; height: var(--header-h); padding-top: 12px; pointer-events: none; }
.header-inner { height: 58px; display: flex; align-items: center; gap: 8px; }
.header-inner > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-weight: 900; font-size: 17px; line-height: 1.3; }
.brand-name small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.logo-dark { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
[data-theme="dark"] .logo-light { display: none; }

.header .brand, .nav, .header-actions, .menu-btn, .header .header-search .input {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--border-strong) 70%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: 0 10px 30px -14px rgba(30, 24, 10, 0.18);
}
.header .brand { height: 58px; padding-inline: 8px 18px; border-radius: 999px; }

.nav { display: flex; align-items: center; gap: 2px; height: 58px; padding: 6px; border-radius: 999px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding-inline: 16px; border-radius: 999px;
  font-weight: 650; font-size: 14px; color: var(--text-2); transition: background 0.2s, color 0.2s; white-space: nowrap; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { background: var(--ink); color: var(--on-ink); }
.nav-cats { position: relative; }
.nav-cats-btn { background: var(--accent-soft); color: var(--accent); }
.nav-cats-btn:hover { background: var(--accent-soft); color: var(--accent); }
.nav-cats-btn .icon:last-child { transition: transform 0.25s; }
.nav-cats:hover .nav-cats-btn .icon:last-child, .nav-cats:focus-within .nav-cats-btn .icon:last-child { transform: rotate(180deg); }

.mega {
  position: absolute; top: calc(100% + 18px); inset-inline-start: -6px; z-index: 60;
  width: min(840px, calc(100vw - 40px)); display: grid; grid-template-columns: 268px 1fr;
  background: var(--surface); border: 1px solid var(--border); border-radius: 30px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.985); transform-origin: top right; transition: 0.25s var(--ease);
}
.nav-cats::after { content: ""; position: absolute; inset-inline: 0; top: 100%; height: 20px; }
.nav-cats:hover .mega, .nav-cats:focus-within .mega, .nav-cats.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.mega-list { padding: 10px; background: var(--surface-2); max-height: calc(100vh - 150px); overflow-y: auto; }
.mega-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; font-weight: 650; font-size: 14px; color: var(--text-2); transition: background 0.15s; }
.mega-item .icon { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: hsl(var(--h) 70% 50% / 0.13); color: hsl(var(--h) 60% 38%); }
[data-theme="dark"] .mega-item .icon { color: hsl(var(--h) 70% 70%); background: hsl(var(--h) 60% 55% / 0.16); }
.mega-item.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.mega-item.is-active .icon { background: hsl(var(--h) 62% 46%); color: #fff; }
.mega-pane { display: none; position: relative; isolation: isolate; padding: 28px 30px; }
.mega-pane.is-active { display: block; animation: fade 0.3s; }
.mega-pane::before { content: ""; position: absolute; inset: 0 0 auto; height: 180px; z-index: -1;
  background: radial-gradient(60% 100% at 85% 0%, hsl(var(--h, 42) 75% 55% / 0.2), transparent 70%); }
.mega-pane h4 { font-size: 22px; font-weight: 900; margin-bottom: 2px; }
.mega-pane p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; max-width: 46ch; }
.mega-pane ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.mega-pane li a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 14px; line-height: 1.7; }
.mega-pane li a:hover { background: var(--surface-2); }
.mega-pane li a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--h, 42) 62% 50%); flex: none; }

.header-search { flex: 1; max-width: 340px; position: relative; margin-inline-start: auto; }
.header-search .input { height: 46px; padding-inline-start: 44px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.header .header-search .input { height: 58px; }
.header-search .input:focus { background: var(--surface); border-color: var(--ink); }
.header-search .icon { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; z-index: 1; }
.header-actions { display: flex; align-items: center; gap: 2px; flex: none; height: 58px; padding: 6px; border-radius: 999px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--text-2); transition: background 0.2s, color 0.2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .count { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding-inline: 4px; border-radius: 999px;
  background: var(--gold-gradient); color: var(--on-gold); font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px var(--surface); }
.header-actions > .btn { height: 44px; margin-inline-start: 4px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.theme-toggle .icon { transition: transform 0.5s var(--ease); }
.theme-toggle:hover .icon { transform: rotate(40deg); }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 16px); inset-inline-end: -6px; z-index: 60; min-width: 250px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: 0.2s var(--ease);
}
.dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { padding: 12px 14px 14px; margin-bottom: 6px; border-radius: 18px; background: var(--surface-2); }
.dropdown-head strong { display: block; }
.dropdown-head span { font-size: 12.5px; color: var(--muted); }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--text-2); text-align: start; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item.danger { color: var(--red); }
.user-btn { display: flex; align-items: center; gap: 8px; height: 44px; padding: 5px; padding-inline-end: 14px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 13.5px; transition: background 0.2s; }
.user-btn:hover { background: var(--surface-3); }

.menu-btn { display: none; width: 58px; height: 58px; }

.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 9, 11, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: 0.3s; }
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 10px; bottom: 10px; inset-inline-start: 10px; width: min(360px, calc(100vw - 20px)); background: var(--surface); border-radius: 30px;
  padding: 18px; overflow-y: auto; transform: translateX(110%); transition: transform 0.35s var(--ease); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-panel .header-search .input { background: var(--surface-2); }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a, .drawer-nav summary { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 16px; font-weight: 650; cursor: pointer; }
.drawer-nav > a .icon, .drawer-nav summary > .icon:first-child { color: var(--accent); }
.drawer-nav a:hover, .drawer-nav summary:hover { background: var(--surface-2); }
.drawer-nav details ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px 4px 10px; }
.drawer-nav details ul a { padding: 8px 10px; gap: 8px; font-size: 13px; border-radius: 14px; background: var(--surface-2); line-height: 1.6; }
.drawer-nav details ul .icon { color: var(--accent); flex: none; }
.drawer-nav summary { list-style: none; }
.drawer-nav summary::-webkit-details-marker { display: none; }
.drawer-nav summary .chev { margin-inline-start: auto; transition: 0.2s; }
.drawer-nav details[open] summary .chev { transform: rotate(180deg); }

/* ---------------------------------------------------------------- صحنه‌های رنگی کوچک (هم‌خانواده صفحه اصلی)
   .hero (صفحه تدریس)، سربرگ دسته‌ها، هیروی دوره، کنار فرم ورود و نوار دعوت از این فرمول رنگ استفاده می‌کنند. */
.hero, .page-head.has-hue > .container, .course-hero, .auth-side, .cta-band {
  --c-hi: hsl(var(--h) 78% 63%);
  --c-main: hsl(var(--h) 66% 45%);
  --c-deep: hsl(var(--h) 62% 27%);
  --c-dark: hsl(var(--h) 54% 11%);
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background:
    radial-gradient(38% 60% at 20% 70%, hsl(calc(var(--h) - 30) 80% 45% / 0.55), transparent 70%),
    radial-gradient(42% 60% at 82% 18%, hsl(calc(var(--h) + 38) 85% 62% / 0.5), transparent 70%),
    radial-gradient(140% 130% at 60% 40%, var(--c-main) 0%, var(--c-deep) 55%, var(--c-dark) 100%);
}
.hero::after, .page-head.has-hue > .container::before, .course-hero::after, .auth-side::after, .cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.22; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glass-chip, .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.24); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* ---------------------------------------------------------------- هیروی صفحه تدریس */
.hero { --h: 24; border-radius: var(--r-xl); margin: 10px var(--gutter) 0; }
.hero::before { content: "،"; position: absolute; z-index: -1; inset-inline-end: 4%; top: 50%; transform: translateY(-46%); font-size: clamp(260px, 34vw, 520px); font-weight: 900; line-height: 1; color: rgba(255, 255, 255, 0.07); }
.hero h1 { font-size: clamp(34px, 5.4vw, 72px); font-weight: 900; line-height: 1.3; margin-block: 22px 16px; }
.hero h1 em { font-style: normal; font-weight: 250; color: hsl(var(--h) 95% 86%); }
.hero-lead { font-size: clamp(15px, 1.4vw, 18px); color: rgba(255, 255, 255, 0.82); max-width: 56ch; line-height: 2.05; }
.hero .btn-primary { background: #fff; color: #14151a; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22); }
.hero .btn-primary .icon { color: var(--c-main); }

/* ---------------------------------------------------------------- سرتیتر بخش‌ها */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3vw, 38px); font-weight: 900; }
.section-head p { color: var(--muted); margin-top: 4px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 800; font-size: 13.5px; margin-bottom: 6px; }
.eyebrow::before { content: ""; width: 34px; height: 3px; background: var(--spectrum); border-radius: 3px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }

/* ---------------------------------------------------------------- دسته‌بندی‌ها */
.cat-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.cat-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 10px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s; overflow: hidden; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: hsl(var(--h) 45% 60% / 0.6); }
.cat-icon { position: relative; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: hsl(var(--h) 65% 50% / 0.12); color: hsl(var(--h) 60% 38%); font-size: 20px; }
[data-theme="dark"] .cat-icon { color: hsl(var(--h) 65% 70%); background: hsl(var(--h) 60% 55% / 0.15); }
.cat-card strong { position: relative; font-size: 14.5px; font-weight: 800; line-height: 1.6; }
.cat-card small { position: relative; color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- کاور دوره‌ها (تصویرسازی حوزه) */
.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 20px; color: #fff; isolation: isolate;
  background:
    radial-gradient(60% 70% at 72% 58%, hsl(var(--h, 42) 75% 64% / 0.85), transparent 70%),
    radial-gradient(130% 120% at 70% 40%, hsl(var(--h, 42) 66% 44%) 0%, hsl(var(--h, 42) 62% 26%) 60%, hsl(var(--h, 42) 50% 13%) 100%); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.cover::before { content: ""; position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); inset-inline-end: -18%; bottom: -40%; z-index: 0; }
.cover::after { content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.18; mix-blend-mode: soft-light;
  background-image: radial-gradient(rgba(255, 255, 255, 0.9) 1px, transparent 1.4px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(200deg, #000, transparent 60%); mask-image: linear-gradient(200deg, #000, transparent 60%); }
.cover-art { position: absolute; z-index: 1; width: 64%; aspect-ratio: 1; inset-inline-end: -4%; bottom: -12%; transform: rotate(-7deg);
  transition: transform 0.6s var(--ease); }
.cover-art .art { filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.28)); }
.cover-art [class*="a-"] { animation-play-state: paused; }
.course-card:hover .cover-art, .post-card:hover .cover-art { transform: rotate(-1deg) scale(1.08) translateY(-5%); }
.course-card:hover .cover-art [class*="a-"], .post-card:hover .cover-art [class*="a-"], .buy-box .cover-art [class*="a-"] { animation-play-state: running; }
.cover-label { position: absolute; inset-inline-start: 7%; top: 9%; z-index: 1; max-width: 50%; font-weight: 800; font-size: 14px; line-height: 1.7; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.cover-label small { display: block; font-weight: 600; font-size: 10.5px; opacity: 0.75; }

/* ---------------------------------------------------------------- کارت دوره */
.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.course-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.course-card { --h: 42; position: relative; display: flex; flex-direction: column; height: 100%; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s; }
.course-card:hover { transform: translateY(-6px); border-color: hsl(var(--h) 55% 60% / 0.55); box-shadow: 0 30px 50px -28px hsl(var(--h) 60% 28% / 0.55); }
.course-card-media { position: relative; display: block; }
.course-card-badges { position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 3; display: flex; gap: 6px; flex-wrap: wrap; }
.course-card-badges .badge { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.wish-btn { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 11, 13, 0.5); color: #fff; backdrop-filter: blur(6px); transition: 0.2s; }
.wish-btn:hover, .wish-btn.is-active { background: #fff; color: var(--red); }
.wish-btn.is-active .icon { fill: currentColor; }
.course-card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 10px 6px; flex: 1; }
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.course-card-top > a { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; color: hsl(var(--h) 58% 34%); }
.course-card-top > a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) 65% 50%); box-shadow: 0 0 0 3px hsl(var(--h) 65% 50% / 0.18); }
[data-theme="dark"] .course-card-top > a { color: hsl(var(--h) 70% 72%); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13px; }
.rating .icon { color: var(--gold-400); fill: var(--gold-400); width: 15px; height: 15px; }
.rating small { color: var(--muted); font-weight: 500; }
.course-card-title { font-size: 16px; font-weight: 800; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.5em; }
.course-card-title a { background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat; transition: background-size 0.35s var(--ease); }
.course-card:hover .course-card-title a { background-size: 100% 1px; }
.course-card-teacher { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 600; width: fit-content; }
.course-card-teacher:hover { color: var(--text); }
.course-card-meta { display: flex; gap: 6px 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.course-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.course-card-foot { margin-top: auto; padding: 12px 2px 2px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.5; }
.price-old { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.price-now { font-size: 18px; font-weight: 900; }
.price-now small { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-inline-start: 4px; }
.price-free { font-size: 17px; font-weight: 900; color: var(--green); }
.go { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex: none;
  transition: background 0.3s, color 0.3s, transform 0.45s var(--ease); }
.course-card:hover .go { background: hsl(var(--h) 62% 44%); color: #fff; transform: rotate(45deg); }

/* ریل افقی */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 66px) / 4); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 18px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-nav { display: flex; gap: 8px; }
.rail-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; transition: 0.2s; }
.rail-nav button:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* تب‌ها: شیار با قرص فعال، هم‌زبان با داک صفحه اصلی */
.tabs { display: inline-flex; gap: 2px; padding: 5px; background: var(--surface-2); border-radius: 999px; flex-wrap: wrap; }
.tab { height: 40px; padding-inline: 18px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--ink); color: var(--on-ink); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade 0.3s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------------------------------------------------------------- مزایا */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: border-color 0.3s, transform 0.4s var(--ease); }
.section-alt .feature { background: var(--bg); }
.feature::after { content: ""; position: absolute; inset-inline: 26px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--spectrum); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.feature:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feature:hover::after { transform: scaleX(1); }
.feature-icon { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--gold-300); font-size: 17px; }
[data-theme="dark"] .feature-icon { background: var(--surface-3); }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--muted); line-height: 2; }

/* ---------------------------------------------------------------- اساتید */
.teacher-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.teacher-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 30px 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px; transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.3s; height: 100%; }
.teacher-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 86px; z-index: -1; background: var(--surface-2);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 60%, transparent 61%); mask-image: radial-gradient(120% 100% at 50% 0%, #000 60%, transparent 61%); }
.teacher-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.teacher-card .avatar { box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--gold-400); margin-bottom: 12px; transition: transform 0.4s var(--ease); }
.teacher-card:hover .avatar { transform: scale(1.06) rotate(-4deg); }
.teacher-card strong { font-size: 16px; }
.teacher-card > span:not(.avatar) { font-size: 13px; color: var(--muted); }
.teacher-card .stats { display: flex; gap: 8px; margin-top: 14px; width: 100%; justify-content: center; font-size: 12.5px; color: var(--text-2); }
.teacher-card .stats span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); }

/* ---------------------------------------------------------------- نوار دعوت */
.cta-band { --h: 24; border-radius: var(--r-xl); padding: clamp(30px, 5vw, 60px); display: grid; grid-template-columns: 1.3fr auto; gap: 28px; align-items: center; }
.cta-band::before { content: "،"; position: absolute; z-index: -1; inset-inline-start: 46%; top: 50%; transform: translateY(-46%); font-size: 380px; font-weight: 900; line-height: 1; color: rgba(255, 255, 255, 0.07); }
.cta-band h2 { font-size: clamp(24px, 3.2vw, 40px); font-weight: 900; }
.cta-band p { color: rgba(255, 255, 255, 0.8); margin-top: 8px; max-width: 60ch; }
.cta-band ul { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, 0.86); }
.cta-band li { display: inline-flex; align-items: center; gap: 8px; }
.cta-band .btn-primary { background: #fff; color: #14151a; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22); }

/* ---------------------------------------------------------------- نظرات */
.quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.quote { display: flex; flex-direction: column; gap: 14px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.quote > .icon { width: 30px; height: 30px; color: var(--gold-400); fill: var(--gold-400); stroke: none; }
.quote p { color: var(--text-2); font-size: 14.5px; flex: 1; }
.quote footer { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.quote footer strong { display: block; font-size: 14px; line-height: 1.6; }
.quote footer div span { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- مجله */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; transition: transform 0.45s var(--ease), box-shadow 0.45s; height: 100%; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-card .cover { aspect-ratio: 16 / 9; }
.post-card-body { padding: 16px 12px 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { font-size: 17px; line-height: 1.8; }
.post-card h3 a { background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat; transition: background-size 0.35s var(--ease); }
.post-card:hover h3 a { background-size: 100% 1px; }
.post-card p { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 10px; }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- آکاردئون */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.acc { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.3s; }
.acc[open] { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.acc summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; font-weight: 800; list-style: none; line-height: 1.7; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .chev { margin-inline-start: auto; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--surface-2); transition: transform 0.3s var(--ease), background 0.2s; color: var(--text-2); flex: none; }
.acc[open] summary .chev { transform: rotate(180deg); background: var(--ink); color: var(--on-ink); }
.acc summary small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.acc-body { padding: 0 18px 20px; padding-inline-start: 66px; color: var(--text-2); line-height: 2.05; }
.acc-num { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 800; flex: none; transition: 0.2s; }
.acc[open] .acc-num { background: var(--gold-gradient); color: var(--on-gold); }
.lesson-list { border-top: 1px solid var(--border); }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row .icon { color: var(--muted); }
.lesson-row .time { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; direction: ltr; flex: none; font-variant-numeric: tabular-nums; }
a.lesson-row:hover { background: var(--surface-2); }
a.lesson-row:hover .icon { color: var(--accent); }

/* ---------------------------------------------------------------- سربرگ صفحات داخلی
   روی کاغذ: هاله‌ای از رنگ صفحه (--h)، تیتر درشت، ویرگول توخالی بزرگ و خط کوتاه طیف */
.page-head { --h: 42; position: relative; isolation: isolate; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: -30% -5% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34% 55% at 88% 35%, hsl(var(--h) 85% 62% / 0.2), transparent 70%),
    radial-gradient(28% 45% at 12% 10%, hsl(calc(var(--h) + 70) 80% 62% / 0.12), transparent 70%); }
.page-head > .container { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 250px;
  padding-block: clamp(36px, 6vw, 72px) clamp(26px, 3.5vw, 40px);
  background: linear-gradient(var(--border-strong), var(--border-strong)) center bottom / calc(100% - var(--gutter) * 2) 1px no-repeat; }
.page-head > .container::after { content: "،"; position: absolute; z-index: -1; inset-inline-end: 3%; top: 50%; transform: translateY(-52%) rotate(-8deg);
  font-size: clamp(220px, 26vw, 400px); font-weight: 900; line-height: 1; pointer-events: none;
  color: hsl(var(--h) 80% 55% / 0.07); -webkit-text-stroke: 1.5px hsl(var(--h) 55% 48% / 0.5); }
.page-head > .container > :last-child { position: relative; }
.page-head > .container::before { content: ""; position: absolute; bottom: -1px; inset-inline-start: var(--gutter); width: 120px; height: 3px; border-radius: 3px; background: var(--spectrum); z-index: 1; }
.page-head > .container.row-between { flex-direction: row; align-items: flex-end; }
.page-head > .container.row-between::after { display: none; }
.page-head h1 { font-size: clamp(32px, 5vw, 64px); font-weight: 900; line-height: 1.3; }
.page-head p { color: var(--text-2); margin-top: 10px; max-width: 62ch; font-size: clamp(14.5px, 1.2vw, 16.5px); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb > span:last-child { color: var(--text); }
.breadcrumb .icon { width: 14px; height: 14px; opacity: 0.6; }
.page-head .header-search { max-width: 320px; }
.page-head .header-search .input { background: var(--surface); border-color: var(--border-strong); height: 50px; }
.page-head-cat { display: flex; align-items: center; gap: 18px; }

/* سربرگ رنگی دسته‌بندی (هم‌خانواده صحنه صفحه اصلی) */
.page-head.has-hue::before { display: none; }
.page-head.has-hue { padding-top: 10px; }
.page-head.has-hue > .container { max-width: calc(var(--container) - var(--gutter) * 2); min-height: 320px; border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 56px); }
.page-head.has-hue > .container::before { width: auto; height: auto; border-radius: 0; }
.page-head.has-hue > .container::after { display: none; }
.page-head.has-hue h1 { color: #fff; font-size: clamp(34px, 5vw, 70px); }
.page-head.has-hue h1 span { color: hsl(var(--h) 90% 88%); }
.page-head.has-hue p { color: rgba(255, 255, 255, 0.8); }
.page-head.has-hue .breadcrumb { width: fit-content; padding: 5px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.78); }
.page-head.has-hue .breadcrumb > span:last-child, .page-head.has-hue .breadcrumb a:hover { color: #fff; }
.head-art { position: absolute; z-index: 0; inset-block: 0; inset-inline-end: 3%; width: min(42%, 420px); --book: 168px; }
.page-head.has-hue .head-text { max-width: 56%; }

/* ---------------------------------------------------------------- فهرست دوره‌ها */
.cat-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; gap: 12px; overflow-x: auto; padding: 6px 2px 16px; scrollbar-width: none; scroll-snap-type: x proximity; counter-reset: tile; }
.cat-tiles::-webkit-scrollbar { display: none; }
.cat-tile { position: relative; isolation: isolate; overflow: hidden; height: 186px; border-radius: 26px; padding: 14px 16px; color: #fff; scroll-snap-align: start; counter-increment: tile;
  display: flex; flex-direction: column; justify-content: flex-start; transition: transform 0.45s var(--ease), box-shadow 0.45s;
  background: radial-gradient(70% 60% at 70% 72%, hsl(var(--h) 78% 62%), transparent 75%), linear-gradient(160deg, hsl(var(--h) 62% 40%), hsl(var(--h) 58% 22%)); }
.cat-tile::before { content: counter(tile, persian); position: relative; z-index: 2; font-size: 12px; font-weight: 700; opacity: 0.7; }
.cat-tile strong { position: relative; z-index: 2; font-size: 15px; font-weight: 900; line-height: 1.55; }
.cat-tile small { position: relative; z-index: 2; font-size: 11.5px; opacity: 0.8; }
.cat-tile .cover-art { width: 96%; inset-inline-end: -16%; bottom: -18%; }
.cat-tile:hover { transform: translateY(-6px); box-shadow: 0 22px 38px -18px hsl(var(--h) 60% 30% / 0.6); }
.cat-tile:hover .cover-art { transform: rotate(-1deg) scale(1.1); }
.cat-tile:hover .cover-art [class*="a-"] { animation-play-state: running; }

.catalog { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; padding-block: 24px 64px; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); padding: 22px; border-radius: 28px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
.filters h3 .icon { display: inline; vertical-align: -4px; color: var(--accent); }
.filter-group { padding-block: 16px; border-top: 1px solid var(--border); }
.filter-group h4 { font-size: 13.5px; margin-bottom: 10px; }
.filter-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.filter-list label { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 12px; font-size: 14px; cursor: pointer; color: var(--text-2); transition: background 0.15s, color 0.15s; }
.filter-list label:hover { background: var(--surface-2); color: var(--text); }
.filter-list label:has(input:checked) { color: var(--text); font-weight: 700; }
.filter-list input { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; flex: none; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid var(--border-strong); border-radius: 7px; background: var(--surface); transition: 0.15s; }
.filter-list input[type="radio"] { border-radius: 50%; }
.filter-list input:checked { background: var(--ink); border-color: var(--ink); }
.filter-list input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.filter-list input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-ink); }
.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.catalog-bar strong { font-size: 15px; }
.sort-links { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; font-size: 13.5px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.sort-links > span { padding-inline: 10px 4px; }
.sort-links a { padding: 6px 14px; border-radius: 999px; color: var(--text-2); font-weight: 650; transition: 0.2s; }
.sort-links a:hover { color: var(--text); background: var(--surface-2); }
.sort-links a.is-active { background: var(--ink); color: var(--on-ink); }
.filters-toggle { display: none; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding-inline: 12px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: 14px; transition: 0.2s; }
.pagination a:hover { border-color: var(--ink); }
.pagination .is-current { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.pagination .is-disabled { opacity: 0.4; }

.empty { position: relative; text-align: center; padding: 60px 20px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border);
  background-image: radial-gradient(var(--border) 1px, transparent 1.4px); background-size: 18px 18px; }
.empty > .icon { width: 76px; height: 76px; padding: 20px; color: var(--accent); margin: 0 auto 16px; stroke-width: 1.4; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--border), 0 0 0 10px var(--surface-2); }
.empty h3 { font-size: 19px; }
.empty p { color: var(--muted); margin-block: 6px 20px; }

/* ---------------------------------------------------------------- صفحه دوره */
.course-hero-wrap { padding-top: 10px; }
.course-hero { border-radius: var(--r-xl); padding: clamp(28px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 30vw, 400px); align-items: center; gap: 24px; }
.course-hero::before { content: ""; position: absolute; inset: auto -10% -60% 30%; height: 90%; z-index: -1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); }
.course-hero .breadcrumb { width: fit-content; padding: 5px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.78); margin-bottom: 0; }
.course-hero .breadcrumb a:hover { color: #fff; }
.course-hero h1 { font-size: clamp(30px, 4vw, 56px); font-weight: 900; line-height: 1.3; max-width: 20ch; }
.course-hero .lead { color: rgba(255, 255, 255, 0.84); margin-top: 12px; max-width: 60ch; font-size: 15.5px; line-height: 2.05; }
.course-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; font-size: 13px; color: #fff; }
.course-hero-meta > span, .course-hero-meta > a > span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.16); border: 1px solid rgba(255, 255, 255, 0.16); }
.course-hero-meta .icon { color: #fff; }
.course-hero-meta .rating .icon { color: var(--gold-300); fill: var(--gold-300); }
.course-hero-meta .rating small { color: rgba(255, 255, 255, 0.7); }
.course-hero-teacher { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding: 6px; padding-inline-end: 20px; border-radius: 999px; background: #fff; color: #14151a; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); transition: transform 0.3s var(--ease); }
.course-hero-teacher:hover { transform: translateY(-2px); }
.course-hero-teacher small { display: block; color: #6b6d74; font-size: 11.5px; line-height: 1.5; }
.course-hero-teacher strong { font-size: 14px; line-height: 1.5; }
.course-hero-text { min-width: 0; }
.course-hero-art { position: relative; aspect-ratio: 1; width: 100%; --book: clamp(150px, 15vw, 210px); }
.course-hero-person { grid-template-columns: 1fr; min-height: 300px; }
.course-hero .row h1 { max-width: none; }
.course-hero .avatar-xl { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.18); }

.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; padding-block: 24px 64px; }
.course-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* جعبه خرید: بلیت با خط پرفراژ */
.buy-box { position: sticky; top: calc(var(--header-h) + 14px); z-index: 5; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 32px; box-shadow: var(--shadow-lg); }
.buy-box .cover { border-radius: 24px; }
.buy-body { position: relative; padding: 28px 12px 8px; display: flex; flex-direction: column; gap: 14px; }
.buy-body::before { content: ""; position: absolute; top: 13px; inset-inline: 6px; border-top: 2px dashed var(--border-strong); }
.buy-body::after { content: ""; position: absolute; top: 2px; inset-inline: -23px; height: 24px; pointer-events: none;
  background: radial-gradient(circle at 12px 12px, var(--bg) 11px, var(--border) 11.5px, var(--border) 12px, transparent 12.5px) left / 24px 24px no-repeat,
              radial-gradient(circle at 12px 12px, var(--bg) 11px, var(--border) 11.5px, var(--border) 12px, transparent 12.5px) right / 24px 24px no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 12px, #000 12px, #000 calc(100% - 12px), transparent calc(100% - 12px));
          mask-image: linear-gradient(90deg, transparent 12px, #000 12px, #000 calc(100% - 12px), transparent calc(100% - 12px)); }
.buy-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.buy-price .price-now { font-size: 30px; }
.buy-price .price-free { font-size: 26px; }
.buy-list { display: flex; flex-direction: column; font-size: 14px; padding: 4px 14px; border-radius: 20px; background: var(--surface-2); }
.buy-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.buy-list li:last-child { border: 0; }
.buy-list li .icon { color: var(--accent); }
.buy-list li b { margin-inline-start: auto; color: var(--text); font-weight: 700; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--gold-gradient); min-width: 4px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }

.anchor-nav { position: sticky; top: calc(var(--header-h) + 4px); z-index: 4; display: flex; gap: 2px; padding: 5px; width: fit-content; max-width: 100%;
  background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 999px; overflow-x: auto; scrollbar-width: none; box-shadow: var(--shadow-sm); }
.anchor-nav a { padding: 7px 18px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--text-2); white-space: nowrap; transition: 0.2s; }
.anchor-nav a:hover { background: var(--ink); color: var(--on-ink); }
.block-title { font-size: 21px; font-weight: 900; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.learn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.learn-grid li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.learn-grid .icon { color: var(--green); margin-top: 5px; }
.dot-list li { display: flex; gap: 10px; align-items: flex-start; padding-block: 4px; }
.dot-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-400); margin-top: 11px; flex: none; }
.prose { color: var(--text-2); line-height: 2.15; font-size: 15.5px; }
.prose p { margin-bottom: 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose h2, .prose h3 { color: var(--text); margin-block: 26px 10px; }
.prose h3:first-child { margin-top: 0; }

.teacher-box { display: flex; gap: 20px; align-items: flex-start; }
.teacher-box .info { flex: 1; min-width: 0; }
.teacher-box h3 { font-size: 19px; }
.teacher-box .stats { display: flex; gap: 8px; flex-wrap: wrap; margin-block: 12px; font-size: 13px; color: var(--text-2); }
.teacher-box .stats span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); }
.teacher-box .stats .icon { color: var(--accent); }
.teacher-box .avatar { box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--gold-400); }

.review-summary { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; padding: 22px; border-radius: 22px; background: var(--surface-2); margin-bottom: 20px; }
.review-score { text-align: center; }
.review-score strong { display: block; font-size: 52px; font-weight: 900; line-height: 1.15; }
.stars { display: inline-flex; gap: 2px; color: var(--gold-400); }
.stars .icon { width: 17px; height: 17px; }
.stars .on { fill: var(--gold-400); }
.stars .off { color: var(--border-strong); }
.rating-bars { display: flex; flex-direction: column; gap: 7px; }
.rating-bar { display: grid; grid-template-columns: 54px 1fr 40px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.rating-bar .progress { height: 7px; }
.comment { display: flex; gap: 14px; padding-block: 18px; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-head strong { font-size: 14.5px; }
.comment-head time { font-size: 12.5px; color: var(--muted); }
.comment p { color: var(--text-2); margin-top: 6px; font-size: 14.5px; white-space: pre-line; }
.comment-reply { margin-top: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface-2); border-inline-start: 3px solid var(--gold-400); }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; justify-content: flex-end; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; color: var(--border-strong); transition: transform 0.15s; }
.star-input label:hover { transform: scale(1.12); }
.star-input label .icon { width: 30px; height: 30px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--gold-400); }
.star-input label:hover .icon, .star-input label:hover ~ label .icon, .star-input input:checked ~ label .icon { fill: var(--gold-400); }
.mobile-buy { display: none; }

/* ---------------------------------------------------------------- سبد خرید */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding-block: 28px 64px; }
.cart-layout > aside.card { border-radius: 30px; box-shadow: var(--shadow-md); }
.cart-item { display: grid; grid-template-columns: 160px 1fr auto; gap: 18px; align-items: center; padding: 10px; padding-inline-end: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; transition: box-shadow 0.3s; }
.cart-item:hover { box-shadow: var(--shadow-md); }
.cart-item .cover { border-radius: 18px; }
.cart-item h3 { font-size: 16.5px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding-block: 9px; font-size: 14.5px; color: var(--text-2); }
.summary-row b { color: var(--text); }
.summary-row.total { border-top: 2px dashed var(--border-strong); margin-top: 8px; padding-top: 18px; font-size: 16px; align-items: baseline; }
.summary-row.total b { font-size: 24px; font-weight: 900; }
.coupon-form { display: flex; gap: 8px; }
.coupon-form .btn { height: 50px; }
.result-card { position: relative; overflow: hidden; max-width: 640px; margin: 48px auto; text-align: center; padding: 44px 30px; border-radius: 34px; }
.result-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--spectrum); }
.result-icon { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; font-size: 34px; }
.result-icon.ok { background: var(--green-soft); color: var(--green); box-shadow: 0 0 0 12px color-mix(in srgb, var(--green-soft) 50%, transparent); }
.result-icon.fail { background: var(--red-soft); color: var(--red); box-shadow: 0 0 0 12px color-mix(in srgb, var(--red-soft) 50%, transparent); }

/* ---------------------------------------------------------------- جدول */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; padding: 14px 16px; font-size: 12px; font-weight: 700; color: var(--muted); background: transparent; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.table td { padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user small { display: block; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- پیام‌ها */
.toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; border-radius: 20px; background: var(--ink-900); color: #f5f1e6; box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 600; animation: toast-in 0.5s var(--ease); cursor: pointer; }
.toast::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--spectrum); transform-origin: right; animation: toast-life 5.2s linear forwards; }
.toast .icon { color: var(--gold-300); margin-top: 4px; }
.toast.success .icon { color: #4cc38a; }
.toast.error .icon { color: #f07a6a; }
.toast.is-leaving { opacity: 0; transform: translateY(10px); transition: 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes toast-life { to { transform: scaleX(0); } }

/* ---------------------------------------------------------------- ورود / ثبت‌نام */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 10px var(--gutter) var(--gutter); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 900; line-height: 1.35; }
.auth-card h1::before { content: ""; display: block; width: 56px; height: 4px; margin-bottom: 18px; border-radius: 4px; background: var(--spectrum); }
.auth-card > p { color: var(--muted); margin-block: 8px 28px; }
.auth-side { --h: 42; border-radius: var(--r-xl); display: flex; flex-direction: column; justify-content: flex-end; padding: 44px; }
.auth-side::before { content: ""; position: absolute; inset: 8% 14% 40%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, hsl(var(--h) 90% 72% / 0.55), transparent); }
.auth-art { position: absolute; inset: 4% 8% 36%; z-index: 0; --book: clamp(150px, 26vh, 210px); }
.auth-side > :not(.auth-art) { position: relative; z-index: 1; }
.auth-side h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 900; line-height: 1.5; }
.auth-side h2 span { display: block; font-weight: 250; }
.auth-side ul { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-side li { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.auth-side li .icon { color: #fff; }
.auth-alt { text-align: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- صفحات ساده */
.narrow { max-width: 880px; margin-inline: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: 30px; overflow: hidden; }
.stat-box { position: relative; text-align: start; padding: 28px 26px 24px; border-inline-start: 1px solid var(--border); }
.stat-box:first-child { border-inline-start: 0; }
.stat-box strong { display: block; font-size: clamp(36px, 4.4vw, 56px); font-weight: 200; line-height: 1.2; }
.stat-box span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.stat-box::before { content: ""; display: block; width: 28px; height: 3px; margin-bottom: 18px; border-radius: 3px; background: hsl(calc(var(--i, 0) * 80 + 30) 70% 52%); }
.stat-box:nth-child(2) { --i: 1; } .stat-box:nth-child(3) { --i: 2; } .stat-box:nth-child(4) { --i: 3; }
.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-list li { display: flex; gap: 14px; align-items: center; }
.info-list .ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex: none; }
.info-list small { display: block; color: var(--muted); font-size: 12.5px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; counter-increment: step; overflow: hidden; }
.step::before { content: counter(step, persian); display: block; font-size: 64px; font-weight: 200; line-height: 1; margin-bottom: 18px; color: var(--accent); }
.step::after { content: ""; position: absolute; top: 58px; inset-inline-start: 72px; inset-inline-end: 22px; height: 1px; background: linear-gradient(to left, var(--border-strong), transparent); }
.step h3 { font-size: 17px; margin-bottom: 4px; }
.step p { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- صفحه یادگیری (پلیر) */
.learn { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding: 10px var(--gutter) var(--gutter); min-height: calc(100vh - var(--header-h)); }
.learn-main { min-width: 0; }
.player { background: #000; aspect-ratio: 16 / 9; max-height: 72vh; width: 100%; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); }
.player video, .player iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-empty { --h: 42; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; text-align: center; padding: 20px;
  background: radial-gradient(50% 60% at 50% 45%, hsl(var(--h) 78% 60% / 0.7), transparent 70%), radial-gradient(140% 130% at 50% 40%, hsl(var(--h) 66% 40%), hsl(var(--h) 54% 10%)); }
.player-empty .icon { width: 72px; height: 72px; stroke-width: 1.1; color: #fff; }
.player-empty strong { font-size: clamp(16px, 2.2vw, 24px); }
.player-empty span { color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.learn-body { padding: 24px clamp(4px, 2vw, 20px) 48px; display: flex; flex-direction: column; gap: 18px; max-width: 980px; margin-inline: auto; }
.learn-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.learn-body > .tabs { align-self: flex-start; }
.learn-side { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; overflow: hidden; position: sticky; top: calc(var(--header-h) + 4px); height: calc(100vh - var(--header-h) - 24px); display: flex; flex-direction: column; }
.learn-side-head { padding: 20px 22px; border-bottom: 1px solid var(--border); }
.learn-side-head strong { font-size: 15.5px; display: block; line-height: 1.7; }
.learn-sections { overflow-y: auto; flex: 1; }
.learn-section { border-bottom: 1px solid var(--border); }
.learn-section summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px; font-weight: 800; font-size: 14px; cursor: pointer; list-style: none; }
.learn-section summary:hover { background: var(--surface-2); }
.learn-section summary::-webkit-details-marker { display: none; }
.learn-section summary .chev { transition: 0.2s; color: var(--muted); }
.learn-section[open] summary .chev { transform: rotate(180deg); }
.learn-section ul { padding: 0 10px 10px; }
.learn-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; color: var(--text-2); }
.learn-item > span { flex: 1; min-width: 0; }
.learn-item small { color: var(--muted); direction: ltr; flex: none; }
.learn-item .icon { color: var(--muted); }
a.learn-item:hover { background: var(--surface-2); }
.learn-item.is-done .icon { color: var(--green); }
.learn-item.is-current { background: var(--ink); color: var(--on-ink); font-weight: 700; }
.learn-item.is-current .icon, .learn-item.is-current small { color: var(--gold-300); }
.learn-item.is-locked { opacity: 0.55; }

/* ---------------------------------------------------------------- گواهینامه */
.certificate { padding: 14px; border-radius: var(--r-lg); background: var(--gold-gradient); box-shadow: var(--shadow-lg); }
.certificate-inner { position: relative; background: #fffdf7; color: #1a1b20; border-radius: 12px; padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
  outline: 1px solid #d4aa4a; outline-offset: -12px; }
.certificate-inner img { width: 92px; height: 92px; background: #0a0b0d; border-radius: 22px; padding: 8px; }
.certificate-kicker { font-weight: 800; color: #8f6a1c; font-size: 15px; margin-top: 6px; }
.certificate-inner h2 { font-size: clamp(26px, 4.4vw, 42px); font-weight: 900; }
.certificate-inner h3 { font-size: clamp(18px, 2.6vw, 24px); color: #7e5b21; }
.certificate-inner p { color: #55585f; }
.certificate-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%; margin-top: 28px; padding-top: 22px; border-top: 1px dashed #d6cdb9; }
.certificate-foot small { display: block; color: #777a82; font-size: 12.5px; }
.certificate-foot strong { font-size: 15px; }

/* ---------------------------------------------------------------- صفحه ۴۰۴ */
.not-found { position: relative; isolation: isolate; text-align: center; padding-block: clamp(48px, 9vw, 110px); }
.not-found-code { font-size: clamp(120px, 24vw, 300px); font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--border-strong); position: relative; }
.not-found-code span { color: transparent; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0; }
.not-found h1 { font-size: clamp(22px, 3vw, 32px); font-weight: 900; margin-top: 8px; }
.not-found p { color: var(--muted); margin-block: 8px 24px; }
.not-found .form-actions { justify-content: center; }

/* ---------------------------------------------------------------- فوتر: قفسه کتاب حوزه‌ها + پنل جوهری */
.site-footer { padding: 40px 0 18px; }
.shelf { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 262px; padding-inline: clamp(24px, 5vw, 70px); }
.book { --h: 42; position: relative; flex: 1 1 0; min-width: 0; max-width: 92px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0;
  height: var(--bh, 214px); padding: 14px 0 12px; border-radius: 10px 10px 3px 3px; color: #fff; overflow: hidden;
  background: linear-gradient(90deg, hsl(var(--h) 58% 26%) 0%, hsl(var(--h) 64% 44%) 22%, hsl(var(--h) 70% 54%) 46%, hsl(var(--h) 62% 40%) 78%, hsl(var(--h) 56% 24%) 100%);
  box-shadow: inset 0 -12px 0 rgba(0, 0, 0, 0.12); transform-origin: bottom center; transition: transform 0.45s var(--ease), max-width 0.45s var(--ease), flex-grow 0.45s var(--ease); }
.book::before, .book::after { content: ""; position: absolute; inset-inline: 0; height: 9px; border-block: 2px solid rgba(255, 255, 255, 0.32); }
.book::before { top: 12px; }
.book::after { bottom: 52px; }
.book:nth-child(3n) { --bh: 232px; } .book:nth-child(3n + 1) { --bh: 208px; } .book:nth-child(4n + 2) { --bh: 222px; } .book:nth-child(5n) { --bh: 244px; }
.book:nth-child(7n + 3) { transform: rotate(-3deg) translateX(-2px); }
.book-name { flex: 1; min-height: 0; writing-mode: vertical-rl; font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; margin-block: 24px 16px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3); }
.book-ic { position: relative; z-index: 1; width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: hsl(var(--h) 60% 34%); font-size: 13px; }
.book:hover, .book:focus-visible { transform: translateY(-14px) rotate(0); flex-grow: 1.6; max-width: 130px; outline-offset: 4px; }
.footer-panel { position: relative; isolation: isolate; overflow: hidden; border-radius: 0 0 40px 40px; background: var(--ink-950); color: #b9b4a6; padding: clamp(30px, 4vw, 56px) clamp(22px, 4vw, 56px) 22px; }
[data-theme="dark"] .site-footer .footer-panel { background: var(--ink-850); box-shadow: 0 0 0 1px var(--border); }
.shelf + .footer-panel { border-radius: 14px 14px 40px 40px; box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.04) inset; }
.footer-panel::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(45% 60% at 100% 0%, rgba(212, 170, 74, 0.2), transparent 62%), radial-gradient(40% 60% at 0% 100%, rgba(120, 90, 220, 0.12), transparent 60%); }
.footer-panel::after { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--spectrum); opacity: 0.85; }
.footer-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.footer-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-300); font-weight: 800; font-size: 13.5px; }
.footer-kicker::before { content: ""; width: 34px; height: 3px; border-radius: 3px; background: var(--spectrum); }
.footer-lead { max-width: 22ch; margin-top: 10px; font-size: clamp(26px, 3.4vw, 46px); font-weight: 250; line-height: 1.5; color: #f5f1e6; }
.footer-lead b { font-weight: 900; color: #fff; }
.footer-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-cta .btn-primary { background: #fff; color: #14151a; }
.footer-cta .btn-primary .icon { color: var(--gold-600); }
.footer-cta .btn-ghost-light { color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.footer-cta .btn-ghost-light:hover { background: rgba(255, 255, 255, 0.1); }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding-block: 34px 10px; }
.footer-cols h4 { color: #f5f1e6; font-size: 14px; margin-bottom: 14px; }
.footer-cols li { margin-bottom: 9px; font-size: 14px; }
.footer-cols a { transition: color 0.2s; }
.footer-cols ul a:hover { color: #fff; }
.footer-cols .brand-name { color: #f5f1e6; }
.footer-cols .brand-name small { color: #8e8a7e; }
.footer-cols .brand img { width: 46px; height: 46px; }
.footer-about { font-size: 14px; max-width: 42ch; }
.site-footer .footer-contact { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.site-footer .footer-contact span { display: inline-flex; gap: 8px; align-items: center; }
.site-footer .footer-contact .icon { color: var(--gold-300); }
.site-footer .socials { display: flex; gap: 8px; margin-top: 18px; }
.site-footer .socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.14); transition: 0.25s; }
.site-footer .socials a:hover { background: #fff; color: #14151a; border-color: #fff; }
.footer-mark { margin: 6px calc(clamp(22px, 4vw, 56px) * -0.2) -0.16em; font-size: clamp(84px, 19vw, 290px); font-weight: 900; line-height: 1; white-space: nowrap; text-align: center; pointer-events: none; user-select: none;
  color: transparent; background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.015) 82%); -webkit-background-clip: text; background-clip: text; }
.footer-mark span { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; }
.footer-legal { position: relative; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; }

/* ---------------------------------------------------------------- کتاب سه‌بعدی حوزه (فقط CSS؛ جایگزین مدل‌های three.js)
   جعبه‌ای با پنج وجه: جلد، عطف (سمت راست؛ کتاب فارسی)، لبه برگ‌ها، بالا و پشت جلد. اندازه با --bw تنظیم می‌شود. */
.vbook { --h: 42; --bw: 240px; --bh: calc(var(--bw) * 1.38); --bd: calc(var(--bw) * 0.18); --ry: -24deg; --rx: -5deg;
  position: relative; width: var(--bw); height: var(--bh); perspective: 1600px; flex: none; }
.vbook-tilt { position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateY(calc(var(--mx, 0) * 12deg)) rotateX(calc(var(--my, 0) * -6deg)); }
.vbook-body { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(var(--ry)) rotateX(var(--rx)); animation: vbook-idle 7s ease-in-out infinite; }
.vbook-body > div { position: absolute; backface-visibility: hidden; }
.vbook-front { inset: 0; transform: translateZ(calc(var(--bd) / 2)); border-radius: 18px 5px 5px 18px; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 9% 10% 8%; text-align: center;
  background:
    radial-gradient(70% 50% at 28% 22%, hsl(var(--h) 85% 74% / 0.6), transparent 70%),
    radial-gradient(90% 70% at 70% 100%, hsl(calc(var(--h) - 24) 70% 30% / 0.55), transparent 70%),
    linear-gradient(165deg, hsl(var(--h) 62% 54%), hsl(var(--h) 64% 36%));
  box-shadow: inset -14px 0 18px -10px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.vbook-front::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1.1px, transparent 1.6px); background-size: 15px 15px;
  -webkit-mask-image: linear-gradient(170deg, #000, transparent 75%); mask-image: linear-gradient(170deg, #000, transparent 75%); }
.vbook-front::after { content: ""; position: absolute; inset-block: 0; right: 8%; width: 3px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.2)); }
.vbook-front > * { position: relative; z-index: 1; }
.vbook-brand { font-size: calc(var(--bw) * 0.048); font-weight: 700; opacity: 0.85; line-height: 1.6; }
.vbook-label { position: relative; width: 74%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.98), hsl(var(--h) 60% 93%) 62%, hsl(var(--h) 45% 82%));
  box-shadow: 0 10px 24px -8px hsl(var(--h) 60% 18% / 0.55), inset 0 -6px 12px hsl(var(--h) 40% 60% / 0.25); }
.vbook-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vbook-ring text { direction: ltr; font-family: var(--font); font-size: 17px; font-weight: 900; fill: hsl(var(--h) 55% 30%); }
.vbook-label img { width: 58%; height: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.22)); }
.vbook-title { font-size: calc(var(--bw) * 0.105); font-weight: 900; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); }
.vbook-sub { font-size: calc(var(--bw) * 0.05); font-weight: 600; opacity: 0.85; margin-top: -4%; }
.vbook-spine { width: var(--bd); height: var(--bh); left: calc((var(--bw) - var(--bd)) / 2); top: 0; transform: rotateY(90deg) translateZ(calc(var(--bw) / 2));
  border-radius: 4px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(90deg, hsl(var(--h) 60% 26%), hsl(var(--h) 62% 40%) 45%, hsl(var(--h) 60% 30%));
  box-shadow: inset 0 14px 0 -10px rgba(255, 255, 255, 0.3), inset 0 -14px 0 -10px rgba(255, 255, 255, 0.3); }
.vbook-spine span { writing-mode: vertical-rl; color: #fff; font-weight: 800; font-size: calc(var(--bw) * 0.055); white-space: nowrap; opacity: 0.9; }
.vbook-pages { width: calc(var(--bd) - 6px); height: calc(var(--bh) - 10px); left: calc((var(--bw) - var(--bd)) / 2 + 3px); top: 5px; transform: rotateY(-90deg) translateZ(calc(var(--bw) / 2 - 4px));
  background: repeating-linear-gradient(90deg, #fbf7ee 0 2px, #e6dfcf 2px 3px); box-shadow: inset 0 0 12px rgba(120, 100, 60, 0.25); }
.vbook-top { width: calc(var(--bw) - 8px); height: calc(var(--bd) - 6px); left: 4px; top: calc((var(--bh) - var(--bd)) / 2 + 3px); transform: rotateX(90deg) translateZ(calc(var(--bh) / 2 - 3px));
  background: repeating-linear-gradient(0deg, #fbf7ee 0 2px, #e6dfcf 2px 3px); }
.vbook-back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--bd) / 2)); border-radius: 5px 18px 18px 5px; background: linear-gradient(165deg, hsl(var(--h) 55% 44%), hsl(var(--h) 60% 28%)); }
.vbook-shadow { position: absolute; left: -6%; right: -14%; bottom: -9%; height: 16%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, hsl(var(--h) 40% 15% / 0.4), transparent); filter: blur(4px); animation: vbook-shadow 7s ease-in-out infinite; }
@keyframes vbook-idle { 0%, 100% { transform: rotateY(var(--ry)) rotateX(var(--rx)) translateY(0); } 50% { transform: rotateY(calc(var(--ry) + 9deg)) rotateX(calc(var(--rx) + 2deg)) translateY(-10px); } }
@keyframes vbook-shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(0.9); opacity: 0.75; } }

/* کتاب با اشیای شناور، برای سربرگ‌ها و کنار فرم ورود (partials/book_scene.html) */
.book-scene { position: absolute; inset: 0; display: grid; place-items: center; }
.book-scene .vbook { --bw: var(--book, 180px); }
.book-scene .bs-a { top: 6%; left: 2%; --fs: calc(var(--book, 180px) * 0.5); --rot: -14deg; --dur: 6.5s; }
.book-scene .bs-b { bottom: 4%; right: 0; --fs: calc(var(--book, 180px) * 0.46); --rot: 12deg; --blur: 2px; --dur: 8s; --delay: -2s; }
.book-scene .bs-c { top: 10%; right: 6%; --fs: calc(var(--book, 180px) * 0.32); --rot: 18deg; --dur: 7s; --delay: -4s; }

/* کاراکتر حوزه (partials/mascot.html): روی زمین سربرگ می‌ایستد و از قاب بیرون می‌زند */
.mascot { --h: 42; position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.mascot-img { position: relative; z-index: 1; height: 100%; width: auto; max-width: none; filter: drop-shadow(0 24px 22px hsl(var(--h) 45% 12% / 0.35));
  transform-origin: 50% 100%; animation: mascot-in 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) both, mascot-breathe 5s 1s ease-in-out infinite; }
.mascot-shadow { position: absolute; bottom: -1%; left: 22%; right: 22%; height: 5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.35), transparent); filter: blur(3px); }
.mascot-say { position: absolute; z-index: 2; top: 10%; left: 62%; width: max-content; max-width: 210px; margin: 0; padding: 10px 16px; border-radius: 20px 20px 20px 6px;
  background: #fff; color: #14151a; font-size: 13.5px; font-weight: 700; line-height: 1.8; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.4);
  transform-origin: 0% 100%; animation: say-in 0.6s 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.mascot-say::after { content: ""; position: absolute; bottom: -7px; left: 16px; width: 16px; height: 16px; background: #fff; border-radius: 0 0 4px 0; transform: rotate(45deg) skew(8deg, 8deg); }
.page-head.has-hue .mascot .mascot-say { color: #14151a; font-size: 13px; margin: 0; max-width: 210px; }
@keyframes mascot-in { from { opacity: 0; transform: translateY(14%) scale(0.92); } }
@keyframes mascot-breathe { 0%, 100% { transform: none; } 50% { transform: translateY(-1.2%) rotate(-0.6deg); } }
@keyframes say-in { from { opacity: 0; transform: scale(0.4) rotate(-8deg); } }

/* سربرگ دسته‌بندی: کاراکتر از بالای قاب رنگی بیرون می‌زند */
.page-head.has-hue:has(.has-mascot) { overflow: visible; padding-top: 48px; }
.page-head.has-hue > .container:has(.has-mascot) { overflow: visible; }
.head-art.has-mascot { top: -64px; bottom: 0; width: min(36%, 380px); z-index: 1; }
/* صفحه دوره: کاراکتر روی لبه پایین هیرو می‌ایستد */
.course-hero-art.has-mascot { aspect-ratio: auto; align-self: stretch; min-height: 340px; margin-bottom: calc(clamp(28px, 4vw, 56px) * -1); }
.course-hero-art.has-mascot .mascot-say { top: 6%; }
/* کنار فرم ورود */
.auth-art.has-mascot { inset: 6% 6% 34%; }

/* اشیای سه‌بعدی شناور اطراف کتاب (تصاویر Fluent Emoji) */
.floaty { position: absolute; width: var(--fs, 110px); max-width: none; height: auto; pointer-events: none; user-select: none;
  transform: translate(calc(var(--mx, 0) * var(--depth, 1) * 18px), calc(var(--my, 0) * var(--depth, 1) * 12px)) rotate(var(--rot, 0deg));
  filter: drop-shadow(0 18px 18px hsl(var(--h, 42) 40% 20% / 0.25)) blur(var(--blur, 0px)); }
.floaty-bob { animation: floaty-bob var(--dur, 6s) ease-in-out var(--delay, 0s) infinite; }
@keyframes floaty-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* ---------------------------------------------------------------- تصویرسازی حوزه‌ها (SVG) — کاور کارت‌ها */
.art {
  display: block; width: 100%; height: 100%; overflow: visible; font-family: var(--font);
  --w: #fff; --w2: hsl(var(--h) 70% 94%); --sh: hsl(var(--h) 48% 82%);
  --d: hsl(var(--h) 55% 22%); --d2: hsl(var(--h) 50% 12%); --b: hsl(var(--h) 95% 74%);
  --a: var(--accent-a, #ffd66e); --a2: var(--accent-a2, #e3a83a);
}
.art .fw { fill: var(--w); } .art .fw2 { fill: var(--w2); } .art .fsh { fill: var(--sh); }
.art .fd { fill: var(--d); } .art .fd2 { fill: var(--d2); } .art .fa { fill: var(--a); } .art .fa2 { fill: var(--a2); } .art .fb { fill: var(--b); }
.art .sw { stroke: var(--w); } .art .ssh { stroke: var(--sh); } .art .sd { stroke: var(--d); } .art .sa { stroke: var(--a); } .art .sa2 { stroke: var(--a2); }
.art .fn { fill: none; }
.art .rc { stroke-linecap: round; stroke-linejoin: round; }
.art-glyph { fill: none; stroke: var(--d); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.art [class*="a-"] { transform-box: fill-box; transform-origin: center; }
.art .a-float { animation: a-float 5s ease-in-out infinite; }
.art .a-float2 { animation: a-float 7s ease-in-out -2.5s infinite reverse; }
.art .a-sway { transform-origin: 50% 100%; animation: a-sway 5.5s ease-in-out infinite; }
.art .a-sway-top { transform-origin: 50% 0; animation: a-sway 6s ease-in-out infinite; }
.art .a-tilt { transform-origin: 50% 6%; animation: a-tilt 5s ease-in-out infinite; }
.art .a-pulse { animation: a-pulse 2.6s ease-in-out infinite; }
.art .a-spin { animation: spin 16s linear infinite; }
.art .a-hover { animation: a-hover 2.4s ease-in-out infinite; }
.art .a-flick { transform-origin: 50% 0; animation: a-flick 0.5s ease-in-out infinite alternate; }
.art .a-steam { animation: a-steam 3.3s ease-in-out infinite; }
.art .a-grow { transform-origin: 50% 100%; animation: a-grow 4s ease-in-out infinite; }
.art .a-blink { animation: a-blink 1.6s steps(2, jump-none) infinite; }
.art .a-tick { transform-origin: 0 0; animation: spin 6s steps(60) infinite; }
.art .a-dash { stroke-dasharray: 560; animation: a-dash 3.2s linear infinite; }
@keyframes a-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes a-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes a-tilt { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes a-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.72; transform: scale(1.04); } }
@keyframes a-hover { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(0, -6px); } }
@keyframes a-flick { from { transform: scaleY(0.82); } to { transform: scaleY(1.08); } }
@keyframes a-steam { 0% { opacity: 0; transform: translateY(14px); } 35% { opacity: 0.9; } 100% { opacity: 0; transform: translateY(-22px); } }
@keyframes a-grow { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.06); } }
@keyframes a-blink { from { opacity: 1; } to { opacity: 0.25; } }
@keyframes a-dash { from { stroke-dashoffset: 560; } to { stroke-dashoffset: -560; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- ظاهر شدن هنگام اسکرول */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- واکنش‌گرا */
@media (max-width: 1280px) {
  .nav .nav-hide-lg { display: none; }
  .header-search { max-width: 260px; }
}
@media (max-width: 1180px) {
  .learn { grid-template-columns: minmax(0, 1fr) 320px; }
  .cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { grid-auto-columns: calc((100% - 44px) / 3); }
  .header-search { max-width: 210px; }
  .header .brand-name small { display: none; }
  .nav-link { padding-inline: 13px; }
}
@media (max-width: 980px) {
  :root { --header-h: 76px; }
  .header { padding-top: 10px; }
  .header-inner { height: 54px; }
  .nav, .header-search { display: none; }
  .header .brand, .header-actions { height: 54px; }
  .menu-btn { display: inline-grid; width: 54px; height: 54px; }
  .header-actions { margin-inline-start: auto; padding: 5px; }
  .header-actions > .btn, .user-btn, .icon-btn { height: 42px; }
  .icon-btn { width: 42px; }
  .mega { display: none; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feature-grid, .quote-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-band { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; display: none; max-height: none; }
  .filters.is-open { display: block; }
  .filters-toggle { display: inline-flex; }
  .course-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-layout, .cart-layout { grid-template-columns: 1fr; }
  .course-hero { grid-template-columns: 1fr; }
  .course-hero-art { width: min(70vw, 300px); margin-inline: auto; order: -1; }
  .learn { grid-template-columns: 1fr; }
  .learn-side { position: static; height: auto; }
  .certificate-foot { grid-template-columns: 1fr; }
  .buy-box { position: static; order: -1; box-shadow: var(--shadow-md); }
  .anchor-nav { top: var(--header-h); }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-box:nth-child(3) { border-inline-start: 0; }
  .stat-box:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .mobile-buy { display: flex; position: fixed; bottom: 10px; inset-inline: 10px; z-index: 40; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 10px; padding-inline-start: 20px;
    background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-lg); }
  .has-mobile-buy { padding-bottom: 86px; }
  .shelf { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-top: 20px; height: 262px; }
  .shelf::-webkit-scrollbar { display: none; }
  .book { flex: 0 0 58px; max-width: none; }
  .book:hover, .book:focus-visible { flex-grow: 0; max-width: none; }
}
@media (max-width: 720px) {
  .course-grid, .course-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .rail { grid-auto-columns: 74%; gap: 14px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .feature-grid, .quote-grid, .post-grid, .form-grid { grid-template-columns: 1fr; }
  .teacher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .learn-grid { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 110px 1fr; padding-inline-end: 10px; }
  .cart-item > :last-child { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0 8px 4px; }
  .teacher-box { flex-direction: column; }
  .brand-name small { display: none; }
  .user-btn > span:not(.avatar) { display: none; }
  .user-btn { padding: 4px; }
  .hide-sm { display: none !important; }
  .page-head > .container { min-height: 200px; }
  .page-head > .container::after { font-size: 200px; inset-inline-end: -4%; }
  .page-head > .container.row-between { flex-direction: column; align-items: stretch; }
  .page-head .header-search { max-width: none; }
  .page-head.has-hue > .container { min-height: 260px; }
  .head-art { opacity: 0.45; width: 70%; inset-inline-end: -16%; }
  .head-art.has-mascot { position: relative; inset: auto; order: 2; width: 100%; height: 250px; opacity: 1; margin-top: 8px; margin-bottom: calc(clamp(28px, 4vw, 56px) * -1); }
  .page-head.has-hue:has(.has-mascot) { padding-top: 10px; }
  .head-art.has-mascot .mascot-say { left: auto; right: 60%; top: 4%; max-width: 38%; font-size: 12px; border-radius: 18px 18px 6px 18px; }
  .head-art.has-mascot .mascot-say::after { left: auto; right: 14px; }
  .page-head.has-hue .head-text { max-width: none; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > :first-child { grid-column: 1 / -1; }
  .acc-body { padding-inline-start: 18px; }
  .catalog-bar > .sort-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .sort-links a { white-space: nowrap; }
  .hero { margin-inline: 10px; }
}
@media (max-width: 520px) {
  :root { --gutter: 14px; }
  .header-inner { gap: 6px; }
  .header .brand { padding-inline: 6px 14px; gap: 8px; min-width: 0; }
  .brand img, .header .brand img { width: 36px; height: 36px; }
  .brand-name { font-size: 15px; white-space: nowrap; }
  .header-actions { gap: 0; }
  .icon-btn { width: 38px; height: 38px; }
  .header-actions > .btn { width: 42px; padding: 0; }
  .header-actions > .btn span { display: none; }
  .course-grid, .course-grid.cols-3 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .stat-box { padding: 20px 18px; }
  .footer-panel, .shelf + .footer-panel { border-radius: 12px 12px 30px 30px; }
  .footer-cta { width: 100%; }
  .footer-cta .btn { flex: 1; }
  .learn { padding-inline: 0; }
  .player { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .art [class*="a-"] { animation: none !important; }
}
@media print {
  .header, .site-footer, .promo-bar, .toasts, .no-print { display: none !important; }
  body { background: #fff; }
  .reveal { opacity: 1; transform: none; }
}
