/* mwasel.study · the live site's stylesheet (/ar/ and /en/).
   Built on 28 Sep 2026 from the approved prototype (docs/design/assets:
   design.css, then pages.css), then the rules for the live pages' own
   markup. From here on this file is the source. Spec: /DESIGN.md. */

/* ===== 1. Brand constants: never themed ===== */
:root {
  --brand-ink: #1D1913;
  --brand-paper: #FBF9F5;
  --brand-mint: #4ED9A4;
  --brand-gold: #D9A62B;
}

/* ===== 2. Palette, light ===== */
:root {
  color-scheme: only light;
  --page: #FBF9F5;
  --surface: #FFFDF9;
  --surface-2: #F4F1EA;
  --surface-3: #ECE6DA;
  --line: #E3DCCF;
  --line-strong: #8B8173;
  --text: #1D1913;
  --text-2: #463E33;
  --text-3: #6B6256;
  --ink: #1D1913;
  --ink-2: #28231C;
  --ink-3: #3A342A;
  --on-ink: #FBF9F5;
  --on-ink-2: #D9D1C3;
  --on-ink-3: #ABA193;
  --on-ink-line: #857B6D;
  --frame: #1D1913;
  --frame-deep: #15120E;
  --mint: #4ED9A4;
  --mint-ink: #0A6443;
  --mint-tint: #DCF6EA;
  --gold: #D9A62B;
  --gold-ink: #8A640C;
  --gold-tint: #FAF1DC;
  --gold-on-ink: #E0B03C;
  --green: #0C7C51;
  --green-tint: #E6F4EC;
  --red: #B23A2E;
  --red-tint: #F8E6E2;
  --red-on-ink: #F08A7E;
}

/* ===== 3. Roles: the only colours components use ===== */
:root {
  --bg: var(--page);
  --fg: var(--text);
  --fg-2: var(--text-2);
  --fg-3: var(--text-3);
  --rule: var(--line);
  --control: var(--line-strong);
  --raised: var(--surface);
  --quiet: var(--surface-2);
  --hover: var(--surface-3);
  --accent: var(--mint);
  --accent-fg: var(--mint-ink);
  --accent-tint: var(--mint-tint);
  --primary: var(--ink);
  --primary-fg: var(--on-ink);
  --primary-hover: #3A3228;
  --ok: var(--green);
  --ok-tint: var(--green-tint);
  --bad: var(--red);
  --bad-tint: var(--red-tint);
  --review: var(--gold-ink);
  --review-mark: var(--gold);
  --review-tint: var(--gold-tint);
  --focus: var(--ink);
}

/* ===== 4. Type, space, shape, layers, motion ===== */
:root {
  --font-display: "Alexandria", "Noto Sans Arabic", system-ui, sans-serif;
  --font-text: "Public Sans", "Noto Sans Arabic", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Noto Sans Arabic", ui-monospace, "Cascadia Mono", Menlo, monospace;

  --fs-hero: clamp(2.1rem, 1.05rem + 5vw, 5.25rem);
  --fs-display: clamp(2.125rem, 1.4rem + 2.8vw, 3.75rem);
  --fs-h2: clamp(1.625rem, 1.3rem + 1.3vw, 2.375rem);
  --fs-h3: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  --fs-numeral: clamp(4.5rem, 2.4rem + 8vw, 9.5rem);
  --fs-lead: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-meta: 0.8125rem;
  --lh-display: 1.18;
  --lh-heading: 1.35;
  --lh-text: 1.85;
  --track-display: 0;

  --s-1: 0.25rem;  --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;  --s-5: 1.5rem;
  --s-6: 2rem;     --s-7: 3rem;    --s-8: 4rem;    --s-9: 6rem;  --s-10: 8rem;
  --section: clamp(3.5rem, 2rem + 4.5vw, 6rem);
  --container: 77.5rem;
  --gutter: clamp(1rem, 0.6rem + 1.6vw, 1.5rem);
  --measure: 40rem;

  --r: 4px;
  --r-round: 999px;
  --rule-heavy: 3px;
  --rule-thin: 1px;
  --tap: 44px;
  --btn-h: 48px;
  --btn-h-main: 56px;

  --z-menu: 10;
  --z-panel: 40;
  --z-skip: 50;

  --panel-w: 400px;   /* the tutor panel's width: tutor.js sets it on <html> when the student drags the handle */
  --panel-use: clamp(320px, var(--panel-w), 70vw);   /* what the panel and the page's padding use: never under 320 px nor over 70% of the window (31 Oct 2026) */
  --panel-h: 52vh;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t: 180ms;
  --enter: 760ms;
  --stagger: 80ms;

  /* depth: one soft, ink-tinted elevation for sheets a student acts on,
     and a deeper lift for the one object a section is built around */
  --shadow-sheet: 0 1px 1px rgba(29, 25, 19, 0.04), 0 12px 28px -18px rgba(29, 25, 19, 0.28);
  --shadow-lift: 0 2px 4px rgba(29, 25, 19, 0.06), 0 34px 64px -30px rgba(29, 25, 19, 0.5);
  --glow-x: 88%;
  --glow-x-far: 8%;

  /* the grain baked into ink surfaces: a static image, not a live filter */
  --grain-paper: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .11  0 0 0 0 .1  0 0 0 0 .07  0 0 0 .2 -.075'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .97  0 0 0 0 .92  0 0 0 .32 -.13'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}

[dir="rtl"] { --glow-x: 12%; --glow-x-far: 92%; }

html[lang="en"] {
  --fs-hero: clamp(2rem, 1rem + 3.4vw, 3.6rem);
  --fs-lead: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --lh-display: 1.04;
  --lh-heading: 1.2;
  --lh-text: 1.6;
  --track-display: -0.02em;
}

/* ===== 5. Contexts ===== */
.on-ink {
  --bg: var(--frame);
  --fg: var(--on-ink);
  --fg-2: var(--on-ink-2);
  --fg-3: var(--on-ink-3);
  --rule: var(--ink-3);
  --control: var(--on-ink-line);
  --raised: var(--ink-2);
  --quiet: var(--ink-2);
  --hover: var(--ink-3);
  --accent-fg: var(--mint);
  --accent-tint: rgba(78, 217, 164, 0.14);
  --primary: var(--mint);
  --primary-fg: var(--ink);
  --primary-hover: #7BE5BD;
  --ok: var(--mint);
  --ok-tint: rgba(78, 217, 164, 0.14);
  --review: var(--gold-on-ink);
  --bad: var(--red-on-ink);
  --bad-tint: rgba(240, 138, 126, 0.14);
  --focus: var(--mint);
  --shadow-sheet: 0 1px 1px rgba(0, 0, 0, 0.2), 0 14px 30px -18px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.25), 0 40px 70px -30px rgba(0, 0, 0, 0.8);
  background-color: var(--bg);
  background-image: var(--grain),
    radial-gradient(70% 90% at var(--glow-x) 30%, rgba(78, 217, 164, 0.1), transparent 62%),
    radial-gradient(60% 90% at var(--glow-x-far) 115%, rgba(0, 0, 0, 0.32), transparent 65%);
  color: var(--fg);
}
/* paper inside ink: a real page component shown on a dark plinth */
.on-paper {
  --bg: var(--page);
  --fg: var(--text);
  --fg-2: var(--text-2);
  --fg-3: var(--text-3);
  --rule: var(--line);
  --control: var(--line-strong);
  --raised: var(--surface);
  --quiet: var(--surface-2);
  --hover: var(--surface-3);
  --accent-fg: var(--mint-ink);
  --accent-tint: var(--mint-tint);
  --primary: var(--ink);
  --primary-fg: var(--on-ink);
  --ok: var(--green);
  --ok-tint: var(--green-tint);
  --review: var(--gold-ink);
  --bad: var(--red);
  --bad-tint: var(--red-tint);
  --focus: var(--ink);
  background-color: var(--bg);
  color: var(--fg);
}
.world-gold {
  --accent: var(--gold);
  --accent-fg: var(--gold-ink);
  --accent-tint: var(--gold-tint);
  --primary: var(--gold);
  --primary-fg: var(--ink);
  --primary-hover: #E8BF5A;
  --heavy-rule: var(--gold);
}
.world-gold .on-ink, .world-gold.on-ink {
  --accent-fg: var(--gold-on-ink);
  --accent-tint: rgba(217, 166, 43, 0.16);
  --primary: var(--gold);
  --primary-fg: var(--ink);
  --primary-hover: #E8BF5A;
  --focus: var(--gold);
}
.site-header.on-ink, .site-menu.on-ink { --accent: var(--mint); --accent-fg: var(--mint); --primary: var(--mint); --focus: var(--mint); }

/* ===== 6. Dark mode ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --shadow-sheet: 0 1px 1px rgba(0, 0, 0, 0.25), 0 14px 30px -18px rgba(0, 0, 0, 0.75);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.3), 0 40px 70px -30px rgba(0, 0, 0, 0.85);
  --page: #1C1914; --surface: #25211B; --surface-2: #2A251F; --surface-3: #332D25;
  --line: #3A3329; --line-strong: #7E7466;
  --text: #F3EEE5; --text-2: #D2C9BA; --text-3: #A99F90;
  --frame: #0B0907; --frame-deep: #070605; --ink-2: #1E1A15; --ink-3: #2E2821;
  --mint-ink: #4ED9A4; --mint-tint: rgba(78, 217, 164, 0.14);
  --gold-ink: #E6BA4A; --gold-tint: rgba(217, 166, 43, 0.14);
  --green: #5DD6A3; --green-tint: rgba(93, 214, 163, 0.12);
  --red: #F0897C; --red-tint: rgba(240, 137, 124, 0.12);
  --primary: var(--mint); --primary-fg: #0D0B08; --primary-hover: #7BE5BD;
  --focus: var(--mint);
}

/* ===== 7. Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grain-paper), var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; -webkit-text-fill-color: currentColor; }
bdi { unicode-bidi: isolate; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-heading);
  letter-spacing: var(--track-display);
  margin: 0;
  color: var(--fg);
}
h1 { font-size: var(--fs-display); line-height: var(--lh-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }

a { color: var(--accent-fg); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
a:hover { color: var(--fg); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r); }
::selection { background: var(--mint); color: var(--ink); }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: var(--measure); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; inset-inline-start: var(--s-4); top: -100px; z-index: var(--z-skip);
  background: var(--mint); color: var(--ink); padding: var(--s-3) var(--s-4);
  font-family: var(--font-display); font-weight: 700; border-radius: var(--r); text-decoration: none;
}
.skip:focus { top: var(--s-4); }

.i { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
/* arrows point forward in the reading direction; the icon itself points right */
[dir="rtl"] .i-fwd { transform: scaleX(-1); }
.i-back { transform: scaleX(-1); }
[dir="rtl"] .i-back { transform: none; }

.mono, .code { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.num { font-variant-numeric: tabular-nums; }

/* ===== 8. Header and phone menu ===== */
.site-header { position: relative; z-index: var(--z-menu); border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; gap: var(--s-5); min-height: 72px; }
.brand { display: flex; align-items: center; gap: var(--s-3); color: var(--fg); text-decoration: none; flex: none; }
.brand img { height: 46px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand-line { font-size: var(--fs-meta); color: var(--fg-3); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: var(--s-5); }
.site-nav a, .account-link, .lang-switch {
  display: inline-flex; align-items: center; min-height: var(--tap);
  color: var(--fg-2); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem;
  border-bottom: 2px solid transparent; transition: color var(--t-fast), border-color var(--t-fast);
}
.site-nav a:hover, .account-link:hover, .lang-switch:hover { color: var(--fg); border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.site-nav .nav-subscribe { color: var(--mint); }
.lang-switch[lang="ar"] { font-family: "Noto Sans Arabic", var(--font-text); font-weight: 600; }
.lang-switch[lang="en"] { font-family: "Public Sans", var(--font-text); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: var(--s-5); margin-inline-start: auto; }
/* «اشترك» in the top bar, every screen (the owner, 14 Nov 2026) */
.btn-subscribe {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0.4rem 1rem; border-radius: var(--r);
  background: var(--mint); color: var(--ink); border: 1.5px solid var(--mint); text-decoration: none; white-space: nowrap;
  font-family: var(--font-display); font-weight: 800; font-size: 0.9375rem; line-height: 1.2;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.btn-subscribe:hover { background: #7BE5BD; border-color: #7BE5BD; color: var(--ink); }
.btn-tutor {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 42px; padding: 0.4rem 0.95rem; border-radius: var(--r);
  background: transparent; color: var(--fg); border: 1.5px solid var(--control);
  font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; line-height: 1.2; cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.btn-tutor .i { color: var(--mint); width: 1.3em; height: 1.3em; }
.btn-tutor:hover { border-color: var(--mint); background: rgba(78, 217, 164, 0.08); }
.menu-btn {
  display: none; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0.35rem 0.25rem;
  background: none; border: 0; color: var(--fg); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem;
}
.site-menu { border-top: 1px solid var(--rule); }
.site-menu ul { list-style: none; padding-block: var(--s-3) var(--s-6); }
.site-menu li a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 56px; border-bottom: 1px solid var(--rule);
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--fg); text-decoration: none;
}
.site-menu li a .i { color: var(--fg-3); }
.site-menu li.menu-continue a { color: var(--mint); }
.site-menu li.menu-continue a .i { color: var(--mint); }

@media (max-width: 960px) {
  .site-nav, .account-link { display: none; }
  .menu-btn { display: inline-flex; }
  .header-actions { gap: var(--s-4); }
}
@media (max-width: 560px) {
  .header-row { gap: var(--s-3); min-height: 64px; padding-block: var(--s-2); }
  .brand { flex-direction: column; align-items: flex-start; gap: 2px; }
  .brand img { height: 32px; }
  .brand-text { max-width: 5.4rem; }
  .brand-name { font-size: 0.9375rem; }
  .brand-line { font-size: 0.6875rem; line-height: 1.3; }
  .header-actions { gap: var(--s-3); }
  .btn-tutor { font-size: 0.8125rem; padding: 0.3rem 0.55rem; min-height: var(--tap); }
  .btn-subscribe { font-size: 0.8125rem; padding: 0.3rem 0.7rem; min-height: var(--tap); }
  .btn-tutor .i { width: 1.15em; height: 1.15em; }
  .lang-switch, .menu-btn { font-size: 0.8125rem; }
}
@media (max-width: 420px) {
  .menu-btn .i { display: none; }
  .header-row { gap: var(--s-2); }
  .header-actions { gap: var(--s-2); }
}
/* 320 to 360 px: labels may wrap to two lines, never three, never icons alone */
@media (max-width: 360px) {
  .site-header .wrap { padding-inline: 12px; }
  .brand-text { max-width: 4.6rem; }
  .btn-tutor { padding-inline: 0.45rem; }
  .btn-tutor .i { display: none; }
  .btn-subscribe { padding-inline: 0.55rem; }
}

/* ===== 9. Breadcrumb, page head, meta ===== */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; list-style: none; font-size: var(--fs-small); color: var(--fg-3); }
.crumbs li { display: inline-flex; align-items: center; gap: 0.5rem; }
.crumbs li + li::before { content: "\203A"; color: var(--fg-3); }
.crumbs a { color: var(--fg-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.crumbs a:hover { color: var(--fg); border-bottom-color: var(--accent); }
.crumbs [aria-current] { color: var(--fg); font-weight: 600; }

.page-head { position: relative; overflow: hidden; isolation: isolate; padding-block: var(--s-6) var(--s-8); }
.page-head .wrap { position: relative; z-index: 1; }
/* 24ch on both sites since names are English-first (19 Nov 2026): an English name at 20ch broke into three lines on a phone */
.page-head h1 { margin-block: var(--s-5) var(--s-2); max-width: 24ch; }
html[lang="en"] .page-head h1 { max-width: 24ch; }
.page-head .lead { font-size: var(--fs-lead); color: var(--fg-2); max-width: var(--measure); margin-top: var(--s-4); }
/* the dark band on top of every inner page, about half as tall (owner, 23 Oct 2026:
   "the header for the subjects and things are too big they are taking half of the page") */
.page-head { padding-block: var(--s-4) var(--s-5); }
.page-head h1 { font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.6rem); margin-block: var(--s-3) var(--s-1); }
.page-head .other-name { font-size: var(--fs-body); line-height: 1.5; }
.page-head .meta-row { margin-top: var(--s-3); }
.page-head .lead { margin-top: var(--s-2); }
.page-head .bank-kicker, .page-head .rescue-head-kicker { margin-top: var(--s-3); }
.head-art { --h: 14rem; top: -2.5rem; }
.other-name { display: block; font-family: var(--font-text); font-weight: 500; font-size: var(--fs-lead); color: var(--fg-3); margin: 0; }
.other-name.subject-ar { color: var(--fg-2); font-weight: 600; }
/* names English-first (19 Nov 2026): an Arabic second line keeps to the page's own side, under its English name */
html[dir="rtl"] .nm-2[lang="ar"] { text-align: right; }
html[dir="ltr"] .nm-2[lang="ar"], html[dir="ltr"] .other-name[lang="ar"], html[dir="ltr"] .nm-other[lang="ar"] { text-align: left; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); list-style: none; margin-top: var(--s-5); font-size: var(--fs-small); color: var(--fg-2); }
.meta-item { display: inline-flex; align-items: center; gap: var(--s-2); }
.meta-item .i { color: var(--fg-3); width: 1.1em; height: 1.1em; }
.meta-item .code { font-size: var(--fs-meta); padding: 0.1rem 0.45rem; border: 1px solid var(--control); border-radius: var(--r); color: var(--fg); }
/* the ring and its ripples. --h sets the size; the ripples are centred on
   the ring's circle (44.6% down its box; the tail hangs below) */
.ring { fill: var(--accent); }
.ring-art { --h: 22rem; --w: calc(var(--h) * 0.8932); position: absolute; z-index: 0; width: var(--w); height: var(--h); pointer-events: none; }
.ring-art > .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-art > .contours { position: absolute; left: 50%; top: 44.6%; width: calc(var(--w) * 3.5); height: calc(var(--w) * 3.5); max-width: none; translate: -50% -50%; color: var(--accent); opacity: 0.42;
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent 100%); mask-image: radial-gradient(closest-side, #000 45%, transparent 100%); }
.head-art { --h: 22rem; top: -3.5rem; inset-inline-end: -4rem; }
.head-art > .ring { opacity: 0.92; }
body.tutor-open .head-art { display: none; }
@media (max-width: 1100px) { .head-art { display: none; } }
.contours { display: block; overflow: visible; }

/* ===== 10. Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: var(--btn-h); padding: 0.55rem 1.2rem; border-radius: var(--r);
  border: 1.5px solid transparent; background: transparent; color: var(--fg);
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.25;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn:hover { color: inherit; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-fg); }
.btn-secondary { border-color: var(--control); color: var(--fg); }
.btn-secondary:hover { border-color: var(--fg); background: var(--hover); color: var(--fg); }
.btn-link {
  min-height: var(--tap); padding-inline: 0; border: 0; color: var(--accent-fg);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em;
}
.btn-link:hover { color: var(--fg); }
.btn-small { min-height: 40px; padding: 0.35rem 0.85rem; font-size: 0.9375rem; }
.btn-main { min-height: var(--btn-h-main); padding-inline: 1.5rem; font-size: 1.0625rem; }
.btn-block { display: flex; width: 100%; }
.btn .i { width: 1.2em; height: 1.2em; }
.btn-primary .i-fwd { transition: transform var(--t-fast); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); }

/* ===== 11. Tags, states, strip ===== */
.tag {
  display: inline-flex; align-items: center; gap: 0.35em; padding: 0.12rem 0.5rem;
  border-radius: var(--r); font-size: var(--fs-meta); font-weight: 600; line-height: 1.55; white-space: nowrap;
}
.tag-free { background: var(--accent-tint); color: var(--accent-fg); }
.tag-soon { background: var(--quiet); color: var(--fg-3); }
.on-ink .tag-soon { background: var(--ink-3); color: var(--on-ink-2); }
.tag-count { background: var(--fg); color: var(--bg); font-family: var(--font-mono); }
/* a free subject (owner, 1 Nov 2026): its line under the name in the subject's header and on its row in the subjects list */
.free-line { display: inline-flex; align-items: center; gap: 0.4em; margin: var(--s-3) 0 0; font-size: var(--fs-small); font-weight: 700; line-height: 1.5; color: var(--accent-fg); }
.free-line .i { width: 1.1em; height: 1.1em; }
.index-name .free-line { align-self: flex-start; margin-top: var(--s-1); }

.state { display: inline-flex; align-items: center; gap: 0.4em; font-size: var(--fs-small); font-weight: 600; line-height: 1.3; color: var(--fg-3); white-space: nowrap; }
.state .i { width: 1.15em; height: 1.15em; }
.state-in-progress { color: var(--accent-fg); }
.state-answered { color: var(--review); }
.state-completed { color: var(--ok); }
.state-locked, .state-locked-ended, .state-not-started { color: var(--fg-3); }

.strip { display: flex; gap: 3px; align-items: stretch; height: 10px; margin-block: var(--s-3); }
.strip i { flex: 1 1 0; min-width: 3px; max-width: 26px; border-radius: 1px; box-shadow: inset 0 0 0 1.5px var(--control); }
.strip i.c { background: var(--ok); box-shadow: none; }
.strip i.r { background: var(--review-mark); box-shadow: none; }
.strip i.p { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
[dir="rtl"] .strip i.p { background: linear-gradient(270deg, var(--accent) 50%, transparent 50%); }
.strip i.l { box-shadow: none; background: repeating-linear-gradient(135deg, var(--control) 0 1.5px, transparent 1.5px 4px); opacity: 0.75; }
.strip-tall { height: 14px; }
/* 40 marks or more (pages/home.js STRIP_DENSE_FROM): 1 px apart and as thin as 1 px, so even 150 marks fit a
   300 px card; at 3 px each with 3 px between, 69 marks needed 411 px and ran out of the card (13 Nov 2026) */
.strip-dense { gap: 1px; }
.strip-dense i { min-width: 1px; }

/* ===== 12. Notices ===== */
.notice {
  display: flex; align-items: flex-start; gap: var(--s-3);
  margin-block: var(--s-4); padding: var(--s-3) var(--s-4);
  background: var(--quiet); border-inline-start: var(--rule-heavy) solid var(--accent); border-radius: var(--r);
  font-size: var(--fs-small); color: var(--fg);
}
.notice > .i { margin-top: 0.2em; color: var(--accent-fg); }
.notice p { margin: 0; }
.notice-warn { background: var(--review-tint); border-inline-start-color: var(--review-mark); }
.notice-warn > .i { color: var(--review); }
.notice-ok { background: var(--ok-tint); border-inline-start-color: var(--ok); }
.notice-ok > .i { color: var(--ok); }
.notice .btn-link { min-height: 0; }

/* ===== 13. Blocks and section heads ===== */
.block { padding-block: var(--section); }
.block + .block { padding-top: 0; }
.block-head { display: flex; align-items: baseline; gap: var(--s-4); padding-top: var(--s-4); border-top: var(--rule-heavy) solid var(--heavy-rule, var(--fg)); margin-bottom: var(--s-6); }
.block-head h2 { flex: 1; }
.block-head .aside { color: var(--fg-3); font-size: var(--fs-small); }
.section-rule { border: 0; border-top: var(--rule-heavy) solid var(--fg); margin: 0; }

/* ===== 14. Forms ===== */
.field { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.field label, .label { font-weight: 700; font-size: var(--fs-small); color: var(--fg); }
.field .hint { font-size: var(--fs-small); color: var(--fg-3); margin: 0; }
.field .optional { font-weight: 500; color: var(--fg-3); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0.7rem 0.9rem;
  background: var(--raised); border: 1.5px solid var(--control); border-radius: var(--r);
  font-size: 1rem; line-height: 1.4; color: var(--fg);
}
.field textarea { min-height: 7rem; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--fg); }
.field .error { display: flex; gap: var(--s-2); align-items: center; color: var(--bad); font-size: var(--fs-small); font-weight: 600; margin: 0; }
.field.has-error input { border-color: var(--bad); }
.ltr-input { direction: ltr; text-align: left; }
.inline-form { display: flex; gap: var(--s-2); align-items: stretch; }
.inline-form .input { flex: 1; min-width: 0; }

/* ===== 15. Disclosure ===== */
.sheet { background: var(--raised); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow-sheet); }
.disclosure { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.disclosure + .disclosure { border-top: 0; }
.disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 60px; padding-block: var(--s-3); cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .sum-icon { position: relative; width: 1.1rem; height: 1.1rem; flex: none; }
.disclosure > summary .sum-icon::before, .disclosure > summary .sum-icon::after {
  content: ""; position: absolute; inset: 50% 0 auto; height: 2px; margin-top: -1px; background: currentColor; border-radius: 1px;
}
.disclosure > summary .sum-icon::after { transform: rotate(90deg); transition: transform var(--t); }
.disclosure[open] > summary .sum-icon::after { transform: rotate(0deg); }
.disclosure > .disclosure-body { padding-bottom: var(--s-5); }

/* ===== 16. Tutor panel ===== */
.tutor-panel {
  position: fixed; inset-block: 0; right: 0; left: auto; z-index: var(--z-panel);   /* always on the right, in Arabic and English (owner, 18 Oct 2026) */
  width: var(--panel-use); max-width: 100%;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  border-left: var(--rule-heavy) solid var(--frame);
}
.tutor-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
.tutor-head h2 { display: flex; align-items: center; gap: var(--s-2); font-size: 1.25rem; }
.tutor-head h2 .i { color: var(--mint); }
.tutor-body { flex: 1; overflow-y: auto; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.tutor-intro { color: var(--fg-2); font-size: var(--fs-small); margin: 0; }
.tutor-context { display: flex; gap: var(--s-2); align-items: center; margin: 0; padding: var(--s-2) var(--s-3); background: var(--accent-tint); color: var(--accent-fg); border-radius: var(--r); font-size: var(--fs-small); font-weight: 600; }
/* one area, one background (owner, 31 Oct 2026: «remove the answer white square, make everything in one area or color
   background»): a message is text on the panel's own background, with no card, border or shadow. The student's question
   is a small line above its answer, and a thin rule ends a turn: spacing and a rule, not boxes. */
.tutor-log { display: flex; flex-direction: column; gap: 0; }
.tutor-msg { max-width: 100%; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; font-size: var(--fs-small); line-height: 1.75; }
.tutor-msg p { margin: 0 0 var(--s-2); }
.tutor-msg p:last-child { margin: 0; }
.tutor-msg.user { padding: var(--s-4) 0 var(--s-2); border-top: 1px solid var(--rule); color: var(--fg-2); font-size: var(--fs-meta); font-weight: 600; }
.tutor-msg.user:first-child { padding-top: var(--s-2); border-top: 0; }
.tutor-msg.bot { padding: 0 0 var(--s-4); }
.tutor-msg .source { display: inline-flex; gap: var(--s-2); align-items: center; margin-top: var(--s-2); font-size: var(--fs-meta); font-weight: 600; }
.tutor-form { padding: var(--s-3) var(--s-4) var(--s-2); border-top: 1px solid var(--rule); display: grid; gap: var(--s-2); }
.tutor-form label { font-weight: 700; font-size: var(--fs-small); }
.tutor-form .row { display: flex; gap: var(--s-2); align-items: flex-end; }
.tutor-form textarea { flex: 1; min-height: 52px; max-height: 8rem; padding: 0.6rem 0.8rem; border: 1.5px solid var(--control); border-radius: var(--r); background: transparent; resize: none; }
.tutor-left { padding: 0 var(--s-4) var(--s-3); margin: 0; font-size: var(--fs-meta); color: var(--fg-3); }
body.tutor-open { padding-right: var(--panel-use); }
@media (max-width: 760px) {
  .tutor-panel { inset-block: auto 0; left: 0; right: 0; width: 100%; height: var(--panel-h); border-left: 0; border-top: var(--rule-heavy) solid var(--frame); }
  body.tutor-open { padding-right: 0; padding-bottom: var(--panel-h); }
  .tutor-intro { display: none; }
  .tutor-form textarea { min-height: 48px; height: 48px; }
  .tutor-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ===== 17. Footer ===== */
.site-footer { --bg: var(--frame-deep); position: relative; overflow: hidden; isolation: isolate; padding-block: var(--s-8) var(--s-7); }
.footer-grid { position: relative; z-index: 1; display: grid; gap: var(--s-6); grid-template-columns: auto 1fr; align-items: start; }
.footer-grid img { height: 54px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); list-style: none; }
.footer-links a { display: inline-flex; min-height: var(--tap); align-items: center; color: var(--fg); text-decoration: none; font-family: var(--font-display); font-weight: 600; border-bottom: 2px solid transparent; }
.footer-links a:hover { border-bottom-color: var(--mint); }
.footer-line { grid-column: 1 / -1; margin: 0; padding-top: var(--s-5); border-top: 1px solid var(--rule); color: var(--fg-3); font-size: var(--fs-small); max-width: none; }
.site-footer { background-image: var(--grain), radial-gradient(80% 120% at var(--glow-x) 120%, rgba(78, 217, 164, 0.09), transparent 60%); }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(78, 217, 164, 0.5), transparent); }
.footer-art { --h: 24rem; inset-inline-end: -5rem; bottom: -13rem; }
.footer-art > .ring { opacity: 0.22; }
.footer-art > .contours { opacity: 0.22; }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 0; }
  /* the ring never sits behind text: on phones text runs the full width */
  .footer-art, .head-art { display: none; }
}

/* ===== 18. The entrance: one orchestrated page load =====
   The owner's call (28 Sep 2026): a single staged reveal when a page opens.
   CSS only, transform and opacity (plus the ring's sweep), finished in about
   a second and a half, never on scroll, never repeated. With reduced motion
   nothing runs and everything is simply there. */
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 360deg; }
@keyframes mw-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes mw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mw-ripple { from { opacity: 0; scale: 0.9; } }
@keyframes mw-draw { from { --sweep: 0deg; } to { --sweep: 360deg; } }

@media (prefers-reduced-motion: no-preference) {
  .site-header .header-row { animation: mw-fade 600ms var(--ease-out) both; }
  .hero-title > span, .hero-tag, .hero-actions, .page-head .wrap > * { animation: mw-rise var(--enter) var(--ease-out) both; }
  .hero-title > span:nth-child(1) { animation-delay: 120ms; }
  .hero-title > span:nth-child(2) { animation-delay: 230ms; }
  .hero-tag { animation-delay: 380ms; }
  .hero-actions { animation-delay: 480ms; }
  .page-head .wrap > :nth-child(1) { animation-delay: 60ms; }
  .page-head .wrap > :nth-child(2) { animation-delay: 140ms; }
  .page-head .wrap > :nth-child(3) { animation-delay: 220ms; }
  .page-head .wrap > :nth-child(4) { animation-delay: 300ms; }
  .page-head .wrap > :nth-child(n+5) { animation-delay: 380ms; }
  /* the signature: the ring draws itself, then its ripples settle */
  .hero-art > .ring, .head-art > .ring {
    -webkit-mask: conic-gradient(from 212deg, #000 var(--sweep), transparent 0);
    mask: conic-gradient(from 212deg, #000 var(--sweep), transparent 0);
    animation: mw-draw 1300ms var(--ease-out) 180ms both;
  }
  .hero-art > .contours, .head-art > .contours { animation: mw-ripple 1600ms var(--ease-out) 300ms both; }
  main > :nth-child(2) { animation: mw-fade 700ms var(--ease-out) 440ms both; }
}

/* ===== 19. Motion preference and print ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .tutor-panel, .site-menu { display: none !important; }
  .on-ink { background: none !important; color: #000 !important; }
}

/* mwasel.study · page layouts (proposal, 28 Sep 2026). Tokens and shared
   components are in design.css. Every grid collapses to one column under
   900 px; nothing here uses physical left/right. */

/* ===== Home: hero ===== */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6); align-items: center;
  min-height: min(620px, calc(100svh - 72px)); padding-block: var(--s-8) var(--s-9);
}
.hero-title { font-size: var(--fs-hero); line-height: var(--lh-display); font-weight: 800; }
.hero-title > span { display: block; }
.hero-title .hl { color: var(--accent-fg); }
.hero-tag { font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem); line-height: 1.75; color: var(--fg-2); max-width: 44ch; margin: var(--s-5) 0 0; }
html[lang="en"] .hero-tag { max-width: 40ch; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6); margin-top: var(--s-6); }
.hero-alt { color: var(--fg); font-weight: 600; text-decoration-color: var(--mint); }
.hero-alt:hover { color: var(--mint); }
.hero-art { --h: 44rem; top: -4.5rem; inset-inline-end: -7rem; }
.hero-art > .contours { opacity: 0.5; }
.hero .hero-grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }

