/* ==========================================================================
   Al-Adl Advisory — site styles  ·  "Ivory & emerald" (light)
   Built from the logo: a white / milk-ivory ground, black and gold type, and
   emerald for everything you can press (with white or gold text on it).
   Photography always sits in its own frame — never under text. The layout
   language follows the client's reference, al-muamalat.uz: white sections,
   clear section heads with a two-tone rule, clean cards, a dark-green footer.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
  /* brand inks, sampled from the supplied logo files */
  --brand-emerald: #033a26;
  --brand-gold: #be8b2d;
  --brand-ivory: #f9f2dd;

  /* ground: white, and the logo's milky ivory for alternate sections */
  --white: #ffffff;
  --milk: #fbf7ee;
  --milk-2: #f4ecda;
  --surface: #ffffff;
  --paper: var(--milk);
  --paper-2: var(--milk-2);
  --line: #ebe2cf;
  --line-strong: #d8caab;

  /* type: black, with gold accents */
  --black: #111613;
  --ink: #111613;
  --ink-2: #0b4e37;
  --text: #232926;
  --muted: #565e59;
  --faint: #878d89;

  /* action: emerald */
  --emerald: #0b5c40;
  --emerald-hover: #074a32;
  --emerald-deep: #063f2b;
  --emerald-50: #e9f3ed;
  --emerald-100: #cfe4d8;
  --jade: #16804f;
  --jade-light: #7fd3a8;
  --jade-50: #e3f3ea;

  /* gold */
  --gold: #be8b2d;
  --gold-text: #946613;   /* gold that passes AA for small text on white */
  --gold-deep: var(--gold-text);
  --gold-light: #f1d79c;  /* gold text on emerald */
  --gold-50: #fbf4e3;
  --sand: #c39a4a;
  --sand-300: #e6cf9f;
  --sand-50: #fbf4e3;

  /* dark green: footer and programme cards */
  --night: #033a26;
  --night-2: #022b1c;
  --on-dark: #f6f2e6;
  --on-dark-soft: #dfe7df;
  --on-dark-muted: #b4c6b9;

  --danger: #b42318;
  --danger-50: #fdeeec;
  --warning: #b36b00;

  --gold-grad: linear-gradient(100deg, #ecd08f 0%, #c4913a 45%, #e9c97f 68%, #a97b22 100%);
  --gold-line: linear-gradient(90deg, transparent, var(--gold) 18%, #ecd08f 50%, var(--gold) 82%, transparent);
  --brand-rule: linear-gradient(90deg, var(--emerald) 0 50%, var(--gold) 50% 100%);
  --emerald-grad: linear-gradient(150deg, #0f6b4b 0%, #0b5c40 45%, #063f2b 100%);
  --night-grad: radial-gradient(110% 90% at 85% 0%, #0b5a3d 0%, transparent 55%), linear-gradient(180deg, #054430, #033a26);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --dir: 1;
  --font-arabic: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif;

  --step--1: 0.9375rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.5rem, 1.35rem + 0.55vw, 1.875rem);
  --step-3: clamp(2.125rem, 1.65rem + 1.7vw, 3.125rem);
  --step-4: clamp(2.5rem, 1.85rem + 2.4vw, 3.875rem);
  --step-5: clamp(2.75rem, 1.7rem + 3.9vw, 4.75rem);

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 22px;
  --shadow-1: 0 1px 2px rgb(17 22 19 / .04), 0 14px 34px -20px rgb(17 22 19 / .24);
  --shadow-2: 0 30px 70px -34px rgb(17 22 19 / .38);
  --shadow-gold: 0 16px 34px -18px rgb(190 139 45 / .6);
  --shadow-emerald: 0 14px 28px -16px rgb(11 92 64 / .6);
  --ring: 0 0 0 3px rgb(11 92 64 / .25);

  --container: 86rem;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 6.25rem;
  --section: clamp(4.5rem, 7vw, 8rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 125' preserveAspectRatio='none'%3E%3Cpath d='M0 125V52C0 24 28 13 50 0c22 13 50 24 50 52v73z'/%3E%3C/svg%3E");
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e6c98c' stroke-width='1'%3E%3Cpath d='M60 26 84 60 60 94 36 60zM36 36h48v48H36z'/%3E%3Cpath d='M0 26 24 60 0 94M120 26 96 60 120 94M26 0 60 24 94 0M26 120 60 96 94 120'/%3E%3Cpath d='M36 36 24 24M84 36 96 24M84 84 96 96M36 84 24 96M24 24H0M24 24V0M96 24h24M96 24V0M24 96H0M24 96v24M96 96h24M96 96v24'/%3E%3C/g%3E%3C/svg%3E");
  --girih-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23be8b2d' stroke-width='.8'%3E%3Cpath d='M60 26 84 60 60 94 36 60zM36 36h48v48H36z'/%3E%3Cpath d='M0 26 24 60 0 94M120 26 96 60 120 94M26 0 60 24 94 0M26 120 60 96 94 120'/%3E%3Cpath d='M36 36 24 24M84 36 96 24M84 84 96 96M36 84 24 96M24 24H0M24 24V0M96 24h24M96 24V0M24 96H0M24 96v24M96 96h24M96 96v24'/%3E%3C/g%3E%3C/svg%3E");
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0l3.1 4.5 5.4-1-1 5.4L24 12l-4.5 3.1 1 5.4-5.4-1L12 24l-3.1-4.5-5.4 1 1-5.4L0 12l4.5-3.1-1-5.4 5.4 1z'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--white); }
/* Wide monitors: the whole rem-based layout grows from 16px (≤1440px) to ~18.6px at 1920px. */
@media (min-width: 1441px) { html { font-size: clamp(100%, calc(100% + (100vw - 1440px) * .0055), 118.75%); } }
body {
  margin: 0;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--emerald); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--emerald-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; color: var(--black); line-height: 1.16; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--gold); }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-light); color: var(--black); }
.icon { display: inline-block; vertical-align: -0.22em; width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { 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-link { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--emerald); color: #fff; border-radius: var(--radius-s); }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------------------------------------------------------------- layout */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * 0.62); }
.section--white { background: var(--white); }
.section--milk, .section--sand { background: var(--milk); }
.section--pattern { isolation: isolate; }
.section--pattern::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--girih-ink); background-size: 132px; opacity: .07; mask-image: radial-gradient(70% 80% at 50% 50%, #000, transparent); -webkit-mask-image: radial-gradient(70% 80% at 50% 50%, #000, transparent); pointer-events: none; }

/* the one dark surface left on the site: emerald, as on the logo's green version */
.section--ink, .dark { background: var(--night-grad); background-color: var(--night); color: var(--on-dark); position: relative; isolation: isolate; overflow: hidden; }
.section--ink h1, .section--ink h2, .section--ink h3, .dark h1, .dark h2, .dark h3 { color: #fff; }

.stack > * + * { margin-top: var(--stack, 1rem); }
.lead { font-size: var(--step-1); line-height: 1.6; color: var(--muted); max-width: 52ch; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* eyebrow: gold star + tracked caps (the logo's "ADVISORY" voice) */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: .875rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); }
.eyebrow::before { content: ""; width: 15px; height: 15px; flex: none; background: var(--gold); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.eyebrow--light, .section--ink .eyebrow, .dark .eyebrow { color: var(--gold-light); }

/* section heads end with the two-tone brand rule (emerald | gold) */
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 4vw, 4rem); }
.section-head h2::after, .rule::after { content: ""; display: block; width: 76px; height: 4px; margin-top: 22px; border-radius: 4px; background: var(--brand-rule); }
.section-head p:not(.eyebrow) { margin: 0; color: var(--muted); max-width: 52ch; }
.section-head--stacked { grid-template-columns: 1fr; align-items: start; }
.section-head--center { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.section-head--center h2::after { margin-inline: auto; }
.section-head--center p { margin-inline: auto; }
.section--ink .section-head p:not(.eyebrow), .dark .section-head p:not(.eyebrow) { color: var(--on-dark-muted); }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; gap: 18px; } }

/* ornamental divider */
.ornament { display: flex; align-items: center; gap: 14px; color: var(--gold); }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, currentColor); }
.ornament::after { transform: scaleX(-1); }
.ornament i { width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }

/* ---------------------------------------------------------------- buttons */
/* Everything you can press is emerald. Text on it is white (default) or gold (.btn--brand). */
.btn {
  --btn-bg: var(--white); --btn-fg: var(--black); --btn-bd: var(--line-strong);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 3.375rem; padding: 0 1.75rem;
  border: 1.5px solid var(--btn-bd); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-body); font-weight: 600; font-size: 1.0625rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.25rem; height: 1.25rem; transition: transform .2s var(--ease); }
.btn:hover .icon--move { transform: translateX(calc(3px * var(--dir))); }
.btn--primary { --btn-bg: var(--emerald); --btn-fg: #fff; --btn-bd: var(--emerald); box-shadow: var(--shadow-emerald); }
.btn--primary:hover { --btn-bg: var(--emerald-hover); --btn-bd: var(--emerald-hover); }
.btn--brand { --btn-bg: var(--emerald-deep); --btn-fg: var(--gold-light); --btn-bd: var(--emerald-deep); box-shadow: var(--shadow-emerald), inset 0 1px 0 rgb(241 215 156 / .18); }
.btn--brand:hover { --btn-bg: var(--emerald); --btn-bd: var(--emerald); --btn-fg: #f7e3b3; }
.btn--gold { --btn-bg: var(--gold-grad); --btn-fg: var(--emerald-deep); --btn-bd: transparent; background-size: 160% 100%; font-weight: 700; box-shadow: var(--shadow-gold); }
.btn--gold:hover { background-position: 100% 0; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--emerald); --btn-bd: var(--emerald); }
.btn--ghost:hover { --btn-bg: var(--emerald); --btn-fg: #fff; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--emerald-deep); --btn-bd: #fff; }
.btn--light:hover { --btn-bg: var(--gold-50); --btn-bd: var(--gold-50); }
.btn--glass, .btn--outline-light { --btn-bg: rgb(255 255 255 / .06); --btn-fg: #fff; --btn-bd: rgb(255 255 255 / .35); }
.btn--glass:hover, .btn--outline-light:hover { --btn-bg: rgb(255 255 255 / .14); --btn-bd: rgb(255 255 255 / .7); }
.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--sm { min-height: 2.875rem; padding: 0 1.25rem; font-size: 1rem; }
.btn--lg { min-height: 3.875rem; padding: 0 2.25rem; font-size: 1.125rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .5); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--emerald); }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(calc(3px * var(--dir))); }
.section--ink .link-arrow, .dark .link-arrow { color: var(--gold-light); }

/* ----------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .97); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.site-header::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand-rule); }
.site-header.is-scrolled { box-shadow: 0 12px 30px -22px rgb(17 22 19 / .45); }
.site-header__bar { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.5rem); height: var(--header-h); }
.site-header__brand { display: block; flex: none; line-height: 0; border-radius: 8px; }
.site-header__tools { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
.site-header__signin { padding: .625rem 1rem; color: var(--black); text-decoration: none; font-weight: 600; font-size: 1.0625rem; border-radius: 999px; }
.site-header__signin:hover { background: var(--emerald-50); color: var(--emerald); }
/* staff only: the way into the panel */
.site-header__panel { display: inline-flex; align-items: center; gap: 8px; min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; background: var(--emerald-deep); color: var(--gold-light); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; box-shadow: inset 0 1px 0 rgb(241 215 156 / .18); }
.site-header__panel:hover { background: var(--emerald); color: #f7e3b3; }
.staff-bar { position: fixed; z-index: 70; inset-block-end: 18px; inset-inline-start: 18px; display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: var(--night); box-shadow: 0 14px 34px -12px rgb(3 30 20 / .6), inset 0 0 0 1px rgb(241 215 156 / .22); }
.staff-bar a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; color: var(--on-dark); font-size: .9375rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.staff-bar a:hover { background: rgb(255 255 255 / .12); color: #fff; }
.staff-bar .staff-bar__edit { background: var(--gold-grad); color: var(--emerald-deep); }
.staff-bar .staff-bar__edit:hover { background: var(--gold-grad); color: var(--emerald-deep); filter: brightness(1.06); }
@media (max-width: 1180px) { .site-header__panel span { display: none; } .site-header__panel { padding: 0; width: 2.75rem; justify-content: center; } }
@media (max-width: 600px) { .staff-bar { inset-block-end: 12px; inset-inline-start: 12px; } .staff-bar a { padding: 8px 12px; } .staff-bar__panel span { display: none; } }
@media print { .staff-bar { display: none; } }

/* brand lockups are SVGs traced from the supplied logo (static/img/brand) */
.brand-logo { display: block; width: auto; max-width: none; height: 60px; }
.site-header .brand-logo { height: 4.375rem; transition: height .3s var(--ease); }
.site-header.is-scrolled .brand-logo { height: 3.875rem; }
.site-header__cta { min-height: 3.25rem; padding: 0 1.625rem; font-size: 1.0625rem; }
.site-footer__brand { display: inline-block; line-height: 0; }
.site-footer__brand .brand-logo { height: 11rem; }

.site-nav { flex: 1; }
.site-nav__list { display: flex; justify-content: center; gap: clamp(.125rem, .9vw, 1.25rem); list-style: none; }
.site-nav__link { display: block; padding: .625rem 1rem; color: var(--black); text-decoration: none; font-weight: 600; font-size: 1.0625rem; border-radius: 999px; position: relative; transition: color .2s, background-color .2s; }
.site-nav__link:hover { color: var(--emerald); background: var(--emerald-50); }
.site-nav__link.is-active { color: var(--emerald); }
.site-nav__link.is-active::after { content: ""; position: absolute; left: calc(50% - 4px); bottom: -1px; width: 8px; height: 8px; background: var(--gold); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.site-nav__mobile-extra { display: none; }
/* Education sub-menu: opens on hover / keyboard focus */
.site-nav__item--sub { position: relative; }
.site-nav__item--sub > .site-nav__link { display: inline-flex; align-items: center; gap: 4px; }
.site-nav__chev { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.site-nav__sub { position: absolute; top: 100%; left: 50%; z-index: 60; min-width: 340px; margin: 0; padding: 8px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s .18s; }
.site-nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.site-nav__item--sub:hover > .site-nav__sub, .site-nav__item--sub:focus-within > .site-nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 10px); transition-delay: 0s; }
.site-nav__item--sub:hover .site-nav__chev, .site-nav__item--sub:focus-within .site-nav__chev { transform: rotate(180deg); }
.site-nav__sub a { display: block; padding: 11px 14px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 1rem; font-weight: 500; line-height: 1.35; transition: background-color .15s, color .15s; }
.site-nav__sub a:hover, .site-nav__sub a:focus-visible { background: var(--emerald-50); color: var(--emerald); }
.site-nav__sub a[aria-current] { color: var(--emerald); font-weight: 600; }
.site-nav__sub a b { display: block; font-weight: 700; color: inherit; letter-spacing: .01em; }
.site-nav__sub a small { display: block; margin-top: 2px; font-size: .8125rem; color: var(--muted); line-height: 1.35; }
.site-nav__sub-item--sub { position: relative; }
.site-nav__sub-item--sub > a { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-nav__subchev { flex: none; width: 16px; height: 16px; color: var(--muted); }
.site-nav__sub--nested { top: -9px; left: 100%; min-width: 300px; transform: translate(6px, 0); }
.site-nav__sub--nested::before { top: 0; bottom: 0; left: -14px; right: auto; width: 14px; height: auto; }
.site-nav__sub-item--sub:hover > a, .site-nav__sub-item--sub:focus-within > a { background: var(--emerald-50); color: var(--emerald); }
.site-nav__sub-item--sub:hover > a .site-nav__subchev, .site-nav__sub-item--sub:focus-within > a .site-nav__subchev { color: var(--emerald); }
.site-nav__sub-item--sub:hover > .site-nav__sub--nested, .site-nav__sub-item--sub:focus-within > .site-nav__sub--nested { opacity: 1; visibility: visible; transform: translate(10px, 0); transition-delay: 0s; }

details[data-dropdown] { position: relative; }
details[data-dropdown] > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: .625rem .875rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 1.0625rem; color: var(--black); user-select: none; }
details[data-dropdown] > summary::-webkit-details-marker { display: none; }
details[data-dropdown] > summary:hover { background: var(--emerald-50); color: var(--emerald); }
details[data-dropdown] > summary .icon { width: 18px; height: 18px; }
details[open] > summary .lang-menu__chev { transform: rotate(180deg); }
.dropdown { position: absolute; top: calc(100% + 10px); inset-inline-start: 0; min-width: 210px; list-style: none; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); animation: drop .18s var(--ease); z-index: 60; }
.dropdown--right { inset-inline-start: auto; inset-inline-end: 0; }
.dropdown a, .dropdown button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: none; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 1rem; text-align: start; }
.dropdown a .icon, .dropdown button .icon { width: 18px; height: 18px; color: var(--muted); }
.account-menu .dropdown a, .account-menu .dropdown button { justify-content: flex-start; }
.dropdown a:hover, .dropdown button:hover { background: var(--emerald-50); color: var(--emerald); }
.dropdown a[aria-current] { color: var(--emerald); font-weight: 600; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.account-menu__name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--emerald-grad); color: var(--gold-light); font-weight: 600; font-size: .9rem; letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgb(241 215 156 / .45); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 34px; height: 34px; font-size: .75rem; }
.avatar--lg { width: 88px; height: 88px; font-size: 1.6rem; font-family: var(--font-display); }

