/* ==========================================================================
   Landing page only. Apple-grade restraint (docs/DESIGN-APPLE.md §7): one focal object (the sentence card) on a calm
   aurora; big quiet numbers; khatam tiles only where they mean progress (roadmap, final call to action).
   Rules: the h1 (LCP) is visible from the first paint; transform/opacity animations only; every loop is gated by
   motion tier (html[data-motion]); tier 0 = calm static page; logical properties (RTL-first).
   ========================================================================== */

/* ---- one type scale for the whole landing (founder 2026-10-22: the calm, light type of the app band everywhere) ----
   Every size on this page comes from these; Persian reading text never goes under 15px, secondary lines under 14px.
   Weights stay light (650 for titles, 700 for the hero); Latin tracking only in the English UI (Persian is never
   letter-spaced). */
:root {
  --lp-hero: clamp(1.875rem, 2.1vw + 1.2rem, 3rem);        /* 30 -> 48: the h1 */
  --lp-h2: clamp(1.375rem, 0.9vw + 1.05rem, 1.875rem);     /* 22 -> 30: every section title (as the app band) */
  --lp-h3: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);        /* 16 -> 18: card and sub-section titles */
  --lp-lead: clamp(1rem, 0.25vw + 0.93rem, 1.125rem);      /* 16 -> 18: the hero lead */
  --lp-body: clamp(0.9375rem, 0.1vw + 0.9rem, 1rem);       /* 15 -> 16: section intros, card text */
  --lp-small: 0.875rem;                                     /* 14: secondary lines, meta */
  --lp-stat: clamp(1.5rem, 1.3vw + 1rem, 2.125rem);         /* 24 -> 34: the counters */
  --lp-w-title: 650;
}

/* ---- vertical rhythm (founder 2026-10-22: one continuous story, not islands) ---------------------------------------
   app.css gives every .section 64-128px top and bottom, so two sections stood up to 256px apart; on the landing a
   section is 36-64px each side (72-128px between two), the heads sit closer to their content, the hero and the stats
   band end sooner and the final call to action follows the FAQ closely. */
.section { padding-block: clamp(36px, 4.5vw, 64px); }
.section-head { margin-block-end: clamp(20px, 2.4vw, 32px); }
.hero { padding-block-end: clamp(28px, 4vw, 56px); }

/* ---- hero: copy intro (pure CSS; starts visible so the LCP paint never waits) ---------------------------------- */
.hero-grid { position: relative; }
.hero-copy { position: relative; z-index: 1; }
.hero-title .hw { display: inline-block; }
html:not([data-motion="0"]) .hero-title .hw { animation: hw-rise 1000ms var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms + 60ms); }
html[data-motion="1"] .hero-title .hw { animation: hw-fade 500ms var(--ease-out) both; animation-delay: 0ms; }
.hero-title .accent { white-space: nowrap; }
html:not([data-motion="0"]) .eyebrow, html:not([data-motion="0"]) .hero-lead, html:not([data-motion="0"]) .hero-in {
  animation: fade-up 900ms var(--spring) both;
}
html:not([data-motion="0"]) .hero-lead { animation-delay: 320ms; }
html:not([data-motion="0"]) .hero-cta.hero-in { animation-delay: 420ms; }
html:not([data-motion="0"]) .hero-kids.hero-in { animation-delay: 480ms; }

