@font-face{font-family:'Readex Pro';src:url('/fonts/ReadexPro-VF.woff2') format('woff2');font-weight:160 700;font-style:normal;font-display:swap}
/*
 * Madar design tokens (DESIGN §2), taken from the prototype's :root.
 * Brand-dependent tokens below are the platform default, Madar teal (#00776A); apps override
 * them per tenant with brandCss() from @madar-sa/ui/brand (values equal deriveBrand(DEFAULT_BRAND)).
 * Fonts: apps load the files in packages/ui/fonts with next/font/local and expose --font-plex /
 * --font-kufi / --font-readex.
 */
:root {
  --bg: #f1f3f0;
  --surface: #ffffff;
  --surface-2: #f6f8f5;
  --ink: #0f1913;
  --muted: #465349;
  --line: #d2d9d4;
  --line-2: #b3c0b8;
  /* Borders of controls (inputs, code boxes, default buttons, switch off-track): ≥ 3:1 on the surfaces (WCAG 1.4.11). */
  --line-strong: #7d8a82;
  /*
   * Controls and meters (N32, measured in DESIGN_QA §21; WCAG 1.4.11 and the project's 3:1 rule):
   * - a meter: a light track, so every fill (brand, amber, red, each activity colour) is ≥ 3:1 against it, inside a
   *   --line-strong ring that is ≥ 3:1 on the surfaces (the shared --line draws every other border and stays faint);
   * - a switch's knob when off, ≥ 3:1 against its track;
   * - a ticked box or an "on" switch that is disabled, ≥ 3:1 against the same control off (inactive controls are
   *   exempt from 1.4.11, but on and off must still be told apart: slice A, M3); its mark in the -ink colour.
   */
  --meter-track: #eef1ee;
  --switch-knob-off: #7d8a82;
  --control-on-disabled: #5f6e66;
  --control-on-disabled-ink: #ffffff;
  /* Avatar colours, picked from the person's name; the initial is ≥ 6:1 on each. */
  --av-1: #dcefe3;
  --av-1-ink: #1b5e3a;
  --av-2: #d6eef0;
  --av-2-ink: #145a63;
  --av-3: #dce7f7;
  --av-3-ink: #1f4e8c;
  --av-4: #e3e1f6;
  --av-4-ink: #3d3787;
  --av-5: #f1dff0;
  --av-5-ink: #7a2d72;
  --av-6: #f7dfe2;
  --av-6-ink: #8c2a3a;
  --av-7: #f7e8cf;
  --av-7-ink: #7a4a0a;
  --av-8: #e8edd3;
  --av-8-ink: #4c5a14;
  --act-green: #2a774a;
  --act-gold: #a87610;
  --act-blue: #245aa8;
  --act-red: #b2392d;
  --act-teal: #1a7a80;
  --act-violet: #6d4fb3;
  --act-orange: #bf5410;
  --act-slate: #5a6672;
  /*
   * Pitch fields (dashboard session tiles): the light-theme activity colours in both themes, so white
   * "present" dots and outlines stay at 3:1 or more on dark pages too (not overridden below).
   */
  --field-green: #2a774a;
  --field-gold: #a87610;
  --field-blue: #245aa8;
  --field-red: #b2392d;
  --field-teal: #1a7a80;
  --field-violet: #6d4fb3;
  --field-orange: #bf5410;
  --field-slate: #5a6672;

  --brand: #00776a;
  --brand-soft: #deedec;
  --brand-text: #00776a;
  --brand-ink: #ffffff;
  --brand-deep: #005950;
  --side: #032f29;
  --side-2: #034139;
  --focus-ring: #00776a;
  --primary: #00776a;

  /*
   * The Madar platform brand (DESIGN §10, owner-approved 2026-11-07). Fixed: an academy's own colour never
   * changes these. The logo, the favicon and the signed-out screens (`.madar-brand` below) use them.
   * Kifaya teal (3.51:1 with white) is for accents and large areas only, amber for the moving dot only:
   * neither is ever text. --madar-ring, --madar-hero, --madar-ground, --madar-text, --madar-muted,
   * --madar-link and --madar-border change in dark mode (below).
   */
  --madar-teal: #00776a;
  --madar-kifaya: #009a89;
  --madar-amber: #f2a93b;
  /* The ball drawings' lines (on amber). */
  --madar-ink: #1e2626;
  --madar-white: #ffffff;
  --madar-ring: #00776a;
  --madar-hero: #00776a;
  --madar-ground: #f5f7f6;
  --madar-text: #1e2626;
  --madar-muted: #545454;
  --madar-link: #00776a;
  --madar-border: #e3e3e3;

  --gold: #c8962e;
  --gold-soft: #f8eed6;
  --gold-ink: #7a5610;
  /* Text on solid gold, and text on the dark sidebar (same in both modes). */
  --on-gold: #241806;
  --side-ink: #e8efea;
  /* Rise and fall on the dark brand panel (the revenue hero); the panel is dark in both themes. */
  --hero-up: #f4d58e;
  --hero-down: #f7b3aa;
  /* The sign-in pitch art. The brand panel is always deep green, so these do not change with the theme. */
  --pitch-light: #ffffff;
  /* Always white, in both themes: QR codes must stay scannable. */
  --paper: #ffffff;
  /* Quiet text on --paper, in both themes (the logo preview tile): 8.7:1 on white. */
  --paper-ink: #465349;
  /* Text and icons on --primary; brand.ts keeps --primary at ≥ 4.5:1 against it. */
  --on-primary: #ffffff;
  /* Behind dialogs and sheets (with opacity). */
  --scrim: #000000;
  --pitch-shade: #000000;
  --pitch-spot: #e0b04e;
  --grass: #2a774a;
  --grass-line: rgba(255, 255, 255, 0.55);

  --amber: #93600a;
  --amber-soft: #fbf0d2;
  --red: #b2392d;
  --red-soft: #f9e1dd;
  --blue: #245aa8;
  --blue-soft: #e3ecf9;
  --wa: #168f4e;

  --f-body: var(--font-plex, 'IBM Plex Sans Arabic'), 'Segoe UI', Tahoma, sans-serif;
  --f-disp:
    var(--font-kufi, 'Noto Kufi Arabic'), var(--font-plex, 'IBM Plex Sans Arabic'), Tahoma,
    sans-serif;
  /* The brand typeface (DESIGN §10): signed-out screens and the wordmarks only, for now. */
  --f-brand: var(--font-readex, 'Readex Pro'), 'Segoe UI', Tahoma, sans-serif;

  --shadow: 0 1px 2px rgba(15, 25, 19, 0.07), 0 8px 24px -10px rgba(15, 25, 19, 0.18);
  /* Menus, toasts and sticky bars that float above the page (both themes). */
  --float-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.35);
  /* Height reserved for the phone tab bar so content never hides behind it. */
  --tabbar-h: 72px;
  --r-card: 16px;
  --r-modal: 20px;
  --r-control: 11px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b110e;
    --surface: #131c17;
    --surface-2: #18231d;
    --ink: #e5ece7;
    --muted: #aebdb4;
    --line: #24322a;
    --line-2: #304137;
    --line-strong: #66796e;
    --meter-track: #1f2b24;
    --switch-knob-off: #aebdb4;
    --control-on-disabled: #8a9c92;
    --control-on-disabled-ink: #131c17;
    --av-1: #183d2a;
    --av-1-ink: #a8ddbc;
    --av-2: #133a3e;
    --av-2-ink: #9fd9df;
    --av-3: #1a2d4a;
    --av-3-ink: #afc8ee;
    --av-4: #26244a;
    --av-4-ink: #c4c0f0;
    --av-5: #3a2038;
    --av-5-ink: #e6b9e1;
    --av-6: #3d1f25;
    --av-6-ink: #f0b7c0;
    --av-7: #3a2c13;
    --av-7-ink: #ebc78e;
    --av-8: #2d3315;
    --av-8-ink: #cbd69a;
    --act-green: #4fb27a;
    --act-gold: #e0b04e;
    --act-blue: #7fa8ea;
    --act-red: #e26c5f;
    --act-teal: #4fc3c9;
    --act-violet: #a58be6;
    --act-orange: #f08a4a;
    --act-slate: #9aa6b2;
    --gold: #e0b04e;
    --gold-soft: #2f2612;
    --gold-ink: #f0cd84;
    --grass: #21603b;
    --grass-line: rgba(255, 255, 255, 0.42);
    --amber: #e6ae35;
    --amber-soft: #33270f;
    --red: #e26c5f;
    --red-soft: #3a1c19;
    --blue: #7fa8ea;
    --blue-soft: #17243a;
    --wa: #3cc77a;
    --madar-ring: #2bc4b0;
    --madar-hero: #0f4a43;
    --madar-ground: #0e1716;
    --madar-text: #e5ece7;
    --madar-muted: #aebdb4;
    --madar-link: #2bc4b0;
    --madar-border: #24322a;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0b110e;
  --surface: #131c17;
  --surface-2: #18231d;
  --ink: #e5ece7;
  --muted: #aebdb4;
  --line: #24322a;
  --line-2: #304137;
  --line-strong: #66796e;
  --meter-track: #1f2b24;
  --switch-knob-off: #aebdb4;
  --control-on-disabled: #8a9c92;
  --control-on-disabled-ink: #131c17;
  --av-1: #183d2a;
  --av-1-ink: #a8ddbc;
  --av-2: #133a3e;
  --av-2-ink: #9fd9df;
  --av-3: #1a2d4a;
  --av-3-ink: #afc8ee;
  --av-4: #26244a;
  --av-4-ink: #c4c0f0;
  --av-5: #3a2038;
  --av-5-ink: #e6b9e1;
  --av-6: #3d1f25;
  --av-6-ink: #f0b7c0;
  --av-7: #3a2c13;
  --av-7-ink: #ebc78e;
  --av-8: #2d3315;
  --av-8-ink: #cbd69a;
  --act-green: #4fb27a;
  --act-gold: #e0b04e;
  --act-blue: #7fa8ea;
  --act-red: #e26c5f;
  --act-teal: #4fc3c9;
  --act-violet: #a58be6;
  --act-orange: #f08a4a;
  --act-slate: #9aa6b2;
  --gold: #e0b04e;
  --gold-soft: #2f2612;
  --gold-ink: #f0cd84;
  --grass: #21603b;
  --grass-line: rgba(255, 255, 255, 0.42);
  --amber: #e6ae35;
  --amber-soft: #33270f;
  --red: #e26c5f;
  --red-soft: #3a1c19;
  --blue: #7fa8ea;
  --blue-soft: #17243a;
  --wa: #3cc77a;
  --madar-ring: #2bc4b0;
  --madar-hero: #0f4a43;
  --madar-ground: #0e1716;
  --madar-text: #e5ece7;
  --madar-muted: #aebdb4;
  --madar-link: #2bc4b0;
  --madar-border: #24322a;
  --shadow: none;
  color-scheme: dark;
}