.nav-toggle { display: none; width: 48px; height: 48px; place-items: center; border: 1.5px solid var(--emerald); border-radius: 999px; background: #fff; color: var(--emerald); }
.nav-toggle .nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] { background: var(--emerald); color: #fff; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

.lang-inline { display: flex; gap: 4px; flex-wrap: wrap; }
.lang-inline a { padding: 7px 13px; border-radius: 999px; text-decoration: none; color: inherit; font-size: .9375rem; font-weight: 500; opacity: .8; }
.lang-inline a[aria-current] { opacity: 1; background: var(--emerald); color: #fff; font-weight: 600; }
.site-footer .lang-inline a[aria-current] { background: rgb(241 215 156 / .16); color: var(--gold-light); }

@media (max-width: 1340px) {
  .site-header__cta { display: none; }
}
/* laptops (1241–1400px): same header, a little more compact so everything fits on one line */
@media (max-width: 1400px) {
  .site-header .brand-logo { height: 3.875rem; }
  .site-header.is-scrolled .brand-logo { height: 3.5rem; }
  .site-nav__link { font-size: 1rem; padding-inline: .625rem; }
  details[data-dropdown] > summary, .site-header__signin { font-size: 1rem; padding-inline: .625rem; }
  .site-header__cta { font-size: 1rem; padding: 0 1.25rem; min-height: 3rem; }
}
@media (max-width: 1000px) {
  :root { --header-h: 74px; }
  /* backdrop-filter would make the header the containing block of the fixed menu panel */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .site-header .brand-logo, .site-header.is-scrolled .brand-logo { height: 52px; }
  .nav-toggle { display: inline-grid; }
  .site-header__signin, .lang-menu, .account-menu__name { display: none; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    display: flex; flex-direction: column; gap: 24px; padding: 16px var(--gutter) 40px;
    background: var(--white); overflow-y: auto; border-top: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s .22s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__link { padding: 18px 4px; font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; color: var(--black); border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav__link:hover { background: none; color: var(--emerald); }
  .site-nav__link.is-active::after { inset-inline-start: auto; inset-inline-end: 4px; top: 50%; bottom: auto; width: 12px; height: 12px; margin: -6px 0 0; }
  .site-nav__mobile-extra { display: grid; gap: 12px; }
  .site-nav__item--sub > .site-nav__link { display: flex; border-bottom: 0; }
  .site-nav__chev, .site-nav__subchev { display: none; }
  .site-nav__sub { position: static; min-width: 0; padding: 4px 0 12px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; opacity: 1; visibility: inherit; transform: none; transition: none; }
  /* "inherit", not "visible": while the drawer is closed (hidden) its links must not catch taps on the page below */
  .site-nav__item--sub:hover > .site-nav__sub, .site-nav__item--sub:focus-within > .site-nav__sub { visibility: inherit; transform: none; }
  .site-nav__sub::before { display: none; }
  .site-nav__sub a { padding-block: 9px; padding-inline: 18px 4px; font-size: 1.0625rem; border-inline-start: 2px solid var(--gold); border-radius: 0; margin: 2px 0; }
  .site-nav__sub a:hover { background: none; }
  .site-nav__sub--nested, .site-nav__sub-item--sub:hover > .site-nav__sub--nested, .site-nav__sub-item--sub:focus-within > .site-nav__sub--nested { padding-block: 2px 4px; padding-inline: 18px 0; border-bottom: 0; visibility: inherit; transform: none; }
  .site-nav__sub--nested a { border-inline-start-color: var(--line); font-size: 1rem; }
  .site-nav__sub--nested a small { display: none; }
  .site-nav__sub-item--sub:hover > a, .site-nav__sub-item--sub:focus-within > a { background: none; }
  .site-nav__mobile-extra .lang-inline { justify-content: center; margin-top: 8px; color: var(--text); }
  body.nav-open { overflow: hidden; }
}

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--night-grad); background-color: var(--night); color: var(--on-dark-muted); padding: clamp(64px, 8vw, 100px) 0 28px; font-size: 1rem; position: relative; isolation: isolate; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--girih); background-size: 120px; opacity: .06; mask-image: linear-gradient(to bottom, #000, transparent 70%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%); }
.site-footer::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-rule); }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr) 1.5fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgb(241 215 156 / .16); }
.site-footer__about p { margin-top: 22px; max-width: 34ch; }
.site-footer__arabic { font-family: var(--font-arabic); font-size: 3.2rem; line-height: 1; color: var(--gold-light); margin-top: 22px !important; text-align: left; }
.site-footer__col h2 { font-family: var(--font-body); font-size: .875rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 20px; }
.site-footer__col ul { list-style: none; display: grid; gap: 12px; }
.site-footer__contact li a, .site-footer__contact li span { display: inline-flex; gap: 10px; align-items: flex-start; }
.site-footer__contact .icon { margin-top: 3px; color: var(--gold); }
.socials { display: flex; gap: 8px; margin-top: 22px; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(241 215 156 / .35); transition: all .2s; }
.socials a:hover { border-color: var(--gold); background: rgb(241 215 156 / .12); }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: .9375rem; }
.site-footer__bottom p { margin: 0; color: var(--on-dark-muted); }
@media (max-width: 1024px) { .site-footer__top { grid-template-columns: repeat(3, 1fr); } .site-footer__about { grid-column: 1 / -1; } .site-footer__contact { grid-column: span 3; } }
@media (max-width: 640px) { .site-footer__top { grid-template-columns: 1fr 1fr; } .site-footer__contact { grid-column: 1 / -1; } .site-footer__brand .brand-logo { height: 150px; } }

/* ----------------------------------------------------------------- toasts */
.toasts { position: fixed; z-index: 80; inset-inline-end: 20px; top: calc(var(--header-h) + 14px); display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px; padding-inline-start: 16px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--emerald); border-radius: 14px; box-shadow: var(--shadow-2); animation: toast-in .35s var(--ease); }
.toast p { margin: 0; flex: 1; font-size: 1rem; }
.toast > .icon { color: var(--emerald); margin-top: 2px; }
.toast--success { border-inline-start-color: var(--jade); }
.toast--success > .icon { color: var(--jade); }
.toast--error { border-inline-start-color: var(--danger); }
.toast--error > .icon { color: var(--danger); }
.toast__close { border: 0; background: none; padding: 2px; color: var(--muted); border-radius: 6px; }
.toast.is-leaving { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(calc(16px * var(--dir))); } }

/* ------------------------------------------------------------- arch frame */
.arch { position: relative; overflow: hidden; aspect-ratio: 4 / 5; -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; background: var(--emerald-100); }
.arch > img { width: 100%; height: 100%; object-fit: cover; }
/* a gold frame drawn right on the photo's arch edge (inside the arch mask, so it follows it exactly) */
.arch-wrap { position: relative; isolation: isolate; }
.arch-wrap .arch::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--gold-grad);
  -webkit-mask: var(--arch) center / 100% 100% no-repeat, var(--arch) center / calc(100% - 9px) calc(100% - 9px) no-repeat; -webkit-mask-composite: xor;
  mask: var(--arch) center / 100% 100% no-repeat exclude, var(--arch) center / calc(100% - 9px) calc(100% - 9px) no-repeat; }

/* --------------------------------------------------------------- rosette */
.rosette { fill: none; stroke: var(--gold); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.rosette .r-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.rosette .r-1 { stroke-dasharray: .004 .012; opacity: .9; }
.rosette .r-8 { opacity: .45; }
.rosette .r-5, .rosette .r-7 { stroke: var(--emerald); opacity: .45; }
.rosette--gold { stroke: var(--gold-light); }
.rosette--gold .r-5, .rosette--gold .r-7 { stroke: var(--jade-light); opacity: .55; }

@media (prefers-reduced-motion: no-preference) {
  .js .rosette--draw .r-line:not(.r-1) { stroke-dashoffset: 1; animation: draw 2.4s var(--ease) forwards; }
  .js .rosette--draw .r-2 { animation-delay: .1s; }
  .js .rosette--draw .r-3 { animation-delay: .35s; }
  .js .rosette--draw .r-4 { animation-delay: .55s; }
  .js .rosette--draw .r-5 { animation-delay: .8s; }
  .js .rosette--draw .r-6 { animation-delay: 1s; }
  .js .rosette--draw .r-7 { animation-delay: 1.2s; }
  .js .rosette--draw .r-8 { animation-delay: .6s; animation-duration: 3s; }
  .rosette--spin { animation: spin 160s linear infinite; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ------------------------------------------------------------------ hero */
/* Light hero: copy on the left, the photograph in its own arch on the right. */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(2.5rem, 4vw, 4.5rem) 0 clamp(2.75rem, 4.5vw, 4.5rem); background: linear-gradient(180deg, var(--white) 0%, var(--milk) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: var(--girih-ink); background-size: 132px; opacity: .08; mask-image: linear-gradient(90deg, transparent 35%, #000 100%); -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%); pointer-events: none; }
.hero__rosette { position: absolute; z-index: -1; width: min(70vw, 48rem); inset-inline-end: -15rem; top: -12.5rem; opacity: .25; pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2.5rem, 5vw, 6rem); align-items: center; }
/* the copy starts near the top (not centred on the tall photo), about half the old gap below the header */
.hero__copy { max-width: 48rem; align-self: start; padding-top: clamp(.5rem, 1.6vw, 2rem); }
.hero__title { font-size: clamp(2.75rem, 1.6rem + 4.1vw, 5.25rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.015em; color: var(--black); max-width: 12ch; }
.hero__title em { color: var(--gold); }
.hero .eyebrow { font-size: .9375rem; }
.hero__lead { margin-top: 1.75rem; font-size: clamp(1.1875rem, 1rem + .5vw, 1.4375rem); line-height: 1.65; color: var(--muted); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .875rem; margin-top: 2.5rem; }

.hero__media { position: relative; justify-self: end; width: min(100%, 34rem); }
.hero__media .arch { aspect-ratio: 6 / 7; box-shadow: var(--shadow-2); }
.hero__media .arch img { object-position: 74% 55%; }
/* the al-ʿadl note sits under the photo, as wide as the photo */
.hero__seal { position: relative; overflow: hidden; display: flex; align-items: center; gap: 1.125rem; margin: 1.25rem 0 0; padding-block: 1.125rem; padding-inline: 1.625rem 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); font-size: 1rem; line-height: 1.5; color: var(--muted); }
.hero__seal::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--emerald) 0 50%, var(--gold) 50% 100%); }
.hero__seal [lang="ar"] { font-family: var(--font-arabic); font-size: 2.75rem; line-height: 1.1; color: var(--gold); flex: none; }
.hero__seal em { font-family: var(--font-display); font-size: 1.125rem; color: var(--black); }

.hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(2.75rem, 4vw, 4rem); }
.hero-stat { display: block; padding: 1.5rem 1.625rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
a.hero-stat:hover { color: var(--text); border-color: var(--emerald-100); transform: translateY(-3px); box-shadow: 0 24px 44px -26px rgb(11 92 64 / .45); }
.hero-stat b { display: block; font-family: var(--font-display); font-size: clamp(2.4rem, 1.9rem + 1.4vw, 3.25rem); font-weight: 700; line-height: 1; color: var(--emerald); }
.hero-stat span { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 1.0625rem; font-weight: 600; color: var(--black); }
.hero-stat span .icon { width: 18px; height: 18px; color: var(--gold); transition: transform .2s var(--ease); }
a.hero-stat:hover span .icon { transform: translateX(calc(3px * var(--dir))); color: var(--emerald); }

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { padding-top: 0; }
  .hero__media { justify-self: center; width: min(100%, 420px); margin: 10px auto 0; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__media { width: 100%; }
  .hero__seal { padding: 1rem 1.125rem; gap: .875rem; }
  .hero-stat { padding: 18px 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .hero__copy > * { opacity: 0; transform: translateY(16px); animation: rise .9s var(--ease) forwards; }
  .js .hero__copy > :nth-child(2) { animation-delay: .1s; }
  .js .hero__copy > :nth-child(3) { animation-delay: .2s; }
  .js .hero__copy > :nth-child(4) { animation-delay: .3s; }
  .js .hero__media { animation: unveil 1.1s .15s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { opacity: 0; transform: scale(.97); } }

/* ---------------------------------------------------------------- marquee */
/* a thin emerald strip with gold terms — the logo's green version in one line */
.marquee { position: relative; overflow: hidden; background: var(--emerald-deep); color: var(--gold-light); }
.marquee__track { display: flex; width: max-content; }
.marquee__group { display: flex; align-items: center; padding: 16px 0; flex: none; }
.marquee__group span { display: inline-flex; align-items: center; gap: 26px; padding-inline-end: 26px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; font-style: italic; white-space: nowrap; }
.marquee__group span::after { content: ""; width: 12px; height: 12px; background: var(--gold); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 1; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--emerald-deep), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--emerald-deep), transparent); }
@media (prefers-reduced-motion: no-preference) { .marquee__track { animation: marquee 48s linear infinite; } .marquee:hover .marquee__track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------- service cards */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-card { position: relative; display: flex; flex-direction: column; min-height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.svc-card:hover { color: var(--text); transform: translateY(-6px); border-color: var(--emerald-100); box-shadow: 0 36px 64px -38px rgb(11 92 64 / .5); }
.svc-card__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--milk-2); }
.svc-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.svc-card:hover .svc-card__img img { transform: scale(1.05); }
.svc-card__num { position: absolute; z-index: 1; top: 16px; inset-inline-start: 18px; font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--emerald-deep); padding: 4px 12px; border-radius: 999px; background: rgb(255 255 255 / .92); }
.svc-card__icon { position: absolute; z-index: 1; inset-inline-start: 1.625rem; top: calc(100% - 2.125rem); display: grid; place-items: center; width: 3.75rem; height: 4.25rem; color: var(--gold-light); background: var(--emerald-grad); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.svc-card__icon .icon { width: 26px; height: 26px; margin-top: 10px; }
.svc-card__head { position: relative; }
.svc-card__body { display: flex; flex-direction: column; flex: 1; padding: 3.125rem 1.75rem 1.625rem; }
.svc-card h3 { font-size: 1.5rem; line-height: 1.22; transition: color .25s; }
.svc-card:hover h3 { color: var(--emerald); }
.svc-card p { margin: 14px 0 0; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }
.svc-card__go { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 24px; font-weight: 700; font-size: 1.0625rem; color: var(--emerald); }
.svc-card__go i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--emerald); color: #fff; transition: all .3s var(--ease); }
.svc-card__go .icon { width: 19px; height: 19px; }
.svc-card:hover .svc-card__go i { background: var(--emerald-deep); color: var(--gold-light); transform: rotate(calc(-45deg * var(--dir))); }
.svc-card__spacer { margin-top: auto; }

/* --------------------------------------------------- services index list */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split__aside { position: sticky; top: calc(var(--header-h) + 32px); }
.split__aside p:not(.eyebrow) { color: var(--muted); margin-top: 20px; }
.split__aside .btn { margin-top: 12px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split__aside { position: static; } }

.service-index { list-style: none; display: grid; gap: 14px; counter-reset: svc; }
.service-row a { display: grid; grid-template-columns: 64px minmax(0, 1fr) 48px; gap: 24px; align-items: center; padding-block: 22px; padding-inline: 20px 22px; text-decoration: none; color: var(--text); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.service-row a:hover { color: var(--text); border-color: var(--emerald-100); box-shadow: var(--shadow-1); transform: translateX(calc(4px * var(--dir))); }
.service-row h3 { font-size: clamp(1.375rem, 1.2rem + .5vw, 1.625rem); font-weight: 600; transition: color .2s; }
.service-row p { margin: 6px 0 0; color: var(--muted); font-size: 1.0625rem; max-width: 64ch; }
.service-row__go { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--emerald); color: #fff; transition: all .25s var(--ease); }
.service-row a:hover .service-row__go { background: var(--emerald-deep); color: var(--gold-light); transform: rotate(calc(-45deg * var(--dir))); }
.service-row a:hover h3 { color: var(--emerald); }
.tile-icon { display: grid; place-items: center; width: 60px; height: 70px; color: var(--gold-light); background: var(--emerald-grad); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.tile-icon .icon { width: 26px; height: 26px; margin-top: 8px; }
@media (max-width: 560px) { .service-row a { grid-template-columns: 48px minmax(0, 1fr); padding-inline-end: 16px; } .service-row__go { display: none; } .tile-icon { width: 48px; height: 56px; } }

/* --------------------------------------------- principles (white cards) */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.principle { position: relative; padding: 2.75rem 2rem 2.375rem; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); overflow: hidden; transition: transform .4s var(--ease), border-color .3s; }
.principle::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-rule); }
.principle:hover { transform: translateY(-4px); border-color: var(--sand-300); }
.principle [lang="ar"] { display: block; font-family: var(--font-arabic); font-size: 2.9rem; line-height: 1.25; color: var(--gold); }
.principle h3 { font-size: 1.75rem; margin: 8px 0 12px; }
.principle p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }

