/* r92 (30 Nov) — MR AMRO visual identity «بترولي وذهبي».
   Source: owner folder «MR AMRO - Website Visual Identity» + «دليل تنفيذ الهوية البصرية.md» (tokens §3, sizes §4,
   icons §5, motion §9). Step 1 = header (shared frame) + section bar + student home. Loaded last; other pages keep
   identity-3d until their step. Home rules are scoped with body:has(#gateway-results .student-home-card). */
:root,html[data-theme="light"]{
  --p-page:#F4F0E6;--p-surface:#FFFCF6;--p-raised:#FFFFFF;--p-muted-surface:#EAE5DA;--p-header:#133E4C;
  --p-text:#091827;--p-text-muted:#4C5E68;--p-on-header:#F4F0E6;--p-border:#D3CEC2;
  --p-accent:#D9AE55;--p-on-accent:#091827;--p-secondary:#133E4C;--p-on-secondary:#FFFFFF;
  --p-focus:#126B7B;--p-shadow-card:0 3px 12px rgb(9 24 39 / 7%);
  --p-teal:#4AB9AE;--p-gold-ink:#8A6320;
  --p-fast:160ms;
}
html:not([data-theme="light"]){
  --p-page:#091827;--p-surface:#132638;--p-raised:#1A3346;--p-muted-surface:#102130;--p-header:#0D2733;
  --p-text:#F4F0E6;--p-text-muted:#B5C3CC;--p-on-header:#F4F0E6;--p-border:#36505F;
  --p-secondary:#183C46;--p-on-secondary:#F4F0E6;--p-focus:#74D5DC;--p-shadow-card:0 4px 16px rgb(0 0 0 / 16%);
  --p-gold-ink:#D9AE55;
}