/*
 * Signed-out screens speak for Madar, not for an academy (sign-in, forgot password, reset, invitation; the
 * console's sign-in too): inside this scope the brand tokens are the platform's, whatever the app's own
 * brand is (the console's navy, an academy's colour). Primary buttons stay madar teal in both themes
 * (white on it 5.46:1); links, focus and brand text use the dark-mode teal on dark grounds.
 * brand-art.test.ts checks every text pair here at 4.5:1 or more.
 */
.madar-brand {
  --brand: var(--madar-link);
  --brand-text: var(--madar-link);
  --focus-ring: var(--madar-link);
  --primary: var(--madar-teal);
  --brand-soft: #deedec;
  --brand-ink: #ffffff;
  --ink: var(--madar-text);
  --muted: var(--madar-muted);
  /* Readex Pro for the text and the headings (h1 and `font-display` read --f-disp). */
  --f-body: var(--f-brand);
  --f-disp: var(--f-brand);
  font-family: var(--f-brand);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .madar-brand {
    --brand-soft: #10362e;
    --brand-ink: #10140f;
  }
}
:root[data-theme='dark'] .madar-brand {
  --brand-soft: #10362e;
  --brand-ink: #10140f;
}

/* Base document styles. */
html {
  height: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: var(--f-disp);
}