/* ===== Home: how you study ===== */
.how-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-8); align-items: start; }
.rail { list-style: none; margin-top: var(--s-6); }
.rail li { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--s-4); padding-bottom: var(--s-6); }
.rail li::before { content: ""; position: absolute; inset-inline-start: calc(1.5rem - 1px); top: 3.25rem; bottom: 0.25rem; width: 2px; background: var(--rule); }
.rail li:last-child { padding-bottom: 0; }
.rail li:last-child::before { display: none; }
.rail-mark { width: 3rem; height: 3rem; border-radius: 50%; background: var(--frame); color: var(--mint); display: grid; place-items: center; }
.rail-mark .i { width: 1.35rem; height: 1.35rem; }
.rail h3 { font-size: 1.25rem; margin-top: 0.55rem; }
.rail p { color: var(--fg-2); margin: var(--s-2) 0 0; }
.demo-stage { aspect-ratio: 16 / 9; border-radius: var(--r); display: grid; place-content: center; justify-items: center; gap: var(--s-3); }
.demo-stage .play-disc { width: 3.75rem; height: 3.75rem; }
.demo-stage .play-disc .i { width: 1.5rem; height: 1.5rem; }
.demo-cap { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; margin: 0; }
.demo .q { border: 0; padding: var(--s-4) var(--s-2) var(--s-1); background: none; }
.demo .opt { min-height: 48px; cursor: default; }
.pull { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.25rem); line-height: 1.45; max-width: 24ch; margin: var(--s-8) 0 0; }
html[lang="en"] .pull { line-height: 1.25; max-width: 28ch; }
.pen { display: inline-block; padding: 0.16em 0.5em 0.26em; margin-block: -0.2em; background: url("circle-2.webp") center / 100% 100% no-repeat; }

/* ===== Home: Level tests door ===== */
.door-band { background: var(--gold); color: var(--ink); }
.door { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-6); padding-block: var(--s-7); color: var(--ink); text-decoration: none; }
.door:hover { color: var(--ink); }
.door:focus-visible { outline-color: var(--ink); outline-offset: -6px; }
.door-title { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.75rem); line-height: 1.15; color: var(--ink); }
.door-line { display: block; font-size: var(--fs-lead); margin-top: var(--s-2); color: var(--ink); }
.door-go { width: 4.25rem; height: 4.25rem; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: var(--r); transition: background-color var(--t-fast), color var(--t-fast); }
.door-go .i { width: 1.75rem; height: 1.75rem; }
.door:hover .door-go { background: var(--ink); color: var(--gold); }

/* ===== Subject index (Home, All subjects) ===== */
.index { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-7); }
.index-1col { grid-template-columns: minmax(0, 1fr); }
.index > li { border-bottom: 1px solid var(--rule); }
.index-row {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto 1.5rem; align-items: center; gap: var(--s-4);
  min-height: 92px; padding: var(--s-4) var(--s-3); color: var(--fg); text-decoration: none;
  transition: background-color var(--t-fast);
}
.index-row:hover { background: var(--hover); color: var(--fg); }
.index-row .code { color: var(--fg-3); font-size: var(--fs-meta); }
.index-row .kind { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--gold-ink); font-size: var(--fs-meta); font-weight: 700; }
.index-name { display: flex; flex-direction: column; min-width: 0; }
.index-name .nm { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.4; }
/* a subject's Arabic name under its English one (the owner, 19 Nov 2026: "the arabic more visable than the current english subtitle") */
.index-name .nm-other { font-family: var(--font-text); font-size: var(--fs-body); font-weight: 600; color: var(--fg-2); line-height: 1.5; }
.index-row .i-fwd { color: var(--fg-3); transition: transform var(--t-fast); }
.index-row:hover .i-fwd { color: var(--fg); transform: translateX(4px); }
[dir="rtl"] .index-row:hover .i-fwd { transform: scaleX(-1) translateX(4px); }
.index-foot { margin-top: var(--s-6); }
.index-status .tag-free { font-size: var(--fs-small); }

/* ===== Home: the offer (price block) ===== */
.offer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-8); align-items: center; padding-block: var(--s-7); border-top: var(--rule-heavy) solid var(--fg); border-bottom: 1px solid var(--rule); }
.price { display: flex; align-items: flex-start; gap: var(--s-3); font-family: var(--font-display); font-weight: 900; line-height: 0.82; color: var(--fg); }
.price-num { font-size: var(--fs-numeral); letter-spacing: -0.03em; }
.price-unit { font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem); line-height: 1; margin-top: 0.25em; }
.price-until { display: flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); margin: 0 0 var(--s-3); }
.price-until .i { color: var(--accent-fg); }
.offer-line { font-size: var(--fs-lead); color: var(--fg-2); max-width: 44ch; margin: 0 0 var(--s-5); }

/* ===== All subjects: finder ===== */
.finder { display: grid; gap: var(--s-4); margin-top: var(--s-6); max-width: 46rem; }
.search { position: relative; }
.search .i { position: absolute; inset-inline-start: 1rem; top: 50%; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
.search .input { padding-inline-start: 3rem; min-height: 56px; font-size: 1.0625rem; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.filter {
  min-height: var(--tap); padding: 0.4rem 1rem; border: 1.5px solid var(--control); border-radius: var(--r);
  background: transparent; color: var(--fg); font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; cursor: pointer;
}
.filter[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.no-match { padding: var(--s-6) 0; color: var(--fg-2); }

/* ===== Subject page ===== */
.subject-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-7); align-items: end; }
.progress-panel { background: var(--ink-2); border-top: var(--rule-heavy) solid var(--accent); border-radius: var(--r); padding: var(--s-5); }
.progress-panel .progress-words { margin: 0; font-weight: 600; }
.progress-panel .btn { margin-top: var(--s-4); }
.progress-panel .note { margin: var(--s-3) 0 0; font-size: var(--fs-small); color: var(--fg-3); }
/* the students line (pages/subject.js studentsNote): the icon beside its words, not above them */
.progress-panel .side-students { display: flex; align-items: center; gap: var(--s-2); }
.subject-body { padding-block: var(--s-7) var(--section); }
.offer-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-6); padding: var(--s-4) var(--s-5); background: var(--quiet); border-inline-start: var(--rule-heavy) solid var(--accent); border-radius: var(--r); }
.offer-strip p { margin: 0; display: flex; gap: var(--s-3); align-items: flex-start; max-width: 60ch; }
.offer-strip .i { margin-top: 0.25em; color: var(--fg-3); }
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-6); }
.jump-label { font-family: var(--font-display); font-weight: 700; margin-inline-end: var(--s-3); }
.jump a {
  min-width: 3.25rem; height: 3.25rem; padding-inline: var(--s-2); display: grid; place-items: center;
  border: 1.5px solid var(--control); border-radius: var(--r); color: var(--fg); text-decoration: none;
  font-family: var(--font-display); font-weight: 800; font-size: 1.1875rem; transition: background-color var(--t-fast), color var(--t-fast);
}
.jump a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chapter { margin-top: var(--s-8); padding-top: var(--s-5); border-top: var(--rule-heavy) solid var(--heavy-rule, var(--fg)); scroll-margin-top: var(--s-5); }
.chapter-head { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(12rem, auto); gap: var(--s-5); align-items: end; margin-bottom: var(--s-5); }
.chapter-num { font-family: var(--font-display); font-weight: 900; font-size: clamp(4rem, 2.6rem + 5vw, 7.5rem); line-height: 0.8; letter-spacing: -0.03em; color: var(--fg); }
.chapter-kicker { display: block; font-family: var(--font-text); font-weight: 700; font-size: var(--fs-small); color: var(--fg-3); }
.chapter-name { display: block; font-size: var(--fs-h2); line-height: 1.3; }
.chapter-progress { text-align: end; font-size: var(--fs-small); color: var(--fg-2); }
.chapter-progress .strip { justify-content: flex-end; margin: var(--s-2) 0 0; }
.concepts { list-style: none; border-top: 1px solid var(--rule); }
.concept-row {
  position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 17rem 5.5rem; align-items: center; gap: var(--s-4);
  min-height: 64px; padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--rule); transition: background-color var(--t-fast);
}
.concept-row:hover { background: var(--hover); }
.concept-row.is-current { background: var(--accent-tint); }
.c-pos { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-meta); color: var(--fg-3); }
.c-name { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.5; color: var(--fg); text-decoration: none; }
.c-name::after { content: ""; position: absolute; inset: 0; }
.c-name:hover { color: var(--fg); }
.c-min { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--fg-3); }
.c-min .i { width: 1rem; height: 1rem; }
.c-tag { justify-self: end; }
.c-meta { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.concept-row.is-locked .c-name { color: var(--fg-2); }
/* the chapter's videos still to come (owner, 31 Oct 2026): after the published ones, a line that says how many, then each
   title greyed with «قريباً» and no link (pages/subject.js, pages/concept.js chapterList) */
.coming-line { margin: var(--s-5) 0 var(--s-2); padding-inline: var(--s-2); font-size: var(--fs-small); font-weight: 700; color: var(--fg-2); }
.concept-row.is-coming:hover { background: none; }
.concept-row.is-coming .c-name { font-weight: 500; color: var(--fg-3); }
.concept-row.is-coming .c-name::after { content: none; }
.concept-row.is-coming .c-meta { grid-template-columns: minmax(0, 1fr); }
/* a chapter page's rows are videos, not chapters (the owner, 13 Nov 2026: students took them for chapters): a play disc
   where the number was, «فيديو N» over each name, and the list's own title «فيديوهات الشابتر N» (pages/subject.js).
   The play sign points right in both languages, as on every player. */
.c-play { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--fg); color: var(--bg); }
.c-play .i { width: 0.75rem; height: 0.75rem; transform: translateX(1px); }
.concept-row.is-locked .c-play, .concept-row.is-coming .c-play, .concept-row.is-not-required .c-play { background: var(--quiet); color: var(--fg-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.concept-row.is-current .c-play { background: var(--mint); color: var(--ink); box-shadow: none; }
.c-kicker { display: block; font-family: var(--font-text); font-weight: 700; font-size: var(--fs-small); line-height: 1.5; color: var(--mint-ink); }
.concept-row.is-coming .c-kicker { color: var(--fg-3); }
.chapter-videos-title { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); font-size: var(--fs-h3); }
.chapter-videos-title .i { color: var(--mint-ink); }
@media (max-width: 640px) {
  .c-play { width: 1.75rem; height: 1.75rem; }
}
.book-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); padding: var(--s-6); background: var(--quiet); border-radius: var(--r); }
.book-box h3 { font-size: 1.1875rem; margin-bottom: var(--s-3); display: flex; gap: var(--s-2); align-items: center; }
.book-box .hint { font-size: var(--fs-small); color: var(--fg-3); margin: 0 0 var(--s-3); }

/* coming soon: the ring only partly drawn */
.coming { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); align-items: center; padding-block: var(--section); }
.coming-art { position: relative; width: min(100%, 24rem); aspect-ratio: 1; display: grid; place-items: center; }
.coming-art .ring { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask: conic-gradient(from 210deg, #000 0 58%, transparent 58% 100%); mask: conic-gradient(from 210deg, #000 0 58%, transparent 58% 100%); }
.coming-word { position: relative; font-family: var(--font-display); font-weight: 900; font-size: clamp(3rem, 2rem + 4vw, 5.25rem); line-height: 1; }
.coming-copy p { font-size: var(--fs-lead); color: var(--fg-2); max-width: 36ch; }

/* ===== Concept page ===== */
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.lesson > * + * { margin-top: var(--s-8); }
.lesson > .under-stage, .lesson > .lang-line { margin-top: var(--s-3); }
/* under the lesson's video (or its lock): the dossier at the lesson's chapter (owner, 30 Oct 2026) */
.lesson > .dossier-read { margin-top: var(--s-3); }
.dossier-read { margin: 0; }
/* the line, the video, its buttons and the feedback form: one block with its own small gaps, so anything slipped in beside the video never takes the lesson's large gap (owner, 24 Oct 2026) */
.lesson-video { display: flex; flex-direction: column; gap: var(--s-3); }
.lesson-video > * { margin-block: 0; }
.lang-line { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--fg-2); margin: 0; }
.lang-line .i { color: var(--fg-3); }
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; isolation: isolate; }
.video-play {
  position: absolute; inset: 0; width: 100%; z-index: 1;
  display: grid; place-content: center; justify-items: center; gap: var(--s-4); padding: var(--s-5);
  background: transparent; border: 0; color: var(--fg); cursor: pointer; font: inherit;
}
.play-disc { width: 5.5rem; height: 5.5rem; border-radius: var(--r-round); background: var(--mint); color: var(--ink); display: grid; place-items: center; transition: transform var(--t-fast); }
.play-disc .i { width: 2.25rem; height: 2.25rem; margin-left: 0.3rem; }
.video-play:hover .play-disc { transform: scale(1.05); }
.play-label { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.4; max-width: 28ch; text-align: center; }
.play-dur { font-family: var(--font-mono); color: var(--fg-3); font-size: var(--fs-meta); }
/* a guest's video (the owner, 13 Nov 2026): the play button is a link to Google's sign-in, under it the emailed code;
   the subject page's offer strip and «وضع الإنقاذ» card come after the chapters and the test banks */
a.video-play { text-decoration: none; }
/* the dossier beside the video on a wide screen (the owner, 13 Nov 2026): docked on the left (the tutor's panel is on
   the right), the page making room for it; its width is the student's (site.js besideDossier), never under 360 px
   nor over 60% of the window, and the lesson keeps 600 px at least (700 left no room on an iPad in landscape) */
