/* ==========================================================================
   Reskin «شب‌تاب» — shell (group A). Loaded on every page AFTER the DS bundle and the old interface.css.
   Covers what the DS has no component for, on the old site's chrome: the sticky header stack (member message + sale
   bar), nav popovers («آموزش», «دانشجویان», «ابزارها»), account + cart popovers, the menu sheet groups, footer extras,
   the newsletter band, the mobile bottom nav, native <dialog>s (login, search, tools, review, PRO, course peek),
   PWA banner, countdown, AI chat + mascot tokens.
   Rules: DS tokens only; logical properties; DS durations; no hover-only reveal; decorative loops pause on
   html.is-scrolling. Everything here is under a .gh-reskin root (old CSS is kept out of those roots by
   bin/reskin-scope-legacy.py), except the base block at the top.
   ========================================================================== */

/* ---------- base (whole site): type, links, forms, focus, selection, scrollbar, motion ---------- */
:root{scroll-padding-top:calc(var(--gh-layout-header-height) + var(--gh-ref-space-500))}
body{font-family:var(--gh-font-family-base);font-feature-settings:normal}
.gh-reskin :is(input,select,textarea,button){font-family:inherit}
body{background:var(--gh-color-bg-canvas);color:var(--gh-color-text-primary)}
/* DS body has overflow-x:hidden; with the old html{overflow-x:clip} that turned <body> into a scroll container and
   broke every position:sticky (header stack, course nav, dashboard side). clip never creates a scroll container. */
html,body{overflow-x:clip;overflow-y:visible}
/* the old ambient orbs (visual-system.css body::before/::after, endless accent loops) are not part of «شب‌تاب» */
body::before,body::after{content:none;animation:none}
::selection{background:var(--gh-color-selection-bg);color:var(--gh-color-selection-text)}
html{scrollbar-color:var(--gh-color-scrollbar-thumb) var(--gh-color-scrollbar-track)}
:root[data-motion="reduce"] *{transition:none!important;animation:none!important;scroll-behavior:auto!important}
/* decorative loops anywhere (old CSS included) pause while the page scrolls */
.is-scrolling :is(.gh-pet,.gh-pet *,.gh-aichat-fab,[class*="marquee"],[class*="-loop"]){animation-play-state:paused!important}
.gh-icon--lucide{fill:none;stroke:currentColor;stroke-width:var(--gh-icon-stroke)}
.gh-reskin .gh-icon{flex:none}

/* site motion (shell.js): nothing is hidden without JS; reduced motion never sets .mo-on */
.mo-on .mo-rv{opacity:0;translate:0 16px;transition:opacity var(--gh-ref-duration-slower) var(--gh-motion-ease),translate var(--gh-ref-duration-slower) var(--gh-motion-ease)}
.mo-on .mo-rv.mo-late{transition-delay:60ms}
.mo-on .mo-rv:not(.mo-in){transition:none}
.mo-on .mo-rv.mo-in{opacity:1;translate:0 0}
@media print{.mo-on .mo-rv{opacity:1!important;translate:none!important}}

/* ---------- header stack: sticky (member message + gh-site-header + sale bar) ---------- */
/* old sticky elements (course nav, buy box, dashboard side) offset themselves with these old variables */
:root{--gh-header-sticky-top:0px;--gh-header-sticky-height:calc(var(--gh-layout-header-height) + 1px);--gh-sticky-gap:var(--gh-ref-space-400)}
@media (max-width:860px){:root{--gh-header-sticky-height:61px;--gh-sticky-gap:var(--gh-ref-space-300)}}
.gh-header-stack{position:sticky;top:0;z-index:var(--gh-ref-z-sticky)}
.gh-header-stack .gh-site-header{position:relative;top:auto}
.admin-bar .gh-header-stack{top:32px}
@media (max-width:782px){.admin-bar .gh-header-stack{top:46px}}
@media (max-width:600px){.admin-bar .gh-header-stack{top:0}}
.gh-site-header__nav{align-items:center}
.gh-site-header .gh-wordmark{color:var(--gh-color-text-primary)}
.gh-shell-navpop__trigger{gap:var(--gh-ref-space-100)}
.gh-shell-navpop__chev{inline-size:14px;block-size:14px;transition:transform var(--gh-motion-duration-base) var(--gh-motion-ease)}
.gh-shell-navpop__trigger[aria-expanded="true"]{color:var(--gh-color-text-primary);background:var(--gh-color-surface-2)}
.gh-shell-navpop__trigger[aria-expanded="true"] .gh-shell-navpop__chev{transform:rotate(180deg)}

/* nav popovers («mega»): DS gh-popover + rows */
.gh-popover.gh-shell-mega{inline-size:min(360px,calc(100vw - 2 * var(--gh-ref-space-400)));padding:var(--gh-ref-space-200)}
.gh-popover.gh-shell-mega--courses{display:grid;grid-template-columns:minmax(0,1fr) 15rem;gap:var(--gh-ref-space-200);inline-size:min(640px,calc(100vw - 2 * var(--gh-ref-space-400)))}
.gh-popover.gh-shell-mega--courses[hidden],.gh-popover.gh-shell-mega--tools[hidden]{display:none}
.gh-popover.gh-shell-mega--tools{display:grid;inline-size:min(640px,calc(100vw - 2 * var(--gh-ref-space-400)))}
.gh-shell-mega--tools .gh-shell-mega__main{grid-template-columns:repeat(2,minmax(0,1fr))}
.gh-shell-mega__main{display:grid;gap:2px;align-content:start;min-inline-size:0}
.gh-shell-mega__item{display:flex;align-items:center;gap:var(--gh-ref-space-300);min-block-size:52px;padding:var(--gh-ref-space-200) var(--gh-ref-space-250);border-radius:var(--gh-radius-control);color:var(--gh-color-text-secondary);min-inline-size:0;
  transition:background-color var(--gh-motion-duration-fast) var(--gh-motion-ease),color var(--gh-motion-duration-fast) var(--gh-motion-ease)}