/*
 * Focus (DESIGN §8 + owner decision G): a 4px brand-soft halo, plus a 2px solid
 * outline in --focus-ring, which deriveBrand() guarantees is ≥ 3:1 on the surface.
 */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--brand-soft);
}

/*
 * A printed invoice is always dark text on white paper, whatever theme the screen is in: browsers drop
 * background colours when printing, so the dark theme's light text would vanish.
 */
@media print {
  .print-light {
    --surface: #ffffff;
    --surface-2: #ffffff;
    --ink: #0f1913;
    --muted: #465349;
    --line: #b3c0b8;
    --line-2: #b3c0b8;
    --line-strong: #7d8a82;
    --amber: #93600a;
    --red: #b2392d;
    --brand-text: #00776a;
    color: #0f1913;
  }
}

:root{--brand:#00776A;--brand-soft:#DEEDEC;--brand-text:#00776A;--brand-ink:#FFFFFF;--brand-deep:#005950;--side:#032F29;--side-2:#034139;--focus-ring:#00776A;--primary:#00776A}@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--brand:#4DA097;--brand-soft:#10362E;--brand-text:#56A59C;--brand-ink:#10140F;--brand-deep:#005950;--side:#051F1D;--side-2:#042A27;--focus-ring:#4DA097;--primary:#00776A}}:root[data-theme="dark"]{--brand:#4DA097;--brand-soft:#10362E;--brand-text:#56A59C;--brand-ink:#10140F;--brand-deep:#005950;--side:#051F1D;--side-2:#042A27;--focus-ring:#4DA097;--primary:#00776A}
/*
 * The landing site (ADR-0015; the approved landing design, 2026-11-09): the shared tokens (prepended at build
 * time) and these rules. Logical properties only, so Arabic (rtl) and English (ltr) mirror without a second
 * stylesheet. Light only (`data-theme="light"`): the design has no dark version. No inline style anywhere: the
 * CSP allows this file only. No script: every effect here is CSS.
 *
 * The look: Readex Pro (DESIGN §10.1), a soft teal and amber light on the ground, frosted glass cards with a
 * static mirror reflection painted BEHIND their content (so text and buttons keep their full colour), and calm
 * motion only (the orbit, the glow, the sparkles, the floating cards); nothing sweeps or shines across. Under
 * `prefers-reduced-motion: reduce` nothing moves: every animation is declared under `no-preference` only.
 */
:root {
  /* Readex Pro for everything, the private documents too (they share this file). */
  --f-body: var(--f-brand);
  --f-disp: var(--f-brand);
  /* The design's colours beyond the brand tokens (DESIGN §9). */
  --l-text: var(--madar-text);
  --l-body: #3f4a4a;
  --l-muted: var(--madar-muted);
  --l-teal: var(--madar-teal);
  --l-teal-hover: #005a50;
  --l-teal-deep: #0f4a43;
  --l-teal-light: #0a9686;
  --l-soft: #e3f2ef;
  --l-ground: var(--madar-ground);
  --l-panel: #f5f7f6;
  --l-warn-ink: #8a4b00;
  --l-warn-soft: #fdf0dc;
  --l-cta-text: #ffffff;
  /* Glass: 60% white on the page; the sticky header is 92% so its text keeps 4.5:1 over the darkest section. */
  --glass: rgba(255, 255, 255, 0.6);
  --glass-header: rgba(255, 255, 255, 0.92);
  --glass-solid: rgba(255, 255, 255, 0.95);
  --glass-edge: rgba(255, 255, 255, 0.95);
  --glass-blur: blur(18px) saturate(180%);
  --card-shadow: 0 10px 28px rgba(14, 23, 22, 0.06);
  /* The page: 1200px of content and a 24px gutter, as drawn. */
  --gutter: 24px;
  --page: calc(1200px + 2 * var(--gutter));
  --measure: 68ch;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* The sticky header's height, so an anchor jump does not land under it (wide screens only). */
  --header-space: 0px;
}
@media (min-width: 880px) {
  :root {
    --header-space: 88px;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-block-start: var(--header-space);
}

body {
  margin: 0;
  background: var(--l-ground);
  color: var(--l-text);
  font-family: var(--f-brand);
  font-size: 16px;
  line-height: 1.6;
}

/*
 * The page ground: two soft lights at the top (teal at the inline start, amber at the inline end) and a faint
 * one lower down. `overflow-x: clip` keeps the blurred lights from ever widening the page; it does not make a
 * scroll container, so the sticky header still sticks.
 */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(900px 520px at 88% -4%, rgba(0, 154, 137, 0.18), rgba(0, 154, 137, 0) 70%),
    radial-gradient(700px 480px at 8% 18%, rgba(242, 169, 59, 0.12), rgba(242, 169, 59, 0) 70%),
    radial-gradient(800px 600px at 50% 62%, rgba(0, 119, 106, 0.07), rgba(0, 119, 106, 0) 70%),
    var(--l-ground);
}
[dir='ltr'] .site {
  background:
    radial-gradient(900px 520px at 12% -4%, rgba(0, 154, 137, 0.18), rgba(0, 154, 137, 0) 70%),
    radial-gradient(700px 480px at 92% 18%, rgba(242, 169, 59, 0.12), rgba(242, 169, 59, 0) 70%),
    radial-gradient(800px 600px at 50% 62%, rgba(0, 119, 106, 0.07), rgba(0, 119, 106, 0) 70%),
    var(--l-ground);
}
main.page {
  flex: 1;
  width: 100%;
}

a {
  color: var(--l-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--l-teal-hover);
}

figure {
  margin: 0;
}

.sr-num {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: -60px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--l-text);
}
.skip:focus {
  inset-block-start: 12px;
}

