/* =========================================================
   مهرتاک | MehrTalk — Design system (mobile-first, italki-inspired)
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-2: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #f3f3f6;
  --ink: #16161d;
  --text: #2b2b35;
  --muted: #6e6e7a;
  --border: #e8e8ee;
  --primary: #ff5a36;
  --primary-hover: #f04a26;
  --primary-ink: #ffffff;
  --primary-soft: #fff0eb;
  --teal: #00989a;
  --teal-soft: #e3f6f5;
  --violet: #5b4bdb;
  --violet-soft: #efedff;
  --sun: #ffb020;
  --sun-soft: #fff5df;
  --ok: #12a46b;
  --ok-soft: #e2f6ec;
  --bad: #e5484d;
  --bad-soft: #fdeaea;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(22, 22, 29, .06);
  --shadow: 0 4px 20px rgba(22, 22, 29, .08);
  --shadow-lg: 0 18px 50px rgba(22, 22, 29, .14);
  --maxw: 1200px;
  --tabbar-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* سایت عمداً فقط تم روشن دارد (مثل لپ‌تاپ)، حتی وقتی گوشی در حالت تاریک است.
     "only light" جلوی تیره‌سازی خودکار مرورگرها (مثل Auto Dark کروم اندروید) را هم می‌گیرد. */
  color-scheme: only light;
}
html, body { background: #ffffff; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Vazirmatn", Tahoma, sans-serif; line-height: 1.85; font-size: 16px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
}
h1, h2, h3 { color: var(--ink); line-height: 1.45; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: none; }
img, svg { max-width: 100%; }
button { font: inherit; }
.en { direction: ltr; unicode-bidi: isolate; font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .container { padding: 0 32px; } }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.accent { color: var(--primary); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: 2px; border-radius: 8px; }

