/* Home page (site root, lesson-src/hub/index.html) only. hub.css stays the shared base of every site page (tokens, header, buttons,
 * the top bar); everything here is scoped to body.home so the other pages never change. English twin (/en/): <html dir="ltr">. */
.home{--panel:#E9EBF4;--soft:color-mix(in srgb,var(--accent) 9%,var(--surface));--soft-ink:var(--accent-press);--r:18px}
@media (prefers-color-scheme: dark){.home{--panel:#232750;--soft:color-mix(in srgb,var(--accent) 16%,var(--surface));--soft-ink:#C9CEFF}}
html[dir="ltr"] .home .app{direction:ltr}
.home{background:var(--bg)}
.home .skip{position:absolute;inset-inline-start:8px;top:-60px;z-index:50;background:var(--surface);color:var(--accent);font-weight:800;padding:10px 14px;border-radius:12px;text-decoration:none}
.home .skip:focus{top:8px}
.home a:focus-visible,.home button:focus-visible,.home input:focus-visible,.home select:focus-visible,.home [tabindex]:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

/* ---- header: brand + account (secondary; the page's one primary action is the hero button) */
.home .top{padding-block:14px 2px}
.home .brand{display:inline-flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none;font-size:23px;min-height:44px}
.home .brand::before{content:"";width:30px;height:30px;flex:none;border-radius:9px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%233346D3'/%3E%3Cpath d='M8 9v14M8 16h10M18 16l6-7M18 16l6 7' stroke='%23F2B705' stroke-width='3' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/cover}
.home .acct-chip,.home .acct-chip.primary{min-height:44px;border:1.5px solid color-mix(in srgb,var(--accent) 45%,var(--line));border-radius:12px;background:var(--surface);color:var(--accent);font-weight:800;font-size:14px;padding:4px 14px}
.home .acct-chip:not(.primary){color:var(--ink);border-color:var(--line)}
@media (hover:hover){.home .acct-chip:hover{border-color:var(--accent)}}
.home .kbl{border-width:1px;border-radius:12px}
.home .kbl button{min-height:42px}
.home .kbl button[aria-pressed="true"]{color:var(--on-accent)}
.home .top .acct{gap:8px}

/* ---- buttons */
.home .btn{border:0;border-radius:14px;min-height:48px;font-weight:800;width:auto;padding:8px 20px;transition:background-color .15s,color .15s}
.home .btn:active{transform:none}
.home .btn.primary{background:var(--accent);color:var(--on-accent);box-shadow:0 1px 2px rgba(20,26,80,.18)}
@media (hover:hover){.home .btn.primary:hover{background:var(--accent-press)}}
.home .btn.tonal,.home .btn.ghost{background:var(--soft);color:var(--soft-ink);border:0;min-height:44px}
@media (hover:hover){.home .btn.tonal:hover,.home .btn.ghost:hover{background:var(--accent);color:var(--on-accent)}}
.home .btn.cta.wait{filter:none;opacity:.85}

/* ---- section headings */
.home main{display:flex;flex-direction:column}
.home .sec{margin-top:36px}
.home .sec-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.home .sec-h{font-family:var(--f-display);font-weight:400;font-size:24px;line-height:1.45;margin:0}
.home .sec-p{margin:2px 0 14px;color:var(--muted);font-size:14.5px}
.home .sec-more,.home .p-more,.home .hero-2nd{color:var(--accent);font-weight:800;text-decoration:none;white-space:nowrap;display:inline-flex;align-items:center;gap:4px;min-height:44px;font-size:14.5px}
.home .sec-more::after,.home .p-more::after,.home .hero-2nd::after{content:"‹";font-size:1.25em;line-height:1}
html[dir="ltr"] .home .sec-more::after,html[dir="ltr"] .home .p-more::after,html[dir="ltr"] .home .hero-2nd::after{content:"›"}
@media (hover:hover){.home .sec-more:hover,.home .p-more:hover,.home .hero-2nd:hover{text-decoration:underline;text-underline-offset:4px}}

/* ---- hero: what it is, one real preview, one primary action */
.home .hero{display:grid;gap:18px;margin:14px 0 4px;grid-template-areas:"tx" "media" "facts"}
.home .hero-tx{grid-area:tx;min-width:0}
.home .eyebrow{margin:0 0 6px;color:var(--accent);font-weight:800;font-size:14px}
.home .hero h1{font-family:var(--f-display);font-weight:400;font-size:clamp(28px,7.4vw,46px);line-height:1.35;margin:0 0 10px;text-wrap:balance}
html[dir="ltr"] .home .hero h1{line-height:1.15;letter-spacing:-.01em}
.home .lede{margin:0 0 18px;color:var(--muted);font-size:16.5px;line-height:1.85;max-width:34em}
.home .hero-acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px}
.home .hero-acts .btn{font-size:16.5px;padding-inline:24px}
.home .hero-note{margin:8px 0 0;color:var(--muted);font-size:13.5px}
.home .hero-media{grid-area:media;margin:0}
.home .hm-stage{position:relative;padding-bottom:18px}
.home .hm-3d{display:block;border-radius:22px;overflow:hidden;background:#EEF0F7;border:1px solid var(--line);aspect-ratio:4/3;margin-inline-end:18%}
.home .hm-3d img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 22%}
.home .hm-ct{position:absolute;inset-inline-end:0;bottom:0;width:44%;border-radius:16px;overflow:hidden;background:#000;border:3px solid var(--surface);box-shadow:0 6px 20px rgba(17,19,41,.18)}
.home .hm-ct img{display:block;width:100%;height:auto;aspect-ratio:6/5;object-fit:cover}
.home .hm-tag{position:absolute;top:10px;inset-inline-start:10px;background:rgba(17,19,41,.72);color:#fff;font-size:12.5px;font-weight:800;line-height:1;padding:6px 9px;border-radius:99px;pointer-events:none}
.home .hm-3d{position:relative}
.home .hero-media figcaption{margin-top:10px;color:var(--muted);font-size:12.5px;line-height:1.6}
@media (hover:hover){.home .hm-3d:hover,.home .hm-ct:hover{border-color:var(--accent)}}
.home .facts{grid-area:facts;list-style:none;margin:6px 0 0;padding:0;display:grid;gap:10px}
.home .facts li{display:flex;gap:12px;align-items:flex-start}
.home .facts svg{flex:none;width:38px;height:38px;padding:8px;border-radius:12px;background:var(--soft);stroke:var(--accent);fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.home .facts span{font-size:14px;color:var(--muted);line-height:1.7}
.home .facts b{display:block;color:var(--ink);font-size:15px}
@media (min-width:860px){
  .home .hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"tx media" "facts media";column-gap:48px;row-gap:28px;margin-top:34px;align-items:center}
  .home .hero-tx{align-self:end}
  .home .facts{align-self:start;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .home .facts li{flex-direction:column;gap:8px}
  .home .hm-3d{aspect-ratio:6/7;margin-inline-end:16%}
  .home .hm-ct{width:44%;bottom:0}
  .home .hm-stage{padding-bottom:36px}
}
/* returning students (logged in, or a lesson started on this device): continue first, the introduction is not shown again */
.home .back-h{font-family:var(--f-display);font-weight:400;font-size:26px;line-height:1.5;margin:18px 0 10px}

/* ---- pack cards: real image, title, short text, real features, one action */
.home .packs{grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:16px}
.home .app.wide .packs{grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr))}
.home .skel{height:300px;border-radius:var(--r)}
.home .pack{position:relative;padding:0;gap:0;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;transition:border-color .15s,box-shadow .15s}
.home .pack.open{border-color:var(--line)}
@media (hover:hover){.home .pack.open:hover{border-color:color-mix(in srgb,var(--accent) 55%,var(--line));box-shadow:0 6px 18px rgba(27,32,64,.08)}}
.home .pack.hl{outline:3px solid var(--nerve);outline-offset:2px}
.home .p-media{display:block;aspect-ratio:16/10;background:var(--panel);overflow:hidden;margin:0}
.home .p-media img{display:block;width:100%;height:100%;object-fit:cover}
.home .p-media.ph{display:grid;place-items:center;color:color-mix(in srgb,var(--muted) 70%,transparent)}
.home .p-media.ph svg{width:56px;height:56px;fill:none;stroke:currentColor;stroke-width:1.4}
.home .p-body{display:flex;flex-direction:column;gap:8px;padding:14px 16px 16px;flex:1}
.home .p-body h3{margin:0;font-size:18px;line-height:1.5;font-weight:800;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.home .p-link{color:inherit;text-decoration:none;margin:0;padding:0;min-height:0;border-radius:4px}
.home .p-link::after{content:"";position:absolute;inset:0;z-index:0}
@supports selector(:has(a)){.home .p-link:focus-visible{outline:none}.home .pack:has(.p-link:focus-visible){outline:3px solid var(--focus);outline-offset:2px}}
.home .soon-list li.hl{outline:3px solid var(--nerve);outline-offset:2px}
@media (hover:hover){.home .pack:hover .p-link{color:var(--accent)}}
.home .p-desc{margin:0;color:var(--muted);font-size:14px;line-height:1.75;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home .feats{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.home .feats li{font-size:12.5px;font-weight:700;line-height:1;padding:6px 9px;border-radius:99px;background:var(--bg);color:var(--ink);border:1px solid var(--line)}
.home .p-prog{margin:0}
.home .p-acts{position:relative;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin-top:auto;padding-top:4px}
.home .p-acts .btn{flex:0 1 auto}
.home .badge{font-size:12px;line-height:1.9}
.home .badge.mem{background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--soft-ink)}
.home .badge.fav{background:color-mix(in srgb,var(--nerve) 22%,var(--surface));color:var(--nerve-ink)}
.home .notice{margin:0}
.home .cta-u{opacity:1}

/* ---- «به‌زودی»: quieter, after the open content */
.home .soon-sec .sec-h{font-size:21px;margin-bottom:10px;color:var(--muted)}
.home .soon-list{list-style:none;margin:0;padding:0;display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}
.home .soon-list li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;align-items:center;padding:10px 12px;border-radius:14px;background:color-mix(in srgb,var(--surface) 60%,transparent);border:1px dashed var(--line)}
.home .soon-ph{grid-row:span 2;width:40px;height:40px;border-radius:12px;background:var(--panel);display:grid;place-items:center;color:var(--muted)}
.home .soon-ph.img{overflow:hidden;width:56px}
.home .soon-ph.img img{display:block;width:100%;height:100%;object-fit:cover;filter:saturate(.75)}
.home .soon-ph svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5}
.home .soon-list h3{margin:0;font-size:15px;font-weight:800;line-height:1.5;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.home .soon-list p{margin:0;color:var(--muted);font-size:13px;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home .soon-list .when,.home .soon-list .prep,.home .soon-list .cd,.home .soon-list .s-acts,.home .soon-list .notice{grid-column:1/-1}
.home .soon-list .when{white-space:normal}
.home .soon-list .cd{margin-top:2px}
.home .cd li{background:var(--bg);border-color:var(--line)}
.home .cd b{font-size:17px}
.home .s-acts{display:flex}
.home .s-acts .btn{min-height:40px;font-size:14px;padding-inline:14px}
.home .soon-note{margin-top:12px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;text-align:start}
.home .soon-note p{font-size:14px}
.home .soon-note .btn{min-height:40px;font-size:14px}
.home .soon-note .notice{flex-basis:100%;text-align:start}

/* ---- «مسیر امروز» (hub.js renderToday): lighter card; first in the page for returning students */
.home .td-skel{border-radius:var(--r);margin:24px 0 0;height:64px}
.home .today{margin:24px 0 0;border:1px solid var(--line);border-radius:var(--r);padding:14px 16px 16px;gap:10px;background:var(--surface)}
.home.returning .today,.home.returning .td-skel{margin-top:0}
.home .today.all{border-color:color-mix(in srgb,var(--good) 50%,var(--line))}
.home .td-head h2{font-size:21px}
.home .td-step{border:1px solid var(--line);border-bottom-width:1px;border-radius:14px;background:var(--bg);min-height:58px}
.home .td-step:active{transform:none}
.home .td-steps li:first-child .td-step:not(.done){border-color:color-mix(in srgb,var(--accent) 50%,var(--line));background:var(--soft)}
.home .td-ico{background:var(--surface)}
.home .td-notes{list-style:none;margin:0;padding:0;display:grid;gap:4px;font-size:13.5px;color:var(--muted)}
.home .td-notes a{color:var(--accent);font-weight:700}
.home .td-cd{font-size:12.5px;font-weight:800;color:var(--muted);text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.home .kbo-invcard{margin:20px 0 0;border:1px solid var(--line);border-style:solid}
.home .kbo-invcard .go{background:var(--soft);color:var(--soft-ink)}

/* ---- «مربی‌یار» */
.home .coach-card{display:grid;grid-template-columns:minmax(0,1fr);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;background:var(--surface)}
.home .coach-card img{display:block;width:100%;height:auto;aspect-ratio:16/7;object-fit:cover;background:#FBFAF7}
.home .coach-tx{padding:14px 16px 16px}
.home .coach-tx h3{margin:0;font-size:18px;display:flex;gap:8px;align-items:center}
.home .coach-tx p{margin:4px 0 0;color:var(--muted);font-size:14px}
.home .coach-tx .coach-acts{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;margin-top:12px}
@media (min-width:700px){.home .coach-card{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:center}.home .coach-card img{height:100%;aspect-ratio:auto;min-height:200px}}

/* ---- footer */
.home .foot{margin-top:48px;border-top:1px solid var(--line);padding-top:20px}
.home .lnk{border-width:1px}
.home .credit{margin:0 0 6px;font-size:12px;color:var(--muted)}
.home .credit a{color:var(--accent)}

.home .err{margin-top:20px}
@media (prefers-reduced-motion:reduce){.home .pack,.home .btn{transition:none}}
/* small phones, logged in: «خروج» lives in «داشبورد من» (the name chip opens the account sheet), the header keeps brand + language + name */
@media (max-width:430px){.home .top .acct-out{display:none}}
@media (max-width:420px){.home .hero-acts .btn{width:100%}.home .hero-acts{gap:4px}.home .sec{margin-top:30px}}
html[dir="ltr"] .home .cd{direction:ltr}
@media (prefers-color-scheme: dark){.home .p-media img,.home .hm-3d img,.home .coach-card img{filter:brightness(.9)}}
/* small phones: the section links scroll sideways, the search button stays at the end */
@media (max-width:560px){
  .home .topnav{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:0}
  .home .topnav::-webkit-scrollbar{display:none}
  .home .topnav a{padding:0 8px;font-size:13.5px}
  .home .topnav .nav-search{position:sticky;inset-inline-end:0;background:var(--bg)}
  html[dir="ltr"] .home .topnav .nav-search{box-shadow:-8px 0 8px var(--bg)}
  html[dir="rtl"] .home .topnav .nav-search{box-shadow:8px 0 8px var(--bg)}
}
/* 360-380 px: tighter items so the whole bar (5 links + search) fits without sideways scrolling */
@media (max-width:380px){.home .topnav a{padding:0 6px;font-size:13px}.home .topnav .nav-search{min-width:40px;padding:0 8px}}

/* ---- «تبلیغ / اعلان» (one admin-set banner below the hero, hub.js initPromo): labelled, dismissible, fixed image box (no layout shift) */
.home .promo{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:center;margin:22px 0 0;padding:14px 16px;padding-inline-end:52px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}
.home .promo.has-img{grid-template-columns:112px minmax(0,1fr)}
.home .pr-media{border-radius:12px;overflow:hidden;background:var(--panel);aspect-ratio:16/9;align-self:start}
.home .pr-media img{display:block;width:100%;height:100%;object-fit:cover}
.home .pr-tx{min-width:0}
.home .pr-label{display:inline-block;font-size:12px;font-weight:800;line-height:1;padding:5px 8px;border-radius:99px;border:1px solid var(--line);color:var(--muted);background:var(--bg)}
.home .pr-title{margin:6px 0 0;font-size:16.5px;font-weight:800;line-height:1.6;overflow-wrap:anywhere}
.home .pr-text{margin:2px 0 0;color:var(--muted);font-size:14px;line-height:1.8;overflow-wrap:anywhere}
.home .pr-acts{margin:10px 0 0}
.home .pr-go{min-height:44px;font-size:14.5px;padding-inline:16px;max-width:100%}
.home .pr-x{position:absolute;top:6px;inset-inline-end:6px;width:44px;height:44px;border:0;border-radius:12px;background:transparent;color:var(--muted);font:inherit;font-size:24px;line-height:1;cursor:pointer}
@media (hover:hover){.home .pr-x:hover{background:var(--bg);color:var(--ink)}}
@media (min-width:700px){.home .promo.has-img{grid-template-columns:200px minmax(0,1fr)}.home .pr-media{align-self:center}}
@media (max-width:380px){.home .promo.has-img{grid-template-columns:88px minmax(0,1fr)}}
@media (prefers-color-scheme: dark){.home .pr-media img{filter:brightness(.9)}}
/* membership tier badge (header chip; /me/ «ایمیل و سطح عضویت»): ★ special, ✦ brilliant — src/services/email.js */
.tierb{display:inline-block;margin-inline-end:6px;padding:0 7px;border-radius:99px;font-size:11.5px;font-weight:800;line-height:1.8;vertical-align:1px;background:color-mix(in srgb,var(--accent) 14%,var(--surface));color:var(--accent);white-space:nowrap}
.tierb.brilliant{background:color-mix(in srgb,#e0b030 26%,var(--surface));color:var(--ink)}
.tierb.regular{background:var(--bg);color:var(--muted)}
/* responsive pass (Round 23): 320–360 px phones — brand, [globe|فا|EN] and «ورود / ثبت‌نام» fit on one row without cutting the button to «ورود / ثب…» */
@media (max-width:360px){.home .brand{font-size:19px;gap:6px}.home .brand::before{width:26px;height:26px}.home .top .acct{gap:6px}.home .acct-chip,.home .acct-chip.primary{padding:4px 10px;font-size:13px}}