/* ---------------------------------------------------------------------------------------------------------
 * Glass and the mirror reflection.
 * The reflection is a `::before` at z-index -1 inside an isolated element: it paints over the element's own
 * background and under every child, so it can never tint text, icons or buttons.
 * ------------------------------------------------------------------------------------------------------- */
.glass {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.22) 38%,
    rgba(255, 255, 255, 0) 38.5%,
    rgba(255, 255, 255, 0) 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 1),
    inset 0 -1px 1px rgba(14, 23, 22, 0.06);
  pointer-events: none;
}
/* Where the browser cannot blur what is behind, the glass is a near-solid white instead. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-solid);
  }
}

/* The static reflection on the teal panels: one diagonal band of light, still. */
.reflect {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.reflect::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.12) 34%,
    rgba(255, 255, 255, 0) 34.4%,
    rgba(255, 255, 255, 0) 72%,
    rgba(255, 255, 255, 0.08) 100%
  );
  pointer-events: none;
}

/* ---------------------------------------------------------------------------------------------------------
 * Buttons.
 * ------------------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}
.btn-lg {
  min-block-size: 48px;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.6;
}
.btn-primary.btn-lg,
.btn-light.btn-lg {
  padding-inline: 26px;
}
/* White on madar teal (5.46:1); the gloss is light enough that the text keeps 4.5:1 across the button. */
.btn-primary {
  background-color: var(--l-teal);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 16px rgba(0, 119, 106, 0.3);
  color: #ffffff;
  font-weight: 600;
}
.btn-primary.btn-lg {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 24px rgba(0, 119, 106, 0.32);
}
.btn-primary:hover {
  background-color: var(--l-teal-hover);
  color: #ffffff;
}
/* Its own shadow would hide the focus halo every other control has (tokens.css `:focus-visible`). */
.btn-primary:focus-visible {
  box-shadow: 0 0 0 6px var(--brand-soft);
}
.btn-outline {
  border-color: var(--l-teal);
  color: var(--l-teal);
}
.btn-outline:hover {
  background: var(--l-soft);
}
.btn-glass {
  border-color: var(--glass-edge);
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(14, 23, 22, 0.08);
  color: var(--l-text);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--l-text);
}
.btn-light {
  background: #ffffff;
  color: var(--l-teal-deep);
  font-weight: 600;
}
.btn-light:hover {
  background: var(--l-soft);
  color: var(--l-teal-deep);
}
.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------------------------------------------------
 * The header: glass, sticky from 880px (the nav shows from there); on phones it scrolls away with the page.
 * ------------------------------------------------------------------------------------------------------- */
.site-header.glass {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  border: 0;
  border-block-end: 1px solid rgba(227, 227, 227, 0.7);
  background: var(--glass-header);
}
.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--page);
  margin-inline: auto;
  padding: 14px var(--gutter);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--l-text);
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
}
.brand:hover {
  color: var(--l-text);
}
.mark {
  flex: none;
}
.main-nav ul {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  font-size: 15px;
  list-style: none;
}
/* inline-block: the link fills its 24px line, a whole target (WCAG 2.5.8) without changing the look. */
.main-nav a {
  display: inline-block;
  color: var(--l-text);
  text-decoration: none;
}
.main-nav a:hover {
  color: var(--l-teal-hover);
  text-decoration: underline;
}
.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.lang {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: 10px 8px;
  border-radius: 10px;
  color: var(--l-muted);
  font-size: 14px;
  text-decoration: none;
}
.lang:hover {
  color: var(--l-text);
  text-decoration: underline;
}
.site-header .btn-primary {
  padding-inline: 18px;
}
/*
 * Sticky from 880px (owner, 2026-11-09); below that the header scrolls away with the page. The five section links
 * show from 1100px: below that the English header (and the Arabic one under ~960px) could not keep them on one
 * row, and a sticky header two rows tall covers too much. They are in the footer at every width.
 */
@media (max-width: 1099.98px) {
  .main-nav {
    display: none;
  }
}
@media (max-width: 879.98px) {
  .site-header.glass {
    position: relative;
  }
}
/* A narrow phone: the language link and both buttons on one row in English too. */
@media (max-width: 420px) {
  .header-actions {
    gap: 6px;
  }
  .lang {
    padding-inline: 4px;
  }
  .header-actions .btn {
    padding-inline: 12px;
  }
}

/* ---------------------------------------------------------------------------------------------------------
 * The overview.
 * ------------------------------------------------------------------------------------------------------- */
.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.eyebrow {
  margin: 0;
  color: var(--l-teal);
  font-size: 14px;
  font-weight: 600;
}
.sec-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
  margin-block-end: 36px;
}
.sec-head h2,
.role-text h2,
.cta h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}
.lead {
  margin: 0;
  color: var(--l-body);
  font-size: 17px;
}