/* ---------------------------------------------- education band + sample */
.edu-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 6rem); align-items: center; }
.edu-band__copy > p:not(.eyebrow) { color: var(--muted); max-width: 48ch; }
.edu-band__copy h2 { margin-bottom: 22px; }
.edu-band__copy h2::after { content: ""; display: block; width: 76px; height: 4px; margin-top: 22px; border-radius: 4px; background: var(--brand-rule); }
.test-lines { list-style: none; margin: 30px 0; display: grid; gap: 12px; }
.test-lines a { display: flex; align-items: center; gap: 16px; padding: 18px 22px; color: var(--black); text-decoration: none; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: all .25s var(--ease); }
.test-lines a:hover { color: var(--emerald); border-color: var(--emerald); transform: translateX(calc(4px * var(--dir))); box-shadow: var(--shadow-1); }
.test-lines strong { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.25; flex: 1; }
.test-lines span { font-size: .9375rem; color: var(--muted); white-space: nowrap; }
.test-lines .icon { width: 22px; height: 22px; color: var(--emerald); }
@media (max-width: 900px) { .edu-band { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .test-lines a { flex-wrap: wrap; gap: 4px 12px; } .test-lines strong { flex-basis: 100%; } }

.sample { background: var(--surface); color: var(--text); border-radius: var(--radius-l); padding: clamp(24px, 3.4vw, 40px); border: 1px solid var(--line); box-shadow: var(--shadow-2); position: relative; }
.sample::before { content: ""; position: absolute; left: 32px; right: 32px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: var(--brand-rule); }
.sample__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--muted); font-size: .9375rem; margin-bottom: 18px; }
.sample__meta b { color: var(--gold-text); font-weight: 700; }
.sample__q { font-family: var(--font-display); font-size: clamp(1.375rem, 1.2rem + .6vw, 1.75rem); font-weight: 600; line-height: 1.3; color: var(--black); margin-bottom: 22px; }
.sample__hint { margin: 16px 0 0; font-size: .9375rem; color: var(--muted); }
.sample__result { display: none; margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--milk); font-size: 1rem; }
.sample__result.is-visible { display: block; animation: rise .4s var(--ease) both; }
.sample__result strong { display: flex; align-items: center; gap: 8px; color: var(--black); margin-bottom: 4px; }
.sample__result .btn { margin-top: 14px; }

/* answer options are shared by the sample and the real test */
.options { list-style: none; display: grid; gap: 10px; }
.option { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) 22px; gap: 14px; align-items: center; width: 100%; padding: 14px 16px; text-align: start; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; color: var(--text); font-size: 1.0625rem; line-height: 1.5; transition: border-color .18s, background-color .18s, box-shadow .18s; cursor: pointer; }
.option:hover { border-color: var(--emerald-100); background: var(--emerald-50); }
.option__key { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--milk-2); color: var(--black); font-weight: 700; font-size: 1rem; transition: all .18s; }
.option__mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: #fff; transition: all .18s; }
.option__mark .icon { width: 14px; height: 14px; stroke-width: 2.4; opacity: 0; }
.option--multi .option__mark { border-radius: 6px; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option:has(input:focus-visible) { box-shadow: var(--ring); }
.option.is-selected, .option:has(input:checked) { border-color: var(--emerald); background: var(--emerald-50); }
.option.is-selected .option__key, .option:has(input:checked) .option__key { background: var(--emerald); color: #fff; }
.option.is-selected .option__mark, .option:has(input:checked) .option__mark { background: var(--emerald); border-color: var(--emerald); }
.option.is-selected .option__mark .icon, .option:has(input:checked) .option__mark .icon { opacity: 1; }
.option.is-right { border-color: var(--jade); background: var(--jade-50); }
.option.is-right .option__key, .option.is-right .option__mark { background: var(--jade); border-color: var(--jade); color: #fff; }
.option.is-right .option__mark .icon { opacity: 1; }
.option.is-wrong { border-color: var(--danger); background: var(--danger-50); }
.option.is-wrong .option__key, .option.is-wrong .option__mark { background: var(--danger); border-color: var(--danger); color: #fff; }
.option.is-wrong .option__mark .icon { opacity: 1; }
.option[disabled] { cursor: default; }

/* ------------------------------------------------------------- steps */
.how { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 7rem); align-items: center; }
.how__figure { position: relative; max-width: 29rem; }
.how__figure .arch { aspect-ratio: 4 / 5; }
.how__figure .arch img { object-position: 45% center; }
.steps { list-style: none; counter-reset: step; margin-top: 36px; display: grid; gap: 16px; }
.step { position: relative; display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 1.375rem; align-items: start; padding-block: 1.5rem; padding-inline: 1.375rem 1.625rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 4rem; height: 4.625rem; padding-top: .625rem; font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; line-height: 1; color: var(--gold-light); background: var(--emerald-grad); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.step h3 { font-size: 1.5rem; margin: 4px 0 8px; }
.step p { margin: 0; color: var(--muted); max-width: 54ch; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } .how__figure { max-width: 360px; } }
@media (max-width: 520px) { .step { grid-template-columns: 1fr; gap: 14px; } }

/* -------------------------------------------------------------- programmes */
/* clickable, so emerald — with gold and white text, as on the green logo */
.programs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.program { position: relative; isolation: isolate; overflow: hidden; min-width: 0; overflow-wrap: break-word; hyphens: auto; display: flex; flex-direction: column; gap: 10px; padding: 2rem 1.75rem 1.75rem; text-decoration: none; color: var(--on-dark); border-radius: var(--radius-l); background: var(--emerald-grad); min-height: 20.5rem; box-shadow: var(--shadow-1); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.program::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--girih); background-size: 100px; opacity: .09; }
.program::after { content: ""; position: absolute; inset-inline-end: -70px; bottom: -70px; z-index: -1; width: 220px; height: 220px; background: var(--gold-light); opacity: .1; -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; transition: transform 1.2s var(--ease), opacity .4s; }
.program:hover { color: var(--on-dark); transform: translateY(-6px); box-shadow: 0 40px 70px -36px rgb(6 63 43 / .8); }
.program:hover::after { transform: rotate(45deg) scale(1.1); opacity: .18; }
.program__code { font-family: var(--font-display); font-size: 3.1rem; font-weight: 700; line-height: 1; color: var(--gold-light); }
.program h3 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; line-height: 1.4; color: #fff; }
.program p { color: var(--on-dark-soft); font-size: 1rem; margin: 0; }
.program__foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgb(241 215 156 / .25); display: flex; justify-content: space-between; align-items: center; font-size: .9375rem; font-weight: 600; color: var(--gold-light); }
.program__foot .icon { width: 22px; height: 22px; color: var(--gold-light); transition: transform .2s; }
.program:hover .program__foot .icon { transform: translateX(calc(4px * var(--dir))); }
@media (max-width: 1000px) { .programs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .programs { grid-template-columns: minmax(0, 1fr); } .program { min-height: 0; } }

/* -------------------------------------------------------------- people */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2.75rem 1.75rem; }
.person { max-width: 19rem; }
.person__frame { aspect-ratio: 4 / 5; display: grid; place-items: center; background: linear-gradient(180deg, var(--milk) 0%, var(--milk-2) 100%); position: relative; overflow: hidden; }
.person__frame::before { content: ""; position: absolute; inset: 0; background-image: var(--girih-ink); background-size: 90px; opacity: .12; }
.person__frame::after { content: ""; position: absolute; inset: 12px 12px 0; background: linear-gradient(180deg, var(--gold), rgb(190 139 45 / .15)); -webkit-mask: var(--arch) center / 100% 100% no-repeat, var(--arch) center / calc(100% - 3px) calc(100% - 3px) no-repeat; -webkit-mask-composite: xor; mask: var(--arch) center / 100% 100% no-repeat exclude, var(--arch) center / calc(100% - 3px) calc(100% - 3px) no-repeat; }
.person__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.person__initials { position: relative; z-index: 1; font-family: var(--font-display); font-size: 3.6rem; font-weight: 600; letter-spacing: .04em; color: var(--emerald); margin-top: 18%; }
.person h3 { font-size: 1.4rem; margin-top: 18px; }
.person__role { margin: 4px 0 0; color: var(--muted); font-size: 1rem; }
.person__cred { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px; background: var(--gold-50); border: 1px solid var(--sand-300); color: var(--gold-text); font-size: .875rem; font-weight: 600; }
.person__bio { margin-top: 12px; font-size: 1rem; color: var(--muted); }
@media (max-width: 560px) {
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .person__initials { font-size: 2.4rem; }
  .person h3 { font-size: 1.2rem; margin-top: 12px; }
  .person__role { font-size: .9375rem; }
  .person__cred { font-size: .8125rem; padding: 3px 9px; }
}

/* ------------------------------------------------------------- articles */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
@media (max-width: 960px) { .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards-3 { grid-template-columns: 1fr; } }
.article-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-1); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.article-card:hover { color: var(--text); transform: translateY(-6px); border-color: var(--emerald-100); box-shadow: 0 36px 64px -38px rgb(11 92 64 / .45); }
.article-card__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--milk-2); }
.article-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.article-card:hover .article-card__img img { transform: scale(1.05); }
.article-card__meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 22px 26px 0; font-size: .9375rem; color: var(--muted); }
.article-card__meta .kind { color: var(--gold-text); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8125rem; padding-top: 2px; }
.article-card h3 { font-size: 1.4rem; line-height: 1.28; margin: 10px 26px 0; transition: color .2s; }
.article-card:hover h3 { color: var(--emerald); }
.article-card p { margin: 12px 26px 28px; color: var(--muted); font-size: 1.0625rem; }
.article-card > :last-child { margin-bottom: 28px; }

/* ------------------------------------------------------------- faq */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .25s, box-shadow .25s; }
.faq details[open] { border-color: var(--emerald-100); box-shadow: var(--shadow-1); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; padding: 1.375rem 1.5rem; cursor: pointer; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--black); line-height: 1.35; }
.faq summary:hover { color: var(--emerald); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 38px; height: 38px; padding: 9px; flex: none; border-radius: 50%; color: #fff; background: var(--emerald); transition: transform .3s var(--ease), background-color .3s, color .3s; }
.faq details[open] summary .icon { transform: rotate(45deg); background: var(--emerald-deep); color: var(--gold-light); }
.faq__answer { padding-block: 0 24px; padding-inline: 24px 72px; color: var(--muted); max-width: 76ch; font-size: 1.0625rem; }
.faq__answer p:last-child { margin-bottom: 0; }
.faq-aside { position: relative; isolation: isolate; overflow: hidden; padding: 38px 34px; border-radius: var(--radius-l); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.faq-aside::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-rule); }
.faq-aside p:not(.eyebrow) { color: var(--muted); }
.faq-aside .rosette { position: absolute; width: 420px; inset-inline-end: -170px; bottom: -190px; opacity: .3; z-index: -1; }
@media (max-width: 900px) { .faq-aside { position: relative; top: auto; } }

/* ------------------------------------------------------------- CTA band */
/* text and photograph side by side on a milky panel — never text on the photo */
.cta-band { padding-block: clamp(3.5rem, 6vw, 6.5rem); background: var(--white); }
.cta-band__panel { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: clamp(1.75rem, 4.5vw, 4rem); border-radius: 28px; background: var(--milk); border: 1px solid var(--line); }
.cta-band__panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--girih-ink); background-size: 120px; opacity: .07; mask-image: linear-gradient(90deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); }
.cta-band__panel::after { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--emerald) 0 50%, var(--gold) 50% 100%); }
.cta-band h2 { font-size: var(--step-4); }
.cta-band h2::after { content: ""; display: block; width: 76px; height: 4px; margin-top: 22px; border-radius: 4px; background: var(--brand-rule); }
.cta-band p:not(.eyebrow) { color: var(--muted); font-size: var(--step-1); margin: 22px 0 34px; max-width: 44ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.cta-band__phone { display: inline-flex; align-items: center; gap: 10px; color: var(--black); text-decoration: none; font-weight: 700; font-size: 1.125rem; padding: 0 4px; }
.cta-band__phone:hover { color: var(--emerald); }
.cta-band__phone .icon { color: var(--emerald); }
.cta-band__img { position: relative; border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 5 / 4; box-shadow: var(--shadow-2); }
.cta-band__img img { width: 100%; height: 100%; object-fit: cover; object-position: 78% center; }
@media (max-width: 900px) { .cta-band__panel { grid-template-columns: 1fr; } .cta-band__img { aspect-ratio: 16 / 10; } }
@media (max-width: 560px) {
  .cta-band__panel { padding: 28px 20px; border-radius: 22px; }
  .cta-band__actions .btn { flex: 1 1 100%; white-space: normal; text-align: center; line-height: 1.3; padding: 14px 22px; }
}

/* ------------------------------------------------------------- page head */
/* inner pages open on the logo's milky ground with a faint gold girih */
.page-head { position: relative; isolation: isolate; overflow: hidden; padding: clamp(2.75rem, 5vw, 5rem) 0 clamp(3rem, 5vw, 5rem); background: var(--milk); border-bottom: 1px solid var(--line); }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: var(--girih-ink); background-size: 132px; opacity: .1; mask-image: linear-gradient(90deg, transparent 25%, #000 90%); -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 90%); }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--gold-line); opacity: .8; }
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 48px; align-items: end; }
.page-head h1 { max-width: 20ch; }
.page-head h1::after { content: ""; display: block; width: 76px; height: 4px; margin-top: 22px; border-radius: 4px; background: var(--brand-rule); }
.page-head .lead { margin-top: 22px; color: var(--muted); }
.page-head__aside { justify-self: end; color: var(--muted); font-size: 1rem; max-width: 34ch; }
.page-head .rosette { position: absolute; width: 640px; inset-inline-end: -220px; top: -260px; opacity: .35; z-index: -1; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; list-style: none; margin-bottom: 22px; font-size: .9375rem; font-weight: 500; color: var(--muted); }
.crumbs a { color: var(--emerald); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs li + li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 10px; vertical-align: 1px; background: var(--gold); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
@media (max-width: 800px) { .page-head__grid { grid-template-columns: 1fr; } .page-head__aside { justify-self: start; } }

/* reveal on scroll (progressive: only when JS adds .reveal-ready) */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
  .reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- forms */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(24px, 3.5vw, 44px); box-shadow: var(--shadow-1); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; align-content: start; }
.field__label { font-size: 1rem; font-weight: 600; color: var(--black); }
.field__optional { color: var(--muted); font-weight: 400; }
.field__help { margin: 0; font-size: .9375rem; color: var(--muted); }
.field__error { display: flex; gap: 6px; align-items: center; margin: 0; font-size: .875rem; color: var(--danger); }
.field__error .icon { width: 16px; height: 16px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"], .field input[type="number"], .field input[type="url"], .field select, .field textarea, .input {
  width: 100%; min-height: 54px; padding: 13px 16px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--text);
  font-size: 1.0625rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 132px; resize: vertical; }