/* the kids door under the CTAs: a compact warm chip (smaller and lighter than the two CTAs, not the old big sun pill) */
.hero-kids { margin: 16px 0 0; }
.kids-chip { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; padding-block: 4px; padding-inline: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--tile-sun) 14%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tile-sun) 42%, transparent), var(--e1);
  color: var(--ink); text-decoration: none; font-size: var(--fs-sm); line-height: 1.4; touch-action: manipulation;
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-2) var(--ease-std); }
.kids-chip .kid-sun { inline-size: 30px; block-size: 30px; flex: none; }
.kids-chip b { font-weight: 700; }
.kids-chip small { color: var(--ink-2); font-size: var(--fs-xs); font-weight: 500; margin-inline-start: 2px; }
.kids-chip > .ic { inline-size: 14px; block-size: 14px; color: var(--ink-2); flex: none; }
.kids-chip:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .kids-chip:hover { background: color-mix(in srgb, var(--tile-sun) 24%, var(--card)); } }
.kids-chip:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
/* the sun face (core/_kids_sun.html), the same drawing as the dashboard's kids door */
.kid-sun { overflow: visible; }
.kid-sun .ks-rays { fill: none; stroke: var(--tile-sun); stroke-width: 3; stroke-linecap: round; }
.kid-sun .ks-sun { fill: var(--tile-sun); stroke: var(--tile-sun-ledge); stroke-width: 1.5; }
.kid-sun .ks-eye { fill: #2b1d05; }
.kid-sun .ks-cheek { fill: #ff7aa8; opacity: 0.75; }
.kid-sun .ks-smile { fill: none; stroke: #2b1d05; stroke-width: 2; stroke-linecap: round; }

/* ---- hero: stage (the sentence card materialises: rise + scale together, Apple "materialize, don't just fade") --- */
.hero-stage { position: relative; display: grid; place-items: center; }
.hero-card { position: relative; z-index: 1; }
/* The hero's glass (the eyebrow and the demo card). A backdrop blur over the moving aurora / WebGL glaze is re-rendered on
   every frame of the glaze: the biggest GPU cost on the page. Over an already soft background the frost adds almost
   nothing, so by default the glass is a denser fill without blur; real frost only on a desktop with a working GPU (fine
   pointer, motion tier 2+, and hero-shader.js has not marked html.gpu-weak). */
.hero .eyebrow, .hero .scard { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--card) 90%, transparent); }
@media (hover: hover) and (pointer: fine) {
  html:is([data-motion="2"], [data-motion="3"]):not(.gpu-weak) .hero :is(.eyebrow, .scard) {
    -webkit-backdrop-filter: var(--mat-blur); backdrop-filter: var(--mat-blur); background: var(--mat-card); }
}
html[data-motion="2"] .hero-card, html[data-motion="3"] .hero-card { animation: card-in 1100ms var(--spring) 260ms backwards; }
html[data-motion="1"] .hero-card { animation: hw-fade 500ms var(--ease-out) backwards; }
@media (max-width: 959px) { .hero-grid { gap: 32px; } }

/* ---- real content counters: big quiet numbers, no boxes ------------------------------------------------------- */
.stats { padding-block: clamp(16px, 2.5vw, 32px); }
.stats-wrap { display: grid; gap: 18px; }
.stats-t { font-family: var(--f-body); font-size: var(--fs-sm); font-weight: 650; color: var(--ink-2); }
.stats-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; margin: 0; }
.stat-i { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding-inline-start: 14px; border-inline-start: 1px solid var(--sep); }
.stat-i dd { margin: 0; }
.stat-i .count { display: block; font-family: var(--f-display); font-weight: 750; font-size: clamp(1.75rem, 2.2vw + 1rem, 2.75rem); line-height: 1.15; color: var(--ink); }
.stat-i dt { color: var(--ink-2); font-weight: 500; font-size: var(--fs-sm); line-height: 1.5; }
@media (min-width: 820px) {
  .stats-wrap { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 40px; }
  .stats-t { max-inline-size: 7em; line-height: 1.5; }
  .stats-in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---- roadmap: khatam tiles light up once, in order, when seen -------------------------------------------------------------- */
.rnode { position: relative; z-index: 1; inline-size: 58px; justify-self: center; transition: transform 420ms var(--spring); }
.rnode b { position: relative; margin-block-end: 8%; font-size: var(--fs-base); font-weight: 800; color: var(--ti); transition: color 300ms; }
.rnode .k-face, .rnode .k-ledge { transition: fill 320ms var(--ease-std), stroke 320ms var(--ease-std); }
.step.lit .rnode { --tf: var(--tile-done); --ts: var(--tile-done); --tl: var(--tile-done-ledge); --ti: var(--on-done, #fff); transform: scale(1.08); }
.step.soon .rnode { --tf: var(--paper-2); --ts: var(--line); --tl: var(--hair); --ti: var(--ink-2); }
.step.soon .rnode .k-face { stroke-dasharray: 10 8; stroke-width: 4; }
.step.soon.lit .rnode { --tf: var(--paper-2); --ts: var(--line); --tl: var(--hair); --ti: var(--ink-2); transform: none; }
html[data-motion="0"] .step.lit .rnode { transform: none; }
@media (min-width: 900px) { .step .rnode { grid-column: 2; grid-row: 1; } }
.road-fill { background: linear-gradient(to bottom, var(--indigo), var(--teal-deco)); }

/* ---- exam dial: the label always says practice estimate, not official ------------------------------------------ */
.dial-num small[dir="rtl"] { font-weight: 600; font-size: var(--fs-2xs); line-height: 1.45; margin-block-start: 4px; }

/* ---- final call to action -------------------------------------------------------------------------------------- */
.cta-final { padding-block: clamp(16px, 2.5vw, 32px) 0; }
.cta-panel {
  position: relative; overflow: hidden; margin-inline: 0; display: grid; justify-items: center; text-align: center; gap: 16px;
  padding: clamp(36px, 6vw, 72px) clamp(18px, 4vw, 48px);
  background: radial-gradient(110% 80% at 50% 0%, rgb(79 82 224 / 0.55) 0%, transparent 62%), radial-gradient(70% 60% at 100% 100%, rgb(34 184 171 / 0.35), transparent 70%), #000;
}
.cta-panel h2 { font-size: var(--fs-h2-mkt); color: #fff; max-inline-size: 16em; }
.cta-panel p { color: var(--ink-2); max-inline-size: 34em; font-size: clamp(var(--fs-md), 0.2vw + 0.95rem, 1.1875rem); text-wrap: balance; }
.cta-panel .hero-cta { justify-content: center; margin-block-start: 8px; }
.cta-tiles { list-style: none; margin: 0 0 4px; padding: 0; display: flex; gap: clamp(4px, 1.6vw, 14px); align-items: end; }
.cta-tiles li { display: grid; }
.cta-tiles .khatam { inline-size: clamp(40px, 8vw, 56px); --tf: rgb(255 255 255 / 0.08); --ts: rgb(255 255 255 / 0.2); --tl: rgb(255 255 255 / 0.1); --ti: #d1d1d6; }
.cta-tiles b { position: relative; margin-block-end: 8%; font-weight: 800; font-size: clamp(var(--fs-2xs), 1.3vw, var(--fs-sm)); color: var(--ti); }
.cta-tiles li:first-child .khatam { --tf: var(--tile-sun); --ts: var(--tile-sun); --tl: var(--tile-sun-ledge); --ti: var(--on-sun); }
html.js:not([data-motion="0"]) .cta-panel:not(.is-in) .cta-tiles li { opacity: 0; transform: translateY(14px) scale(0.9); }
.cta-tiles li { transition: opacity 500ms var(--ease-out), transform 700ms var(--spring); transition-delay: calc(var(--i, 0) * 70ms + 160ms); }
html.ready-all .cta-tiles li { opacity: 1 !important; transform: none !important; }
.cta-final + .site-footer { padding-block-start: 44px; }

/* roadmap badges: the generic .badge (a numbered circle in app.css) clipped "در نسخه‌ی اول" to "در" */
.scard-step .badge { display: inline-block; inline-size: auto; block-size: auto; border-radius: 999px; padding: 1px 10px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.6;
  background: color-mix(in srgb, var(--teal-deco) 16%, transparent); color: var(--teal); }
.scard-step .badge.soon { background: var(--paper-2); color: var(--ink-2); }
@media (max-width: 480px) { .dials { gap: 14px; } .dial { inline-size: min(200px, 42vw); } .dial-num small { font-size: var(--fs-2xs); } }

/* ---- keyframes ------------------------------------------------------------------------------------------------- */
/* transform + opacity only: the old blur(6px) on every word of the h1 gave each word its own filtered layer, stuttered on
   weak GPUs and left smeared text on some (perf audit 2026-10-28) */
@keyframes hw-rise { from { opacity: 0.12; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }
@keyframes hw-fade { from { opacity: 0.2; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: none; } } /* no blur: a large surface (fixing-motion-performance §7) */

/* ---- hero demo card: three English micro-tasks (home.js §10) ----------------------------------------------------
   Panels share one grid cell, so switching tasks never changes the card's height (no layout shift). */
.hero-demo { display: grid; gap: 14px; }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo-title { font-family: var(--f-body); font-size: var(--fs-sm); font-weight: 650; color: var(--ink-2); }
.demo-xp { font-weight: 700; font-size: var(--fs-sm); color: var(--indigo); font-variant-numeric: tabular-nums; padding: 2px 10px; border-radius: 999px; background: var(--tint); }
/* segmented control with a sliding thumb (iOS) */
.seg-ctl { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.seg-ctl::before { content: ""; position: absolute; inset-block: 2px; inset-inline-start: 2px; inline-size: calc((100% - 4px) / var(--n, 3)); border-radius: 8px;
  background: var(--card); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12), 0 0 0 0.5px rgb(0 0 0 / 0.04); transform: translateX(calc(var(--seg, 0) * -100%));
  transition: transform var(--dur-3) var(--spring); }
:root[data-theme="dark"] .seg-ctl::before { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-ctl::before { background: #636366; } }
.seg-ctl button { position: relative; z-index: 1; border: 0; background: none; min-block-size: 36px; padding: 4px 8px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.seg-ctl button[aria-selected="true"] { font-weight: 650; }
@media (pointer: coarse) { .seg-ctl button { min-block-size: 40px; } }
.demo-panels { display: grid; touch-action: pan-y; }
.demo-panel { grid-area: 1 / 1; display: grid; gap: 10px; align-content: start; opacity: 0; visibility: hidden; transform: translateX(-12px);
  transition: opacity var(--dur-2) var(--ease-std), transform var(--dur-3) var(--spring), visibility 0s linear var(--dur-2); }
.demo-panel.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.demo-q { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.demo-fa { font-size: var(--fs-md); font-weight: 650; }
/* build: the answer line + the tile pool (English, LTR) */
.demo-line { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; min-block-size: 56px; padding: 8px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--ink) 5%, transparent); box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow var(--dur-2), background-color var(--dur-2); }
.demo-line:empty::before { content: "⋯"; color: var(--ink-2); opacity: 0.5; padding-inline: 8px; line-height: 40px; }
.demo-line.ok { background: color-mix(in srgb, var(--ok) 10%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 60%, transparent); }
.demo-pool { display: flex; flex-wrap: wrap; gap: 8px; min-block-size: 44px; }
.wtile, .dopt, .dword { font: 600 var(--fs-md)/1.3 "Atkinson Next", var(--f-body); color: var(--ink); background: var(--card); border: 0; cursor: pointer;
  box-shadow: var(--e1), inset 0 0 0 1px var(--hair); transition: transform var(--dur-2) var(--spring), box-shadow var(--dur-2), background-color var(--dur-2), color var(--dur-2), opacity var(--dur-2); }
.wtile { min-block-size: 40px; padding: 6px 14px; border-radius: 12px; }
@media (pointer: coarse) { .wtile { min-block-size: 44px; } }
.wtile:active:not(:disabled), .dopt:active:not(:disabled), .dword:active:not(:disabled) { transform: scale(0.95); transition-duration: var(--dur-1); }
@media (hover: hover) and (pointer: fine) { .wtile:hover:not(:disabled), .dopt:hover:not(:disabled), .dword:hover:not(:disabled) { box-shadow: var(--e1), inset 0 0 0 1.5px var(--indigo); } }
.demo-line .wtile { background: var(--indigo); color: var(--on-indigo); box-shadow: none; }
.demo-line .wtile.ok { background: var(--ok); color: #fff; }
:root[data-theme="dark"] .demo-line .wtile.ok { color: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .demo-line .wtile.ok { color: #000; } }
.wtile:disabled, .dopt:disabled, .dword:disabled { cursor: default; }
/* listen */
.demo-listen { display: flex; align-items: center; gap: 12px; }
.demo-play.play-btn { inline-size: 52px; block-size: 52px; min-inline-size: 52px; padding: 0; border: 0; border-radius: 50%; background: var(--indigo); color: var(--on-indigo); flex: none; }
.demo-play .ic { inline-size: 22px; block-size: 22px; margin-inline-start: 2px; }
.demo-play.playing { box-shadow: 0 0 0 6px var(--tint); }
.demo-opts { display: grid; gap: 8px; }
.dopt { min-block-size: 44px; padding: 8px 14px; border-radius: 12px; text-align: start; }
.dopt.ok { background: color-mix(in srgb, var(--ok) 14%, var(--card)); box-shadow: inset 0 0 0 1.5px var(--ok); }
.dopt.no { opacity: 0.45; text-decoration: line-through; text-decoration-color: var(--bad); }
/* spot the mistake */
.demo-sent { display: flex; flex-wrap: wrap; gap: 6px; }
.dword { min-block-size: 44px; padding: 6px 12px; border-radius: 10px; box-shadow: none; background: transparent; text-decoration: underline dotted color-mix(in srgb, var(--ink-2) 50%, transparent); text-underline-offset: 5px; }
.dword.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); text-decoration: none; }
html:not([data-motion="0"]) .dword.ok { animation: flip-in 520ms var(--spring); }
/* feedback line: fixed height (two lines) so messages never shift the card */
.demo-msg { min-block-size: calc(2 * 1.6em); font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-2); font-weight: 500; }
.demo-msg.win { color: var(--ok); }
.demo-msg.no { color: var(--bad); }
.nope { animation: nope 360ms var(--ease-std); }
html[data-motion="0"] .demo-panel { transition: none; transform: none; }
@keyframes nope { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes flip-in { from { transform: rotateX(90deg); opacity: 0.2; } to { transform: none; opacity: 1; } }

/* ---- how you learn here (#how): three steps that are doors, then the tools beside the path (#tools) ----------- */
.how-steps { display: grid; gap: 16px; }
@media (min-width: 760px) { .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.how-step { display: block; color: inherit; text-decoration: none; touch-action: manipulation; }
.how-step .how-go { position: absolute; inset-block-start: clamp(22px, 2.6vw, 32px); inset-inline-end: clamp(22px, 2.6vw, 32px); inline-size: 16px; block-size: 16px;
  color: var(--ink-2); opacity: 0.7; transition: color var(--dur-2) var(--ease-std), opacity var(--dur-2) var(--ease-std); }
.how-step h3 { transition: color var(--dur-2) var(--ease-std); }
@media (hover: hover) and (pointer: fine) { .how-step:hover h3, .how-step:hover .how-go { color: var(--indigo); opacity: 1; } }
.how-step:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
.how-tools { display: grid; gap: 20px 56px; align-items: start; margin-block-start: clamp(40px, 5vw, 64px); }
@media (min-width: 900px) { .how-tools { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.how-tools-head h3 { font-size: var(--fs-xl); line-height: 1.4; margin: 0 0 8px; }
.how-tools-head p { color: var(--ink-2); line-height: 1.8; margin: 0; max-inline-size: 30em; }
.tool-list { border-radius: var(--r-lg); box-shadow: var(--e1); }
.tool-list > li > a { gap: 14px; padding: 12px 16px; }
.tool-list > li:not(:first-child) > a::before { inset-inline: 66px 0; }
.tool-list > li > a > .ic:first-child { inline-size: 36px; block-size: 36px; padding: 8px; border-radius: 10px; background: var(--tint); }
.tl-t { flex: 1; min-inline-size: 0; display: grid; gap: 1px; }
.tl-t b { font-weight: 650; }
.tl-t small { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; }
.tool-list .tl-go { inline-size: 14px; block-size: 14px; color: var(--ink-2); opacity: 0.6; }

/* ---- the path (#roadmap): levels / skills / exams behind one segmented control (home.js §9) ---------------------
   On wide screens the panels share one grid cell, so a switch never moves the page; the inactive ones are inert and
   invisible (on narrow screens they also leave the layout, see below).
   Without JS the first panel (levels) is the visible one. */
.path-tabs { --n: 3; max-inline-size: 440px; margin-block-end: clamp(20px, 3vw, 32px); }
.path-panels { display: grid; }
.path-panel { grid-area: 1 / 1; min-inline-size: 0; opacity: 0; visibility: hidden;
  transition: opacity var(--dur-2) var(--ease-std), visibility 0s linear var(--dur-2); }
.path-panel.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.path-panel:focus-visible { outline: 2px solid var(--indigo); outline-offset: 6px; border-radius: var(--r-lg); }
.path-panel:not(.on) * { animation-play-state: paused !important; }
html[data-motion="0"] .path-panel { transition: none; }
/* narrow screens: the panels differ a lot in height (the vertical path is the tallest), so the inactive ones leave the
   layout instead of sharing the cell; the page then moves only after the user's own tap (not counted as layout shift) */
@media (max-width: 899px) { .path-panel:not(.on) { display: none; } }
.path-intro { color: var(--ink-2); margin: 0 0 16px; max-inline-size: 42rem; font-size: var(--fs-md); line-height: 1.8; }
/* levels: a vertical path on phones, one row of five on wide screens; the tiles light up once, in order, when seen */
.path-panel .road { gap: 12px; }
.path-panel .scard-step { padding: 16px 18px; }
.path-panel .road-fill { transition: transform 1400ms var(--ease-out) 150ms; }
.path-panel .step .rnode, .path-panel .step .rnode b, .path-panel .step .rnode .k-face, .path-panel .step .rnode .k-ledge { transition-delay: calc(var(--i, 0) * 180ms + 150ms); }
@media (min-width: 900px) {
  .path-panel .road { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .path-panel .road::before, .path-panel .road-fill { inset-block: 28px auto; inset-inline: 10%; inline-size: auto; block-size: 3px; }
  .path-panel .road-fill { transform-origin: right center; transform: scaleX(var(--fill, 0)); background: linear-gradient(to left, var(--indigo), var(--teal-deco)); }
  html[dir="ltr"] .path-panel .road-fill { transform-origin: left center; background: linear-gradient(to right, var(--indigo), var(--teal-deco)); }
  .path-panel .step { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 14px; padding-block: 0; justify-items: center; }
  .path-panel .step .rnode { grid-column: 1; grid-row: 1; }
  .path-panel .step .scard-step, .path-panel .step:nth-child(even) .scard-step { grid-column: 1; grid-row: 2; justify-self: stretch; align-self: stretch; }
  html:not(.js) .path-panel .road-fill, html[data-motion="0"] .path-panel .road-fill, html.ready-all .path-panel .road-fill { transform: none; }
}
/* phones: a level's three focus points run on as one line of text, so the vertical path stays short */
@media (max-width: 899px) {
  .path-panel .scard-step ul { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 0; list-style: none; color: var(--ink-2); }
  .path-panel .scard-step li { margin: 0; }
  .path-panel .scard-step li:not(:last-child)::after { content: "·"; margin-inline-start: 14px; color: var(--line); }
}
/* skills: two small tiles a row on phones, three on wide screens */
.path-panel .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1000px) { .path-panel .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 639px) {
  .path-panel .tile { grid-template-rows: 84px auto; gap: 12px; padding: 10px 10px 16px; border-radius: var(--r-lg); }
  .path-panel .tile h3 { flex-wrap: wrap; gap: 0 6px; font-size: var(--fs-md); padding-inline: 4px; }
  .path-panel .tile p { padding-inline: 4px; }
  .path-panel .write, .path-panel .gram { font-size: var(--fs-sm); gap: 4px; }
  .path-panel .gram .gap { min-inline-size: 30px; }
  .path-panel .flip { inline-size: 104px; block-size: 60px; }
  .path-panel .flip b { font-size: var(--fs-sm); }
  .path-panel .wave { block-size: 56px; gap: 4px; }
}
/* exams: one card; the score dial always says practice estimate, not official */
.exam-card { background: var(--card); border-radius: var(--r-xl); box-shadow: var(--e1); padding: clamp(20px, 3.4vw, 44px); gap: 28px; }
.exam-t { font-size: var(--fs-xl); line-height: 1.4; margin: 0 0 8px; }
.exam-lead { color: var(--ink-2); line-height: 1.8; margin: 0; }
.exam-card .tabs { margin-block: 18px 16px; }
.exam-card .task-list li { background: var(--paper); box-shadow: inset 0 0 0 0.5px var(--sep); }
@media (max-width: 480px) { .exam-card .dials { gap: 12px; } .exam-card .dial { inline-size: min(150px, 36vw); } }

/* the segmented control's thumb moves toward the inline end in English too (it starts at the inline start) */
html[dir="ltr"] .seg-ctl::before { transform: translateX(calc(var(--seg, 0) * 100%)); }

/* ---- the app band (#app, core/_app_section.html), right after the stats --------------------------------------------
   A quiet product band, not a second hero (founder 2026-10-22): modest type, compact value rows, small badges, a small
   phone drawn in CSS that fades out toward the panel's bottom edge. The first badge is the primary (solid), the rest
   are quiet outlines. QR on desktop only. Persian is never letter-spaced; tracking applies to the English UI only. */
.appband { padding-block-start: clamp(8px, 1.5vw, 16px); }
.appband-panel { position: relative; overflow: hidden; display: grid; gap: 20px; padding: clamp(22px, 3vw, 40px) clamp(20px, 3.4vw, 48px) 0;
  border-radius: var(--r-xl); box-shadow: var(--e1);
  background: radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--teal-deco) 12%, transparent), transparent 70%),
              radial-gradient(70% 70% at 0% 0%, color-mix(in srgb, var(--indigo) 10%, transparent), transparent 70%), var(--card); }
.appband-copy { display: grid; justify-items: start; gap: 10px; align-content: center; min-inline-size: 0; padding-block-end: clamp(4px, 2vw, 36px); }
.appband-copy .kicker { color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
.appband-copy h2 { font-size: var(--lp-h2); line-height: 1.35; font-weight: var(--lp-w-title); margin: 0; text-wrap: balance; }
html[lang="en"] .appband-copy h2 { letter-spacing: -0.015em; line-height: 1.2; }
.appband-lead { color: var(--ink-2); font-size: var(--fs-base); line-height: 1.75; margin: 0; max-inline-size: 34em; }
.appband-feats { list-style: none; margin: 2px 0 4px; padding: 0; display: grid; gap: 8px; }
.appband-feats li { display: flex; gap: 10px; align-items: center; }
.appband-feats .ic { flex: none; inline-size: 26px; block-size: 26px; padding: 5px; border-radius: 8px; background: var(--tint); color: var(--indigo); stroke-width: 2; }
.appband-feats span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-inline-size: 0; }
.appband-feats b { font-size: var(--fs-sm); font-weight: 600; line-height: 1.6; }
.appband-feats small { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.6; }
.appband-get { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-block-start: 4px; }
.appband-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.appband-badges .appbadge { min-block-size: 44px; gap: 8px; padding-block: 4px; padding-inline: 10px 14px; border-radius: 12px; }
.appband-badges .appbadge-ic { inline-size: 20px; block-size: 20px; }
.appband-badges .appbadge-t small { font-size: var(--fs-xs); line-height: 1.25; }
.appband-badges .appbadge-t b { font-size: var(--fs-sm); font-weight: 650; }
.appband-badges .appbadge:not(.is-primary) { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sep); }
.appband-badges .appbadge:not(.is-primary) .appbadge-ic { color: var(--indigo); }
@media (hover: hover) and (pointer: fine) { .appband-badges .appbadge:not(.is-primary):hover { background: var(--paper-2); } .appband-badges .appbadge.is-primary:hover { background: var(--ink); opacity: 0.88; } }
/* the primary badge is the ink colour of the theme (black on light, white on dark), so it leads in both */
.appband-badges .appbadge.is-primary { background: var(--ink); color: var(--paper); box-shadow: none; }
.appband-badges .appbadge.is-primary .appbadge-ic { color: inherit; }
.appband-qr { display: flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; font-size: var(--fs-2xs); line-height: 1.4; white-space: nowrap; }
.appband-qr .qr { inline-size: 56px; block-size: 56px; flex: none; box-shadow: inset 0 0 0 1px var(--sep); }
.appband-copy > .pr-inside { font-size: var(--fs-xs); min-block-size: 36px; }
/* the phone: frame, island, our own screen (tokens, so it follows the theme) */
/* the phone is laid out at 250px and scaled down (--s); the frame fades out above the panel's edge (an intentional crop) */
.appband-visual { --s: 0.6; display: grid; justify-items: center; align-items: start; block-size: 230px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%); mask-image: linear-gradient(to bottom, #000 62%, transparent 98%); }
.mock { transform: scale(var(--s)); transform-origin: top center; margin-block-start: 2px;
  inline-size: 250px; aspect-ratio: 9 / 19; padding: 9px; border-radius: 46px; background: linear-gradient(150deg, #3a3a3f, #0d0d0f 60%);
  box-shadow: 0 40px 70px -30px rgb(20 20 60 / 0.45), inset 0 0 0 1.5px rgb(255 255 255 / 0.14); }
.mock-screen { position: relative; block-size: 100%; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 44px 14px 0;
  border-radius: 37px; background: var(--paper); color: var(--ink); font-size: 12px; line-height: 1.4; }
.mock-island { position: absolute; inset-block-start: 11px; left: 50%; translate: -50% 0; inline-size: 78px; block-size: 22px; border-radius: 999px; background: #000; }
.mock-bar { display: flex; align-items: center; gap: 6px; font-weight: 750; font-size: 13px; }
.mock-bar .mock-mark { inline-size: 20px; block-size: 20px; }
.mock-streak { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px 2px 6px; border-radius: 999px;
  background: color-mix(in srgb, #ff9f0a 16%, var(--card)); font-weight: 800; }
.mock-streak .ic { inline-size: 14px; block-size: 14px; color: #ff9f0a; }
.mock-path { position: relative; display: flex; justify-content: space-between; padding: 6px 4px; }
.mock-path::before { content: ""; position: absolute; inset-inline: 24px; inset-block-start: 50%; block-size: 3px; border-radius: 3px; background: var(--hair); }
.mock-path .khatam { inline-size: 44px; }
.mock-card { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: var(--e1); }
.mock-card-top { display: flex; align-items: center; justify-content: space-between; }
.mock-xp { font-weight: 800; font-size: 11px; color: #1d1d1f; background: var(--saffron); padding: 1px 8px; border-radius: 999px; }
.mock-sent { margin: 0; font: 600 14px/1.4 "Atkinson Next", var(--f-body); }
.mock-sent b { color: var(--ok); }
.mock-opts { display: flex; gap: 6px; }
.mock-opts span { padding: 3px 12px; border-radius: 10px; font: 600 12px/1.5 "Atkinson Next", var(--f-body); box-shadow: inset 0 0 0 1px var(--hair); opacity: 0.6; text-decoration: line-through; }
.mock-opts .ok { opacity: 1; text-decoration: none; background: color-mix(in srgb, var(--ok) 14%, var(--card)); box-shadow: inset 0 0 0 1.5px var(--ok); }
.mock-card .bar { block-size: 5px; }
.mock-card-2 { gap: 8px; }
.mock-line { display: block; block-size: 8px; border-radius: 4px; background: var(--paper-2); }
.mock-line.short { inline-size: 60%; }
.mock-card-2 { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; }
.mock-card-2 .ic { grid-row: span 2; inline-size: 30px; block-size: 30px; padding: 6px; border-radius: 9px; background: var(--tint); color: var(--indigo); }
.mock-tabs { margin-block-start: auto; margin-inline: -14px; display: flex; justify-content: space-around; padding: 10px 8px 18px; border-block-start: 0.5px solid var(--sep);
  background: color-mix(in srgb, var(--card) 85%, transparent); }
.mock-tabs .ic { inline-size: 20px; block-size: 20px; color: var(--ink-2); }
.mock-tabs .ic:first-child { color: var(--indigo); }
@media (min-width: 900px) {
  .appband-panel { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); align-items: end; column-gap: 32px; }
  .appband-visual { --s: 0.68; block-size: 320px; align-self: end; }
}
@media (max-width: 899px) { .appband-qr { display: none; } }

/* ---- kids (#kids): its own compact band, warm, with the sun face ------------------------------------------------- */
.kids-panel { display: grid; gap: 14px 28px; align-items: center; justify-items: start; padding: clamp(22px, 3.4vw, 40px);
  border-radius: var(--r-xl); box-shadow: var(--e1);
  background: radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--tile-sun) 22%, transparent), transparent 65%), var(--card); }
.kids-panel-sun { inline-size: 64px; block-size: 64px; }
.kids-panel-copy { display: grid; gap: 6px; min-inline-size: 0; }
.kids-panel-copy h2 { font-size: var(--fs-2xl); line-height: 1.35; margin: 0; }
.kids-panel-copy p { color: var(--ink-2); line-height: 1.8; margin: 0; max-inline-size: 40em; }
@media (min-width: 760px) {
  .kids-panel { grid-template-columns: auto minmax(0, 1fr) auto; }
  .kids-panel-sun { inline-size: 88px; block-size: 88px; }
}

/* ---- guides (#guides) and the newest other articles (#articles) --------------------------------------------------- */
.guides-more { display: grid; gap: 4px; margin-block-start: clamp(24px, 3vw, 36px); }
.guides-more h3 { font-size: var(--fs-sm); font-weight: 650; color: var(--ink-2); margin: 0; }
.guides-more ul { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 0 24px; }
@media (min-width: 980px) { .guides-more ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guides-more li a { display: flex; align-items: center; min-block-size: 48px; padding-block: 8px; border-block-end: 0.5px solid var(--sep);
  color: var(--ink); font-weight: 500; line-height: 1.6; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .guides-more li a:hover { color: var(--indigo); } }
.guides-more .pr-inside { justify-self: start; }

/* ---- the type scale applied (kept last so it wins over the component defaults above and in app.css / ui.css) ----- */
/* hero: a lighter, smaller h1; a calm lead; a quiet eyebrow; refined CTAs; the demo card as a product glimpse */
.hero h1 { font-size: var(--lp-hero); font-weight: 700; line-height: 1.32; margin-block: 18px 14px; }
html[lang="en"] .hero h1 { line-height: 1.14; letter-spacing: -0.028em; }
.hero h1 .accent { font-weight: 650; color: color-mix(in srgb, var(--indigo) 88%, var(--ink)); }
.hero-lead { font-size: var(--lp-lead); line-height: 1.85; max-inline-size: 31em; }
.hero .eyebrow { padding: 3px 12px; font-size: var(--fs-xs); font-weight: 500; box-shadow: inset 0 0 0 0.5px var(--sep); }
.hero-cta { margin-block-start: 24px; gap: 10px; }
.hero-cta .btn-lg, .cta-panel .btn-lg { min-block-size: 46px; padding-inline: 22px; font-size: var(--fs-base); }
.hero-kids { margin-block-start: 14px; }
.kids-chip { min-block-size: 38px; gap: 6px; padding-inline: 5px 12px; font-size: var(--fs-xs); }
.kids-chip .kid-sun { inline-size: 24px; block-size: 24px; }
.kids-chip small { font-size: var(--fs-xs); }
.kids-chip > .ic { inline-size: 12px; block-size: 12px; }
@media (pointer: coarse) { .kids-chip { min-block-size: 44px; } }
.hero-demo.scard { max-inline-size: 400px; padding: clamp(16px, 1.8vw, 22px); gap: 12px; }
.hero-demo .demo-title { font-size: var(--fs-xs); }
.hero-demo .demo-q { font-size: var(--lp-small); }
.hero-demo .demo-fa { font-size: var(--lp-body); }
.hero-demo .demo-xp { font-size: var(--fs-xs); }
.hero-demo .seg-ctl button { min-block-size: 32px; font-size: var(--fs-xs); }
.hero-demo .wtile, .hero-demo .dopt, .hero-demo .dword { font-size: var(--lp-body); }
.hero-demo .wtile { min-block-size: 38px; padding: 5px 10px; border-radius: 11px; font-size: 0.9375rem; }
.hero-demo .demo-pool, .hero-demo .demo-line { gap: 6px; }
.hero-demo .demo-line { min-block-size: 50px; }
.hero-demo .demo-line:empty::before { line-height: 34px; }
.hero-demo .demo-msg { font-size: var(--lp-small); }
@media (pointer: coarse) { .hero-demo .seg-ctl button { min-block-size: 40px; } .hero-demo .wtile { min-block-size: 44px; } }
/* phones: the hero gets more air above and the CTAs still sit well inside the first screen */
@media (max-width: 599px) {
  .hero { padding-block-start: calc(var(--header-h) + var(--safe-t) + 28px); }
  .hero h1 { margin-block: 16px 12px; }
}

/* sections: one title size and weight (as the app band), quieter intros, calm eyebrows */
.section-head h2, .kids-panel-copy h2, .cta-panel h2 { font-size: var(--lp-h2); font-weight: var(--lp-w-title); line-height: 1.35; }
html[lang="en"] :is(.section-head h2, .kids-panel-copy h2, .cta-panel h2, .appband-copy h2) { letter-spacing: -0.015em; line-height: 1.22; }
.section-head h2 { margin-block: 6px 10px; }
.section-head p, .path-intro, .exam-lead, .how-tools-head p, .kids-panel-copy p, .appband-lead, .cta-panel p { font-size: var(--lp-body); line-height: 1.85; }
.section .kicker, .appband-copy .kicker, .kids-panel-copy .kicker { color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
/* counters: confident, not huge */
.stat-i .count { font-size: var(--lp-stat); font-weight: 700; }
.stats-t { font-size: var(--fs-xs); }
/* how: lighter step cards and tool rows */
.how-step { padding: clamp(18px, 2vw, 26px); }
.how-step h3, .how-tools-head h3, .exam-t, .tile h3, .scard-step h3, .plan h3, .plans3 .plan h3, .guides .card h3, #guides .card h3 { font-size: var(--lp-h3); font-weight: var(--lp-w-title); }
.how-step p { font-size: var(--lp-small); line-height: 1.8; }
.how-step .bviz { block-size: 56px; margin-block-start: 14px; }
.how-tools-head h3 { margin-block-end: 6px; }
.tool-list > li > a { padding: 10px 14px; gap: 12px; }
.tool-list > li > a > .ic:first-child { inline-size: 30px; block-size: 30px; padding: 6px; border-radius: 9px; }
.tool-list > li:not(:first-child) > a::before { inset-inline-start: 56px; }
.tl-t b { font-size: var(--lp-body); font-weight: 600; }
.tl-t small { font-size: var(--lp-small); }
/* the path: smaller tiles and dials, lighter cards */
.path-panel .rnode { inline-size: 50px; }
@media (min-width: 900px) { .path-panel .road::before, .path-panel .road-fill { inset-block-start: 24px; } }
.path-panel .scard-step { padding: 14px 16px; }
.path-panel .scard-step p, .path-panel .scard-step ul, .tile p { font-size: var(--lp-small); }
.path-panel .tile { grid-template-rows: 96px auto; gap: 12px; padding: 12px 12px 18px; border-radius: var(--r-lg); }
.exam-card .dial { inline-size: min(150px, 38vw); }
.exam-card .dial-num b { font-size: clamp(1.375rem, 1.6vw + 1rem, 1.875rem); }
/* #fa, plans, guides, FAQ: the same quiet sizes */
.note { padding: 12px 16px; }
.note .en { font-size: var(--lp-body); }
.note p { font-size: var(--lp-small); }
.plans3 .plan { padding: 20px; gap: 10px; }
.plan .amount { font-size: var(--fs-xl); font-weight: 750; }
.plans3 .plan ul { font-size: var(--lp-small); }
#guides .card.link { padding: 16px 18px; }
#guides .card p { font-size: var(--lp-small); line-height: 1.75; }
.guides-more li a { font-size: var(--lp-body); }
.faq summary { font-size: var(--lp-body); font-weight: 600; min-block-size: 48px; padding-block: 12px; }
.faq details p { font-size: var(--lp-body); line-height: 1.85; }
/* kids band and app band: proportions to match */
.kids-panel-sun { inline-size: 56px; block-size: 56px; }
@media (min-width: 760px) { .kids-panel-sun { inline-size: 72px; block-size: 72px; } }
.kids-panel .btn-lg { min-block-size: 46px; padding-inline: 22px; font-size: var(--fs-base); }
.appband-feats small { font-size: var(--lp-small); }
/* the final call to action */
.cta-panel { gap: 12px; padding-block: clamp(32px, 5vw, 60px); }
.cta-tiles .khatam { inline-size: clamp(36px, 6vw, 48px); }