/* The hero: the text and the orbit side by side, the orbit under the text below ~1030px. */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 48px;
  align-items: center;
  padding-block: 72px 56px;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.pill {
  align-self: flex-start;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--l-soft);
  color: var(--l-teal);
  font-size: 14px;
  font-weight: 500;
}
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.25;
}
.hero h1 .line {
  display: block;
  text-wrap: balance;
}
.hero h1 .accent {
  color: var(--l-teal);
}
.hero-lead {
  max-width: 560px;
  margin: 0;
  color: var(--l-body);
  font-size: clamp(17px, 2vw, 20px);
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 4px 0 0;
  padding: 0;
  color: var(--l-muted);
  font-size: 14px;
  list-style: none;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-art {
  position: relative;
  min-width: 0;
  padding-block: 28px 44px;
}
.blob {
  position: absolute;
  border-radius: 999px;
}
.blob-amber {
  inset-block-start: 6%;
  inset-inline-end: 8%;
  inline-size: 220px;
  block-size: 220px;
  background: var(--madar-amber);
  opacity: 0.28;
  filter: blur(60px);
}
.blob-teal {
  inset-block-end: 4%;
  inset-inline-start: 6%;
  inline-size: 260px;
  block-size: 260px;
  background: var(--madar-kifaya);
  opacity: 0.35;
  filter: blur(70px);
}
.orbit-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 32px;
  background: linear-gradient(
    150deg,
    var(--l-teal-light) 0%,
    var(--l-teal) 45%,
    var(--l-teal-deep) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -24px 48px rgba(14, 23, 22, 0.25),
    0 30px 60px rgba(0, 119, 106, 0.28);
}
.orbit-art {
  display: block;
  position: relative;
  inline-size: 100%;
  max-inline-size: 420px;
  block-size: auto;
}
/* Denser glass than the cards on the page: these float over the dark orbit panel, and keep 4.5:1 there. */
.float-card.glass {
  background: rgba(255, 255, 255, 0.86);
}
.float-card {
  position: absolute;
  display: flex;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(14, 23, 22, 0.16);
  padding: 14px 16px;
}
.float-card p {
  margin: 0;
}
.float-attendance {
  inset-block-start: 0;
  inset-inline-end: -8px;
  flex-direction: column;
  gap: 8px;
  /* The design's sizes are content widths; these are the same boxes measured border to border. */
  inline-size: 264px;
}
.float-invoice {
  inset-block-end: 0;
  inset-inline-start: -8px;
  align-items: center;
  gap: 12px;
  inline-size: 284px;
}
.float-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--l-body);
  font-size: 13px;
}
.chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--l-soft);
  color: var(--l-teal);
  font-size: 12px;
}
.float-figure {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.float-figure span {
  color: var(--l-body);
  font-size: 15px;
  font-weight: 400;
}
.meter {
  display: block;
  block-size: 8px;
  border-radius: 999px;
  background: rgba(30, 38, 38, 0.1);
}
.meter-fill {
  display: block;
  inline-size: 89%;
  block-size: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--madar-kifaya), var(--l-teal));
}
/* The bar fills from the inline start, so its colours run that way too. */
[dir='rtl'] .meter-fill {
  background: linear-gradient(270deg, var(--madar-kifaya), var(--l-teal));
}
.float-invoice-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--l-body);
  font-size: 13px;
}
.float-invoice-text strong {
  color: var(--l-text);
  font-size: 18px;
}
.float-note {
  color: var(--l-teal);
  font-size: 12px;
}
.float-card svg {
  flex: none;
}
/*
 * On a phone the two cards sit inside the panel's edges, and more room above and below the panel lets them
 * overlap only its rim, so the orbit itself stays in view.
 */
@media (max-width: 520px) {
  .hero-art {
    padding-block: 72px 84px;
  }
  .float-attendance {
    inset-inline-end: 0;
    inline-size: min(264px, 72%);
  }
  .float-invoice {
    inset-inline-start: 0;
    inline-size: min(284px, 84%);
  }
}

/* Four facts in one glass strip. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 24px;
  margin: 0;
  padding: 28px 32px;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(14, 23, 22, 0.06);
  list-style: none;
}
.facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.facts strong {
  color: var(--l-teal);
  font-size: 18px;
  font-weight: 700;
}
.facts span {
  color: var(--l-muted);
  font-size: 14px;
}

/* Card grids. */
.sec-modules {
  padding-block: 88px 40px;
}
.sec-modules .sec-head {
  margin-block-end: 40px;
}
.sec-steps {
  padding-block: 64px;
}
.sec-why,
.sec-videos {
  padding-block: 80px;
}
.cards {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cards-modules {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.cards-steps {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
}
.cards-why,
.cards-videos {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}
.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.card p {
  margin: 0;
  color: var(--l-muted);
  font-size: 15px;
}
.cards-why .card {
  padding: 24px;
}
.cards-why .card h3 {
  font-size: 19px;
}
.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 46px;
  block-size: 46px;
  border: 1px solid rgba(0, 119, 106, 0.15);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(0, 154, 137, 0.18), rgba(0, 119, 106, 0.08));
}
/* White numerals on madar teal into the deep teal: 5.46:1 at the lightest point. */
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 999px;
  background: linear-gradient(150deg, var(--l-teal), var(--l-teal-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 6px 14px rgba(0, 119, 106, 0.3);
  color: #ffffff;
  font-weight: 700;
}

/* The three role sections: text and screen side by side, the screen under the text on narrower screens. */
.role {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 56px;
  align-items: center;
  padding-block: 48px;
}
.role-parent {
  padding-block-end: 32px;
}
/* The accountant's screen comes first (at the inline start) once the two columns fit. */
@media (min-width: 984px) {
  .role-accountant .role-visual {
    order: -1;
  }
}
.role-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.role-text h2 {
  font-size: clamp(26px, 3vw, 36px);
}
.points {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  padding-inline-start: 20px;
  color: var(--l-body);
  font-size: 16px;
}
.role-visual {
  display: flex;
  justify-content: center;
  min-width: 0;
}
.illustrative {
  margin-block: 0;
  padding-block-end: 48px;
  color: var(--l-muted);
  font-size: 13px;
  text-align: center;
}

/* The illustrative screens. */
.mock p {
  margin: 0;
}
.mock-phone {
  display: flex;
  flex-direction: column;
  gap: 12px;
  inline-size: min(352px, 100%);
  padding: 18px 16px;
  border: 10px solid var(--l-text);
  border-radius: 40px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(14, 23, 22, 0.14);
}
.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mock-head span {
  color: var(--l-muted);
  font-size: 12px;
}
.roster {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.roster li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--l-panel);
  font-size: 15px;
}
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.badge-ok {
  background: var(--l-soft);
  color: var(--l-teal);
}
.badge-warn {
  background: var(--l-warn-soft);
  color: var(--l-warn-ink);
}
.mock-button {
  display: block;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--l-teal), #00675c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.mock-invoice,