/* password with a show / hide eye */
.pw-field { position: relative; }
.field .pw-field input { padding-inline-end: 56px; }
.pw-field__toggle { position: absolute; inset-block: 0; inset-inline-end: 4px; display: grid; place-items: center; width: 48px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.pw-field__toggle:hover { color: var(--emerald); }
.pw-field__toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.pw-field__hide, .pw-field__toggle[aria-pressed="true"] .pw-field__show { display: none; }
.pw-field__toggle[aria-pressed="true"] .pw-field__hide { display: block; }
.field .pw-field input::-ms-reveal { display: none; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #aab6ad; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { outline: none; border-color: var(--emerald); box-shadow: var(--ring); }
.field--error input, .field--error textarea { border-color: var(--danger); }
.field input::placeholder, .field textarea::placeholder { color: #98a49c; }
.field input[type="file"] { padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; width: 100%; background: var(--paper); }
.form-errors { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin-bottom: 20px; border-radius: 12px; background: var(--danger-50); color: var(--danger); font-size: .9375rem; }
.form-errors p { margin: 0; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.form-foot p { margin: 0; font-size: .9375rem; color: var(--muted); max-width: 44ch; }
.hp-field { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* segmented radio (preferred channel) */
.segmented > div, .segmented ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.segmented label { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 1.5px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 1rem; font-weight: 500; background: #fff; transition: all .15s; }
.segmented label:hover { border-color: var(--emerald); color: var(--emerald); }
.segmented input { accent-color: var(--gold); margin: 0; }
.segmented label:has(input:checked) { border-color: var(--emerald); background: var(--emerald); color: #fff; font-weight: 600; }

/* service picker (checkbox cards) */
.picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .picker { grid-template-columns: 1fr; } }
.pick { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 24px; gap: 14px; align-items: center; padding: 15px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.pick:hover { border-color: var(--emerald); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--emerald-50); color: var(--emerald); transition: all .15s; }
.pick__icon .icon { width: 22px; height: 22px; }
.pick__title { font-weight: 600; line-height: 1.35; color: var(--black); font-size: 1.0625rem; transition: color .15s; }
.pick__box { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: var(--emerald-deep); transition: all .15s; }
.pick__box .icon { width: 15px; height: 15px; stroke-width: 2.8; opacity: 0; }
.pick:has(input:checked) { border-color: var(--emerald); background: var(--emerald); }
.pick:has(input:checked) .pick__title { color: #fff; }
.pick:has(input:checked) .pick__icon { background: rgb(255 255 255 / .12); color: var(--gold-light); }
.pick:has(input:checked) .pick__box { background: var(--gold-light); border-color: var(--gold-light); }
.pick:has(input:checked) .pick__box .icon { opacity: 1; }
.pick:has(input:focus-visible) { box-shadow: var(--ring); }
.picker-count { font-size: 1rem; color: var(--muted); }
.picker-count b { color: var(--emerald); }

/* --------------------------------------------------------- service page */
.service-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
@media (max-width: 960px) { .service-layout { grid-template-columns: 1fr; } }
.prose { font-size: 1.1875rem; line-height: 1.8; max-width: 68ch; color: var(--text); }
.prose h2 { font-size: var(--step-3); margin: 1.6em 0 .5em; }
.prose h3 { font-size: var(--step-2); margin: 1.4em 0 .4em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--sand); }
.prose blockquote { margin: 1.6em 0; padding-block: 4px; padding-inline: 24px 0; border-inline-start: 3px solid var(--gold); font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1.5; color: var(--black); }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose a:not(.btn) { color: var(--emerald); }
.prose > :first-child { margin-top: 0; }
.checklist { list-style: none; display: grid; gap: 14px; margin-top: 20px; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.checklist .icon { width: 22px; height: 22px; margin-top: 2px; color: var(--jade); stroke-width: 2; }
.audience { display: flex; gap: 14px; align-items: flex-start; margin-top: 36px; padding: 20px 22px; border-radius: 14px; background: var(--sand-50); color: #6f4d20; }
.audience .icon { width: 24px; height: 24px; flex: none; color: var(--sand); }
.audience p { margin: 0; }
.sticky-card { position: sticky; top: calc(var(--header-h) + 24px); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--muted); font-size: .875rem; }
.pager a strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--black); font-weight: 600; line-height: 1.3; }
.pager a:hover strong { color: var(--emerald); }
.pager a:last-child { text-align: end; align-items: flex-end; }

/* -------------------------------------------------------------- success */
.done { text-align: center; max-width: 620px; margin-inline: auto; }
.done__seal { width: 120px; height: 120px; margin: 0 auto 28px; position: relative; display: grid; place-items: center; color: var(--jade); }
.done__seal svg.seal { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--jade-50); stroke: var(--jade); stroke-width: 1.2; }
.done__seal .icon { position: relative; width: 44px; height: 44px; stroke-width: 2; }
.ref-chip { display: inline-flex; gap: 10px; align-items: center; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9375rem; margin: 8px 0 28px; }
.ref-chip b { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; color: var(--ink); }

/* -------------------------------------------------------------- pills/badges */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--text); text-decoration: none; font-size: 1rem; font-weight: 600; transition: all .15s; }
.pill:hover { border-color: var(--emerald); color: var(--emerald); }
.pill[aria-current="true"] { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .875rem; font-weight: 600; background: var(--paper); color: var(--muted); white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; }
.badge--pass { background: var(--jade-50); color: #0f6b43; }
.badge--fail { background: var(--danger-50); color: var(--danger); }
.badge--emerald { background: var(--emerald-50); color: var(--emerald); }
.badge--sand { background: var(--sand-50); color: #855a22; }
.badge--new { background: var(--danger-50); color: var(--danger); }

/* -------------------------------------------------------------- catalogue */
.catalog-bar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.catalog-bar select { min-height: 42px; padding-block: 0; padding-inline: 14px 38px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314251e' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; appearance: none; font-size: .9375rem; }
.test-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) { .test-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .test-grid { grid-template-columns: 1fr; } }
.test-card { position: relative; display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); text-decoration: none; color: var(--text); transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.test-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); transform: translateY(-2px); color: var(--text); }
.test-card__top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; font-size: .875rem; color: var(--muted); }
.test-card h3 { font-size: 1.45rem; line-height: 1.25; margin: 18px 0 10px; }
.test-card p { margin: 0; color: var(--muted); font-size: 1.0625rem; }
.test-card__facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 24px; font-size: .9375rem; color: var(--muted); }
.test-card__facts span { display: inline-flex; gap: 6px; align-items: center; }
.test-card__facts .icon { width: 17px; height: 17px; color: var(--emerald); }
.test-card__best { position: absolute; top: 22px; inset-inline-end: 22px; }
.test-card__cta { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 700; color: var(--emerald); }
.test-card__cta .icon { margin-inline-start: auto; }
.test-card__subject { margin: 18px 0 0; font-size: .875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-text); }
.test-card__subject + h3 { margin-top: 6px; }
.test-card__cta .icon { width: 20px; height: 20px; transition: transform .2s; }
.test-card:hover .test-card__cta .icon { transform: translateX(calc(4px * var(--dir))); }
.empty { padding: 56px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-l); color: var(--muted); }
.empty h3 { margin-bottom: 8px; }

/* -------------------------------------------------------------- test detail */
.facts { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
.facts li span { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); }
.facts li span .icon { width: 18px; height: 18px; color: var(--emerald); }
.facts li b { font-weight: 600; color: var(--ink); text-align: end; }
.start-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px; box-shadow: var(--shadow-1); }
.start-card h2 { font-size: 1.6rem; margin-bottom: 18px; }
.start-card .btn { margin-top: 22px; }
.start-card__note { margin: 14px 0 0; font-size: .875rem; color: var(--muted); text-align: center; }
.rules { list-style: none; display: grid; gap: 16px; margin-top: 24px; }
.rules li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.rules .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--emerald-50); color: var(--emerald); }
.rules .ic .icon { width: 20px; height: 20px; }
.rules p { margin: 0; color: var(--muted); }
.rules strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.history { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.history th { text-align: start; font-weight: 500; color: var(--muted); font-size: .8438rem; padding: 0 0 10px; padding-inline-end: 12px; border-bottom: 1px solid var(--line); }
.history td { padding-block: 14px; padding-inline: 0 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.history td:last-child, .history th:last-child { text-align: end; padding-inline-end: 0; }
.history a { font-weight: 500; text-decoration: none; }
.table-wrap { overflow-x: auto; }

/* -------------------------------------------------------------- insights */
.feature-article { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; text-decoration: none; color: var(--text); margin-bottom: 72px; }
.feature-article:hover { color: var(--text); }
.feature-article__img { aspect-ratio: 16 / 11; border-radius: var(--radius-l); overflow: hidden; }
.feature-article__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.feature-article:hover img { transform: scale(1.03); }
.feature-article h2 { font-size: var(--step-3); margin: 14px 0 18px; }
.feature-article:hover h2 { color: var(--emerald); }
.feature-article p { color: var(--muted); font-size: var(--step-1); }
@media (max-width: 860px) { .feature-article { grid-template-columns: 1fr; } }
.event-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 26px 30px; margin-bottom: 56px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--sand); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.event-strip:hover { color: var(--text); border-color: var(--line-strong); border-inline-start-color: var(--sand); }
.event-date { text-align: center; min-width: 74px; }
.event-date b { display: block; font-family: var(--font-display); font-size: 3rem; line-height: .9; color: var(--ink); font-weight: 600; }
.event-date span { font-size: .875rem; color: var(--muted); }
.event-strip h2 { font-size: 1.4rem; }
.event-strip p { margin: 6px 0 0; color: var(--muted); font-size: .9375rem; }
@media (max-width: 700px) { .event-strip { grid-template-columns: auto 1fr; } .event-strip > .btn { grid-column: 1 / -1; } }
.article-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(44px, 5.5vw, 80px) 0 clamp(48px, 5.5vw, 80px); background: var(--milk); border-bottom: 1px solid var(--line); }
.article-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--girih-ink); background-size: 132px; opacity: .1; mask-image: linear-gradient(100deg, transparent 25%, #000 85%); -webkit-mask-image: linear-gradient(100deg, transparent 25%, #000 85%); }
.article-hero:has(.article-cover) { padding-bottom: 0; border-bottom: 0; background: linear-gradient(180deg, var(--milk) calc(100% - 180px), var(--white) calc(100% - 180px)); }
.article-hero .lead { color: var(--muted); }
.article-hero .article-meta .icon { color: var(--gold); }
.article-cover { box-shadow: var(--shadow-2); }
.article-hero h1 { font-size: var(--step-4); max-width: 22ch; }
.article-hero .lead { margin-top: 20px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; color: var(--muted); font-size: 1rem; }
.article-meta span { display: inline-flex; gap: 8px; align-items: center; }
.article-meta .icon { width: 18px; height: 18px; color: var(--sand); }
.article-cover { margin: 44px 0 0; border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 21 / 9; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: clamp(40px, 6vw, 72px) 0; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 56px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .9375rem; }
.pagination a:hover { border-color: var(--emerald); color: var(--emerald); }
.pagination [aria-current] { background: var(--emerald); color: #fff; border-color: var(--emerald); }

/* -------------------------------------------------------------- about */
.about-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.about-intro .arch { max-width: 460px; }
@media (max-width: 860px) { .about-intro { grid-template-columns: 1fr; } }
.group-title { display: flex; align-items: baseline; gap: 16px; margin: 0 0 36px; }
.group-title h2 { font-size: var(--step-3); }
.group-title span { color: var(--muted); }

/* -------------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--emerald); }
.contact-list .ic .icon { width: 20px; height: 20px; }
.contact-list small { display: block; color: var(--muted); font-size: .8125rem; }
.contact-list a, .contact-list b { color: var(--ink); font-weight: 500; text-decoration: none; }
.contact-list a:hover { color: var(--emerald); }
.contact-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.contact-socials a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--emerald); font-size: .9375rem; transition: border-color .2s, background .2s; }
.contact-socials a:hover { border-color: var(--emerald); background: var(--milk); }
.contact-socials .icon { width: 18px; height: 18px; flex: none; }

/* -------------------------------------------------------------- auth */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.auth__art { position: relative; background: var(--milk); color: var(--text); padding: clamp(40px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; isolation: isolate; border-inline-end: 1px solid var(--line); }
.auth__art::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--girih-ink); background-size: 120px; opacity: .08; }
.auth__art .rosette { position: absolute; z-index: -1; width: 120%; left: 70%; top: 85%; transform: translate(-50%, -50%); opacity: .3; }
.auth__art .brand-logo { height: 150px; margin-bottom: 36px; align-self: flex-start; }
.auth__art h2 { font-size: var(--step-3); max-width: 16ch; }
.auth__art h2::after { content: ""; display: block; width: 76px; height: 4px; margin-top: 20px; border-radius: 4px; background: var(--brand-rule); }
.auth__art p { color: var(--muted); margin-top: 18px; max-width: 40ch; }
.auth__art ul { list-style: none; display: grid; gap: 14px; margin-top: 26px; }
.auth__art li { display: flex; gap: 12px; color: var(--text); font-weight: 500; }
.auth__art li .icon { color: #fff; background: var(--emerald); border-radius: 50%; padding: 4px; width: 26px; height: 26px; flex: none; stroke-width: 2.4; }
.auth__form { display: grid; place-items: center; padding: clamp(32px, 5vw, 72px) var(--gutter); }
.auth__box { width: 100%; max-width: 440px; }
.auth__box h1 { font-size: var(--step-4); margin-bottom: 10px; }
.auth__box > p { color: var(--muted); }
.auth__box form { margin-top: 32px; display: grid; gap: 18px; }
.auth__alt { margin-top: 28px; text-align: center; color: var(--muted); font-size: .9375rem; }
.auth__row { display: flex; justify-content: flex-end; font-size: .875rem; margin-top: -6px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__art { display: none; } }

/* -------------------------------------------------------------- 404 */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px var(--gutter); position: relative; overflow: hidden; isolation: isolate; }
.error-page .rosette { position: absolute; width: 640px; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .45; z-index: -1; }
.error-page__code { font-family: var(--font-display); font-size: clamp(6rem, 4rem + 8vw, 11rem); line-height: 1; color: var(--emerald); font-weight: 500; }
.error-page h1 { font-size: var(--step-3); margin: 10px 0 14px; }
.error-page p { color: var(--muted); max-width: 44ch; margin: 0 auto 28px; }

/* -------------------------------------------------------------- utilities */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; } .mt-5 { margin-top: 64px; }
.center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ======================================================================
   Test taking, results, dashboard, certificate
   ====================================================================== */
.exam-body { background: var(--milk); }
.exam-top { position: sticky; top: 0; z-index: 40; background: rgb(255 255 255 / .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.exam-top__bar { display: flex; align-items: center; gap: 20px; height: 68px; }
.exam-top__title { flex: 1; min-width: 0; }
.exam-top__title strong { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--ink); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-top__title span { font-size: .9375rem; color: var(--muted); }
.exam-top .brand-logo { height: 46px; }
.timer { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--emerald-50); color: var(--emerald); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 1rem; }
.timer .icon { width: 18px; height: 18px; }
.timer.is-low { background: var(--sand-50); color: var(--warning); }
.timer.is-critical { background: var(--danger-50); color: var(--danger); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.progress { height: 3px; background: var(--line); }
.progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--emerald), var(--jade)); transition: width .35s var(--ease); }