:root { --beside-w: 46vw; --beside-use: clamp(360px, var(--beside-w), min(60vw, calc(100vw - 600px))); }
.beside { position: fixed; inset-block: 0; left: 0; right: auto; z-index: var(--z-panel); width: var(--beside-use); max-width: 100%; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); border-right: var(--rule-heavy) solid var(--frame); box-shadow: var(--shadow-lift); }
.beside[hidden] { display: none; }
.beside-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--rule); }
.beside-title { display: flex; align-items: center; gap: var(--s-2); margin: 0; margin-inline-end: auto; font-family: var(--font-display); font-weight: 700; }
.beside-title .i { color: var(--mint); }
.beside-close { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: var(--r-round); background: transparent; color: var(--fg); cursor: pointer; }
.beside-close:hover, .beside-close:focus-visible { background: var(--quiet); }
.beside-close .i { width: 1.25rem; height: 1.25rem; }
.beside-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: var(--bg); }
.beside-resize { position: absolute; inset-block: 0; right: -18px; width: 24px; z-index: 3; cursor: col-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
/* a finger on an iPad (the owner, 14 Nov 2026: "the slider is hard to press"): a 48 px wide grip and a bigger pill */
@media (pointer: coarse) {
  .beside-resize { right: -30px; width: 48px; }
  .beside-resize::after { right: 12px; width: 16px; height: 88px; margin-top: -44px; border-width: 2px; }
}
.beside-resize::after { content: ""; position: absolute; top: 50%; right: 2px; width: 8px; height: 46px; margin-top: -23px; box-sizing: border-box; border: 1px solid var(--control); border-radius: var(--r-round); background: var(--raised); }
.beside-resize:hover::after, .beside-resize:focus-visible::after, body.beside-resizing .beside-resize::after { background: var(--mint); border-color: var(--mint-ink); }
body.beside-open { padding-left: var(--beside-use); }
body.beside-open .lesson-grid { grid-template-columns: minmax(0, 1fr); }
body.beside-open .chapter-aside { position: static; }
body.beside-open .site-nav { display: none; }
body.beside-resizing { cursor: col-resize; -webkit-user-select: none; user-select: none; }
body.beside-resizing .beside-frame { pointer-events: none; }
@media (max-width: 1099px) { .beside { display: none; } body.beside-open { padding-left: 0; } }
/* the reader alone in that panel (?embed=1): no site header or footer, a slimmer bar */
body.is-embed { min-height: 0; }
.reader-embed { padding: 0 var(--s-3) var(--s-6); }
.reader-embed .reader-scroll { margin-top: var(--s-3); }
.reader-embed .reader-page { scroll-margin-top: 3.5rem; }
/* no page number on a dossier's page (the owner, 14 Nov 2026): the page's own white over the printed number, in
   both bottom corners (pages/digital.js pageHtml) */
.reader-num-mask { position: absolute; top: 95.8%; height: 3%; background: #fff; pointer-events: none; z-index: 1; }
.reader-num-mask.l { left: 5%; width: 6.5%; }
.reader-num-mask.r { left: 90%; width: 6.2%; }
/* a chapter's bank: a button under the page with its box (the owner, 14 Nov 2026) */
.reader-bank-cta { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin: calc(-1 * var(--s-1)) 0 var(--s-2); }
.reader-bank-cta .btn { gap: var(--s-2); }
/* «روح على شابتر» in the reader's bar (13 Nov 2026) */
.reader-chap { width: auto; max-width: 16rem; min-height: 2.25rem; padding-block: 0; font-size: var(--fs-small); text-overflow: ellipsis; }
/* «الدوسيات» (13 Nov 2026) */
.dossiers-lead { max-width: 46rem; margin: 0 0 var(--s-5); }
.dossiers-list .tag + .tag { margin-inline-start: var(--s-2); }
.dossiers-printed { margin: var(--s-5) 0 0; font-weight: 700; }
.dossiers-printed a { display: inline-flex; align-items: center; gap: var(--s-2); }
/* a question already answered, shown fresh (the owner, 13 Nov 2026): its old answer folded until opened */
.q-prev { margin-top: var(--s-3); }
.q-prev > summary { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; list-style: none; color: var(--fg-2); font-size: var(--fs-small); font-weight: 700; }
.q-prev > summary::-webkit-details-marker { display: none; }
.q-prev > summary .i { width: 1.1em; height: 1.1em; }
.q-prev-body { margin-top: var(--s-2); padding: var(--s-3) var(--s-4); background: var(--quiet); border-radius: var(--r); }
.q-prev-verdict { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-2); font-weight: 700; }
.q-prev-opt { display: flex; gap: var(--s-2); margin: 0 0 var(--s-1); }
.q-prev-opt.is-wrong { color: var(--red, #B23B2E); text-decoration: line-through; }
.q-prev-opt.is-right { color: var(--mint-ink); font-weight: 700; }
/* sign-in (13 Nov 2026): the email box's hint, and the open-in-browser page's second way (the emailed code) */
.email-hint { margin: var(--s-2) 0 0; color: var(--fg-2); }
.ob-stay { margin-top: var(--s-3); }
.ob-stay-line { margin: var(--s-2) 0 0; text-align: center; }
.guest-stage .play-note { display: inline-flex; align-items: center; gap: var(--s-2); }
.guest-stage .play-note .i { width: 1.1em; height: 1.1em; }
.guest-play-alt { margin: var(--s-2) 0 0; text-align: center; font-size: var(--fs-small); }
.subject-extra { margin-top: var(--s-6); }
.stage-ring { position: absolute; z-index: 0; inset-inline-end: -6%; bottom: -34%; height: 88%; width: auto; opacity: 0.16; pointer-events: none; }
.under-stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
/* a student's word on the lesson (19 Oct 2026) */
.under-stage-btns { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.under-stage-btns [aria-expanded="true"] { border-color: var(--fg); }
.lesson-video > .feedback { padding: var(--s-4); border: 1px solid var(--rule); border-radius: var(--r); background: var(--raised); }
.feedback-title { display: flex; align-items: center; gap: var(--s-2); font-weight: 700; color: var(--fg); }
.feedback-title .i { width: 1.1em; height: 1.1em; }
.feedback-hint { margin: var(--s-1) 0 var(--s-3); font-size: var(--fs-small); color: var(--fg-3); }
.feedback textarea { width: 100%; min-height: 4.5rem; padding: 0.6rem 0.8rem; background: var(--bg); border: 1.5px solid var(--control); border-radius: var(--r); font-size: 1rem; line-height: 1.5; color: var(--fg); resize: vertical; }
.feedback textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--fg); }
.feedback-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }
.feedback-msg { margin: 0; font-size: var(--fs-small); font-weight: 600; color: var(--bad); }
.feedback-msg.is-sent { color: var(--ok, var(--mint-ink)); }
.stage-coming { display: grid; place-content: center; justify-items: center; gap: var(--s-3); height: 100%; text-align: center; }
.stage-coming .ring { width: 7rem; height: auto; -webkit-mask: conic-gradient(from 210deg, #000 0 58%, transparent 58% 100%); mask: conic-gradient(from 210deg, #000 0 58%, transparent 58% 100%); }
.lesson h2 { font-size: var(--fs-h2); padding-top: var(--s-4); border-top: var(--rule-heavy) solid var(--heavy-rule, var(--fg)); margin-bottom: var(--s-5); }
.idea-text { font-size: var(--fs-lead); line-height: 1.95; margin: 0 0 var(--s-5); }
html[lang="en"] .idea-text[lang="en"] { line-height: 1.65; }
.formulas { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5); background: var(--quiet); border-inline-start: var(--rule-heavy) solid var(--accent); border-radius: var(--r); }
.formulas h3, .watch h3 { display: flex; align-items: center; gap: var(--s-2); font-size: 1.0625rem; margin-bottom: var(--s-3); }
.formulas ol { list-style: none; display: grid; gap: var(--s-2); direction: ltr; text-align: left; font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.6; }
.watch ul { list-style: none; display: grid; gap: var(--s-3); }
.watch li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: var(--s-3); }
.watch li .i { color: var(--review-mark); margin-top: 0.3em; }
.watch h3 .i { color: var(--review); }
.ask-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-5); }

/* questions */
.check-list { display: grid; gap: var(--s-5); }
/* a question card never widens its grid past the phone: a wide table or figure scrolls inside it */
.check-list > .q { min-width: 0; }
.q { background: var(--raised); border: 1px solid var(--rule); border-radius: var(--r); padding: var(--s-5); scroll-margin-top: var(--s-5); }
.q-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-4); }
.q-title { font-size: 1.0625rem; font-weight: 800; }
.q-stem { font-family: "Public Sans", var(--font-text); font-size: 1.125rem; line-height: 1.6; margin: 0 0 var(--s-4); }
.q-stem[dir="ltr"] { text-align: left; }
.opts { display: grid; gap: var(--s-2); }
.opt {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 1.5rem; align-items: center; gap: var(--s-3);
  width: 100%; min-height: 56px; padding: var(--s-2) var(--s-3); text-align: start;
  background: var(--bg); border: 1.5px solid var(--control); border-radius: var(--r); cursor: pointer;
  font-family: "Public Sans", var(--font-text); font-size: 1rem; line-height: 1.45; color: var(--fg);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.opt:hover:not([disabled]) { border-color: var(--fg); background: var(--hover); }
.opt-key { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 1.5px solid var(--control); border-radius: var(--r); font-family: var(--font-mono); font-weight: 600; font-size: 0.9375rem; }
.opt-mark { width: 1.35rem; height: 1.35rem; fill: currentColor; }
.opt[disabled] { cursor: default; }
.opt[disabled]:not(.opt-wrong):not(.opt-correct) { opacity: 0.55; }
.opt-wrong { border-color: var(--bad); background: var(--bad-tint); }
.opt-wrong .opt-text { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--fg-2); }
.opt-wrong .opt-key { border-color: var(--bad); color: var(--bad); }
.opt-wrong .opt-mark { color: var(--bad); }
.opt-correct { border-color: var(--ok); background: var(--ok-tint); }
.opt-correct .opt-key { border-color: transparent; color: var(--ok); font-weight: 700; background: url("circle-2.webp") center / 128% 128% no-repeat; }
.opt-correct .opt-mark { color: var(--ok); }
.fb { margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--r); background: var(--quiet); border-inline-start: var(--rule-heavy) solid var(--fg-3); }
.fb-wrong { background: var(--bad-tint); border-inline-start-color: var(--bad); }
.fb-correct { background: var(--ok-tint); border-inline-start-color: var(--ok); }
.fb-shown { background: var(--review-tint); border-inline-start-color: var(--review-mark); }
.fb-verdict { display: flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; margin: 0 0 var(--s-2); }
.fb-verdict .i { width: 1.3em; height: 1.3em; }
.fb-wrong .fb-verdict { color: var(--bad); }
.fb-correct .fb-verdict { color: var(--ok); }
.fb-shown .fb-verdict { color: var(--review); }
.fb-note, .fb-expl { margin: 0 0 var(--s-2); }
/* a calculation inside an essay question's Arabic solution: one left-to-right piece (essay.js calcParts).
   A box of its own, so a line break never splits it into two halves in the wrong order; a long one wraps inside it */
.fb-expl .calc { direction: ltr; unicode-bidi: isolate; display: inline-block; max-width: 100%; }

.fb-try { font-weight: 700; margin: var(--s-3) 0 0; }
.fb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); padding: var(--s-4) var(--s-5); background: var(--frame); color: var(--on-ink); border-radius: var(--r); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); }
.result-marks { display: flex; gap: var(--s-2); }
.result-marks .i { width: 1.6rem; height: 1.6rem; }
.result .ok { color: var(--mint); } .result .shown { color: var(--gold-on-ink); } .result .bad { color: var(--red-on-ink); }

/* the way on */
.concept-nav { display: grid; gap: var(--s-3); }
/* the next video: a big card in the brand's bright green, the main buttons'
   colour (owner, 17 Oct 2026: the dark bar was not read as the next step) */
.next-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4);
  min-height: 96px; padding: var(--s-4) var(--s-5); border-radius: var(--r); background: var(--mint); color: var(--ink);
  text-decoration: none; box-shadow: 0 10px 24px -14px rgba(10, 100, 67, 0.75); transition: background-color var(--t-fast), transform var(--t-fast);
}
.next-card:hover { background: #7BE5BD; color: var(--ink); }
.next-card:active { transform: translateY(1px); }
.next-disc { width: 3.5rem; height: 3.5rem; border-radius: var(--r-round); background: var(--ink); color: var(--mint); display: grid; place-items: center; }
.next-disc .i { width: 1.5rem; height: 1.5rem; margin-left: 0.2rem; }
.next-card .next-words { display: grid; gap: 2px; min-width: 0; }
.next-card .next-kicker { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-small); letter-spacing: 0.01em; }
.next-card .next-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3125rem; line-height: 1.35; overflow-wrap: anywhere; }
.next-card .next-lock { display: inline-flex; align-items: center; gap: 0.35em; font-size: var(--fs-meta); font-weight: 700; }
.next-card .next-lock .i { width: 1em; height: 1em; }
.next-go .i { width: 1.6rem; height: 1.6rem; }
.world-gold .next-card { background: var(--gold); }
.world-gold .next-disc { color: var(--gold); }
/* a chapter's test bank, set apart from its concepts: its own icon, no number */
.bank-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3);
  min-height: 64px; padding: var(--s-3) var(--s-4); border: 1.5px solid var(--control); border-inline-start: var(--rule-heavy) solid var(--gold);
  border-radius: var(--r); background: var(--gold-tint); color: var(--fg); text-decoration: none; transition: background-color var(--t-fast), border-color var(--t-fast);
}
.bank-link:hover { border-color: var(--fg); border-inline-start-color: var(--gold); color: var(--fg); }
.bank-link-icon { width: 2.5rem; height: 2.5rem; border-radius: var(--r); background: var(--gold); color: var(--ink); display: grid; place-items: center; }
.bank-link-icon .i { width: 1.35rem; height: 1.35rem; }
.bank-link-words { display: grid; gap: 1px; min-width: 0; }
.bank-link-name { font-family: var(--font-display); font-weight: 800; font-size: 1.0625rem; line-height: 1.4; }
.bank-link-sub { font-size: var(--fs-meta); color: var(--fg-3); }
.bank-link-go { color: var(--fg-3); }
.bank-link-go .i { width: 1.2rem; height: 1.2rem; }
.aside-banks { margin-top: var(--s-4); padding-top: var(--s-4); border-top: var(--rule-heavy) solid var(--fg); display: grid; gap: var(--s-2); }
.aside-banks .bank-link { min-height: 56px; padding: var(--s-2) var(--s-3); }
.aside-banks .bank-link-icon { width: 2.1rem; height: 2.1rem; }
.aside-banks .bank-link-name { font-size: var(--fs-small); }
.chapter-aside .aside-sub a { color: inherit; }
/* sign in first: in the player's place, or the questions' place (owner, 17 Oct 2026) */
.signin-gate { display: grid; place-items: center; text-align: center; }
.gate-body { position: relative; z-index: 1; display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-6) var(--s-5); max-width: 34rem; }
.gate-disc { width: 4rem; height: 4rem; border-radius: var(--r-round); background: var(--mint); color: var(--ink); display: grid; place-items: center; }
.gate-disc .i { width: 1.6rem; height: 1.6rem; }
.gate-video .gate-disc .i { margin-left: 0.2rem; }
.gate-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.4; }
.gate-line { margin: 0; color: var(--fg-2); font-size: var(--fs-small); }
.gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-2); }
.signin-gate .btn-google .i { color: inherit; }
.gate-questions { margin: var(--s-4) 0; border: 1.5px solid var(--control); border-top: var(--rule-heavy) solid var(--fg); border-radius: var(--r); background: var(--raised); }
.gate-questions .gate-disc { background: var(--ink); color: var(--mint); }
/* a guest's taste first (owner, 17 Oct 2026): the questions still free in a
   subject, then the sign-in in one question's place, and in the player's
   place when the video says the student was signed out */
.guest-left { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-3); background: var(--quiet); border-radius: var(--r); font-size: var(--fs-small); font-weight: 600; color: var(--fg-2); }
.guest-left .i { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; }
.gate-question { margin: var(--s-3) 0 0; place-items: stretch; text-align: start; border: 1.5px solid var(--control); border-inline-start: var(--rule-heavy) solid var(--fg); border-radius: var(--r); background: var(--quiet); }
.gate-question .gate-body { justify-items: start; gap: var(--s-2); padding: var(--s-4); max-width: none; }
.gate-question .gate-title { display: flex; align-items: center; gap: var(--s-2); font-size: 1.0625rem; }
.gate-question .gate-title .i { flex: none; width: 1.15rem; height: 1.15rem; }
.gate-question .gate-actions { justify-content: flex-start; margin-top: var(--s-1); }
.stage > .bank-signin-cta { position: absolute; inset-inline: var(--s-4); top: 50%; transform: translateY(-50%); z-index: 3; margin: 0; }
.btn-next { justify-content: space-between; min-height: 76px; padding: var(--s-3) var(--s-5); text-align: start; }
.btn-next .next-words { display: grid; gap: 2px; }
.btn-next .next-kicker { font-family: var(--font-text); font-weight: 500; font-size: var(--fs-small); opacity: 0.85; }
.btn-next .next-name { font-size: 1.1875rem; }
.btn-next .i { width: 1.6rem; height: 1.6rem; }
.nav-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); }
.more { margin-top: var(--s-7); }
.more .q { margin-top: var(--s-4); }

/* concepts in this chapter */
.chapter-aside { position: sticky; top: var(--s-5); }
.chapter-aside h2 { font-size: 1.1875rem; padding-top: var(--s-3); border-top: var(--rule-heavy) solid var(--fg); margin-bottom: var(--s-2); }
.chapter-aside .aside-sub { font-size: var(--fs-small); color: var(--fg-3); margin: 0 0 var(--s-3); }
.aside-list { list-style: none; }
.aside-list li { border-bottom: 1px solid var(--rule); }
.aside-list a { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: var(--s-2); align-items: start; padding: var(--s-3) var(--s-2); color: var(--fg); text-decoration: none; font-size: var(--fs-small); line-height: 1.45; transition: background-color var(--t-fast); }
.aside-list a:hover { background: var(--hover); color: var(--fg); }
.aside-list .a-pos { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--fg-3); padding-top: 0.1rem; }
.aside-list .a-name { display: block; font-family: var(--font-display); font-weight: 600; }
.aside-list .state { font-size: var(--fs-meta); margin-top: 2px; }
.aside-list a[aria-current="page"] { background: var(--frame); color: var(--on-ink); }
.aside-list a[aria-current="page"] .a-pos, .aside-list a[aria-current="page"] .state { color: var(--mint); }
.chapter-aside .coming-line { margin: var(--s-4) 0 var(--s-1); font-size: var(--fs-meta); }
.aside-list .aside-soon { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: var(--s-2); align-items: start; padding: var(--s-3) var(--s-2); color: var(--fg-3); font-size: var(--fs-small); line-height: 1.45; }
.aside-list .aside-soon .a-name { font-weight: 500; }
/* the list beside a lesson as the chapter page's list (the owner, 14 Nov 2026): a play disc, «فيديو N» over the name,
   the lesson open now on the mint tint with a mint disc */
.aside-list a, .aside-list .aside-soon { grid-template-columns: 2rem minmax(0, 1fr); align-items: center; }
.aside-list .a-play { display: inline-grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border-radius: 50%; background: var(--fg); color: var(--bg); }
.aside-list .a-play .i { width: 0.75rem; height: 0.75rem; transform: translateX(1px); }
.aside-list li.is-locked .a-play, .aside-list li.is-not-required .a-play, .aside-list .aside-soon .a-play { background: var(--quiet); color: var(--fg-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.aside-list .a-kicker { display: block; font-family: var(--font-text); font-weight: 700; font-size: var(--fs-meta); line-height: 1.5; color: var(--mint-ink); }
.aside-list .aside-soon .a-kicker { color: var(--fg-3); }
.aside-list a[aria-current="page"] { background: var(--accent-tint); color: var(--fg); }
.aside-list a[aria-current="page"] .a-play { background: var(--mint); color: var(--ink); box-shadow: none; }
.aside-list a[aria-current="page"] .a-kicker, .aside-list a[aria-current="page"] .state { color: var(--mint-ink); }

/* locked concept */
.locked-screen { position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 16 / 9; border-radius: var(--r); display: grid; align-content: center; justify-items: start; gap: var(--s-4); padding: var(--s-7); }
.locked-screen > * { position: relative; z-index: 1; margin: 0; }
.lock-disc { width: 3.75rem; height: 3.75rem; border-radius: var(--r-round); border: 2px solid var(--mint); color: var(--mint); display: grid; place-items: center; }
.lock-disc .i { width: 1.6rem; height: 1.6rem; }
.locked-screen .summary { font-size: var(--fs-lead); color: var(--fg-2); max-width: 40ch; }
.locked-screen .part { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); }
.locked-screen .actions { margin-top: var(--s-2); }
.locked-screen .stage-ring { opacity: 0.12; }

/* ===== Practice test ===== */
.setup { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.setup-card { background: var(--quiet); border-radius: var(--r); padding: var(--s-6); }
.setup-card .intro { font-size: var(--fs-lead); margin: 0 0 var(--s-5); }
.choice { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: var(--s-2) var(--s-4); background: var(--raised); border: 1.5px solid var(--control); border-radius: var(--r); cursor: pointer; }
.choice input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--frame); flex: none; }
.choice:has(input:checked) { border-color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.choice .choice-sub { color: var(--fg-3); font-size: var(--fs-small); }
.test-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding-block: var(--s-4); border-bottom: 1px solid var(--rule); margin-bottom: var(--s-5); }
.test-top .strip { flex: 1; max-width: 22rem; margin: 0; }
.answered { font-family: var(--font-display); font-weight: 700; }
.practice-q .opts { gap: var(--s-2); }
.practice-q .opt { cursor: pointer; }
.practice-q .opt[aria-checked="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.practice-q .opt[aria-checked="true"] .opt-key { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.practice-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-6); padding-top: var(--s-5); border-top: var(--rule-heavy) solid var(--fg); }
.score-card { position: sticky; top: var(--s-5); }
.score { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-3); font-family: var(--font-display); font-weight: 900; line-height: 0.9; margin: 0 0 var(--s-4); direction: ltr; }
[dir="rtl"] .score { justify-content: flex-end; }
.score-num { font-size: var(--fs-numeral); letter-spacing: -0.03em; }
.score-rest { font-size: var(--fs-h2); color: var(--fg-3); }
.revisit { list-style: none; counter-reset: rv; margin-block: var(--s-3) var(--s-5); }
.revisit li { counter-increment: rv; border-bottom: 1px solid var(--rule); }
.revisit a { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; min-height: 56px; padding: var(--s-2) 0; color: var(--fg); text-decoration: none; font-family: var(--font-display); font-weight: 600; }
.revisit a::before { content: counter(rv); font-family: var(--font-mono); color: var(--fg-3); font-size: var(--fs-meta); }
.revisit a:hover { color: var(--accent-fg); }
.res-list { display: grid; gap: var(--s-4); }
.res-tag { display: inline-flex; align-items: center; gap: var(--s-1); font-weight: 700; font-size: var(--fs-small); }
.res-right { color: var(--ok); } .res-wrong { color: var(--bad); } .res-none { color: var(--fg-3); }
.res-answers { display: grid; gap: var(--s-1); margin: var(--s-3) 0; font-size: var(--fs-small); }
.res-answers b { font-family: var(--font-display); }

/* ===== Level tests ===== */
.tests { list-style: none; border-top: var(--rule-heavy) solid var(--heavy-rule, var(--fg)); }
.test-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); align-items: center; padding-block: var(--s-6); border-bottom: 1px solid var(--rule); }
.test-name { font-size: var(--fs-h2); }
.test-name a { color: var(--fg); text-decoration: none; }
.test-name a:hover { color: var(--accent-fg); }
.test-date { display: flex; align-items: center; gap: var(--s-2); color: var(--fg-2); margin: var(--s-2) 0 0; font-size: var(--fs-small); }
.test-date .i { color: var(--accent); }
.test-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: flex-end; }
.date-block { display: inline-flex; align-items: center; gap: var(--s-3); margin-top: var(--s-5); padding: var(--s-3) var(--s-4); border: 1.5px solid var(--control); border-radius: var(--r); font-family: var(--font-display); font-weight: 700; }
.date-block .i { color: var(--gold-on-ink); }