.mock-parent {
  display: flex;
  flex-direction: column;
  inline-size: 100%;
  padding: 24px;
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(14, 23, 22, 0.1);
}
.mock-invoice {
  gap: 14px;
  max-inline-size: 470px;
}
.mock-parent {
  gap: 16px;
  max-inline-size: 450px;
}
.invoice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.invoice-head p,
.parent-head p {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.invoice-head strong {
  font-size: 17px;
}
.invoice-head span,
.parent-head span {
  color: var(--l-muted);
  font-size: 13px;
}
.invoice-head svg {
  flex: none;
}
.invoice-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-block-start: 12px;
  border-block-start: 1px dashed #d5dada;
  font-size: 15px;
}
.invoice-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.invoice-lines dt,
.invoice-lines dd {
  margin: 0;
}
.invoice-lines dd {
  font-variant-numeric: tabular-nums;
}
.invoice-lines .muted {
  color: var(--l-muted);
}
.invoice-total {
  padding-block-start: 8px;
  border-block-start: 1px solid var(--madar-border);
  font-size: 17px;
  font-weight: 700;
}
.mock-invoice .badge {
  align-self: flex-start;
  padding-inline: 12px;
}
.parent-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: 48px;
  block-size: 48px;
  border-radius: 999px;
  background: var(--l-soft);
  color: var(--l-teal);
  font-weight: 700;
}
.parent-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.parent-stats p {
  padding: 14px;
  border-radius: 14px;
  background: var(--l-panel);
}
.parent-stats span {
  display: block;
  color: var(--l-muted);
  font-size: 13px;
}
.parent-stats strong {
  font-size: 22px;
}
.parent-stats strong.ok {
  color: var(--l-teal);
  font-size: 18px;
}
.parent-invoice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding-block-start: 12px;
  border-block-start: 1px solid var(--madar-border);
  font-size: 15px;
}
.parent-invoice strong {
  font-weight: 600;
}

/* Videos, still to come. */
.video {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video h3 {
  margin: 0;
  font-size: 17px;
}
.video-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  background: linear-gradient(
    150deg,
    var(--l-teal-light) 0%,
    var(--l-teal) 45%,
    var(--l-teal-deep) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 14px 30px rgba(0, 119, 106, 0.22);
}
.play {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 60px;
  block-size: 60px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(14, 23, 22, 0.25);
}
.soon {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--madar-amber);
  color: var(--l-text);
  font-size: 12px;
  font-weight: 600;
}

/*
 * The call to action. Its white text sits on madar teal into the deep teal (never the lighter teal), and its
 * reflection is a third as strong as on the other panels, so even the lightest corner keeps 4.5:1.
 */
.sec-cta {
  padding-block-end: 88px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 32px;
  background: linear-gradient(150deg, var(--l-teal) 0%, var(--l-teal-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 30px 60px rgba(0, 119, 106, 0.25);
}
.cta.reflect::before {
  background: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 34%,
    rgba(255, 255, 255, 0) 34.4%,
    rgba(255, 255, 255, 0) 72%,
    rgba(255, 255, 255, 0.03) 100%
  );
}
.cta-text {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.cta h2 {
  color: #ffffff;
}
.cta p {
  margin: 0;
  color: var(--l-cta-text);
  font-size: 17px;
}
.cta :focus-visible {
  outline-color: #ffffff;
  box-shadow: none;
}

/* ---------------------------------------------------------------------------------------------------------
 * The footer.
 * ------------------------------------------------------------------------------------------------------- */
.site-footer.glass {
  border: 0;
  border-block-start: 1px solid rgba(227, 227, 227, 0.8);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 32px;
  max-width: var(--page);
  margin-inline: auto;
  padding: 56px var(--gutter) 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-brand p {
  margin: 0;
  color: var(--l-muted);
  font-size: 14px;
}
.footer-brand .footer-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--l-text);
  font-size: 22px;
  font-weight: 700;
}
.signature {
  display: flex;
  align-items: center;
  gap: 8px;
}
.signature-bar {
  flex: none;
  inline-size: 36px;
  block-size: 4px;
  border-radius: 2px;
  background: var(--madar-kifaya);
}
.site-footer h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}
.site-footer ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--l-body);
  font-size: 15px;
  list-style: none;
}
.site-footer ul a {
  display: inline-block;
  color: var(--l-body);
  text-decoration: none;
}
.site-footer ul a:hover {
  color: var(--l-teal-hover);
  text-decoration: underline;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--page);
  margin-inline: auto;
  padding: 16px var(--gutter) 28px;
  border-block-start: 1px solid var(--madar-border);
  color: var(--l-muted);
  font-size: 13px;
}
.footer-bottom p {
  margin: 0;
}
/* Phones: every footer link, the clause index and the way back are 44px targets. */
@media (max-width: 640px) {
  .site-footer ul {
    gap: 0;
  }
  .site-footer ul li {
    display: flex;
    align-items: center;
    min-block-size: 44px;
  }
  .site-footer ul a {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
  }
  /* Padding, not flex: a summary must stay a list item to keep its disclosure triangle. */
  .toc-top summary {
    padding-block: 10px;
  }
  .toc a {
    padding-block: 10px;
  }
  .back {
    padding-block: 10px;
  }
}