.exam { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding-block: 40px 96px; align-items: start; }
@media (max-width: 1000px) { .exam { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; } }
@media (max-width: 640px) {
  .exam-top__bar { gap: 12px; height: 60px; }
  .exam-top__home, .exam-top__finish, .exam-top .save-state, .exam-top__wide { display: none; }
  .exam-top__title strong { font-size: 1.1rem; }
  .exam-top__title span { white-space: nowrap; }
  .timer { padding: 6px 12px; font-size: .9375rem; }
  .q-panel { padding: 22px 18px; border-radius: 16px; }
  .q-nav { position: sticky; bottom: 0; margin: 28px -18px -22px; padding: 14px 18px; background: rgb(255 255 255 / .96); border-radius: 0 0 16px 16px; z-index: 5; }
  .q-nav .btn { min-height: 46px; padding: 0 16px; }
  .q-nav [data-prev] span { display: none; }
  .option { grid-template-columns: 32px minmax(0, 1fr) 22px; gap: 12px; padding: 12px 14px; }
  .option__key { width: 32px; height: 32px; }
}
.q-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow-1); min-height: 420px; }
.js .q-panel .question { display: none; }
.js .q-panel .question.is-current { display: block; animation: q-in .3s var(--ease); }
@keyframes q-in { from { opacity: 0; transform: translateX(calc(10px * var(--dir))); } }
.question + .question { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.js .question + .question { margin-top: 0; padding-top: 0; border-top: 0; }
.question__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; font-size: .9375rem; color: var(--muted); }
.question__num b { color: var(--ink); font-weight: 600; }
.question__text { font-family: var(--font-display); font-size: clamp(1.4rem, 1.2rem + .7vw, 1.85rem); font-weight: 600; line-height: 1.32; color: var(--ink); margin-bottom: 10px; white-space: pre-line; }
.question__hint { margin: 0 0 22px; font-size: .9375rem; color: var(--gold-text); font-weight: 600; }
.question__img { margin: 0 0 24px; border-radius: 12px; border: 1px solid var(--line); max-height: 360px; width: auto; }
.flag-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .8438rem; }
.flag-btn .icon { width: 16px; height: 16px; }
.flag-btn[aria-pressed="true"] { border-color: var(--sand); background: var(--sand-50); color: #855a22; }
.flag-btn[aria-pressed="true"] .icon { fill: var(--sand-300); }
.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--faint); min-height: 20px; }
.save-state .icon { width: 15px; height: 15px; }
.save-state.is-saved { color: var(--jade); }
.save-state.is-error { color: var(--danger); }
.q-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.q-map { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; }
.q-map h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.q-map__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.q-dot { position: relative; height: 40px; border-radius: 9px; border: 1px solid var(--line-strong); background: #fff; color: var(--text); font-size: .875rem; font-weight: 500; font-variant-numeric: tabular-nums; transition: all .15s; }
.q-dot:hover { border-color: var(--ink); }
.q-dot.is-answered { background: var(--emerald-50); border-color: var(--emerald-100); color: var(--emerald); }
.q-dot.is-current { border-color: var(--emerald); box-shadow: var(--ring); }
.q-dot.is-flagged::after { content: ""; position: absolute; top: 4px; inset-inline-end: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }
.q-legend { display: grid; gap: 8px; margin-top: 18px; font-size: .8125rem; color: var(--muted); }
.q-legend span { display: inline-flex; gap: 8px; align-items: center; }
.q-legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); }
.q-legend i.ans { background: var(--emerald-50); border-color: var(--emerald-100); }
.q-legend i.flg { border-radius: 50%; width: 8px; height: 8px; background: var(--sand); border: 0; margin: 0 3px; }
.q-summary { font-size: .9375rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-summary b { color: var(--ink); }

dialog.modal { border: 0; padding: 0; border-radius: var(--radius-l); width: min(540px, calc(100vw - 32px)); box-shadow: var(--shadow-2); color: var(--text); }
dialog.modal::backdrop { background: rgb(6 63 43 / .55); backdrop-filter: blur(3px); }
.modal__body { padding: 32px; }
.modal__body h2 { font-size: 1.75rem; margin-bottom: 12px; }
.modal__body p { color: var(--muted); }
.modal__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.modal__stats div { padding: 14px; border-radius: 12px; background: var(--paper); text-align: center; }
.modal__stats b { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--ink); }
.modal__stats span { font-size: .8125rem; color: var(--muted); }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* result */
.result-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.ring { position: relative; width: clamp(180px, 22vw, 230px); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .ring__track { stroke: var(--line); }
.ring .ring__value { stroke: var(--jade); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); transition: stroke-dashoffset 1.2s var(--ease); }
.ring.is-fail .ring__value { stroke: var(--danger); }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__label b { font-family: var(--font-display); font-size: clamp(3rem, 2rem + 3vw, 4.2rem); font-weight: 600; line-height: 1; color: var(--ink); }
.ring__label span { font-size: .8438rem; color: var(--muted); }
.ring__pass { stroke: var(--sand) !important; stroke-width: 14 !important; stroke-dasharray: .6 99.4; stroke-dashoffset: calc(-1 * var(--pass)); }
.result-head h1 { font-size: var(--step-4); }
.result-head .lead { margin-top: 14px; }
.result-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-stats div { padding-block: 18px; padding-inline: 0 20px; }
.result-stats div + div { padding-inline-start: 20px; border-inline-start: 1px solid var(--line); }
.result-stats b { display: block; font-family: var(--font-display); font-size: 2.1rem; line-height: 1; color: var(--ink); font-weight: 600; }
.result-stats span { font-size: .8438rem; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
@media (max-width: 760px) { .result-head { grid-template-columns: 1fr; } .result-stats { grid-template-columns: repeat(2, 1fr); } .result-stats div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; } .result-stats div:nth-child(n+3) { border-top: 1px solid var(--line); } }