/* ===== Subscribe ===== */
.price-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-7); align-items: end; margin-top: var(--s-5); }
.price-head .price { color: var(--fg); }
.price-head .headline { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.45; max-width: 26ch; margin: 0; }
.price-head .until { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 0; color: var(--mint); font-weight: 700; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.pay-grid h2 { font-size: var(--fs-h3); padding-top: var(--s-3); border-top: var(--rule-heavy) solid var(--fg); margin-bottom: var(--s-4); }
.included { list-style: none; display: grid; }
.included li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: var(--s-3); align-items: start; padding-block: var(--s-3); border-bottom: 1px solid var(--rule); }
.included .i { color: var(--ok); margin-top: 0.3em; }
.methods { list-style: none; display: grid; gap: var(--s-3); }
.method { background: var(--raised); border: 1.5px solid var(--control); border-radius: var(--r); }
.method.is-open { border-color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.method-head { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; width: 100%; min-height: 80px; padding: var(--s-3) var(--s-4); background: none; border: 0; text-align: start; cursor: pointer; color: var(--fg); }
.method-icon { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; background: var(--quiet); border-radius: var(--r); }
.method-icon .i { width: 1.4rem; height: 1.4rem; }
.method-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; }
.method-note { display: block; font-size: var(--fs-small); color: var(--fg-3); line-height: 1.5; }
.method-head .caret { width: 1.1rem; height: 1.1rem; color: var(--fg-3); transition: transform var(--t); }
.method.is-open .caret { transform: rotate(180deg); }
.method-body { padding: 0 var(--s-5) var(--s-5); padding-inline-start: calc(2.75rem + var(--s-4) * 2); }
.steps { list-style: none; counter-reset: st; display: grid; gap: var(--s-4); }
.steps > li { counter-increment: st; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.steps > li::before { content: counter(st); width: 2rem; height: 2rem; display: grid; place-items: center; background: var(--frame); color: var(--on-ink); border-radius: var(--r-round); font-family: var(--font-mono); font-weight: 600; font-size: 0.875rem; }
.steps p { margin: 0.25rem 0 0; }
.alias-box { display: inline-flex; align-items: center; gap: var(--s-3); margin-top: var(--s-2); padding: var(--s-1) var(--s-1) var(--s-1) var(--s-4); border: 1.5px dashed var(--control); border-radius: var(--r); }
[dir="rtl"] .alias-box { padding: var(--s-1) var(--s-4) var(--s-1) var(--s-1); }
.alias { font-family: var(--font-mono); font-weight: 600; font-size: 1.25rem; direction: ltr; unicode-bidi: isolate; }
.amount { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.pay-after { display: grid; gap: var(--s-2); margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.pay-after a { display: inline-flex; align-items: center; gap: var(--s-2); }
.sign-to-pay { padding: var(--s-6); background: var(--quiet); border-radius: var(--r); }
.sign-to-pay p { color: var(--fg-2); }
.ways { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); list-style: none; margin-top: var(--s-4); font-size: var(--fs-small); color: var(--fg-2); }
.ways li { display: inline-flex; align-items: center; gap: var(--s-2); }
.ways .i { color: var(--fg-3); }
.link-box { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); background: var(--quiet); border-radius: var(--r); font-family: var(--font-mono); font-size: var(--fs-small); direction: ltr; overflow: hidden; }
.link-box span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-2) 0 var(--s-4); }
.radio-row .choice { min-height: var(--tap); }

/* ===== Parent's payment request ===== */
.request { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s-6); align-items: end; }
.request .from { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-2); color: var(--fg-3); font-weight: 600; }
.request .price { margin-top: var(--s-4); }
.request-price { text-align: end; }
.parent-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.parent-grid h2 { font-size: var(--fs-h3); padding-top: var(--s-3); border-top: var(--rule-heavy) solid var(--fg); margin-bottom: var(--s-4); }
.pay-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
.pay-card { background: var(--raised); border: 1.5px solid var(--control); border-radius: var(--r); padding: var(--s-5); display: grid; gap: var(--s-3); align-content: start; }
.pay-card h3 { display: flex; align-items: center; gap: var(--s-2); font-size: 1.125rem; }
.pay-card p { margin: 0; font-size: var(--fs-small); color: var(--fg-2); }
.contact-line { display: grid; gap: var(--s-2); padding: var(--s-5); background: var(--quiet); border-radius: var(--r); margin-top: var(--s-5); }
.contact-line .label { font-family: var(--font-display); font-weight: 700; }
.contact-line a { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.trust { list-style: none; border-top: 1px solid var(--rule); }
.trust li { border-bottom: 1px solid var(--rule); }
.trust a { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 56px; color: var(--fg); text-decoration: none; font-weight: 600; }
.trust a:hover { color: var(--accent-fg); }

/* ===== Sign in ===== */
.auth-head { padding-block: var(--s-7) calc(var(--s-10) + var(--s-6)); text-align: center; }
.auth-head h1 { margin-inline: auto; }
.auth-head .lead { margin-inline: auto; }
.auth-card { position: relative; z-index: 2; max-width: 30rem; margin: calc(-1 * (var(--s-10) + var(--s-4))) auto var(--section); padding: var(--s-6); background: var(--raised); border: 1px solid var(--rule); border-top: var(--rule-heavy) solid var(--fg); border-radius: var(--r); }
.auth-card .divider { border: 0; border-top: 1px solid var(--rule); margin: var(--s-5) 0; }
.btn-google .i { color: var(--fg); }
/* Google first on the sign-in page and under a guest's line (the conversion audit, 7 Nov 2026) */
.btn-primary.btn-google .i { color: inherit; }
.auth-card .or-code { margin: 0 0 var(--s-3); }
.guest-signin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: calc(-1 * var(--s-1)) 0 var(--s-3); font-size: var(--fs-small); }


/* ===== My account ===== */
.account-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.status-block { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-5); align-items: center; padding: var(--s-6); background: var(--raised); border: 1px solid var(--rule); border-inline-start: 6px solid var(--ok); border-radius: var(--r); }
.status-mark { width: 3.5rem; height: 3.5rem; color: var(--ok); }
.status-title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h2); line-height: 1.3; margin: 0; }
.status-sub { margin: var(--s-2) 0 0; color: var(--fg-2); }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-3) var(--s-6); margin: 0; }
.details dt { font-weight: 700; color: var(--fg-3); }
.details dd { margin: 0; }
.account-grid h2 { font-size: var(--fs-h3); padding-top: var(--s-3); border-top: var(--rule-heavy) solid var(--fg); margin-bottom: var(--s-4); }

/* ===== Help, About, Teach ===== */
.help-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.contact-card { position: sticky; top: var(--s-5); padding: var(--s-6); background: var(--raised); border: 1px solid var(--rule); border-top: var(--rule-heavy) solid var(--fg); border-radius: var(--r); display: grid; gap: var(--s-4); }
.contact-card h2 { font-size: var(--fs-h3); }
.contact-card p { margin: 0; color: var(--fg-2); }
.contact-card .contact-rows { display: grid; gap: var(--s-2); }
.contact-card .contact-rows a { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.faq .disclosure-body p { margin: 0; color: var(--fg-2); max-width: 60ch; }
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.mission { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); line-height: 1.4; max-width: 22ch; margin: 0 0 var(--s-7); }
html[lang="en"] .mission { line-height: 1.2; }
.about-sections > section { padding-top: var(--s-4); border-top: var(--rule-heavy) solid var(--fg); margin-bottom: var(--s-7); }
.about-sections h2 { font-size: var(--fs-h3); margin-bottom: var(--s-3); }
.about-sections p { color: var(--fg-2); max-width: 56ch; }
.founder { display: grid; justify-items: start; gap: var(--s-4); }
.portrait { position: relative; width: 11rem; aspect-ratio: 1; margin: var(--s-3); }
.portrait img { width: 100%; height: 100%; border-radius: var(--r-round); object-fit: cover; }
.portrait::after { content: ""; position: absolute; inset: -9%; border: 3px solid var(--mint); border-top-color: transparent; border-radius: var(--r-round); transform: rotate(-15deg); pointer-events: none; }
.founder-name { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); margin: 0; }
.founder-role { color: var(--fg-3); margin: 0; }
.teach-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.teach-form { max-width: 34rem; }
.teach-aside { padding: var(--s-6); background: var(--quiet); border-radius: var(--r); }
.teach-aside p { color: var(--fg-2); }

/* ===== Legal ===== */
.legal-grid { display: grid; grid-template-columns: 15rem minmax(0, var(--measure)); gap: var(--s-8); align-items: start; padding-block: var(--s-7) var(--section); }
.toc { position: sticky; top: var(--s-5); }
.toc h2 { font-size: 1.0625rem; padding-top: var(--s-3); border-top: var(--rule-heavy) solid var(--fg); margin-bottom: var(--s-2); }
.toc ol { list-style: none; }
.toc a { display: block; padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); color: var(--fg-2); text-decoration: none; font-size: var(--fs-small); }
.toc a:hover { color: var(--fg); }
.legal section { padding-top: var(--s-4); border-top: var(--rule-heavy) solid var(--fg); margin-bottom: var(--s-7); scroll-margin-top: var(--s-5); }
.legal h2 { font-size: var(--fs-h3); margin-bottom: var(--s-3); }
.legal p { color: var(--fg-2); }
.only-ar { display: grid; gap: var(--s-4); justify-items: start; padding-block: var(--section); }

/* ===== 404 ===== */
.lost-head { min-height: 26rem; display: grid; align-items: center; }
.lost-ring { position: absolute; z-index: 0; inset-inline-end: -3rem; top: 50%; height: 30rem; width: auto; transform: translateY(-50%); -webkit-mask: conic-gradient(from 150deg, #000 0 72%, transparent 72% 100%); mask: conic-gradient(from 150deg, #000 0 72%, transparent 72% 100%); pointer-events: none; }

/* ===== Phones and small tablets ===== */
@media (max-width: 900px) {
  .hero-grid, html[lang="en"] .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 7.5rem var(--s-8); }
  .hero-art { --h: 10rem; top: -3.25rem; inset-inline-end: -2.5rem; }
  .hero-art > .contours { opacity: 0.35; }
  .how-grid, .subject-head, .lesson-grid, .setup, .pay-grid, .parent-grid, .account-grid, .help-grid, .about-grid, .teach-grid, .legal-grid, .coming, .request, .price-head, .book-box { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .index { grid-template-columns: minmax(0, 1fr); }
  .offer { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .chapter-aside, .score-card, .contact-card, .toc { position: static; }
  .coming-art { width: min(70%, 16rem); }
  .request-price { text-align: start; }
  .lesson-grid { gap: var(--s-7); }
}
@media (max-width: 640px) {
  .index-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "code status" "name name"; gap: var(--s-1) var(--s-3); min-height: 0; padding-inline: var(--s-1); }
  .index-row .code, .index-row .kind { grid-area: code; }
  .index-row .index-status { grid-area: status; }
  .index-row .index-name { grid-area: name; }
  .index-row .i-fwd { display: none; }
  .door { grid-template-columns: minmax(0, 1fr); padding-block: var(--s-6); }
  .door-go { width: 3.25rem; height: 3.25rem; }
  .chapter-head { grid-template-columns: auto minmax(0, 1fr); }
  .chapter-progress { grid-column: 1 / -1; text-align: start; }
  .chapter-progress .strip { justify-content: flex-start; }
  .concept-row { grid-template-columns: 1.75rem minmax(0, 1fr) auto; grid-template-areas: "pos name tag" ". meta meta"; gap: var(--s-1) var(--s-3); }
  .c-pos { grid-area: pos; }
  .c-name { grid-area: name; }
  .concept-row .c-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
  .c-tag { grid-area: tag; align-self: start; }
  .q { padding: var(--s-4); }
  .btn-next { min-height: 72px; }
  .test-row { grid-template-columns: minmax(0, 1fr); }
  .test-actions { justify-content: flex-start; }
  .pay-cards { grid-template-columns: minmax(0, 1fr); }
  .method-body { padding-inline: var(--s-4); }
  .locked-screen { aspect-ratio: auto; padding: var(--s-6) var(--s-5); }
  .status-block { grid-template-columns: minmax(0, 1fr); }
  .auth-card { margin-inline: var(--gutter); padding: var(--s-5); }
  .details { grid-template-columns: minmax(0, 1fr); gap: 0 var(--s-4); }
  .details dd { margin-bottom: var(--s-3); }
  .stage { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
  .play-disc { width: 4.5rem; height: 4.5rem; }
  .play-label { font-size: 1.0625rem; }
}

/* ===== Home: your subjects (returning) ===== */
.mine-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); gap: var(--s-6); align-items: center; padding-block: var(--s-5); border-bottom: 1px solid var(--rule); }
.mine-name .code { color: var(--fg-3); font-size: var(--fs-meta); }
.mine-name h3 { font-size: var(--fs-h3); }
.mine-name h3 a { color: var(--fg); text-decoration: none; }
.mine-name h3 a:hover { color: var(--accent-fg); }
.mine-progress p { margin: 0; font-size: var(--fs-small); color: var(--fg-2); }
.mine-progress .strip { margin-top: 0; }
.mine-actions { display: grid; gap: var(--s-3); justify-items: start; }
.mine-locked { display: flex; gap: var(--s-2); align-items: flex-start; margin: 0; font-size: var(--fs-small); color: var(--fg-3); }
.mine-locked .i { margin-top: 0.25em; width: 1.05em; height: 1.05em; }
.strip-answer i.a { background: var(--fg); box-shadow: none; }
@media (max-width: 900px) { .mine-row { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); } }
@media (max-width: 900px) {
  .hero .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   Depth and the lower sections (owner's review, 28 Sep 2026): the ring's
   ripples, layered paper, one elevation. Not busier; quieter and richer.
   ===================================================================== */

/* the biggest feature: every idea animated */
.feature { position: relative; overflow: hidden; isolation: isolate; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); align-items: center; }
.feature-line { font-size: var(--fs-lead); color: var(--fg-2); max-width: 30ch; margin: 0 0 var(--s-6); }
html[lang="en"] .feature-line { max-width: 34ch; }
.feature-strip { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.feature-strip li { display: grid; gap: var(--s-2); }
.feature-strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); border: 1px solid var(--rule); box-shadow: var(--shadow-sheet); }
.feature-strip span { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-small); color: var(--fg-2); }
.feature-stage { position: relative; margin: 0; padding: var(--s-6); }
.stage-art { --h: 34rem; top: 50%; left: 50%; translate: -50% -50%; }
.stage-art > .ring { opacity: 0.14; }
.stage-art > .contours { opacity: 0.5; -webkit-mask-image: radial-gradient(closest-side, #000 22%, transparent 58%); mask-image: radial-gradient(closest-side, #000 22%, transparent 58%); }
.feature-screen { position: relative; z-index: 1; aspect-ratio: 16 / 9; border-radius: calc(var(--r) * 2); overflow: hidden; background: var(--frame); box-shadow: var(--shadow-lift); outline: 1px solid rgba(29, 25, 19, 0.12); }
.feature-screen img, .feature-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-play { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(60% 60% at 50% 50%, rgba(29, 25, 19, 0.28), transparent 70%); border: 0; cursor: pointer; }
.feature-play .play-disc { width: 5.75rem; height: 5.75rem; box-shadow: 0 12px 30px -10px rgba(29, 25, 19, 0.6); }
.feature-play:hover .play-disc { transform: scale(1.06); }
.feature-screen.is-playing .feature-play { display: none; }

/* how you study: the two-tries question on a quiet desk */
.how-band { position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(55% 70% at var(--glow-x) 30%, rgba(78, 217, 164, 0.08), transparent 65%), linear-gradient(180deg, transparent, var(--surface-2) 85%, transparent); }
.demo-desk { position: relative; isolation: isolate; padding: var(--s-7) var(--s-6); border-radius: calc(var(--r) * 2); background: linear-gradient(160deg, var(--surface-2), var(--surface-3)); overflow: hidden; }
.desk-art { --h: 26rem; top: -8rem; inset-inline-end: -9rem; }
.desk-art > .ring { opacity: 0.35; }
.desk-art > .contours { opacity: 0.5; }
.demo { position: relative; z-index: 1; margin: 0; padding: var(--s-4); background: var(--raised); box-shadow: var(--shadow-lift); }
.demo .q { border: 0; padding: var(--s-3) var(--s-2) var(--s-1); background: none; box-shadow: none; }
.demo .opt { min-height: 50px; cursor: default; }
.opt-dim { opacity: 0.55; }
.pull { position: relative; padding-top: var(--s-6); }
.pull::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; width: 3rem; height: 3px; background: var(--accent); }

/* the Level tests door: gold with depth, ripples on the arrow side */
.door-band { position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(45% 160% at var(--glow-x) -40%, rgba(255, 248, 225, 0.35), transparent 60%),
              radial-gradient(60% 150% at var(--glow-x-far) 140%, rgba(29, 25, 19, 0.2), transparent 60%),
              var(--gold); }
.door-band .wrap { position: relative; z-index: 1; }
.door-art { position: absolute; z-index: 0; top: 50%; inset-inline-end: -10rem; width: 46rem; height: 46rem; translate: 0 -50%; color: var(--ink); opacity: 0.16; pointer-events: none; }
.door-art .contours { width: 100%; height: 100%; }
.door-title { letter-spacing: -0.01em; }

/* the subject library: a series of covers that light up as subjects open */
.library { position: relative; background: linear-gradient(180deg, transparent, var(--surface-2) 30%, var(--surface-2) 70%, transparent); }
.library-line { color: var(--fg-2); font-size: var(--fs-lead); max-width: 48ch; margin: calc(-1 * var(--s-3)) 0 var(--s-6); }
.shelf { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); }
.cover {
  position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 3 / 4;
  display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-3); padding: var(--s-4);
  border-radius: var(--r); text-decoration: none; color: var(--fg);
  box-shadow: var(--shadow-sheet); transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out);
}
.cover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); color: var(--fg); }
.cover > span { position: relative; z-index: 1; }
.cover-code { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-meta); color: var(--fg-3); letter-spacing: 0.04em; }
.cover-title { align-self: end; display: grid; gap: var(--s-1); }
.cover-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.0625rem, 0.9rem + 0.45vw, 1.3125rem); line-height: 1.35; }
.cover-other { font-size: 0.75rem; line-height: 1.4; color: var(--fg-3); }
.cover-status .tag { font-size: 0.75rem; }
.cover-art { --h: 13rem; top: -3rem; inset-inline-end: -3.5rem; }
.cover-art > .ring { fill: var(--ink-3); }
.cover-art > .contours { color: var(--on-ink-3); opacity: 0.16; }
.cover.is-live .cover-art > .ring { fill: var(--mint); }
.cover.is-live .cover-art > .contours { color: var(--mint); opacity: 0.4; }
.cover.is-live { outline: 1px solid rgba(78, 217, 164, 0.35); outline-offset: -1px; }
.cover-v1 .cover-art { top: auto; bottom: -5rem; inset-inline-end: auto; inset-inline-start: -4rem; }
.cover-v2 .cover-art { --h: 17rem; top: -6rem; inset-inline-end: -7rem; }
.cover-v3 .cover-art { --h: 11rem; top: 32%; inset-inline-end: -5rem; }

/* the offer: one card with depth, ripples behind the price */
.offer-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-8); align-items: center;
  padding: var(--s-8) var(--s-7);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--rule); border-top: var(--rule-heavy) solid var(--fg); border-radius: var(--r);
  box-shadow: var(--shadow-lift);
}
.offer-card > * { position: relative; z-index: 1; }
.offer-card > .offer-art { position: absolute; z-index: 0; top: 50%; inset-inline-start: -14rem; width: 40rem; height: 40rem; translate: 0 -50%; color: var(--mint); opacity: 0.55; pointer-events: none; }
.offer-art .contours { width: 100%; height: 100%; }
.offer-card .price-until { color: var(--fg); }
.offer-card .offer-line { margin-bottom: 0; }

/* the video stage shows a real frame from the lesson */
.stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.stage:has(.stage-poster) .video-play { background: linear-gradient(180deg, rgba(29, 25, 19, 0.15), rgba(29, 25, 19, 0.72)); }
.stage:has(.stage-poster) .play-label { color: #FBF9F5; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45); }
.stage:has(.stage-poster) .play-dur { color: #D9D1C3; }

/* subscribe: the benefits, then the small print */
.benefits { list-style: none; display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
.benefits li { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); align-items: center; gap: var(--s-4); padding: var(--s-3); background: var(--raised); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow-sheet); }
.benefit-icon { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: var(--r); background: var(--frame); color: var(--mint); }
.benefit-icon .i { width: 1.5rem; height: 1.5rem; }
.benefit-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.35; }
.fine { list-style: none; display: grid; gap: var(--s-2); }
.fine li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: var(--s-2); font-size: var(--fs-small); color: var(--fg-3); }
.fine .i { width: 1rem; height: 1rem; margin-top: 0.3em; color: var(--fg-3); }
.price-head .head-sub { margin: var(--s-2) 0 0; color: var(--fg-2); font-size: var(--fs-lead); max-width: 36ch; }
/* under the price (13 Nov 2026): one payment, the whole subject, the first two chapters free */
/* after paying (13 Nov 2026): «شو انفتحلك» with the videos and the banks */
.opened { margin: var(--s-5) 0; padding: var(--s-5); background: var(--accent-tint); border-radius: var(--r); }
.opened h2 { margin: 0 0 var(--s-2); font-size: var(--fs-h3); }
.opened-line { margin: 0 0 var(--s-4); color: var(--fg-2); }
.opened .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0; }
.price-head .sub-facts { margin: var(--s-2) 0 0; color: var(--fg-2); font-size: var(--fs-small); line-height: 1.7; max-width: 46ch; }
/* the price's worth, counted for the viewer (19 Nov 2026): «5 د.أ لكل المواد: 255 فيديو جاهز (62 ساعة شرح)…» */
.price-head .sub-value { margin: var(--s-2) 0 0; color: var(--fg); font-size: var(--fs-small); font-weight: 700; line-height: 1.7; max-width: 46ch; }
.request-price .until { color: var(--mint); font-weight: 700; margin: var(--s-2) 0 0; }
.fine-note { font-size: var(--fs-small); color: var(--fg-3); margin: var(--s-2) 0 0; }

@media (max-width: 1100px) {
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .feature-stage { padding: 0; order: -1; }
  .stage-art { display: none; }
  .offer-card { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding: var(--s-6) var(--s-5); }
  .offer-card > .offer-art { top: -6rem; inset-inline-start: auto; inset-inline-end: -18rem; translate: 0 0; }
}
@media (max-width: 640px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .cover { padding: var(--s-3); }
  .demo-desk { padding: var(--s-5) var(--s-3); }
  .desk-art { display: none; }
  .door-art { width: 30rem; height: 30rem; inset-inline-end: -14rem; }
  .benefit-name { font-size: 1.0625rem; }
  .cover-art { --h: 8.5rem; top: -2.5rem; inset-inline-end: -2.5rem; }
  .cover-v1 .cover-art { top: -3.5rem; inset-inline-start: auto; inset-inline-end: 30%; }
  .cover-v2 .cover-art { --h: 10rem; top: -4rem; inset-inline-end: -4.5rem; }
  .cover-v3 .cover-art { --h: 8rem; top: -3.5rem; }
}

/* one elevation for sheets a student acts on */
.q, .method, .pay-card, .auth-card, .status-block, .contact-card, .setup-card { box-shadow: var(--shadow-sheet); }
.demo .q { box-shadow: none; }