/* ---------- shared frame: header + main nav (all pages) ---------- */
html:not(#p) body header{background:var(--p-header)!important;border-bottom:1px solid rgba(217,174,85,.35)!important;box-shadow:none!important}
html:not(#p) body header .brand-name{color:var(--p-on-header)!important;-webkit-text-fill-color:var(--p-on-header)}
html:not(#p) body header .nav{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
html:not(#p) body header .nav :is(button,a){background:transparent!important;border:1px solid rgba(244,240,230,.22)!important;color:var(--p-on-header)!important;box-shadow:none!important;border-radius:10px!important;min-height:44px;transition:background-color var(--p-fast),border-color var(--p-fast),color var(--p-fast)}
html:not(#p) body header .nav :is(button,a):hover{border-color:rgba(217,174,85,.75)!important}
html:not(#p) body header .nav button.active{background:var(--p-accent)!important;border-color:var(--p-accent)!important;color:var(--p-on-accent)!important;outline:0!important;box-shadow:none!important}
html:not(#p) body header :is(#site-locale,#theme-toggle,#header-account){background:transparent!important;border:1px solid rgba(244,240,230,.22)!important;color:var(--p-on-header)!important;box-shadow:none!important}
html:not(#p) body header :is(button,a,select):focus-visible{outline:2px solid var(--p-focus)!important;outline-offset:2px}

/* =====================================================================================================
   ALL PORTAL PAGES (step 2/3): paths, content, reviews, library, plans, subscriptions, live list, quizzes,
   results, account, search, favorites, notifications. Tokens switch with the theme, so one rule serves
   light and dark. «بصمة 3D» (owner): destination/path/item icons are light 3D tiles and cards keep a 2px
   bottom edge — no heavy edge, no movement (guide §2/§9). Notes paper, whiteboard and video are untouched.
   ===================================================================================================== */
html:not(#p) body{--c3-text:var(--p-text);--c3-muted:var(--p-text-muted);--p-edge:#CFC7B6;--p-gold-edge:#B48A3A}
html:not([data-theme="light"]):not(#p) body{--p-edge:#0A1624;--p-gold-edge:#9C7428}
html:not(#p) body:has(#gateway-workspace:not([hidden])),html:not(#p) body:has(#portal.active){background:var(--p-page)!important}
html:not(#p) body #portal .portal:before{display:none!important}
html:not(#p) body #gateway-workspace .workspace{background:transparent!important;border:0!important;box-shadow:none!important}
html:not(#p) body #gateway-workspace #gateway-title{color:var(--p-text)!important;font-family:var(--id-head,'Alexandria',sans-serif);font-weight:700;line-height:1.4}
html:not(#p) body #gateway-workspace #gateway-path{color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace #gateway-message{color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace .gateway-identity{color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace .side{background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:var(--p-shadow-card)!important;border-radius:14px!important}
html:not(#p) body #gateway-workspace .side :is(button,summary){min-height:44px;box-shadow:none!important;border-radius:10px!important;transition:background-color var(--p-fast),border-color var(--p-fast),color var(--p-fast)}
html:not(#p) body #gateway-workspace .side button.selected{background:var(--p-accent)!important;color:var(--p-on-accent)!important;border:0!important;outline:0!important;box-shadow:none!important}
html:not(#p) body #gateway-workspace .side :is(button:not(.selected),summary){color:var(--p-text)!important;background:transparent!important;border:1px solid var(--p-border)!important}
html:not(#p) body #gateway-workspace .gateway-more-options{background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:0 10px 30px rgb(9 24 39 / 18%)!important;border-radius:14px!important}
html:not(#p) body #gateway-workspace .gateway-more-options button{color:var(--p-text)!important;background:transparent!important;border:0!important;box-shadow:none!important}
html:not(#p) body #gateway-workspace .gateway-more-options button:hover{background:var(--p-muted-surface)!important}

/* ---- cards: one surface for every list (path levels, plans, subscriptions, results, live list, search, favorites) ---- */
html:not(#p) body #gateway-workspace :is(.gateway-card,.gateway-item){
  background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;border-radius:16px!important;
  box-shadow:0 2px 0 var(--p-edge),var(--p-shadow-card)!important;transform:none!important;
  transition:background-color var(--p-fast),border-color var(--p-fast),box-shadow var(--p-fast)!important}
@media(hover:hover){html:not(#p) body #gateway-workspace :is(button.gateway-card,.gateway-item):hover{border-color:color-mix(in srgb,var(--p-accent) 75%,var(--p-border))!important;box-shadow:0 2px 0 var(--p-edge),0 6px 18px rgb(9 24 39 / 12%)!important}}
html:not(#p) body #gateway-workspace button.gateway-card:active{background:var(--p-muted-surface)!important}
html:not(#p) body #gateway-workspace :is(.gateway-card,.gateway-item):focus-visible,html:not(#p) body #gateway-workspace .gateway-item :focus-visible{outline:2px solid var(--p-focus)!important;outline-offset:2px}
html:not(#p) body #gateway-workspace .gateway-card>strong,html:not(#p) body #gateway-workspace .gateway-item>h3{color:var(--p-text)!important;font-weight:700}
html:not(#p) body #gateway-workspace .gateway-card>small{color:var(--p-gold-ink)!important;font-weight:600}
html:not(#p) body #gateway-workspace .gateway-card>span,html:not(#p) body #gateway-workspace .gateway-item>p{color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace .gateway-empty{color:var(--p-text-muted)!important}

/* path levels: the chosen step is a gold outline, sections divided by a hairline */
html:not(#p) body #gateway-workspace .path-ancestor-level{border-bottom:1px solid var(--p-border)!important}
html:not(#p) body #gateway-workspace .path-ancestor-level>h3,html:not(#p) body #gateway-workspace .path-current-level{color:var(--p-text)!important;outline:0!important;font-weight:700}
html:not(#p) body #gateway-workspace .path-ancestor-level .gateway-card[aria-pressed="true"]{border-color:var(--p-accent)!important;outline:0!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--p-accent) 45%,transparent),0 2px 0 var(--p-edge)!important}

/* path / item icon tiles: light 3D (gradient + 2px edge + small shadow), colour per level */
html:not(#p) body #gateway-workspace .gateway-card[data-node-type]{--c3-acc:#2E8C83}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type="term"],html:not(#p) body #gateway-workspace .gateway-card[data-node-type="exam_review"]{--c3-acc:#5B45B0}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type="stage"],html:not(#p) body #gateway-workspace .gateway-card[data-node-type="unit"]{--c3-acc:#1F7F76}
html:not(#p) body #gateway-workspace .gateway-card:is([data-node-type="grade"],[data-node-type="lesson"],[data-node-type="video"]){--c3-acc:#2C6AA3}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type="subject"]{--c3-acc:#8A6320}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type="teacher"]{--c3-acc:#8A6320}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type]::before{
  background:linear-gradient(160deg,color-mix(in srgb,var(--c3-acc) 22%,var(--p-raised)),color-mix(in srgb,var(--c3-acc) 10%,var(--p-raised)))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px color-mix(in srgb,var(--c3-acc) 26%,transparent),0 2px 0 color-mix(in srgb,var(--c3-acc) 35%,transparent),0 3px 8px rgb(9 24 39 / 12%)!important}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type]::after{background:var(--c3-acc)!important}
html:not([data-theme="light"]):not(#p) body #gateway-workspace .gateway-card[data-node-type]::before{background:linear-gradient(160deg,color-mix(in srgb,var(--c3-acc) 36%,var(--p-raised)),color-mix(in srgb,var(--c3-acc) 16%,var(--p-surface)))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 0 0 1px color-mix(in srgb,var(--c3-acc) 40%,transparent),0 2px 0 rgba(0,0,0,.45),0 3px 8px rgb(0 0 0 / 30%)!important}
html:not([data-theme="light"]):not(#p) body #gateway-workspace .gateway-card[data-node-type]::after{background:color-mix(in srgb,var(--c3-acc) 50%,#fff)!important}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type="grade"][data-ordinal]::before{background:none!important;box-shadow:none!important;color:var(--p-gold-ink)!important;text-shadow:none!important;font-family:var(--id-head,'Alexandria',sans-serif)}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type="teacher"][data-initial]::before{color:var(--p-on-accent)!important;background:linear-gradient(160deg,#E9C77E,#C99A43)!important}

/* content items (video / pdf / file / image / quiz): soft cover band + light 3D tile, type badge, gold verb */
html:not(#p) body #gateway-workspace .gateway-item[data-item-type]{--c3-acc:#2C6AA3}
html:not(#p) body #gateway-workspace .gateway-item:is([data-item-type="pdf"],[data-item-type="file"]){--c3-acc:#B9502D}
html:not(#p) body #gateway-workspace .gateway-item[data-item-type="image"]{--c3-acc:#1F7F76}
html:not(#p) body #gateway-workspace .gateway-item[data-item-type="quiz"]{--c3-acc:#5B45B0}
html:not(#p) body #gateway-workspace .gateway-item[data-item-type]::before{background:linear-gradient(180deg,color-mix(in srgb,var(--c3-acc) 14%,var(--p-surface)),color-mix(in srgb,var(--c3-acc) 6%,var(--p-surface)))!important;box-shadow:inset 0 -1px 0 var(--p-border)!important}
html:not(#p) body #gateway-workspace .gateway-item[data-item-type]::after{
  background:var(--c3-icon) center/24px no-repeat,linear-gradient(160deg,color-mix(in srgb,var(--c3-acc) 24%,var(--p-raised)),color-mix(in srgb,var(--c3-acc) 12%,var(--p-raised)))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px color-mix(in srgb,var(--c3-acc) 28%,transparent),0 2px 0 color-mix(in srgb,var(--c3-acc) 35%,transparent),0 3px 8px rgb(9 24 39 / 14%)!important}
html:not(#p) body #gateway-workspace .gateway-item[data-item-type]>small:first-child{color:var(--c3-acc)!important;background:color-mix(in srgb,var(--c3-acc) 10%,var(--p-raised))!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c3-acc) 25%,transparent)!important}
html:not([data-theme="light"]):not(#p) body #gateway-workspace .gateway-item[data-item-type]>small:first-child{color:color-mix(in srgb,var(--c3-acc) 45%,#fff)!important}
html:not(#p) body #gateway-workspace .gateway-item .learning-progress-state{color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace .gateway-item .learning-progress-state .learning-badge{color:var(--p-gold-ink)!important}

/* buttons inside the portal: primary = gold, quiet = surface + border; 2px edge is the 3D signature */
html:not(#p) body #gateway-workspace :is(.gateway-item button,.gateway-item .live-action){
  min-height:44px;border-radius:10px!important;font-weight:700!important;border:0!important;color:var(--p-on-accent)!important;
  background:var(--p-accent)!important;box-shadow:0 2px 0 var(--p-gold-edge)!important;transform:none!important;transition:filter var(--p-fast)!important}
html:not(#p) body #gateway-workspace :is(.gateway-item button,.live-action):hover{filter:brightness(1.05)}
html:not(#p) body #gateway-workspace :is(.gateway-item button,.live-action):active{box-shadow:none!important;filter:brightness(.97)}
html:not(#p) body #gateway-workspace :is(.gateway-back,#gateway-retry){min-height:44px;border-radius:10px!important;background:transparent!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:none!important;transform:none!important}
html:not(#p) body #gateway-workspace :is(.gateway-back,#gateway-retry):hover{border-color:var(--p-accent)!important}
html:not(#p) body #gateway-workspace :is(button,summary,a,input,select,textarea):focus-visible{outline:2px solid var(--p-focus)!important;outline-offset:2px}

/* type filter chips */
html:not(#p) body #gateway-workspace .content-filters button{min-height:40px;border-radius:999px!important;font-weight:600!important;box-shadow:none!important;transition:background-color var(--p-fast),border-color var(--p-fast),color var(--p-fast)}
html:not(#p) body #gateway-workspace .content-filters button[aria-pressed="true"]{background:var(--p-secondary)!important;color:var(--p-on-secondary)!important;border:1px solid var(--p-secondary)!important}
html:not(#p) body #gateway-workspace .content-filters button[aria-pressed="false"]{background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important}

/* plans: the chosen plan gets a gold frame, discount uses the success colour with the word (guide §3) */
html:not(#p) body #gateway-workspace .plan-choice input{accent-color:#D9AE55}
html:not(#p) body #gateway-workspace .plan-choice:has(input:checked) .gateway-card{border-color:var(--p-accent)!important;outline:0!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--p-accent) 50%,transparent),0 2px 0 var(--p-edge)!important;transform:none!important}
html:not(#p) body #gateway-workspace .plan-discount-badge{color:#146C43!important;background:#E5F3EA!important;border:1px solid rgba(20,108,67,.25)!important;box-shadow:none!important;border-radius:999px!important}
html:not([data-theme="light"]):not(#p) body #gateway-workspace .plan-discount-badge{color:#8CE3B5!important;background:#153B30!important;border-color:rgba(140,227,181,.3)!important}
html:not(#p) body #gateway-workspace .plan-selection{background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;border-radius:16px!important;box-shadow:var(--p-shadow-card)!important}
html:not(#p) body #gateway-workspace .plan-selection :is(strong,p,label,span){color:var(--p-text)!important}
html:not(#p) body #gateway-workspace .plan-selection button{min-height:44px;border-radius:10px!important;border:0!important;background:var(--p-accent)!important;color:var(--p-on-accent)!important;box-shadow:0 2px 0 var(--p-gold-edge)!important;font-weight:700!important}
html:not(#p) body #gateway-workspace :is(.plan-selection,#gateway-search) input{min-height:44px;border-radius:10px!important;background:var(--p-raised)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:none!important}
html:not(#p) body #gateway-workspace #gateway-search label{color:var(--p-text)!important}
html:not(#p) body #gateway-workspace #gateway-search button{min-height:44px;border-radius:10px!important;border:0!important;background:var(--p-secondary)!important;color:var(--p-on-secondary)!important;box-shadow:none!important}

/* page-level actions (المفضلة / ملاحظة / رجوع للباقات / تفاصيل الحصة) are secondary: surface + border (guide §6: one primary) */
html:not(#p) body #gateway-workspace :is(#gateway-results>.live-action,.gateway-card .live-action,.workspace>.live-action){min-height:44px;border-radius:10px!important;font-weight:600!important;background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge)!important;transform:none!important}
html:not(#p) body #gateway-workspace :is(#gateway-results>.live-action,.gateway-card .live-action):hover{border-color:var(--p-accent)!important}
/* dark: a brighter tile so the dark item glyph stays readable */
html:not([data-theme="light"]):not(#p) body #gateway-workspace .gateway-item[data-item-type]::after{background:var(--c3-icon) center/24px no-repeat,linear-gradient(160deg,color-mix(in srgb,var(--c3-acc) 40%,#fff),color-mix(in srgb,var(--c3-acc) 62%,#fff))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 2px 0 color-mix(in srgb,var(--c3-acc) 70%,#000),0 4px 10px rgb(0 0 0 / 35%)!important}
html:not(#p){background:var(--p-page)}

/* account (inside the portal) and the account menu */
html:not(#p) body #gateway-workspace :is(.account-panel,.account-section){background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;border-radius:16px!important;box-shadow:var(--p-shadow-card)!important}
html:not(#p) body #gateway-workspace .account-panel :is(h3,strong,small,span,p,dt,dd){color:var(--p-text)!important}
html:not(#p) body .student-account-menu{background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;border-radius:16px!important;box-shadow:0 18px 40px rgb(9 24 39 / 28%)!important}
html:not(#p) body .student-account-menu :is(strong,small,span,p,h2,h3){color:var(--p-text)!important}
html:not(#p) body .student-account-menu .student-account-links :is(a,button){background:var(--p-raised)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;border-radius:12px!important;box-shadow:0 2px 0 var(--p-edge)!important;min-height:44px}
html:not(#p) body .student-account-menu .student-account-links :is(a,button):hover{border-color:var(--p-accent)!important}
html:not(#p) body .student-account-menu .student-account-actions :is(a,button){color:var(--p-gold-ink)!important;background:transparent!important;border:0!important;box-shadow:none!important}
html:not(#p) body .student-account-menu .student-account-avatar{background:var(--p-secondary)!important;color:var(--p-on-secondary)!important;box-shadow:0 0 0 2px var(--p-accent)!important}

/* footer */
html:not(#p) body .foot{background:var(--p-header)!important;color:var(--p-on-header)!important;border-top:1px solid rgba(217,174,85,.35)!important}
html:not(#p) body .foot :is(a,.teacher-entry){color:#E9C77E!important}
html:not(#p) body .foot button{background:var(--p-accent)!important;color:var(--p-on-accent)!important;border:0!important;border-radius:10px!important;box-shadow:0 2px 0 var(--p-gold-edge)!important}

/* ---------- login / register / recovery (guide §7: intro + compact form; nothing about the flow changes) ---------- */
html:not(#p) body #gateway-login.auth-layout .gateway-auth{background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;border-radius:16px!important;box-shadow:0 2px 0 var(--p-edge),0 12px 30px rgb(9 24 39 / 12%)!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth:before,html:not(#p) body #gateway-login.auth-layout .gateway-auth:after{display:none!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth :is(h2,label,label span,p){color:var(--p-text)!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth h2{font-weight:700!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth .auth-view>p{color:var(--p-text-muted)!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth :is(input[type="email"],input[type="password"],input[type="text"],input[type="tel"],input[type="search"]){min-height:44px;border-radius:10px!important;background:var(--p-raised)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:none!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth :is(input):focus-visible{outline:2px solid var(--p-focus)!important;outline-offset:1px;border-color:var(--p-focus)!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth button.primary{min-height:44px;border-radius:10px!important;border:0!important;background:var(--p-accent)!important;color:var(--p-on-accent)!important;box-shadow:0 2px 0 var(--p-gold-edge)!important;font-weight:700!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth :is(.auth-provider,button[data-auth-open="register"],button[data-auth-open="login"],.password-toggle,[data-password-toggle]){min-height:44px;border-radius:10px!important;background:var(--p-raised)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:none!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth .auth-text-link{color:var(--p-focus)!important;background:none!important;border:0!important;box-shadow:none!important}
html:not(#p) body #gateway-login.auth-layout .gateway-auth .auth-or{color:var(--p-text-muted)!important}
html:not(#p) body #gateway-login.auth-layout .auth-intro h1{color:var(--p-text)!important;-webkit-text-fill-color:currentColor;text-shadow:none!important}
html:not(#p) body #gateway-login.auth-layout .auth-intro :is(p,.auth-intro-note){color:var(--p-text-muted)!important}
html:not(#p) body #gateway-login.auth-layout .auth-intro .eyebrow{color:var(--p-gold-ink)!important;background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:none!important}
html:not(#p) body #gateway-login.auth-layout .auth-intro .auth-intro-features span{color:var(--p-text)!important;background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge)!important}
html:not(#p) body #gateway-login.auth-layout .auth-intro .auth-intro-note{border-color:var(--p-border)!important}

/* ---------- «ملاحظاتي» list (the editor, paper, ink tools and canvas are not touched — guide §7) ---------- */
html:not(#p) body #gateway-workspace .notes-panel{color:var(--p-text)!important}
html:not(#p) body #gateway-workspace .notes-panel :is(.notes-hint,.notes-status){color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace .notes-panel>.notes-toolbar button,html:not(#p) body #gateway-workspace .notes-panel>.notes-toolbar label:has(input[type="file"]){min-height:44px;border-radius:10px!important;font-weight:600!important;background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge)!important;transform:none!important}
html:not(#p) body #gateway-workspace .notes-panel>.notes-toolbar:first-child button{background:var(--p-accent)!important;color:var(--p-on-accent)!important;border:0!important;box-shadow:0 2px 0 var(--p-gold-edge)!important;font-weight:700!important}
html:not(#p) body #gateway-workspace .notes-panel>.notes-toolbar :is(input[type="search"],select){min-height:44px;border-radius:10px!important;background:var(--p-raised)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important}
html:not(#p) body #gateway-workspace .notes-panel .note-card{background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;border-radius:14px!important;box-shadow:0 2px 0 var(--p-edge),var(--p-shadow-card)!important}

/* ---------- landing «عن المنصة» ---------- */
html:not(#p) body #home{color:var(--p-text)}
html:not(#p) body #home .light-rays{display:none!important}
html:not(#p) body #home,html:not(#p) body #home :is(.hero,.shell.hero,.strip,.journey,.plans,.faq,.download-band,section){background:var(--p-page)!important;background-image:none!important}
html:not(#p) body #home :is(.strip,.journey,.faq,.download-band){border-color:var(--p-border)!important}
html:not(#p) body #home :is(h1,h2,h3){color:var(--p-text)!important;-webkit-text-fill-color:currentColor;text-shadow:none!important}
html:not(#p) body #home h1 em{color:var(--p-gold-ink)!important;-webkit-text-fill-color:currentColor;background:none!important;text-shadow:none!important}
html:not(#p) body #home :is(p,.lead,.strip p,.journey p){color:var(--p-text-muted)!important}
html:not(#p) body #home .eyebrow{color:var(--p-gold-ink)!important;background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:none!important}
html:not(#p) body #home .actions .primary{min-height:48px;border-radius:12px!important;border:0!important;background:var(--p-accent)!important;color:var(--p-on-accent)!important;box-shadow:0 2px 0 var(--p-gold-edge)!important;transform:none!important}
html:not(#p) body #home .actions .secondary{min-height:48px;border-radius:12px!important;background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge)!important;transform:none!important}
html:not(#p) body #home :is(.strip,.journey,.plans,.faq,.download-band){background:transparent!important}
/* «بصمة 3D»: the hero keeps its 3D scene (screen + cube + sphere) in identity colours, softer shadows */
html:not(#p) body #home .screen{background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:0 10px 0 var(--p-edge),0 30px 50px rgb(9 24 39 / 18%)!important}
html:not(#p) body #home .screen :is(.screen-top,.screen-top *){color:var(--p-text-muted)!important;border-color:var(--p-border)!important}
html:not(#p) body #home .tile{background:var(--p-raised)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge),var(--p-shadow-card)!important}
html:not(#p) body #home .tile b{color:var(--p-text)!important}
html:not(#p) body #home .tile i{--l-acc:#1F7F76;background:linear-gradient(160deg,color-mix(in srgb,var(--l-acc) 24%,var(--p-raised)),color-mix(in srgb,var(--l-acc) 11%,var(--p-raised)))!important;color:var(--l-acc)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px color-mix(in srgb,var(--l-acc) 26%,transparent),0 2px 0 color-mix(in srgb,var(--l-acc) 35%,transparent)!important}
html:not(#p) body #home .tile:nth-child(1) i{--l-acc:#8A6320}
html:not(#p) body #home .tile:nth-child(3) i{--l-acc:#2C6AA3}
html:not(#p) body #home .tile:nth-child(4) i{--l-acc:#5B45B0}
html:not(#p) body #home .float-note{background:var(--p-raised)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge),0 12px 24px rgb(9 24 39 / 16%)!important}
html:not(#p) body #home .float-note *{color:var(--p-text)!important}
html:not(#p) body #home .id3d-cube{filter:saturate(.75)}
html:not(#p) body #home .id3d-sphere{background:radial-gradient(circle at 32% 28%,#C9EEEA 0%,#4AB9AE 38%,#133E4C 100%)!important;box-shadow:inset -10px -14px 24px rgba(9,24,39,.35),0 18px 30px rgb(9 24 39 / 25%)!important}
/* feature cards + steps: surface, hairline, 2px edge, light 3D icon tile */
html:not(#p) body #home :is(.card,.step){background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge),var(--p-shadow-card)!important;transform:none!important;transition:border-color var(--p-fast),box-shadow var(--p-fast)!important}
@media(hover:hover){html:not(#p) body #home :is(.card,.step):hover{transform:none!important;border-color:color-mix(in srgb,var(--p-accent) 75%,var(--p-border))!important;box-shadow:0 2px 0 var(--p-edge),0 8px 22px rgb(9 24 39 / 12%)!important}}
html:not(#p) body #home .card{--l-acc:#8A6320}
html:not(#p) body #home .card:nth-child(2){--l-acc:#1F7F76}
html:not(#p) body #home .card:nth-child(3){--l-acc:#2C6AA3}
html:not(#p) body #home .card:nth-child(4){--l-acc:#5B45B0}
html:not(#p) body #home .card:before{background:linear-gradient(160deg,color-mix(in srgb,var(--l-acc) 24%,var(--p-raised)),color-mix(in srgb,var(--l-acc) 11%,var(--p-raised)))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px color-mix(in srgb,var(--l-acc) 26%,transparent),0 2px 0 color-mix(in srgb,var(--l-acc) 35%,transparent),0 4px 10px rgb(9 24 39 / 12%)!important}
html:not(#p) body #home .card:before{transform:none!important}
html:not(#p) body #home .card:after{content:"";position:absolute;top:28px;inset-inline-start:24px;width:62px;height:62px;pointer-events:none;background:var(--l-acc)!important;-webkit-mask:var(--l-icon) center/30px no-repeat;mask:var(--l-icon) center/30px no-repeat}
html:not(#p) body #home .card:nth-child(1){--l-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h12v16H6a2 2 0 0 0-2 2V5zM8 7h6M8 11h6'/%3E%3C/svg%3E")}
html:not(#p) body #home .card:nth-child(2){--l-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3 8-8M20 12v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E")}
html:not(#p) body #home .card:nth-child(3){--l-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7M3 4v5h5M12 8v4l3 2'/%3E%3C/svg%3E")}
html:not(#p) body #home .card:nth-child(4){--l-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8zM14 3v5h5'/%3E%3C/svg%3E")}
html:not(#p) body #home .step-num{background:linear-gradient(160deg,#F0D49A,#D9AE55)!important;color:var(--p-on-accent)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 2px 0 var(--p-gold-edge)!important;text-shadow:none!important}
html:not([data-theme="light"]):not(#p) body #home .card:before,html:not([data-theme="light"]):not(#p) body #home .tile i{background:linear-gradient(160deg,color-mix(in srgb,var(--l-acc) 40%,var(--p-raised)),color-mix(in srgb,var(--l-acc) 20%,var(--p-surface)))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.14),inset 0 0 0 1px color-mix(in srgb,var(--l-acc) 45%,transparent),0 2px 0 rgba(0,0,0,.45),0 4px 10px rgb(0 0 0 / 30%)!important}
html:not([data-theme="light"]):not(#p) body #home .card:after{background:color-mix(in srgb,var(--l-acc) 45%,#fff)!important}
html:not([data-theme="light"]):not(#p) body #home .tile i{color:color-mix(in srgb,var(--l-acc) 45%,#fff)!important}
/* plans band = petrol, faq rows = surface */
html:not(#p) body #home .plans .plans-inner{background:var(--p-header)!important;border:1px solid rgba(217,174,85,.35)!important;box-shadow:0 2px 0 rgba(0,0,0,.25),0 20px 40px rgb(9 24 39 / 22%)!important;border-radius:18px!important}
html:not(#p) body #home .plans .plans-inner :is(h2,h3,strong){color:var(--p-on-header)!important}
html:not(#p) body #home .plans .plans-inner p{color:rgba(244,240,230,.8)!important}
html:not(#p) body #home .plans .plan-info{background:rgba(244,240,230,.06)!important;border:1px solid rgba(217,174,85,.4)!important;box-shadow:none!important}
html:not(#p) body #home .plans .plan-info strong{color:#E9C77E!important}
html:not(#p) body #home .faq details{background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge)!important;border-radius:12px!important}
html:not(#p) body #home .faq summary{color:var(--p-text)!important}
html:not(#p) body #home .store-card{background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge)!important}
html:not(#p) body #home .store-card *{color:var(--p-text)!important}

/* ---------- home scope ---------- */
html body:has(#gateway-results .student-home-card){background:var(--p-page)!important}
html body:has(#gateway-results .student-home-card) .portal:before{display:none!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .workspace{background:transparent!important;border:0!important;box-shadow:none!important}
html body:has(#gateway-results .student-home-card) #gateway-title{color:var(--p-text)!important;font-family:var(--id-head,'Alexandria',sans-serif);font-weight:700;line-height:1.4}

/* section bar (الرئيسية / المزيد) */
html body:has(#gateway-results .student-home-card) #gateway-workspace .side{background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:var(--p-shadow-card)!important;border-radius:14px!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .side :is(button,summary){min-height:44px;box-shadow:none!important;border-radius:10px!important;transition:background-color var(--p-fast),border-color var(--p-fast),color var(--p-fast)}
html body:has(#gateway-results .student-home-card) #gateway-workspace .side button.selected{background:var(--p-accent)!important;color:var(--p-on-accent)!important;border:0!important;outline:0!important;box-shadow:none!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .side :is(button:not(.selected),summary){color:var(--p-text)!important;background:transparent!important;border:1px solid var(--p-border)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .side :is(button,summary):focus-visible{outline:2px solid var(--p-focus)!important;outline-offset:2px}

/* ---------- home destinations: 4 per row on wide screens, 2 on phones ---------- */
@media (min-width:1024px){
  html body:has(#gateway-results .student-home-card) #gateway-results{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]){flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:14px!important;min-height:136px!important;padding:18px!important}
}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card{
  border-radius:16px!important;outline:0!important;transform:none!important;
  background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:var(--p-shadow-card)!important;
  transition:background-color var(--p-fast),border-color var(--p-fast),box-shadow var(--p-fast)!important;
  animation:p-in .18s ease-out both}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card>strong{color:var(--p-text)!important;font-weight:700!important;font-size:1.05rem;line-height:1.45}
@media(hover:hover){
  html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:hover{border-color:color-mix(in srgb,var(--p-accent) 75%,var(--p-border))!important;box-shadow:0 6px 18px rgb(9 24 39 / 12%)!important}
}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:active{background:var(--p-muted-surface)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:focus-visible{outline:2px solid var(--p-focus)!important;outline-offset:2px}
/* the colour the owner picked for a path stays as a quiet edge line */
html[data-theme="light"] body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card.id-card-color{border-inline-start:4px solid var(--id-card-bottom-light)!important}
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card.id-card-color{border-inline-start:4px solid var(--id-card-bottom-dark)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card.id-title-color>strong{color:var(--p-text)!important}

/* «اشتراكاتي» = the petrol bar of the identity */
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"]{background:var(--p-secondary)!important;border-color:var(--p-secondary)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"]>strong{color:var(--p-on-secondary)!important}
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"]{border-color:color-mix(in srgb,var(--p-accent) 50%,var(--p-border))!important}

/* destination icons: light 3D tile (§2/§5), line glyph 30px inside 52px, colour per path */
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon{
  --p-acc:#2E8C83;width:52px!important;height:52px!important;border-radius:14px!important;transform:none!important;flex:none;
  background:linear-gradient(160deg,color-mix(in srgb,var(--p-acc) 20%,var(--p-raised)),color-mix(in srgb,var(--p-acc) 9%,var(--p-raised)))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px color-mix(in srgb,var(--p-acc) 24%,transparent),0 2px 6px rgb(9 24 39 / 12%)!important;
  color:var(--p-acc)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon:before{background:var(--p-acc)!important;width:30px!important;height:30px!important;filter:none!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon.id-glyph{font-size:30px!important;font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:is([data-section="library"],[data-home-key^="root:224755ce"]) .student-home-icon,
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon.id-glyph[data-accent="coral"]{--p-acc:#B9502D}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="exam_reviews"] .student-home-icon,
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon.id-glyph:is([data-accent="sky"],[data-accent="ice"]){--p-acc:#2C6AA3}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon.id-glyph[data-accent="violet"]{--p-acc:#5B45B0}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:is([data-section="plans"],[data-section="learning"]) .student-home-icon,
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon.id-glyph[data-accent="mint"]{--p-acc:#1F7F76}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="quizzes"] .student-home-icon,
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon.id-glyph:is([data-accent="gold"],[data-accent="sand"],[data-accent="navy"]){--p-acc:#8A6320}
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon{
  color:color-mix(in srgb,var(--p-acc) 50%,#fff)!important;
  background:linear-gradient(160deg,color-mix(in srgb,var(--p-acc) 34%,var(--p-raised)),color-mix(in srgb,var(--p-acc) 16%,var(--p-surface)))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 0 0 1px color-mix(in srgb,var(--p-acc) 40%,transparent),0 2px 8px rgb(0 0 0 / 30%)!important}
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon:before{background:color-mix(in srgb,var(--p-acc) 50%,#fff)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"] .student-home-icon{color:var(--p-accent)!important;background:rgba(217,174,85,.16)!important;box-shadow:inset 0 0 0 1px rgba(217,174,85,.35)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"] .student-home-icon:before{background:var(--p-accent)!important}

/* ---------- «تقدمي» ---------- */
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home{border-radius:16px!important;padding:18px 20px!important;padding-inline-end:20px!important;
  background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:var(--p-shadow-card)!important;color:var(--p-text)!important;animation:p-in .18s ease-out both}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home::after{display:none!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home :is(h2,h3,p,span,strong,small){color:var(--p-text)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home h2{font-size:1.25rem!important;font-weight:700!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home .learning-stats>div{border-radius:10px!important;box-shadow:none!important;background:var(--p-muted-surface)!important;border:1px solid var(--p-border)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home :is(.learning-stats>div,.learning-compact-card) :is(h3,h4,p,span,small){color:var(--p-text)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home .learning-stats>div strong{color:var(--p-gold-ink)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home .learning-compact-card{border-radius:12px!important;box-shadow:none!important;background:var(--p-raised)!important;border:1px solid var(--p-border)!important}
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home .learning-compact-card{background:var(--p-muted-surface)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home .learning-compact-card .learning-context{color:var(--p-text-muted)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home progress{background:var(--p-border)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home progress::-webkit-progress-bar{background:var(--p-border)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home progress::-webkit-progress-value{background:var(--p-teal)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home progress::-moz-progress-bar{background:var(--p-teal)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home :is(button,summary){min-height:44px;border-radius:10px!important;box-shadow:none!important;font-weight:600!important;padding:9px 16px!important;transition:background-color var(--p-fast),border-color var(--p-fast),color var(--p-fast)}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home :is(.learning-actions>button,div>button:only-child){background:var(--p-accent)!important;color:var(--p-on-accent)!important;border:0!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home .learning-list-heading button{background:transparent!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home summary{background:transparent!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home :is(button,summary):focus-visible{outline:2px solid var(--p-focus)!important;outline-offset:2px}

/* ---------- «حصصي» ---------- */
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel{border-radius:16px!important;box-shadow:var(--p-shadow-card)!important;animation:p-in .18s ease-out both;
  background:var(--p-surface)!important;border:1px solid var(--p-border)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel :is(h2,h3,strong,p,span){color:var(--p-text)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel .home-live-icon{background:linear-gradient(160deg,color-mix(in srgb,#B9502D 20%,var(--p-raised)),color-mix(in srgb,#B9502D 9%,var(--p-raised)))!important;box-shadow:inset 0 0 0 1px rgba(185,80,45,.25),0 2px 6px rgb(9 24 39 / 12%)!important;color:#B9502D!important;border-radius:12px!important}
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel .home-live-icon{color:#F2A88F!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel button{min-height:44px;border-radius:10px!important;box-shadow:none!important;background:var(--p-secondary)!important;color:var(--p-on-secondary)!important;border:0!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel button:focus-visible{outline:2px solid var(--p-focus)!important;outline-offset:2px}

/* ---------- contact button follows the identity ---------- */
html:not(#p) body .mr-contact-fab{background:var(--p-accent)!important;color:var(--p-on-accent)!important;box-shadow:0 6px 16px rgb(9 24 39 / 30%)!important;border:1px solid rgba(9,24,39,.12)!important;transition:box-shadow var(--p-fast)!important}
html:not(#p) body .mr-contact-fab:hover{transform:none!important;box-shadow:0 8px 20px rgb(9 24 39 / 38%)!important}

/* ---------- motion (§9): one short fade when the home opens; hover changes colour/border/shadow only ---------- */
@keyframes p-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(2){animation-delay:40ms}
html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(3){animation-delay:80ms}
html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(4){animation-delay:120ms}
html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(5){animation-delay:160ms}
html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(n+6){animation-delay:200ms}
@media (prefers-reduced-motion:reduce){
  html body:has(#gateway-results .student-home-card) #gateway-results>*,
  html body:has(#gateway-results .student-home-card) #gateway-workspace :is(.student-home-card,.learning-home,.home-live-panel){animation:none!important;transition:none!important}
}

/* =====================================================================================================
   «الطابع الزجاجي» (owner, 30 Nov): the 3D shapes read as glass — clear tinted body, bright rim,
   a top-left reflection and a soft inner glow. Applies to the hero cube + sphere and to every 3D icon tile.
   ===================================================================================================== */
html:not(#p) body #home .id3d-cube{filter:none!important}
html:not(#p) body #home .id3d-cube span{
  background:linear-gradient(135deg,rgba(255,255,255,.62) 0%,rgba(255,240,205,.22) 38%,rgba(217,174,85,.20) 70%,rgba(190,150,70,.32) 100%)!important;
  border:1px solid rgba(255,255,255,.75)!important;border-radius:14px!important;
  box-shadow:inset 0 0 0 1px rgba(217,174,85,.35),inset 0 0 22px rgba(255,255,255,.35),inset -10px -12px 22px rgba(169,120,44,.22)!important;
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
html:not(#p) body #home .id3d-cube span:nth-child(6){background:linear-gradient(135deg,rgba(169,120,44,.35),rgba(120,84,30,.45))!important}
html:not(#p) body #home .id3d-cube span:nth-child(5){background:linear-gradient(135deg,rgba(255,255,255,.8),rgba(255,236,190,.35))!important}
html:not(#p) body #home .id3d-sphere{
  background:
    radial-gradient(circle at 30% 24%,rgba(255,255,255,.95) 0 5%,rgba(255,255,255,.35) 14%,rgba(255,255,255,0) 34%),
    radial-gradient(circle at 70% 82%,rgba(160,232,224,.75) 0%,rgba(74,185,174,.42) 38%,rgba(19,62,76,.28) 70%,rgba(19,62,76,.12) 100%)!important;
  border:1px solid rgba(255,255,255,.7)!important;
  box-shadow:inset -10px -14px 26px rgba(19,62,76,.30),inset 8px 8px 18px rgba(255,255,255,.45),0 18px 30px rgb(9 24 39 / 22%)!important;
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}

/* glass reflection on the 3D icon tiles (a white top-left sheen over the tinted body + bright rim) */
html:not(#p) body :is(#gateway-workspace .student-home-card .student-home-icon,#home .tile i,#gateway-workspace .home-live-panel .home-live-icon){
  background-image:radial-gradient(120% 75% at 28% 0%,rgba(255,255,255,.75),rgba(255,255,255,0) 58%),linear-gradient(160deg,color-mix(in srgb,var(--p-acc,var(--l-acc,#2E8C83)) 22%,rgba(255,255,255,.55)),color-mix(in srgb,var(--p-acc,var(--l-acc,#2E8C83)) 14%,rgba(255,255,255,.2)))!important;
  border:1px solid rgba(255,255,255,.75)!important}
html:not(#p) body #gateway-workspace .gateway-card[data-node-type]::before,html:not(#p) body #home .card:before{
  background-image:radial-gradient(120% 75% at 28% 0%,rgba(255,255,255,.75),rgba(255,255,255,0) 58%),linear-gradient(160deg,color-mix(in srgb,var(--c3-acc,var(--l-acc,#2E8C83)) 22%,rgba(255,255,255,.55)),color-mix(in srgb,var(--c3-acc,var(--l-acc,#2E8C83)) 14%,rgba(255,255,255,.2)))!important;
  outline:1px solid rgba(255,255,255,.75);outline-offset:-1px}
html:not(#p) body #gateway-workspace .gateway-item[data-item-type]::after{
  background:var(--c3-icon) center/24px no-repeat,radial-gradient(120% 75% at 28% 0%,rgba(255,255,255,.75),rgba(255,255,255,0) 58%),linear-gradient(160deg,color-mix(in srgb,var(--c3-acc) 24%,rgba(255,255,255,.6)),color-mix(in srgb,var(--c3-acc) 16%,rgba(255,255,255,.25)))!important;
  outline:1px solid rgba(255,255,255,.75);outline-offset:-1px}
/* dark: the same glass, tinted deeper, rim a little dimmer */
html:not([data-theme="light"]):not(#p) body :is(#gateway-workspace .student-home-card .student-home-icon,#home .tile i,#gateway-workspace .home-live-panel .home-live-icon){
  background-image:radial-gradient(120% 75% at 28% 0%,rgba(255,255,255,.32),rgba(255,255,255,0) 58%),linear-gradient(160deg,color-mix(in srgb,var(--p-acc,var(--l-acc,#2E8C83)) 42%,rgba(255,255,255,.08)),color-mix(in srgb,var(--p-acc,var(--l-acc,#2E8C83)) 22%,rgba(255,255,255,.02)))!important;
  border-color:rgba(255,255,255,.28)!important}
html:not([data-theme="light"]):not(#p) body #gateway-workspace .gateway-card[data-node-type]::before,html:not([data-theme="light"]):not(#p) body #home .card:before{
  background-image:radial-gradient(120% 75% at 28% 0%,rgba(255,255,255,.32),rgba(255,255,255,0) 58%),linear-gradient(160deg,color-mix(in srgb,var(--c3-acc,var(--l-acc,#2E8C83)) 42%,rgba(255,255,255,.08)),color-mix(in srgb,var(--c3-acc,var(--l-acc,#2E8C83)) 22%,rgba(255,255,255,.02)))!important;
  outline-color:rgba(255,255,255,.28)}
html:not([data-theme="light"]):not(#p) body #gateway-workspace .gateway-item[data-item-type]::after{
  background:var(--c3-icon) center/24px no-repeat,radial-gradient(120% 75% at 28% 0%,rgba(255,255,255,.55),rgba(255,255,255,0) 58%),linear-gradient(160deg,color-mix(in srgb,var(--c3-acc) 45%,#fff),color-mix(in srgb,var(--c3-acc) 65%,#fff))!important;
  outline-color:rgba(255,255,255,.5)}

/* =====================================================================================================
   LAYOUT like the identity boards (owner, 30 Nov: «ملمومة… زحمة بس منظمة»). Presentation only.
   ===================================================================================================== */
/* ---- home: big welcome, compact destinations (icon, title, one line, chevron), then progress / live / subscriptions ---- */
html body:has(#gateway-results .student-home-card) .gateway-identity #student-email{display:block;font-family:var(--id-head,'Alexandria',sans-serif);font-size:clamp(1.5rem,1.1rem + 1.4vw,2rem);font-weight:700;line-height:1.4;color:var(--p-text)!important;margin:4px 0 2px}
html body:has(#gateway-results .student-home-card) #gateway-title{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html body:has(#gateway-results .student-home-card) #gateway-results{gap:12px!important;align-items:stretch}
html body:has(#gateway-results .student-home-card) #gateway-results>.learning-home{order:2}
html body:has(#gateway-results .student-home-card) #gateway-results>.home-live-panel{order:3}
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card[data-section="subscriptions"]{order:4}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]){
  position:relative;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;text-align:center!important;
  gap:8px!important;min-height:132px!important;padding:16px 12px 30px!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card>small:empty{display:none}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card>strong{font-size:1rem!important;line-height:1.4}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card>span:not(.student-home-icon){display:block;color:var(--p-text-muted)!important;font-size:.82rem;line-height:1.5}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card>span:not(.student-home-icon):empty{display:none}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card::after{content:""!important;display:block!important;position:absolute;bottom:10px;inset-inline-end:12px;width:18px!important;height:18px!important;border:0!important;border-radius:0!important;transform:none!important;background:var(--p-gold-ink)!important;opacity:.85;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 6l-6 6 6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 6l-6 6 6 6'/%3E%3C/svg%3E") center/contain no-repeat}
html[dir="ltr"] body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card::after{transform:scaleX(-1)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"]{flex-direction:row!important;justify-content:flex-start!important;text-align:start!important;gap:14px!important;min-height:72px!important;padding:12px 18px!important;position:relative}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"]>span:not(.student-home-icon){color:rgba(244,240,230,.78)!important;margin-inline-start:auto;padding-inline-end:22px}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"]::after{background:rgba(244,240,230,.8)!important;bottom:auto;top:50%;margin-top:-7px}
@media (min-width:1024px){
  html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]){align-items:center!important}
}
@media (max-width:639px){
  html body:has(#gateway-results .student-home-card) #gateway-results{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]){min-height:116px!important;padding:14px 10px 26px!important}
  html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card[data-section="subscriptions"]>span:not(.student-home-icon){display:none}
}

/* ---- content pages (board 03/05): compact level bar, unit rows, lesson rows ---- */
html:not(#p) body #gateway-workspace .workspace{display:flex;flex-direction:column}
html:not(#p) body #gateway-workspace .workspace>#gateway-path{order:-1;font-size:.88rem;margin:0 0 2px}
html:not(#p) body #gateway-workspace .workspace>#gateway-title{margin:0 0 6px}
/* upper levels = one compact bar per level (label + pills); the chosen pill is gold */
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 0!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>h3{flex:0 0 auto;min-width:120px;margin:0;font-size:.85rem!important;font-weight:600!important;color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid{display:flex!important;flex-wrap:wrap;gap:8px;margin:0!important;flex:1 1 300px}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card{min-height:40px!important;padding:6px 14px!important;padding-inline-start:14px!important;border-radius:999px!important;flex-direction:row!important;align-items:center;gap:6px;box-shadow:0 1px 0 var(--p-edge)!important;width:auto}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card::before,html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card::after{display:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card>:is(small,span){display:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card>strong{font-size:.9rem!important;font-weight:600!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]{background:var(--p-accent)!important;border-color:var(--p-accent)!important;box-shadow:0 1px 0 var(--p-gold-edge)!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]>strong{color:var(--p-on-accent)!important}
/* current level title + its actions in one line */
html:not(#p) body #gateway-workspace .gateway-node-view>.path-current-level{font-size:1.35rem!important;margin:14px 0 8px!important}
html:not(#p) body #gateway-workspace .gateway-node-view>.live-action{display:inline-flex;margin:0 0 8px;margin-inline-end:8px;min-height:40px!important;padding:6px 14px!important;font-size:.88rem}
/* children = rows in two columns; lessons / files = full-width rows */
html:not(#p) body #gateway-workspace .gateway-node-view>.gateway-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important;margin-top:8px!important}
html:not(#p) body #gateway-workspace .gateway-node-view>.gateway-grid>.gateway-card{min-height:68px!important;padding-block:10px!important}
html:not(#p) body #gateway-workspace .gateway-node-view>.gateway-grid>.gateway-card[data-node-type]{padding-inline-start:72px!important}
html:not(#p) body #gateway-workspace .gateway-node-view>.gateway-grid>.gateway-card[data-node-type]::before,
html:not(#p) body #gateway-workspace .gateway-node-view>.gateway-grid>.gateway-card[data-node-type]::after{width:44px!important;height:44px!important;margin-top:-22px!important;inset-inline-start:14px!important;border-radius:12px!important}
html:not(#p) body #gateway-workspace .gateway-node-view>.gateway-grid>:is(.gateway-item,.content-inline-slot,.content-filters){grid-column:1/-1}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]{
  display:grid!important;grid-template-columns:112px minmax(0,1fr) auto;column-gap:16px;row-gap:2px;align-items:center;padding:12px!important;gap:2px 16px!important;min-height:96px}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]::before{grid-column:1;grid-row:1 / span 6;align-self:center;height:72px!important;margin:0!important;border-radius:10px!important;width:112px}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]::after{top:50%!important;margin-top:-20px!important;left:auto!important;margin-left:0!important;inset-inline-start:48px!important;width:40px!important;height:40px!important;border-radius:11px!important;background-size:20px,auto,auto!important}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>*{grid-column:2;min-width:0}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>small:first-child{justify-self:start;font-size:.72rem!important;padding:1px 8px!important}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>h3{margin:0!important;font-size:1rem!important;line-height:1.45}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>p{margin:0!important;font-size:.85rem}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>:is(button,a.live-action,.live-action){grid-column:3;grid-row:1 / span 6;align-self:center;justify-self:end;white-space:nowrap;padding-inline:18px!important}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>.learning-progress-state{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;width:100%}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>.learning-progress-state progress{flex:1 1 140px;max-width:260px;height:6px}
html:not(#p) body #gateway-workspace .gateway-node-view .content-inline-slot{grid-column:1/-1}
@media (max-width:639px){
  html:not(#p) body #gateway-workspace .gateway-node-view>.gateway-grid{grid-template-columns:1fr}
  html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>h3{min-width:0;flex-basis:100%}
  html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]{grid-template-columns:76px minmax(0,1fr)}
  html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]::before{width:76px;height:56px!important}
  html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]::after{inset-inline-start:30px!important;width:34px!important;height:34px!important;margin-top:-17px!important}
  html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>:is(button,a.live-action,.live-action){grid-column:2;grid-row:auto;justify-self:start;margin-top:6px}
}
html:not(#p) body #gateway-workspace .workspace{position:relative}
html:not(#p) body #gateway-workspace .workspace>#gateway-message:empty{display:none}
html:not(#p) body #gateway-workspace #gateway-results.gateway-node-view{position:static}
@media (min-width:640px){
  html:not(#p) body #gateway-workspace #gateway-results>.gateway-back:first-child{position:absolute;top:0;inset-inline-end:0;margin:0!important}
}
html:not(#p) body #gateway-workspace .gateway-back::before{content:"";display:inline-block;width:14px;height:14px;margin-inline-end:6px;vertical-align:-2px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat}
html[dir="ltr"]:not(#p) body #gateway-workspace .gateway-back::before{transform:scaleX(-1)}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]{row-gap:0!important;min-height:88px}
html:not(#p) body #gateway-workspace .gateway-node-view .gateway-item[data-item-type]>.learning-progress-state{font-size:.82rem}

/* ---- plans (board 04): three clear cards — name, big price, old price + discount, ✓ features — and the summary at the end ---- */
html:not(#p) body #gateway-workspace #gateway-results:has(.plan-choice){display:grid!important;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px!important;align-items:stretch}
html:not(#p) body #gateway-workspace #gateway-results:has(.plan-choice)>.plan-selection{order:10;grid-column:1/-1}
html:not(#p) body #gateway-workspace #gateway-results:has(.plan-choice)>:is(.live-action,.gateway-back,.gateway-empty){grid-column:1/-1;justify-self:start}
html:not(#p) body #gateway-workspace .plan-choice{position:relative;display:block;cursor:pointer}
html:not(#p) body #gateway-workspace .plan-choice>input{position:absolute;top:16px;inset-inline-end:16px;width:20px;height:20px;z-index:2;margin:0}
html:not(#p) body #gateway-workspace .plan-choice>.gateway-card{height:100%;display:flex;flex-direction:column;gap:8px;padding:18px!important;text-align:start}
html:not(#p) body #gateway-workspace .plan-choice>.gateway-card>small{color:var(--p-gold-ink)!important}
html:not(#p) body #gateway-workspace .plan-choice>.gateway-card>strong{font-size:1.15rem!important;padding-inline-end:28px}
html:not(#p) body #gateway-workspace .gateway-card>.plan-price{display:block;font-family:var(--id-head,'Alexandria',sans-serif);font-size:1.6rem;font-weight:700;color:var(--p-text)!important;line-height:1.3;direction:ltr;text-align:end}
html[dir="ltr"]:not(#p) body #gateway-workspace .gateway-card>.plan-price{text-align:start}
html:not(#p) body #gateway-workspace .plan-discount-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
html:not(#p) body #gateway-workspace .plan-old-price{color:var(--p-text-muted);font-size:.9rem;direction:ltr}
html:not(#p) body #gateway-workspace .plan-discount-badge{padding:2px 10px;font-size:.8rem;font-weight:700}
html:not(#p) body #gateway-workspace .plan-scope,html:not(#p) body #gateway-workspace .plan-period,html:not(#p) body #gateway-workspace .plan-note{display:block;color:var(--p-text-muted)!important;font-size:.85rem;line-height:1.6}
html:not(#p) body #gateway-workspace .plan-features{list-style:none;margin:6px 0 2px;padding:10px 0 0;border-top:1px solid var(--p-border);display:grid;gap:6px}
html:not(#p) body #gateway-workspace .plan-features li{position:relative;padding-inline-start:24px;color:var(--p-text);font-size:.9rem;line-height:1.5}
html:not(#p) body #gateway-workspace .plan-features li::before{content:"";position:absolute;inset-inline-start:0;top:3px;width:16px;height:16px;background:#146C43;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat}
html:not([data-theme="light"]):not(#p) body #gateway-workspace .plan-features li::before{background:#8CE3B5}
html:not(#p) body #gateway-workspace .plan-choice:has(input:checked)>.gateway-card{background:color-mix(in srgb,var(--p-accent) 8%,var(--p-surface))!important}
html:not(#p) body #gateway-workspace .plan-selection{display:grid;grid-template-columns:1fr auto;gap:10px 16px;align-items:center;padding:16px 18px!important}
html:not(#p) body #gateway-workspace .plan-selection>strong{grid-column:1/-1;font-size:1.05rem}
@media (max-width:639px){html:not(#p) body #gateway-workspace .plan-selection{grid-template-columns:1fr}}

/* ---- «حصصي» (board 07): compact class cards; the class running now is marked teal, its «انضم» is the primary action ---- */
html:not(#p) body #gateway-workspace #gateway-results:has(> .gateway-card[data-live-state]),html:not(#p) body #gateway-workspace #gateway-results:has(> article.gateway-card > .live-action){display:grid!important;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px!important;align-items:stretch}
html:not(#p) body #gateway-workspace #gateway-results>article.gateway-card:has(> .live-action){display:flex;flex-direction:column;gap:6px;padding:16px!important}
html:not(#p) body #gateway-workspace #gateway-results>article.gateway-card:has(> .live-action)>small{display:inline-flex;align-items:center;gap:6px}
html:not(#p) body #gateway-workspace #gateway-results>article.gateway-card:has(> .live-action)>small::before{content:"";width:14px;height:14px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat}
html:not(#p) body #gateway-workspace #gateway-results>article.gateway-card:has(> .live-action)>.live-action{margin-top:auto;align-self:flex-start}
html:not(#p) body #gateway-workspace #gateway-results>.gateway-card[data-live-state]{order:-1}
html:not(#p) body #gateway-workspace #gateway-results>.gateway-card[data-live-state="live"]{border:2px solid var(--p-teal)!important;background:color-mix(in srgb,var(--p-teal) 9%,var(--p-surface))!important}
html:not(#p) body #gateway-workspace #gateway-results>.gateway-card[data-live-state="live"]>small{color:#1F7F76!important;font-weight:700}
html:not([data-theme="light"]):not(#p) body #gateway-workspace #gateway-results>.gateway-card[data-live-state="live"]>small{color:#8BE3D8!important}
html:not(#p) body #gateway-workspace #gateway-results>article.gateway-card[data-live-state="live"]:has(> .live-action)>small::before{border-radius:50%;width:9px;height:9px;-webkit-mask:none;mask:none;background:#D64545;box-shadow:0 0 0 3px rgba(214,69,69,.18)}
html:not(#p) body #gateway-workspace #gateway-results>.gateway-card[data-live-state] button.live-action:nth-of-type(2){background:var(--p-accent)!important;color:var(--p-on-accent)!important;border:0!important;box-shadow:0 2px 0 var(--p-gold-edge)!important;font-weight:700!important}
html:not(#p) body #gateway-workspace #gateway-results>.gateway-card[data-live-state] .live-note{color:var(--p-text-muted)!important;font-size:.85rem}

/* ---- quiz player (board 08): question card, spaced options, the chosen one gold ---- */
html:not(#p) body #gateway-workspace .quiz-player{gap:14px}
html:not(#p) body #gateway-workspace .quiz-toolbar{background:var(--p-surface);border:1px solid var(--p-border);border-radius:14px;padding:10px 14px;box-shadow:var(--p-shadow-card)}
html:not(#p) body #gateway-workspace .quiz-toolbar :is(span,strong,p,label){color:var(--p-text)!important}
html:not(#p) body #gateway-workspace :is(.quiz-status,.quiz-save-state){color:var(--p-text-muted)!important;font-size:.88rem}
html:not(#p) body #gateway-workspace .quiz-question{background:var(--p-surface)!important;border:1px solid var(--p-border)!important;border-radius:16px!important;box-shadow:0 2px 0 var(--p-edge),var(--p-shadow-card)!important;color:var(--p-text)!important}
html:not(#p) body #gateway-workspace .quiz-question legend{color:var(--p-text)!important;font-size:1.1rem;font-weight:700;line-height:1.6}
html:not(#p) body #gateway-workspace .quiz-option{min-height:52px;border-radius:12px!important;border:1px solid var(--p-border)!important;background:var(--p-raised)!important;color:var(--p-text)!important;transition:border-color var(--p-fast),background-color var(--p-fast)}
html:not(#p) body #gateway-workspace .quiz-option:hover{border-color:color-mix(in srgb,var(--p-accent) 70%,var(--p-border))!important}
html:not(#p) body #gateway-workspace .quiz-option:has(input:checked){border-color:var(--p-accent)!important;background:color-mix(in srgb,var(--p-accent) 14%,var(--p-raised))!important;outline:0!important}
html:not(#p) body #gateway-workspace .quiz-option input{accent-color:#B98F3B}
html:not(#p) body #gateway-workspace .quiz-question textarea{background:var(--p-raised)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;border-radius:12px!important}
html:not(#p) body #gateway-workspace .quiz-player>button,html:not(#p) body #gateway-workspace .quiz-player .quiz-toolbar button{min-height:44px;border-radius:10px!important;font-weight:700!important;background:var(--p-surface)!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge)!important}
html:not(#p) body #gateway-workspace .quiz-player>button[type="submit"],html:not(#p) body #gateway-workspace .quiz-player>button:last-of-type{background:var(--p-accent)!important;color:var(--p-on-accent)!important;border:0!important;box-shadow:0 2px 0 var(--p-gold-edge)!important}

/* ---- results / assignments / subscriptions / notifications / favorites / search: compact cards in a tidy grid ---- */
html:not(#p) body #gateway-workspace #gateway-results:not(.gateway-node-view):not(:has(.student-home-card)):not(:has(.plan-choice)):has(> .gateway-card){gap:12px!important}
html:not(#p) body #gateway-workspace #gateway-results:not(.gateway-node-view)>.gateway-card:not(.student-home-card){padding:14px 16px!important;min-height:0}
html:not(#p) body #gateway-workspace #gateway-results:not(.gateway-node-view)>.gateway-card:not(.student-home-card)>span{white-space:pre-line;font-size:.88rem;line-height:1.7}

/* ---- path chain (owner, 30 Nov): only what the student chose stays on screen, one card under the other with an arrow;
        the choices of the current level are the only list. Tapping a chain card reopens that level (existing behaviour). ---- */
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:0!important;padding:0!important;border:0!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>h3{display:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level:first-of-type>h3{display:flex!important;align-items:center;gap:10px;min-width:0;margin:0!important;padding:12px 18px;border-radius:14px;
  background:var(--p-secondary);color:var(--p-on-secondary)!important;font-family:var(--id-head,'Alexandria',sans-serif);font-size:1rem!important;font-weight:700!important;box-shadow:0 2px 0 rgba(0,0,0,.25)}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:0!important;margin:0!important;flex:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="false"]{display:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center;gap:2px!important;min-width:min(320px,100%);min-height:60px!important;
  padding:8px 18px!important;padding-inline-start:68px!important;border-radius:14px!important;
  background:var(--p-surface)!important;border:1.5px solid var(--p-accent)!important;box-shadow:0 2px 0 var(--p-edge),var(--p-shadow-card)!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]>strong{color:var(--p-text)!important;font-size:.98rem!important;font-weight:700!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]>small{display:block!important;font-size:.75rem;color:var(--p-gold-ink)!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]>span{display:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"][data-node-type]::before,
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"][data-node-type]::after{display:block!important;width:40px!important;height:40px!important;margin-top:-20px!important;inset-inline-start:14px!important;border-radius:11px!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"][data-node-type="grade"][data-ordinal]::before{display:grid!important;place-items:center;font-size:1.5rem}
/* the arrow above every chosen card, and one more before the current choices */
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid::before,
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level:last-of-type::after{content:"";display:block;width:22px;height:26px;margin:4px 0;margin-inline-start:34px;background:var(--p-gold-ink);opacity:.9;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v22M5 17l7 7 7-7'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v22M5 17l7 7 7-7'/%3E%3C/svg%3E") center/contain no-repeat}
/* the current level's name repeats the last chain card, so it is only kept when there is no chain (first level) */
html:not(#p) body #gateway-workspace .gateway-node-view:has(.path-ancestor-level)>.path-current-level{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html:not(#p) body #gateway-workspace .gateway-node-view>.path-current-level{margin-top:6px!important}
html:not(#p) body #gateway-workspace .gateway-node-view:has(.path-ancestor-level)>.live-action{margin-top:4px}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]{width:320px;max-width:100%}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level:first-of-type>h3{width:320px;max-width:100%;box-sizing:border-box}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"][data-node-type="grade"][data-ordinal]::after{display:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"][data-node-type="grade"][data-ordinal]::before{background:none!important;box-shadow:none!important;outline:0!important;color:var(--p-gold-ink)!important;font-family:var(--id-head,'Alexandria',sans-serif);font-weight:800}
/* owner 30 Nov: no arrows between the chosen cards — only the chosen card of each level stays, stacked with a small gap */
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid::before,html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level:last-of-type::after{display:none!important;content:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level{margin:0 0 8px!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level:first-of-type>h3{margin-bottom:8px!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level:last-of-type{margin-bottom:16px!important}
/* first page of a path (nothing chosen yet): the section name is the same petrol card, then its choices */
html:not(#p) body #gateway-workspace .gateway-node-view:not(:has(.path-ancestor-level))>.path-current-level{display:flex!important;align-items:center;width:320px;max-width:100%;box-sizing:border-box;margin:0 0 12px!important;padding:12px 18px;border-radius:14px;background:var(--p-secondary);color:var(--p-on-secondary)!important;font-family:var(--id-head,'Alexandria',sans-serif);font-size:1rem!important;font-weight:700!important;box-shadow:0 2px 0 rgba(0,0,0,.25)}

/* =====================================================================================================
   HOME v2 (owner picture, 30 Nov): welcome + books, 4 content cards in a row, the next class wide + live card,
   subscriptions as a petrol bar, progress last. Cards lean 3D (face gradient, solid bottom edge, soft shadow, top sheen).
   ===================================================================================================== */
html body:has(#gateway-results .student-home-card) .gateway-identity{position:relative;min-height:118px;padding-inline-end:230px;margin-bottom:8px;
  background:url("icons/home-books.svg") no-repeat;background-size:210px auto;background-position:left 8px center}
html[dir="ltr"] body:has(#gateway-results .student-home-card) .gateway-identity{background-position:right 8px center}
html body:has(#gateway-results .student-home-card) .gateway-identity::after{content:"جاهز لمواصلة رحلتك التعليمية؟";display:block;color:var(--p-text-muted);font-size:1rem;margin-top:2px}
html:lang(en) body:has(#gateway-results .student-home-card) .gateway-identity::after{content:"Ready to continue your learning journey?"}
html:lang(fr) body:has(#gateway-results .student-home-card) .gateway-identity::after{content:"Prêt à poursuivre ton parcours ?"}
html body:has(#gateway-results .student-home-card) .gateway-identity #student-email{font-size:clamp(1.6rem,1.1rem + 1.8vw,2.3rem)!important;font-weight:800!important}
html body:has(#gateway-results .student-home-card) #gateway-results{max-width:none!important;width:100%!important;grid-auto-flow:row dense}
/* order: content, then next class + live card, then plans / subscriptions bars, then progress */
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card{order:1}
html body:has(#gateway-results .student-home-card) #gateway-results>.home-live-panel{order:2!important}
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card[data-home-role="live"]{order:3!important}
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card:is([data-section="plans"],[data-section="subscriptions"]){order:4!important}
html body:has(#gateway-results .student-home-card) #gateway-results>.learning-home{order:5!important;grid-column:1/-1}
/* 3D face for every home card */
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]),
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel{
  background:linear-gradient(180deg,var(--p-raised) 0%,var(--p-surface) 100%)!important;border:1px solid var(--p-border)!important;border-inline-start-width:1px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 3px 0 var(--p-edge),0 12px 26px rgb(9 24 39 / 10%)!important}
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]),
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel{
  background:linear-gradient(180deg,color-mix(in srgb,var(--p-raised) 92%,#fff 8%) 0%,var(--p-surface) 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 3px 0 rgba(0,0,0,.45),0 14px 28px rgb(0 0 0 / 30%)!important}
@media(hover:hover){html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]):hover{border-color:color-mix(in srgb,var(--p-accent) 70%,var(--p-border))!important}}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon{width:52px!important;height:52px!important;border-radius:14px!important}
/* bars: plans = light bar, subscriptions = petrol bar; together they share the row */
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card[data-section="subscriptions"]{grid-column:1/-1;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 3px 0 rgba(0,0,0,.35),0 12px 24px rgb(9 24 39 / 18%)!important}
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card[data-section="plans"]{grid-column:1/-1;flex-direction:row!important;justify-content:flex-start!important;text-align:start!important;align-items:center!important;min-height:72px!important;padding:12px 18px!important;gap:14px!important}
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card[data-section="plans"]>span:not(.student-home-icon){margin-inline-start:auto;padding-inline-end:22px}
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card[data-section="plans"]::after{bottom:auto!important;top:50%;margin-top:-9px}
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card:is([data-section="plans"],[data-section="subscriptions"]) .student-home-icon{width:44px!important;height:44px!important}
@media (min-width:1024px){
  html body:has(#gateway-results .student-home-card) #gateway-results:has(>[data-section="plans"]):has(>[data-section="subscriptions"])>.student-home-card:is([data-section="plans"],[data-section="subscriptions"]){grid-column:span 2}
  html body:has(#gateway-results .student-home-card) #gateway-results>.home-live-panel{grid-column:span 3}
  html body:has(#gateway-results .student-home-card) #gateway-results:not(:has(>[data-home-role="live"]))>.home-live-panel{grid-column:1/-1}
}
/* next class: heading row, details on the start side, join button on the end side */
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel{display:grid!important;grid-template-columns:1fr auto;align-items:center;column-gap:16px;row-gap:4px;padding:16px 18px!important;margin:0!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>.home-live-heading{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin-bottom:6px}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>.home-live-heading h3{font-size:1.15rem!important;font-weight:800!important;margin:0}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>:is(h4,p){grid-column:1;margin:0!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>h4{font-size:1rem!important;font-weight:700;color:var(--p-text)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>p{color:var(--p-text-muted)!important;font-size:.85rem}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>.home-live-actions{grid-column:2;grid-row:2/span 3;display:flex;flex-direction:column;gap:8px;margin:0!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>.home-live-actions>button:first-child{box-shadow:0 3px 0 rgba(0,0,0,.35)!important;font-weight:700!important;padding-inline:22px!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>.home-live-actions>button+button{background:transparent!important;color:var(--p-text)!important;border:1px solid var(--p-border)!important}
@media (max-width:639px){
  html body:has(#gateway-results .student-home-card) .gateway-identity{padding-inline-end:120px;min-height:84px;background-size:110px auto}
  html body:has(#gateway-results .student-home-card) .gateway-identity::after{font-size:.85rem}
  html body:has(#gateway-results .student-home-card) #gateway-results>.home-live-panel{grid-column:1/-1}
  html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel{grid-template-columns:1fr}
  html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>.home-live-actions{grid-column:1;grid-row:auto;flex-direction:row;flex-wrap:wrap;margin-top:8px!important}
}
html body:has(#gateway-results .student-home-card) .gateway-identity{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:flex-start!important}
html[data-theme] body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card.id-card-color,html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card.id-card-color{border-inline-start:1px solid var(--p-border)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel .home-live-status{margin-inline-start:auto;padding:3px 10px;border-radius:999px;font-size:.78rem;font-weight:700;background:color-mix(in srgb,#C0392B 12%,transparent);color:#B3261E!important}
html:not([data-theme="light"]) body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel .home-live-status{color:#FF8A80!important}
/* ---------- home announcement banner (owner, 30 Nov): the admin's published ad image, as a short strip about twice
   the height of a bar, right above the home cards; same rotation, dots and actions as everywhere else ---------- */
html:not(#p) body #home-ads.ad-campaigns{max-width:none;margin:0 0 14px;padding:0}
html:not(#p) body #home-ads.ad-campaigns .ad-viewport{height:clamp(96px,9vw,120px);border-radius:16px;border:1px solid var(--p-border);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 3px 0 var(--p-edge),0 12px 26px rgb(9 24 39 / 12%)}
html:not([data-theme="light"]) body #home-ads.ad-campaigns .ad-viewport{box-shadow:0 3px 0 rgba(0,0,0,.45),0 14px 28px rgb(0 0 0 / 30%)}
html:not(#p) body #home-ads.ad-campaigns .ad-controls{padding:2px 0 0}
html:not(#p) body #home-ads.ad-campaigns .ad-dot::before{width:7px;height:7px;background:var(--p-border);box-shadow:none}
html:not(#p) body #home-ads.ad-campaigns .ad-dot[aria-pressed=true]::before{background:var(--p-accent)}
@media (max-width:600px){html:not(#p) body #home-ads.ad-campaigns .ad-viewport{height:clamp(84px,24vw,120px)}}

/* =====================================================================================================
   SIGNATURE (owner, 1 Dec): «أفضل ميزة من كل تصميم» — the navy + gold night look of the redesign
   (#050a17 / gold #F2C46D→#C58A2E, glass surfaces, gold gradient name, progress ring, banner progress bars)
   on top of our own structure (chain paths, 3D card edge, home order). Petrol stays as the teal companion.
   Light mode = «ذهب النهار»: warm ivory, navy ink, the same gold, a navy glass header.
   Motion: colour/border/shadow only + one soft fade-in of the home cards (off with reduced motion).
   Blur only on the header (cheap on phones).
   ===================================================================================================== */
html:not(#p) body{
  --p-page:#F5F1E8;--p-surface:#FFFDF8;--p-raised:#FFFFFF;--p-muted-surface:#EFE9DC;--p-header:#0B1A33;
  --p-text:#0B1A33;--p-text-muted:#56627A;--p-on-header:#F3EEE2;--p-border:#E2DACB;
  --p-accent:#E2B25A;--p-on-accent:#1C1406;--p-secondary:#0F2447;--p-on-secondary:#FFFFFF;
  --p-focus:#1F7F76;--p-teal:#17806B;--p-gold-ink:#8A6320;--p-edge:#D8CDB6;--p-gold-edge:#B07D2C;
  --s-gold:linear-gradient(135deg,#F6D58A 0%,#E2B25A 45%,#C58A2E 100%);
  --s-gold-text:linear-gradient(90deg,#9A6A1E 0%,#C58A2E 35%,#B8862F 65%,#8A5C17 100%);
  --s-glow-a:rgb(226 178 90 / 16%);--s-glow-b:rgb(23 128 107 / 9%);
  --s-card:linear-gradient(180deg,#FFFFFF 0%,#FBF7EF 100%);
  --s-sheen:inset 0 1px 0 rgba(255,255,255,.9);
  --s-shadow:0 3px 0 var(--p-edge),0 14px 30px rgb(11 26 51 / 9%);
  --s-hover:0 3px 0 var(--p-gold-edge),0 18px 34px rgb(197 138 46 / 18%);
  --s-header:rgb(11 26 51 / 90%);
}
html:not([data-theme="light"]):not(#p) body{
  --p-page:#050A17;--p-surface:#0B1328;--p-raised:#111C38;--p-muted-surface:#0A1224;--p-header:#050A17;
  --p-text:#EEF2FA;--p-text-muted:#9AA6BF;--p-on-header:#EEF2FA;--p-border:#1E2A47;
  --p-accent:#F2C46D;--p-on-accent:#1C1406;--p-secondary:#13244A;--p-on-secondary:#EEF2FA;
  --p-focus:#4FD1B0;--p-teal:#4FD1B0;--p-gold-ink:#F2C46D;--p-edge:#02050C;--p-gold-edge:#8C6220;
  --s-gold-text:linear-gradient(90deg,#F6D58A 0%,#F2C46D 30%,#FFF1CC 50%,#F2C46D 70%,#C58A2E 100%);
  --s-glow-a:rgb(242 196 109 / 10%);--s-glow-b:rgb(79 209 176 / 7%);
  --s-card:linear-gradient(180deg,rgb(255 255 255 / 5.5%) 0%,rgb(255 255 255 / 2%) 100%),#0B1328;
  --s-sheen:inset 0 1px 0 rgba(255,255,255,.07);
  --s-shadow:0 3px 0 #02050C,0 16px 34px rgb(0 0 0 / 38%);
  --s-hover:0 3px 0 #02050C,0 0 0 1px rgb(242 196 109 / 28%),0 18px 40px rgb(242 196 109 / 10%);
  --s-header:rgb(5 10 23 / 72%);
}
/* ambient page light (two soft glows, fixed) */
html:not(#p) body:has(#gateway-workspace:not([hidden])),html:not(#p) body:has(#portal.active){
  background:radial-gradient(900px 520px at 88% -8%,var(--s-glow-a),transparent 60%),radial-gradient(820px 520px at -6% 108%,var(--s-glow-b),transparent 60%),var(--p-page)!important;background-attachment:fixed!important}
/* header: navy glass + gold hairline, active pill = gold */
html:not(#p) body header{position:sticky;top:0;z-index:40;background:var(--s-header)!important;-webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%);
  border-bottom:0!important;box-shadow:0 1px 0 rgb(242 196 109 / 22%),0 10px 30px rgb(0 0 0 / 18%)!important}
html:not(#p) body header .nav :is(button,a){border-color:rgb(255 255 255 / 12%)!important;border-radius:999px!important}
html:not(#p) body header .nav :is(button,a):hover{border-color:rgb(242 196 109 / 60%)!important;background:rgb(242 196 109 / 6%)!important}
html:not(#p) body header .nav button.active{background:var(--s-gold)!important;border-color:transparent!important;color:var(--p-on-accent)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 2px 0 var(--p-gold-edge),0 6px 18px rgb(242 196 109 / 25%)!important}
html:not(#p) body header :is(#site-locale,#theme-toggle,#header-account){border-color:rgb(255 255 255 / 12%)!important;border-radius:999px!important}
/* section bar: gold pill for the current section */
html:not(#p) body #gateway-workspace .side [data-gateway-tab].active,html:not(#p) body #gateway-workspace .side [aria-current="page"]{background:var(--s-gold)!important;color:var(--p-on-accent)!important;border-color:transparent!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 2px 0 var(--p-gold-edge)!important}

/* ---------- home ---------- */
html body:has(#gateway-results .student-home-card) .gateway-identity #student-email{background:var(--s-gold-text);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent;animation:s-shimmer 7s ease-in-out infinite}
@keyframes s-shimmer{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]),
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel,
html body:has(#gateway-results .student-home-card) #gateway-workspace .learning-home{
  background:var(--s-card)!important;border:1px solid var(--p-border)!important;border-inline-start-width:1px!important;border-radius:20px!important;
  box-shadow:var(--s-sheen),var(--s-shadow)!important;transition:border-color var(--p-fast),box-shadow var(--p-fast)}
@media(hover:hover){
  html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card:not([data-section="subscriptions"]):hover{border-color:rgb(242 196 109 / 55%)!important;box-shadow:var(--s-sheen),var(--s-hover)!important}
}
/* icon tiles glow softly in their own colour */
html body:has(#gateway-results .student-home-card) #gateway-workspace .student-home-card .student-home-icon{border-radius:16px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 3px 0 rgb(0 0 0 / 18%),0 10px 22px color-mix(in srgb,var(--p-acc,#F2C46D) 30%,transparent)!important}
/* subscription bar = the gold signature bar */
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card[data-section="subscriptions"]{
  background:linear-gradient(120deg,#13244A 0%,#0F2447 55%,#1B3A5E 100%)!important;color:#EEF2FA!important;border:1px solid rgb(242 196 109 / 35%)!important;border-radius:20px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 3px 0 #02050C,0 16px 34px rgb(11 26 51 / 25%)!important}
html body:has(#gateway-results .student-home-card) #gateway-results>.student-home-card[data-section="subscriptions"] :is(strong,span:not(.student-home-icon)){color:#EEF2FA!important}
/* next class: primary = gold, live pill red, teal clock line */
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>.home-live-actions>button:first-child{background:var(--s-gold)!important;color:var(--p-on-accent)!important;border:0!important;border-radius:12px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 3px 0 var(--p-gold-edge),0 10px 22px rgb(242 196 109 / 22%)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>.home-live-actions>button+button{border-radius:12px!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace .home-live-panel>p{color:var(--p-text-muted)!important}
/* one soft entrance, never hides content without animation support */
@media (prefers-reduced-motion:no-preference){
  html body:has(#gateway-results .student-home-card) #gateway-results>*{animation:s-rise .45s cubic-bezier(.2,.7,.2,1) both}
  html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(2){animation-delay:.05s}
  html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(3){animation-delay:.1s}
  html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(4){animation-delay:.15s}
  html body:has(#gateway-results .student-home-card) #gateway-results>:nth-child(n+5){animation-delay:.2s}
}
@keyframes s-rise{from{opacity:.001;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){html body:has(#gateway-results .student-home-card) .gateway-identity #student-email{animation:none}}

/* ---------- «تقدمي»: ring + stat tiles + continue cards ---------- */
html:not(#p) body .learning-home{padding:20px!important}
html:not(#p) body .learning-home>h2{font-size:1.25rem!important;font-weight:800!important;margin:0 0 14px!important;color:var(--p-text)!important}
html:not(#p) body .learning-home .learning-overview{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:18px}
html:not(#p) body .learning-home .learning-ring{--pct:0;flex:none;width:118px;height:118px;border-radius:50%;display:grid;place-content:center;text-align:center;position:relative;
  background:conic-gradient(from -90deg,#F2C46D 0,#C58A2E calc(var(--pct)*1%),var(--p-muted-surface) 0);box-shadow:0 10px 26px rgb(242 196 109 / 16%)}
html:not(#p) body .learning-home .learning-ring::before{content:"";position:absolute;inset:11px;border-radius:50%;background:var(--p-surface);box-shadow:inset 0 2px 6px rgb(0 0 0 / 18%)}
html:not(#p) body .learning-home .learning-ring>*{position:relative}
html:not(#p) body .learning-home .learning-ring strong{font-size:1.6rem;font-weight:800;line-height:1;background:var(--s-gold-text);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
html:not(#p) body .learning-home .learning-ring span{font-size:.8rem;color:var(--p-text-muted)}
html:not(#p) body .learning-home .learning-stats{flex:1 1 320px;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:0!important}
html:not(#p) body .learning-home .learning-stats>div{background:var(--p-muted-surface)!important;border:1px solid var(--p-border)!important;border-radius:14px!important;padding:12px 14px!important;box-shadow:var(--s-sheen)!important;display:flex;flex-direction:column;gap:2px}
html:not(#p) body .learning-home .learning-stats>div strong{font-size:1.35rem;font-weight:800;color:var(--p-text)!important}
html:not(#p) body .learning-home .learning-stats>div:nth-child(1) strong{color:var(--p-teal)!important}
html:not(#p) body .learning-home .learning-stats>div:nth-child(2) strong{color:var(--p-gold-ink)!important}
html:not(#p) body .learning-home .learning-stats>div span{font-size:.82rem;color:var(--p-text-muted)!important}
html:not(#p) body .learning-home .learning-recent{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
html:not(#p) body .learning-home .learning-compact-card{background:var(--s-card)!important;border:1px solid var(--p-border)!important;border-radius:16px!important;box-shadow:var(--s-sheen),0 2px 0 var(--p-edge)!important;padding:14px!important}
html:not(#p) body .learning-home .learning-compact-card progress{accent-color:#E2B25A;height:6px}
html:not(#p) body .learning-home .learning-compact-card progress::-webkit-progress-bar{background:var(--p-muted-surface);border-radius:99px}
html:not(#p) body .learning-home .learning-compact-card progress::-webkit-progress-value{background:linear-gradient(90deg,#4FD1B0,#F2C46D);border-radius:99px}
html:not(#p) body .learning-home .learning-compact-card progress::-moz-progress-bar{background:linear-gradient(90deg,#4FD1B0,#F2C46D);border-radius:99px}
html:not(#p) body .learning-home .learning-actions>button{background:var(--s-gold)!important;color:var(--p-on-accent)!important;border:0!important;border-radius:10px!important;font-weight:700!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 2px 0 var(--p-gold-edge)!important}
html:not(#p) body .learning-home .learning-list-heading button{border-radius:999px!important}

/* ---------- banner: progress-bar indicators (redesign) instead of dots ---------- */
html:not(#p) body #home-ads.ad-campaigns .ad-viewport{border-radius:20px;border-color:rgb(242 196 109 / 28%)}
html:not(#p) body #home-ads.ad-campaigns .ad-controls{justify-content:center;gap:6px;padding-top:8px}
html:not(#p) body #home-ads.ad-campaigns .ad-dot{flex:0 0 auto;width:auto;min-width:0;height:24px;min-height:24px;border-radius:99px;padding:0 2px}
html:not(#p) body #home-ads.ad-campaigns .ad-dot::before{width:18px;height:5px;border-radius:99px;background:var(--p-border);transition:width var(--p-fast),background-color var(--p-fast)}
html:not(#p) body #home-ads.ad-campaigns .ad-dot[aria-pressed=true]::before{width:38px;background:var(--s-gold)}

/* ---------- path chain: the chosen card carries a gold ✓ ---------- */
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid>*{position:relative;border-color:rgb(226 178 90 / 60%)!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid>*>strong::after{content:"✓";display:inline-grid;place-items:center;vertical-align:middle;width:22px;height:22px;margin-inline-start:10px;border-radius:50%;
  font-size:.75rem;font-weight:800;line-height:1;background:var(--s-gold);color:var(--p-on-accent);-webkit-text-fill-color:var(--p-on-accent);box-shadow:0 2px 0 var(--p-gold-edge),0 4px 10px rgb(197 138 46 / 30%)}
html:not(#p) body .learning-home .learning-ring strong::after{content:"٪";font-size:.7em;margin-inline-start:1px}

/* ---------- signature on every page: gold buttons get the metal gradient + soft glow; page base colour ---------- */
html:not(#p){background:var(--p-page,#F5F1E8)}
html:not([data-theme="light"]):not(#p){background:#050A17}
html:not(#p) body #gateway-workspace :is(.gateway-item button,.gateway-item .live-action),
html:not(#p) body #gateway-workspace .side button.selected,
html:not(#p) body #gateway-workspace .plan-selection button,
html:not(#p) body .foot button,
html:not(#p) body #gateway-login.auth-layout .gateway-auth button.primary,
html:not(#p) body #gateway-workspace .notes-panel>.notes-toolbar:first-child button,
html:not(#p) body #home .actions .primary,
html body:has(#gateway-results .student-home-card) #gateway-workspace .side button.selected,
html:not(#p) body .mr-contact-fab,
html:not(#p) body #gateway-workspace #gateway-results>.gateway-card[data-live-state] button.live-action:nth-of-type(2),
html:not(#p) body #gateway-workspace .quiz-player>button[type="submit"],html:not(#p) body #gateway-workspace .quiz-player>button:last-of-type{
  background:var(--s-gold)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 2px 0 var(--p-gold-edge),0 8px 20px rgb(226 178 90 / 18%)!important}
html:not(#p) body #gateway-workspace .side button.selected,html body:has(#gateway-results .student-home-card) #gateway-workspace .side button.selected{border-radius:999px!important}
/* page titles: the gold hairline under the heading (redesign accent) */
html:not(#p) body #gateway-workspace #gateway-title::after{content:"";display:block;width:56px;height:3px;margin-top:8px;border-radius:99px;background:var(--s-gold)}

/* =====================================================================================================
   PATH SIBLINGS (owner, 1 Dec): every level shows all its choices again; the chosen one is gold + ✓ and its
   children open right under it, so the student moves freely without «رجوع». «رجوع» stays = previous page.
   Phones: each level is one sideways-scrolling row.
   ===================================================================================================== */
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level{width:100%}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid{flex-direction:row!important;flex-wrap:wrap!important;align-items:stretch!important;gap:10px!important;width:100%}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed]{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center;gap:2px!important;
  width:240px!important;min-width:0!important;max-width:100%;min-height:60px!important;margin:0!important;
  padding:8px 18px!important;padding-inline-start:68px!important;border-radius:14px!important;cursor:pointer;
  background:var(--p-surface)!important;border:1px solid var(--p-border)!important;box-shadow:0 2px 0 var(--p-edge)!important;
  opacity:.8;transition:opacity var(--p-fast),border-color var(--p-fast),box-shadow var(--p-fast)}
@media(hover:hover){html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="false"]:hover{opacity:1;border-color:rgb(226 178 90 / 60%)!important}}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed]:focus-visible{opacity:1;outline:2px solid var(--p-focus)!important;outline-offset:2px}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed]>strong{color:var(--p-text)!important;font-size:.95rem!important;font-weight:600!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed]>small{display:block!important;font-size:.75rem;color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed]>span{display:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed][data-node-type]::before,
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed][data-node-type]::after{display:block!important;width:40px!important;height:40px!important;margin-top:-20px!important;inset-inline-start:14px!important;border-radius:11px!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed][data-node-type="grade"][data-ordinal]::before{display:grid!important;place-items:center;font-size:1.5rem;background:none!important;box-shadow:none!important;outline:0!important;color:var(--p-gold-ink)!important;font-family:var(--id-head,'Alexandria',sans-serif);font-weight:800}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed][data-node-type="grade"][data-ordinal]::after{display:none!important}
/* the chosen one */
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]{opacity:1;
  background:linear-gradient(180deg,color-mix(in srgb,#E2B25A 15%,var(--p-surface)) 0%,var(--p-surface) 100%)!important;
  border:1.5px solid var(--p-accent)!important;box-shadow:0 2px 0 var(--p-gold-edge),0 8px 20px rgb(226 178 90 / 16%)!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]>strong{font-weight:700!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]>small{color:var(--p-gold-ink)!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="false"]>strong::after{content:none!important;display:none!important}
/* phones: one sideways row per level */
@media (max-width:639px){
  html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid{flex-wrap:nowrap!important;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:2px 2px 8px!important;box-sizing:border-box}
  html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level>.gateway-grid::-webkit-scrollbar{display:none}
  html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed]{flex:0 0 auto!important;width:210px!important;scroll-snap-align:start}
}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]{position:relative!important;padding-inline-end:40px!important}
html:not(#p) body #gateway-workspace .gateway-node-view .path-ancestor-level .gateway-card[aria-pressed="true"]>strong::after{position:absolute;top:50%;margin-top:-11px;inset-inline-end:12px;margin-inline-start:0}

/* ---------- path page head = the section's own card (owner, 1 Dec): icon tile + title + line, wider than the bar ---------- */
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head.path-root-head{
  display:flex!important;flex-direction:row!important;align-items:center!important;gap:14px!important;position:relative!important;
  width:min(440px,100%)!important;max-width:100%;min-height:84px;box-sizing:border-box;margin:0 0 12px!important;padding:14px 18px!important;clip-path:none!important;overflow:visible!important;height:auto!important;
  border-radius:20px!important;border:1px solid var(--p-border)!important;background:var(--s-card)!important;color:var(--p-text)!important;
  box-shadow:var(--s-sheen),var(--s-shadow)!important;font-family:inherit!important;white-space:normal!important}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head.path-root-head::before,html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head.path-root-head::after{content:none!important;display:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .path-root-text{display:flex;flex-direction:column;gap:2px;min-width:0}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head strong{font-family:var(--id-head,'Alexandria',sans-serif);font-size:1.2rem!important;font-weight:800!important;color:var(--p-text)!important;line-height:1.35}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head small{font-size:.85rem!important;font-weight:500!important;color:var(--p-text-muted)!important}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon{
  --p-acc:#1F7F76;display:grid;place-items:center;flex:none;width:52px!important;height:52px!important;border-radius:16px!important;
  background:linear-gradient(160deg,color-mix(in srgb,var(--p-acc) 20%,var(--p-raised)),color-mix(in srgb,var(--p-acc) 9%,var(--p-raised)))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px color-mix(in srgb,var(--p-acc) 24%,transparent),0 3px 0 rgb(0 0 0 / 14%),0 10px 22px color-mix(in srgb,var(--p-acc) 26%,transparent)!important;color:var(--p-acc)!important}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon:before{width:30px!important;height:30px!important;background:var(--p-acc)!important;filter:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon.id-glyph{font-size:30px!important;font-family:'Material Symbols Rounded','Material Symbols Outlined',sans-serif}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon.id-glyph:before{content:none!important}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head:is([data-section="library"],[data-home-role="live"]) .student-home-icon,html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon[data-accent="coral"]{--p-acc:#B9502D}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head[data-section="exam_reviews"] .student-home-icon,html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon:is([data-accent="sky"],[data-accent="ice"]){--p-acc:#2C6AA3}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon[data-accent="violet"]{--p-acc:#5B45B0}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head[data-section="quizzes"] .student-home-icon,html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon:is([data-accent="gold"],[data-accent="sand"],[data-accent="navy"]){--p-acc:#8A6320}
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon[data-accent="mint"]{--p-acc:#1F7F76}
html:not([data-theme="light"]) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon{color:color-mix(in srgb,var(--p-acc) 50%,#fff)!important;
  background:linear-gradient(160deg,color-mix(in srgb,var(--p-acc) 34%,var(--p-raised)),color-mix(in srgb,var(--p-acc) 16%,var(--p-surface)))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 0 0 1px color-mix(in srgb,var(--p-acc) 40%,transparent),0 3px 0 rgb(0 0 0 / 40%),0 10px 22px color-mix(in srgb,var(--p-acc) 22%,transparent)!important}
html:not([data-theme="light"]) body #gateway-workspace .gateway-node-view h3.path-root-head .student-home-icon:before{background:color-mix(in srgb,var(--p-acc) 50%,#fff)!important}
/* the gold edge on the start side marks «you are in this section» */
html:not(#p) body #gateway-workspace .gateway-node-view h3.path-root-head.path-root-head{border-inline-start:3px solid var(--p-accent)!important}

/* ---------- «تقدمي»: streak + this week (LEARNING_ACTIVITY_V1) ---------- */
html:not(#p) body .learning-home .learning-activity{display:grid;grid-template-columns:minmax(150px,200px) 1fr;gap:12px;margin:0 0 18px}
html:not(#p) body .learning-home .learning-streak{display:flex;flex-direction:column;justify-content:center;gap:2px;padding:14px 16px;border-radius:16px;
  background:linear-gradient(160deg,color-mix(in srgb,#FF8A65 16%,var(--p-surface)),var(--p-surface));border:1px solid color-mix(in srgb,#FF8A65 35%,var(--p-border));box-shadow:var(--s-sheen),0 2px 0 var(--p-edge)}
html:not(#p) body .learning-home .learning-streak strong{display:flex;align-items:center;gap:8px;font-size:2rem;font-weight:800;line-height:1;color:var(--p-text)}
html:not(#p) body .learning-home .learning-streak strong::before{content:"";width:26px;height:26px;flex:none;background:linear-gradient(180deg,#FFC46B,#FF6A3D);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c1 3.2-.6 5-2 6.6C8.6 10.2 7 12 7 14.6A5 5 0 0 0 12 20a5 5 0 0 0 5-5.2c0-2.2-1.1-3.6-2.1-4.6.1 1.7-.6 2.8-1.6 3.2.5-3.3-.4-7.5-1.3-11.4Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c1 3.2-.6 5-2 6.6C8.6 10.2 7 12 7 14.6A5 5 0 0 0 12 20a5 5 0 0 0 5-5.2c0-2.2-1.1-3.6-2.1-4.6.1 1.7-.6 2.8-1.6 3.2.5-3.3-.4-7.5-1.3-11.4Z'/%3E%3C/svg%3E") center/contain no-repeat}
html:not(#p) body .learning-home .learning-streak span{font-size:.9rem;font-weight:600;color:var(--p-text-muted)}
html:not(#p) body .learning-home .learning-streak small{font-size:.78rem;color:var(--p-gold-ink)}
html:not(#p) body .learning-home .learning-week{padding:12px 16px;border-radius:16px;background:var(--p-muted-surface);border:1px solid var(--p-border);box-shadow:var(--s-sheen)}
html:not(#p) body .learning-home .learning-week-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:8px}
html:not(#p) body .learning-home .learning-week-head h3{margin:0;font-size:.95rem;font-weight:700;color:var(--p-text)}
html:not(#p) body .learning-home .learning-week-head span{font-size:.85rem;font-weight:700;color:var(--p-teal)}
html:not(#p) body .learning-home .learning-week-bars{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;align-items:end;height:96px}
html:not(#p) body .learning-home .learning-week-day{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;height:100%;min-width:0}
html:not(#p) body .learning-home .learning-week-bar{--h:0;display:block;width:100%;max-width:28px;height:max(4px,calc(var(--h) * .7px));border-radius:8px 8px 4px 4px;
  background:linear-gradient(180deg,#4FD1B0,color-mix(in srgb,#4FD1B0 55%,var(--p-surface)));box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}
html:not(#p) body .learning-home .learning-week-day[data-today="true"] .learning-week-bar{background:var(--s-gold);box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 4px 12px rgb(226 178 90 / 30%)}
html:not(#p) body .learning-home .learning-week-day small{font-size:.72rem;color:var(--p-text-muted);white-space:nowrap}
html:not(#p) body .learning-home .learning-week-day[data-today="true"] small{color:var(--p-gold-ink);font-weight:700}
@media (max-width:639px){html:not(#p) body .learning-home .learning-activity{grid-template-columns:1fr}}

/* =====================================================================================================
   r93 ADS IN MOTION (owner video, 1 Dec): any still ad image moves by itself — a slow zoom during its turn,
   a soft cross-fade into the next one, and (home strip) the active bar fills up over the turn.
   Respects «تقليل الحركة». No GIF needed (an animated WebP still plays as it is).
   ===================================================================================================== */
@media (prefers-reduced-motion:no-preference){
  html:not(#p) body .ad-campaigns .ad-slide:not([hidden]) .ad-image-surface img{transform-origin:50% 50%;animation:ad-kenburns var(--ad-seconds,10s) ease-out both;will-change:transform}
  html:not(#p) body .ad-campaigns[data-ad-count="1"] .ad-slide:not([hidden]) .ad-image-surface img{animation:ad-breathe 14s ease-in-out infinite alternate}
  html:not(#p) body .ad-campaigns .ad-incoming{animation:ad-softfade .9s ease-in-out both}
  html:not(#p) body #home-ads.ad-campaigns .ad-dot[aria-pressed=true]::before{background:linear-gradient(90deg,#F6D58A,#E2B25A 45%,#C58A2E) 0 0/0% 100% no-repeat,var(--p-border);animation:ad-progress var(--ad-seconds,10s) linear both}
}
@keyframes ad-kenburns{from{transform:scale(1)}to{transform:scale(1.07)}}
@keyframes ad-breathe{from{transform:scale(1)}to{transform:scale(1.05)}}
@keyframes ad-softfade{from{opacity:0}to{opacity:1}}
@keyframes ad-progress{from{background-size:0% 100%,auto}to{background-size:100% 100%,auto}}
html:not(#p) body .ad-campaigns .ad-viewport{isolation:isolate}
/* owner (1 Dec): no green ring on the active ad bar — the filling bar already shows which ad is on */
html:not(#p) body .ad-campaigns .ad-dot,html:not(#p) body .ad-campaigns .ad-dot[aria-pressed="true"]{outline:0!important;box-shadow:none!important;background:transparent!important;border:0!important}
html:not(#p) body .ad-campaigns .ad-dot:focus-visible{outline:2px solid #E2B25A!important;outline-offset:2px;border-radius:99px}

/* ---------- r93: text over the picture (owner video) — only for ads whose line or button text is filled in the admin ---------- */
html:not(#p) body .ad-campaigns .ad-image-surface.has-overlay{position:relative;display:block}
html:not(#p) body .ad-campaigns .ad-overlay{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:clamp(4px,.8vw,10px);
  padding-block:clamp(10px,2vw,28px);padding-inline:clamp(16px,5%,64px) 40%;box-sizing:border-box;pointer-events:none;text-align:start;
  background:linear-gradient(270deg,rgb(5 10 23 / 86%) 0%,rgb(5 10 23 / 55%) 42%,rgb(5 10 23 / 0%) 78%)}
html:not(#p) body .ad-campaigns[dir="ltr"] .ad-overlay{background:linear-gradient(90deg,rgb(5 10 23 / 86%) 0%,rgb(5 10 23 / 55%) 42%,rgb(5 10 23 / 0%) 78%)}
html:not(#p) body .ad-campaigns .ad-overlay-title{font-family:var(--id-head,'Alexandria',sans-serif);font-weight:800;font-size:clamp(1.05rem,.7rem + 1.6vw,2.1rem);line-height:1.3;color:#F7F3EA;text-shadow:0 2px 12px rgb(0 0 0 / 45%);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html:not(#p) body .ad-campaigns .ad-overlay-line{font-size:clamp(.82rem,.7rem + .5vw,1.05rem);line-height:1.5;color:#C9D3E6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html:not(#p) body .ad-campaigns .ad-overlay-cta{display:inline-flex;align-items:center;min-height:36px;padding:6px 18px;border-radius:999px;font-weight:700;font-size:clamp(.8rem,.72rem + .3vw,.95rem);color:#1C1406;
  background:linear-gradient(135deg,#F6D58A,#E2B25A 45%,#C58A2E);box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 2px 0 #8C6220,0 8px 20px rgb(242 196 109 / 25%)}
/* the short home strip: title + button in one line of space */
html:not(#p) body #home-ads.ad-campaigns .ad-overlay{flex-direction:row;align-items:center;justify-content:flex-start;gap:16px;padding-inline-end:30%}
html:not(#p) body #home-ads.ad-campaigns .ad-overlay-line{display:none}
html:not(#p) body #home-ads.ad-campaigns .ad-overlay-title{font-size:clamp(.95rem,.7rem + 1vw,1.45rem);-webkit-line-clamp:2}
html:not(#p) body #home-ads.ad-campaigns .ad-overlay-cta{flex:none;min-height:32px;padding:4px 14px}
@media (max-width:600px){
  html:not(#p) body .ad-campaigns .ad-overlay{padding-inline-end:22%}
  html:not(#p) body #home-ads.ad-campaigns .ad-overlay{padding-inline-end:12%;gap:10px}
}
/* entrance like the video: title, line, button come in one after the other on each turn */
@media (prefers-reduced-motion:no-preference){
  html:not(#p) body .ad-campaigns .ad-slide:not([hidden]) .ad-overlay>*{animation:ad-text-in .7s cubic-bezier(.2,.7,.2,1) both}
  html:not(#p) body .ad-campaigns .ad-slide:not([hidden]) .ad-overlay>:nth-child(1){animation-delay:.25s}
  html:not(#p) body .ad-campaigns .ad-slide:not([hidden]) .ad-overlay>:nth-child(2){animation-delay:.4s}
  html:not(#p) body .ad-campaigns .ad-slide:not([hidden]) .ad-overlay>:nth-child(3){animation-delay:.6s}
}
@keyframes ad-text-in{from{opacity:0;transform:translateX(var(--ad-text-from,18px))}to{opacity:1;transform:none}}
html:not(#p) body .ad-campaigns[dir="ltr"] .ad-overlay{--ad-text-from:-18px}

/* ---------- r94 (owner, 1 Dec): the home banner shows the whole picture in its own shape — nothing is cut ---------- */
html:not(#p) body #home-ads.ad-campaigns .ad-viewport{height:auto!important;min-height:0!important;aspect-ratio:var(--ad-ratio,2000 / 714)}
html:not(#p) body #home-ads.ad-campaigns .ad-image-surface img{object-fit:cover;object-position:center}
@media (prefers-reduced-motion:no-preference){
  html:not(#p) body #home-ads.ad-campaigns .ad-slide:not([hidden]) .ad-image-surface img{animation-name:ad-kenburns-soft}
  html:not(#p) body #home-ads.ad-campaigns[data-ad-count="1"] .ad-slide:not([hidden]) .ad-image-surface img{animation:ad-breathe-soft 14s ease-in-out infinite alternate}
}
@keyframes ad-kenburns-soft{from{transform:scale(1)}to{transform:scale(1.02)}}
@keyframes ad-breathe-soft{from{transform:scale(1)}to{transform:scale(1.015)}}

/* =====================================================================================================
   r95 HOME CARD COLOUR TOKENS (owner, 1 Dec) — the colours picked in the admin «مظهر المسار» show again on the new look.
   One set of variables per card; later «وضع التعديل» writes the same variables (class .mr-card-custom + inline
   --card-face-top/--card-face-bottom/--card-edge/--card-border/--card-title/--card-text/--card-icon) — no new CSS needed then.
   ===================================================================================================== */
html:not([data-theme="light"]) body #gateway-workspace .student-home-card.id-card-color{--card-face-top:var(--id-card-top-dark);--card-face-bottom:var(--id-card-bottom-dark);--card-edge:var(--id-card-edge-dark);--card-border:var(--id-card-border-dark);--card-text:var(--id-card-text-dark)}
html[data-theme="light"] body #gateway-workspace .student-home-card.id-card-color{--card-face-top:var(--id-card-top-light);--card-face-bottom:var(--id-card-bottom-light);--card-edge:var(--id-card-edge-light);--card-border:var(--id-card-border-light);--card-text:var(--id-card-text-light)}
html:not([data-theme="light"]) body #gateway-workspace .student-home-card.id-title-color{--card-title:var(--id-title-dark)}
html[data-theme="light"] body #gateway-workspace .student-home-card.id-title-color{--card-title:var(--id-title-light)}
/* face: gradient + solid bottom edge + soft shadow + top sheen (same 3D build as the other cards) */
html body:has(#gateway-results .student-home-card) #gateway-workspace #gateway-results>.student-home-card:is(.id-card-color,.mr-card-custom):not([data-section="subscriptions"]){
  background:linear-gradient(180deg,var(--card-face-top),var(--card-face-bottom))!important;border:1px solid var(--card-border,rgb(255 255 255 / 22%))!important;border-inline-start-width:1px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 3px 0 var(--card-edge),0 14px 30px rgb(0 0 0 / 22%)!important}
html body:has(#gateway-results .student-home-card) #gateway-workspace #gateway-results>.student-home-card:is(.id-card-color,.mr-card-custom)>strong{color:var(--card-title,var(--card-text))!important;-webkit-text-fill-color:currentColor}
html body:has(#gateway-results .student-home-card) #gateway-workspace #gateway-results>.student-home-card:is(.id-card-color,.mr-card-custom)>span:not(.student-home-icon){color:var(--card-text)!important;opacity:.78}
html body:has(#gateway-results .student-home-card) #gateway-workspace #gateway-results>.student-home-card:is(.id-card-color,.mr-card-custom)::after{background:var(--card-text)!important;opacity:.75}
/* the title colour alone (card left on the default face) */
html body:has(#gateway-results .student-home-card) #gateway-workspace #gateway-results>.student-home-card.id-title-color:not(.id-card-color)>strong{color:var(--card-title)!important}
/* the icon tile keeps its own colour; edit mode may override it with --card-icon */
html body:has(#gateway-results .student-home-card) #gateway-workspace #gateway-results>.student-home-card.mr-card-custom .student-home-icon{--p-acc:var(--card-icon,#2E8C83)}
@media(hover:hover){html body:has(#gateway-results .student-home-card) #gateway-workspace #gateway-results>.student-home-card:is(.id-card-color,.mr-card-custom):hover{border-color:rgb(255 255 255 / 55%)!important}}

/* r97 (Google Play payments policy): inside the MR AMRO app nothing leads to buying */
html[data-in-app] [data-gateway-tab="plans"],html[data-in-app] .student-home-card[data-section="plans"],html[data-in-app] .student-home-card[data-home-role="live"]{display:none!important}