.review-item { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--line-strong); border-radius: var(--radius); padding: 26px 28px; }
.review-item + .review-item { margin-top: 16px; }
.review-item--right { border-inline-start-color: var(--jade); }
.review-item--wrong { border-inline-start-color: var(--danger); }
.review-item--skipped { border-inline-start-color: var(--sand); }
.review-item__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .875rem; color: var(--muted); }
.review-item h3 { font-size: 1.3rem; line-height: 1.4; margin-bottom: 16px; white-space: pre-line; }
.review-item .option { cursor: default; padding: 11px 14px; grid-template-columns: 30px minmax(0, 1fr) 22px; }
.review-item .option__key { width: 30px; height: 30px; font-size: .8438rem; }
.review-item .option:hover { background: inherit; }
.review-item .option.is-right:hover { background: var(--jade-50); }
.review-item .option.is-wrong:hover { background: var(--danger-50); }
.explain { margin-top: 16px; padding: 16px 18px; border-radius: 12px; background: var(--sand-50); color: #5f4422; font-size: .9688rem; }
.explain strong { color: #5f4422; display: block; margin-bottom: 4px; }
.explain p:last-child { margin-bottom: 0; }
.modal__actions .btn { flex: 1 1 auto; }
.review-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }

/* dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.dash-head h1 { font-size: var(--step-4); }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.stat { padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; font-weight: 600; color: var(--ink); }
.stat span { display: block; margin-top: 8px; font-size: .875rem; color: var(--muted); }
@media (max-width: 860px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 26px 28px; }
.panel + .panel { margin-top: 24px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.panel__head h2 { font-size: 1.5rem; }
.resume { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 14px; background: var(--emerald-50); border: 1px solid var(--emerald-100); margin-bottom: 24px; }
.resume .icon-wrap { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--emerald); color: #fff; flex: none; }
.resume div { flex: 1; min-width: 0; }
.resume strong { display: block; color: var(--ink); }
.resume span { font-size: .875rem; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 10px 0 0; position: relative; border-bottom: 1px solid var(--line); }
.bars__pass { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--sand); }
.bars__pass span { position: absolute; inset-inline-end: 0; top: -20px; font-size: .75rem; color: #8a5d24; }
.bar { flex: 1; max-width: 40px; border-radius: 6px 6px 2px 2px; background: var(--emerald-100); position: relative; min-height: 4px; }
.bar.is-pass { background: var(--jade); }
.bar:hover::after { content: attr(data-label); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: .75rem; white-space: nowrap; }
.cert-list { list-style: none; display: grid; gap: 10px; }
.cert-list a { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.cert-list a:hover { border-color: var(--sand); color: var(--text); }
.cert-list .icon { width: 26px; height: 26px; color: var(--sand); }
.cert-list strong { display: block; font-size: .9375rem; color: var(--ink); }
.cert-list span { font-size: .8125rem; color: var(--muted); }
.req-list { list-style: none; display: grid; gap: 0; }
.req-list li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.req-list li:last-child { border-bottom: 0; }
.req-list small { display: block; color: var(--muted); font-size: .8125rem; }

/* certificate */
.cert-page { background: #e8e2d4; padding: 40px var(--gutter) 64px; }
.cert-tools { max-width: 1060px; margin: 0 auto 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.certificate { position: relative; max-width: 1060px; aspect-ratio: 297 / 210; margin: 0 auto; background: #fffdf8; color: var(--ink); box-shadow: var(--shadow-2); padding: 5.5%; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; container-type: inline-size; }
.certificate::before { content: ""; position: absolute; inset: 2.2%; border: 1.5px solid var(--sand); z-index: -1; }
.certificate::after { content: ""; position: absolute; inset: 3.1%; border: .5px solid var(--sand-300); z-index: -1; }
.certificate .rosette { position: absolute; z-index: -1; width: 46%; inset-inline-end: -9%; top: 12%; opacity: .26; }
.certificate__top { display: flex; justify-content: space-between; align-items: flex-start; }
.certificate__top .brand-logo { height: 8.6cqw; }
.certificate__no { text-align: end; font-size: 1.25cqw; color: var(--muted); }
.certificate__no b { display: block; font-family: ui-monospace, Consolas, monospace; color: var(--ink); font-size: 1.5cqw; letter-spacing: .08em; }
.certificate__body { margin-top: auto; margin-bottom: auto; max-width: 74%; }
.certificate__kicker { font-size: 1.45cqw; color: var(--sand); margin: 0 0 1.2cqw; }
.certificate__name { font-family: var(--font-display); font-size: 6.4cqw; font-weight: 600; line-height: 1; color: var(--ink); }
.certificate__text { font-size: 1.55cqw; color: var(--muted); margin: 2cqw 0 .6cqw; line-height: 1.5; }
.certificate__test { font-family: var(--font-display); font-size: 3.1cqw; font-weight: 600; line-height: 1.15; color: var(--emerald); }
.certificate__foot { display: flex; gap: 5cqw; font-size: 1.25cqw; color: var(--muted); border-top: 1px solid var(--sand-300); padding-top: 1.6cqw; }
.certificate__foot b { display: block; color: var(--ink); font-size: 1.6cqw; font-weight: 600; }
.certificate__note { margin-inline-start: auto; text-align: end; max-width: 34%; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body * { visibility: hidden; }
  .certificate, .certificate * { visibility: visible; }
  .certificate { position: fixed; inset: 0; max-width: none; width: 297mm; height: 210mm; box-shadow: none; }
  .site-header, .site-footer, .cert-tools, .toasts { display: none !important; }
}

/* ======================================================================
   Three kinds of test: topic, full, mock (catalogue, test page, player)
   ====================================================================== */
.test-card__subject { display: block; }

/* kind tag: emerald = topic, gold = full, black = mock exam */
.kind-tag { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding-block: 5px; padding-inline: 9px 12px; border-radius: 999px; font-size: .875rem; font-weight: 700; line-height: 1.3; white-space: nowrap; background: var(--emerald-50); color: var(--emerald); }
.kind-tag .icon { width: 16px; height: 16px; stroke-width: 2; }
.kind-tag--full { background: var(--gold-50); color: var(--gold-text); }
.kind-tag--mock { background: var(--black); color: var(--gold-light); }
.kind-tag--lg { margin-bottom: 18px; padding-block: 7px; padding-inline: 12px 16px; font-size: 1rem; }
.kind-tag--lg .icon { width: 19px; height: 19px; }

/* kind tabs: big, clickable, so emerald when chosen */
.kind-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kind-tabs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kind-tab { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; text-align: start; text-decoration: none; background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius); color: var(--text); transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.kind-tab:hover { border-color: var(--emerald); color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.kind-tab__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--emerald-50); color: var(--emerald); transition: all .2s var(--ease); }
.kind-tab__icon .icon { width: 24px; height: 24px; }
.kind-tab__body { display: grid; min-width: 0; flex: 1; }
.kind-tab__body strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; color: var(--black); }
.kind-tab__body small { font-size: .875rem; line-height: 1.35; color: var(--muted); }
.kind-tab__count { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.kind-tab[aria-current="true"], .kind-tab[aria-selected="true"] { background: var(--emerald-grad); border-color: var(--emerald); box-shadow: var(--shadow-emerald); transform: none; }
.kind-tab[aria-current="true"] strong, .kind-tab[aria-selected="true"] strong { color: #fff; }
.kind-tab[aria-current="true"] small, .kind-tab[aria-selected="true"] small { color: var(--on-dark-soft); }
.kind-tab[aria-current="true"] .kind-tab__count, .kind-tab[aria-selected="true"] .kind-tab__count { color: var(--gold-light); }
.kind-tab[aria-current="true"] .kind-tab__icon, .kind-tab[aria-selected="true"] .kind-tab__icon { background: rgb(255 255 255 / .12); color: var(--gold-light); }
.kind-note { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 28px; padding: 14px 18px; border-radius: 14px; background: var(--milk); border: 1px solid var(--line); color: var(--text); font-size: 1.0625rem; }
.kind-note .icon { flex: none; margin-top: 3px; color: var(--gold-text); }
@media (max-width: 1100px) { .kind-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kind-tabs--3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .kind-tabs { gap: 8px; }
  .kind-tabs:not(.kind-tabs--3) .kind-tab { flex-wrap: wrap; gap: 8px 10px; padding: 12px; }
  .kind-tabs:not(.kind-tabs--3) .kind-tab__body { flex-basis: 100%; order: 3; }
  .kind-tabs:not(.kind-tabs--3) .kind-tab__body small { display: none; }
  .kind-tabs:not(.kind-tabs--3) .kind-tab__count { margin-inline-start: auto; }
  .kind-tab__body strong { font-size: 1.1rem; }
  .kind-tab__icon { width: 38px; height: 38px; }
}

/* the three kinds explained */
.kind-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: kind; }
.kind-step { position: relative; display: flex; flex-direction: column; padding: 2rem 1.75rem 1.75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.kind-step::after { counter-increment: kind; content: "0" counter(kind); position: absolute; top: 1.5rem; inset-inline-end: 1.75rem; font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--milk-2); }
.kind-step__icon { display: grid; place-items: center; width: 4rem; height: 4.625rem; padding-top: .625rem; margin-bottom: 1.25rem; color: var(--gold-light); background: var(--emerald-grad); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.kind-step__icon .icon { width: 26px; height: 26px; }
.kind-step h3 { font-size: 1.75rem; }
.kind-step__lead { margin: 6px 0 12px; font-weight: 700; color: var(--gold-text); }
.kind-step p:not(.kind-step__lead) { color: var(--muted); margin-bottom: 20px; }
.kind-step .link-arrow { margin-top: auto; }
@media (max-width: 900px) { .kind-steps { grid-template-columns: 1fr; } }

/* tabs on a programme page */
.tabs.is-ready .tab-panel__title { display: none; }
.tab-panel__title { font-size: 1.5rem; margin: 28px 0 12px; }
.tab-panel[hidden] { display: none; }
.test-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .test-grid--2 { grid-template-columns: 1fr; } }
.empty--sm { padding: 28px 20px; }
.empty--sm p { margin: 0; }

/* draft / staff notice */
.draft-bar { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 10px var(--gutter); background: var(--black); color: var(--gold-light); font-size: .9375rem; font-weight: 600; text-align: center; }
.draft-bar .icon { flex: none; }

/* test page: what a full test or a mock exam is made of */
.source-list { list-style: none; display: grid; gap: 10px; margin-top: 20px; }
.source-list a { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--black); font-weight: 600; text-decoration: none; transition: all .2s var(--ease); }
.source-list a:hover { border-color: var(--emerald); color: var(--emerald); transform: translateX(calc(4px * var(--dir))); }
.source-list a span { flex: 1; }
.source-list .icon { color: var(--emerald); }

/* start form: mode and timer */
.start-form { margin-top: 22px; }
.choice { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.choice legend { padding: 0; margin-bottom: 8px; font-size: 1rem; font-weight: 700; color: var(--black); }
.choice__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice__item { position: relative; cursor: pointer; }
.choice__item input { position: absolute; opacity: 0; pointer-events: none; }
.choice__card { display: grid; justify-items: center; gap: 6px; min-height: 5rem; padding: 12px 8px; text-align: center; border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; color: var(--emerald); transition: all .18s var(--ease); }
.choice__card .icon { width: 24px; height: 24px; }
.choice__card strong { font-size: 1rem; font-weight: 700; line-height: 1.2; color: var(--black); }
.choice__item:hover .choice__card { border-color: var(--emerald); }
.choice__item input:checked + .choice__card { background: var(--emerald); border-color: var(--emerald); color: var(--gold-light); box-shadow: var(--shadow-emerald); }
.choice__item input:checked + .choice__card strong { color: #fff; }
.choice__item input:focus-visible + .choice__card { box-shadow: var(--ring); }
.choice__hints { margin-top: 10px; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.choice__hints p { margin: 0; display: none; }
.choice__hints strong { color: var(--black); }
.choice:has(input[value="exam"]:checked) [data-mode-hint="exam"],
.choice:has(input[value="study"]:checked) [data-mode-hint="study"],
.choice:has(input[value="quiz"]:checked) [data-mode-hint="quiz"] { display: block; }
.start-card .start-form .btn { margin-top: 4px; }
.fixed-time { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--black); color: var(--gold-light); }
.fixed-time span { display: grid; font-size: .875rem; color: var(--on-dark-soft); line-height: 1.35; }
.fixed-time strong { font-size: 1.25rem; color: #fff; }

/* ------------------------------------------------------------ player */
.exam-top__title > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exam-top__chip { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--emerald-50); color: var(--emerald); white-space: nowrap; }
.exam-top__chip--full { background: var(--gold-50); color: var(--gold-text); }
.exam-top__chip--mock { background: var(--black); color: var(--gold-light); }
.exam-top__chip--mode { background: var(--milk-2); color: var(--black); }
.exam-top .save-state { white-space: nowrap; }
button.timer { border: 0; cursor: pointer; font-family: inherit; }
.timer.is-hidden [data-timer-text] { display: none; }
.timer--off { background: var(--milk-2); color: var(--muted); font-weight: 600; }
.exam-alert { position: sticky; top: 71px; z-index: 30; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 10px var(--gutter); background: var(--sand-50); border-bottom: 1px solid var(--sand-300); color: #6f4d20; font-size: .9375rem; font-weight: 600; }
.exam-alert[hidden] { display: none; }

.q-panel { --q-scale: 1; }
.question__text { font-size: calc(clamp(1.4rem, 1.2rem + .7vw, 1.85rem) * var(--q-scale)); }
.question__points { margin-inline-start: 10px; padding: 2px 9px; border-radius: 999px; background: var(--gold-50); color: var(--gold-text); font-weight: 700; font-size: .8125rem; }
.question__section { margin: 0 0 8px; font-size: .875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-text); }
.question__hint--plain { color: var(--muted); font-weight: 400; }
.option--exam { grid-template-columns: 38px minmax(0, 1fr) 30px 22px; font-size: calc(1.0625rem * var(--q-scale)); }
.option__strike { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--faint); opacity: 0; transition: opacity .15s, background-color .15s, color .15s; }
.option__strike .icon { width: 18px; height: 18px; }
.option--exam:hover .option__strike, .option__strike:focus-visible, .option.is-struck .option__strike { opacity: 1; }
.option__strike:hover { background: var(--milk-2); color: var(--black); }
@media (hover: none) { .option__strike { opacity: .7; } }
.option.is-struck .option__text { text-decoration: line-through; color: var(--faint); }
.option.is-struck .option__key { opacity: .45; }
.option.is-struck .option__strike { color: var(--danger); }
.option__yours { color: var(--muted); font-size: .875em; }
.question.is-locked .option { cursor: default; }
.question.is-locked .option__strike { visibility: hidden; }
.question.is-locked .option:not(.is-right):not(.is-wrong):not(:has(input:checked)):hover { border-color: var(--line); background: var(--surface); }
.option--exam.is-right, .option--exam.is-right:has(input:checked) { border-color: var(--jade); background: var(--jade-50); }
.option--exam.is-right .option__key, .option--exam.is-right .option__mark, .option--exam.is-right:has(input:checked) .option__key, .option--exam.is-right:has(input:checked) .option__mark { background: var(--jade); border-color: var(--jade); color: #fff; }
.option--exam.is-right .option__mark .icon { opacity: 1; }
.option--exam.is-wrong:has(input:checked) { border-color: var(--danger); background: var(--danger-50); }
.option--exam.is-wrong:has(input:checked) .option__key, .option--exam.is-wrong:has(input:checked) .option__mark { background: var(--danger); border-color: var(--danger); color: #fff; }

.q-check { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.q-check[hidden] { display: none; }
.q-check__hint { font-size: .9375rem; color: var(--muted); }
.feedback { margin-top: 20px; padding: 16px 18px; border-radius: 14px; border-inline-start: 4px solid var(--line-strong); background: var(--milk); animation: rise .35s var(--ease) both; }
.feedback[hidden] { display: none; }
.feedback.is-right { border-inline-start-color: var(--jade); background: var(--jade-50); }
.feedback.is-wrong { border-inline-start-color: var(--danger); background: var(--danger-50); }
.feedback__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font-size: 1.0625rem; color: var(--text); }
.feedback__head strong { font-size: 1.125rem; color: var(--black); }
.feedback__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line-strong); color: #fff; font-weight: 700; font-size: .9375rem; line-height: 1; }
.feedback.is-right .feedback__icon { background: var(--jade); }
.feedback.is-wrong .feedback__icon { background: var(--danger); }
.feedback__why { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgb(17 22 19 / .1); font-size: calc(1rem * var(--q-scale)); line-height: 1.65; color: var(--text); }
.feedback__why[hidden] { display: none; }
.feedback__why > strong { display: block; margin-bottom: 4px; color: var(--black); }
.feedback__why p:last-child { margin-bottom: 0; }

.q-nav__map { display: none; font-variant-numeric: tabular-nums; }
.q-map__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.q-map__head h2 { margin: 0; flex: 1; }
.q-side__close { display: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--milk-2); color: var(--black); place-items: center; }
.q-filter { display: grid; grid-template-columns: repeat(3, auto); gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--milk); }
.q-filter__btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.q-filter__btn b { color: var(--gold-text); font-variant-numeric: tabular-nums; }
.q-filter__btn[aria-pressed="true"] { background: var(--emerald); color: #fff; }
.q-filter__btn[aria-pressed="true"] b { color: var(--gold-light); }
.q-dot[hidden] { display: none; }
.q-dot.is-right { background: var(--jade-50); border-color: var(--jade); color: #0f6b43; }
.q-dot.is-wrong { background: var(--danger-50); border-color: var(--danger); color: var(--danger); }
.q-map__empty { margin: 4px 0 0; font-size: .875rem; color: var(--muted); }
.q-legend i.ok { background: var(--jade-50); border-color: var(--jade); }
.q-legend i.bad { background: var(--danger-50); border-color: var(--danger); }
.q-tools { display: grid; gap: 14px; font-size: .9375rem; color: var(--muted); }
.q-tools__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q-tools__row > span:first-child, .q-tools__keys summary { display: inline-flex; align-items: center; gap: 8px; }
.q-tools__size { display: inline-flex; gap: 6px; }
.q-tools__size button { min-width: 44px; height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--black); font-weight: 700; font-size: .9375rem; }
.q-tools__size button:hover { border-color: var(--emerald); color: var(--emerald); }
.q-tools__keys summary { cursor: pointer; font-weight: 600; color: var(--emerald); list-style: none; }
.q-tools__keys summary::-webkit-details-marker { display: none; }
.q-tools__keys ul { list-style: none; display: grid; gap: 8px; margin-top: 12px; font-size: .8438rem; }
.q-tools__keys li span { color: var(--faint); }
.q-tools kbd { font-family: inherit; padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: #fff; color: var(--black); font-size: .75rem; }

.modal__stats button { padding: 14px; border: 1.5px solid transparent; border-radius: 12px; background: var(--paper); text-align: center; color: inherit; transition: border-color .15s; }
.modal__stats button:not(:disabled):hover { border-color: var(--emerald); }
.modal__stats button:not(:disabled) span { color: var(--emerald); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.modal__stats button:disabled { cursor: default; }
.modal__body .modal__note { margin: -6px 0 20px; padding: 12px 14px; border-radius: 12px; background: var(--sand-50); color: #6f4d20; font-size: .9375rem; }
.modal__note[hidden] { display: none; }

.exam-toasts { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translateX(-50%); display: grid; gap: 10px; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.exam-toast { padding: 14px 18px; border-radius: 14px; background: var(--black); color: #fff; font-size: 1rem; font-weight: 600; text-align: center; box-shadow: var(--shadow-2); animation: rise .35s var(--ease) both; }
.exam-toast--warning { background: #6f4d20; color: #fff7e2; }
.exam-toast--error { background: var(--danger); }
.exam-toast.is-leaving { opacity: 0; transition: opacity .35s; }

@media (max-width: 1000px) {
  .q-nav__map { display: inline-flex; }
  .q-side { position: fixed; inset: 0; z-index: 60; display: none; grid-template-columns: minmax(0, 1fr); align-content: end; gap: 0; padding-top: 12vh; overflow-y: auto; background: rgb(6 63 43 / .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
  .q-side.is-open { display: grid; }
  .q-side > .q-map { border: 0; border-radius: 0; padding: 20px var(--gutter); }
  .q-side > .q-map:first-child { border-radius: 22px 22px 0 0; padding-top: 24px; animation: rise .3s var(--ease) both; }
  .q-side > .q-tools { border-top: 1px solid var(--line); padding-bottom: 28px; }
  .q-side__close { display: grid; }
  .q-map__grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .q-dot { height: 44px; }
  .q-tools__keys { display: none; }
  body.map-open { overflow: hidden; }
}
@media (max-width: 640px) {
  .exam-alert { top: 63px; }
  .option--exam { grid-template-columns: 32px minmax(0, 1fr) 30px 22px; gap: 10px; }
  .q-nav .btn span { white-space: nowrap; }
  .q-check .btn { width: 100%; }
}

/* ------------------------------------------------------------ result */
.result-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sections { margin-top: clamp(36px, 5vw, 64px); padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--milk); }
.sections__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.sections__head h2 { font-size: var(--step-2); }
.sections__head p { margin: 0; color: var(--muted); font-size: 1rem; }
.sections__list { list-style: none; display: grid; gap: 10px; }
.section-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 6.5rem; gap: 12px 24px; align-items: center; padding: 14px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.section-row__title { font-weight: 600; color: var(--black); line-height: 1.35; }
.section-row__bar { position: relative; height: 10px; border-radius: 999px; background: var(--milk-2); }
.section-row__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 999px; background: var(--jade); }
.section-row__bar u { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-inline-start: -1px; background: var(--gold); }
.section-row.is-weak .section-row__bar i { background: var(--danger); }
.section-row__score { display: grid; justify-items: end; line-height: 1.2; }
.section-row__score b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--black); }
.section-row.is-weak .section-row__score b { color: var(--danger); }
.section-row__score small { font-size: .8438rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .section-row { grid-template-columns: minmax(0, 1fr) auto; } .section-row__bar { grid-column: 1 / -1; order: 3; } }
.review-item .question__img { margin: 0 0 16px; }
.review-empty { padding: 24px; text-align: center; }
.history__meta { display: block; margin-top: 2px; font-size: .8125rem; color: var(--muted); }
.test-lines strong .kind-tag { display: flex; width: max-content; margin-bottom: 8px; font-family: var(--font-body); }
.kind-tabs--3 .kind-tab { padding: 14px 16px; gap: 12px; }
.kind-tabs--3 .kind-tab__body small { display: none; }
.kind-tabs--3 .kind-tab__body strong { font-size: 1.15rem; }
.exam-top__title .exam-top__chip { color: var(--emerald); font-size: .75rem; }
.exam-top__title .exam-top__chip--full { color: var(--gold-text); }
.exam-top__title .exam-top__chip--mock { color: var(--gold-light); }
.exam-top__title .exam-top__chip--mode { color: var(--black); }
.option--exam.is-wrong:has(input:checked) .option__mark .icon { display: none; }
.option--exam.is-wrong:has(input:checked) .option__mark::after { content: "\2715"; font-size: .6875rem; font-weight: 700; line-height: 1; }
@media (max-width: 640px) {
  .q-panel { padding: 22px 14px; }
  .q-nav { margin: 28px -14px -22px; padding: 14px; }
  .option--exam { grid-template-columns: 30px minmax(0, 1fr) 26px 20px; gap: 8px; padding: 12px 10px; }
  .option--exam .option__key { width: 30px; height: 30px; }
  .option--exam .option__strike { width: 26px; }
  .option--exam .option__mark { width: 20px; height: 20px; }
}
@media (max-width: 640px) {
  .exam-top__title > span { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .exam-body--study .exam-top__chip:not(.exam-top__chip--mode), .exam-body--quiz .exam-top__chip:not(.exam-top__chip--mode) { display: none; }
}

/* found while testing in the browser */
.question__text:focus { outline: none; }
.ring__label b { font-size: clamp(2.5rem, 1.7rem + 2.2vw, 3.4rem); }
/* a start card taller than the window must scroll with the page, or its button stays below the fold */
@media (max-height: 900px) { .service-layout .sticky-card { position: static; } }

/* phone: one-column grids must be allowed to shrink below their content, or a long word pushes the page sideways */
@media (max-width: 960px) { .service-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.auth__form { grid-template-columns: minmax(0, 1fr); }
.auth__box { min-width: 0; }
.auth__box form { grid-template-columns: minmax(0, 1fr); }
.choice__item, .choice__card { min-width: 0; }
.choice__card strong { overflow-wrap: anywhere; }
@media (max-width: 400px) { .choice__card { padding: 12px 4px; } .choice__card strong { font-size: .9375rem; } }
.pager { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pager a { min-width: 0; }
.pager a strong { overflow-wrap: anywhere; hyphens: auto; }

/* header: the menu stays on one line at every desktop width, signed in or not */
@media (min-width: 1001px) {
  .site-header__bar { gap: clamp(1rem, 1.5vw, 1.75rem); }
  .site-nav__list { gap: clamp(.125rem, .5vw, .5rem); }
  .site-nav__link { white-space: nowrap; padding-inline: .625rem; }
  .site-header__cta { padding: 0 1.25rem; white-space: nowrap; }
}
@media (min-width: 1001px) and (max-width: 1500px) { .account-menu__name { display: none; } }

/* dashboard: a long name or email wraps instead of widening the page on a phone */
.dash-head > div { min-width: 0; }
.dash-head > div > div { min-width: 0; }
.dash-head h1, .dash-head p { overflow-wrap: anywhere; }
@media (max-width: 640px) { .dash-head h1 { font-size: var(--step-3); } .dash-head .avatar--lg { width: 64px; height: 64px; font-size: 1.25rem; } }

/* home page test list: the kind tag keeps its own colours inside the list rows */
.test-lines .kind-tag { color: var(--emerald); font-size: .8125rem; }
.test-lines .kind-tag--full { color: var(--gold-text); }
.test-lines .kind-tag--mock { color: var(--gold-light); }
.test-lines .kind-tag .icon { width: 15px; height: 15px; color: inherit; }

/* small layout polish from the full-site review */
.page-head__aside:has(.pills) { max-width: none; }
.page-head__aside .pills { justify-content: flex-end; }
@media (max-width: 800px) { .page-head__aside .pills { justify-content: flex-start; } }
.error-page .rosette { opacity: .22; }

/* partners: logos (or names) added in the admin, shown on the home and about pages */
.partners { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 20px; }
.partner { display: flex; align-items: center; justify-content: center; min-width: 11.5rem; max-width: 100%; min-height: 5.75rem; padding: 1rem 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--black); font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
a.partner:hover { border-color: var(--emerald); color: var(--emerald); box-shadow: var(--shadow-1); transform: translateY(-2px); }
.partner img { display: block; height: 3.25rem; width: auto; max-width: 12rem; object-fit: contain; }
@media (max-width: 560px) { .partner { min-width: calc(50vw - 28px); padding: .875rem 1rem; font-size: 1.05rem; } .partner img { max-width: 100%; } }

/* second phone, tagline and LinkedIn link: fields the admin can fill in */
.contact-list__more { display: block; margin-top: 2px; }
.site-footer__about .site-footer__tagline { margin-top: 22px; color: var(--gold-light); font-weight: 600; font-size: 1.0625rem; }
.site-footer__about .site-footer__tagline + p { margin-top: 10px; }
.person__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .9375rem; font-weight: 600; color: var(--emerald); text-decoration: none; }
.person__link:hover { text-decoration: underline; }
.person__link .icon { width: 18px; height: 18px; }

/* ===================================================== programme & course pages */
.prog-head { padding-bottom: clamp(3rem, 5vw, 4.5rem); }
.prog-head__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.prog-head h1 { max-width: 22ch; font-size: var(--step-4); }
.prog-head .lead { max-width: 56ch; }
.prog-head__code { display: flex; align-items: baseline; gap: .35em; margin: 0; font-family: var(--font-display); font-size: clamp(3.75rem, 2rem + 6vw, 7rem); font-weight: 700; line-height: .95; color: var(--emerald); letter-spacing: -.01em; }
.prog-head__code span { font-family: var(--font-body); font-size: .2em; font-weight: 700; letter-spacing: .2em; color: var(--gold-text); transform: translateY(-.3em); }
.prog-head__official { margin: 10px 0 18px; font-size: 1.0625rem; font-weight: 600; letter-spacing: .01em; color: var(--gold-text); font-style: italic; }
.prog-head__icon { width: 84px; height: 98px; margin: 4px 0 22px; }
.prog-head__icon .icon { width: 34px; height: 34px; }
.prog-head__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.glance { position: relative; overflow: hidden; padding: 30px 30px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.glance::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-rule); }
.glance__title { font-family: var(--font-body); font-size: .8125rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 8px; }
.glance dl { margin: 0; }
.glance dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.glance dl > div:last-child { border-bottom: 0; }
.glance dt { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 1rem; white-space: nowrap; }
.glance dt .icon { flex: none; color: var(--emerald); }
.glance dd { margin: 0; margin-inline-start: auto; font-weight: 700; color: var(--ink); text-align: end; font-size: 1.0625rem; }
.glance__note { margin: 12px 0 0; padding-top: 14px; border-top: 1px dashed var(--line-strong); font-size: .875rem; color: var(--muted); }

.local-nav { position: sticky; top: var(--header-h); z-index: 40; background: rgb(255 255 255 / .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.local-nav ul { display: flex; gap: 4px; list-style: none; overflow-x: auto; scrollbar-width: none; padding: 10px 0; }
.local-nav ul::-webkit-scrollbar { display: none; }
.local-nav a { display: block; padding: 9px 16px; border-radius: 999px; white-space: nowrap; text-decoration: none; font-weight: 600; font-size: 1rem; color: var(--black); transition: background-color .2s, color .2s; }
.local-nav a:hover, .local-nav a.is-current { background: var(--emerald-50); color: var(--emerald); }
.local-nav__cta { margin-inline-start: auto; }
.local-nav__cta a { background: var(--emerald); color: #fff; }
.local-nav__cta a:hover { background: var(--emerald-hover); color: #fff; }

.prog-layout { padding-top: clamp(1rem, 2vw, 2rem); }
.prog-layout .sticky-card { top: calc(var(--header-h) + 84px); }
.prog-block { padding-block: clamp(2.5rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); }
.prog-block:first-child { padding-top: 0; }
.prog-block:last-child { border-bottom: 0; }
.prog-block__title { font-size: var(--step-3); }
.prog-block__title::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 18px; border-radius: 4px; background: var(--brand-rule); }
.prog-block > .prog-block__title { margin-bottom: 26px; }
.prog-block__head { margin-bottom: 28px; }
.prog-block__head p { margin: 18px 0 0; color: var(--muted); max-width: 60ch; }
.prog-block__sub { font-size: 1.6rem; margin: 44px 0 20px; }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.duo__card { padding: 26px 26px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--milk); }
.duo__card--accent { background: var(--surface); box-shadow: var(--shadow-1); }
.duo__card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; margin-bottom: 6px; }
.duo__card h3 .icon { flex: none; color: var(--gold); }
.duo__card .checklist { margin-top: 16px; gap: 12px; font-size: 1.0625rem; }
.dot-list { list-style: none; display: grid; gap: 12px; margin-top: 16px; font-size: 1.0625rem; }
.dot-list li { position: relative; padding-inline-start: 24px; }
.dot-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 11px; height: 11px; background: var(--gold); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }

.weights { display: flex; gap: 3px; height: 38px; margin-bottom: 22px; border-radius: 10px; overflow: hidden; }
.weights__seg { display: grid; place-items: center; min-width: 34px; flex-basis: 0; font-size: .8125rem; color: #fff; background: var(--emerald); }
.weights__seg b { font-weight: 700; }
.weights__seg--2, .part__no--2 { background: #16804f; }
.weights__seg--3, .part__no--3 { background: var(--gold); }
.weights__seg--4, .part__no--4 { background: #0f6b4b; }
.weights__seg--5, .part__no--5 { background: #a97b22; }
.weights__seg--6, .part__no--6 { background: #2f8f68; }
.weights__seg--7, .part__no--7 { background: #c39a4a; }
.weights__seg--8, .part__no--8 { background: #063f2b; }
.weights__seg--9, .part__no--9 { background: #8a6418; }

.parts { display: grid; gap: 12px; }
.part { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.part[open] { border-color: var(--emerald-100); box-shadow: var(--shadow-1); }
.part summary { list-style: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 20px; gap: 16px; align-items: center; padding: 16px 20px; cursor: pointer; }
.part summary::-webkit-details-marker { display: none; }
.part__no { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--emerald); color: #fff; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.part__title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--black); line-height: 1.3; }
.part__title small { display: block; margin-top: 2px; font-family: var(--font-body); font-size: .875rem; font-weight: 500; color: var(--muted); }
.part__weight { padding: 6px 12px; border-radius: 999px; background: var(--gold-50); color: var(--gold-text); font-weight: 700; font-size: .9375rem; white-space: nowrap; }
.part__chev { color: var(--muted); transition: transform .25s var(--ease); }
.part[open] .part__chev { transform: rotate(180deg); color: var(--emerald); }
.part summary:hover .part__title { color: var(--emerald); }
.part__items { list-style: none; counter-reset: item; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding-block: 4px 20px; padding-inline: 80px 22px; }
.part__items li { counter-increment: item; position: relative; padding-block: 10px; padding-inline: 34px 0; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.45; }
.part__items li::before { content: counter(item, decimal-leading-zero); position: absolute; inset-inline-start: 0; top: 11px; font-size: .8125rem; font-weight: 700; color: var(--gold-text); font-variant-numeric: tabular-nums; }

.spec { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.spec > div { display: grid; grid-template-columns: minmax(150px, 2fr) minmax(0, 5fr); }
.spec > div + div { border-top: 1px solid var(--line); }
.spec dt { padding: 15px 20px; background: var(--milk); color: var(--muted); font-weight: 600; font-size: 1rem; }
.spec dd { margin: 0; padding: 15px 20px; color: var(--ink); font-size: 1.0625rem; }

.callout { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 16px; margin-top: 22px; padding: 22px 24px; border-radius: var(--radius); background: var(--gold-50); border: 1px solid var(--sand-300); }
.callout > .icon { color: var(--gold-text); margin-top: 3px; }
.callout .prose { font-size: 1.0625rem; color: var(--text); }
.callout .prose > :first-child { margin-top: 0; }
.callout .prose > :last-child { margin-bottom: 0; }

.path { list-style: none; counter-reset: path; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.path li { counter-increment: path; position: relative; padding: 22px 20px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.path li::before { content: counter(path); display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 50%; background: var(--emerald-grad); color: var(--gold-light); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.path h4 { font-size: 1.15rem; margin: 0 0 6px; }
.path p { margin: 0; color: var(--muted); font-size: .9688rem; line-height: 1.5; }
.prog-block .source-list { margin-top: 26px; }

.facts--inline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; border-top: 0; margin-bottom: 8px; }
.facts--inline li { flex-direction: column; gap: 4px; border-bottom: 0; border-top: 2px solid var(--emerald-100); padding-top: 12px; }
.facts--inline li b { text-align: start; }
.prog-block .steps { margin-top: 20px; }
.form-card__kicker { margin: 0 0 6px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .8125rem; color: var(--gold-text); }

/* course cards (no code): an icon tile instead of the big letters */
.program__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: rgb(241 215 156 / .14); color: var(--gold-light); box-shadow: inset 0 0 0 1px rgb(241 215 156 / .3); }
.program--course h3 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.25; }

@media (max-width: 1100px) {
  .prog-head__grid { grid-template-columns: 1fr; }
  .glance { max-width: 560px; }
}
@media (max-width: 1000px) {
  .prog-layout .sticky-card { position: static; }
}
@media (max-width: 760px) {
  .duo { grid-template-columns: 1fr; }
  .part__items { grid-template-columns: 1fr; padding: 0 18px 16px; }
  .part summary { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; }
  .part__no { width: 38px; height: 38px; font-size: 1.1rem; }
  .part__chev { display: none; }
  .spec > div { grid-template-columns: 1fr; background: var(--milk); }
  .spec dt { padding-bottom: 4px; }
  .spec dd { padding-top: 0; }
  .facts--inline { grid-template-columns: 1fr; }
  .weights { height: 30px; }
  .weights__seg b { font-size: .6875rem; }
  .local-nav__cta { margin-inline-start: 0; }
}

/* ===================================================== AAOIFI hub */
.aaoifi-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.aaoifi-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 32px 32px 28px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--text); text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.aaoifi-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-rule); }
.aaoifi-card::after { content: ""; position: absolute; inset-inline-end: -60px; top: -60px; z-index: -1; width: 220px; height: 220px; background: var(--gold); opacity: .06; -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; transition: transform .6s var(--ease), opacity .3s; }
.aaoifi-card:hover { transform: translateY(-5px); border-color: var(--sand-300); box-shadow: var(--shadow-2); color: var(--text); }
.aaoifi-card:hover::after { transform: rotate(45deg); opacity: .12; }
.aaoifi-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.aaoifi-card__code { font-family: var(--font-display); font-size: 3.5rem; font-weight: 700; line-height: 1; color: var(--emerald); }
.aaoifi-card__code small { display: block; margin-bottom: 6px; font-family: var(--font-body); font-size: .75rem; font-weight: 700; letter-spacing: .22em; color: var(--gold-text); }
.aaoifi-card__official { font-size: .9375rem; font-style: italic; font-weight: 600; color: var(--gold-text); }
.aaoifi-card h3 { font-size: 1.55rem; line-height: 1.25; }
.aaoifi-card p { margin: 0; color: var(--muted); font-size: 1.0625rem; }
.aaoifi-card__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.aaoifi-card__facts li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--milk); border: 1px solid var(--line); font-size: .9375rem; font-weight: 600; color: var(--ink); }
.aaoifi-card__facts .icon { color: var(--emerald); }
.aaoifi-card__go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 18px; font-weight: 700; color: var(--emerald); }
.aaoifi-card__go .icon { transition: transform .2s var(--ease); }
.aaoifi-card:hover .aaoifi-card__go .icon { transform: translateX(calc(4px * var(--dir))); }

.compare-wrap { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); }
.compare { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 1.0625rem; }
.compare th, .compare td { padding: 18px 22px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--milk); border-bottom: 2px solid var(--line-strong); }
.compare thead a { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--emerald); text-decoration: none; line-height: 1.1; }
.compare thead a:hover { color: var(--emerald-hover); text-decoration: underline; }
.compare thead small { display: block; margin-top: 4px; font-size: .875rem; font-weight: 600; color: var(--gold-text); }
.compare tbody th { width: 200px; color: var(--muted); font-weight: 600; font-size: 1rem; background: var(--milk); }
.compare td b { color: var(--ink); }

@media (max-width: 1000px) {
  .aaoifi-cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .aaoifi-card { padding: 26px 22px 22px; }
  .aaoifi-card__code { font-size: 2.9rem; }
}

/* case-based questions (AAOIFI "scenario vignettes"): the situation shown above the question */
.scenario { margin: 0 0 18px; padding: 16px 20px 18px; border-inline-start: 4px solid var(--gold); border-start-end-radius: var(--radius-s); border-end-end-radius: var(--radius-s); background: var(--gold-50); }
.scenario__label { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.scenario__text { white-space: pre-line; font-size: calc(1.0625rem * var(--q-scale, 1)); line-height: 1.6; color: var(--text); }

/* ===================================================== learning path: topics, lecture, mock exams */
.path-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 22px; }
.path-progress__bar { height: 10px; border-radius: 999px; background: var(--milk-2); overflow: hidden; }
.path-progress__bar span { display: block; height: 100%; min-width: 10px; border-radius: inherit; background: linear-gradient(90deg, var(--emerald), var(--jade)); transition: width .6s var(--ease); }
.path-progress p { margin: 0; font-size: .9375rem; color: var(--muted); white-space: nowrap; }
.path-progress p b { color: var(--ink); font-size: 1.125rem; }
.path-progress--sm { grid-template-columns: 1fr; gap: 6px; margin: 14px 0 6px; }
.path-progress--sm .path-progress__bar { height: 6px; }
.path-progress--sm p { font-size: .8125rem; }
.path-progress--sm p b { font-size: .9375rem; }
.callout--plain { margin: 0 0 22px; background: var(--milk); border-color: var(--line); }
.callout--plain > .icon { color: var(--emerald); }
.callout--plain p { margin: 0; }

.path-list { list-style: none; display: grid; gap: 12px; position: relative; }
.path-item { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.path-item--current { border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-50), var(--shadow-1); }
.path-item--open:hover, .path-item--done:hover { border-color: var(--emerald-100); box-shadow: var(--shadow-1); }
.path-item--locked { background: var(--milk); }
.path-item--locked h3, .path-item--locked p { color: var(--faint); }
.path-item__no { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--emerald); background: var(--emerald-50); }
.path-item--current .path-item__no { background: var(--emerald-grad); color: var(--gold-light); }
.path-item--done .path-item__no { background: var(--jade); color: #fff; }
.path-item--locked .path-item__no { background: var(--milk-2); color: var(--faint); }
.path-item h3 { font-size: 1.3rem; line-height: 1.3; }
.path-item h3 a { color: inherit; text-decoration: none; }
.path-item h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.path-item h3 a:hover { color: var(--emerald); }
.path-item__body p { margin: 6px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; max-width: 62ch; }
.path-item__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .875rem; color: var(--muted); }
.path-item__meta li { display: inline-flex; align-items: center; gap: 6px; }
.path-item__meta .icon { color: var(--emerald); }
.path-item__ref { padding: 2px 10px; border-radius: 999px; background: var(--gold-50); color: var(--gold-text); font-weight: 700; letter-spacing: .02em; }
.path-item__score { font-weight: 700; color: var(--danger); }
.path-item__score.is-pass { color: var(--jade); }
.path-item__go { position: relative; z-index: 1; }
.path-item__locked { display: block; max-width: 15ch; font-size: .8125rem; line-height: 1.35; color: var(--faint); text-align: end; }
a.path-item__locked { color: var(--emerald); font-weight: 600; }

.sim-features { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.sim-features li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 18px; border-radius: var(--radius); background: var(--milk); border: 1px solid var(--line); }
.sim-features .icon { width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: var(--emerald); color: var(--gold-light); }
.sim-features strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.sim-features span { display: block; margin-top: 2px; font-size: .9375rem; line-height: 1.45; color: var(--muted); }

/* lecture page */
.lesson-head { padding-block: clamp(2.25rem, 4vw, 3.5rem); }
.lesson-head h1 { max-width: 26ch; font-size: var(--step-4); }
.lesson-head .lead { max-width: 66ch; }
.lesson-head__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: .9375rem; color: var(--muted); }
.lesson-head__meta li { display: inline-flex; align-items: center; gap: 7px; }
.lesson-head__meta .icon { color: var(--emerald); }
.lesson-head__done { font-weight: 700; color: var(--jade); }
.lesson-head__done .icon { color: var(--jade); }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.lesson-main { min-width: 0; }
.lesson-side { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.lesson-outline { padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); }
.lesson-outline__program { display: block; text-decoration: none; color: var(--ink); }
.lesson-outline__program b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--emerald); line-height: 1.1; }
.lesson-outline__program span { display: block; font-size: .875rem; font-weight: 600; line-height: 1.35; color: var(--muted); }
.lesson-outline__program:hover span { color: var(--emerald); }
.lesson-outline ol { list-style: none; display: grid; gap: 2px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.lesson-outline li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px; border-radius: 10px; font-size: .9375rem; line-height: 1.4; }
.lesson-outline li a { color: var(--text); text-decoration: none; }
.lesson-outline li a:hover { color: var(--emerald); }
.lesson-outline li.is-locked { color: var(--faint); }
.lesson-outline li.is-here { background: var(--emerald-50); }
.lesson-outline li.is-here a { color: var(--emerald); font-weight: 700; }
.lesson-outline__no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .8125rem; font-weight: 700; background: var(--milk-2); color: var(--muted); }
.lesson-outline li.is-done .lesson-outline__no { background: var(--jade); color: #fff; }
.lesson-outline li.is-current .lesson-outline__no, .lesson-outline li.is-here .lesson-outline__no { background: var(--emerald); color: #fff; }
.lesson-outline li.is-done.is-here .lesson-outline__no { background: var(--jade); }
.lesson-outline__mocks { margin-top: 8px; padding-top: 12px !important; border-top: 1px solid var(--line); border-radius: 0 !important; font-weight: 600; }
.lesson-outline__mocks .lesson-outline__no { background: var(--gold-50); color: var(--gold-text); }

.lecture { max-width: 74ch; font-size: 1.1875rem; line-height: 1.75; }
.lecture > p:first-child { font-size: 1.3125rem; line-height: 1.65; color: var(--ink); }
.lecture h3 { margin: 2.2em 0 .6em; font-size: 1.75rem; line-height: 1.25; }
.lecture h3::before { content: ""; display: block; width: 44px; height: 4px; margin-bottom: 14px; border-radius: 4px; background: var(--brand-rule); }
.lecture h4 { margin: 1.6em 0 .5em; font-family: var(--font-body); font-size: 1.1875rem; font-weight: 700; }
.lecture ul, .lecture ol { padding-inline-start: 1.4em; display: grid; gap: .55em; margin: 1em 0; }
.lecture ul { list-style: none; padding-inline-start: 0; }
.lecture ul > li { position: relative; padding-inline-start: 26px; }
.lecture ul > li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 11px; height: 11px; background: var(--gold); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.lecture ol > li::marker { font-weight: 700; color: var(--emerald); }
.lecture strong { color: var(--ink); }
.lecture blockquote { margin: 1.8em 0; padding: 20px 24px; border: 1px solid var(--sand-300); border-inline-start: 5px solid var(--gold); border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); background: var(--gold-50); font-size: 1.125rem; font-style: normal; color: var(--text); }
.lecture blockquote p { margin: 0; }
.lecture blockquote strong:first-child { color: var(--gold-text); }
.lecture table { width: 100%; margin: 1.4em 0; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 1.0625rem; line-height: 1.5; }
.lecture th { padding: 13px 18px; text-align: start; background: var(--emerald); color: #fff; font-weight: 600; }
.lecture td { padding: 13px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.lecture tbody tr:nth-child(even) td { background: var(--milk); }
.lecture td + td, .lecture th + th { border-inline-start: 1px solid var(--line); }
.lecture th + th { border-inline-start-color: rgb(255 255 255 / .18); }
.lesson-video { position: relative; aspect-ratio: 16 / 9; margin-bottom: 32px; border-radius: var(--radius-l); overflow: hidden; background: #000; box-shadow: var(--shadow-2); }
.lesson-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-main > .source-list { max-width: 74ch; margin-top: 28px; }

.lesson-test { position: relative; overflow: hidden; margin-top: 48px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-l); border: 1px solid var(--emerald-100); background: linear-gradient(180deg, var(--emerald-50), #fff 70%); box-shadow: var(--shadow-1); }
.lesson-test::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-rule); }
.lesson-test.is-done { border-color: var(--jade-light); background: linear-gradient(180deg, var(--jade-50), #fff 70%); }
.lesson-test__head { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 18px; align-items: start; }
.lesson-test__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--emerald-grad); color: var(--gold-light); }
.lesson-test.is-done .lesson-test__icon { background: var(--jade); color: #fff; }
.lesson-test__head h2 { font-size: 2rem; }
.lesson-test__head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }
.lesson-test__facts { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.lesson-test__facts li { padding: 16px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.lesson-test__facts b { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--ink); }
.lesson-test__facts span { display: block; margin-top: 6px; font-size: .875rem; color: var(--muted); }
.lesson-test__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lesson-test__history { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.lesson-test__history h3 { font-family: var(--font-body); font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 8px; }
.lesson-test__history ul { list-style: none; }
.lesson-test__history li { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.lesson-test__history li:last-child { border-bottom: 0; }
.lesson-test__history li > span { color: var(--muted); }
.lesson-test__history b { font-weight: 700; }
.lesson-test__history b.is-pass { color: var(--jade); }
.lesson-test__history b.is-fail { color: var(--danger); }

.lesson-pager { margin-top: 44px; }
.lesson-pager .is-locked { display: block; padding: 18px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--faint); text-align: end; }
.lesson-pager .is-locked > span { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; }
.lesson-pager .is-locked strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 1.2rem; color: var(--faint); }

.lesson-locked { padding: clamp(32px, 5vw, 64px); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-l); background: var(--milk); }
.lesson-locked__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 20px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--gold-text); }
.lesson-locked h2 { font-size: var(--step-3); }
.lesson-locked p { margin: 14px auto 0; max-width: 52ch; color: var(--muted); }
.lesson-locked__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

@media (max-width: 1100px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-side { position: static; max-height: none; order: -1; }
  .lesson-outline ol { display: none; }
  .lesson-outline { padding: 16px 18px; }
}
@media (max-width: 760px) {
  .path-item { grid-template-columns: 44px minmax(0, 1fr); gap: 12px 14px; padding: 16px; }
  .path-item__no { width: 44px; height: 44px; font-size: 1.15rem; }
  .path-item__go { grid-column: 2; justify-self: start; }
  .path-item__locked { max-width: none; text-align: start; }
  .path-item h3 { font-size: 1.15rem; }
  .sim-features { grid-template-columns: 1fr; }
  .lecture { font-size: 1.125rem; }
  .lecture > p:first-child { font-size: 1.1875rem; }
  .lecture h3 { font-size: 1.45rem; }
  .lecture table { display: block; overflow-x: auto; font-size: 1rem; }
  .lesson-test__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-test__head { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
  .lesson-test__icon { width: 48px; height: 48px; border-radius: 14px; }
  .lesson-test__head h2 { font-size: 1.6rem; }
  .lesson-test__history li { grid-template-columns: minmax(0, 1fr) auto; }
  .lesson-test__history li .link-arrow { grid-column: 1 / -1; }
  .lesson-test__actions .btn, .lesson-test__actions form { width: 100%; }
  .lesson-test__actions form .btn { width: 100%; }
}

@media (max-width: 760px) { .path-item__no { align-self: start; } }

/* topics not added yet */
.path-empty { padding: clamp(28px, 4vw, 44px); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-l); background: var(--milk); }
.path-empty__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 16px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--emerald); }
.path-empty h3 { font-size: 1.5rem; }
.path-empty p { margin: 10px auto 0; max-width: 46ch; color: var(--muted); }
.path-empty .btn { margin-top: 20px; }

/* account dashboard: programmes the learner is studying */
.learn-panel { margin-top: 24px; }
.learn-list { list-style: none; display: grid; }
.learn-list li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) auto; gap: 16px 28px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.learn-list li:first-child { border-top: 0; }
.learn-list__name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.learn-list__name b { flex: none; font-family: var(--font-display); font-size: 1.5rem; color: var(--emerald); }
.learn-list__name a { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.35; }
.learn-list__name a:hover { color: var(--emerald); }
.learn-list__icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--emerald-50); color: var(--emerald); }
.learn-list .path-progress--sm { margin: 0; }
@media (max-width: 800px) {
  .learn-list li { grid-template-columns: 1fr; gap: 10px; }
  .learn-list li .btn { justify-self: start; }
}

