/* ==========================================================================
   Al Saeed — site harmony layer (alsaeed-etc.com)
   Loaded LAST on the public site (home.html) and on the app pages (index.html).
   Goal: one consistent look across sections without rewriting each section:
   shared tokens, gutters, card rhythm, package-card actions, request chips,
   and a single tidy "floating dock" (chat / WhatsApp / back-to-top / buy bar).
   ========================================================================== */

:root {
  --hz-navy: #102A5C;
  --hz-navy-2: #1A3F86;
  --hz-orange: #F07A24;
  --hz-gold: #C79226;
  --hz-ink: #1B2A44;
  --hz-muted: #5B6880;
  --hz-line: #E3E8F2;
  --hz-soft: #F3F6FB;
  --hz-radius: 16px;
  --hz-radius-sm: 12px;
  --hz-btn-h: 46px;
  --hz-gutter: clamp(16px, 3.2vw, 28px);
  --hz-shadow: 0 10px 30px -18px rgba(16, 42, 92, .35);
  --hz-dock-gap: 20px;
  --hz-dock-lift: 0px;
}

/* --------------------------------------------------------------------------
   1) Page gutters — content never touches the screen edge
   -------------------------------------------------------------------------- */
.asx-w,
.as-rm,
section > .wrap,
.asv > .wrap {
  padding-inline: var(--hz-gutter) !important;
  box-sizing: border-box;
}
/* The overview band had 4px side padding, so its cards touched both edges. */
#asx-overview > .asx-w,
.asx-co > .asx-w {
  padding-inline: var(--hz-gutter) !important;
}

/* --------------------------------------------------------------------------
   2) Typography rhythm — readable paragraphs, balanced headings
   -------------------------------------------------------------------------- */
:where(.asx-sec, .asx-co, .asv, .asr, #programs-sec, #blog, #clients) :is(h2, h3) {
  text-wrap: balance;
}
:where(.asx-sec, .asx-co, .asv, .asr, .asx-ph) p {
  text-wrap: pretty;
}
/* Section intro paragraphs: comfortable line length instead of edge-to-edge */
:where(.asx-sec, .asx-co) > .asx-w > p,
:where(.asx-sec, .asx-co) .asx-head p {
  max-width: 760px;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   3) Buttons — one height, one weight, no clipped labels
   -------------------------------------------------------------------------- */
:where(.asx-b, .asx-pkc .act > *, .as-rm .ch a) {
  font-weight: 700;
  letter-spacing: 0;
}
:where(.asx-b) {
  min-height: 44px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   4) Package cards — equal heights, price + actions aligned on one line
   -------------------------------------------------------------------------- */
.asx-pkcards {
  align-items: stretch !important;
}
.asx-pkc {
  display: flex !important;
  flex-direction: column;
  height: 100%;
}
.asx-pkc > ul {
  flex: 0 0 auto;
  align-content: start;
}
/* Price sits right above the actions, so prices line up across a row */
.asx-pkc > .pr {
  margin-top: auto !important;
  padding-top: 8px;
}
.asx-pkc .act {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch;
}
.asx-pkc .act > :is(button, a) {
  box-sizing: border-box;
  height: var(--hz-btn-h) !important;
  min-height: var(--hz-btn-h) !important;
  margin: 0 !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  border-radius: 999px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: none;
  vertical-align: top;
}
/* Main "subscribe" action spans the whole row */
.asx-pkc .act > [data-buy] {
  grid-column: 1 / -1 !important;
  font-size: 15px !important;
}
/* Secondary actions (cart + details) look identical */
.asx-pkc .act > :is(.sa-add-cart, .asx-b.g2, a:not([data-buy])) {
  background: #fff !important;
  color: var(--hz-navy) !important;
  border: 1.5px solid #D5DDEA !important;
  box-shadow: none !important;
}
.asx-pkc .act > :is(.sa-add-cart, .asx-b.g2, a:not([data-buy])):hover {
  border-color: var(--hz-navy) !important;
  background: var(--hz-soft) !important;
}
/* When a card has only one secondary action it takes the full row */
.asx-pkc .act > :is(button, a):not([data-buy]):last-child:nth-child(2) {
  grid-column: 1 / -1 !important;
}
/* Four narrow cards: stack the two secondary buttons rather than squeeze them */
@media (min-width: 1101px) and (max-width: 1360px) {
  .asx-pkc .act {
    grid-template-columns: 1fr !important;
  }
}

