/* MRS NASHWA ABDELHALIM — platform demo stylesheet
   One file: fonts → tokens → base → components → public site → dashboard → exam → report → print. */

/* ---------- Fonts (self-hosted so the demo works offline and from file://) ---------- */
@font-face { font-family: "Newsreader"; src: url(../assets/fonts/Newsreader-var.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(../assets/fonts/Newsreader-italic-var.woff2) format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(../assets/fonts/IBMPlexSans-var-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(../assets/fonts/IBMPlexSansArabic-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(../assets/fonts/IBMPlexSansArabic-500.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(../assets/fonts/IBMPlexSansArabic-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(../assets/fonts/IBMPlexSansArabic-700.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Noto Naskh Arabic"; src: url(../assets/fonts/NotoNaskhArabic-var.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }

/* ---------- Tokens ---------- */
:root {
  --navy-950: #0A1A33; --navy-900: #0E2240; --navy-800: #15305A; --navy-700: #1E3A5F; --navy-100: #E6ECF5;
  --blue-700: #1D4ED8; --blue-600: #2563EB; --blue-400: #6B9BF7; --blue-100: #DBE7FE; --blue-50: #EFF4FF;
  --paper: #FAF8F4; --paper-2: #F3EFE7; --surface: #FFFFFF;
  --line: #E5E0D6; --line-2: #D6CFC2;
  --ink: #13213A; --ink-2: #46536A; --ink-3: #636D80;
  --gold: #C29A45; --gold-ink: #85631F; --gold-50: #FBF4E4;
  --green: #157F4A; --green-50: #E6F4EC;
  --amber: #9A5205; --amber-50: #FDF1DF;
  --red: #B42318; --red-50: #FDECEA;
  --violet: #6D28D9; --violet-50: #F1EAFD;
  --teal: #0F766E; --teal-50: #E3F4F2;
  --c-sat-basics: #2563EB; --c-sat-advanced: #A87515; --c-est-basics: #0F766E; --c-est-advanced: #6D28D9;

  --f-display: "Newsreader", "Noto Naskh Arabic", Georgia, serif;
  --f-ui: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgb(14 34 64 / .06), 0 1px 1px rgb(14 34 64 / .04);
  --sh-2: 0 10px 30px -12px rgb(14 34 64 / .22), 0 2px 6px -2px rgb(14 34 64 / .08);
  --sh-3: 0 28px 70px -24px rgb(10 26 51 / .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms; --t: 220ms;
  --header-h: 72px; --gutter: clamp(16px, 4vw, 40px);
  --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--blue-600);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html:has(dialog[open]:modal), html.lock { overflow: hidden; }
body { margin: 0; font: 400 16px/1.6 var(--f-ui); color: var(--ink); background: var(--paper); overflow-x: clip; min-height: 100dvh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:lang(ar) body, body:lang(ar) { line-height: 1.75; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--ink); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--blue-700); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--blue-100); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; }
bdi, .ltr { unicode-bidi: isolate; }
.ltr { direction: ltr; }
.num { font-variant-numeric: tabular-nums; }
.flip:dir(rtl), [dir="rtl"] .flip { transform: scaleX(-1); }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .875rem; }
.xs { font-size: .8125rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.stack { display: grid; gap: var(--gap, 12px); align-content: start; }
.stack > :is(span, a, img, button, label, .badge, .model) { justify-self: start; }
.stack > .block, .stack > .note { justify-self: stretch; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section.alt { background: var(--paper-2); }
.section.tight { padding-block: clamp(40px, 6vw, 72px); }
.grid { display: grid; gap: var(--gap, 24px); }
.grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); } }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.eyebrow::before { content: ""; width: 24px; height: 1.5px; background: var(--gold); }
:lang(ar) .eyebrow { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -.01em; }
:lang(ar) .display { letter-spacing: 0; font-weight: 600; }
.h-xl { font-size: clamp(2.4rem, 5.2vw, 4.25rem); line-height: 1.05; }
.h-lg { font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.12; }
.h-md { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
:lang(ar) .h-xl { line-height: 1.3; } :lang(ar) .h-lg { line-height: 1.35; }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-2); max-width: 62ch; }
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 720px; }
.sec-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.sec-head.split { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 680px) { .sec-head.split { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn { --bg: var(--surface); --fg: var(--ink); --bd: var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--r-sm); border: 1px solid var(--bd); background: var(--bg); color: var(--fg); font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background var(--t-fast) var(--ease), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { --bg: var(--blue-600); --fg: #fff; --bd: var(--blue-600); box-shadow: 0 1px 0 rgb(255 255 255 / .15) inset, 0 6px 16px -8px rgb(37 99 235 / .7); }
.btn.primary:hover { --bg: var(--blue-700); --bd: var(--blue-700); }
.btn.navy { --bg: var(--navy-900); --fg: #fff; --bd: var(--navy-900); }
.btn.navy:hover { --bg: var(--navy-800); }
.btn.ghost { --bg: transparent; --bd: transparent; }
.btn.ghost:hover { --bg: rgb(14 34 64 / .06); }
.btn.light { --bg: rgb(255 255 255 / .1); --fg: #fff; --bd: rgb(255 255 255 / .38); }
.btn.light:hover { --bg: rgb(255 255 255 / .18); --bd: #fff; }
.btn.danger { --bg: var(--red); --fg: #fff; --bd: var(--red); }
.btn.danger:hover { --bg: #931c13; }
.btn.success { --bg: var(--green); --fg: #fff; --bd: var(--green); }
.btn.success:hover { --bg: #106a3d; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.btn.lg { min-height: 52px; padding: 14px 24px; font-size: 1rem; }
.btn.icon-only { padding: 0; width: 44px; }
.btn.sm.icon-only { width: 36px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue-700); text-decoration: none; background: none; border: 0; padding: 0; min-height: 32px; }
.link:hover { text-decoration: underline; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--ink-2); position: relative; }
.icon-btn:hover { background: rgb(14 34 64 / .06); color: var(--ink); }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--navy-100); color: var(--navy-800); border: 1px solid transparent; }
.badge .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.badge.success { background: var(--green-50); color: var(--green); }
.badge.warn { background: var(--amber-50); color: var(--amber); }
.badge.danger { background: var(--red-50); color: var(--red); }
.badge.info { background: var(--blue-50); color: var(--blue-700); }
.badge.gold { background: var(--gold-50); color: var(--gold-ink); }
.badge.violet { background: var(--violet-50); color: var(--violet); }
.badge.neutral { background: var(--paper-2); color: var(--ink-2); border-color: var(--line); }
.badge.outline { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.badge.demo { background: transparent; border: 1px dashed var(--gold); color: var(--gold-ink); letter-spacing: .08em; font-size: .68rem; padding: 1px 7px; }
:lang(ar) .badge.demo { letter-spacing: 0; font-size: .75rem; }
.model { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; padding: 5px 11px; border-radius: 12px; line-height: 1.35; }
table.t .model { font-size: .78rem; }
.model.onetime { background: var(--navy-100); color: var(--navy-800); }
.model.monthly { background: var(--blue-50); color: var(--blue-700); box-shadow: inset 0 0 0 1px var(--blue-100); }
.model .icon { width: 15px; height: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 500; font-size: .9rem; transition: all var(--t-fast); }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.chip .count { font-size: .75rem; opacity: .7; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
:lang(ar) .tag { letter-spacing: 0; text-transform: none; font-size: .8rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-width: 0; }
.card.pad { padding: clamp(18px, 2.4vw, 28px); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 2vw, 24px); min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-h h2, .panel-h h3 { font: 600 1.02rem/1.3 var(--f-ui); }
.panel-h .sub { font-size: .85rem; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 16px 0; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--blue-50); color: var(--navy-800); font-size: .9rem; border: 1px solid var(--blue-100); }
.note .icon { margin-top: 2px; color: var(--blue-700); }
.note.gold { background: var(--gold-50); border-color: #F0E1BD; color: #5f4612; }
.note.gold .icon { color: var(--gold-ink); }
.note.warn { background: var(--amber-50); border-color: #F6D9AE; color: #6b3a04; }
.note.warn .icon { color: var(--amber); }
.note.danger { background: var(--red-50); border-color: #F6C9C4; color: #7a1a12; }
.note.danger .icon { color: var(--red); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: .8rem; color: var(--ink-3); }
.field .err { font-size: .82rem; color: var(--red); display: none; align-items: center; gap: 6px; }
.field.invalid .err { display: flex; }
.field.invalid .input { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-50); }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font-size: 1rem; transition: border-color var(--t-fast), box-shadow var(--t-fast); min-width: 0; }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-inline-end: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2346536A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
[dir="rtl"] select.input { background-position: left 10px center; }
.input.sm { min-height: 38px; padding: 6px 10px; font-size: .9rem; }
.search { position: relative; min-width: 0; }
.search .icon { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-inline-start: 40px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue-600); }
/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background var(--t-fast); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--t) var(--ease); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-18px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
/* segmented */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 10px; background: var(--paper-2); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 7px; font-weight: 600; font-size: .875rem; color: var(--ink-2); white-space: nowrap; min-height: 38px; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

/* ---------- Progress, ring, avatars ---------- */
.bar { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; box-shadow: inset 0 0 0 1px rgb(14 34 64 / .04); }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--blue-600); width: var(--v, 0%); transition: width .6s var(--ease); }
.bar.gold > i { background: var(--gold); } .bar.green > i { background: var(--green); } .bar.navy > i { background: var(--navy-700); }
.bar.lg { height: 10px; }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; font-weight: 700; font-variant-numeric: tabular-nums; }
.avatar { --c: var(--navy-700); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 600; font-size: .9rem; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.35rem; }
.avatar.xl { width: 88px; height: 88px; font-size: 1.8rem; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .t { min-width: 0; }
.who .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .t span { display: block; font-size: .8rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Tables (become cards on small screens) ---------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: start; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); background: #FCFBF8; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
:lang(ar) table.t th { letter-spacing: 0; text-transform: none; font-size: .82rem; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background var(--t-fast); }
table.t tbody tr:hover { background: #FCFBF8; }
table.t tr.clickable { cursor: pointer; }
.compact table.t td { padding-block: 8px; }
@media (max-width: 760px) {
  .rtable { border: 0; background: transparent; overflow: visible; }
  .rtable table.t, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable thead { display: none; }
  .rtable tr { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; margin-bottom: 12px; }
  .rtable td { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .rtable td::before { content: attr(data-label); font-size: .78rem; font-weight: 600; color: var(--ink-3); }
  .rtable td.cell-main { grid-template-columns: minmax(0, 1fr); }
  .rtable td.cell-main::before { display: none; }
  .rtable td:last-child { border-bottom: 0; }
}

/* ---------- Empty state ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: clamp(28px, 5vw, 48px) 20px; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: 14px; background: #FCFBF8; }
.empty .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.empty h3 { font: 600 1.05rem var(--f-ui); }
.empty p { max-width: 46ch; font-size: .92rem; }

/* ---------- Dialogs / popovers / toasts ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: var(--sh-3); overflow: hidden; }
dialog.modal.wide { width: min(880px, calc(100vw - 32px)); }
dialog.modal[open] { display: flex; flex-direction: column; animation: pop var(--t) var(--ease); }
dialog.modal::backdrop { background: rgb(10 26 51 / .55); backdrop-filter: blur(2px); }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font: 600 1.15rem/1.35 var(--f-ui); }
.modal-h p { font-size: .88rem; color: var(--ink-3); margin-top: 2px; }
.modal-b { padding: 20px 22px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #FCFBF8; flex-wrap: wrap; }
@media (max-width: 600px) {
  dialog.modal, dialog.modal.wide { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  dialog.modal[open] { animation: sheet var(--t) var(--ease); }
  .modal-f { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .modal-f .btn { flex: 1 1 auto; }
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
[popover].pop { position: fixed; inset: auto; margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--sh-3); padding: 8px; width: min(340px, calc(100vw - 16px)); max-height: min(520px, calc(100dvh - 90px)); overflow-y: auto; overscroll-behavior: contain; }
[popover].pop:popover-open { animation: pop var(--t-fast) var(--ease); }
.menu { display: grid; gap: 2px; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; background: none; border-radius: 9px; text-align: start; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.menu a:hover, .menu button:hover { background: var(--paper-2); }
.menu .icon { color: var(--ink-3); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.menu .menu-h { padding: 10px 12px 8px; }
.toasts { position: fixed; z-index: 1000; inset-inline-end: 16px; bottom: max(16px, env(safe-area-inset-bottom)); display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--navy-900); color: #fff; box-shadow: var(--sh-3); font-size: .92rem; animation: pop var(--t) var(--ease); }
.toast .icon { color: #7FD3A6; margin-top: 1px; }
.toast.warn .icon { color: #F5C26B; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all var(--t) var(--ease); }

/* ---------- Role switcher / language ---------- */
.role-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 6px; border-radius: var(--r-pill); border: 1px dashed var(--gold); background: var(--gold-50); color: var(--ink); font-size: .875rem; font-weight: 600; white-space: nowrap; }
[dir="rtl"] .role-btn { padding: 4px 6px 4px 12px; }
.role-btn:hover { background: #F7EBCF; }
.role-btn .badge.demo { background: var(--surface); }
.role-btn .lbl { color: var(--ink-3); font-weight: 500; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .875rem; }
.lang-btn:hover { border-color: var(--ink-3); }
.role-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: none; text-align: start; min-height: 56px; }
.role-opt:hover { background: var(--paper-2); }
.role-opt[aria-checked="true"] { border-color: var(--blue-600); background: var(--blue-50); }
.role-opt .t b { display: block; font-weight: 600; }
.role-opt .t span { font-size: .8rem; color: var(--ink-3); }
.role-opt .tick { color: var(--blue-600); opacity: 0; }
.role-opt[aria-checked="true"] .tick { opacity: 1; }

/* ---------- Photo frames: every photo sits in a warm mat with a fine gold hairline ---------- */
.frame { position: relative; padding: 9px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); }
.frame::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgb(194 154 69 / .55); border-radius: 16px; pointer-events: none; z-index: 1; }
.frame > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.frame.dark { background: rgb(255 255 255 / .07); border-color: rgb(255 255 255 / .16); box-shadow: var(--sh-3); }
.frame.dark::before { border-color: rgb(233 210 155 / .6); }
.inset-photo { margin: 10px 10px 0; border-radius: 12px; overflow: hidden; outline: 1px solid rgb(194 154 69 / .55); outline-offset: 4px; } /* inside cards: the card is the mat */
.inset-photo img { width: 100%; height: 100%; object-fit: cover; }
.thumb { border-radius: 10px; border: 3px solid var(--surface); box-shadow: 0 0 0 1px rgb(194 154 69 / .6), var(--sh-1); background: var(--surface); }
img.avatar.photo { object-fit: cover; object-position: 50% 30%; background: var(--paper-2); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px rgb(194 154 69 / .75); }
.welcome img.avatar.photo { box-shadow: 0 0 0 3px rgb(255 255 255 / .9), 0 0 0 4px rgb(194 154 69 / .9); }

/* =========================================================
   PUBLIC SITE
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(250 248 244 / .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color var(--t), box-shadow var(--t); }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgb(14 34 64 / .35); }
.site-header .bar-in { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.nav a { position: relative; padding: 10px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: rgb(14 34 64 / .05); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gold); }
.head-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.burger, .head-actions .show-m { display: none; }
.lang-mini { display: inline-flex; align-items: center; padding: 3px; gap: 2px; min-height: 40px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: .82rem; }
.lang-mini span { display: grid; place-items: center; min-width: 30px; height: 32px; padding: 0 6px; border-radius: var(--r-pill); color: var(--ink-3); }
.lang-mini span[aria-current="true"] { background: var(--navy-900); color: #fff; }
.lang-mini span[lang="ar"] { font-size: 1rem; }
@media (max-width: 1320px) { .head-actions .role-btn .lbl { display: none; } }
@media (max-width: 1180px) {
  .nav, .head-actions .hide-m { display: none; }
  .head-actions .show-m { display: inline-flex; }
  .burger { display: inline-grid; }
  .head-actions { margin-inline-start: auto; }
}
@media (max-width: 420px) { .brand img { height: 34px; } :root { --header-h: 64px; } .head-actions { gap: 6px; } }
/* mobile menu sheet */
dialog.msheet { margin: 0; inset-inline: 0 auto; top: 0; border: 0; padding: 0; width: min(420px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; background: var(--paper); box-shadow: var(--sh-3); }
[dir="rtl"] dialog.msheet { inset-inline: 0 auto; }
dialog.msheet[open] { display: flex; flex-direction: column; animation: slide-in var(--t) var(--ease); }
dialog.msheet::backdrop { background: rgb(10 26 51 / .5); }
@keyframes slide-in { from { transform: translateX(-24px); opacity: .3; } }
[dir="rtl"] dialog.msheet[open] { animation-name: slide-in-r; }
@keyframes slide-in-r { from { transform: translateX(24px); opacity: .3; } }
.msheet-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.msheet-h img { height: 38px; width: auto; }
.msheet-b { padding: 12px 16px 24px; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 18px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.mnav { display: grid; gap: 2px; }
.mnav a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 1.05rem; }
.mnav a[aria-current="page"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--gold); font-weight: 600; }
[dir="rtl"] .mnav a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--gold); }

/* hero */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--navy-950); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media video { opacity: 0; transition: opacity .8s ease; }
.hero-media video.ready { opacity: 1; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(10 26 51 / .94) 0%, rgb(10 26 51 / .82) 42%, rgb(10 26 51 / .45) 75%, rgb(10 26 51 / .3) 100%), linear-gradient(0deg, rgb(10 26 51 / .55), transparent 40%); }
[dir="rtl"] .hero::before { background: linear-gradient(270deg, rgb(10 26 51 / .94) 0%, rgb(10 26 51 / .82) 42%, rgb(10 26 51 / .45) 75%, rgb(10 26 51 / .3) 100%), linear-gradient(0deg, rgb(10 26 51 / .55), transparent 40%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 5vw, 72px); align-items: center; min-height: min(calc(100dvh - var(--header-h)), 780px); padding-block: clamp(56px, 9vw, 112px); }
.hero h1 { color: #fff; }
.hero h1 em { font-style: italic; color: #E9D29B; font-weight: 400; }
:lang(ar) .hero h1 em { font-style: normal; }
.hero .lede { color: rgb(255 255 255 / .82); margin-top: 22px; }
.hero .eyebrow { color: #E9D29B; }
.hero .eyebrow::before { background: #E9D29B; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-courses { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .16); font-size: .9rem; color: rgb(255 255 255 / .75); }
.hero-courses a { color: #fff; text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.hero-courses a:hover { text-decoration: underline; }
.hero-courses .dot { width: 7px; height: 7px; }
/* hero preview: a dark navy glass panel that belongs to the video hero */
.hero-preview { justify-self: end; width: 100%; max-width: 300px; display: grid; gap: 10px; padding: 14px; border-radius: 16px; color: #fff;
  background: linear-gradient(160deg, rgb(30 58 95 / .82), rgb(10 26 51 / .88)); border: 1px solid rgb(255 255 255 / .14);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 30px 60px -28px rgb(0 0 0 / .65), inset 0 1px 0 rgb(255 255 255 / .08); }
.hp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hp-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #E9D29B; }
:lang(ar) .hp-eyebrow { letter-spacing: 0; text-transform: none; font-size: .74rem; }
.hp-eyebrow .icon { width: 13px; height: 13px; }
.hp-sample { font-size: .62rem; font-weight: 600; padding: 1px 7px; border-radius: 99px; border: 1px dashed rgb(233 210 155 / .55); color: #E9D29B; white-space: nowrap; }
.hp-who { display: flex; align-items: center; gap: 10px; }
.hp-who .avatar { background: linear-gradient(135deg, #F1DFB0, var(--gold)); color: var(--navy-950); font-weight: 700; box-shadow: 0 0 0 3px rgb(255 255 255 / .1); }
.hp-who .grow b { display: block; font-weight: 600; font-size: .86rem; line-height: 1.3; }
.hp-who .grow span { display: block; font-size: .72rem; color: rgb(255 255 255 / .65); }
.hp-pct { font: 600 1.45rem/1 var(--f-display); color: #fff; }
.hp-bar { height: 5px; border-radius: 99px; background: rgb(255 255 255 / .14); overflow: hidden; }
.hp-bar i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, #E9D29B, var(--gold)); }
.hp-sub { display: block; margin-top: 5px; font-size: .68rem; color: rgb(255 255 255 / .6); }
.hp-list { list-style: none; margin: 0; padding: 0; display: grid; }
.hp-list li { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid rgb(255 255 255 / .1); min-width: 0; }
.hp-list .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: rgb(255 255 255 / .08); color: #E9D29B; }
.hp-list li > div { flex: 1; min-width: 0; }
.hp-list .ic .icon { width: 14px; height: 14px; }
.hp-list small { display: block; font-size: .64rem; color: rgb(255 255 255 / .58); }
.hp-list b { display: block; font-weight: 500; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-score { flex: none; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: rgb(127 211 166 / .16); color: #A4E8C3; }
.hp-cta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border-radius: 10px; background: #fff; color: var(--navy-900); font-weight: 600; font-size: .8rem; text-decoration: none; transition: background var(--t-fast); }
.hp-cta:hover { background: #F3EFE7; }
@media (max-width: 960px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-preview { justify-self: start; max-width: 320px; }
  /* stacked layout: an even overlay keeps text readable over the whole video */
  .hero::before, [dir="rtl"] .hero::before { background: linear-gradient(180deg, rgb(10 26 51 / .8), rgb(10 26 51 / .9)); }
}
@media (max-width: 600px) { .hero-ctas .btn { flex: 1 1 100%; } }

/* page hero (inner pages) */
.page-hero { background: var(--navy-950); color: #fff; position: relative; isolation: isolate; overflow: hidden; }
.page-hero .container { padding-block: clamp(48px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.page-hero h1 { color: #fff; }
.page-hero .lede { color: rgb(255 255 255 / .8); margin-top: 16px; }
.page-hero .eyebrow { color: #E9D29B; } .page-hero .eyebrow::before { background: #E9D29B; }
.page-hero .ph-img { aspect-ratio: 16 / 9; }
.page-hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(37 99 235 / .25), transparent 65%); z-index: -1; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: rgb(255 255 255 / .7); margin-bottom: 18px; }
.crumbs a { color: rgb(255 255 255 / .85); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.crumbs .icon { width: 14px; height: 14px; }
@media (max-width: 860px) { .page-hero .container { grid-template-columns: minmax(0, 1fr); } }

/* slideshows: on phones some grids become swipeable slides with dots + arrows */
.slider-ui { display: none; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.slider-ui .icon-btn { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 50%; }
.slider-ui .dots { display: flex; align-items: center; }
.slider-ui .dots button { width: 22px; height: 32px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.slider-ui .dots button::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--line-2); transition: width var(--t) var(--ease), background var(--t); }
.slider-ui .dots button[aria-current="true"]::before { width: 20px; background: var(--navy-900); }
@media (max-width: 680px) {
  .slides { display: flex !important; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 10px; scroll-padding-inline: var(--gutter); }
  .slides::-webkit-scrollbar { display: none; }
  .slides > * { flex: 0 0 86%; scroll-snap-align: center; }
  .slides + .slider-ui { display: flex; }
  .course-card:hover { transform: none; }
  .flow.slides .flow-step { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--sh-1); }
  .flow.slides .flow-step::before { display: none; }
}

/* course cards */
.course-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease); min-width: 0; }
.course-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.course-card .cimg { aspect-ratio: 3 / 2; background: var(--paper-2); }
.course-card .cimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.course-card:hover .cimg img { transform: scale(1.03); }
.course-card .cbody { display: flex; flex-direction: column; gap: 12px; padding: 20px; flex: 1; }
.course-card .accent { position: absolute; inset: 0 0 auto; height: 4px; background: var(--cc); z-index: 1; }
.course-card h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; }
.course-card .desc { color: var(--ink-2); font-size: .95rem; }
.course-card .cfoot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { font-size: .85rem; color: var(--ink-3); }
.price b { display: block; color: var(--ink); font-size: .95rem; font-weight: 600; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.course-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.course-row .cimg { aspect-ratio: 3 / 2; align-self: center; margin: 12px; margin-inline-end: 0; }
.course-row .cbody { padding: clamp(20px, 3vw, 32px); }
@media (max-width: 820px) { .course-row { grid-template-columns: minmax(0, 1fr); } .course-row .cimg { aspect-ratio: 3 / 2; margin: 10px 10px 0; } }

/* courses page: two cards per row at every width (compact on phones) */
.course-grid { --gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.course-grid .course-row { grid-template-columns: minmax(0, 1fr); }
.course-grid .course-row .cimg { aspect-ratio: 3 / 2; align-self: auto; margin: 10px 10px 0; }
.course-grid .cfoot .link { flex-wrap: wrap; gap: 8px; }
@media (max-width: 680px) {
  .course-grid { --gap: 10px; }
  .course-grid .course-row .cimg { margin: 6px 6px 0; outline-offset: 2px; border-radius: 9px; }
  .course-grid .cbody { padding: 10px; gap: 7px; }
  .course-grid .cbody > .row.between { flex-direction: column; align-items: flex-start; gap: 5px; }
  .course-grid .tag { font-size: .6rem; }
  .course-grid .model { font-size: .62rem; padding: 3px 7px; gap: 4px; }
  .course-grid .model .icon { width: 11px; height: 11px; }
  .course-grid h3 { font-size: 1.02rem; }
  .course-grid .desc { font-size: .74rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .course-grid .mnote, .course-grid .acc-row > span:first-child { display: none; }
  .course-grid .acc-row .badge { font-size: .62rem; padding: 2px 7px; }
  .course-grid .cfoot { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 8px; }
  .course-grid .price { font-size: .64rem; }
  .course-grid .price b { font-size: .74rem; }
  .course-grid .cfoot .link { display: grid; gap: 6px; }
  .course-grid .cfoot .btn { width: 100%; min-height: 36px; padding: 5px 6px; font-size: .7rem; white-space: normal; text-align: center; }
  .course-grid .cfoot .btn .icon { width: 14px; height: 14px; }
}

/* features */
.feature { display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-900); color: #E9D29B; }
.feature h3 { font: 600 1.08rem/1.35 var(--f-ui); }
.feature p { color: var(--ink-2); font-size: .94rem; }
.exp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.exp-img img { height: auto; }
.exp-list { display: grid; gap: 4px; }
.exp-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.exp-item:last-child { border-bottom: 0; }
.exp-item .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-700); }
.exp-item h3 { font: 600 1rem/1.4 var(--f-ui); }
.exp-item p { color: var(--ink-2); font-size: .92rem; margin-top: 2px; }
@media (max-width: 900px) { .exp-grid { grid-template-columns: minmax(0, 1fr); } }

/* teacher intro / portrait */
.teacher { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.portrait { width: 100%; max-width: 380px; justify-self: center; }
.portrait:not(.has-photo) { aspect-ratio: 4 / 5; }
.portrait img.photo { height: auto; }
.portrait .ph { position: absolute; inset: 9px; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 18px; text-align: center; padding: 28px; color: rgb(255 255 255 / .75); background: radial-gradient(120% 80% at 50% 0%, var(--navy-800), var(--navy-950)); }
.portrait .ph img { width: 96px; height: auto; opacity: .95; }
.portrait .ph b { font-family: var(--f-display); font-weight: 500; font-size: 1.35rem; color: #fff; letter-spacing: .04em; }
.portrait .ph span { font-size: .82rem; max-width: 28ch; }
.portrait .ph::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgb(194 154 69 / .45); border-radius: 14px; pointer-events: none; }
.portrait.has-photo .ph { display: none; }
.portrait .cap { position: absolute; z-index: 2; inset: auto 20px 20px; padding: 10px 14px; border-radius: 12px; background: rgb(10 26 51 / .74); backdrop-filter: blur(6px); color: #fff; font-size: .85rem; display: grid; gap: 2px; }
.portrait .cap b { font-weight: 600; font-size: .9rem; }
.portrait .cap .tw { color: #E9D29B; min-height: 1.5em; font-weight: 500; }
.portrait .cap .tw::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-inline-start: 3px; vertical-align: -2px; background: #E9D29B; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.portrait:not(.has-photo) .cap { display: none; }
.sig { font-family: var(--f-display); font-style: italic; font-size: 1.3rem; color: var(--navy-700); }
.quote { font-family: var(--f-display); font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.45; color: var(--ink); border-inline-start: 3px solid var(--gold); padding-inline-start: 20px; }
:lang(ar) .quote { line-height: 1.8; }
@media (max-width: 860px) { .teacher { grid-template-columns: minmax(0, 1fr); } .portrait { max-width: 260px; } }
.sample-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--gold-ink); background: var(--gold-50); border: 1px dashed #E2CC94; border-radius: 99px; padding: 2px 10px; }

/* workflow */
.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: step; position: relative; }
.flow-step { position: relative; padding: 0 14px; display: grid; gap: 10px; align-content: start; }
.flow-step .n { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--navy-700); color: var(--navy-900); font-weight: 700; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.flow-step::before { content: ""; position: absolute; top: 23px; inset-inline: 0; height: 1.5px; background: var(--line-2); }
.flow-step:first-child::before { inset-inline-start: 50%; } .flow-step:last-child::before { inset-inline-end: 50%; }
.flow-step h3 { font: 600 1rem/1.35 var(--f-ui); }
.flow-step p { font-size: .88rem; color: var(--ink-2); }
.flow-step.gate .n { background: var(--navy-900); color: #E9D29B; border-color: var(--navy-900); }
.gate-note { display: inline-flex; gap: 6px; align-items: center; font-size: .78rem; font-weight: 600; color: var(--gold-ink); background: var(--gold-50); border-radius: 8px; padding: 4px 8px; width: fit-content; }
@media (max-width: 980px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .flow-step { grid-template-columns: 46px 1fr; column-gap: 16px; padding: 0 0 22px; }
  .flow-step > :not(.n) { grid-column: 2; }
  .flow-step .n { grid-row: 1 / span 3; }
  .flow-step::before { top: 0; bottom: 0; height: auto; width: 1.5px; inset-inline-start: 22px; inset-inline-end: auto; }
  .flow-step:first-child::before { top: 23px; inset-inline-start: 22px; }
  .flow-step:last-child::before { bottom: auto; height: 23px; inset-inline-end: auto; }
}

/* material cards */
.mat-grid { --gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mat-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); min-width: 0; transition: box-shadow var(--t), border-color var(--t); }
.mat-card:hover { box-shadow: var(--sh-2); }
.mat-card .mtop { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ftype { width: 46px; height: 54px; border-radius: 8px; display: grid; place-items: center; position: relative; color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .05em; flex: none; clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.ftype .icon { width: 20px; height: 20px; margin-top: -6px; }
.ftype span { position: absolute; bottom: 5px; inset-inline: 0; text-align: center; }
.ftype.pdf { background: #B42318; } .ftype.worksheet { background: var(--blue-600); } .ftype.image { background: var(--teal); } .ftype.notes { background: var(--gold-ink); } .ftype.audio { background: var(--violet); }
.mat-card h3 { font: 600 .95rem/1.4 var(--f-ui); }
.mat-card p { font-size: .84rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mat-card .ftype { width: 38px; height: 46px; }
.mat-card .ftype .icon { width: 17px; height: 17px; }
.mat-card .mmeta .badge { font-size: .72rem; padding: 2px 8px; }
@media (max-width: 680px) {
  .mat-grid { --gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mat-card { padding: 11px; gap: 8px; }
  .mat-card .ftype { width: 32px; height: 38px; }
  .mat-card .ftype span { font-size: .5rem; bottom: 3px; }
  .mat-card .mtop .badge { font-size: .66rem; padding: 2px 6px; gap: 3px; }
  .mat-card .mtop .badge .icon { width: 11px; height: 11px; }
  .mat-card h3 { font-size: .85rem; line-height: 1.35; }
  .mat-card p { font-size: .76rem; }
  .mat-card .mmeta .badge:first-child { display: none; }
  .mat-card .lock-why { font-size: .7rem; padding: 6px 8px; gap: 6px; }
  .mat-card .lock-why span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .mat-card .mfoot { padding-top: 8px; }
  .mat-card .mfoot > span { display: none; }
  .mat-card .mfoot .btn { width: 100%; min-height: 38px; padding: 6px 8px; font-size: .78rem; }
}
.mat-card .mmeta { display: flex; flex-wrap: wrap; gap: 6px; }
.mat-card .mfoot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.mat-card.locked { background: #FCFBF8; }
.mat-card.locked h3, .mat-card.locked p { color: var(--ink-3); }
.lock-why { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--ink-2); background: var(--paper-2); padding: 8px 10px; border-radius: 8px; }
.lock-why .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--ink-3); }
.filters { display: grid; gap: 14px; margin-bottom: 24px; }
.filters .frow { display: grid; grid-template-columns: minmax(0, 1fr) 220px 200px; gap: 12px; }
.filters .frow.f4 { grid-template-columns: minmax(0, 1fr) 190px 170px 190px; }
@media (max-width: 1180px) { .filters .frow.f4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 760px) { .filters .frow, .filters .frow.f4 { grid-template-columns: minmax(0, 1fr); } }
.about-hero .container { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 860px) { .about-hero .container { grid-template-columns: minmax(0, 1fr); } .about-hero .portrait { max-width: 250px; } }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
@media (min-width: 761px) { .chips.scroll { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; } }
.chips.scroll .chip { flex: none; }
/* document preview (material viewer) */
.docprev { border-radius: 12px; background: linear-gradient(#fff, #FDFCF9); border: 1px solid var(--line); padding: 28px; box-shadow: var(--sh-1); }
.docprev .ln { height: 9px; border-radius: 4px; background: var(--paper-2); margin: 10px 0; }
.docprev h4 { font-family: var(--f-display); font-size: 1.3rem; margin-bottom: 4px; }
.docprev ol { padding-inline-start: 20px; display: grid; gap: 10px; margin: 16px 0 0; }

/* CTA band + footer */
.cta-band { background: var(--navy-900); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; position: relative; overflow: hidden; isolation: isolate; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgb(255 255 255 / .78); margin-top: 10px; }
.cta-band::after { content: ""; position: absolute; inset: -40% -10% auto auto; width: 50%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(194 154 69 / .25), transparent 65%); z-index: -1; }
@media (max-width: 760px) { .cta-band { grid-template-columns: minmax(0, 1fr); } }
.site-footer { background: var(--navy-950); color: rgb(255 255 255 / .72); padding-block: 56px 28px; margin-top: 0; }
.site-footer .fgrid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer img.flogo { height: 54px; width: auto; }
.site-footer h3 { color: #fff; font: 600 .82rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
:lang(ar) .site-footer h3 { letter-spacing: 0; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.site-footer a { color: rgb(255 255 255 / .8); text-decoration: none; display: inline-flex; min-height: 34px; align-items: center; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .fbottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / .12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
@media (max-width: 860px) { .site-footer .fgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .site-footer .fgrid > :first-child { grid-column: 1 / -1; } }

/* course detail */
.cd-hero { background: var(--navy-950); color: #fff; }
.cd-hero .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(40px, 6vw, 80px); }
.cd-hero h1 { color: #fff; }
.cd-hero .cimg { aspect-ratio: 3 / 2; }
.cd-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgb(255 255 255 / .14); border-radius: 14px; overflow: hidden; margin-top: 28px; }
.cd-facts > div { background: var(--navy-900); padding: 14px 16px; }
.cd-facts span { display: block; font-size: .78rem; color: rgb(255 255 255 / .6); }
.cd-facts b { font-weight: 600; font-size: .95rem; }
@media (max-width: 860px) { .cd-hero .container { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .cd-facts { grid-template-columns: minmax(0, 1fr); } }
.cd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.cd-aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
@media (max-width: 960px) { .cd-layout { grid-template-columns: minmax(0, 1fr); } .cd-aside { position: static; } }
.lesson-list { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.lesson-list .li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lesson-list .li:last-child { border-bottom: 0; }
.lesson-list .li .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 700; background: var(--paper-2); color: var(--ink-2); }
.slot { border: 1px dashed var(--line-2); border-radius: 12px; padding: 16px; background: #FCFBF8; color: var(--ink-3); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.compare { width: 100%; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.success-panel { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 32px 16px; }
.success-panel .ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green); }
.success-panel .ic .icon { width: 30px; height: 30px; }
.info-list { display: grid; gap: 14px; }
.info-list .it { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.info-list .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--paper-2); color: var(--navy-700); }
.info-list b { display: block; font-weight: 600; }
.info-list span { font-size: .88rem; color: var(--ink-3); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform var(--t); color: var(--ink-3); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--ink-2); }
.models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.model-box { padding: 22px; border-radius: 16px; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .14); display: grid; gap: 8px; }
.model-box h3 { color: #fff; font: 600 1.05rem var(--f-ui); display: flex; gap: 10px; align-items: center; }
.model-box p { font-size: .9rem; color: rgb(255 255 255 / .75); }
@media (max-width: 640px) { .models { grid-template-columns: minmax(0, 1fr); } }

/* =========================================================
   DASHBOARD
   ========================================================= */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100dvh; background: linear-gradient(90deg, var(--navy-950) 264px, transparent 264px); }
[dir="rtl"] .app { background: linear-gradient(270deg, var(--navy-950) 264px, transparent 264px); }
.side { position: sticky; top: 0; height: 100dvh; background: var(--navy-950); color: rgb(255 255 255 / .78); display: flex; flex-direction: column; overflow: hidden; }
.side-h { padding: 14px 18px 12px; border-bottom: 1px solid rgb(255 255 255 / .08); }
.side-h img { height: 42px; width: auto; }
.side-role { margin: 14px 14px 4px; padding: 10px 12px; border-radius: 10px; background: rgb(255 255 255 / .05); border: 1px dashed rgb(194 154 69 / .5); display: flex; align-items: center; gap: 10px; font-size: .82rem; }
.side-role b { color: #fff; display: block; font-size: .9rem; }
.side-nav { padding: 10px 10px 16px; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 2px; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .2) transparent; }
.side-nav .grp { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: rgb(255 255 255 / .55); padding: 10px 12px 4px; font-weight: 600; }
:lang(ar) .side-nav .grp { letter-spacing: 0; font-size: .78rem; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 7px 12px; border-radius: 9px; color: rgb(255 255 255 / .74); text-decoration: none; font-weight: 500; font-size: .93rem; position: relative; }
.side-nav a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.side-nav a[aria-current="page"] { background: rgb(255 255 255 / .1); color: #fff; }
.side-nav a[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--gold); }
.side-nav a .icon { opacity: .85; }
.side-nav a .cnt { margin-inline-start: auto; background: var(--gold); color: var(--navy-950); font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; min-width: 22px; text-align: center; }
.side-f { padding: 8px 10px 12px; border-top: 1px solid rgb(255 255 255 / .08); display: grid; gap: 2px; }
.side-f a, .side-f button { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: 9px; color: rgb(255 255 255 / .7); text-decoration: none; font-size: .9rem; background: none; border: 0; width: 100%; text-align: start; }
.side-f a:hover, .side-f button:hover { background: rgb(255 255 255 / .06); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; height: 68px; padding-inline: clamp(12px, 2.4vw, 28px); background: rgb(250 248 244 / .95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .tsearch { flex: 1 1 auto; max-width: 420px; }
.topbar .tsearch .input { min-height: 42px; background: var(--surface); }
.topbar .tright { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.topbar .menu-btn { display: none; }
.topbar .avatar-btn { border: 0; background: none; padding: 2px; border-radius: 50%; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.topbar .avatar-btn:hover .avatar { box-shadow: 0 0 0 3px var(--blue-100); }
.bell-dot { direction: ltr; position: absolute; top: 3px; inset-inline-end: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--paper); }
.content { padding: clamp(16px, 2.6vw, 32px); width: 100%; max-width: 1320px; margin-inline: auto; flex: 1; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-h h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -.01em; }
:lang(ar) .page-h h1 { letter-spacing: 0; }
.page-h p { color: var(--ink-2); margin-top: 6px; max-width: 70ch; }
.page-h .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.bc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; color: var(--ink-3); margin-bottom: 8px; }
.bc a { color: var(--ink-2); text-decoration: none; } .bc a:hover { text-decoration: underline; }
.bc .icon { width: 14px; height: 14px; }
.demo-strip { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--gold-ink); padding: 8px 12px; border: 1px dashed #E2CC94; background: var(--gold-50); border-radius: 10px; margin-bottom: 20px; }
.demo-strip .icon { width: 16px; height: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 4px; min-width: 0; position: relative; }
.kpi .kl { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .84rem; color: var(--ink-2); font-weight: 500; }
.kpi .kl .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--paper-2); color: var(--navy-700); flex: none; }
.kpi .kl .ic .icon { width: 17px; height: 17px; }
.kpi .kv { font-size: 1.9rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .ks { font-size: .8rem; color: var(--ink-3); }
.kpi.link { text-decoration: none; color: inherit; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.kpi.link:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kpis, .kpis.k3 { grid-template-columns: minmax(0, 1fr); } }
.dgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dgrid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dgrid.wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.dgrid > * { min-width: 0; }
.dcol { display: grid; gap: 20px; min-width: 0; align-content: start; }
@media (max-width: 1100px) { .dgrid, .dgrid.even, .dgrid.wide { grid-template-columns: minmax(0, 1fr); } }
.welcome { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: clamp(18px, 2.6vw, 28px); border-radius: 18px; background: linear-gradient(120deg, var(--navy-900), var(--navy-800)); color: #fff; margin-bottom: 20px; position: relative; overflow: hidden; isolation: isolate; }
.welcome::after { content: ""; position: absolute; inset: -60% -5% auto auto; width: 40%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(194 154 69 / .28), transparent 65%); z-index: -1; }
.welcome h1 { color: #fff; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.45rem, 2.4vw, 1.95rem); }
.welcome p { color: rgb(255 255 255 / .78); margin-top: 4px; }
.welcome .avatar { box-shadow: 0 0 0 3px rgb(255 255 255 / .2); }
@media (max-width: 720px) { .welcome { grid-template-columns: auto minmax(0, 1fr); } .welcome .wact { grid-column: 1 / -1; } .welcome .wact .btn { width: 100%; } }
.list { display: grid; }
.list .li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list .li:first-child { padding-top: 0; }
.list .li:last-child { border-bottom: 0; padding-bottom: 0; }
.list .li .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--navy-700); flex: none; }
.list .li .ic.blue { background: var(--blue-50); color: var(--blue-700); }
.list .li .ic.green { background: var(--green-50); color: var(--green); }
.list .li .ic.gold { background: var(--gold-50); color: var(--gold-ink); }
.list .li .ic.red { background: var(--red-50); color: var(--red); }
.list .li .ic.violet { background: var(--violet-50); color: var(--violet); }
.list .li .t { flex: 1; min-width: 0; }
.list .li .t b { display: block; font-weight: 600; font-size: .93rem; }
.list .li .t span { display: block; font-size: .82rem; color: var(--ink-3); }
.list a.li { color: inherit; text-decoration: none; }
.list a.li:hover b { text-decoration: underline; }
.timeline { display: grid; gap: 0; position: relative; }
.timeline .ev { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; position: relative; }
.timeline .ev::before { content: ""; position: absolute; inset-inline-start: 17px; top: 36px; bottom: 0; width: 1.5px; background: var(--line); }
.timeline .ev:last-child::before { display: none; }
.timeline .ev .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--navy-700); border: 1px solid var(--line); }
.timeline .ev .ic .icon { width: 17px; height: 17px; }
.timeline .ev b { font-weight: 600; font-size: .93rem; }
.timeline .ev span { display: block; font-size: .8rem; color: var(--ink-3); }
.timeline .day { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 6px 0 12px; }
:lang(ar) .timeline .day { letter-spacing: 0; }
@media (max-width: 1020px) {
  .app, [dir="rtl"] .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .app > .side { display: none; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar .tsearch { display: none; }
}
@media (max-width: 1240px) { .topbar .role-btn .lbl { display: none; } }
@media (max-width: 560px) { .topbar .lang-btn .lname { display: none; } .topbar { gap: 4px; } }
@media (max-width: 370px) { .topbar .role-btn .rname { display: none; } }
dialog.drawer { margin: 0; inset-inline: 0 auto; top: 0; padding: 0; border: 0; height: 100dvh; max-height: 100dvh; width: min(300px, 86vw); background: var(--navy-950); }
dialog.drawer[open] { display: flex; animation: slide-in var(--t) var(--ease); }
[dir="rtl"] dialog.drawer[open] { animation-name: slide-in-r; }
dialog.drawer::backdrop { background: rgb(10 26 51 / .55); }
dialog.drawer .side { position: static; height: 100%; width: 100%; }
.drawer-close { position: absolute; top: 14px; inset-inline-end: 10px; color: #fff; }
.drawer-close:hover { background: rgb(255 255 255 / .1); color: #fff; }

/* course tiles (dashboard) */
.ctile { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: start; gap: 0; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.ctile .cimg { background: var(--paper-2); margin: 10px; margin-inline-end: 0; aspect-ratio: 3 / 2; }
.ctile .cb { padding: 18px; display: grid; gap: 10px; min-width: 0; }
.ctile h3 { font: 600 1.15rem var(--f-display); }
.ctile.locked .cimg img { filter: grayscale(.85) brightness(.9); }
@media (max-width: 560px) { .ctile { grid-template-columns: minmax(0, 1fr); } .ctile .cimg { aspect-ratio: 3 / 2; margin: 10px 10px 0; } }
.lrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); min-width: 0; }
.lrow:last-child { border-bottom: 0; }
.lrow .st { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); color: var(--ink-3); font-weight: 700; font-size: .85rem; }
.lrow .st.done { background: var(--green); border-color: var(--green); color: #fff; }
.lrow .st.open { border-color: var(--blue-600); color: var(--blue-700); }
.lrow .st.lock { background: var(--paper-2); }
.lrow .t b { display: block; font-weight: 600; }
.lrow .t span { font-size: .82rem; color: var(--ink-3); }
.lrow.is-locked .t b { color: var(--ink-3); }
.lrow .acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .lrow { grid-template-columns: 36px minmax(0, 1fr); } .lrow .acts { grid-column: 1 / -1; justify-content: flex-start; } }
.lgroup { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.lgroup-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #FCFBF8; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lgroup-h h2 { font: 600 1.05rem var(--f-ui); display: flex; align-items: center; gap: 10px; }
.cdot { width: 10px; height: 10px; border-radius: 3px; background: var(--cc, var(--navy-700)); flex: none; }
.video-ph { aspect-ratio: 16 / 9; border-radius: 16px; background: radial-gradient(120% 120% at 20% 0%, var(--navy-700), var(--navy-950)); display: grid; place-items: center; align-content: center; gap: 14px; color: rgb(255 255 255 / .82); text-align: center; padding: 20px; position: relative; overflow: hidden; }
.video-ph .play { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .3); color: #fff; }
.video-ph .play .icon { width: 30px; height: 30px; margin-inline-start: 4px; }
.video-ph small { font-size: .82rem; max-width: 46ch; }
.lvid { margin: 0; display: grid; gap: 8px; }
.lmedia { position: relative; overflow: hidden; overflow: clip; border-radius: 16px; background: var(--navy-950); container-type: inline-size; }
.lmedia video, .lmedia iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.lmedia > iframe { aspect-ratio: auto; height: min(75vh, 620px); background: #fff; } /* other linked pages need more room than a bare video */
/* Zoom recording: only its player shows. The frame is shifted so Zoom's header, side margins and the page below fall outside the box.
   Offsets measured from Zoom's page (computer: 127px header, 32px margins below 768px wide; phones: 65px header); recheck if Zoom changes its page. */
.crop { position: relative; overflow: hidden; overflow: clip; border-radius: 16px; aspect-ratio: 16 / 9; max-width: 700px; margin-inline: auto; container-type: inline-size; }
.crop iframe { position: absolute; aspect-ratio: auto; left: -32px; top: -127px; width: calc(100cqw + 64px); height: 2000px; } /* tall enough that Zoom's page never scrolls under the mouse wheel; clip (not hidden) so nothing can scroll the box itself */
.crop.zm iframe { left: 0; top: -65px; width: 100cqw; height: calc(65px + 100cqw * 9 / 16); }
.wm { position: absolute; top: 0; left: 0; will-change: transform; z-index: 1; pointer-events: none; user-select: none; color: #fff; opacity: .6; font-weight: 600; font-size: clamp(11px, 2.4cqw, 22px); text-shadow: 0 1px 3px rgb(0 0 0 / .85); white-space: nowrap; }
.wm-fs { position: fixed; inset: 0 auto auto 0; margin: 0; padding: 0; border: 0; background: none; overflow: visible; font-size: clamp(14px, 1.8vw, 26px); } /* popover copy over a player that went full screen by itself */
.lmedia:fullscreen { display: grid; place-items: center; border-radius: 0; background: #000; }
.lmedia:fullscreen video, .lmedia:fullscreen > iframe { width: 100%; height: 100%; aspect-ratio: auto; }
.lmedia:fullscreen .crop { width: var(--fw); max-width: none; flex: none; transform: scale(var(--k)); }
.kv { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 10px 16px; font-size: .92rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.statline { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; color: var(--ink-2); }
.statline b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* charts */
.chart { position: relative; height: 210px; margin: 8px 6px 28px 34px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .gl { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .ln { fill: none; stroke: var(--blue-600); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.chart .ar { fill: url(#chartfill); }
.chart .yl { position: absolute; inset-inline-start: -34px; font-size: .72rem; color: var(--ink-3); transform: translateY(-50%); width: 28px; text-align: end; }
.chart .pt { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--blue-600); }
.chart .pt.asg { border-color: var(--gold); border-radius: 3px; }
.chart .pv { position: absolute; transform: translate(-50%, -150%); font-size: .75rem; font-weight: 700; white-space: nowrap; color: var(--ink); }
.chart .xl { position: absolute; top: 100%; margin-top: 8px; transform: translateX(-50%); font-size: .72rem; color: var(--ink-3); white-space: nowrap; }
.chart .xl.first { transform: translateX(-8px); } .chart .xl.last { transform: translateX(calc(-100% + 8px)); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--blue-600); margin-inline-end: 6px; vertical-align: -1px; }
.legend i.asg { border-color: var(--gold); border-radius: 2px; }
.cols { display: flex; align-items: flex-end; gap: clamp(6px, 1.4vw, 14px); height: 170px; padding-top: 22px; border-bottom: 1px solid var(--line); }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.cols .c i { display: block; width: 100%; max-width: 44px; border-radius: 6px 6px 2px 2px; background: var(--navy-700); height: var(--h); min-height: 2px; position: relative; }
.cols .c i::after { content: attr(data-v); position: absolute; bottom: 100%; inset-inline: 0; text-align: center; font-size: .72rem; font-weight: 700; font-style: normal; margin-bottom: 4px; color: var(--ink); }
.cols .c.now i { background: var(--blue-600); }
.cols-x { display: flex; gap: clamp(6px, 1.4vw, 14px); margin-top: 8px; }
.cols-x span { flex: 1; text-align: center; font-size: .72rem; color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbars { display: grid; gap: 16px; }
.pbar .top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-bottom: 7px; }
.pbar .top b { font-weight: 600; }
.row > .bar { flex: 1 1 64px; min-width: 48px; }
.pbar .top span { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* =========================================================
   EXAMS — runner & editor
   ========================================================= */
.runner { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.runner-h { position: sticky; top: 68px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-1); flex-wrap: wrap; }
.preview-frame .runner-h { position: static; }
.timer { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 6px 12px; border-radius: 99px; background: var(--navy-100); color: var(--navy-900); }
.timer.low { background: var(--red-50); color: var(--red); }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3vw, 32px); }
.qcard .qn { font-size: .82rem; font-weight: 600; color: var(--ink-3); margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qcard .qt { font-family: var(--f-display); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45; margin-bottom: 22px; overflow-wrap: anywhere; }
.opts { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); text-align: start; width: 100%; font-size: 1rem; }
.opt:hover { border-color: var(--blue-400); background: var(--blue-50); }
.opt .k { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); font-weight: 700; font-size: .85rem; color: var(--ink-2); background: var(--surface); }
.opt[aria-checked="true"] { border-color: var(--blue-600); background: var(--blue-50); }
.opt[aria-checked="true"] .k { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.opt span:last-child { overflow-wrap: anywhere; }
.opt.correct { border-color: var(--green); background: var(--green-50); }
.opt.correct .k { background: var(--green); border-color: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-50); }
.opt.wrong .k { background: var(--red); border-color: var(--red); color: #fff; }
.opt[disabled] { cursor: default; }
.qnav-panel { position: sticky; top: 140px; }
.qnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.qnav button { height: 44px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.qnav button.answered { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.qnav button[aria-current="true"] { box-shadow: 0 0 0 3px var(--blue-100); border-color: var(--blue-600); }
.qnav button.answered[aria-current="true"] { border-color: var(--blue-600); }
.qnav-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .78rem; color: var(--ink-3); }
.qnav-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--line-2); margin-inline-end: 6px; vertical-align: -2px; }
.qnav-legend i.a { background: var(--navy-900); border-color: var(--navy-900); }
.runner-f { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 960px) { .runner { grid-template-columns: minmax(0, 1fr); } .qnav-panel { position: static; } .runner-h { top: 68px; } }
@media (max-width: 560px) { .runner-h > div > b { display: none; } .runner-h { padding: 10px 14px; } }
@media (max-width: 560px) { .runner-f .btn { flex: 1 1 40%; } }
.result-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
@media (max-width: 560px) { .result-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }
.rev { display: grid; gap: 12px; }
.rev .ri { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; background: var(--surface); }
.rev .ri .q { font-weight: 600; overflow-wrap: anywhere; }
.rev .ri .a { font-size: .9rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* wizard */
.stepper { display: flex; gap: 6px; counter-reset: s; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.stepper button { flex: 1 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .88rem; min-height: 52px; text-align: start; }
.stepper button .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-size: .8rem; flex: none; }
.stepper button[aria-current="step"] { border-color: var(--blue-600); color: var(--ink); box-shadow: 0 0 0 3px var(--blue-100); }
.stepper button[aria-current="step"] .n { background: var(--blue-600); color: #fff; }
.stepper button.done .n { background: var(--green); color: #fff; }
@media (max-width: 760px) { .stepper button .lbl { display: none; } .stepper button[aria-current="step"] .lbl { display: inline; } .stepper button { flex: 0 0 auto; } .stepper button[aria-current="step"] { flex: 1 0 auto; } }
.dropzone { display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; min-height: 280px; padding: 28px 20px; border: 2px dashed var(--line-2); border-radius: 16px; background: #FCFBF8; color: var(--ink-2); transition: border-color var(--t-fast), background var(--t-fast); }
.dropzone.over { border-color: var(--blue-600); background: var(--blue-50); }
.dropzone .ic { width: 60px; height: 60px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--blue-700); }
.dropzone .ic .icon { width: 28px; height: 28px; }
.imgbox { border: 1px solid var(--line); border-radius: 14px; background: #2B2B2E; overflow: auto; max-height: min(70dvh, 720px); overscroll-behavior: contain; }
.imgbox img { width: 100%; height: auto; margin: 0 auto; }
.imgbox.zoom img { width: 160%; max-width: none; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.split .sticky { position: sticky; top: 84px; }
.split.mat-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
@media (max-width: 1100px) { .split, .split.mat-split { grid-template-columns: minmax(0, 1fr); } .split .sticky { position: static; } .split .imgbox { max-height: 46dvh; } }
.extract { display: grid; gap: 10px; }
.extract .xs-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.extract .xs-step .icon { color: var(--ink-3); }
.extract .xs-step.run .icon { color: var(--blue-600); animation: spin 1s linear infinite; }
.extract .xs-step.ok .icon { color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }
.qed { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.qed-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.qed-h .qno { font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 10px; }
.qed-h .qno span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); color: #fff; font-size: .82rem; }
.qed-tools select { min-width: 168px; }
.qed-tools { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.oprow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.oprow .radio { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); font-size: .8rem; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.oprow .radio input { accent-color: var(--green); width: 17px; height: 17px; }
.oprow .radio:has(input:checked) { border-color: var(--green); background: var(--green-50); color: var(--green); }
.qed-meta { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; }
@media (max-width: 520px) { .oprow .radio .rl { display: none; } .qed-meta { grid-template-columns: minmax(0, 1fr) 96px; } }
.sim-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--amber-50); color: var(--amber); border: 1px dashed #E8B877; font-size: .78rem; font-weight: 700; }

/* =========================================================
   REPORT
   ========================================================= */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3.4vw, 40px); display: grid; gap: 26px; }
.report-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 2px solid var(--navy-900); }
.report-h img { height: 52px; width: auto; }
.report h2 { font: 600 1.15rem var(--f-display); margin-bottom: 12px; color: var(--navy-900); }
.report .rgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.report .rstat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.report .rstat span { font-size: .78rem; color: var(--ink-3); display: block; }
.report .rstat b { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .report .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.report .cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.report .cols3 > div { border-radius: 12px; padding: 14px 16px; background: #FCFBF8; border: 1px solid var(--line); }
.report .cols3 h3 { font: 600 .92rem var(--f-ui); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.report .cols3 ul { margin: 0; padding-inline-start: 18px; font-size: .9rem; color: var(--ink-2); display: grid; gap: 4px; }
@media (max-width: 820px) { .report .cols3 { grid-template-columns: minmax(0, 1fr); } }
.report .comment { font-family: var(--f-display); font-size: 1.1rem; line-height: 1.6; border-inline-start: 3px solid var(--gold); padding-inline-start: 16px; white-space: pre-line; }
.report .rfoot { font-size: .8rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Motion & interaction (everything here is switched off by the reduced-motion block below) ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
.hero-preview.rv { transition-delay: 380ms; }
.rv:not(.in) .bar > i, .rv:not(.in) .hp-bar i { width: 0; }
.hp-bar i { transition: width .9s var(--ease) .45s; }
.ring .rg { transition: stroke-dashoffset 1.1s var(--ease) .2s; }
.rv:not(.in) .ring .rg { stroke-dashoffset: var(--full); }
.cols .c i { transition: height .7s var(--ease) calc(var(--i, 0) * 70ms + 150ms); }
.rv:not(.in) .cols .c i { height: 0; min-height: 0; }
.chart svg { transition: clip-path 1.1s var(--ease) .15s; clip-path: inset(0 0 0 0); }
.rv:not(.in) .chart svg { clip-path: inset(0 100% 0 0); }
.chart .pt, .chart .pv { transition: opacity .4s ease .9s; }
.rv:not(.in) .chart .pt, .rv:not(.in) .chart .pv { opacity: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.mat-grid > .mat-card { animation: rise .45s var(--ease) both; animation-delay: calc(min(var(--i, 0), 8) * 45ms); }
.faq details[open] > p { animation: rise .3s var(--ease); }
/* button arrows nudge forward on hover */
.btn .flip, .link .flip, .hp-cta .flip { transition: transform var(--t-fast) var(--ease); }
.btn:hover .flip, .link:hover .flip, .hp-cta:hover .flip, .course-card:hover .link .flip { transform: translateX(3px); }
[dir="rtl"] .btn:hover .flip, [dir="rtl"] .link:hover .flip, [dir="rtl"] .hp-cta:hover .flip, [dir="rtl"] .course-card:hover .link .flip { transform: scaleX(-1) translateX(3px); }
/* card tilt + light (mouse only) */
.feature { position: relative; }
@media (hover: hover) and (pointer: fine) {
  .course-card.tilting, .feature.tilting, .mat-card.tilting { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px); box-shadow: var(--sh-2); transition: transform .12s linear, box-shadow .25s; }
  .course-card::after, .feature::after, .mat-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .3s; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / .26), transparent 60%); }
  .tilting::after { opacity: 1; }
}
/* header scroll-progress line + back-to-top */
.scroll-progress { position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--gold), #E9D29B); transform: scaleX(var(--p, 0)); transform-origin: left; }
[dir="rtl"] .scroll-progress { transform-origin: right; }
.to-top { position: fixed; z-index: 45; inset-inline-end: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / .2); background: var(--navy-900); color: #E9D29B; box-shadow: var(--sh-2); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), background var(--t-fast); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--navy-700); }
body:has(.to-top.show) .toasts { bottom: 76px; }
/* phone slideshows: the centred slide is emphasised */
@media (max-width: 680px) {
  .slides > * { transition: transform .35s var(--ease), opacity .35s var(--ease); }
  .slides > :not(.is-active) { opacity: .6; transform: scale(.95); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
  .slides > :not(.is-active) { opacity: 1; transform: none; }
}

/* ---------- Print: only the report (or the page content) ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .site-header, .site-footer, .side, .topbar, .page-h .acts, .no-print, .toasts, .demo-strip, dialog { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
  body.printing-report .content > *:not(.print-area) { display: none !important; }
  body.printing-report .print-area > *:not(.report) { display: none !important; }
  .report .rstat, .report .cols3 > div, .table-wrap { break-inside: avoid; }
  .report .cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report .rfoot { break-before: avoid; }
  .report-h { flex-wrap: nowrap; }
  a { color: inherit; text-decoration: none; }
}