/* ---------------------------------------------------------------------------------------------------------
 * The other pages (guides, how it works, security, support, legal): Markdown laid out by sections.tsx.
 * ------------------------------------------------------------------------------------------------------- */
.page-body {
  max-width: var(--page);
  margin-inline: auto;
  padding: 40px var(--gutter) 96px;
}
.prose {
  max-width: none;
}
.prose p,
.prose li {
  margin-block: 0 16px;
}
.intro-text,
.row-text {
  max-width: var(--measure);
}
.prose .sec-head {
  display: block;
  max-width: var(--measure);
  margin-block-end: 0;
}

.prose h1 {
  margin-block: 0 16px;
  font-size: clamp(1.8rem, 1.35rem + 1.6vw, 2.45rem);
  font-weight: 700;
  line-height: 1.35;
}
.prose h2 {
  margin-block: 0 16px;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.7rem);
  font-weight: 700;
  line-height: 1.4;
}
.prose h3 {
  margin-block: 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
}
@media (max-width: 480px) {
  .prose h3 {
    font-size: 1.1rem;
  }
}
.prose h1,
.prose h2 {
  text-wrap: balance;
}
/* A jump from the clause index (or any anchor) leaves a little air above the heading. */
.prose [id] {
  scroll-margin-block-start: 24px;
}
/* A short teal rule marks the major starts: a guide's title and the legal parts. */
.page-guide .intro h1::before,
.page-legal .sec h2::before {
  content: '';
  display: block;
  inline-size: 40px;
  block-size: 3px;
  margin-block-end: 16px;
  border-radius: 2px;
  background: var(--madar-kifaya);
}
.intro-text > p:first-of-type {
  color: var(--l-muted);
  font-size: 1.12rem;
}

.prose .sec {
  margin-block-start: 64px;
}

.prose ul,
.prose ol {
  padding-inline-start: 22px;
}
.prose blockquote {
  margin: 0 0 24px;
  padding: 12px 18px;
  border-inline-start: 3px solid var(--madar-kifaya);
  background: #ffffff;
  color: var(--l-muted);
  font-size: 15px;
}
.prose blockquote p {
  margin: 0;
}
.prose code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.9em;
}
.prose hr {
  margin-block: 32px;
  border: 0;
  border-block-start: 1px solid var(--line);
}
.table-wrap {
  overflow-x: auto;
  margin-block: 16px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 15px;
}
.prose th,
.prose td {
  padding: 10px 14px;
  border-block-end: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}
.prose tr:last-child td {
  border-block-end: 0;
}
.prose th {
  background: var(--surface-2);
  font-weight: 600;
}

/* Screenshots: the guides' real screens. One shadow, here only. */
.media {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-width: 0;
}
.shot {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.shot a {
  display: block;
  border-radius: var(--r-card);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #ffffff;
  box-shadow: var(--shadow);
}
.shot a:hover img {
  border-color: var(--line-strong);
}
.shot-phone {
  flex: 0 1 260px;
  max-inline-size: 260px;
}
/* A desktop screen and a phone together: the phone overlaps the screen's lower corner, as one pair. */
.media:has(.shot-phone):has(.shot:not(.shot-phone)) {
  align-items: flex-end;
  gap: 0;
}
.media .shot:not(.shot-phone):has(~ .shot-phone) {
  flex: 0 0 76%;
}
.media .shot ~ .shot-phone {
  position: relative;
  z-index: 1;
  flex: 0 0 30%;
  margin-inline-start: -6%;
  margin-block-end: -28px;
}

/* Rows: text beside its screen. */
.row + .row {
  margin-block-start: 56px;
}
@media (min-width: 960px) {
  .row.has-media,
  .intro.has-media {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 56px;
    align-items: center;
  }
  .row.has-media .row-text,
  .intro.has-media .intro-text {
    max-width: none;
  }
  .row + .row {
    margin-block-start: 88px;
  }
  .prose .sec {
    margin-block-start: 112px;
  }
  .page-content .prose .sec {
    margin-block-start: 64px;
  }
}
@media (max-width: 959px) {
  .media {
    margin-block-start: 24px;
  }
}

/* The guides index: one row per guide, its first screen as the thumbnail. */
.page-guides .shot:not(.shot-phone) img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}
.page-guides .row.has-media {
  padding-block: 24px;
  border-block-start: 1px solid var(--line);
}
.page-guides .row + .row {
  margin-block-start: 0;
}
@media (min-width: 760px) {
  .page-guides .row.has-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: center;
  }
}
.page-guides .row h3 a {
  color: var(--l-text);
  text-decoration: none;
}
.page-guides .row h3 a::after {
  content: ' →' / '';
  color: var(--l-teal);
}
.page-guides .row h3 a:lang(ar)::after,
[dir='rtl'] .page-guides .row h3 a::after {
  content: ' ←' / '';
}
.page-guides .row h3 a:hover {
  text-decoration: underline;
}
.page-guides .shot-phone {
  max-inline-size: 140px;
  margin-inline: auto;
}