/* ===== Mwasel Tutor, told as a story: wrong, asked, right ===== */
.story { position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(40% 32% at 50% 42%, rgba(78, 217, 164, 0.06), transparent 100%), linear-gradient(180deg, transparent 0%, var(--surface-2) 45%, transparent 100%); }
.story-head { text-align: center; max-width: 44rem; margin: 0 auto var(--s-8); }
.story-head h2 { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3rem); line-height: 1.3; }
.story-head p { font-size: var(--fs-lead); color: var(--fg-2); margin: var(--s-4) auto 0; max-width: 40ch; }
.story-head::after { content: ""; display: block; width: 3.5rem; height: 3px; margin: var(--s-5) auto 0; background: var(--accent); border-radius: 2px; }
.story-flow { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1.08fr) 3rem minmax(0, 1fr); align-items: start; gap: var(--s-2); }
.story-step { position: relative; display: grid; justify-items: center; gap: var(--s-4); }
.story-pill { display: inline-flex; align-items: center; gap: var(--s-2); padding: 0.45rem 1rem; border-radius: var(--r); background: var(--frame); color: var(--on-ink); font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; box-shadow: var(--shadow-sheet); }
.story-step-2 .story-pill { background: var(--mint); color: var(--ink); }
.story-step-3 .story-pill { background: var(--green); color: #FBF9F5; }
.story-panel { width: 100%; padding: var(--s-4); }
.story-body { display: grid; gap: var(--s-3); }
.story-body .q-head { margin: 0; }
.story-body .q-stem { font-size: 0.9375rem; margin: 0; }
.story-body .opts { gap: 6px; }
.story-body .opt { min-height: 40px; padding: 4px 8px; font-size: 0.875rem; grid-template-columns: 1.75rem minmax(0, 1fr) 1.2rem; cursor: default; }
.story-body .opt-key { width: 1.75rem; height: 1.75rem; font-size: 0.8125rem; }
.story-body .fb { margin: 0; padding: var(--s-3); }
.story-body .fb-verdict { font-size: 1rem; }
.story-body .fb-expl { font-size: 0.875rem; line-height: 1.7; margin: 0; }
.story-trigger { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px; padding: 0.4rem 0.8rem; border-radius: var(--r); border: 1.5px solid var(--fg); background: var(--raised); font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; box-shadow: 0 0 0 4px var(--accent-tint); }
.story-trigger .i { color: var(--accent-fg); }
.story-chat { gap: var(--s-2); }
.story-chat-head { display: flex; align-items: center; gap: var(--s-2); margin: calc(-1 * var(--s-4)) calc(-1 * var(--s-4)) var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r) var(--r) 0 0; font-family: var(--font-display); font-weight: 800; }
.story-chat-head .i { color: var(--mint); }
.story-chat .tutor-msg { font-size: 0.875rem; max-width: 100%; }
.story-chat .tutor-context { font-size: 0.8125rem; }
.story-arrow { align-self: center; display: grid; place-items: center; margin-top: 3rem; }
.story-arrow span { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: var(--r-round); background: var(--accent-tint); color: var(--accent-fg); }
.story-arrow .i { width: 1.25rem; height: 1.25rem; }
.story-tag { position: absolute; z-index: 2; padding: 0.3rem 0.7rem; border-radius: var(--r); background: var(--frame); color: var(--mint); font-family: var(--font-display); font-weight: 700; font-size: 0.8125rem; white-space: nowrap; box-shadow: var(--shadow-sheet); }
.story-tag.t1 { top: 5.25rem; inset-inline-end: -1.5rem; rotate: -3deg; }
.story-tag.t2 { bottom: -0.95rem; inset-inline-start: 1rem; rotate: 2deg; }
.story-tag.t3 { bottom: -0.95rem; inset-inline-end: 1rem; rotate: -2deg; }
.story-tag.t4 { bottom: -0.95rem; inset-inline-end: 1.25rem; rotate: 2.5deg; background: var(--green); color: #FBF9F5; }
.story-step-2 .story-panel, .story-step-3 .story-panel { padding-bottom: var(--s-6); }
.story-pull { text-align: center; margin: var(--s-9) auto 0; max-width: 28ch; }
.story-pull::before { inset-inline-start: 50%; translate: 50% 0; }
html[dir="ltr"] .story-pull::before { translate: -50% 0; }

/* the offer's headline in the owner's words */
.offer-head { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.35; margin: 0 0 var(--s-2); }
.offer-card .price-until { font-family: var(--font-text); font-weight: 600; font-size: var(--fs-small); color: var(--fg-2); margin: 0; }
.price-head .head-sub { display: flex; align-items: center; gap: var(--s-2); color: var(--mint); font-weight: 700; font-size: var(--fs-small); }

/* covers keep their rings above the title */
.cover-v1 .cover-art { top: -5.5rem; bottom: auto; inset-inline-start: auto; inset-inline-end: 34%; }
.cover-v3 .cover-art { --h: 12rem; top: -5.5rem; inset-inline-end: 18%; }

@media (max-width: 1000px) {
  .story-flow { grid-template-columns: minmax(0, 1fr); max-width: 30rem; margin-inline: auto; gap: var(--s-3); }
  .story-arrow { margin: 0; }
  .story-arrow .i { rotate: 90deg; }
  [dir="rtl"] .story-arrow .i { rotate: -90deg; }
  .story-tag.t1 { inset-inline-end: -0.25rem; }
}

/* =====================================================================
   The live site's own markup (functions/_lib/site/pages/*, site.js and
   tutor.js): what the pages add beyond the prototype.
   ===================================================================== */

/* ---- header ---- */
.site-menu-static { display: block; }
.filters { list-style: none; }
a.filter { display: inline-flex; align-items: center; text-decoration: none; }
a.filter:hover { color: var(--fg); border-color: var(--fg); }
.filter[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---- Home ---- */
.notice-row .notice { margin-block: var(--s-5) 0; }
.mine { list-style: none; }
.library-offer {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5);
  margin: 0 0 var(--s-6); padding: var(--s-4) var(--s-5);
  background: var(--raised); border: 1px solid var(--rule); border-inline-start: var(--rule-heavy) solid var(--accent); border-radius: var(--r);
  box-shadow: var(--shadow-sheet);
}
.library-offer > .i { width: 1.75rem; height: 1.75rem; color: var(--accent-fg); }
.library-offer p { flex: 1 1 20rem; margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.55; }
.page-subjects .block { padding-top: var(--s-7); }

/* the tutor story: the two tags under the middle panel never overlap (longer
   English words, and narrower desktops in Arabic) */
html[lang="en"] .story-step-2 .story-tag.t3 { bottom: -2.6rem; }
@media (min-width: 1001px) and (max-width: 1180px) { .story-step-2 .story-tag.t3 { bottom: -2.6rem; } }

/* ---- test banks: the dossier's banks, numbered as printed ---- */
.bank-kicker { font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-meta); letter-spacing: 0.08em; color: var(--accent-fg); margin: var(--s-5) 0 0; position: relative; }
.page-head .bank-kicker + h1 { margin-top: var(--s-2); }
.bank-facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 0; font-size: var(--fs-small); color: var(--fg-2); }
.stars-legend { margin: var(--s-2) 0 0; font-size: var(--fs-small); color: var(--fg-3); }
.bank-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-4); }
.bank-jump { display: flex; align-items: center; gap: var(--s-2); }
.bank-jump label { font-weight: 700; font-size: var(--fs-small); white-space: nowrap; }
.bank-jump .input { width: 5rem; min-height: 48px; text-align: center; }
.bank-jump .btn { min-height: 48px; }
/* a chapter bank: the questions start near the top (the owner, 9 Nov 2026) */
.page-bank .block { padding-top: var(--s-5); }
/* a chapter's English name over its bank is longer than the Arabic was (19 Nov 2026): a step smaller on a phone, so the
   first question stays on the first screen (the owner, 9 Nov 2026) */
@media (max-width: 480px) { .page-bank .page-head h1 { font-size: 1.5rem; line-height: 1.3; } }
/* a chapter bank's star filter (the owner, 9 Nov 2026): one small native dropdown, the phone's own picker */
.bank-filter { display: flex; flex-direction: column; gap: 4px; flex: 0 1 22rem; min-width: 0; max-width: 100%; margin: 0; }
.bank-filter label { flex: none; font-weight: 700; font-size: var(--fs-small); white-space: nowrap; }
.bank-filter .bank-stars { width: 100%; min-height: 48px; padding-block: 0.5rem; padding-inline: 0.75rem; font-weight: 700; cursor: pointer; }
/* the subscription box and «وضع الإنقاذ», in the middle of the questions (the owner, 9 Nov 2026) */
.bank-list > .bank-mid { list-style: none; min-width: 0; display: grid; gap: var(--s-4); }
.bank-list > .bank-mid > * { margin: 0; }
.bank-list > .bank-mid > .guest-signin-actions { margin-top: calc(-1 * var(--s-2)); }
.guest-top { margin-bottom: var(--s-4); }
.bank-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.bank-list > .q { min-width: 0; }
.q-code { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--fg-3); direction: ltr; unicode-bidi: isolate; }
.q-stars { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--fs-small); font-weight: 700; white-space: nowrap; }
.q-stars .star-marks { letter-spacing: 0.05em; }
.q-stars .star-off { opacity: 0.28; }
.q-stars.stars-3 { color: var(--bad); }
.q-stars.stars-2 { color: var(--review); }
.q-stars.stars-1 { color: var(--fg-3); }
.bank-list .q-head { justify-content: flex-start; gap: var(--s-2) var(--s-3); }
.bank-list .q-head .q-state { margin-inline-start: auto; }
.bank-list .q-head .q-code { margin-inline-start: auto; }
.bank-list .q-head .q-code + .q-state { margin-inline-start: var(--s-3); }
.q-from { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-4) 0 0; font-size: var(--fs-small); color: var(--fg-3); }
.q-from .i { flex: none; }
.bank-signin-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); background: var(--quiet); border-inline-start: var(--rule-heavy) solid var(--accent); border-radius: var(--r); font-size: var(--fs-small); font-weight: 600; }
.bank-signin-cta p { margin: 0; flex: 1 1 14rem; }
.bank-signin-cta .i { color: var(--fg-3); flex: none; }
.bank-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-7); padding-top: var(--s-5); border-top: var(--rule-heavy) solid var(--fg); }
.banks-subject + .banks-subject { margin-top: var(--s-8); }
.bank-row .code { white-space: nowrap; }

/* ---- subject page ---- */
.subject-body > .notice { margin-block: 0 var(--s-4); }
.subject-body .offer-strip + .actions, .subject-body .notice + .actions { margin-top: var(--s-4); }
.subject-body > .block { padding-block: var(--s-8) 0; }
.progress-panel .strip { margin-block: var(--s-3) var(--s-2); }
.book-lookup h3 label { font: inherit; color: inherit; }

/* ---- concept page ---- */
.q:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint), var(--shadow-sheet); }
.book-lookup { scroll-margin-top: var(--s-6); }
.q-list { list-style: none; }
.q-state .state { font-size: var(--fs-meta); }
.state-wrong { color: var(--bad); }
.fb:empty, .result:empty { display: none; }
.q-stem p:last-child, .fb-expl p:last-child, .idea-text p:last-child { margin-bottom: 0; }
.q-figure { margin: 0 0 var(--s-4); }
.q-figure img { border-radius: var(--r); border: 1px solid var(--rule); }
.table-wrap { overflow-x: auto; margin: 0 0 var(--s-4); }
.q-table { border-collapse: collapse; font-family: var(--font-mono); font-size: 0.875rem; }
.q-table th, .q-table td { border: 1px solid var(--rule); padding: 0.35rem 0.6rem; text-align: center; }
.q-table th { background: var(--quiet); font-weight: 600; }
.q-tr { margin: 0 0 var(--s-4); border: 1px solid var(--rule); border-radius: var(--r); background: var(--quiet); font-family: var(--font-text); }
.q-tr summary { cursor: pointer; padding: var(--s-2) var(--s-3); font-size: var(--fs-small); font-weight: 700; color: var(--accent-fg); }
.q-tr summary:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 2px; }
.q-tr[open] summary { border-bottom: 1px solid var(--rule); }
.q-tr-stem { padding: var(--s-3) var(--s-3) var(--s-1); line-height: 1.8; }
.q-tr-stem p { margin: 0 0 var(--s-2); }
.q-table caption { caption-side: top; text-align: start; font-family: var(--font-text); font-weight: 700; font-size: var(--fs-small); padding: 0 0 var(--s-2); }
.opt[aria-busy="true"] { cursor: progress; }
.stage iframe { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; }
.lesson > .lang-line + .stage { margin-top: var(--s-3); }
.aside-foot { margin-top: var(--s-3); }
.more .check-list { margin-top: var(--s-2); }
.locked-screen .reached { color: var(--fg-2); }

/* ---- practice test ---- */
.setup-card .notice { margin-block: 0 var(--s-5); }
.setup:not(:has(.setup-aside)) { grid-template-columns: minmax(0, 46rem); }
.practice-wrap { padding-block: var(--s-6) var(--section); }
.practice-test { max-width: 48rem; }
.practice-test .test-top { position: sticky; top: 0; z-index: 2; background: var(--bg); }
.practice-q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--s-2); }
.practice-q .choice .opt-key { width: 2rem; height: 2rem; }
.practice-q .choice input:disabled { cursor: default; }
.practice-q .choice:has(input:disabled) { cursor: default; }
.score-summary { display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-6); margin-bottom: var(--s-6); }
.score-summary .score { margin: 0; }
.score-summary h2 { font-size: var(--fs-h3); }
.score-summary h3 { font-size: 1.0625rem; margin-top: var(--s-3); }
.score-summary .revisit { width: 100%; margin: 0; }
.score-summary .actions { margin-top: 0; }
.revisit .meta { font-family: var(--font-text); font-weight: 500; font-size: var(--fs-small); color: var(--fg-3); }

/* ---- subscribe and the parent's page ---- */
.pay-top .notice { margin-block: var(--s-6) 0; }
.renew-title { font-size: var(--fs-h3); margin-top: var(--s-6); }
.pay-wrap { padding-block: var(--s-6) var(--section); }
.pay-status { display: flex; align-items: flex-start; gap: var(--s-2); margin: var(--s-3) 0 0; font-size: var(--fs-small); color: var(--fg-2); }
.pay-status > .i { margin-top: 0.2em; color: var(--accent-fg); }
.method-body .steps { margin-top: var(--s-4); }
/* a long link never widens the page: the cards keep to their column */
.methods { grid-template-columns: minmax(0, 1fr); }
.method, .method-body, .pay-card { min-width: 0; }
.link-box { max-width: 100%; }
.radio-set { border: 0; padding: 0; margin: 0 0 var(--s-2); min-width: 0; }
.radio-set legend { padding: 0; margin-bottom: var(--s-1); }
.field-error { display: flex; gap: var(--s-2); align-items: center; color: var(--bad); font-size: var(--fs-small); font-weight: 600; margin: 0; }
.hint { font-size: var(--fs-small); color: var(--fg-3); }
.parent-short { padding-block: var(--s-7) var(--section); max-width: 46rem; }
.parent-short h2 { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-h3); margin: var(--s-6) 0 var(--s-3); }
.lead-line { font-size: var(--fs-lead); }
.what-body { font-size: var(--fs-lead); }
.how { margin-top: var(--s-7); }
.parent-aside .contact-line { margin-top: 0; }
.parent-aside .trust { margin-top: var(--s-5); }
.pay-card .steps { gap: var(--s-3); }

/* ---- sign in and My account ---- */
.auth-card .notice:first-child { margin-top: 0; }
.sent-to { font-weight: 600; }
.code-input { font-family: var(--font-mono); font-size: 1.5rem; letter-spacing: 0.3em; text-align: center; }
.code-help { margin: var(--s-4) 0 var(--s-2); }
.code-links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin: 0; }
.password-signin { margin-top: var(--s-5); }
.status-block.status-ended { border-inline-start-color: var(--review-mark); }
.status-block.status-ended .status-mark { color: var(--review); }
.status-block.status-none { border-inline-start-color: var(--accent); }
.status-block.status-none .status-mark { color: var(--accent-fg); }
.status-note { margin: var(--s-4) 0 0; color: var(--fg-2); }
.account-grid .actions { margin-top: var(--s-5); }
.orders { margin-top: var(--s-7); }
.order-list { list-style: none; border-top: 1px solid var(--rule); }
.order-list li { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; border-bottom: 1px solid var(--rule); }
.order-list li > span:first-of-type { flex: 1; }

/* ---- help, teach, the book ---- */
.teach-aside h2 { font-size: var(--fs-h3); margin-bottom: var(--s-3); }
.teach-form + .notice { margin-top: 0; }
.book-note { color: var(--fg-2); max-width: 48ch; margin: 0; }
.book-sale .price-until { font-size: var(--fs-h2); }

/* ---- the site's own lesson videos: a plain player (no email over it since 17 Oct 2026) ---- */
.stage video { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; background: #000; }

/* ---- Mwasel Tutor: no big header, full screen on phones (owner, 28 Sep 2026) ---- */
.tutor-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.tutor-top .tutor-intro { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: var(--s-2); }
.tutor-top .tutor-intro > .i { flex: none; margin-top: 0.2em; color: var(--accent-fg); }
.tutor-intro strong { color: var(--fg); font-family: var(--font-display); font-weight: 800; }
.tutor-close { flex: none; min-height: 40px; }
.tutor-close .i { width: 1em; height: 1em; }
.tutor-panel { border-left-width: 1px; border-left-color: var(--rule); box-shadow: var(--shadow-lift); }
@media (max-width: 760px) {
  .tutor-panel { inset: 0; width: 100%; height: 100vh; height: 100dvh; border: 0; box-shadow: none; }
  body.tutor-open { padding-bottom: 0; overflow: hidden; }
  .tutor-intro { display: block; }
  .tutor-top .tutor-intro { display: flex; }
  .tutor-body { padding-top: var(--s-3); }
  .tutor-form { padding-bottom: var(--s-3); }
  .tutor-form textarea { height: auto; min-height: 56px; }
}

/* ---- Mwasel Tutor: the photo of a page ---- */
.tutor-tools { display: flex; align-items: center; gap: var(--s-2); }
.tutor-photo-btn { cursor: pointer; }
.tutor-photo-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.tutor-photo { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2); background: var(--quiet); border-radius: var(--r); font-size: var(--fs-small); }
.tutor-photo img { width: 3.5rem; height: 3.5rem; flex: none; object-fit: cover; border-radius: var(--r); border: 1px solid var(--rule); }
.tutor-photo span { flex: 1; min-width: 0; }
/* the question said out loud (owner, 14 Nov 2026): the button pulses while it listens */
.tutor-tools { flex-wrap: wrap; }
.tutor-mic-btn.is-listening, .tutor-mic-btn.is-listening:hover { color: var(--bad); border-color: var(--bad); background: var(--bad-tint); }
.tutor-mic-btn.is-listening .i { animation: tutor-mic 1.1s ease-in-out infinite; }
@keyframes tutor-mic { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .tutor-mic-btn.is-listening .i { animation: none; } }
.tutor-mic-note { margin: 0; font-size: var(--fs-small); color: var(--fg-2); }
/* the end of the free questions: «اشترك» beside the line (14 Nov 2026) */
.tutor-subscribe { margin-inline-start: var(--s-2); vertical-align: middle; }
/* under a free video: what the subscription opens (14 Nov 2026) */
.free-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); margin-block: var(--s-3); padding: var(--s-3) var(--s-4);
  border: 1px solid var(--rule); border-inline-start: 4px solid var(--mint); border-radius: var(--r); background: var(--mint-tint); }
.free-offer p { margin: 0; flex: 1 1 18rem; font-size: var(--fs-small); color: var(--fg); }
.free-offer .btn { flex: none; }
/* a new account's first stop on the subscription page (14 Nov 2026) */
.welcome-new { margin-block-end: var(--s-4); padding: var(--s-4); border: 1px solid var(--rule); border-radius: var(--r); background: var(--quiet); }
.welcome-title { margin: 0 0 var(--s-3); font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; }
.welcome-ways { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin: 0; }
.tutor-msg .msg-photo { display: block; max-width: 11rem; max-height: 11rem; margin-bottom: var(--s-2); border-radius: var(--r); border: 1px solid var(--rule); object-fit: cover; }
@media (max-width: 760px) {
  .tutor-form .tutor-photo-btn { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}

/* ---- Mwasel Tutor for a guest: the sign-in box in the chat's place (owner, 17 Oct 2026) ---- */
.tutor-guest .gate-tutor { margin: 0; }
.gate-tutor .gate-title .i { color: var(--accent-fg); }
@media (max-width: 760px) {
  .tutor-panel.tutor-guest { inset: auto 0 0 0; height: auto; max-height: 100vh; max-height: 100dvh; border-top: var(--rule-heavy) solid var(--frame); box-shadow: var(--shadow-lift); }
  .tutor-guest .tutor-body { flex: none; padding-bottom: var(--s-5); }
}

/* ---- phones ---- */
@media (max-width: 640px) {
  .library-offer { padding: var(--s-4); }
  .library-offer p { font-size: 1rem; }
  .code-input { font-size: 1.25rem; }
}


/* ---- dossier holders (P19) ---- */
.dossier-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin: 0; padding: var(--s-2) var(--s-4); border: 1.5px solid var(--ok); border-radius: 999px; background: var(--ok-tint); font-weight: 700; }
.dossier-badge .i { color: var(--ok); }
.dossier-subject { font-weight: 600; color: var(--fg-2); }
.dossier-detail { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.dossier-what { list-style: none; display: grid; gap: var(--s-2); margin: 0 0 var(--s-5); padding: 0; }
.dossier-what li { display: flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.dossier-what .i { color: var(--ok); flex: none; }
.dossier-track + .dossier-track, .dossier-track + .dossier-claim-box { margin-top: var(--s-8); }
.dossier-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); margin: var(--s-4) 0 var(--s-5); }
.dossier-banks { list-style: none; margin: 0; padding: 0; }
.dossier-bank { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-1) var(--s-4); padding: var(--s-4) 0; border-top: 1px solid var(--control); }
.dossier-bank-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); font-weight: 700; color: inherit; text-decoration: none; }
.dossier-bank-name .code { font-weight: 600; color: var(--fg-3); white-space: nowrap; }
.dossier-count { font-size: var(--fs-small); color: var(--fg-2); white-space: nowrap; }
.dossier-bank .strip { grid-column: 1 / -1; margin: var(--s-1) 0; height: 12px; }
.dossier-bank .btn-link { grid-column: 1 / -1; justify-self: start; }
.dossier-claim-box h2 { margin-bottom: var(--s-4); }
.dossier-claim { max-width: 32rem; }
.dossier-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); margin: var(--s-3) 0 0; font-size: var(--fs-small); }
.dossier-line .i { color: var(--ok); }
.dossier-line-badge { font-weight: 700; }
.dossier-line a { white-space: nowrap; }
.on-ink .dossier-line a { color: inherit; }

/* one live device per paying account (2 Oct 2026): why the subscription is off on this device */
.device-banner { padding-top: var(--s-4); }
.device-banner .notice { margin: 0; }

/* ---- the exam of the most important questions (/<prefix>/exam) ---- */
.exam-stars { color: var(--bad); letter-spacing: 0.05em; }
.exam-chapters, .exam-size { border: 0; margin: 0 0 var(--s-5); padding: 0; min-width: 0; }
.exam-chapters legend, .exam-size legend { padding: 0; margin-bottom: var(--s-2); font-family: var(--font-display); font-weight: 700; }
.exam-chapter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.exam-chapter-name { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-3); }
.exam-chapter-name .code { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--fg-3); white-space: nowrap; }
.exam-chapter-name .nm { font-weight: 700; }
.exam-chapter-name .nm-other { flex-basis: 100%; font-size: var(--fs-small); color: var(--fg-3); }
.exam-chapter-name .tag { margin-top: var(--s-1); }
.exam-chapter { padding-block: var(--s-3); }
.exam-chapter.is-empty { opacity: 0.6; cursor: default; }
.exam-size-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.exam-size-opt { min-height: 48px; }
.exam-size-opt.is-off { opacity: 0.5; cursor: default; }
.exam-bar { position: sticky; top: 0; z-index: 2; background: var(--bg); }
.exam-clock { display: inline-flex; align-items: center; gap: var(--s-1); font-family: var(--font-mono); font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.exam-pos { font-weight: 700; }
.exam-q .q-head { margin-bottom: var(--s-3); }
.exam-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-5); }
.exam-list { margin-top: var(--s-6); }
.exam-list h2 { font-size: 1rem; margin-bottom: var(--s-3); }
.exam-list ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(2.75rem, 1fr)); gap: var(--s-2); }
.exam-list button { width: 100%; min-height: 2.75rem; border: 1.5px solid var(--control); border-radius: var(--r); background: var(--raised); color: var(--fg); font: 600 0.9375rem var(--font-mono); cursor: pointer; }
.exam-list button.is-done { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.exam-list button[aria-current="true"] { box-shadow: 0 0 0 3px var(--accent); }
.exam-warn { margin: 0; flex-basis: 100%; color: var(--review); font-weight: 700; }
.exam-time { margin: 0; font-weight: 600; color: var(--fg-2); }
.exam-score-table { width: 100%; max-width: 36rem; border-collapse: collapse; font-size: var(--fs-small); }
.exam-score-table th, .exam-score-table td { padding: var(--s-2) var(--s-2); border-bottom: 1px solid var(--rule); text-align: start; }
.exam-score-table td { font-family: var(--font-mono); white-space: nowrap; text-align: end; }
.exam-score-table .code { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--fg-3); margin-inline-end: var(--s-2); }
.exam-review { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); }
.exam-review .q { border-inline-start: 4px solid var(--rule); }
.exam-review .q.is-right { border-inline-start-color: var(--ok); }
.exam-review .q.is-wrong { border-inline-start-color: var(--bad); }
.exam-review-title { margin: var(--s-6) 0 var(--s-4); }
.tag-came { background: var(--review-tint); color: var(--review); }
.exam-sol { margin-top: var(--s-3); }
.exam-sol h4 { font-size: var(--fs-small); margin: 0 0 var(--s-1); color: var(--fg-2); }
.bank-more { margin: 0 0 var(--s-5); }