/* --------------------------------------------------------------------------
   5) Home "سجّل طلبك الآن" + "المركز الإعلامي" — tidy equal chips
   -------------------------------------------------------------------------- */
.as-rm .ch {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
}
.as-rm .pa.r .ch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.as-rm .ch a {
  justify-content: flex-start;
  min-height: 44px;
  padding: 9px 12px !important;
  font-size: 13.5px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.as-rm .pa.m .ch {
  grid-template-columns: 1fr 1fr;
}
.as-rm .tk {
  padding-inline-end: 8px;
}
@media (max-width: 1100px) {
  .as-rm .pa.r .ch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .as-rm .pa.m .ch {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .as-rm .pa.m .ch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .as-rm .pa.m .ch,
  .as-rm .pa.r .ch {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   6) Cards across sections — one radius, one border, one hover
   -------------------------------------------------------------------------- */
:where(.asv-grid > *, .asx-pkc, .as-rm .in) {
  border-radius: var(--hz-radius) !important;
}
:where(.asv-grid) {
  align-items: stretch;
}
:where(.asv-grid > *) {
  height: 100%;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   7) Floating dock — one back-to-top, one progress bar, nothing overlapping
   -------------------------------------------------------------------------- */
/* Duplicates left over from older layers */
html:has(.ap-top) .renew-back-top,
html:has(#totop) .renew-back-top,
html:has(#totop) .ap-top {
  display: none !important;
}
html:has(.v21-progress) #v18-page-progress,
html:has(#prog.progress) #v18-page-progress {
  display: none !important;
}

/* When the sticky "اختر باقتك" bar is open, lift every floating button above it */
html:has(.as-sbar.on) {
  --hz-dock-lift: 78px;
}

/* Right side (start in RTL): chat launcher with its "اسألنا الآن" label beside it */
/* Home uses one widget (label + button); keep the button on the outer edge like the app pages */
.asp-chat-fab {
  flex-direction: row-reverse !important;
}
#chatLauncher,
.asp-chat-fab {
  right: var(--hz-dock-gap) !important;
  left: auto !important;
  bottom: calc(var(--hz-dock-gap) + var(--hz-dock-lift)) !important;
  transition: bottom .3s ease, transform .2s ease;
}
.asa-pill {
  right: calc(var(--hz-dock-gap) + 70px) !important;
  left: auto !important;
  bottom: calc(var(--hz-dock-gap) + 11px + var(--hz-dock-lift)) !important;
  transition: bottom .3s ease, opacity .2s ease;
  white-space: nowrap;
}

/* Left side (end in RTL): WhatsApp at the bottom, back-to-top stacked above it */
a.wa {
  left: var(--hz-dock-gap) !important;
  right: auto !important;
  bottom: calc(var(--hz-dock-gap) + var(--hz-dock-lift)) !important;
  transition: bottom .3s ease;
}
.ap-top,
#totop,
.renew-back-top {
  left: calc(var(--hz-dock-gap) + 5px) !important;
  right: auto !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  bottom: calc(var(--hz-dock-gap) + var(--hz-dock-lift)) !important;
  transition: bottom .3s ease, opacity .2s ease;
}
html:has(a.wa) :is(.ap-top, #totop, .renew-back-top) {
  bottom: calc(var(--hz-dock-gap) + 72px + var(--hz-dock-lift)) !important;
}

/* WhatsApp: the same round icon on every page (some pages showed a wide "تحدث معنا" pill) */
a.wa {
  width: 56px !important;
  height: 56px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}
a.wa .tx {
  display: none !important;
}
a.wa :is(svg, .ic) {
  margin: 0 !important;
}

/* Back-to-top stays visible on dark bands too */
:is(.ap-top, #totop, .renew-back-top) {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 8px 20px -6px rgba(16, 42, 92, .45) !important;
}

/* The sticky buy bar keeps clear of the floating buttons */
.as-sbar .in {
  padding-inline: 84px !important;
}

/* After the visitor starts reading, the "اسألنا الآن" label folds away (site-harmony.js) */
html.hz-reading .asa-pill,
html.hz-reading .asp-chat-fab .asp-chat-pill {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(8px);
}
.asp-chat-fab .asp-chat-pill {
  transition: opacity .25s ease, transform .25s ease;
}

/* Phones: keep only the icon so the label never covers content */
@media (max-width: 720px) {
  :root { --hz-dock-gap: 14px; }
  .asa-pill { display: none !important; }
  .as-sbar .in { padding-inline: 16px 76px !important; }
  html:has(.as-sbar.on) { --hz-dock-lift: 74px; }
}

/* --------------------------------------------------------------------------
   7b) Contact numbers — one font, one colour (one number was orange monospace)
   -------------------------------------------------------------------------- */
:is(a, span).num {
  font-family: inherit !important;
  direction: ltr;
  unicode-bidi: isolate;
  letter-spacing: .01em;
}
.grid a.num {
  color: #245675 !important;
  font-weight: 700 !important;
  font-size: 16px !important;
}

/* Accreditation logos: same visual size, never spilling out of their tile */
.asx-logos img {
  max-height: 56px !important;
  max-width: 80% !important;
  width: auto !important;
  object-fit: contain;
}

/* Learner dashboard: a short package card no longer stretches into an empty tall box */
.dashboard-learner .grid.g2 {
  align-items: start;
}

/* --------------------------------------------------------------------------
   8) Header island must not cover hero buttons on course pages
   -------------------------------------------------------------------------- */
.asx-ph {
  scroll-margin-top: 96px;
}
:where(section[id]) {
  scroll-margin-top: 96px;
}

/* --------------------------------------------------------------------------
   9) Small polish
   -------------------------------------------------------------------------- */
:where(.asx-pkc, .asv-grid > *, .as-rm .ch a, .asx-b) {
  -webkit-tap-highlight-color: transparent;
}
:where(a, button):focus-visible {
  outline: 3px solid rgba(240, 122, 36, .55);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  #chatLauncher, .asp-chat-fab, .asa-pill, a.wa, .ap-top, #totop { transition: none !important; }
}

/* ==========================================================================
   INTERNAL PAGES (/app): learner dashboard, learning space, exams, admin
   Colour rules are scoped to the light theme so dark mode keeps its own look.
   ========================================================================== */
/* ---- 10) Learner dashboard: course tiles ---------------------------------- */
.dashboard-learner .grid.g2 {
  gap: 20px !important;
}
.learner-course-tile {
  display: flex !important;
  flex-direction: column;
  border-radius: var(--hz-radius) !important;
  overflow: hidden;
}
.learner-course-tile > h3 {
  margin: 0 !important;
  padding: 16px 18px 12px !important;
  font-size: 18px !important;
  line-height: 1.4;
}
.learner-course-tile .tier-art {
  margin: 0 !important;
  border-radius: 0 !important;
}
.learner-course-tile-body {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px !important;
  flex: 1 1 auto;
}
.learner-course-tile-body > p {
  margin: 0 !important;
}
/* Video progress + exam average as two clear stat boxes */
.learner-progress-summary {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.learner-progress-summary > span {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}
html:not([data-ae-theme="dark"]) .learner-progress-summary > span {
  background: #F3F6FB;
  border: 1px solid #E3E8F2;
  color: #33415C;
}
.learner-progress-summary > span b {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  color: var(--hz-orange);
}
.learner-progress-summary > small {
  grid-column: 1 / -1;
  font-size: 12px;
  opacity: .75;
}
/* Remaining days as a badge */
.learner-course-tile-body > small {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
html:not([data-ae-theme="dark"]) .learner-course-tile-body > small {
  background: #FFF3E8;
  color: #B4561A;
}
.learner-course-tile-body > .btn {
  min-height: 46px;
  border-radius: 999px !important;
}
.learner-course-tile-body > .btn:first-of-type {
  margin-top: auto;
}
/* Package card without artwork (e.g. GRC): give it the same header band */
.dashboard-learner .grid.g2 > .card.pad {
  position: relative;
  overflow: hidden;
  border-radius: var(--hz-radius) !important;
  padding-top: 96px !important;
}
.dashboard-learner .grid.g2 > .card.pad::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 78px;
  opacity: 1 !important;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 30%, rgba(240, 122, 36, .45), transparent 55%),
    linear-gradient(120deg, #0B1D42, #102A5C 60%, #1A3F86);
}
.dashboard-learner .grid.g2 > .card.pad .pk-code {
  position: absolute;
  top: 22px;
  inset-inline-start: 18px;
  z-index: 1;
  color: #fff !important;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .02em;
}

/* ---- 11) Learning space ---------------------------------------------------- */
/* Learning path steps: even columns instead of 4 cramped + 1 orphan */
.pmp-course-sequence.learner-path > ol {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 12px !important;
}
.pmp-course-sequence.learner-path > ol > li > * {
  height: 100%;
  box-sizing: border-box;
}
/* Learning hero keeps the same side margins as the cards below it */
.asx-lhero {
  margin-inline: clamp(12px, 2.6vw, 24px) !important;
}
/* Hero shortcuts: same size tiles */
.asx-lhero .acts {
  gap: 10px !important;
}
.asx-lhero .acts > a {
  min-width: 120px;
  justify-content: center;
}

/* Video page: dock buttons were white text on white (invisible labels) */
.lw-dock .btn.o,
.lw-dock button.btn.o {
  background: transparent !important;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, .45) !important;
  box-shadow: none !important;
}
.lw-dock .btn.o:hover {
  background: rgba(255, 255, 255, .12) !important;
  border-color: #fff !important;
}
.lw-dock .btn {
  min-height: 44px;
  border-radius: 999px !important;
  padding-inline: 18px !important;
}
/* Player and playlist: stack on narrower screens so the video is not squeezed */
@media (max-width: 1100px) {
  #iv .iv-body {
    grid-template-columns: 1fr !important;
  }
  #iv .iv-body > * {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
  #iv .iv-stage {
    order: 1;
  }
  #iv .iv-side {
    order: 2;
    max-height: 420px;
  }
}
#iv .iv-side {
  max-height: 560px;
  display: flex;
  flex-direction: column;
}