/* people: contact details an editor adds in the admin */
.person__contacts { list-style: none; display: grid; gap: 6px; margin-top: 14px; }
.person__contacts a { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; color: var(--ink); font-size: 1rem; font-weight: 500; text-decoration: none; }
.person__contacts a span { overflow-wrap: anywhere; }
.person__contacts a:hover { color: var(--emerald); }
.person__contacts .icon { flex: none; color: var(--emerald); }
.person__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.person__social:empty { display: none; }
.person__social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--emerald); background: #fff; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.person__social a:hover { background: var(--emerald); border-color: var(--emerald); color: #fff; transform: translateY(-2px); }

/* ===================================================== careers */
.careers-head__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.careers-head__photo { justify-self: end; width: 100%; max-width: 440px; }
.careers-head__intro { max-width: 58ch; }
.careers-head__intro p { margin: 0 0 .7em; }
.careers-head__intro p:last-child { margin-bottom: 0; }
.careers-head .hero__actions { margin-top: 32px; }

.vacancy-list { list-style: none; display: grid; gap: 14px; }
.vacancy { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 26px 30px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.vacancy::before { content: ""; position: absolute; inset-inline-start: 0; top: 22px; bottom: 22px; width: 4px; border-start-end-radius: 4px; border-end-end-radius: 4px; background: var(--brand-rule); background: linear-gradient(180deg, var(--emerald) 0 50%, var(--gold) 50% 100%); }
.vacancy:hover { border-color: var(--emerald-100); box-shadow: var(--shadow-1); transform: translateY(-2px); color: var(--text); }
.vacancy__dept { margin: 0 0 6px; font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.vacancy h3 { font-size: 1.6rem; line-height: 1.25; }
.vacancy:hover h3 { color: var(--emerald); }
.vacancy__summary { margin: 8px 0 0; color: var(--muted); max-width: 70ch; }
.vacancy__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.vacancy__meta li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: var(--milk); border: 1px solid var(--line); font-size: .9375rem; font-weight: 500; color: var(--ink); }
.vacancy__meta .icon { color: var(--emerald); }
.page-head .vacancy__meta { margin-top: 24px; }
.page-head .vacancy__meta li { background: #fff; }
.vacancy__go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--emerald); white-space: nowrap; }
.vacancy__go .icon { transition: transform .2s var(--ease); }
.vacancy:hover .vacancy__go .icon { transform: translateX(calc(4px * var(--dir))); }
.vacancy-list--compact { margin-top: 18px; }
.vacancy-list--compact .vacancy { padding: 18px 22px; }
.vacancy-list--compact .vacancy h3 { font-size: 1.25rem; }
.vacancy-list--compact .vacancy__meta { margin-top: 10px; }
.vacancy-empty { border: 1px dashed var(--line-strong); border-radius: var(--radius-l); background: var(--milk); }
.vacancy-body { max-width: none; }
.vacancy-body > :first-child { margin-top: 0; }
.vacancy-body h3:first-child::before { display: none; }