/* ---- the digital dossier, read on the site (/<prefix>/dossier) ---- */
.reader-wrap { padding-block: var(--s-5) var(--section); }
.reader-lead { margin: 0 0 var(--s-4); color: var(--fg-2); }
.reader-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-2) 0; background: var(--bg); border-bottom: 1px solid var(--rule); }
.reader-count { font-family: var(--font-mono); font-size: var(--fs-small); font-weight: 600; }
.reader-zoom { display: inline-flex; align-items: center; gap: var(--s-1); }
.reader-zoom .btn-secondary { min-width: 2.75rem; font-size: 1.125rem; }
.reader-go { display: inline-flex; align-items: center; gap: var(--s-2); margin-inline-start: auto; font-size: var(--fs-small); }
.reader-go .input { width: 5.5rem; }
/* the pages are left-to-right sheets: a zoomed page scrolls from its left edge */
.reader-scroll { direction: ltr; overflow-x: auto; margin-top: var(--s-4); }
.reader-pages { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: var(--s-4); width: 100%; max-width: 920px; }
.reader-scroll.is-zoomed .reader-pages { max-width: none; }
.reader-page { position: relative; background: #fff; border: 1px solid var(--rule); box-shadow: var(--shadow-sheet); scroll-margin-top: 4rem; }
.reader-page img { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* a page whose picture reader.js has not asked for yet (it comes near the screen first): a blank sheet, not its alt words */
.reader-page img:not([src]) { visibility: hidden; }
.reader-link { position: absolute; display: block; border-radius: var(--r); }
.reader-link:hover, .reader-link:focus-visible { background: var(--accent-tint); box-shadow: inset 0 0 0 2px var(--accent); outline: none; }
/* the reader's email over each page (pages/digital.js markHtml, owner, 4 Nov 2026): faint, slanted, over the
   picture; left to right; never in the way of a click on a link under it, a selection or a screen reader */
.reader-mark { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.reader-mark text { direction: ltr; unicode-bidi: isolate; text-anchor: middle; dominant-baseline: central; font-family: var(--font-text); font-weight: 700; fill: #1D1913; fill-opacity: 0.12; }
.reader-more { margin-top: var(--s-6); }
/* nothing on a page to select or to long-press (owner, 30 Oct 2026: "no one can steal it") */
.reader-page { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* a run of pages the viewer may not read: one card in their place, an anchor for each page (pages/digital.js) */
.reader-lock { scroll-margin-top: 4rem; }
.reader-lock .reader-more { margin: 0; }
.reader-anchor { display: block; height: 0; scroll-margin-top: 4rem; }
/* a page that did not load says so in its place and asks again (reader.js); no picture, so no mark over its words */
.reader-page.is-failed img, .reader-page.is-failed .reader-mark { visibility: hidden; }
.reader-failed { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s-3); padding: var(--s-5); text-align: center; color: #1a1a1a; }
.reader-failed p { margin: 0; max-width: 32ch; }
/* the cards and notes read in the page's own direction inside the left-to-right sheets */
[dir="rtl"] .reader-lock, [dir="rtl"] .reader-failed { direction: rtl; }
/* printed, the reader shows one line and no page of the dossier */
.reader-print-note { display: none; }
@media print {
  .reader-bar, .reader-scroll, .reader-pages, .reader-page, .reader-page img { display: none !important; }
  .reader-print-note { display: block !important; }
}
@media (max-width: 560px) {
  .reader-bar { gap: var(--s-2) var(--s-3); }
  .reader-go label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .reader-go .input { width: 4.5rem; }
  .reader-pages { gap: var(--s-2); }
  /* the bar takes two rows on a phone: a jump to #p-<n> (a lesson's «اقرأها بالدوسية») lands below it */
  .reader-page, .reader-lock, .reader-anchor { scroll-margin-top: 8rem; }
}

/* ---- an essay question: tables and lines of boxes (essay.js) ----
   Left to right inside the Arabic page; every box at least a tap tall, its
   type 16px so a phone does not zoom; a table wider than the phone scrolls
   inside its card, never the page, with a shadow at the edge it hides and a
   line saying so. A box's width follows its keyboard only, never its answer;
   its number sits on its top border, so the whole box is for the answer. */
.q-essay { min-width: 0; }
.essay { margin: 0 0 var(--s-4); font-family: "Public Sans", var(--font-text); font-size: 1rem; text-align: left; }
.essay-line { margin: 0 0 var(--s-3); line-height: 1.6; overflow-wrap: anywhere; }
.essay-line .ebox { margin: 0.55rem 0.15rem 0.2rem; }
.essay-wrap {
  max-width: 100%; margin: 0 0 var(--s-3); border: 1px solid var(--rule); border-radius: var(--r);
  background:
    linear-gradient(to right, var(--bg) 40%, transparent) left center / 2rem 100% no-repeat local,
    linear-gradient(to left, var(--bg) 40%, transparent) right center / 2rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(29, 25, 19, 0.22), transparent) left center / 0.85rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(29, 25, 19, 0.22), transparent) right center / 0.85rem 100% no-repeat scroll,
    var(--bg);
}
.essay-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.essay-swipe { margin: calc(-1 * var(--s-2)) 0 var(--s-3); font-size: var(--fs-small); color: var(--fg-3); }
.essay-table { width: 100%; font-family: "Public Sans", var(--font-text); font-size: 1rem; }
.essay-table th, .essay-table td { border: 0; border-bottom: 1px solid var(--rule); padding: 0.4rem 0.5rem; text-align: left; vertical-align: middle; }
.essay-table th { font-size: var(--fs-small); color: var(--fg-2); }
.essay-table td:not(.has-box) { min-width: 4rem; }
.essay-table tr:last-child td { border-bottom: 0; }
.essay-table td.has-box { padding: 0.65rem 0.2rem 0.3rem; }
.ebox {
  position: relative; display: inline-flex; align-items: center; min-height: var(--tap); min-width: 5.5rem; padding: 0 0.5rem;
  background: var(--raised); border: 1.5px solid var(--control); border-radius: var(--r);
  vertical-align: middle; font-size: 16px; line-height: 1.3; color: var(--fg); direction: ltr; unicode-bidi: isolate; text-align: left; white-space: nowrap;
}
.ebox-text { min-width: 9rem; }
td .ebox { display: flex; width: 100%; min-width: 4.75rem; }
td .ebox-text { min-width: 8rem; }
.ebox-n { position: absolute; top: -0.6rem; left: 0.4rem; padding: 0 0.25rem; background: var(--raised); border-radius: var(--r); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; line-height: 1.1; color: var(--fg-3); }
.ebox-v { flex: 1 1 auto; min-width: 0; }
.ebox-number .ebox-v { text-align: right; font-variant-numeric: tabular-nums; }
.ebox-in { flex: 1 1 auto; min-width: 0; width: 100%; min-height: calc(var(--tap) - 3px); padding: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: inherit; direction: ltr; text-align: left; }
.ebox-number .ebox-in { text-align: right; }
.ebox-in:focus { outline: none; }
.ebox:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--fg); }
.ebox-done { border-color: var(--fg-3); font-weight: 700; }
.ebox-done.ebox-empty .ebox-v { font-weight: 400; color: var(--fg-3); text-align: center; }
.essay-reveal { margin: 0 0 var(--s-2); }
.essay-reveal .btn[aria-busy="true"] { cursor: progress; }
.fb-sol { margin: var(--s-3) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--rule); }
.fb-sol-h { margin: 0 0 var(--s-1); font-size: var(--fs-small); font-weight: 700; color: var(--fg-2); }
.fb-sol-text { text-align: left; font-family: "Public Sans", var(--font-text); }
.fb-sol-text p:last-child { margin-bottom: 0; }
/* ---- a lesson's essay question: typed, then checked by the server ----
   After a try each box is green or red, and its number tag carries ✓ or ✗
   (never the colour alone). A number box has a small ± key on its top border,
   opposite its number, so it takes nothing from the box's width. A line under
   a box: the right spelling once settled, or «type the account in English». */
.ebox-ok { border-color: var(--ok); background: var(--ok-tint); }
.ebox-bad { border-color: var(--bad); background: var(--bad-tint); }
.ebox-ok .ebox-n { color: var(--ok); }
.ebox-bad .ebox-n { color: var(--bad); }
.ebox-mark { margin-left: 0.2rem; font-family: var(--font-text); font-weight: 700; }
.ebox-pm {
  position: absolute; top: -0.7rem; right: 0.3rem; z-index: 1; min-width: 1.75rem; height: 1.3rem; padding: 0 0.35rem;
  border: 1px solid var(--control); border-radius: var(--r); background: var(--raised); color: var(--fg-2);
  font: 700 0.9rem/1.2 var(--font-mono); cursor: pointer; touch-action: manipulation;
}
.ebox-pm::before { content: ""; position: absolute; inset: -0.6rem -0.5rem -0.35rem; }
.ebox-pm:hover { color: var(--fg); border-color: var(--fg-3); }
.ebox-pm:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ebox-note { display: block; margin: 0.3rem 0 0; font-family: var(--font-text); font-size: var(--fs-small); font-weight: 600; line-height: 1.35; white-space: normal; text-align: start; }
.ebox-ok + .ebox-note { color: var(--ok); }
.ebox-bad + .ebox-note { color: var(--bad); }
.essay-line .ebox-note { display: inline-block; margin: 0 0.3rem; vertical-align: middle; }
/* a line under one box makes its row taller: the row's boxes stay level at the top */
.essay-table td.has-box { vertical-align: top; }
/* a box to type in, in a line of working: as wide as its keyboard needs, so the line reads on a phone */
.essay-line .ebox-number .ebox-in { width: 6.5rem; }
.essay-line .ebox-text .ebox-in { width: 9.5rem; }
.essay-check { margin: 0 0 var(--s-2); }
.essay-check .btn[aria-busy="true"] { cursor: progress; }
.essay-msg { margin: 0 0 var(--s-2); font-size: var(--fs-small); color: var(--fg-2); }

/* ---- essay questions in the exam and the practice test: the boxes while sitting it, then the result ---- */
/* a grid item never takes the width of a wide table: the table scrolls in its card */
.res-answers .essay, .fb .essay, .exam-card .essay { min-width: 0; }
.res-answers .essay { margin: 0; }
.fb .essay { margin: var(--s-2) 0 0; }
.res-boxes { margin: 0; font-weight: 700; }
.res-boxes-note { margin: 0; font-size: var(--fs-small); color: var(--fg-2); }

/* ===== 16 Oct 2026 (owner): Home's two ways in under the hero, the subject
   page's short chapter list with the card beside it, the test banks' chapter
   numbers. The level tests are gone. ===== */
.entries { padding-block: var(--s-6) var(--s-8); }
/* the landing page leads to the videos (the owner, 13 Nov 2026: students come from our links to watch them): the
   subjects with their videos under the hero, then one way in to the question banks and the digital dossier
   (pages/home.js homeSubjects, ways) */
.home-subjects { padding-block: var(--s-6) 0; scroll-margin-top: 5rem; }
.home-all { margin: var(--s-4) 0 0; font-weight: 700; }
.home-all a { display: inline-flex; align-items: center; gap: var(--s-2); }
.entries-grid.entries-one { grid-template-columns: minmax(0, 1fr); max-width: 44rem; }
.entries-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.entry {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); height: 100%;
  padding: var(--s-5); background: var(--raised); border: 1px solid var(--rule); border-top: var(--rule-heavy) solid var(--accent);
  border-radius: var(--r); color: var(--fg); text-decoration: none; transition: background-color var(--t-fast), border-color var(--t-fast);
}
.entry:hover { background: var(--hover); color: var(--fg); border-color: var(--fg); border-top-color: var(--accent); }
.entry-icon { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: var(--r); background: var(--ink); color: var(--mint); }
.entry-icon .i { width: 1.6rem; height: 1.6rem; }
.entry-title { display: block; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.3; }
.entry-line { display: block; margin-top: var(--s-1); font-size: var(--fs-small); color: var(--fg-2); }
.entry-go { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 2px solid var(--fg); border-radius: var(--r); transition: background-color var(--t-fast), color var(--t-fast); }
.entry:hover .entry-go { background: var(--fg); color: var(--bg); }

.subject-head-solo { grid-template-columns: minmax(0, 1fr); }
/* the subject page without its card, and the students' number shown large (the owner, 13 Nov 2026) */
.subject-layout.subject-layout-solo { grid-template-columns: minmax(0, 1fr); }
.subject-students { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 0; color: var(--mint); font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; }
.subject-students .i { width: 1.35em; height: 1.35em; }
.tag-students { display: inline-flex; align-items: center; gap: 0.3rem; margin-inline-start: var(--s-2); }
.tag-students .i { width: 1em; height: 1em; }
.subject-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s-7); align-items: start; margin-top: var(--s-6); }
.subject-side { position: sticky; top: var(--s-5); }
.subject-side .progress-panel { background: var(--ink); }
.side-title { margin: 0 0 var(--s-2); font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; }
.chapters-title { font-size: var(--fs-h3); margin: 0 0 var(--s-3); }
.chapters .chapter { margin: 0; padding: 0; border-top: 0; border-bottom: 1px solid var(--rule); scroll-margin-top: var(--s-5); }
/* the one trace of progress (the owner, 13 Nov 2026): a green line under a chapter's row, as long as the share of its
   videos finished; and a small mark beside the count of the last chapter opened (pages/subject.js chapterLine) */
.chapter-line { margin-top: calc(-1 * var(--s-2)); padding-bottom: var(--s-3); }
.chapter-line svg { display: block; width: 100%; height: 5px; border-radius: 3px; overflow: hidden; }
.chapter-line-bg { fill: var(--quiet); }
.chapter-line-done { fill: var(--mint); }
.chapter-last { display: inline-flex; align-items: center; gap: 0.35rem; margin-inline-end: var(--s-2); padding: 0.1rem 0.55rem; border-radius: var(--r-round); background: var(--accent-tint); color: var(--mint-ink); font-weight: 700; white-space: nowrap; }
.chapter-last::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--mint); }
.chapters .chapter:first-of-type { border-top: var(--rule-heavy) solid var(--fg); }
/* a chapter's line opens the chapter's own page (owner, 17 Oct 2026: no dropdown) */
.chapters .chapter-head {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto 1.25rem; gap: var(--s-4); align-items: center;
  margin: 0; padding: var(--s-3) var(--s-2); min-height: 64px; color: var(--fg); text-decoration: none; transition: background-color var(--t-fast);
}
.chapters .chapter-head:hover { background: var(--hover); color: var(--fg); }
.chapter-go { display: grid; place-items: center; color: var(--fg-3); transition: transform var(--t-fast); }
.chapter-go .i { width: 1.1rem; height: 1.1rem; }
.chapters .chapter-head:hover .chapter-go { color: var(--fg); }
.chapters .chapter-num { font-size: 1.5rem; line-height: 1; letter-spacing: 0; text-align: center; }
.chapters .chapter-kicker { font-size: var(--fs-meta); }
.chapters .chapter-name { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.45; }
.chapters .chapter-progress { font-size: var(--fs-meta); color: var(--fg-3); white-space: nowrap; text-align: end; }
/* a chapter listed before anything of it is on the site («قريباً», catalog.js soon): no link, so no hover; greyed, with its other name under it */
.chapters .chapter.is-soon .chapter-head:hover { background: none; }
.chapters .chapter.is-soon .chapter-num, .chapters .chapter.is-soon .chapter-name { color: var(--fg-3); }
.chapters .chapter.is-soon .nm-other { display: block; font-size: var(--fs-meta); line-height: 1.45; color: var(--fg-3); }
.chapters .chapter.is-soon .chapter-progress .state { font-size: inherit; }
/* a phone: the chapter line wraps instead of running off the screen (8 Nov 2026: «9 فيديوهات بتفتح بالاشتراك أو بالدوسية» is longer than the old word) */
@media (max-width: 600px) { .chapters .chapter-progress { white-space: normal; min-width: 0; } }
.chapters .concepts { margin: 0 0 var(--s-4); }

/* the test banks of a subject: the same numbered lines as the subject page's chapters */
.bank-chapters { margin-top: var(--s-6); }
/* a chapter's own page: its concepts, the way in, then its test bank, set apart */
.chapter-page-kicker { margin: 0 0 var(--s-2); font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; color: var(--mint); }
.chapter-body { padding-block: var(--s-6) var(--section); }
.chapter-way { margin: 0 0 var(--s-5); }
.chapter-concepts { margin: 0; border-top: var(--rule-heavy) solid var(--fg); }
.chapter-banks { display: grid; gap: var(--s-3); margin-top: var(--s-6); padding-top: var(--s-5); border-top: var(--rule-heavy) solid var(--fg); }
.chapter-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid var(--rule); }

@media (max-width: 900px) {
  .entries-grid { grid-template-columns: minmax(0, 1fr); }
  .subject-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .subject-side { position: static; order: -1; }
}
@media (max-width: 640px) {
  .entry { grid-template-columns: auto minmax(0, 1fr); padding: var(--s-4); }
  .entry-go { display: none; }
  .chapters .chapter-head { grid-template-columns: 2rem minmax(0, 1fr) 1rem; gap: var(--s-1) var(--s-3); }
  .chapters .chapter-progress { grid-column: 2; grid-row: 2; text-align: start; }
  .chapters .chapter-go { grid-column: 3; grid-row: 1; }
  .next-card { grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4); min-height: 88px; }
  .next-go { display: none; }
  .next-disc { width: 3rem; height: 3rem; }
  .next-card .next-name { font-size: 1.125rem; }
  .gate-video { aspect-ratio: auto; }
  .gate-body { padding: var(--s-6) var(--s-4); }
  .gate-question .gate-body { padding: var(--s-4) var(--s-3); }
  .gate-actions { flex-direction: column; align-self: stretch; }
  .gate-actions .btn { width: 100%; }
}

/* ===== The admin panel (owner, 16 Oct 2026): /ar/admin/, admin accounts only ===== */
.admin-nav ul { list-style: none; display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-2); margin: 0 0 var(--s-6); }
.admin-nav a { display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap; min-height: 44px; padding: var(--s-2) var(--s-4);
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--raised); color: var(--fg); text-decoration: none; font-weight: 600; font-size: var(--fs-small); }
.admin-nav a:hover { border-color: var(--fg); color: var(--fg); }
.admin-nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.admin-nav .i { width: 1.1rem; height: 1.1rem; }
.stat-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--s-3); margin: 0 0 var(--s-7); }
.stat { display: grid; gap: var(--s-1); height: 100%; padding: var(--s-4) var(--s-5); background: var(--raised); border: 1px solid var(--rule);
  border-top: var(--rule-heavy) solid var(--accent); border-radius: var(--r); color: var(--fg); text-decoration: none; }
a.stat:hover { border-color: var(--fg); border-top-color: var(--accent); color: var(--fg); background: var(--hover); }
.stat-num { font-family: var(--font-display); font-weight: 900; font-size: 2.25rem; line-height: 1.1; }
.stat-label { font-weight: 700; }
.stat-note { font-size: var(--fs-meta); color: var(--fg-3); line-height: 1.5; }
.admin-section { margin-top: var(--s-7); }
.admin-section .block-head h2 { font-size: var(--fs-h3); }
.admin .table-wrap { position: relative; }   /* a hidden label in a wide table stays inside its scroller */
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.admin-table th, .admin-table td { text-align: start; vertical-align: top; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--rule); }
.admin-table th { font-weight: 700; color: var(--fg-2); background: var(--quiet); white-space: nowrap; }
.admin-table tbody tr:hover { background: var(--hover); }
.admin-table .btn { margin: 2px 0; }
.admin-sub { display: block; font-size: var(--fs-meta); color: var(--fg-3); }
.admin-empty, .admin-line { color: var(--fg-2); font-size: var(--fs-small); }
.admin-msg { display: inline-block; margin-inline-start: var(--s-2); font-size: var(--fs-small); font-weight: 600; color: var(--ok); }
.admin-msg.is-bad { color: var(--bad); }
.admin-thumb { width: 4.5rem; height: auto; border-radius: var(--r); border: 1px solid var(--rule); }
.admin-search { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-4); }
.admin-search .input { flex: 1 1 16rem; }
.admin-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0 var(--s-4); align-items: end; padding: var(--s-5);
  background: var(--quiet); border-radius: var(--r); }
.admin-form .field > span { font-weight: 700; font-size: var(--fs-small); }
.admin-form-go { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.admin-facts { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s-3); margin: 0; }
.admin-facts li { display: grid; gap: 2px; padding: var(--s-3) var(--s-4); background: var(--raised); border: 1px solid var(--rule); border-radius: var(--r); }
.admin-facts li > span:first-child { font-size: var(--fs-meta); color: var(--fg-3); font-weight: 700; }
.admin-card { padding: var(--s-4) var(--s-5); background: var(--raised); border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: var(--s-4); }
.admin-inline { display: inline-flex; gap: var(--s-2); align-items: center; }
/* the activity section (owner, 17 Oct 2026): a range picker and a bar per row */
.admin-range ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-4); padding: 0; }
.admin-range a { display: inline-flex; align-items: center; min-height: 44px; padding: var(--s-2) var(--s-4); border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--raised); color: var(--fg); text-decoration: none; font-weight: 600; font-size: var(--fs-small); }
.admin-range a:hover { border-color: var(--fg); color: var(--fg); }
.admin-range a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.admin-bar-cell { display: flex; align-items: center; gap: var(--s-2); min-width: 9rem; font-variant-numeric: tabular-nums; }
.admin-bar { flex: 1 1 auto; height: 0.6rem; background: var(--quiet); border-radius: 999px; overflow: hidden; }
.admin-bar > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.admin-zero { color: var(--fg-3); }
.admin-nowrap { white-space: nowrap; }
.admin-notes { margin: 0; padding-inline-start: 1.2em; color: var(--fg-2); font-size: var(--fs-small); line-height: 1.8; }
/* «الزوار»: a student's visits, each opening to its pages */
.admin-visit + .admin-visit { margin-top: var(--s-2); }
.admin-visit summary { cursor: pointer; white-space: nowrap; font-weight: 600; color: var(--accent-fg); }
.admin-visit summary:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 2px; }
.admin-visit ol { margin: var(--s-2) 0 0; padding-inline-start: 1.2em; min-width: 18rem; line-height: 1.7; }
.admin-visit li .admin-sub { display: inline; }
.input-small { min-height: 40px; padding: 0.3rem 0.6rem; font-size: var(--fs-small); width: auto; }

/* ===== 17 Oct 2026 (owner, phase 2): the lesson player, the line on top of
   every lesson video, a short Home, the subject's one way to its test banks,
   the language switch in the footer, quieter rows ===== */

/* the line on top of every lesson video; it names no one */
.video-line { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.5; color: var(--accent-fg); }
.video-line .i { flex: none; width: 1.3em; height: 1.3em; margin-top: 0.05em; color: var(--accent-fg); }