/* ---- 12) Exams ------------------------------------------------------------- */
/* Selected exam type: readable white on navy (was white on pale blue) */
.pmp-path-picker .pmp-path[aria-pressed="true"] {
  background: linear-gradient(135deg, #102A5C, #1A3F86) !important;
  border-color: #102A5C !important;
  color: #fff !important;
}
.pmp-path-picker .pmp-path[aria-pressed="true"] :is(strong, b, span, small, p, em) {
  color: #fff !important;
  opacity: 1 !important;
}
.pmp-path-picker .pmp-path[aria-pressed="true"] :is(small, p, span:not(:first-child)) {
  color: rgba(255, 255, 255, .82) !important;
}
.pmp-path-picker .pmp-path {
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.pmp-path-picker .pmp-path:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -18px rgba(16, 42, 92, .55);
}
/* Lesson/domain/phase switcher: the chosen one is now clearly marked */
.pmp-lesson-picker .btn[aria-pressed="true"] {
  background: #102A5C !important;
  color: #fff !important;
  border-color: #102A5C !important;
}
/* Learning-space tabs: one clean row that scrolls sideways when it does not fit */
nav.journey-top-navigation {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
nav.journey-top-navigation > :is(a, button) {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 42px;
  padding-inline: 16px !important;
  border-radius: 999px !important;
}

/* ---- 13) Admin ------------------------------------------------------------- */
/* KPI cards: wrap evenly, numbers in the site font on one line */
.admin-kpis-v8 {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  gap: 12px !important;
}
.admin-kpis-v8 .akpi {
  display: flex !important;
  flex-direction: column;
  min-height: 132px;
  box-sizing: border-box;
}
.admin-kpis-v8 .akpi > b {
  margin-top: auto;
  font-family: inherit !important;
  font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 2.4vw, 30px) !important;
  line-height: 1.15 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Admin section tabs stay reachable under the floating header */
nav.dashboard-admin-nav {
  position: sticky;
  top: 92px;
  z-index: 60;
}
/* Admin tables: readable rows */
.dashboard-admin-shell table {
  border-collapse: separate;
  border-spacing: 0;
}
.dashboard-admin-shell table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
html:not([data-ae-theme="dark"]) .dashboard-admin-shell table tbody tr:hover td {
  background: #F7F9FC;
}

/* ==========================================================================
   STUDENT SPACE (student-space.js) — one navigation, focused learner pages
   ========================================================================== */
.ss-nav[hidden] { display: none !important; }
.ss-nav {
  position: fixed;
  z-index: 90;
  font-family: inherit;
  box-sizing: border-box;
}
.ss-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: #DCE4F2 !important;
  font-size: 14px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.ss-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff !important; }
.ss-nav a.on { background: #F07A24; color: #fff !important; font-weight: 700; }
.ss-nav svg { flex: none; }
.ss-nav-head { display: flex; flex-direction: column; gap: 3px; padding: 4px 12px 12px; color: #fff; }
.ss-nav-head b { font-size: 15px; }
.ss-nav-head small { font-size: 12px; color: #B9C6DA; line-height: 1.5; }
.ss-nav-group { display: block; padding: 12px 12px 4px; font-size: 11.5px; color: #8FA2C2; letter-spacing: .02em; }

/* Wide screens: fixed side menu, content shifted beside it */
@media (min-width: 1100px) {
  .ss-nav {
    top: 100px;
    right: 16px;
    bottom: 16px;
    width: 232px;
    padding: 16px 10px;
    border-radius: 18px;
    background: linear-gradient(180deg, #0B1D42, #102A5C);
    box-shadow: 0 20px 40px -24px rgba(11, 29, 66, .6);
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .ss-nav-list { display: flex; flex-direction: column; gap: 2px; }
  html.ss-on main#app { padding-right: 264px !important; box-sizing: border-box; }
  html.ss-on main#app > * { max-width: 100%; }
}
/* Narrow screens: one sticky, sideways-scrolling bar under the header */
@media (max-width: 1099px) {
  .ss-nav {
    position: sticky;
    top: 86px;
    margin: 8px 12px;
    padding: 6px;
    border-radius: 14px;
    background: #0E2350;
    box-shadow: 0 10px 24px -16px rgba(11, 29, 66, .6);
  }
  .ss-nav-head, .ss-nav-group { display: none; }
  .ss-nav-list { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .ss-nav-list::-webkit-scrollbar { display: none; }
  .ss-nav a { flex: 0 0 auto; min-height: 40px; font-size: 13.5px; }
}

/* Duplicated navigation and marketing blocks are hidden inside the learner area */
html.ss-on nav.sa-context-nav,
html.ss-on nav.learner-dashboard-actions,
html.ss-on .asx-lhero .acts,
html.ss-on nav.journey-top-navigation,
html.ss-on nav.sa-package-learning-links,
html.ss-on #asx-footer,
html.ss-on .asx-fcta,
html.ss-on .asa-pill {
  display: none !important;
}

/* Dashboard: continue banner */
.ss-continue {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding: 22px 24px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(240, 122, 36, .35), transparent 50%),
    linear-gradient(120deg, #0B1D42, #102A5C 60%, #1A3F86);
}
.ss-continue-tx { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ss-continue-tx small { color: #F7B27A; font-weight: 700; font-size: 13px; }
.ss-continue-tx h2 { margin: 0; color: #fff !important; font-size: 22px; line-height: 1.4; }
.ss-continue-tx p { margin: 0; color: #C9D4E8; font-size: 13.5px; }
.ss-continue-ring {
  flex: none;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closest-side, #102A5C 79%, transparent 80% 100%),
    conic-gradient(#F07A24 calc(var(--p) * 1%), rgba(255, 255, 255, .16) 0);
}
.ss-continue-ring b { font-size: 22px; color: #fff; }
.ss-continue-ring small { font-size: 10.5px; color: #C9D4E8; }
.ss-continue-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.ss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none !important;
  cursor: pointer;
  border: 0;
}
.ss-btn-main { background: #F07A24; color: #fff !important; }
.ss-btn-ghost { background: transparent; color: #fff !important; border: 1.5px solid rgba(255, 255, 255, .5); }
.ss-btn-ghost.ss-dark { color: #102A5C !important; border-color: #D5DDEA; background: #fff; }

/* Thinking game */
.ss-game {
  margin: 0 0 22px;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #E3E8F2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #1B2A44;
}
.ss-game-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ss-game-head small { color: #B4561A; font-weight: 700; font-size: 12.5px; }
.ss-game-head h2 { margin: 4px 0; font-size: 20px; color: #102A5C !important; }
.ss-game-head p { margin: 0; color: #5B6880; font-size: 13.5px; }
.ss-game-score { padding: 8px 14px; border-radius: 999px; background: #F3F6FB; font-weight: 700; font-size: 13px; color: #102A5C; }
.ss-game-list { display: flex; flex-direction: column; gap: 10px; }
.ss-case { border: 1px solid #E3E8F2; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ss-case.ok { border-color: #8BD1AE; background: #F1FAF5; }
.ss-case.no { border-color: #F2B8A0; background: #FFF6F1; }
.ss-case-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ss-case-row p { margin: 0; flex: 1 1 260px; font-size: 14.5px; line-height: 1.7; }
.ss-opts { display: flex; gap: 6px; }
.ss-opts button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #D5DDEA;
  background: #fff;
  color: #102A5C;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.ss-opts button[aria-pressed="true"] { background: #102A5C; border-color: #102A5C; color: #fff; }
.ss-why { margin: 0; font-size: 13px; line-height: 1.7; color: #33415C; }
.ss-game-acts { display: flex; gap: 10px; flex-wrap: wrap; }
html[data-ae-theme="dark"] .ss-game { background: #111E38; border-color: #22335A; color: #E8EEF9; }
html[data-ae-theme="dark"] .ss-game-head h2 { color: #fff !important; }
html[data-ae-theme="dark"] .ss-case-row p, html[data-ae-theme="dark"] .ss-why { color: #E8EEF9; }

/* ---- 14) Video playlist: clear axis → sub-axis → topic hierarchy ---------- */
#lwModules .iv-group > summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "kind kind kind" "title count prog";
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  padding: 10px 12px !important;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
}
#lwModules .iv-group > summary::-webkit-details-marker { display: none; }
#lwModules .iv-group > summary::before {
  grid-area: kind;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #8A97AE;
}
#lwModules .iv-group[data-depth="0"] > summary::before { content: "محور رئيسي"; color: #B4561A; }
#lwModules .iv-group[data-depth="1"] > summary::before { content: "محور فرعي"; }
#lwModules .iv-group[data-depth="2"] > summary::before { content: "موضوع"; }
html[lang^="en"] #lwModules .iv-group[data-depth="0"] > summary::before { content: "Main axis"; }
html[lang^="en"] #lwModules .iv-group[data-depth="1"] > summary::before { content: "Sub-axis"; }
html[lang^="en"] #lwModules .iv-group[data-depth="2"] > summary::before { content: "Topic"; }
#lwModules .iv-group > summary > span:first-child {
  grid-area: title;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#lwModules .iv-group > summary > small { grid-area: count; font-size: 12px; color: #5B6880; white-space: nowrap; }
#lwModules .iv-group > summary > .lw-group-progress {
  grid-area: prog;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
html:not([data-ae-theme="dark"]) #lwModules .iv-group[data-depth="0"] > summary { background: #EEF2F9; color: #102A5C; font-size: 15px; }
html:not([data-ae-theme="dark"]) #lwModules .iv-group[data-depth="1"] > summary { background: #F6F8FC; color: #1B2A44; font-size: 14px; }
html:not([data-ae-theme="dark"]) #lwModules .iv-group[data-depth="2"] > summary { background: transparent; color: #1B2A44; font-size: 13.5px; }
html:not([data-ae-theme="dark"]) #lwModules .lw-group-progress { background: #FFF3E8; color: #B4561A; }
/* Nested levels sit inside a guide line so the tree reads at a glance */
#lwModules .iv-group .iv-group {
  margin-inline-start: 10px !important;
  padding-inline-start: 8px !important;
  border-inline-start: 2px solid #E3E8F2 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-inline-end: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
#lwModules .iv-group[open] > summary { margin-bottom: 6px; }
#lwModules .iv-group-items { display: flex; flex-direction: column; gap: 6px; }
#lwModules .iv-li.cur { outline: 2px solid #F07A24; outline-offset: -2px; }

/* ---- 15) Exams: 3-step guide ---------------------------------------------- */
.ss-steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ss-steps button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1.5px solid #E3E8F2;
  background: #fff;
  color: #1B2A44;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.ss-steps b {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #EEF1F6;
  color: #5B6880;
}
.ss-steps span { display: flex; flex-direction: column; font-weight: 700; font-size: 14.5px; min-width: 0; }
.ss-steps small { font-weight: 500; font-size: 12px; color: #5B6880; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-steps li.done button { background: #102A5C; border-color: #102A5C; color: #fff; }
.ss-steps li.done b { background: #F07A24; color: #fff; }
.ss-steps li.done small { color: #C9D4E8; }
.ss-steps li.now button { border-color: #F07A24; background: #FFF8F2; }
.ss-steps li.now b { background: #F07A24; color: #fff; }
@media (max-width: 640px) {
  .ss-steps { grid-template-columns: 1fr; }
}

/* ---- 16) Thinking games hub ----------------------------------------------- */
.ss-game-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid #E3E8F2;
  scrollbar-width: thin;
}
.ss-game-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #E3E8F2;
  background: #fff;
  color: #102A5C;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ss-game-tabs button[aria-selected="true"] { background: #F07A24; border-color: #F07A24; color: #fff; }
.ss-opts { flex-wrap: wrap; }
.ss-opts button:disabled { opacity: .35; cursor: default; }
.ss-order .ss-pos {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #102A5C;
  color: #fff;
  font-size: 13px;
}
.ss-order .ss-opts button { min-width: 44px; font-size: 16px; }
html[data-ae-theme="dark"] .ss-game-tabs button { background: #172744; color: #E8EEF9; border-color: #22335A; }

/* ---- 17) Supervisor tools (admin-tools.js) -------------------------------- */
.at-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 18px 0; }
.at-card { background: #fff; border: 1px solid #E3E8F2; border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; color: #1B2A44; }
.at-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.at-head h3 { margin: 0 0 4px; font-size: 17px; color: #102A5C; }
.at-head p { margin: 0; font-size: 13px; color: #5B6880; }
.at-head .btn { min-height: 42px; border-radius: 999px !important; padding-inline: 18px !important; }
.at-pick { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.at-pick select { min-height: 40px; border-radius: 10px; border: 1.5px solid #D5DDEA; padding: 0 10px; font: inherit; max-width: 320px; }
.at-ok { margin: 0; font-size: 14px; color: #1D7A4C; }
.at-warn { margin: 0; font-size: 13.5px; color: #B4361A; background: #FFF4F0; border-radius: 10px; padding: 8px 12px; }
.at-empty { margin: 0; font-size: 13.5px; color: #5B6880; }
.at-meta { margin: 0; font-size: 13px; color: #5B6880; }
.at-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.at-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #F7F9FC; font-size: 13.5px; }
.at-list li span { flex: 1; direction: ltr; text-align: start; font-family: inherit; }
.at-list li small { color: #5B6880; }
.at-list .btn { min-height: 36px; padding-inline: 14px !important; border-radius: 999px !important; font-size: 13px; }
.at-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.at-card h4 { margin: 0 0 8px; font-size: 14.5px; color: #102A5C; }
.at-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.at-rows li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 44px; align-items: center; gap: 10px; font-size: 13.5px; }
.at-rows li span { display: flex; flex-direction: column; min-width: 0; }
.at-rows li small { font-size: 11.5px; color: #5B6880; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-rows li b { text-align: end; color: #102A5C; }
.at-bar { height: 8px; border-radius: 999px; background: #EEF1F6; overflow: hidden; }
.at-bar i { display: block; height: 100%; border-radius: 999px; background: #F07A24; }
.at-table { overflow-x: auto; }
.at-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.at-table th { text-align: start; font-size: 12.5px; color: #5B6880; font-weight: 600; padding: 8px; border-bottom: 1px solid #E3E8F2; }
.at-table td { padding: 10px 8px; border-bottom: 1px solid #EEF1F6; vertical-align: top; }
.at-table td small { display: block; color: #5B6880; font-size: 12px; }
html[data-ae-theme="dark"] .at-card { background: #111E38; border-color: #22335A; color: #E8EEF9; }
html[data-ae-theme="dark"] .at-head h3, html[data-ae-theme="dark"] .at-card h4 { color: #fff; }
html[data-ae-theme="dark"] .at-list li { background: #172744; }

/* ---- 18) Quick self-test link after each axis ----------------------------- */
#lwModules .ss-axis-quiz {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 8px 10px 4px;
  border-radius: 999px;
  border: 1.5px dashed #F07A24;
  color: #B4561A !important;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none !important;
  background: #FFF8F2;
}
#lwModules .ss-axis-quiz:hover { background: #F07A24; color: #fff !important; border-style: solid; }
.ss-focus {
  outline: 3px solid #F07A24 !important;
  outline-offset: 4px;
  border-radius: 16px;
  transition: outline-color .4s ease;
}

/* ---- 19) Dashboard: study plan, readiness, mistakes ----------------------- */
.ss-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 0 0 22px; }
.ss-card { background: #fff; border: 1px solid #E3E8F2; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; color: #1B2A44; }
.ss-card h3 { margin: 0; font-size: 16.5px; color: #102A5C !important; }
.ss-card p { margin: 0; font-size: 13.5px; line-height: 1.7; color: #33415C; }
.ss-card .ss-btn { align-self: flex-start; margin-top: auto; }
.ss-plan-big b { font-size: 30px; color: #F07A24; }
.ss-hot { color: #B4561A !important; font-weight: 700; }
.ss-date { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin-top: auto; }
.ss-date input { min-height: 40px; border-radius: 10px; border: 1.5px solid #D5DDEA; padding: 0 10px; font: inherit; }
.ss-note { font-size: 11.5px; color: #8A97AE; }
.ss-ready { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ss-ready li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n pct" "bar bar" "note note"; align-items: center; column-gap: 10px; row-gap: 5px; font-size: 13.5px; }
.ss-ready li > span:first-child { grid-area: n; font-weight: 700; }
.ss-ready .ss-bar { grid-area: bar; height: 9px; border-radius: 999px; background: #EEF1F6; overflow: hidden; }
.ss-ready .ss-bar i { display: block; height: 100%; border-radius: 999px; background: #8A97AE; }
.ss-ready b { grid-area: pct; text-align: end; }
.ss-ready small { grid-area: note; font-size: 11.5px; color: #5B6880; }
.ss-ready li.b-ready .ss-bar i { background: #1D9A5B; }
.ss-ready li.b-close .ss-bar i { background: #F0A824; }
.ss-ready li.b-weak .ss-bar i { background: #E0552B; }
html[data-ae-theme="dark"] .ss-card { background: #111E38; border-color: #22335A; color: #E8EEF9; }
html[data-ae-theme="dark"] .ss-card h3 { color: #fff !important; }
html[data-ae-theme="dark"] .ss-card p { color: #C9D4E8; }

/* ---- 20) Free trial banner on the PMP package page ------------------------ */
.ss-trial { padding: 0 20px; margin: 18px 0 6px; }
.ss-trial-in { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  background: linear-gradient(135deg, #102A5C, #1B3F80); color: #fff; border-radius: 18px; padding: 20px 24px; box-shadow: 0 14px 34px -22px rgba(16, 42, 92, .7); }
.ss-trial-tag { background: #F07A24; color: #fff; font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.ss-trial h2 { margin: 0 0 6px; font-size: 19px; color: #fff !important; }
.ss-trial p { margin: 0; font-size: 14px; line-height: 1.7; color: #D9E3F5; }
.ss-trial .ss-btn { white-space: nowrap; }
@media (max-width: 760px) { .ss-trial-in { grid-template-columns: 1fr; } .ss-trial-tag { justify-self: start; } }

/* ---- 21) Admin two-step verification -------------------------------------- */
.at-tfa { display: grid; gap: 12px; margin-top: 12px; }
.at-tfa ol { margin: 0; padding-inline-start: 20px; line-height: 1.9; font-size: 14px; }
.at-tfa code { background: #EEF1F6; padding: 2px 8px; border-radius: 6px; font-size: 13px; letter-spacing: .5px; }
.at-tfa img { border: 1px solid #E3E8F2; border-radius: 12px; background: #fff; padding: 6px; }
.at-tfa-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.at-tfa-row input, .at-gate-box input { min-height: 44px; border: 1.5px solid #D5DDEA; border-radius: 10px; padding: 0 12px; font: inherit; font-size: 18px; letter-spacing: 3px; width: 190px; text-align: center; }
.at-codes { background: #0F1E3D; color: #F5D78E; padding: 14px 18px; border-radius: 12px; font-size: 15px; line-height: 1.9; }
.at-msg { color: #B4321A; font-size: 13.5px; margin: 0; min-height: 1em; }
.at-gate { position: fixed; inset: 0; z-index: 10000; background: rgba(10, 22, 48, .72); display: grid; place-items: center; padding: 20px; }
.at-gate-box { background: #fff; color: #1B2A44; border-radius: 18px; padding: 26px; max-width: 420px; width: 100%; display: grid; gap: 12px; text-align: center; justify-items: center; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
.at-gate-box h2 { margin: 0; color: #102A5C; font-size: 21px; }
.at-gate-box p { margin: 0; font-size: 14px; line-height: 1.7; color: #33415C; }
.at-gate-box a { font-size: 13px; color: #5B6880; }