.apply-form .form-foot { margin-top: 24px; }
.form-grid--one { grid-template-columns: 1fr; }
.apply-aside { margin-bottom: 16px; }
.apply-aside h2 { font-size: 2rem; }
.apply-aside p { margin: 8px 0 0; }
.sticky-card .apply-form { padding: clamp(22px, 2.5vw, 32px); }
.sticky-card .apply-form .form-foot { flex-direction: column-reverse; align-items: stretch; }
.sticky-card .apply-form .form-foot .btn { width: 100%; }
.sticky-card .apply-form .form-foot p { max-width: none; text-align: center; }
.vacancy-closed { text-align: center; }
.vacancy-closed__icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 14px; border-radius: 50%; background: var(--gold-50); color: var(--gold-text); }
.vacancy-closed h2 { font-size: 1.75rem; }
.vacancy-closed p { margin: 10px 0 20px; }

/* file upload: a real <input type=file> under a friendly drop zone */
.file-field { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 3.5rem; padding: 10px 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--milk); cursor: pointer; transition: border-color .2s, background-color .2s; }
.file-field:hover, .file-field:focus-within { border-color: var(--emerald); background: var(--emerald-50); }
.file-field input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.file-field__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--emerald); }
.file-field__text { min-width: 0; }
.file-field__text strong { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-field__text small { display: block; font-size: .875rem; color: var(--muted); }
.file-field.has-file { border-style: solid; border-color: var(--emerald); background: var(--emerald-50); }
.file-field.has-file .file-field__icon { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.field--error .file-field { border-color: var(--danger); }

@media (max-width: 900px) {
  .careers-head__grid { grid-template-columns: 1fr; }
  .careers-head__photo { justify-self: start; max-width: 360px; }
  .vacancy { grid-template-columns: 1fr; gap: 14px; padding-block: 22px 20px; padding-inline: 26px 22px; }
  .vacancy h3 { font-size: 1.35rem; }
}

/* small laptops and tablets in landscape (1001–1140px): six menu items need a tighter header */
@media (min-width: 1001px) and (max-width: 1140px) {
  .site-header__bar { gap: .75rem; }
  .site-header .brand-logo, .site-header.is-scrolled .brand-logo { height: 3.25rem; }
  .site-nav__list { gap: 0; }
  .site-nav__link { padding-inline: .4rem; font-size: .9375rem; }
  details[data-dropdown] > summary, .site-header__signin { padding-inline: .45rem; font-size: .9375rem; }
  .site-header__tools { gap: .125rem; }
}

/* ------------------------------------------------------------ right to left (Arabic) */
/* Sides are logical throughout (inline-start / inline-end), so most of the layout mirrors by itself.
   This block covers what cannot: directional icons, gradients that fade towards the photo side,
   the nested menu, the marquee, and Arabic type. */
[dir="rtl"] { --dir: -1; }
[dir="rtl"] .icon--dir use { transform: scaleX(-1); transform-box: view-box; transform-origin: center; }

[dir="rtl"] .site-nav__sub--nested { left: auto; right: 100%; transform: translate(-6px, 0); }
[dir="rtl"] .site-nav__sub--nested::before { left: auto; right: -14px; }
[dir="rtl"] .site-nav__sub-item--sub:hover > .site-nav__sub--nested,
[dir="rtl"] .site-nav__sub-item--sub:focus-within > .site-nav__sub--nested { transform: translate(-10px, 0); }
@media (max-width: 1000px) {
  [dir="rtl"] .site-nav__sub--nested,
  [dir="rtl"] .site-nav__sub-item--sub:hover > .site-nav__sub--nested,
  [dir="rtl"] .site-nav__sub-item--sub:focus-within > .site-nav__sub--nested { right: auto; transform: none; }
}

[dir="rtl"] .hero::before { mask-image: linear-gradient(-90deg, transparent 35%, #000 100%); -webkit-mask-image: linear-gradient(-90deg, transparent 35%, #000 100%); }
[dir="rtl"] .page-head::before { mask-image: linear-gradient(-90deg, transparent 25%, #000 90%); -webkit-mask-image: linear-gradient(-90deg, transparent 25%, #000 90%); }
[dir="rtl"] .cta-band__panel::before { mask-image: linear-gradient(-90deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(-90deg, #000, transparent 60%); }
[dir="rtl"] .article-hero::before { mask-image: linear-gradient(-100deg, transparent 25%, #000 85%); -webkit-mask-image: linear-gradient(-100deg, transparent 25%, #000 85%); }
[dir="rtl"] .auth__art .rosette { left: 30%; }
[dir="rtl"] .catalog-bar select { background-position: left 12px center; }
/* The Arabic word in the footer is itself right to left, so "start" would be its own right edge: align it to the page side. */
[dir="rtl"] .site-footer__arabic { text-align: right; }

/* The marquee runs the other way: the copy of the strip waits on the left. */
@media (prefers-reduced-motion: no-preference) { [dir="rtl"] .marquee__track { animation-name: marquee-rtl; } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* Phone numbers, e-mail and web addresses are typed and read left to right in Arabic too. */
[dir="rtl"] input:is([type="email"], [type="tel"], [type="url"], [type="number"], [inputmode="tel"], [inputmode="email"], [autocomplete="tel"]) { direction: ltr; text-align: right; }

/* Arabic type: Montserrat / Playfair keep the Latin letters (AAOIFI, CPSS), the Arabic faces take the rest.
   Arabic script is joined, so it gets no letter-spacing, no fake italics and a little more line height. */
html[lang="ar"] {
  --font-display: "Playfair Display", "Noto Naskh Arabic", "Amiri", Georgia, serif;
  --font-body: "Montserrat", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-synthesis-style: none;
}
html[lang="ar"] body, html[lang="ar"] body * { letter-spacing: normal !important; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { line-height: 1.4; }
html[lang="ar"] .hero__title { line-height: 1.3; }
html[lang="ar"] body { line-height: 1.85; }

/* Sign in with Google: a white button with Google's own "G", then an "or" rule above the email form. */
.auth__social { margin-top: 28px; display: grid; gap: 22px; }
.auth__social + form { margin-top: 22px; }
.btn--google { --btn-bg: #fff; --btn-fg: var(--text); --btn-bd: var(--line-strong); gap: 12px; white-space: normal; text-align: center; box-shadow: 0 1px 2px rgb(16 24 20 / .06); }
.btn--google:hover, .btn--google:focus-visible { --btn-bg: var(--paper); --btn-bd: var(--emerald); }
.btn--google__logo { flex: none; }
.auth__or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .875rem; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Privacy policy page */
.privacy h2:first-of-type { margin-top: 1.2em; }
.privacy__contact { margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--line); font-weight: 600; }

/* Lesson video file: the same 16:9 frame as a YouTube player, above the lecture text */
.lesson-video--file { margin: 0 0 32px; }
.lesson-video video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }

/* Paid courses: the lock on cards, the pill under the title, the locked block on the course page */
.program__lock { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 5px 11px; border-radius: 99px; font-size: .8125rem; font-weight: 600; background: var(--gold-50, #f8efd9); color: #7a5a14; }
.program__lock.is-open { background: #e3f1ea; color: var(--emerald); }
.program .program__lock { margin-bottom: 4px; }
.access-pill { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 8px 16px; border-radius: 99px; font-weight: 600; font-size: .9375rem; background: var(--gold-50, #f8efd9); color: #7a5a14; }
.access-pill.is-open { background: #e3f1ea; color: var(--emerald); }
.access-lock { display: flex; gap: 20px; align-items: flex-start; margin: 8px 0 28px; padding: 26px 28px; border-radius: var(--radius-l); border: 1px solid var(--line-strong); background: linear-gradient(135deg, #fffaf0, #fff); box-shadow: var(--shadow-1, 0 1px 2px rgb(0 0 0 / .04)); }
.access-lock__icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--emerald); color: #fff; }
.access-lock__body h3 { font-size: var(--step-2); margin-bottom: 8px; }
.access-lock__body p { color: var(--muted); max-width: 62ch; }
.access-lock__who { margin-top: 10px; font-size: .9375rem; }
.access-lock__who b { color: var(--text); }
.access-lock__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
@media (max-width: 600px) { .access-lock { flex-direction: column; padding: 22px 20px; } }
.my-courses__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.my-courses__list li { display: grid; gap: 8px; align-content: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s; }
.my-courses__list li:hover { border-color: var(--emerald); }
.my-courses__list a { display: grid; justify-items: start; gap: 8px; font-weight: 600; line-height: 1.35; color: var(--text); text-decoration: none; }
.my-courses__list a b { padding: 3px 10px; border-radius: 99px; background: #e3f1ea; color: var(--emerald); font-size: .875rem; letter-spacing: .02em; }
.my-courses__list small { color: var(--emerald); font-weight: 600; font-size: .8438rem; }
.my-courses { margin-top: 24px; }