/* the lesson player (assets/site/player.js): YouTube's controls, the time left to right */
.stage.has-player { background: #000; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.stage.has-player video { object-fit: contain; }
.pl { position: absolute; inset: 0; z-index: 3; color: #FBF9F5; direction: ltr; }
.pl-zones { position: absolute; inset: 0; display: grid; grid-template-columns: 35fr 30fr 35fr; }
.pl-zone { cursor: pointer; touch-action: manipulation; }   /* a double tap goes 5 s, never a zoom */
.has-player.pl-playing:not(.pl-show) .pl-zone { cursor: none; }
.pl-center, .pl-bottom { transition: opacity 180ms ease; }
.has-player:not(.pl-show) .pl-center, .has-player:not(.pl-show) .pl-bottom { opacity: 0; pointer-events: none; }
.pl-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: clamp(1.25rem, 6vw, 3.5rem); pointer-events: none; }
.pl-center > .pl-btn { pointer-events: auto; }
.pl-btn { display: grid; place-items: center; flex: none; padding: 0; border: 0; border-radius: var(--r-round); background: none; color: inherit; cursor: pointer; }
.pl-btn svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.pl-btn:focus-visible, .pl-track:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.pl-play { width: 4.5rem; height: 4.5rem; padding: 1.05rem; background: rgba(21, 18, 14, 0.62); }
.pl-skip { width: 3.1rem; height: 3.1rem; padding: 0.6rem; background: rgba(21, 18, 14, 0.5); }
.pl-play:hover, .pl-skip:hover { background: rgba(21, 18, 14, 0.8); }
.pl-wait .pl-play { animation: pl-wait 1.1s ease-in-out infinite; }
@keyframes pl-wait { 50% { opacity: 0.55; } }
.pl-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 0.75rem 0.25rem; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72)); }
.pl-track { position: relative; display: flex; align-items: center; height: 1.4rem; cursor: pointer; touch-action: none; }
.pl-rail { position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(251, 249, 245, 0.3); transition: height 120ms ease; }
.pl-track:hover .pl-rail, .pl-drag .pl-rail { height: 6px; }
.pl-buf, .pl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; }
.pl-buf { background: rgba(251, 249, 245, 0.45); }
.pl-fill { background: var(--mint); }
.pl-knob { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--mint); transform: scale(0.85); transition: transform 120ms ease; }
.pl-track:hover .pl-knob, .pl-drag .pl-knob { transform: scale(1.15); }
.pl-row { display: flex; align-items: center; gap: 0.25rem; min-height: 2.75rem; }
.pl-full, .pl-mute { width: 2.75rem; height: 2.75rem; padding: 0.6rem; }
.pl-full { margin-left: auto; }   /* full screen at the right end of the row */
/* the speed and the captions, then full screen, at the right end (19 Oct 2026) */
.pl-tools { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.pl-tools .pl-full { margin-left: 0; }
.pl-speed, .pl-cc, .pl-qual { min-width: 2.75rem; height: 2.75rem; padding: 0 0.45rem; border-radius: var(--r); font-family: var(--font-mono); font-size: 0.875rem; font-weight: 700; color: #FBF9F5; }
.pl-speed:hover, .pl-cc:hover, .pl-qual:hover, .pl-qual[aria-expanded="true"] { background: rgba(251, 249, 245, 0.12); }
.pl-cc { opacity: 0.7; }
.pl-cc.on { opacity: 1; box-shadow: inset 0 -3px 0 var(--mint); }
/* the quality (29 Oct 2026): beside the speed, its menu above the bar at the right end */
.pl-qual { white-space: nowrap; }
.pl-menu { position: absolute; right: 0.75rem; bottom: 3.25rem; z-index: 5; min-width: 9.5rem; max-width: calc(100% - 1.5rem); max-height: calc(100% - 3.75rem); overflow-y: auto; overscroll-behavior: contain;
  padding: 0.3rem 0; border-radius: var(--r); background: rgba(21, 18, 14, 0.94); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); color: #FBF9F5; }
.pl-menu[hidden] { display: none; }
.pl-menu-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 2.5rem; padding: 0 0.9rem; border: 0; background: none; color: inherit; font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; text-align: start; white-space: nowrap; cursor: pointer; }
.pl-menu-item:hover { background: rgba(251, 249, 245, 0.12); }
.pl-menu-item:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; background: rgba(251, 249, 245, 0.12); }
.pl-menu-mark { flex: none; width: 1.1rem; height: 1.1rem; color: var(--mint); visibility: hidden; }
.pl-menu-mark svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.pl-menu-item[aria-checked="true"] .pl-menu-mark { visibility: visible; }
.pl-menu-item[aria-checked="true"] { color: #FFFFFF; }
.pl-menu-word { unicode-bidi: plaintext; }
.pl-ended .pl-menu { display: none; }
/* the sections (6 Nov 2026): a thin gap in the bar where each part starts, and the list under a button
   before the speed (its time, then its name), the one playing ticked; the name of the one playing sits
   beside the button only where the player is wide enough */
.pl { container-type: inline-size; }
.pl-mark { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: rgba(10, 9, 7, 0.85); pointer-events: none; }
.pl-mark[hidden] { display: none; }
.pl-sec { display: flex; flex: 0 1 auto; align-items: center; gap: 0.4rem; min-width: 2.75rem; max-width: 13rem; height: 2.75rem; padding: 0 0.55rem; border-radius: var(--r); font-size: 0.8125rem; font-weight: 600; color: #FBF9F5; }
.pl-sec svg { flex: none; width: 1.3rem; height: 1.3rem; }
.pl-sec:hover, .pl-sec[aria-expanded="true"] { background: rgba(251, 249, 245, 0.12); }
.pl-sec-now { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.pl-sec-now:empty { display: none; }
@container (max-width: 720px) { .pl-sec-now { display: none; } }
.pl-sec-menu { width: min(22rem, calc(100% - 1.5rem)); }
.pl-sec-menu .pl-menu-item { padding-block: 0.3rem; white-space: normal; }
.pl-menu-time { flex: none; min-width: 2.75rem; font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; font-variant-numeric: tabular-nums; text-align: start; opacity: 0.75; }
.pl-cap { position: absolute; left: 50%; bottom: 4.75rem; transform: translateX(-50%); max-width: min(92%, 46rem); padding: 0.3rem 0.75rem; border-radius: var(--r); background: rgba(10, 9, 7, 0.78); color: #FBF9F5; font-size: clamp(0.95rem, 0.8rem + 0.7vw, 1.3rem); line-height: 1.6; text-align: center; pointer-events: none; }
.has-player:not(.pl-show) .pl-cap { bottom: 1.5rem; }
.pl-ended .pl-cap { display: none; }
/* a phone's player is short: the line never sits on the middle buttons, so it steps aside while they show */
@media (max-width: 640px) {
  .pl-cap { bottom: 0.4rem; font-size: 0.85rem; line-height: 1.5; }
  .has-player.pl-show .pl-cap { opacity: 0; }
  .has-player:not(.pl-show) .pl-cap { bottom: 0.4rem; }
}
/* the end screen: the questions first, then the next lesson */
.pl-end { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 1rem; background: rgba(10, 9, 7, 0.82); text-align: center; }
.pl-end[hidden] { display: none; }
.pl-end-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.pl-end-q, .pl-end-next { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0.6rem 1.4rem; border-radius: var(--r); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; }
.pl-end-q { border: 0; background: var(--mint); color: #15120E; }
.pl-end-offer { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0.6rem 1.4rem; border-radius: var(--r);
  border: 1.5px solid var(--mint); color: var(--mint); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.pl-end-offer:hover { background: rgba(78, 217, 164, 0.12); }
.pl-end-next { border: 1.5px solid rgba(251, 249, 245, 0.7); color: #FBF9F5; }
.pl-end-word { font-size: 0.8rem; font-weight: 600; opacity: 0.8; }
.pl-end-name { font-size: 1rem; }
.pl-end-again { border: 0; background: none; color: #D9D1C3; font-size: 0.9rem; text-decoration: underline; cursor: pointer; }
.pl-ended .pl-center { opacity: 0; pointer-events: none; }
/* the line under the play label: what follows the video */
.play-note { font-size: var(--fs-small); color: var(--fg-2); }
.stage:has(.stage-poster) .play-note { color: #D9D1C3; }
.pl-vol { display: flex; align-items: center; gap: 0.25rem; }
.pl-range { width: 5.5rem; accent-color: var(--mint); cursor: pointer; }
.pl-time { padding-inline: 0.25rem; font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (hover: none), (pointer: coarse) { .pl-vol { display: none; } }
.pl-flash { position: absolute; top: 50%; padding: 0.5rem 0.95rem; border-radius: var(--r-round); background: rgba(21, 18, 14, 0.66); font-family: var(--font-mono); font-weight: 600; font-size: 1rem; white-space: nowrap; opacity: 0; transform: translateY(-50%); pointer-events: none; transition: opacity 160ms ease; }
.pl-flash-back { left: 10%; }
.pl-flash-fwd { right: 10%; }
.pl-flash.on { opacity: 1; }
.stage.has-player:fullscreen { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; margin: 0; border-radius: 0; }
.stage.has-player:-webkit-full-screen { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; margin: 0; border-radius: 0; }
@media (max-width: 640px) {
  .pl-play { width: 3.75rem; height: 3.75rem; padding: 0.85rem; }
  .pl-skip { width: 2.75rem; height: 2.75rem; padding: 0.5rem; }
  .pl-bottom { padding: 1.5rem 0.5rem 0.1rem; }
  .pl-row { min-height: 2.5rem; }
  .pl-full { width: 2.5rem; height: 2.5rem; padding: 0.55rem; }
  /* the sign of a tap sits above the 5-second buttons, not over them */
  .pl-flash { top: 24%; }
  /* the quality: a narrower button, the time gives way before the row runs out of the picture,
     and the menu takes the picture's whole height at its right end, over the row, so all
     four choices fit a phone's short player (180 px tall at 320 px across) */
  .pl-qual { min-width: 2.5rem; height: 2.5rem; padding: 0 0.3rem; font-size: 0.8125rem; }
  .pl-time { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .pl-menu { right: 0.5rem; bottom: 0.4rem; max-width: calc(100% - 1rem); max-height: calc(100% - 0.8rem); }
  .pl-menu-item { min-height: 2.25rem; font-size: 0.875rem; }
  /* the sections: one more button in the row, so with it the row's buttons sit a little closer and narrower
     (the time keeps its room at 320 px); a player without sections is as before. The list takes the picture's
     width at its right, over the row, as the quality's does */
  .pl-with-sec .pl-row { gap: 0.15rem; }
  .pl-with-sec .pl-tools { gap: 0.1rem; }
  .pl-with-sec .pl-time { padding-inline: 0.1rem; font-size: 0.71875rem; }
  .pl-with-sec .pl-speed, .pl-with-sec .pl-cc { min-width: 2.25rem; padding: 0 0.25rem; }
  .pl-with-sec .pl-full { width: 2.25rem; padding: 0.5rem; }
  .pl-sec { justify-content: center; width: 2.25rem; min-width: 2.25rem; height: 2.5rem; padding: 0 0.45rem; }
  .pl-sec-now { display: none; }
  .pl-sec-menu { width: calc(100% - 1rem); }
}
@media (prefers-reduced-motion: reduce) {
  .pl-center, .pl-bottom, .pl-flash, .pl-rail, .pl-knob { transition: none; }
  .pl-wait .pl-play { animation: none; }
}

/* a new visitor's Home: the two ways in, then one line on the tutor */
.home-tutor-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); padding: var(--s-5); background: var(--raised); border: 1px solid var(--rule); border-radius: var(--r); }
.home-tutor-line { margin: 0; max-width: none; font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.6; }
@media (max-width: 640px) {
  .home-tutor-card { grid-template-columns: auto minmax(0, 1fr); padding: var(--s-4); }
  .home-tutor-card .btn { grid-column: 1 / -1; justify-self: start; }
}

/* the subject page's one way to its test banks */
.book-block .subject-banks { max-width: 36rem; }
.book-block .subject-banks + .book-box { margin-top: var(--s-5); }

/* the dossier's «موقف» tag, not in the green that reads as «free» */
.tag-scenario { background: var(--quiet); color: var(--fg-2); border: 1px solid var(--rule); }

/* a locked lesson: the way to put the dossier's code in */
.locked-screen .lock-dossier { min-height: var(--tap); font-size: var(--fs-small); justify-content: flex-start; text-align: start; }

/* the bank page: the stars' legend on one line */
.page-head .stars-legend { white-space: nowrap; }
/* a small phone: the English legend is longer than the line, so it wraps between its parts */
@media (max-width: 420px) { .page-head .stars-legend { white-space: normal; } }

/* the language switch, now in the footer with the other links */
.footer-links .lang-switch { font-size: inherit; color: var(--fg); }
/* ===== «وضع الإنقاذ», rescue mode (owner, 17 Oct 2026): the time slider
   reframed. An ink screen in the gold of the old rescue pack: a bolt and two
   big buttons, «الميد» and «الفاينل». Then the chapters to tick, and a plan
   in three numbered steps. ===== */
.rescue-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4) var(--s-5);
  margin: 0 0 var(--s-6); padding: var(--s-5); border-radius: var(--r); background: var(--ink); color: var(--on-ink);
  border-top: var(--rule-heavy) solid var(--gold); box-shadow: var(--shadow-sheet);
}
.rescue-disc { width: 3.5rem; height: 3.5rem; border-radius: var(--r-round); background: var(--gold); color: var(--ink); display: grid; place-items: center; }
.rescue-disc .i { width: 1.9rem; height: 1.9rem; }
.rescue-words { min-width: 0; }
.rescue-kicker { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-small); color: var(--gold-on-ink); }
.rescue-title { margin: 2px 0 0; font-size: var(--fs-h3); line-height: 1.3; color: var(--on-ink); }
.rescue-line { margin: var(--s-1) 0 0; font-size: var(--fs-small); color: var(--on-ink-2); max-width: 46ch; }
.rescue-btns { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.btn-rescue { min-height: var(--btn-h-main); min-width: 8.5rem; padding-inline: 1.4rem; background: var(--gold); border-color: var(--gold); color: var(--ink); font-size: 1.125rem; font-weight: 800; }
.btn-rescue:hover { background: #E8BC4E; border-color: #E8BC4E; color: var(--ink); }
.btn-rescue .i-bolt { width: 1.3em; height: 1.3em; }
.rescue-card .rescue-more { grid-column: 2 / -1; margin: 0; font-size: var(--fs-small); }
.rescue-card .rescue-more a { color: var(--gold-on-ink); }
.rescue-card-compact { padding: var(--s-4); gap: var(--s-3) var(--s-4); margin-bottom: var(--s-5); }
.rescue-card-compact .rescue-disc { width: 2.75rem; height: 2.75rem; }
.rescue-card-compact .rescue-disc .i { width: 1.5rem; height: 1.5rem; }
.rescue-card-compact .rescue-title { font-size: 1.125rem; }
.rescue-card-compact .btn-rescue { min-height: var(--btn-h); min-width: 7rem; font-size: 1rem; }
.rescue-home { padding-top: 0; }
.rescue-home .rescue-card { margin: 0; }
.coming-rescue { margin-bottom: var(--section); }
.coming-rescue .rescue-card { margin: 0; }
/* the page: its ink head carries the bolt, then paper */
.rescue-head-kicker { display: inline-flex; align-items: center; gap: var(--s-2); margin: var(--s-5) 0 0; font-family: var(--font-display); font-weight: 800; color: var(--gold-on-ink); }
.rescue-head-kicker .i { width: 1.4rem; height: 1.4rem; }
.page-head .rescue-head-kicker + h1 { margin-top: var(--s-2); }
.rescue-body { padding-block: var(--s-6) var(--section); }
.rescue-body > * { max-width: 52rem; }
.rescue-start h2, .rescue-subjects h2 { font-size: var(--fs-h3); margin: 0 0 var(--s-4); }
.rescue-subjects { margin-top: var(--s-7); }
.rescue-btns-big .btn-rescue { flex: 1 1 12rem; min-height: 76px; font-size: 1.375rem; box-shadow: 0 10px 24px -14px rgba(138, 100, 12, 0.8); }
.rescue-btns-big .btn-rescue .i-bolt { width: 1.5em; height: 1.5em; }
.rescue-btns-big .btn-rescue[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--gold-on-ink); }
/* the chapters to tick */
.rescue-chapters { border: 0; margin: 0; padding: 0; min-width: 0; }
.rescue-legend { padding: 0; margin: 0 0 var(--s-1); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.35; }
.rescue-chapters .hint { margin: 0 0 var(--s-4); }
.rescue-chapters .field-error { margin: 0 0 var(--s-3); }
.rescue-chapter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.rescue-chapter { min-height: 64px; padding-block: var(--s-2); }
.rescue-chapter:has(input:checked) { border-color: var(--gold-ink); box-shadow: inset 0 0 0 1.5px var(--gold-ink); background: var(--gold-tint); }
.rescue-chapter input { accent-color: var(--gold-ink); }
.rescue-ch-mark { min-width: 2.25rem; font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; text-align: center; line-height: 1; }
.rescue-ch-words { display: grid; gap: 1px; min-width: 0; }
.rescue-ch-kicker { font-size: var(--fs-meta); color: var(--fg-3); }
.rescue-ch-name { font-family: var(--font-display); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.rescue-ch-meta { font-size: var(--fs-meta); color: var(--gold-ink); font-weight: 700; }
.rescue-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-5); }
.rescue-other { margin: var(--s-4) 0 0; font-size: var(--fs-small); }
/* the plan */
.rescue-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-6); padding-bottom: var(--s-4); border-bottom: 1px solid var(--rule); }
.rescue-chosen-title { margin: 0; font-family: var(--font-display); font-weight: 800; }
.rescue-chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; }
.rescue-chips li { padding: 0.15rem 0.6rem; border-radius: var(--r); background: var(--gold-tint); color: var(--gold-ink); font-size: var(--fs-small); font-weight: 700; }
.rescue-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-7); }
.rescue-step { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.rescue-step-num { width: 3rem; height: 3rem; border-radius: var(--r-round); background: var(--ink); color: var(--gold-on-ink); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; font-size: 1.375rem; }
.rescue-step-body { min-width: 0; }
.rescue-step-body h2 { margin: 0.4rem 0 var(--s-2); font-size: var(--fs-h3); }
.rescue-step-body > p { margin: 0 0 var(--s-3); }
.rescue-banks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.rescue-videos { list-style: none; margin: 0; padding: 0; border-top: var(--rule-heavy) solid var(--fg); }
.rescue-video { border-bottom: 1px solid var(--rule); }
.rv-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-2) var(--s-3); min-height: 64px; padding: var(--s-2);
  color: var(--fg); text-decoration: none; }
a.rv-row:hover { background: var(--hover); color: var(--fg); }
.rv-pos { font-family: var(--font-mono); font-weight: 600; color: var(--fg-3); text-align: center; }
.rv-words { display: grid; gap: 1px; min-width: 0; }
.rv-kicker { font-size: var(--fs-meta); color: var(--fg-3); }
.rv-name { font-family: var(--font-display); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.rv-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-1); }
.rv-lock { display: inline-flex; align-items: center; gap: 0.35em; font-size: var(--fs-meta); font-weight: 700; color: var(--fg-2); }
.rv-lock .i { width: 1em; height: 1em; }
.rv-go { width: 2.25rem; height: 2.25rem; border-radius: var(--r-round); background: var(--mint); color: var(--ink); display: grid; place-items: center; }
.rv-go .i { width: 0.95rem; height: 0.95rem; margin-left: 0.1rem; }
.is-locked .rv-name { color: var(--fg-2); }
.rescue-locked { display: flex; gap: var(--s-3); align-items: flex-start; margin-top: var(--s-4); padding: var(--s-4); background: var(--gold-tint); border-inline-start: var(--rule-heavy) solid var(--gold); border-radius: var(--r); }
.rescue-locked > .i { flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.2em; color: var(--gold-ink); }
.rescue-locked p { margin: 0; font-size: var(--fs-small); }
.rescue-mock { margin: 0 0 var(--s-2); }
.rescue-backline { margin: 0 0 var(--s-3); }
/* a bank opened from the plan: its 3-star questions only */
.stars-only { margin: 0 0 var(--s-4); padding: var(--s-3) var(--s-4); background: var(--gold-tint); border-radius: var(--r); font-weight: 700; }
.exam-quick { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-bottom: var(--s-2); }
/* the dossier page: what the code opens, and where the dossier is sold */
.dossier-where, .dossier-opens { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-2) var(--s-3); margin: var(--s-4) 0; font-weight: 700; }
.dossier-where > span, .dossier-opens > span { flex: 1 1 14rem; min-width: 0; }
.dossier-where > .i, .dossier-opens > .i { flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.3em; color: var(--accent-fg); }
/* «روح على الشرح» keeps its arrow beside it (an svg is a block by default) */
.dossier-opens > a { display: inline-flex; align-items: center; gap: 0.35em; }
/* «وضع الإنقاذ» is for subscribers (owner, 18 Oct 2026): the card's small line
   says it comes with the subscription, or whose it is when it is open */
.rescue-sub { display: flex; align-items: center; gap: 0.4em; margin: var(--s-2) 0 0; font-size: var(--fs-meta); font-weight: 700; color: var(--gold-on-ink); }
.rescue-sub .i { width: 1em; height: 1em; }
.rescue-sub.is-open { color: var(--on-ink-2); }
.index-row .tag .i { width: 1em; height: 1em; }
/* the subscribe page: what rescue mode gives, on top, for a student sent there from it */
.rescue-for { display: flex; align-items: flex-start; gap: var(--s-3); margin-block: var(--s-6) 0; padding: var(--s-3) var(--s-4);
  background: var(--gold-tint); border-inline-start: var(--rule-heavy) solid var(--gold); border-radius: var(--r); }
.rescue-for-icon { flex: none; width: 2.25rem; height: 2.25rem; border-radius: var(--r-round); background: var(--gold); color: var(--ink); display: grid; place-items: center; }
.rescue-for-icon .i { width: 1.25rem; height: 1.25rem; }
.rescue-for p { margin: 0.3rem 0 0; min-width: 0; }
/* the two easiest ways to subscribe, near the top, as the old Mwasel said them */
.two-ways { margin-top: var(--s-6); }
.two-ways h2 { font-size: var(--fs-h3); margin: 0 0 var(--s-3); }
.two-ways-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.two-way { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: var(--s-3); align-items: start; padding: var(--s-4);
  background: var(--raised); border: 1.5px solid var(--control); border-radius: var(--r); }