.gh-shell-mega__item:hover,.gh-shell-mega__item:focus-visible{background:var(--gh-color-surface-3);color:var(--gh-color-text-primary)}
.gh-shell-mega__item[aria-current="page"]{background:var(--gh-color-surface-3);color:var(--gh-color-text-primary)}
.gh-shell-mega__icon{display:grid;place-items:center;flex:none;inline-size:32px;block-size:32px;border-radius:9px;background:var(--gh-color-surface-3);color:var(--gh-color-text-secondary)}
.gh-shell-mega__icon .gh-icon{inline-size:18px;block-size:18px}
.gh-shell-mega__item[aria-current="page"] .gh-shell-mega__icon:not(.gh-shell-dot){background:var(--gh-color-accent-default);color:var(--gh-color-accent-on)}
.gh-shell-mega__text{display:flex;flex-direction:column;min-inline-size:0;line-height:1.5}
.gh-shell-mega__text b{font-size:var(--gh-type-label-size);font-weight:var(--gh-ref-font-weight-semibold);color:var(--gh-color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gh-shell-mega__text small{font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gh-shell-mega__aside{display:flex;flex-direction:column;align-items:flex-start;gap:var(--gh-ref-space-300);padding:var(--gh-ref-space-400);border-radius:var(--gh-radius-inner);background:var(--gh-color-surface-1);border:1px solid var(--gh-color-border-subtle)}
.gh-shell-mega__aside-title{font-size:var(--gh-type-heading-4-size);font-weight:var(--gh-ref-font-weight-bold);color:var(--gh-color-text-primary)}
.gh-shell-mega__aside p{font-size:var(--gh-type-body-sm-size);line-height:var(--gh-type-body-sm-line-height);color:var(--gh-color-text-secondary)}
.gh-shell-mega__aside .gh-list{font-size:var(--gh-type-label-sm-size);color:var(--gh-color-text-secondary);display:grid;gap:var(--gh-ref-space-150)}
.gh-shell-mega__aside .gh-btn{margin-block-start:auto}

/* course colour = a small dot / badge only (owner decision 2) */
.gh-shell-dot{display:inline-grid;place-items:center;flex:none;inline-size:32px;block-size:32px;border-radius:9px;
  background:var(--gh-shell-dot,var(--gh-color-surface-3));color:var(--gh-ref-color-neutral-950);font-size:var(--gh-type-caption-size);font-weight:var(--gh-ref-font-weight-extrabold);line-height:1;letter-spacing:0;direction:ltr}
.gh-shell-dot--sm{inline-size:10px;block-size:10px;border-radius:50%;font-size:0}

/* account popover */
.gh-shell-account__trigger{--_s:36px;padding:0;border-radius:50%;overflow:visible}
.gh-shell-account__trigger>.gh-avatar,.gh-shell-account__head>.gh-avatar{display:inline-grid;place-items:center;overflow:hidden;margin:0;border-radius:50%;box-shadow:none;background:var(--gh-color-surface-3);flex:none}
.gh-shell-account__trigger>.gh-avatar{inline-size:32px!important;block-size:32px!important}
.gh-shell-account .gh-avatar :is(img,svg){inline-size:100%;block-size:100%;object-fit:cover;display:block}
.gh-popover.gh-shell-account__pop{inline-size:300px;padding:var(--gh-ref-space-200)}
.gh-shell-account__head{display:flex;align-items:center;gap:var(--gh-ref-space-300);padding:var(--gh-ref-space-250) var(--gh-ref-space-250) var(--gh-ref-space-300)}
.gh-shell-account__head>.gh-avatar{inline-size:42px!important;block-size:42px!important}
.gh-shell-account__head div{display:flex;flex-direction:column;min-inline-size:0;line-height:1.5}
.gh-shell-account__head b{font-size:var(--gh-type-label-size);font-weight:var(--gh-ref-font-weight-bold);color:var(--gh-color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gh-shell-account__head small{font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}
.gh-shell-account__links{display:grid;gap:2px}
.gh-shell-account .gh-menu__item>span:first-of-type{flex:1;min-inline-size:0}
.gh-shell-count{display:inline-grid;place-items:center;flex:none;min-inline-size:20px;block-size:20px;padding-inline:6px;border-radius:var(--gh-radius-pill);
  background:var(--gh-color-accent-default);color:var(--gh-color-accent-on);font-size:var(--gh-type-caption-size);font-weight:var(--gh-ref-font-weight-bold);line-height:1}
.gh-shell-account__notifs{margin-block-start:var(--gh-ref-space-200);padding-block-start:var(--gh-ref-space-200);border-block-start:1px solid var(--gh-color-border-subtle)}
.gh-shell-account__notifs ul{display:grid;gap:2px;max-block-size:220px;overflow:auto;overscroll-behavior:contain}
.gh-shell-account__notifs li{display:flex;gap:var(--gh-ref-space-300);justify-content:space-between;padding:var(--gh-ref-space-200) var(--gh-ref-space-250);border-radius:var(--gh-radius-control);font-size:var(--gh-type-label-sm-size);line-height:var(--gh-type-body-sm-line-height);color:var(--gh-color-text-secondary)}
.gh-shell-account__notifs time{flex:none;font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}

/* cart popover (fragment root .gh-cart[data-gh-cart]) */
.gh-cart-badge{position:absolute;inset-block-start:-3px;inset-inline-end:-3px;display:grid;place-items:center;min-inline-size:16px;block-size:16px;padding-inline:3px;border-radius:var(--gh-radius-pill);
  background:var(--gh-color-accent-default);color:var(--gh-color-accent-on);font-size:.625rem;font-weight:var(--gh-ref-font-weight-extrabold);line-height:1;box-shadow:0 0 0 2px var(--gh-color-bg-canvas)}
.gh-popover.gh-shell-cart{inline-size:340px;padding:var(--gh-ref-space-400)}
.gh-shell-cart__empty{display:grid;justify-items:center;gap:var(--gh-ref-space-200);padding-block:var(--gh-ref-space-400) var(--gh-ref-space-500);text-align:center;font-size:var(--gh-type-body-sm-size);color:var(--gh-color-text-secondary)}
.gh-shell-cart__empty-icon{display:grid;place-items:center;inline-size:44px;block-size:44px;border-radius:50%;background:var(--gh-color-surface-3);color:var(--gh-color-text-tertiary)}
.gh-shell-cart__items{display:grid;gap:var(--gh-ref-space-200);max-block-size:260px;overflow:auto;overscroll-behavior:contain}
.gh-shell-cart__item{display:flex;align-items:center;gap:var(--gh-ref-space-300)}
.gh-shell-cart__img{flex:none;inline-size:44px;block-size:44px;border-radius:var(--gh-radius-control);overflow:hidden;background:var(--gh-color-surface-3)}
.gh-shell-cart__img img{inline-size:100%;block-size:100%;object-fit:cover}
.gh-shell-cart__info{display:flex;flex-direction:column;flex:1;min-inline-size:0;font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary);line-height:1.6}
.gh-shell-cart__info b{font-size:var(--gh-type-label-sm-size);font-weight:var(--gh-ref-font-weight-semibold);color:var(--gh-color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gh-shell-cart__upsell{display:flex;align-items:center;gap:var(--gh-ref-space-200);margin-block-start:var(--gh-ref-space-300);padding:var(--gh-ref-space-200) var(--gh-ref-space-300);border-radius:var(--gh-radius-control);background:var(--gh-color-accent-soft);color:var(--gh-color-accent-ink);font-size:var(--gh-type-label-sm-size)}
.gh-shell-cart__sum{display:grid;gap:var(--gh-ref-space-150);margin-block:var(--gh-ref-space-400);padding-block-start:var(--gh-ref-space-300);border-block-start:1px solid var(--gh-color-border-subtle);font-size:var(--gh-type-label-sm-size);color:var(--gh-color-text-secondary)}
.gh-shell-cart__sum>div{display:flex;justify-content:space-between;gap:var(--gh-ref-space-300)}
.gh-shell-cart__sum .is-discount dd{color:var(--gh-color-status-success)}
.gh-shell-cart__sum .is-total{font-weight:var(--gh-ref-font-weight-bold);color:var(--gh-color-text-primary);font-size:var(--gh-type-label-size)}
.gh-shell-cart__acts{display:flex;gap:var(--gh-ref-space-200)}
.gh-shell-cart__acts>.gh-btn{flex:1}

/* sale bar (festival / timed sales) + countdown boxes */
.gh-shell-sale{background:var(--gh-color-surface-1);border-block-end:1px solid var(--gh-color-border-subtle);overflow:hidden;
  transition:margin-block-start var(--gh-motion-duration-slow) var(--gh-motion-ease),opacity var(--gh-motion-duration-slow) var(--gh-motion-ease)}
.gh-header-stack.is-sale-hidden .gh-shell-sale{margin-block-start:calc(-1 * var(--gh-sale-panel-height,56px));opacity:0;pointer-events:none}
.gh-shell-sale__inner{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--gh-ref-space-300) var(--gh-ref-space-500);min-block-size:52px;padding-block:var(--gh-ref-space-200)}
.gh-shell-sale__text{display:inline-flex;align-items:center;gap:var(--gh-ref-space-200);font-size:var(--gh-type-label-size);font-weight:var(--gh-ref-font-weight-semibold);color:var(--gh-color-text-primary)}
.gh-shell-sale__text .gh-icon{color:var(--gh-color-accent-ink)}
.gh-shell-countdown{display:inline-flex;align-items:center;gap:var(--gh-ref-space-150);direction:rtl}
.gh-shell-countdown .gh-cd-box{display:grid;justify-items:center;min-inline-size:44px;padding:var(--gh-ref-space-150) var(--gh-ref-space-200);border-radius:var(--gh-radius-control);background:var(--gh-color-surface-2);border:1px solid var(--gh-color-border-subtle);line-height:1.2}
.gh-shell-countdown .gh-cd-box b{font-size:var(--gh-type-heading-4-size);font-weight:var(--gh-ref-font-weight-bold);color:var(--gh-color-text-primary)}
.gh-shell-countdown .gh-cd-box span{font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}
.gh-shell-countdown .gh-cd-sep{font-style:normal;color:var(--gh-color-text-tertiary)}
.gh-shell-countdown--sm .gh-cd-box{grid-auto-flow:column;align-items:baseline;gap:3px;min-inline-size:0;padding:3px var(--gh-ref-space-200)}
.gh-shell-countdown--sm .gh-cd-box b{font-size:var(--gh-type-label-size)}
.gh-shell-countdown--sm .gh-cd-sep{display:none}
@media (max-width:640px){.gh-shell-sale__cta{display:none}.gh-shell-sale__inner{gap:var(--gh-ref-space-200)}.gh-shell-sale__text{font-size:var(--gh-type-label-sm-size)}}

/* member message bar (core MemberMessages, AJAX into [data-global-member-message-host]) = gh-callout look */
.gh-global-member-message-host:not([hidden]){display:block;padding:var(--gh-ref-space-200) var(--gh-layout-gutter-mobile) 0}
.gh-global-member-message{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:var(--gh-ref-space-300) var(--gh-ref-space-400);max-inline-size:var(--gh-layout-content-max);margin-inline:auto;padding:var(--gh-ref-space-300) var(--gh-ref-space-400);
  border:1px solid var(--gh-color-border-default);border-radius:var(--gh-radius-inner);background:var(--gh-color-surface-2);color:var(--gh-color-text-secondary);font-size:var(--gh-type-label-sm-size);overflow:hidden}
.gh-global-member-message.is-success{border-color:var(--gh-color-status-success-border)}
.gh-global-member-message.is-warning{border-color:var(--gh-color-status-warning-border)}
.gh-global-member-message.is-danger{border-color:var(--gh-color-status-danger-border)}
.gh-global-member-message-watermark{display:none}
.gh-global-member-message-icon{display:grid;place-items:center;flex:none;inline-size:32px;block-size:32px;border-radius:9px;background:var(--gh-color-accent-soft);color:var(--gh-color-accent-ink)}
.gh-global-member-message-icon svg{inline-size:18px;block-size:18px}
.gh-global-member-message-copy{flex:1;min-inline-size:12rem;display:flex;flex-direction:column;gap:2px}
.gh-global-member-message-copy>span{font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}
.gh-global-member-message-copy strong{font-size:var(--gh-type-label-size);color:var(--gh-color-text-primary)}
.gh-global-member-message-copy p{margin:0}
.gh-global-member-message-timer{display:flex;flex-direction:column;font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}
.gh-global-member-message-timer b{font-size:var(--gh-type-label-size);color:var(--gh-color-text-primary)}
.gh-global-member-message-cta{display:inline-flex;align-items:center;gap:var(--gh-ref-space-150);block-size:32px;padding-inline:var(--gh-ref-space-400);border-radius:var(--gh-radius-pill);background:var(--gh-color-accent-default);color:var(--gh-color-accent-on);font-weight:var(--gh-ref-font-weight-semibold)}
.gh-global-member-message-dismiss button{display:grid;place-items:center;inline-size:30px;block-size:30px;border-radius:50%;font-size:1.25rem;color:var(--gh-color-text-tertiary)}
.gh-global-member-message-dismiss button:hover{background:var(--gh-color-surface-3);color:var(--gh-color-text-primary)}

/* ---------- menu sheet (mobile / below 1240px) ---------- */
.gh-shell-menu__group>summary{display:flex;align-items:center;gap:var(--gh-ref-space-300);min-block-size:48px;padding-inline:var(--gh-ref-space-300);border-radius:var(--gh-radius-inner);font-weight:var(--gh-ref-font-weight-medium);color:var(--gh-color-text-secondary);cursor:pointer;list-style:none}
.gh-shell-menu__group>summary::-webkit-details-marker{display:none}
.gh-shell-menu__group>summary:hover,.gh-shell-menu__group>summary[aria-current="page"]{background:var(--gh-color-surface-3);color:var(--gh-color-text-primary)}
.gh-shell-menu__chev{margin-inline-start:auto;transition:transform var(--gh-motion-duration-base) var(--gh-motion-ease)}
.gh-shell-menu__group[open]>summary .gh-shell-menu__chev{transform:rotate(180deg)}
.gh-shell-menu__sub{display:grid;gap:2px;padding:var(--gh-ref-space-100) var(--gh-ref-space-800) var(--gh-ref-space-200) 0}
.gh-site-menu .gh-shell-menu__sub a{min-block-size:44px;font-size:var(--gh-type-label-size);font-weight:var(--gh-ref-font-weight-regular)}
.gh-shell-menu__cart{justify-content:flex-start}
.gh-shell-menu__cart .gh-shell-count{margin-inline-start:auto}
.gh-shell-menu__theme{display:flex;align-items:center;justify-content:space-between;gap:var(--gh-ref-space-300);margin-block-start:var(--gh-ref-space-300);padding:var(--gh-ref-space-300);border-block-start:1px solid var(--gh-color-border-subtle);font-size:var(--gh-type-label-size);color:var(--gh-color-text-secondary)}

/* phones: wordmark + search + «نمایش» + cart + login/account + menu must fit 360px; theme lives in «نمایش» / sheet */
@media (max-width:420px){
  .gh-site-header__tools{gap:var(--gh-ref-space-100)}
  .gh-site-header .gh-shell-login{padding-inline:var(--gh-ref-space-300)}
}
@media (max-width:360px){.gh-site-header .gh-shell-a11y{display:none}}

/* ---------- footer ---------- */
.gh-site-footer.gh-reskin{margin-block-start:var(--gh-layout-section)}
.gh-shell-news-band+.gh-site-footer.gh-reskin{margin-block-start:var(--gh-ref-space-300)}
.gh-shell-footer__brand{display:flex;flex-direction:column;align-items:flex-start}
.gh-shell-footer__more{display:inline-flex;align-items:center;gap:var(--gh-ref-space-100);margin-block-start:var(--gh-ref-space-300);font-size:var(--gh-type-label-size);font-weight:var(--gh-ref-font-weight-medium);color:var(--gh-color-accent-ink);border-radius:var(--gh-radius-control)}
.gh-shell-footer__more:hover{color:var(--gh-color-text-primary)}
.gh-shell-footer__social{display:flex;flex-wrap:wrap;gap:var(--gh-ref-space-200);margin-block-start:var(--gh-ref-space-500)}
.gh-shell-footer__social .gh-icon-btn{--_s:40px;border:1px solid var(--gh-color-border-default)}
.gh-shell-footer__trust{margin-block-start:var(--gh-ref-space-500)}
.gh-shell-footer__trust .gh-trust-badges{display:flex;flex-wrap:wrap;gap:var(--gh-ref-space-200)}
.gh-shell-footer__trust .gh-trust-badge{display:grid;place-items:center;inline-size:72px;block-size:72px;padding:var(--gh-ref-space-150);border-radius:var(--gh-radius-inner);background:var(--gh-color-surface-paper);overflow:hidden}
.gh-shell-footer__trust .gh-trust-badge :is(img,a){display:block;max-inline-size:100%;max-block-size:100%;object-fit:contain}
.gh-shell-footer__dl{display:grid;gap:var(--gh-ref-space-300);font-size:var(--gh-type-label-size);color:var(--gh-color-text-secondary)}
.gh-shell-footer__dl dt{font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}
.gh-shell-footer__dl dd{margin:0;line-height:1.8;overflow-wrap:anywhere}
.gh-shell-footer__dl a:hover{color:var(--gh-color-text-primary)}
.gh-shell-footer__dl a[dir="ltr"]{unicode-bidi:isolate}
@media (max-width:860px){.gh-shell-footer__keys{display:none}}
/* phones: the contact column (email, address) gets the full row so the email never breaks mid-word */
@media (max-width:560px){.gh-shell-footer__contact{grid-column:1/-1}.gh-shell-footer__dl a[dir="ltr"]{overflow-wrap:normal}}

/* ---------- newsletter band (template-parts/newsletter.php) ---------- */
.gh-shell-news-band{padding-block-start:var(--gh-layout-section)}
.gh-shell-news__lede{font-size:var(--gh-type-body-sm-size);line-height:var(--gh-type-body-sm-line-height);color:var(--gh-color-text-secondary);max-inline-size:52ch}
.gh-shell-news__points{display:flex;flex-wrap:wrap;gap:var(--gh-ref-space-200) var(--gh-ref-space-500)}
.gh-shell-news .cn-form-status{transition:color var(--gh-motion-duration-base) var(--gh-motion-ease)}
.gh-shell-news .cn-form.is-error .cn-form-status{color:var(--gh-color-status-danger)}
@media (max-width:860px){
  .gh-newsletter.gh-shell-news{flex-direction:column;align-items:stretch;gap:var(--gh-ref-space-600);padding:var(--gh-tile-padding-mobile)}
  .gh-shell-news .gh-newsletter__form{flex:none}
}

/* ---------- mobile bottom nav (owner decision 5) = DS tab bar ---------- */
.gh-bottom-nav{display:none}
@media (max-width:900px){
  .gh-bottom-nav{position:fixed;inset-inline:0;bottom:0;z-index:var(--gh-ref-z-fixed);display:flex;justify-content:space-around;
    padding:var(--gh-ref-space-150) var(--gh-ref-space-150) calc(var(--gh-ref-space-150) + env(safe-area-inset-bottom));
    background:var(--gh-color-bg-header);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-block-start:1px solid var(--gh-color-border-subtle)}
  .gh-bottom-nav__item{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-inline-size:56px;min-block-size:48px;padding:var(--gh-ref-space-100) var(--gh-ref-space-200);
    border-radius:var(--gh-radius-inner);font-size:.6875rem;font-weight:var(--gh-ref-font-weight-medium);color:var(--gh-color-text-tertiary);white-space:nowrap;
    -webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:color var(--gh-motion-duration-fast) var(--gh-motion-ease)}
  .gh-bottom-nav__item:hover{color:var(--gh-color-text-primary)}
  .gh-bottom-nav__item:is([aria-current="page"],.on,[aria-expanded="true"]){color:var(--gh-color-accent-ink)}
  .gh-bottom-nav__item .gh-icon{inline-size:22px;block-size:22px}
  .single-gh_course .gh-bottom-nav{display:none} /* the course buy bar wins (old rule) */
  body:has(.gh-bottom-nav){padding-block-end:calc(var(--gh-layout-tabbar-height) + 1px + env(safe-area-inset-bottom))} /* 64 + 1px top border */
  body.single-gh_course{padding-block-end:0}
  body:has(.gh-bottom-nav) .gh-toast{bottom:calc(var(--gh-layout-tabbar-height) + var(--gh-ref-space-400))}
}

/* ---------- native <dialog>s (app.js opens them with showModal) in the DS modal / sheet / cmdk look ---------- */
dialog.gh-shell-dialog{position:fixed;inset:0;inline-size:100%;block-size:100%;max-inline-size:none;max-block-size:none;margin:0;padding:var(--gh-ref-space-600);
  border:0;background:transparent;color:var(--gh-color-text-primary);overflow:auto;overscroll-behavior:contain}
dialog.gh-shell-dialog[open]{display:flex;align-items:center;justify-content:center;animation:gh-shell-fade var(--gh-motion-duration-base) var(--gh-motion-ease)}
dialog.gh-shell-dialog::backdrop{background:var(--gh-color-bg-scrim)}
@keyframes gh-shell-fade{from{opacity:0}}
@keyframes gh-shell-rise{from{opacity:0;transform:translateY(8px)}}
.gh-shell-dialog__panel{position:relative;display:flex;flex-direction:column;inline-size:min(560px,100%);max-block-size:calc(100dvh - 2 * var(--gh-ref-space-600));overflow:auto;overscroll-behavior:contain;
  background:var(--gh-color-surface-1);border:1px solid var(--gh-color-border-default);border-radius:var(--gh-radius-tile);box-shadow:var(--gh-shadow-overlay-lg);
  animation:gh-shell-rise var(--gh-motion-duration-slow) var(--gh-motion-ease)}
.gh-shell-dialog__panel--sm{inline-size:min(440px,100%)}
.gh-shell-dialog__x{position:absolute;inset-block-start:var(--gh-ref-space-400);inset-inline-end:var(--gh-ref-space-400);margin:0;z-index:1}
.gh-shell-dialog__body{display:flex;flex-direction:column;gap:var(--gh-ref-space-400);padding:var(--gh-ref-space-600)}
.gh-shell-dialog__body .gh-modal__icon{margin-block-end:0}
.gh-shell-dialog__body .gh-modal__desc{margin-block-start:calc(-1 * var(--gh-ref-space-200))}
.gh-shell-dialog__foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--gh-ref-space-300);padding-block-start:var(--gh-ref-space-300);border-block-start:1px solid var(--gh-color-border-subtle)}

/* login modal (OTP flow in app.js: [data-step], [data-gh-phone], .gh-otp input, .gh-login-msg, .gh-timer) */
.gh-login-modal .gh-shell-dialog__body[hidden]{display:none}
.gh-login-modal .gh-otp{max-inline-size:none}
.gh-login-modal .gh-otp__cell{font-size:var(--gh-type-heading-3-size);font-weight:var(--gh-ref-font-weight-bold);border:1px solid var(--gh-color-border-default);background:var(--gh-color-surface-2);color:var(--gh-color-text-primary)}
.gh-login-modal .gh-login-phone{unicode-bidi:isolate;color:var(--gh-color-text-primary)}
.gh-login-modal .gh-btn--ghost:disabled{opacity:.55}
.gh-login-msg{margin:0;padding:0 var(--gh-ref-space-600) var(--gh-ref-space-500);font-size:var(--gh-type-label-sm-size);color:var(--gh-color-text-secondary);min-block-size:1em}
.gh-login-msg:empty{display:none}
.gh-login-msg.is-error{color:var(--gh-color-status-danger)}
.gh-login-msg.is-success{color:var(--gh-color-status-success)}
.gh-login-msg.is-info,.gh-login-msg.is-loading{color:var(--gh-color-text-secondary)}

/* search (old REST /search renderer in app.js) in the DS command-palette look */
dialog.gh-shell-dialog--cmdk[open]{align-items:flex-start;padding:12vh var(--gh-ref-space-400) var(--gh-ref-space-400)}
.gh-shell-dialog--cmdk .gh-cmdk__dialog{
  background:var(--gh-color-surface-2);border:1px solid var(--gh-color-border-default);border-radius:var(--gh-radius-panel);box-shadow:var(--gh-shadow-overlay-lg);animation:gh-shell-rise var(--gh-motion-duration-slow) var(--gh-motion-ease)}
.gh-shell-dialog--cmdk .gh-cmdk__list:empty{display:none}
.gh-shell-dialog--cmdk .gh-cmdk__list{min-block-size:3rem}
.gh-search-sec-title{padding:var(--gh-ref-space-300) var(--gh-ref-space-250) var(--gh-ref-space-150);font-size:var(--gh-type-caption-size);font-weight:var(--gh-ref-font-weight-semibold);color:var(--gh-color-text-tertiary)}
.gh-search-chips{display:flex;flex-wrap:wrap;gap:var(--gh-ref-space-150);padding:0 var(--gh-ref-space-250) var(--gh-ref-space-200)}
.gh-search-chip{display:inline-flex;align-items:center;block-size:32px;padding-inline:var(--gh-ref-space-300);border-radius:var(--gh-radius-pill);border:1px solid var(--gh-color-border-default);
  font-size:var(--gh-type-label-sm-size);color:var(--gh-color-text-secondary);transition:border-color var(--gh-motion-duration-fast) var(--gh-motion-ease),color var(--gh-motion-duration-fast) var(--gh-motion-ease)}
.gh-search-chip:hover{border-color:var(--gh-color-border-strong);color:var(--gh-color-text-primary)}
.gh-search-list{display:grid;gap:2px}
.gh-search-list>li{min-inline-size:0}
.gh-search-item{min-inline-size:0;display:flex;align-items:center;gap:var(--gh-ref-space-300);min-block-size:48px;padding:var(--gh-ref-space-200) var(--gh-ref-space-250);border-radius:var(--gh-ref-space-300);color:var(--gh-color-text-secondary)}
.gh-search-item:is(:hover,.is-active,:focus-visible){background:var(--gh-color-surface-3);color:var(--gh-color-text-primary)}
.gh-search-thumb,.gh-search-dot{display:grid;place-items:center;flex:none;inline-size:32px;block-size:32px;border-radius:9px;object-fit:cover;background:var(--gh-color-surface-3);overflow:hidden}
.gh-search-dot{font-size:var(--gh-type-caption-size);font-weight:var(--gh-ref-font-weight-extrabold);color:var(--gh-ref-color-neutral-950)!important;direction:ltr}
.gh-search-item.is-active .gh-search-thumb-ph{background:var(--gh-color-accent-default)}
.gh-search-item-body{display:flex;flex-direction:column;flex:1;min-inline-size:0;line-height:1.5}
.gh-search-item-body b{font-size:var(--gh-type-label-size);font-weight:var(--gh-ref-font-weight-semibold);color:var(--gh-color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gh-search-item-body mark{background:none;color:var(--gh-color-accent-ink)}
.gh-search-item-meta{font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}
.gh-search-msg,.gh-search-empty{display:grid;justify-items:center;gap:var(--gh-ref-space-300);padding:var(--gh-ref-space-700);text-align:center;font-size:var(--gh-type-label-size);color:var(--gh-color-text-tertiary)}
.gh-search-empty .gh-btn{border:1px solid var(--gh-color-border-default);border-radius:var(--gh-radius-pill);padding:var(--gh-ref-space-150) var(--gh-ref-space-400);color:var(--gh-color-text-primary)}
.gh-search-loading{display:flex;justify-content:center;gap:6px;padding:var(--gh-ref-space-700)}
.gh-search-loading i{inline-size:8px;block-size:8px;border-radius:50%;background:var(--gh-color-text-tertiary);animation:gh-shell-dots 1s var(--gh-motion-ease) infinite}
.gh-search-loading i:nth-child(2){animation-delay:.15s}.gh-search-loading i:nth-child(3){animation-delay:.3s}
@keyframes gh-shell-dots{50%{opacity:.25}}
@media (max-width:560px){dialog.gh-shell-dialog--cmdk[open]{padding:var(--gh-ref-space-200)}} /* DS: full-height palette on phones */

/* tools quick picker (bottom nav «ابزارها»): a sheet on phones, a modal on desktop */
.gh-tools-quick .gh-shell-dialog__panel{inline-size:min(640px,100%);padding:0}
.gh-tools-quick .gh-sheet__grab{display:none}
.gh-shell-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;padding:var(--gh-ref-space-200)}
@media (max-width:640px){
  dialog.gh-shell-dialog--sheet[open]{align-items:flex-end;padding:0}
  .gh-shell-dialog--sheet .gh-shell-dialog__panel{inline-size:100%;max-block-size:88dvh;border-radius:var(--gh-radius-tile) var(--gh-radius-tile) 0 0;border-block-end:0;padding-block-end:env(safe-area-inset-bottom)}
  .gh-tools-quick .gh-sheet__grab{display:block}
  .gh-shell-tools{grid-template-columns:minmax(0,1fr)}
}

/* review modal */
.gh-review-modal .gh-modal__head{padding:var(--gh-ref-space-600) var(--gh-ref-space-600) 0}
.gh-shell-review{display:grid;gap:var(--gh-ref-space-400)}
.gh-review-modal.is-switching .gh-shell-review{animation:gh-shell-fade var(--gh-motion-duration-slow) var(--gh-motion-ease)}
.gh-shell-review__proof{display:flex;align-items:center;justify-content:space-between;gap:var(--gh-ref-space-300)}
.gh-shell-review__stars{color:var(--gh-color-accent-ink);letter-spacing:2px;font-size:var(--gh-type-body-lg-size)}
.gh-shell-review__text{font-size:var(--gh-type-body-size);line-height:var(--gh-type-body-line-height);color:var(--gh-color-text-primary);white-space:pre-line}
.gh-shell-review__audio audio{inline-size:100%}
.gh-shell-review__person{display:flex;align-items:center;gap:var(--gh-ref-space-300);padding-block-start:var(--gh-ref-space-300);border-block-start:1px solid var(--gh-color-border-subtle)}
.gh-shell-review__avatar{display:grid;place-items:center;flex:none;inline-size:44px;block-size:44px;border-radius:50%;overflow:hidden;background:var(--gh-color-surface-3)}
.gh-shell-review__avatar :is(img,svg){inline-size:100%;block-size:100%;object-fit:cover}
.gh-shell-review__avatar>span{display:contents}
.gh-shell-review__who{display:flex;flex-direction:column;flex:1;min-inline-size:0;line-height:1.5}
.gh-shell-review__who b{color:var(--gh-color-text-primary)}
.gh-shell-review__who small{font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}
.gh-shell-review__nav{justify-content:space-between;font-size:var(--gh-type-label-sm-size);color:var(--gh-color-text-tertiary)}

/* course quick peek + PRO */
.gh-course-quick-cover img{inline-size:100%;aspect-ratio:16/9;object-fit:cover;border-radius:var(--gh-radius-panel) var(--gh-radius-panel) 0 0}
.gh-course-quick-modal .gh-popup-head{display:flex;align-items:center;gap:var(--gh-ref-space-300)}
.gh-course-quick-modal .gh-popup-meta{display:flex;flex-wrap:wrap;gap:var(--gh-ref-space-200);font-size:var(--gh-type-label-sm-size);color:var(--gh-color-text-tertiary)}
.gh-course-quick-modal [data-cq-price]{font-size:var(--gh-type-heading-4-size)}
.gh-shell-pro__plans{display:grid;gap:var(--gh-ref-space-200);font-size:var(--gh-type-label-size);color:var(--gh-color-text-secondary)}

/* ---------- toast: one element, pre-rendered in the footer (old .gh-toast rules do not reach it) ---------- */
.gh-toast.gh-reskin:not(.is-open){pointer-events:none}

/* ---------- PWA install banner + connectivity ---------- */
.gh-pwa-install{position:fixed;inset-inline:var(--gh-ref-space-400);bottom:var(--gh-ref-space-400);z-index:var(--gh-ref-z-toast);display:flex;align-items:center;gap:var(--gh-ref-space-300);
  max-inline-size:440px;margin-inline:auto;padding:var(--gh-ref-space-300) var(--gh-ref-space-400);background:var(--gh-color-surface-2);border:1px solid var(--gh-color-border-default);border-radius:var(--gh-radius-inner);box-shadow:var(--gh-shadow-overlay-sm);
  opacity:0;transform:translateY(8px);transition:opacity var(--gh-motion-duration-slow) var(--gh-motion-ease),transform var(--gh-motion-duration-slow) var(--gh-motion-ease)}
.gh-pwa-install[hidden]{display:none}
.gh-pwa-install.is-visible{opacity:1;transform:none}
.gh-pwa-install-mark{inline-size:40px;block-size:40px}
.gh-pwa-install-mark svg{inline-size:20px;block-size:20px}
.gh-pwa-install-copy{display:flex;flex-direction:column;flex:1;min-inline-size:0;line-height:1.5}
.gh-pwa-install-copy b{font-size:var(--gh-type-label-size);color:var(--gh-color-text-primary)}
.gh-pwa-install-copy small{font-size:var(--gh-type-caption-size);color:var(--gh-color-text-tertiary)}
@media (max-width:900px){.gh-pwa-install{bottom:calc(var(--gh-layout-tabbar-height) + var(--gh-ref-space-300) + env(safe-area-inset-bottom))}}
/* phones: one compact row (the iOS «Add to Home Screen» hint keeps its text, it is the instruction) */
@media (max-width:560px){
  .gh-pwa-install{inset-inline:var(--gh-ref-space-300);padding:var(--gh-ref-space-200) var(--gh-ref-space-300);gap:var(--gh-ref-space-200)}
  .gh-pwa-install-mark{inline-size:32px;block-size:32px}
  .gh-pwa-install:not(.is-ios) .gh-pwa-install-copy small{display:none}
}
.gh-pwa-connectivity{position:fixed;inset-inline:0;top:0;z-index:var(--gh-ref-z-toast);padding:var(--gh-ref-space-150) var(--gh-ref-space-400);text-align:center;font-size:var(--gh-type-label-sm-size);
  background:var(--gh-color-status-success-soft);color:var(--gh-color-status-success)}
.gh-pwa-connectivity[hidden]{display:none}
.gh-pwa-connectivity.is-offline{background:var(--gh-color-status-warning-soft);color:var(--gh-color-status-warning)}

/* ---------- floating widgets outside DS roots: AI chat + mascot keep their markup, get DS colours ---------- */
.gh-aichat{--gh-accent-solid:var(--gh-color-ai-default);--gh-accent-hover:var(--gh-color-ai-default);--gh-accent-text:var(--gh-color-ai-default);--gh-accent-surface:var(--gh-color-ai-soft);--gh-accent-border:var(--gh-color-ai-border);--gh-accent-on-solid:var(--gh-color-accent-on)}
/* AI chat in the DS look (1405-09-12): neutral surfaces, violet only as the assistant's sign (avatar, icon, border, links),
   actions use the site primary like every other button. [data-gh-aichat] lifts these over legacy.css (0,2,0). The hover
   ripple is off (motion.js); any leftover span is hidden so it can never push the icon again. */
.gh-motion-ripple{display:none!important}
.gh-aichat[data-gh-aichat] .gh-aichat-fab{position:fixed;overflow:hidden;isolation:isolate;inline-size:56px;block-size:56px;padding:0;display:grid;place-items:center;
  background:var(--gh-color-surface-2);color:var(--gh-color-ai-default);border:1px solid var(--gh-color-ai-border);box-shadow:var(--gh-shadow-overlay-sm,var(--gh-shadow-2));
  transition:background-color var(--gh-ref-duration-fast,.15s) ease,border-color var(--gh-ref-duration-fast,.15s) ease,box-shadow var(--gh-ref-duration-fast,.15s) ease;transform:none}
.gh-aichat[data-gh-aichat] .gh-aichat-fab > svg{grid-area:1/1;inline-size:24px;block-size:24px}
.gh-aichat[data-gh-aichat] .gh-aichat-fab:hover{transform:none;background:color-mix(in srgb,var(--gh-color-ai-soft) 100%,var(--gh-color-surface-2));border-color:var(--gh-color-ai-default);box-shadow:var(--gh-shadow-overlay-lg,var(--gh-shadow-3))}
.gh-aichat[data-gh-aichat] .gh-aichat-fab:focus-visible{outline:2px solid var(--gh-color-focus-ring,var(--gh-color-ai-default));outline-offset:3px}
.gh-aichat[data-gh-aichat] .gh-aichat-win{background:var(--gh-color-surface-1);border:1px solid var(--gh-color-border-default);border-radius:var(--gh-radius-tile);box-shadow:var(--gh-shadow-overlay-lg,var(--gh-shadow-4));color:var(--gh-color-text-primary)}
.gh-aichat[data-gh-aichat] .gh-aichat-head{--gh-aichat-head-on:var(--gh-color-text-primary);background:var(--gh-color-surface-1);color:var(--gh-color-text-primary);border-block-end:1px solid var(--gh-color-border-subtle);padding:var(--gh-ref-space-300) var(--gh-ref-space-400)}
.gh-aichat[data-gh-aichat] .gh-aichat-head .gh-aichat-avatar{inline-size:40px;block-size:40px;background:var(--gh-color-ai-soft);color:var(--gh-color-ai-default);border:1px solid var(--gh-color-ai-border)}
.gh-aichat[data-gh-aichat] .gh-aichat-head-info > span{opacity:1;color:var(--gh-color-text-secondary)}
.gh-aichat[data-gh-aichat] .gh-aichat-dot{background:var(--gh-color-status-success)}
.gh-aichat[data-gh-aichat] .gh-aichat-head .gh-icon-btn{display:inline-grid;place-items:center;inline-size:40px;block-size:40px;padding:0;border-radius:50%;border:1px solid transparent;background:transparent;color:var(--gh-color-text-secondary)}
.gh-aichat[data-gh-aichat] .gh-aichat-head .gh-icon-btn svg{inline-size:20px;block-size:20px}
.gh-aichat[data-gh-aichat] .gh-aichat-head .gh-icon-btn:hover,.gh-aichat[data-gh-aichat] .gh-aichat-head .gh-icon-btn[aria-pressed="true"]{background:var(--gh-color-surface-3);border-color:var(--gh-color-border-subtle);color:var(--gh-color-text-primary)}
.gh-aichat[data-gh-aichat] .gh-aichat-gate-icon{flex:none;inline-size:52px;block-size:52px;border-radius:50%;background:var(--gh-color-ai-soft);border-color:var(--gh-color-ai-border);color:var(--gh-color-ai-default)}
.gh-aichat[data-gh-aichat] .gh-aichat-identity label{color:var(--gh-color-text-primary);font-weight:var(--gh-ref-font-weight-semibold,600)}
.gh-aichat[data-gh-aichat] :is(.gh-aichat-identity input,.gh-aichat-form input){background:var(--gh-color-surface-2);border:1px solid var(--gh-color-border-default);color:var(--gh-color-text-primary);border-radius:var(--gh-radius-control);box-shadow:none}
.gh-aichat[data-gh-aichat] .gh-aichat-form input{border-radius:var(--gh-radius-pill);min-block-size:44px}
.gh-aichat[data-gh-aichat] :is(.gh-aichat-identity input,.gh-aichat-form input)::placeholder{color:var(--gh-color-text-tertiary)}
.gh-aichat[data-gh-aichat] :is(.gh-aichat-identity input,.gh-aichat-form input):focus{outline:none;border-color:var(--gh-color-focus-field,var(--gh-color-accent-ink));box-shadow:0 0 0 3px var(--gh-color-focus-field-halo,transparent);background:var(--gh-color-surface-1)}
.gh-aichat[data-gh-aichat] .gh-btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:var(--gh-ref-space-200);min-block-size:44px;border:0;border-radius:var(--gh-radius-pill);
  background:var(--gh-color-accent-default);color:var(--gh-color-accent-on);font-weight:var(--gh-ref-font-weight-bold,700);box-shadow:none;transform:none;background-image:none}
.gh-aichat[data-gh-aichat] .gh-btn-primary:hover{background:var(--gh-color-accent-hover);color:var(--gh-color-accent-on);transform:none;box-shadow:none}
.gh-aichat[data-gh-aichat] .gh-btn-primary.gh-btn-icon{inline-size:44px;block-size:44px;padding:0;border-radius:50%;flex:none}
.gh-aichat[data-gh-aichat] .gh-btn-primary.gh-btn-icon svg{inline-size:20px;block-size:20px}
.gh-aichat[data-gh-aichat] .gh-aichat-b.is-bot{background:var(--gh-color-surface-2);border:1px solid var(--gh-color-border-subtle);color:var(--gh-color-text-primary)}
.gh-aichat[data-gh-aichat] .gh-aichat-b.is-me{background:var(--gh-color-accent-default);color:var(--gh-color-accent-on)}
.gh-aichat[data-gh-aichat] .gh-aichat-b.is-bot a{color:var(--gh-color-ai-default)}
.gh-aichat[data-gh-aichat] .gh-aichat-sug{color:var(--gh-color-text-primary);border-color:var(--gh-color-border-default);background:var(--gh-color-surface-1);min-block-size:36px}
.gh-aichat[data-gh-aichat] .gh-aichat-sug:hover{background:var(--gh-color-surface-3);border-color:var(--gh-color-ai-border)}
.gh-aichat[data-gh-aichat] .gh-aichat-typing{background:var(--gh-color-surface-2)}
.gh-aichat[data-gh-aichat] .gh-aichat-actions{background:var(--gh-color-surface-2);border-color:var(--gh-color-border-subtle)}
.gh-aichat[data-gh-aichat] .gh-aichat-ticket{min-block-size:40px;border-color:var(--gh-color-border-default);border-radius:var(--gh-radius-pill);background:var(--gh-color-surface-1);color:var(--gh-color-text-primary);font-weight:var(--gh-ref-font-weight-bold,700)}
.gh-aichat[data-gh-aichat] .gh-aichat-ticket:hover{background:var(--gh-color-surface-3);color:var(--gh-color-text-primary)}
.gh-aichat[data-gh-aichat] .gh-aichat-notices{background:var(--gh-color-surface-1)}
.gh-aichat[data-gh-aichat] .gh-aichat-notice{background:var(--gh-color-surface-2);border-color:var(--gh-color-border-subtle);border-radius:var(--gh-radius-inner)}
.gh-aichat[data-gh-aichat] .gh-aichat-notice-icon{background:var(--gh-color-ai-soft);color:var(--gh-color-ai-default);box-shadow:none}
.gh-aichat[data-gh-aichat] .gh-aichat-notice::before{background:var(--gh-color-ai-default)}
.gh-aichat[data-gh-aichat] .gh-aichat-field-error{background:var(--gh-color-status-danger-soft);color:var(--gh-color-status-danger)}
@media (max-width:640px){.gh-aichat[data-gh-aichat] .gh-aichat-win{border-radius:0;border:0}}
@media (prefers-reduced-motion:reduce){.gh-aichat[data-gh-aichat] .gh-aichat-fab{transition:none}}
/* floating widgets step aside while a sheet / dialog is open (they sit above the DS overlay layer otherwise) */
body:has(.gh-sheet:not([hidden]),dialog[open]) :is(.gh-aichat,.gh-pet,.gh-pet-reactivate,.gh-pwa-install){visibility:hidden}
@media (max-width:900px){
  .gh-aichat-fab:not(.gh-reskin *){bottom:calc(var(--gh-layout-tabbar-height) + var(--gh-ref-space-300) + env(safe-area-inset-bottom))!important}
}

/* ---------- floating stack: bottom nav → PWA banner → FABs (AI chat at inline-start, core AdminDesk at inline-end) ----------
   Every fixed layer sits above the one below it, and the page gets matching bottom padding so its last row (footer
   copyright) is never under a button or the banner. --gh-float-base = top edge of the bottom nav (0 on desktop). */
:root{--gh-float-base:0px;--gh-float-fab:72px} /* 56px FAB + 16px gap */
@media (max-width:900px){
  body:has(.gh-bottom-nav){--gh-float-base:calc(var(--gh-layout-tabbar-height) + 1px + env(safe-area-inset-bottom))}
  body.single-gh_course{--gh-float-base:0px}
  .gh-admin-desk-fab:not(.gh-reskin *){inset-block-end:calc(var(--gh-float-base) + var(--gh-ref-space-300))!important;inset-inline-end:var(--gh-ref-space-400)!important}
}
body:has(.gh-aichat-fab,.gh-admin-desk-fab){padding-block-end:calc(var(--gh-float-base) + var(--gh-float-fab))}
html.gh-pwa-install-on body{padding-block-end:calc(var(--gh-float-base) + var(--gh-pwa-install-h,72px) + var(--gh-ref-space-400) + var(--gh-float-fab))}
/* phones: the banner spans the width, so the AI button rises above it (desktop: banner is centred, corner buttons stay) */
@media (max-width:900px){html.gh-pwa-install-on .gh-aichat-fab:not(.gh-reskin *){bottom:calc(var(--gh-float-base) + var(--gh-pwa-install-h,72px) + var(--gh-ref-space-500))!important}}

/* ---------- owner's uploaded logo (core SiteBrand: mark + logotype, single-colour SVG → currentColor) ---------- */
.gh-wordmark--brand{gap:var(--gh-ref-space-200);color:var(--gh-color-text-primary)}
.gh-wordmark__brand-mark,.gh-wordmark__brand-type{display:block;flex:none;line-height:0}
.gh-wordmark__brand-mark svg{display:block;block-size:32px;inline-size:auto;fill:currentColor}
.gh-wordmark__brand-type svg{display:block;block-size:24px;inline-size:auto;max-inline-size:150px;fill:currentColor}
.gh-wordmark__mark--brand svg{inline-size:18px;block-size:18px;fill:currentColor}
@media (max-width:560px){.gh-wordmark__brand-mark svg{block-size:28px}.gh-wordmark__brand-type svg{block-size:21px}}