/* ---------------- Header ---------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand-logo { width: 36px; height: 36px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 18px; font-weight: 900; }
.brand-text small { font-family: "Plus Jakarta Sans", sans-serif; font-size: 10.5px; color: var(--muted); letter-spacing: .8px; font-weight: 700; }
.nav-links { display: none; }
.header-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.badge { position: absolute; top: -5px; left: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.badge:empty, .badge[data-n="0"] { display: none; }
.header-actions .header-cta { display: none; }
@media (min-width: 900px) {
  .nav { height: 70px; gap: 32px; }
  .nav-links { display: flex; gap: 4px; }
  .nav-links a { color: var(--text); padding: 8px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; position: relative; }
  .nav-links a:hover { color: var(--ink); background: var(--bg-2); }
  .nav-links a.active { color: var(--ink); font-weight: 800; }
  .nav-links a.active::after { content: ""; position: absolute; right: 12px; left: 12px; bottom: -14px; height: 3px; border-radius: 3px; background: var(--primary); }
  .header-actions .header-cta { display: inline-flex; }
}

/* ---------------- Mobile tab bar ---------------- */
.tabbar { position: fixed; bottom: 0; right: 0; left: 0; z-index: 60; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.active { color: var(--primary); font-weight: 800; }
.tab-ico { width: 46px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }
.tabbar a.active .tab-ico { background: var(--primary-soft); }
@media (min-width: 900px) { .tabbar { display: none; } body { padding-bottom: 0; } }
body.focus-mode .tabbar { display: none; }
body.focus-mode { padding-bottom: 0; }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px; border-radius: 10px; border: 1.5px solid transparent; font-weight: 800; font-size: 15.5px; cursor: pointer; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s, opacity .2s; text-decoration: none; }
.btn svg, .btn [data-icon] svg { width: 19px; height: 19px; flex: none; }
.btn [data-icon] { display: inline-flex; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 16.5px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.link-arrow { color: var(--teal); font-weight: 800; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; white-space: nowrap; }
.link-arrow::after { content: "‹"; font-size: 20px; line-height: 1; }

/* ---------------- Hero (italki style) ---------------- */
.hero { padding: 26px 0 8px; overflow: hidden; }
.hero-grid { display: grid; gap: 30px; align-items: center; }
.hero h1 { font-size: clamp(32px, 8.2vw, 58px); line-height: 1.3; margin: 0 0 18px; font-weight: 900; letter-spacing: -.5px; }
.hero h1 .accent { color: var(--primary); }
.hero-points { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; }
.hero-points li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; color: var(--text); }
.hero-points li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex: none; transform: translateY(-2px); }
.hero-actions { display: grid; gap: 10px; }
@media (min-width: 560px) { .hero-actions { display: flex; flex-wrap: wrap; } }
@media (min-width: 900px) {
  .hero { padding: 64px 0 24px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .hero-points li { font-size: 17px; }
}

/* Hero visual — photo rising out of a speech bubble (italki style) */
.hero-visual { position: relative; width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 1 / 1; }
@media (min-width: 900px) { .hero-visual { max-width: 520px; } }
/* bubble starts at shoulder height so the face stays above it */
.hv-bubble { position: absolute; inset: 60% 3% 7% 7%; background: var(--primary); border-radius: 40px 52px 44px 36px; }
.hv-bubble::after { /* tail */
  content: ""; position: absolute; bottom: -13%; left: 13%; width: 18%; aspect-ratio: 1; background: var(--primary);
  clip-path: polygon(0 0, 100% 0, 8% 100%);
}
.hv-photo { position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%); width: 80%; max-width: none; height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(22, 22, 29, .12)); }
.hv-word { position: absolute; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: clamp(14px, 3.6vw, 20px); color: color-mix(in srgb, var(--primary) 45%, transparent); direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.hv-word.on-bubble { color: rgba(255, 255, 255, .78); }
.hv-word.fa { font-family: "Vazirmatn", sans-serif; direction: rtl; }
.hv-circle { position: absolute; top: 6%; left: 2%; width: 21%; aspect-ratio: 1; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); }
.hv-circle svg { width: 44%; height: 44%; }
.hv-chip { position: absolute; background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 9px 13px; display: flex; align-items: center; gap: 9px; font-size: clamp(12px, 3.2vw, 14px); font-weight: 800; line-height: 1.35; }
.hv-chip .en { font-weight: 700; }
.hv-chip small { display: block; font-weight: 600; color: var(--muted); font-size: 11.5px; }
.hv-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.hv-chip.chat { top: 4%; right: 0; }
.hv-chip.level { bottom: 0; right: 2%; }
.hv-chip.level b { font-family: "Plus Jakarta Sans", sans-serif; background: var(--teal); color: #fff; border-radius: 8px; padding: 1px 9px; direction: ltr; }

/* Strip (like italki's language strip) */
.strip { margin-top: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 6px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
@media (min-width: 900px) { .strip { grid-template-columns: repeat(4, 1fr); padding: 8px; margin-top: 44px; } }
.strip a { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--ink); }
.strip a:hover { background: var(--bg-2); }
.strip .s-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.strip .s-ico svg { width: 19px; height: 19px; }
.strip b { display: block; font-size: 14.5px; line-height: 1.4; }
.strip span { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.trust { display: flex; justify-content: center; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.trust b { color: var(--ink); }
.trust .stars { color: var(--teal); letter-spacing: 2px; }

/* ---------------- Sections ---------------- */
.block { padding: 44px 0; }
.block.alt { background: var(--bg-2); }
@media (min-width: 900px) { .block { padding: 80px 0; } }
.section-title { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.section-title h2 { font-size: clamp(25px, 5.6vw, 38px); margin: 0 0 8px; font-weight: 900; }
.section-title p { margin: 0; color: var(--muted); font-size: 16px; }
.section-head { margin-bottom: 20px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-head h2 { font-size: clamp(22px, 5vw, 32px); margin: 0 0 4px; font-weight: 900; }
.section-head p { margin: 0; color: var(--muted); }
.kicker { color: var(--primary); font-weight: 800; font-size: 13.5px; margin-bottom: 2px; display: block; }
.grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.grid.cats { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 980px) { .grid.cats { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: box-shadow .2s, transform .2s; }
a.card { color: inherit; display: block; }
a.card:hover, .card.hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin: 0 0 6px; font-size: 17.5px; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px; background: var(--primary-soft); color: var(--primary); }
.ico svg { width: 24px; height: 24px; }
.ico.violet { background: var(--violet-soft); color: var(--violet); }
.ico.green { background: var(--ok-soft); color: var(--ok); }
.ico.teal { background: var(--teal-soft); color: var(--teal); }
.ico.sun { background: var(--sun-soft); color: #d48806; }

/* Learning path (journey) */
.journey { display: grid; gap: 16px; }
@media (min-width: 900px) { .journey { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.journey-item { text-align: center; padding: 26px 22px 24px; border-radius: 20px; background: var(--bg-2); }
.journey-item .illus { width: 170px; height: 134px; margin: 0 auto 12px; display: block; }
.journey-item .step { display: inline-block; font-size: 12.5px; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 1px 12px; margin-bottom: 8px; }
.journey-item h3 { margin: 0 0 6px; font-size: 19px; }
.journey-item p { margin: 0 auto 12px; color: var(--muted); max-width: 300px; font-size: 15px; }
@media (max-width: 899px) {
  .journey-item { display: grid; grid-template-columns: 92px 1fr; column-gap: 14px; text-align: right; padding: 18px 16px; align-items: start; }
  .journey-item .illus { grid-row: 1 / span 4; width: 92px; height: 74px; margin: 4px 0 0; }
  .journey-item .step { justify-self: start; margin-bottom: 4px; }
  .journey-item h3 { font-size: 17px; margin-bottom: 2px; }
  .journey-item p { margin: 0 0 6px; max-width: none; font-size: 14.5px; }
  .journey-item .link-arrow { justify-self: start; }
}

/* Audience */
.aud { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 18px; background: var(--surface); color: var(--ink); transition: box-shadow .2s, transform .2s; }
.aud:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.aud-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.aud-ico svg { width: 25px; height: 25px; }
.aud .age { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.aud h3 { margin: 0 0 4px; font-size: 18.5px; line-height: 1.4; }
.aud p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Library categories */
.cat { display: block; padding: 18px; border-radius: 18px; background: var(--surface); color: var(--ink); transition: box-shadow .2s, transform .2s; }
.cat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cat .ico { width: 44px; height: 44px; }
.cat h3 { margin: 0 0 2px; font-size: 16.5px; }
.cat p { margin: 0; color: var(--muted); font-size: 14px; }

/* Exams */
.exam-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .exam-row { grid-template-columns: repeat(4, 1fr); } }
.exam { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 16px; text-align: center; transition: border-color .2s, transform .2s; }
.exam:hover { border-color: var(--primary); transform: translateY(-2px); }
.exam b { display: block; font-family: "Plus Jakarta Sans", sans-serif; font-size: 20px; color: var(--ink); letter-spacing: .3px; }
.exam span { font-size: 13px; color: var(--muted); }

/* Steps */
.path { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 900px) { .path { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.path-card { position: relative; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.path-card .num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 900; margin-bottom: 12px; }
.path-card .btn { margin-top: 14px; }

/* Scroller */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; margin: 0 -16px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 640px) { .scroller { grid-auto-columns: 45%; } }
@media (min-width: 980px) { .scroller { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; gap: 20px; } .scroller.four { grid-template-columns: repeat(4, 1fr); } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 800; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--primary); font-weight: 600; flex: none; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Consultation band */
.consult { display: grid; gap: 22px; background: var(--ink); color: #fff; border-radius: 20px; padding: 26px 20px; position: relative; overflow: hidden; }
.consult::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: var(--primary); opacity: .9; top: -140px; left: -110px; }
.consult > * { position: relative; }
.consult h2 { color: #fff; margin: 0 0 6px; font-size: clamp(23px, 5vw, 32px); }
.consult p { margin: 0; opacity: .8; }
.consult form { display: grid; gap: 10px; }
.consult .input { background: #fff; color: #16161d; border-color: transparent; }
@media (min-width: 900px) { .consult { grid-template-columns: 1fr 1fr; padding: 44px; align-items: center; } }

/* ---------------- Page hero ---------------- */
.page-hero { padding: 24px 0 6px; }
.page-hero h1 { font-size: clamp(26px, 6.4vw, 42px); margin: 0 0 6px; font-weight: 900; }
.page-hero p { color: var(--muted); margin: 0; max-width: 720px; }
@media (min-width: 900px) { .page-hero { padding: 48px 0 16px; } }

/* ---------------- Pills & filters ---------------- */
.pill { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.level { background: var(--teal-soft); color: var(--teal); font-family: "Plus Jakarta Sans", sans-serif; }
.pill.free { background: var(--ok-soft); color: var(--ok); }
.pill.hot { background: var(--primary-soft); color: var(--primary); }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .filter-row { flex-wrap: wrap; margin: 0; padding: 0 0 12px; } }
.filter-label { font-size: 13px; font-weight: 800; color: var(--muted); margin: 4px 0 6px; }
.chip { flex: none; min-height: 40px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 0 16px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { position: relative; margin: 14px 0 12px; }
.search input { width: 100%; min-height: 52px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 0 46px 0 16px; font: inherit; font-size: 16px; }
.search input:focus { outline: none; border-color: var(--ink); }
.search svg { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }

/* ---------------- Test UI ---------------- */
.test-shell { max-width: 720px; margin: 0 auto; padding: 16px 16px 120px; }
@media (min-width: 900px) { .test-shell { padding: 40px 16px 80px; } }
.test-top { position: sticky; top: 60px; z-index: 20; background: var(--bg); padding: 10px 0 6px; }
@media (min-width: 900px) { .test-top { top: 70px; } }
.test-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13.5px; font-weight: 600; gap: 8px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 6px; width: 0; transition: width .4s cubic-bezier(.2,.8,.2,1); }
.skill-tag { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 800; color: var(--teal); background: var(--teal-soft); padding: 2px 12px; border-radius: 6px; margin: 14px 0 10px; }
.q-passage { background: var(--bg-2); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 16px; line-height: 1.75; font-size: 15.5px; text-align: left; }
.q-text { font-size: 20px; font-weight: 700; color: var(--ink); margin: 6px 0 18px; line-height: 1.6; text-align: left; }
.blank { display: inline-block; min-width: 64px; border-bottom: 2.5px solid var(--primary); margin: 0 4px; transform: translateY(-4px); }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; text-align: left; direction: ltr; border: 1.5px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif; font-size: 16.5px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.option:active { transform: scale(.985); }
.option .key { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.option.selected { border-color: var(--primary); background: var(--primary-soft); }
.option.selected .key { background: var(--primary); color: #fff; }
.option.fa { direction: rtl; text-align: right; font-family: "Vazirmatn", sans-serif; font-weight: 600; color: var(--muted); }
@media (hover: hover) { .option:hover { border-color: var(--ink); } }
.action-bar { position: fixed; bottom: 0; right: 0; left: 0; z-index: 40; padding: 12px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); display: flex; gap: 10px; }
.action-bar .btn-primary { flex: 1; }
@media (max-width: 899px) { body:not(.focus-mode) .action-bar { bottom: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: 12px; } }
@media (min-width: 900px) { .action-bar { position: static; background: none; border: none; padding: 24px 0 0; backdrop-filter: none; justify-content: space-between; } .action-bar .btn-primary { flex: 0 1 260px; } }

.listen { display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.play-btn { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.play-btn svg { width: 24px; height: 24px; }
.play-btn[disabled] { opacity: .5; }
.listen b { display: block; font-size: 15px; }
.listen small { opacity: .75; font-size: 13px; }
.wave { display: flex; gap: 3px; align-items: center; height: 24px; margin-inline-start: auto; }
.wave i { width: 3px; background: rgba(255,255,255,.5); border-radius: 2px; height: 30%; }
.listen.playing .wave i { animation: wave 1s ease-in-out infinite; background: var(--primary); }
.wave i:nth-child(2n) { animation-delay: .15s !important; } .wave i:nth-child(3n) { animation-delay: .3s !important; }
@keyframes wave { 0%,100% { height: 25%; } 50% { height: 100%; } }

.intro-hero { text-align: center; padding: 10px 0 6px; }
.intro-hero .ico { margin: 0 auto 12px; width: 62px; height: 62px; border-radius: 18px; }
.intro-hero h1 { font-size: clamp(25px, 6vw, 34px); margin: 0 0 6px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.facts div { background: var(--bg-2); border-radius: 12px; padding: 12px 6px; text-align: center; }
.facts b { display: block; font-size: 18px; color: var(--ink); font-weight: 900; }
.facts span { font-size: 12.5px; color: var(--muted); }
.field-label { font-weight: 800; color: var(--ink); margin: 18px 0 10px; display: block; }

.result-card { background: var(--ink); color: #fff; border-radius: 20px; padding: 28px 20px; text-align: center; position: relative; overflow: hidden; }
.result-card::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: var(--primary); top: -120px; left: -90px; opacity: .9; }
.result-card > * { position: relative; z-index: 1; }
.result-level { font-family: "Plus Jakarta Sans", sans-serif; font-size: 76px; font-weight: 800; line-height: 1; margin: 10px 0 6px; }
.result-name { font-size: 20px; font-weight: 800; }
.result-card p { opacity: .8; max-width: 460px; margin: 8px auto 0; font-size: 15px; }
.cefr-scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 20px 0 0; direction: ltr; }
.cefr-scale div { text-align: center; padding: 7px 0; border-radius: 8px; background: rgba(255,255,255,.1); font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 11.5px; color: rgba(255,255,255,.55); }
.cefr-scale div.past { background: rgba(255,255,255,.22); color: #fff; }
.cefr-scale div.on { background: var(--primary); color: #fff; }
.skill-bars { display: grid; gap: 14px; }
.skill-bar .top { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.skill-bar .track { height: 8px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.skill-bar .fill { height: 100%; background: var(--teal); border-radius: 6px; }

.notice { background: var(--primary-soft); border-radius: 12px; padding: 13px 16px; font-size: 14.5px; color: var(--text); }
.notice.violet { background: var(--violet-soft); }
.notice.ok { background: var(--ok-soft); }
.notice.teal { background: var(--teal-soft); }

/* ---------------- Products ---------------- */
.product { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: 100%; }
.product .cover { height: 124px; position: relative; display: flex; align-items: flex-end; padding: 14px 16px; color: #fff; overflow: hidden; }
.product .cover::after { content: ""; position: absolute; width: 170px; height: 150px; border-radius: 50% 50% 50% 8px; background: rgba(255,255,255,.16); top: -60px; left: -40px; }
.product .cover .lv { font-family: "Plus Jakarta Sans", sans-serif; font-size: 28px; font-weight: 800; position: relative; z-index: 1; }
.product .cover .type { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.95); color: #16161d; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 6px; z-index: 1; }
.product .body { padding: 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.product h3 { margin: 0; font-size: 17px; }
.product .meta { display: flex; gap: 5px; flex-wrap: wrap; }
.product p { font-size: 14.5px; }
.product .price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.price { font-weight: 900; font-size: 17px; color: var(--ink); line-height: 1.3; }
.price small { font-weight: 600; font-size: 12px; color: var(--muted); }
.price del { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.product.soon .cover { filter: saturate(.45); }

/* ---------------- Library ---------------- */
.book { display: flex; gap: 14px; align-items: flex-start; }
.book .spine { width: 56px; height: 78px; border-radius: 4px 10px 10px 4px; flex: none; display: grid; place-items: center; color: #fff; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 12.5px; box-shadow: inset 5px 0 0 rgba(0,0,0,.15); }
.book h3 { font-size: 16px; margin: 0 0 6px; direction: ltr; text-align: right; unicode-bidi: plaintext; font-family: "Plus Jakarta Sans", sans-serif; }
.book p { font-size: 14px; margin: 6px 0 8px; }
.book .meta { display: flex; gap: 5px; flex-wrap: wrap; }
.book-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; min-height: 40px; }

/* ---------------- Forms ---------------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; color: var(--ink); margin-bottom: 8px; font-size: 15px; }
.input { width: 100%; min-height: 52px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 0 16px; font: inherit; font-size: 16px; transition: border-color .15s; }
textarea.input { padding: 12px 16px; min-height: 96px; resize: vertical; }
select.input { appearance: auto; }
.input:focus { outline: none; border-color: var(--ink); }
.input.err { border-color: var(--bad); }
.err-msg { color: var(--bad); font-size: 13.5px; margin: 4px 0; min-height: 1px; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choice-grid.days { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 640px) { .choice-grid.days { grid-template-columns: repeat(8, 1fr); } .choice-grid.times { grid-template-columns: repeat(4, 1fr); } }
.choice { border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; min-height: 54px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-weight: 800; font-size: 14px; line-height: 1.4; }
.choice small { font-weight: 500; font-size: 12px; color: var(--muted); }
.choice.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.choice.selected small { color: var(--primary); }
.lock-card { text-align: center; padding: 32px 22px; }
.lock-card .ico { margin: 0 auto 14px; width: 70px; height: 70px; border-radius: 22px; }
.lock-card .ico svg { width: 32px; height: 32px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check-list li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-weight: 900; font-size: 12px; margin-top: 4px; }
.booking-layout { display: grid; gap: 18px; padding-bottom: 32px; }
@media (min-width: 900px) { .booking-layout { grid-template-columns: 1.35fr .65fr; align-items: start; } .booking-layout aside { position: sticky; top: 90px; } }
.contact-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-wa { background: #25d366; color: #fff; }
.btn-tg { background: #2aabee; color: #fff; }

/* ---------------- Cart sheet ---------------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 10, 20, .45); z-index: 90; animation: fade .2s; }
.sheet { position: fixed; z-index: 100; right: 0; left: 0; bottom: 0; max-height: 86vh; background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px 18px calc(18px + var(--safe-b)); display: flex; flex-direction: column; animation: up .25s cubic-bezier(.2,.8,.2,1); }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 12px; font-size: 19px; }
@media (min-width: 900px) { .sheet { right: auto; top: 0; width: 420px; max-height: none; border-radius: 0 22px 22px 0; animation: side .25s; } .sheet .grab { display: none; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes side { from { transform: translateX(-100%); } }
@keyframes fade { from { opacity: 0; } }
.cart-items { flex: 1; overflow: auto; display: grid; gap: 10px; align-content: start; }
.cart-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg-2); border-radius: 12px; padding: 12px 14px; }
.cart-item button { background: none; border: none; color: var(--bad); cursor: pointer; font-weight: 700; font-size: 13px; min-height: 40px; }
.cart-total { display: flex; justify-content: space-between; margin: 14px 0; font-size: 16px; }

/* ---------------- CTA & footer ---------------- */
.cta-band { background: var(--primary); color: #fff; border-radius: 20px; padding: 28px 22px; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 240px; height: 210px; border-radius: 50% 50% 8px 50%; background: rgba(255,255,255,.14); bottom: -90px; left: -50px; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(22px, 5vw, 32px); }
.cta-band p { margin: 0 0 18px; opacity: .9; }
.cta-band .btn { background: #fff; color: var(--primary); }
@media (min-width: 900px) { .cta-band { padding: 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; } .cta-band p { margin: 0; } }
.site-footer { background: var(--bg-2); padding: 34px 0 28px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; gap: 22px; }
.footer-grid h4 { color: var(--ink); margin: 0 0 8px; font-size: 15px; }
.footer-links { display: grid; gap: 4px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 16px; font-size: 13px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* Reveal */
.reveal { transition: opacity .55s, transform .55s cubic-bezier(.2,.8,.2,1); }
.reveal.pre { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: reduce) { .reveal.pre { opacity: 1; transform: none; } * { animation: none !important; transition: none !important; } }

/* Demo build */
.demo-bar { background: var(--ink); color: var(--bg); font-size: 13px; text-align: center; padding: 6px 16px; line-height: 1.6; }
body.demo .print-btn { display: none !important; }
@media print { .site-header, .tabbar, .action-bar, .site-footer, .no-print { display: none !important; } body { padding: 0; } }