.two-way-icon { width: 2.75rem; height: 2.75rem; border-radius: var(--r); display: grid; place-items: center; background: var(--gold); color: var(--ink); }
.two-way-icon .i { width: 1.4rem; height: 1.4rem; }
.two-way-card .two-way-icon { background: var(--quiet); color: var(--fg); }
.two-way-words { min-width: 0; }
.two-way-title { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.two-way-line { margin: var(--s-1) 0 0; font-size: var(--fs-small); color: var(--fg-2); overflow-wrap: anywhere; }
.two-way-go { display: inline-flex; align-items: center; gap: 0.35em; margin-top: var(--s-2); font-weight: 700; }
.two-way-go .i { width: 1em; height: 1em; }
@media (max-width: 760px) {
  .two-ways-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .rescue-card { grid-template-columns: auto minmax(0, 1fr); }
  .rescue-card > .rescue-btns { grid-column: 1 / -1; }
  .rescue-card > .rescue-btns .btn-rescue { flex: 1 1 0; }
  .rescue-card .rescue-more { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .rescue-card { padding: var(--s-4); }
  .rescue-step { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  .rescue-step-num { width: 2.5rem; height: 2.5rem; font-size: 1.125rem; }
  .rv-row { grid-template-columns: 1.5rem minmax(0, 1fr) auto; }
  .rv-tags { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  .rv-go { grid-column: 3; grid-row: 1; }
  .rescue-actions .btn { flex: 1 1 100%; }
}

/* أستاذ مواصل's drawings and pictures (18 Oct 2026, diagram.js): a drawing is
   the page's own SVG from the answer's JSON; a picture is one the server made */
.tutor-msg .tutor-diagram, .tutor-msg .tutor-picture { margin: var(--s-2) 0; }
.tutor-msg .tutor-diagram { padding: var(--s-2); background: none; border: 1px solid var(--rule); border-radius: var(--r); overflow-x: auto; }
/* the drawings are inked for paper: on the dark palette (off on the live site, DESIGN.md) they keep a paper ground to stay readable */
:root[data-theme="dark"] .tutor-msg .tutor-diagram { background: #FFFDF9; }
.tutor-msg .mw-diagram { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.tutor-msg .mw-diagram text { font-family: var(--font-text); }
.tutor-msg .tutor-picture img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--rule); }
.tutor-msg .tutor-picture figcaption { margin-top: var(--s-1); font-size: var(--fs-meta); color: var(--fg-3); }
.tutor-msg .tutor-wait { color: var(--fg-3); font-size: var(--fs-meta); font-weight: 600; }

/* أستاذ مواصل's words (owner, 31 Oct 2026: "bold typing on the headlines and important notes"):
   diagram.js MwRich builds p, ul, ol, li, strong and br from the answer, nothing else */
.tutor-msg .tutor-rich > * { margin: 0 0 var(--s-2); }
.tutor-msg .tutor-rich > :last-child { margin-bottom: 0; }
.tutor-msg .tutor-rich strong { font-weight: 700; color: var(--fg); }
.tutor-msg .tutor-rich .tutor-h { margin: var(--s-3) 0 var(--s-1); padding-inline-start: var(--s-2); border-inline-start: 3px solid var(--mint); font-family: var(--font-display); font-weight: 800; font-size: 1.0625em; line-height: 1.5; }
.tutor-msg .tutor-rich > .tutor-h:first-child { margin-top: 0; }
.tutor-msg .tutor-rich ul, .tutor-msg .tutor-rich ol { padding-inline-start: 1.4em; }
.tutor-msg .tutor-rich li { margin: 0 0 var(--s-1); padding-inline-start: 0.15em; }
.tutor-msg .tutor-rich li:last-child { margin-bottom: 0; }

/* the handle on the panel's inner edge (tutor.js): drag it, or use the arrow keys when it has the focus.
   The panel is docked on the right in both languages, so the handle is on its LEFT edge in both: physical
   left on purpose, not the start side. A phone's panel is the whole screen: no handle there. */
.tutor-resize { position: absolute; inset-block: 0; left: -12px; width: 12px; z-index: 3; cursor: col-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
.tutor-resize::before { content: ""; position: absolute; inset-block: 0; left: 10px; width: 2px; background: transparent; transition: background var(--t-fast); }
.tutor-resize::after { content: ""; position: absolute; top: 50%; left: 2px; width: 8px; height: 46px; margin-top: -23px; box-sizing: border-box; border: 1px solid var(--control); border-radius: var(--r-round); background: var(--raised); transition: background var(--t-fast), border-color var(--t-fast); }
.tutor-resize:hover::before, .tutor-resize:focus-visible::before, body.tutor-resizing .tutor-resize::before { background: var(--mint); }
.tutor-resize:hover::after, .tutor-resize:focus-visible::after, body.tutor-resizing .tutor-resize::after { background: var(--mint); border-color: var(--mint-ink); }
.tutor-resize:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
body.tutor-resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
@media (pointer: coarse) {
  .tutor-resize { left: -20px; width: 20px; }
  .tutor-resize::before { left: 18px; }
  .tutor-resize::after { left: 6px; width: 10px; }
}
@media (max-width: 760px) {
  .tutor-resize { display: none; }
}

/* a subject the site does not have: the box under the subjects (owner, 20 Oct 2026) */
.ask-subject { margin-top: var(--s-6); }
.ask-subject-box { border: 1px solid var(--rule); border-radius: var(--r); background: var(--raised); }
.ask-subject-box > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4); cursor: pointer; list-style: none; }
.ask-subject-box > summary::-webkit-details-marker { display: none; }
.ask-subject-text { display: grid; gap: var(--s-1); }
.ask-subject-text strong { font-size: 1.05rem; color: var(--fg); }
.ask-subject-text span { font-size: var(--fs-small); color: var(--fg-2); }
.ask-subject-box[open] > summary .btn { display: none; }
.ask-subject-form { max-width: 34rem; padding: 0 var(--s-4) var(--s-4); }
.ask-subject-form .field { margin-bottom: var(--s-4); }
.ask-subject-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.ask-subject-msg { margin: 0; font-size: var(--fs-small); font-weight: 600; color: var(--fg-2); }
.ask-subject-msg.is-error { color: var(--bad); }
.ask-subject-box > .notice { margin: 0 var(--s-4) var(--s-4); }

/* ===== The owl (owner, 7 Nov 2026: "blended in the design itself", "like PostHog", "physically above and
   inside things like it's a real place") =====
   It lives on the page's own things. A peek's body hides behind an edge (the video, a card) and its paws grip
   that edge in front of it; a sitting owl rests on a line with a soft shadow under it. A spot is placed against
   its thing's edge and takes no room: it moves no word, covers no text or button, and is never pressed.
   Its pictures' boxes (research/site/illustrations/gen.mjs): a peek's edge is 14 units over its box's bottom
   (peek 168 by 117, wave 204 by 121); the cheer's edge is its bottom (234 by 127); the side peek's card edge
   is 12 units in from its side (140 by 172); the reading owl's line is 11 units over its bottom (180 by 200). */
.owl { position: absolute; display: block; pointer-events: none; -webkit-user-select: none; user-select: none; }
.owl img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; }
.owl .owl-front { z-index: 1; }

/* behind the video (lesson page): placed from the line above it, its head over the video's top corner on the
   list's side; the body comes first in the page, so the video covers it, and the paws lie on the edge */
.video-line { position: relative; }
.owl-player { --ow: 5.75rem; width: var(--ow); aspect-ratio: 168 / 117; inset-inline-end: var(--s-5); bottom: calc(-1 * var(--s-3) - var(--ow) * 14 / 168); }

/* waving over the sign-in card's far top corner, its paw on the card's top edge, the wing toward the corner;
   low enough never to reach the line above the card */
.owl-auth { --ow: 4.5rem; width: var(--ow); aspect-ratio: 204 / 121; inset-inline-end: var(--s-4); bottom: calc(100% + var(--rule-heavy) - var(--ow) * 14 / 204); }
[dir="rtl"] .owl-auth img { transform: scaleX(-1); }

/* reading on the chapter list's top rule, at its far end (subject page) */
.chapters-title { position: relative; }
.owl-shelf { --ow: 4rem; width: var(--ow); aspect-ratio: 180 / 200; inset-inline-end: var(--s-2); bottom: calc(-1 * var(--s-3) - var(--ow) * 11 / 180); }

/* cheering up from behind the exam result card's top edge (half or more right, assets/site/exam.js); the
   page stops a little under the card's top when it scrolls to the result, so the owl shows */
.score-summary { position: relative; }
.owl-cheer { --ow: 5.5rem; width: var(--ow); aspect-ratio: 234 / 127; inset-inline-end: var(--s-6); bottom: calc(100% + 1px); }
.exam-run { scroll-margin-top: 4.5rem; }

/* after an answer (assets/site/site.js owlAfter): out from behind the card's outer side, level with the option
   picked, its paw round the card's edge; with no room beside the card, over the card's top corner instead.
   It slides out of a window whose edge is the card's edge, so it comes from behind the card */
.q.has-owl { position: relative; }
.q-owl .owl-win { position: absolute; overflow: hidden; }
.owl-side { --ow: 6rem; width: var(--ow); aspect-ratio: 140 / 172; inset-inline-end: 100%; margin-inline-end: calc(var(--ow) * -12 / 140); }
[dir="ltr"] .owl-side { transform: scaleX(-1); }
.owl-side .owl-win { inset: 0 0 0 calc(12 / 140 * 100%); }
.owl-side .owl-win .owl-back { inset: 0 auto 0 calc(-12 / 128 * 100%); width: calc(140 / 128 * 100%); }
/* over the top corner: small enough to stay inside the gap between two cards */
.owl-top { inset-inline-end: var(--s-4); }
.owl-top.is-wrong { --ow: 2.25rem; width: var(--ow); aspect-ratio: 168 / 117; bottom: calc(100% + 1px - var(--ow) * 14 / 168); }
.owl-top.is-wrong .owl-win { inset: 0 0 calc(14 / 117 * 100%) 0; }
.owl-top.is-wrong .owl-win .owl-back { inset: 0 0 auto 0; height: calc(117 / 103 * 100%); }
.owl-top.is-right { --ow: 2.5rem; width: var(--ow); aspect-ratio: 234 / 127; bottom: calc(100% + 1px); }
.owl-top.is-right .owl-win { inset: 0; }
.q-owl .owl-back { transition: transform 260ms var(--ease-out); }
.q-owl .owl-front { opacity: 0; transition: opacity 160ms ease 170ms; }
.owl-side:not(.is-out) .owl-back { transform: translateX(-100%); }
.owl-top:not(.is-out) .owl-back { transform: translateY(100%); }
.q-owl.is-out .owl-front { opacity: 1; }

/* a phone: the video runs edge to edge, so the owl is small and right at its corner, clear of the line's
   words (site.js hides it in the rare case the words still reach it) */
@media (max-width: 640px) {
  .owl-player { --ow: 2.5rem; inset-inline-end: calc(var(--s-1) - var(--gutter)); }
  .owl-shelf { --ow: 3.5rem; }
  .owl-cheer { --ow: 4.5rem; inset-inline-end: var(--s-4); }
}
@media (prefers-reduced-motion: reduce) {
  .q-owl .owl-back, .q-owl .owl-front { transition: none; }
}

/* ===== The payment rescue (the owner's sales plan, 7 Nov 2026): the CliQ
   payment's own amount and the alias, big with one tap to copy each on a
   phone; the other ways before the bank app; the optional phone; the
   «كنت رح تشترك · كمّل من هون» bar on top of the page (html.js payBar). ===== */
.copy-box { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-2); padding: var(--s-3) var(--s-4);
  border: 1.5px dashed var(--control); border-radius: var(--r); background: var(--surface); }
[dir="rtl"] .copy-box { padding: var(--s-3) var(--s-4); }
.copy-value { font-family: var(--font-mono); font-weight: 700; font-size: 1.75rem; line-height: 1.2; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.copy-amount .copy-value { font-family: var(--font-display); font-weight: 800; font-size: 2.25rem; }
/* the CliQ name (pages/subscribe.js aliasBox: "copy-value alias") in a face made to tell l from 1 and I: the owner,
   13 Nov 2026, the l of mwaselpay read as 1 in the mono face, and a student who copied it by hand made that mistake.
   It must come after .copy-value, which sets the mono face with the same weight. */
.copy-value.alias { font-family: "Atkinson Hyperlegible", var(--font-text); letter-spacing: 0.04em; }
.copy-unit { font-size: 1.125rem; font-weight: 700; color: var(--fg-2); }
.copy-btn { min-height: 48px; margin-inline-start: auto; }
.pay-card .copy-box + .copy-box { margin-top: var(--s-3); }
.steps .hint { font-size: var(--fs-small); color: var(--fg-3); }
.pay-phone { margin: var(--s-3) 0; }
.pay-phone .optional { color: var(--fg-3); font-weight: 400; }
.pay-phone .input { max-width: 16rem; }
/* «اسم صاحب الحساب البنكي اللي حوّلت منه» before «حوّلت» (14 Nov 2026): typed in English, as the bank app shows it */
.pay-payer { margin: var(--s-3) 0; }
.pay-payer .hint { margin: 0 0 var(--s-2); }
.pay-payer .input { max-width: 22rem; text-transform: uppercase; }
.pay-payer .input::placeholder { text-transform: none; }
.pay-payer .optional { color: var(--fg-3); font-weight: 400; }
/* a student's own screen (19 Nov 2026, "Make it even shorter"): the name folded under one line, for a family member's account */
.pay-payer-more { margin: var(--s-3) 0; }
.pay-payer-more > summary { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; list-style: none; color: var(--fg-2); font-size: var(--fs-small); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 2.75rem; }
.pay-payer-more > summary::-webkit-details-marker { display: none; }
.pay-payer-more .pay-payer { margin-bottom: 0; }
.pay-other { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--rule); }
/* «ما عندك كليك؟» (14 Nov 2026): the question is the title, its two ways first */
.pay-other-title { margin: 0 0 var(--s-3); font-weight: 700; font-size: var(--fs-lead); }
/* the payment right on a locked lesson (14 Nov 2026): the lock's button opens the CliQ steps in this card under it */
.lock-pay-card { margin-top: var(--s-4); padding: var(--s-5); background: var(--raised); border: 1.5px solid var(--control); border-radius: var(--r); }
.lock-pay-card .steps:not([hidden]) { margin-bottom: var(--s-2); }
.lock-pay-other { margin: var(--s-3) 0 0; font-size: var(--fs-small); }
.lock-pay-other a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); }
.locked-screen .lock-pay-open { color: var(--mint); font-weight: 700; }
.pay-other-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pay-other-list .btn { min-height: 48px; }
.pay-bar { display: flex; align-items: center; justify-content: center; gap: var(--s-2); padding: var(--s-2) var(--s-4);
  background: var(--gold); color: var(--ink); font-weight: 700; font-size: var(--fs-small); }
.pay-bar[hidden] { display: none; }
.pay-bar-go { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; }
.pay-bar-go:hover { text-decoration: underline; }
.pay-bar-go .i { width: 1rem; height: 1rem; }
.pay-bar-close { display: grid; place-items: center; width: 40px; height: 40px; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: var(--r); }
.pay-bar-close .i { width: 1rem; height: 1rem; }
@media (max-width: 560px) {
  .copy-box { padding: var(--s-3); }
  .copy-btn { width: 100%; justify-content: center; margin-inline-start: 0; }
  .pay-other-list .btn { width: 100%; justify-content: center; }
}

/* ===== The sales plan (7 Nov 2026): pages/sales.js ===== */
/* «شو المواد اللي بتدرسها؟», once */
.ask-card-row { margin-block: var(--s-6) 0; }
.ask-card { position: relative; padding: var(--s-5); background: var(--raised); border: 1px solid var(--rule); border-top: var(--rule-heavy) solid var(--accent); border-radius: var(--r); box-shadow: var(--shadow-sheet); }
.ask-title { margin: 0; padding-inline-end: var(--s-7); font-family: var(--font-display); font-size: var(--fs-h3); line-height: var(--lh-heading); }
.ask-lead { margin: var(--s-2) 0 0; color: var(--fg-2); max-width: 52ch; }
.ask-x { position: absolute; top: var(--s-2); inset-inline-end: var(--s-2); width: var(--tap); height: var(--tap); display: grid; place-items: center; border: 0; background: none; color: var(--fg-3); border-radius: var(--r-round); cursor: pointer; }
.ask-x:hover { background: var(--hover); color: var(--fg); }
.ask-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.chip { position: relative; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-4); border: 1px solid var(--control); border-radius: var(--r-round); background: var(--bg); font-weight: 600; cursor: pointer; user-select: none; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.ask-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.ask-msg { margin: 0; color: var(--fg-2); font-size: var(--fs-small); }

/* «موادك» on the price page */
.mine-offer { margin-top: var(--s-6); padding: var(--s-5); background: var(--quiet); border-inline-start: var(--rule-heavy) solid var(--accent); border-radius: var(--r); }
.mine-line { display: flex; gap: var(--s-3); align-items: flex-start; margin: 0; font-family: var(--font-display); font-size: var(--fs-h3); line-height: var(--lh-heading); }
.mine-line .i { flex: none; margin-top: 0.3em; color: var(--accent-fg); }
.mine-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.mine-subject { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-4); padding-block: var(--s-2); border-bottom: 1px solid var(--rule); }
.mine-name { font-weight: 700; }
.mine-what { color: var(--fg-2); font-size: var(--fs-small); }
.mine-all { margin: var(--s-4) 0 0; color: var(--fg-2); font-size: var(--fs-small); }

/* today's real buyers, in the price head */
.proof-line { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-2) 0 0; color: var(--fg-2); font-size: var(--fs-small); font-weight: 600; }

/* the pay button that stays on a phone's screen */
.pay-sticky { display: none; }
@media (max-width: 760px) {
  .pay-sticky { display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-menu); padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--rule); box-shadow: 0 -10px 24px -18px rgba(29, 25, 19, 0.4); transition: transform var(--t) var(--ease); }
  .pay-sticky.is-away { transform: translateY(110%); }
  .has-pay-sticky .page-subscribe { padding-bottom: calc(var(--btn-h-main) + var(--s-6)); }
}

/* what is behind a lock: a locked lesson's card */
.locked-screen .lock-facts { font-weight: 700; color: var(--mint); max-width: 44ch; }
.lock-actions { display: grid; justify-items: start; gap: var(--s-2); }
.locked-screen .lock-dossier { color: var(--fg-2); font-size: var(--fs-small); min-height: 0; padding: var(--s-1) 0; }
.locked-screen .lock-all { color: var(--fg-3); font-size: var(--fs-small); }
.locked-screen .lock-value { color: var(--fg-2); font-weight: 700; line-height: 1.7; }
.lock-inside { margin-top: var(--s-5); }
.lock-inside h2 { display: flex; align-items: center; gap: var(--s-2); margin: 0; font-size: var(--fs-h3); }
.lock-sections { list-style: none; margin: var(--s-3) 0 0; padding: 0; counter-reset: none; }
.lock-sections li { display: flex; gap: var(--s-3); align-items: baseline; padding-block: var(--s-2); border-bottom: 1px solid var(--rule); }
.lock-at { flex: none; min-width: 3.5rem; font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--fg-3); }

/* a test bank's offer in place: a sheet from the bottom on a phone, a small panel on a wide screen */
.lock-sheet { position: fixed; inset: 0; z-index: var(--z-panel); display: flex; align-items: flex-end; justify-content: center; background: rgba(29, 25, 19, 0.45); }
.lock-sheet[hidden] { display: none; }
.lock-sheet-card { position: relative; width: 100%; max-height: 85vh; overflow: auto; padding: var(--s-6) var(--gutter) calc(var(--s-5) + env(safe-area-inset-bottom)); background: var(--raised); border-radius: calc(var(--r) * 3) calc(var(--r) * 3) 0 0; box-shadow: var(--shadow-lift); }
.lock-sheet-kicker { display: flex; align-items: center; gap: var(--s-2); margin: 0; color: var(--fg-3); font-size: var(--fs-small); font-weight: 600; }
.lock-sheet-title { margin: var(--s-2) 0 0; padding-inline-end: var(--s-7); font-size: var(--fs-h3); }
.lock-sheet-name { margin: var(--s-1) 0 0; color: var(--fg-2); }
.lock-sheet .lock-facts { margin: var(--s-4) 0 0; font-weight: 700; color: var(--accent-fg); }
.lock-sheet-note { margin: var(--s-2) 0 0; color: var(--fg-2); font-size: var(--fs-small); }
.lock-sheet .lock-actions { margin-top: var(--s-4); justify-items: stretch; }
.lock-sheet .lock-actions .btn-primary { width: 100%; justify-content: center; }
.lock-sheet .lock-dossier { justify-self: center; font-size: var(--fs-small); }
.lock-sheet .lock-all { margin: var(--s-2) 0 0; color: var(--fg-3); font-size: var(--fs-meta); text-align: center; }
html.has-sheet { overflow: hidden; }
@media (min-width: 761px) {
  .lock-sheet { background: none; pointer-events: none; justify-content: flex-end; padding: var(--s-5); }
  .lock-sheet-card { pointer-events: auto; width: 24rem; border-radius: var(--r); border: 1px solid var(--rule); border-top: var(--rule-heavy) solid var(--accent); padding: var(--s-5); }
  html.has-sheet { overflow: auto; }
}

/* ---- the sales plan, part 2 (owner, 7 Nov 2026): the paywall's marks, a chapter's lock block, the exams' chapters, the refund line ---- */
.chapters .chapter-lock { display: inline-flex; align-items: center; gap: 0.3em; margin-inline-start: var(--s-2); color: var(--fg-3); }
.chapters .chapter-lock .i { width: 0.95em; height: 0.95em; }
.chapter-lock-block { display: grid; justify-items: start; gap: var(--s-3); margin: 0 0 var(--s-5); padding: var(--s-5); background: var(--quiet); border-inline-start: var(--rule-heavy) solid var(--accent); border-radius: var(--r); }
.chapter-lock-block .lock-disc { border-color: var(--accent); color: var(--accent-fg); width: 3rem; height: 3rem; }
.chapter-lock-block .lock-facts { margin: 0; font-weight: 700; color: var(--accent-fg); max-width: 44ch; }
.chapter-lock-block .part { margin: 0; font-family: var(--font-display); font-weight: 700; }
.chapter-lock-block .lock-dossier { font-size: var(--fs-small); min-height: 0; padding: var(--s-1) 0; }
.exam-chapters { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5); border: 1px solid var(--rule); border-radius: var(--r); }
.exam-chapters-title { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-2); font-size: var(--fs-small); }
.exam-chapters-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.exam-chapters-list .exam-word { font-weight: 700; }
.exam-ch { display: inline-flex; align-items: center; gap: 0.2em; }
.exam-ch.is-locked { color: var(--fg-3); }
.exam-ch .i { width: 0.9em; height: 0.9em; }
.exam-coming { display: flex; align-items: center; gap: var(--s-2); margin: 0; font-size: var(--fs-small); font-weight: 700; }
.chapter-body > .exam-coming { margin: 0 0 var(--s-4); }
/* the exam's countdown and its videos (14 Nov 2026) */
.exam-when { display: inline-block; margin-inline-start: var(--s-2); padding: 0 var(--s-2); border-radius: var(--r-round); background: var(--accent-tint); color: var(--accent-fg); font-size: var(--fs-small); font-weight: 700; white-space: nowrap; }
.exam-ready { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 0; font-size: var(--fs-small); color: var(--fg-2); }
.exam-ready.is-ready { color: var(--accent-fg); font-weight: 700; }
.exam-ready .i { flex: none; }
.price-head .sub-exam { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-2) 0 0; font-size: var(--fs-small); font-weight: 700; color: var(--accent-fg); }
.state-coming + .state-locked { margin-inline-start: var(--s-2); }
.refund-line { display: flex; gap: var(--s-2); align-items: flex-start; margin: var(--s-3) 0 0; font-size: var(--fs-small); color: var(--fg-2); max-width: 60ch; }
.refund-line .i { flex: none; margin-top: 0.2em; }
/* «شوف طريقة حل السؤال» (owner, 7 Nov 2026): a test bank question's way into the part of the video that solves it,
   under the answer before and after answering; the sheet's line when that video is locked; and on the lesson page,
   where the question's explanation ends, the way back over the picture (inside the player's box, so a full screen shows it) */
.q-solve { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.lock-sheet-solve { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 0; font-weight: 700; color: var(--accent-fg); }
.lock-sheet-solve .i { flex: none; }
.solve-end { position: absolute; z-index: 5; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); padding: var(--s-3); background: rgba(10, 9, 7, 0.94); color: var(--fg); text-align: center; }
.solve-end-line { display: flex; align-items: center; gap: var(--s-2); margin: 0; font-size: var(--fs-small); font-weight: 700; }
.solve-end-line .i { flex: none; }
/* a listed video's name in the other language, a small second line under its name (owner, 11 Nov 2026: "add titles in
   english for videos"; html.js otherLine): on the chapter's list, the lesson page's «فيديوهات هالشابتر», the videos still
   to come, «وضع الإنقاذ»'s key videos and the next video's card. It carries its own direction (an English title reads
   left to right inside an Arabic row) and ends where the name starts; a long title wraps, it never widens the row */
.nm-2 { display: block; font-family: var(--font-text); font-weight: 500; font-size: var(--fs-meta); line-height: 1.45; letter-spacing: 0; color: var(--fg-3); text-align: end; white-space: normal; overflow-wrap: anywhere; }
.next-card .nm-2 { color: inherit; font-weight: 600; opacity: 0.8; }
.aside-list a[aria-current="page"] .nm-2 { color: var(--on-ink-2); }
/* «مش مطلوب هالفصل» (owner, 11 Nov 2026; catalog.js notRequired): a video the exam dropped this semester keeps its
   place and opens as before; a quiet tag beside its name, its name a little quieter, one line under the lesson's title */
.tag-not-required { font-family: var(--font-text); vertical-align: middle; }
.concept-row.is-not-required .c-name { color: var(--fg-2); }
.aside-list li.is-not-required a:not([aria-current]) .a-name { color: var(--fg-2); }
.aside-list .tag-not-required { margin-top: 2px; }
.aside-list .state + .tag-not-required { margin-inline-start: var(--s-2); }
.aside-list a[aria-current="page"] .tag-not-required { background: var(--ink-3); color: var(--on-ink-2); }
.not-required-line { margin: var(--s-3) 0 0; font-size: var(--fs-small); font-weight: 600; color: var(--fg-2); }