/* A guide: a large step numeral, the step's text, the screen beside it. */
.page-guide .prose .sec {
  margin-block-start: 48px;
  padding-block-start: 40px;
  border-block-start: 1px solid var(--line);
}
.page-guide .num {
  display: block;
  margin-block-end: 8px;
  color: var(--l-teal);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
}
@media (min-width: 960px) {
  .page-guide .row.has-media {
    align-items: start;
  }
  .page-guide .row.has-media:has(.shot-phone) {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

/* The legal texts: the clauses at reading width, a clause index beside them. */
.page-legal .prose .sec {
  margin-block-start: 40px;
}
.page-legal .sec h2 {
  font-size: 1.3rem;
}
.page-legal .row-text p > strong:first-child {
  color: var(--l-teal);
  font-variant-numeric: tabular-nums;
}
.toc {
  margin-block: 8px 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #ffffff;
  font-size: 14.5px;
}
.toc-title {
  margin: 0 0 8px;
  font-weight: 700;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc li {
  margin: 0;
}
.toc a {
  display: block;
  padding-block: 5px;
  color: var(--l-muted);
  text-decoration: none;
}
.toc a:hover {
  color: var(--l-teal);
  text-decoration: underline;
}
/* Below 1100px: a closed "Contents" above the clauses (two columns where there is room). */
.toc-side {
  display: none;
}
.toc-top summary {
  min-block-size: 32px;
  margin: 0;
  cursor: pointer;
}
.toc-top details[open] summary {
  margin-block-end: 8px;
}
@media (min-width: 600px) {
  .toc-top ol {
    columns: 2;
    column-gap: 32px;
  }
  .toc-top li {
    break-inside: avoid;
  }
}
@media (min-width: 1100px) {
  .toc-top {
    display: none;
  }
  .toc-side {
    display: block;
  }
  .legal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 64px;
    align-items: start;
  }
  .legal .clauses {
    order: 1;
    max-width: var(--measure);
  }
  /* Sticky under the sticky header. */
  .toc {
    order: 2;
    position: sticky;
    inset-block-start: calc(var(--header-space) + 16px);
    max-block-size: calc(100vh - var(--header-space) - 32px);
    overflow-y: auto;
    margin-block-start: 40px;
  }
}

/* An owner field still to fill (the legal and support pages): impossible to miss, never a real value. */
.field-unfilled {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 1px 8px;
  border: 1px dashed var(--amber);
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-weight: 600;
}

.back {
  display: inline-block;
  margin-block-end: 16px;
  padding-block: 8px;
  font-size: 15px;
}

/* The root language choice and the not-found page. */
.minimal {
  display: grid;
  gap: 18px;
  justify-items: center;
  max-width: 560px;
  margin-inline: auto;
  padding: 64px var(--gutter);
  text-align: center;
}
.minimal section {
  width: 100%;
}

@media (max-width: 480px) {
  .page-body {
    padding-block: 28px 72px;
  }
}

/* ---------------------------------------------------------------------------------------------------------
 * Motion: calm only, and only for readers who have not asked for less. Nothing sweeps or shines.
 * The balls turn round the orbit (one turn in 48 s) and each turns back as fast, so it stays upright; the
 * dashed ring turns the other way (90 s); the glow pulses; the sparkles twinkle; the cards float.
 * ------------------------------------------------------------------------------------------------------- */
@keyframes orbit-turn {
  to {
    transform: rotate(360deg);
  }
}
@keyframes orbit-turn-back {
  to {
    transform: rotate(-360deg);
  }
}
@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes glow {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.06);
  }
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}
.orbit-balls,
.orbit-dash {
  transform-origin: 200px 200px;
}
.orbit-ball,
.orbit-glow,
.sparkle {
  transform-box: fill-box;
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .orbit-balls {
    animation: orbit-turn 48s linear infinite;
  }
  .orbit-ball {
    animation: orbit-turn-back 48s linear infinite;
  }
  .orbit-dash {
    animation: orbit-turn-back 90s linear infinite;
  }
  .orbit-glow {
    animation: glow 5s ease-in-out infinite;
  }
  .sparkle {
    animation: twinkle 3.6s ease-in-out infinite;
  }
  .sparkle-2 {
    animation-delay: 1.2s;
  }
  .sparkle-3 {
    animation-delay: 2.4s;
  }
  .drift {
    animation: drift 7s ease-in-out infinite;
  }
  .drift-late {
    animation-delay: 3.5s;
  }
  a,
  .btn {
    transition:
      background-color 0.15s ease,
      color 0.15s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sparkle {
    opacity: 0.8;
  }
}

/* The private documents (proposal, training plan, usability script): one A4 page flow, printed to PDF. */
.print-doc main {
  max-width: 820px;
  margin-inline: auto;
  padding: 40px var(--gutter);
}
.print-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-weight: 700;
}
.print-private {
  margin-inline-start: auto;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.print-footer {
  margin-block-start: 32px;
  color: var(--muted);
  font-size: 13px;
}
@page {
  size: A4;
  margin: 16mm 14mm;
}
@media print {
  .print-doc {
    background: var(--surface);
  }
  .print-doc main {
    max-width: none;
    padding: 0;
  }
  .print-doc .prose {
    max-width: none;
  }
  .print-doc h2 {
    break-after: avoid;
  }
  .print-doc table,
  .print-doc blockquote {
    break-inside: avoid;
  }
  /* A printed legal text has no use for links to its own parts. */
  .toc-top,
  .toc-side {
    display: none;
  }
}
