@import url("/ds/bf-tokens.css"); /* bf-ds v2 */
/* ==========================================================================
   قوّتها — مسار 04: القوة والحركة للنساء
   Design system v2 · Arabic-first (RTL) · dark, calm, editorial
   ========================================================================== */

/* ---------- 1. Tokens ------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Surfaces */
  --ink: #090b12;
  --ink-soft: #111520;
  --ink-raise: #161b28;
  --panel: rgba(25, 29, 42, .76);
  --veil: rgba(255, 255, 255, .025);
  --veil-strong: rgba(255, 255, 255, .045);

  /* Lines */
  --line: rgba(238, 211, 169, .17);
  --line-soft: rgba(255, 255, 255, .07);
  --line-strong: rgba(215, 179, 122, .5);

  /* Text */
  --cream: #f5efe7;
  --text: #ded7d0;
  --muted: #b3aeaa;
  --faint: #9a969a;

  /* Accents */
  --gold: #d7b37a;
  --rose: #c07f83;
  --sage: #9dbaa8;
  --danger: #e09a90;

  /* Tonal washes */
  --wash-gold: rgba(215, 179, 122, .075);
  --wash-rose: rgba(182, 111, 115, .1);
  --wash-sage: rgba(143, 174, 156, .075);
  --wash-danger: rgba(216, 137, 126, .085);

  /* Type */
  --font-ui: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-display: "Amiri", "IBM Plex Sans Arabic", Georgia, serif;
  --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step-0: clamp(.94rem, .9rem + .2vw, 1.02rem);
  --step-1: clamp(1.06rem, 1rem + .35vw, 1.22rem);
  --step-2: clamp(1.3rem, 1.18rem + .55vw, 1.6rem);
  --step-3: clamp(1.7rem, 1.4rem + 1.4vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.9vw, 3.9rem);
  --step-5: clamp(2.6rem, 1.5rem + 5vw, 6rem);

  /* Rhythm — 4px base */
  --s-1: .25rem;
  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section-y: clamp(3rem, 7vw, 6rem);

  /* Form */
  --radius: 26px;
  --radius-md: 18px;
  --radius-sm: 13px;
  --shadow: 0 28px 80px rgba(0, 0, 0, .34);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, .28);
  --tap: 48px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur-1: .16s;
  --dur-2: .26s;
  --dur-3: .4s;

  --gutter: clamp(18px, 4vw, 36px);
  --measure: 68ch;

  /* Height of the sticky header — anchors and focus scrolling must clear it. */
  --header-h: 84px;
}

/* ---------- 2. Base --------------------------------------------------- */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 8%, rgba(182, 111, 115, .13), transparent 28rem),
    radial-gradient(circle at 91% 30%, rgba(143, 174, 156, .09), transparent 26rem),
    var(--ink);
  background-attachment: fixed;
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { max-width: 100%; height: auto; }

/* Arabic script must never receive negative tracking. */
h1, h2, h3, h4 {
  margin-top: 0;
  color: var(--cream);
  letter-spacing: normal;
  text-wrap: balance;
}
h1 {
  max-width: 20ch;
  margin-bottom: var(--s-5);
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 700;
  /* Arabic display faces carry tall ascenders and diacritics — keep the
     leading generous so stacked lines never collide. */
  line-height: 1.42;
}
h1 em { color: var(--rose); font-style: normal; }
h2 {
  margin-bottom: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1.4;
}
h3 { font-size: var(--step-2); line-height: 1.55; }
p { margin-top: 0; max-width: var(--measure); }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 var(--s-3);
  color: var(--gold);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .06em;
}

.skip-link {
  position: fixed;
  inset-inline-start: var(--s-4);
  top: -6rem;
  z-index: 70;
  padding: var(--s-3) var(--s-4);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur-2) var(--ease);
}
.skip-link:focus { top: 0; }

.site-header,
main,
footer {
  width: min(1180px, calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

/* ---------- 3. Header, brand & navigation ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  border-bottom: 1px solid var(--line);
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself
   would make it the containing block for the fixed mobile drawer. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(9, 11, 18, .88);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; }
.brand small {
  display: block;
  color: var(--gold);
  font-size: .72rem;
  letter-spacing: .07em;
  line-height: 1.6;
}
.brand strong {
  display: block;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.35;
}
.mark {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(215, 179, 122, .55);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.mark i,
.mark b { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.mark i:nth-child(1) { transform: translate(0, -13px); }
.mark i:nth-child(2) { transform: translate(12px, -4px); }
.mark i:nth-child(3) { transform: translate(8px, 11px); }
.mark i:nth-child(4) { transform: translate(-8px, 11px); }
.mark i:nth-child(5) { transform: translate(-12px, -4px); }
.mark b { width: 6px; height: 6px; }

.site-nav { display: flex; align-items: center; gap: var(--s-5); }
.site-nav a {
  position: relative;
  padding-block: var(--s-2);
  color: var(--muted);
  font-size: .92rem;
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--dur-2) var(--ease);
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--cream); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--cream); }

/* Hamburger */
.nav-toggle {
  display: none;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--veil);
  color: var(--cream);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(4, 6, 11, .66);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease), visibility var(--dur-2);
}
body.nav-open .nav-scrim { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

/* ---------- 4. Buttons ------------------------------------------------ */
.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  border-radius: 999px;
  padding: var(--s-3) var(--s-5);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--dur-1) var(--ease), background var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.button-primary { background: var(--cream); color: var(--ink); box-shadow: var(--shadow-soft); }
.button-primary:hover { background: #fff; }
.button-quiet { border: 1px solid var(--line); color: var(--cream); }
.button-quiet:hover { border-color: var(--line-strong); background: var(--veil); }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button[disabled],
.button[aria-disabled="true"] { opacity: .55; pointer-events: none; transform: none; }

.scope-note { max-width: 62ch; color: var(--faint); font-size: var(--step--1); }

/* ---------- 5. Home hero ---------------------------------------------- */
.hero {
  padding: clamp(3rem, 8vw, 6.5rem) 0 var(--section-y);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}
.hero h1 { font-size: var(--step-5); }
.lead { max-width: 46ch; color: var(--text); font-size: var(--step-1); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-6) 0 var(--s-4); }

.hero-panel {
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(31, 35, 49, .9), rgba(15, 18, 28, .74));
  box-shadow: var(--shadow);
}
.panel-label { color: var(--muted); font-size: var(--step--1); letter-spacing: .05em; }
.hero-panel ol { list-style: none; padding: 0; margin: 0; }
.hero-panel li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
}
.hero-panel li > span { color: var(--gold); font-size: .74rem; font-weight: 600; line-height: 2; }
.hero-panel b,
.hero-panel small { display: block; }
.hero-panel b { color: var(--cream); }
.hero-panel small { margin-top: var(--s-1); color: var(--muted); font-size: var(--step--1); line-height: 1.7; }
.truth { margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--radius-md); background: var(--wash-rose); }
.truth span,
.truth strong { display: block; }
.truth span { color: var(--rose); font-size: .72rem; font-weight: 700; letter-spacing: .05em; }
.truth strong { margin-top: var(--s-1); color: var(--cream); font-size: .95rem; line-height: 1.7; }

/* ---------- 6. Sections ----------------------------------------------- */
.start { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.section-heading { max-width: 46ch; margin-bottom: var(--s-6); }
.section-heading > p:last-child { color: var(--muted); }

.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.choice {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--veil);
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease),
    background var(--dur-2) var(--ease);
}
.choice:hover { transform: translateY(-5px); border-color: var(--line-strong); background: var(--veil-strong); }
.choice > span { color: var(--gold); font-size: .78rem; font-weight: 600; }
.choice h3 { margin: var(--s-7) 0 var(--s-2); font-size: var(--step-1); }
.choice p { color: var(--muted); font-size: .92rem; }
.choice b { margin-top: auto; color: var(--cream); font-size: .85rem; }

.safety {
  margin: var(--s-6) 0 var(--s-9);
  padding: var(--s-6);
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: var(--s-6);
  align-items: center;
  border: 1px solid rgba(216, 137, 126, .34);
  border-radius: var(--radius);
  background: var(--wash-danger);
}
.safety h2 { margin-bottom: 0; font-size: var(--step-3); line-height: 1.45; }
.safety > p { margin: 0; max-width: none; color: #e0d3d0; }

footer {
  min-height: 104px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}
footer a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--gold);
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }

/* ---------- 7. Inner routes ------------------------------------------- */
.inner-main { padding-bottom: var(--s-7); }
.page-hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0 var(--section-y);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { max-width: 18ch; margin-bottom: var(--s-4); font-size: var(--step-4); }
.page-hero > p:not(.eyebrow) { max-width: 58ch; color: var(--text); font-size: var(--step-1); }
.page-hero--split,
.page-hero--library { display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--s-7); align-items: center; }
.privacy-chip {
  width: fit-content;
  margin-top: var(--s-5);
  padding: var(--s-2) var(--s-4);
  border: 1px solid rgba(157, 186, 168, .35);
  border-radius: 999px;
  color: var(--sage);
  font-size: var(--step--1);
}

/* ---------- 8. Readiness questionnaire (start.html) -------------------- */
.screening { display: grid; gap: var(--s-4); padding: var(--section-y) 0 var(--s-6); }
.screen-card {
  margin: 0;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--veil);
}
.screen-card--red { border-color: rgba(216, 137, 126, .3); }
.screen-card--amber { border-color: rgba(215, 179, 122, .3); }
.screen-card legend {
  width: 100%;
  padding: 0;
  color: var(--cream);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1.5;
}
.screen-card legend span { margin-inline-end: var(--s-2); color: var(--gold); font-size: .75rem; }
.screen-card > p { margin: var(--s-2) 0 var(--s-4); color: var(--muted); font-size: .89rem; }

.check-grid,
.radio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.check-grid label,
.radio-grid label {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(0, 0, 0, .11);
  font-size: .92rem;
  line-height: 1.65;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.check-grid label:hover,
.radio-grid label:hover { border-color: rgba(215, 179, 122, .38); background: rgba(0, 0, 0, .2); }
.check-grid label:has(:checked) { border-color: rgba(216, 137, 126, .55); background: var(--wash-danger); }
.screen-card--amber .check-grid label:has(:checked) { border-color: rgba(215, 179, 122, .55); background: var(--wash-gold); }
.radio-grid label:has(:checked) { border-color: rgba(157, 186, 168, .6); background: var(--wash-sage); }
.check-grid label:has(:focus-visible),
.radio-grid label:has(:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
input[type="checkbox"],
input[type="radio"] { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--rose); }

.field-error {
  margin: var(--s-3) 0 0;
  padding: var(--s-2) var(--s-3);
  border-inline-start: 3px solid var(--danger);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--danger);
  background: var(--wash-danger);
  font-size: var(--step--1);
}
.field-error[hidden] { display: none; }
.screen-card[data-invalid="true"] { border-color: rgba(216, 137, 126, .6); }

.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.form-submit { width: fit-content; border: 0; font: inherit; cursor: pointer; }
.form-hint { margin: 0; color: var(--faint); font-size: var(--step--1); }

/* Loading state */
.form-submit[data-busy="true"] { pointer-events: none; opacity: .75; }
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(9, 11, 18, .28);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.result {
  margin: 0 0 var(--s-8);
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--veil);
  scroll-margin-top: calc(var(--header-h) + var(--s-5));
}
.result[hidden] { display: none; }
.result h2 { max-width: 26ch; font-size: var(--step-3); line-height: 1.45; }
.result > p:not(.eyebrow) { max-width: 62ch; color: var(--text); }
.result--green { border-color: rgba(157, 186, 168, .45); background: var(--wash-sage); }
.result--amber { border-color: rgba(215, 179, 122, .45); background: var(--wash-gold); }
.result--red { border-color: rgba(216, 137, 126, .5); background: var(--wash-danger); }
.result--error { border-color: rgba(216, 137, 126, .5); }
.result-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.result-reset {
  min-height: 44px;
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: var(--step--1);
  cursor: pointer;
}
.result-reset:hover { color: var(--cream); border-color: var(--line-strong); }

.source-strip {
  margin-bottom: var(--s-8);
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}
.source-strip p { margin: 0; max-width: none; }
.source-strip a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--gold);
  text-decoration: none;
}
.source-strip a:hover { text-decoration: underline; }

/* ---------- 9. Program ------------------------------------------------ */
.dose-card {
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(182, 111, 115, .12), rgba(143, 174, 156, .05));
}
.dose-card span,
.dose-card strong { display: block; }
.dose-card span { color: var(--gold); font-size: .75rem; font-weight: 600; }
.dose-card strong { margin: var(--s-2) 0; color: var(--cream); font-family: var(--font-display); font-size: var(--step-3); line-height: 1.35; }
.dose-card p { margin: 0; color: var(--muted); font-size: .88rem; }

.program-rule {
  margin: var(--s-6) 0 var(--section-y);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}
.program-rule div {
  min-height: 142px;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-inline-start: 1px solid var(--line);
}
.program-rule div:last-child { border-inline-start: 0; }
.program-rule span { color: var(--gold); font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.program-rule p { margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--step--1); }

.session-section,
.progression,
.phases,
.cross-links,
.sources { padding: var(--section-y) 0; border-top: 1px solid var(--line); }

.session-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.session { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--veil); }
.session > header {
  padding: var(--s-4) var(--s-5);
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: var(--s-4);
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}
.session > header > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font-weight: 800;
}
.session h3 { margin: 0; font-size: var(--step-1); }
.session header p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.session ol { margin: 0; padding: 0; list-style: none; counter-reset: movements; }
.session li {
  counter-increment: movements;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
}
.session li:last-child { border-bottom: 0; }
.session li b { color: var(--cream); }
.session li b::before {
  content: counter(movements, decimal-leading-zero);
  margin-inline-end: var(--s-2);
  color: var(--gold);
  font-size: .72rem;
  font-weight: 600;
}
.session li small { display: block; margin-top: var(--s-1); color: var(--muted); font-size: .82rem; line-height: 1.75; }

.decision-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.decision { padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--veil); }
.decision > span { color: var(--cream); font-weight: 800; }
.decision p { margin: var(--s-3) 0; color: var(--text); font-size: .87rem; }
.decision small { color: var(--muted); font-size: .78rem; }
.decision--green { border-color: rgba(157, 186, 168, .4); }
.decision--amber { border-color: rgba(215, 179, 122, .4); }
.decision--red { border-color: rgba(216, 137, 126, .42); }

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.timeline article { min-height: 220px; padding: var(--s-5); background: var(--ink-soft); }
.timeline span { color: var(--gold); font-size: .74rem; font-weight: 600; }
.timeline h3 { margin: var(--s-7) 0 var(--s-2); font-size: var(--step-1); }
.timeline p { color: var(--muted); font-size: .83rem; }
.caution-note {
  margin-top: var(--s-4);
  padding: var(--s-4) var(--s-5);
  max-width: none;
  border-inline-start: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  background: var(--wash-gold);
}

/* ---------- 10. Body map ---------------------------------------------- */
.body-map { margin: var(--section-y) 0; display: grid; grid-template-columns: 236px 1fr; gap: var(--s-4); align-items: start; }
.body-nav { display: grid; align-content: start; gap: var(--s-2); }
.body-nav button {
  min-height: var(--tap);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--veil);
  font: inherit;
  font-size: .92rem;
  text-align: start;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease),
    border-color var(--dur-1) var(--ease);
}
.body-nav button:hover { color: var(--cream); border-color: var(--line-strong); }
.body-nav button[aria-selected="true"] {
  color: var(--ink);
  background: var(--cream);
  border-color: var(--cream);
  font-weight: 700;
}
.region-panel {
  min-height: 500px;
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-soft);
}
.region-panel > h2 { max-width: 32ch; font-size: var(--step-2); line-height: 1.55; }
.region-columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-top: var(--s-6); }
.region-columns section { padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius-md); }
.region-columns h3 { margin-bottom: var(--s-2); color: var(--gold); font-size: 1rem; }
.region-columns ul,
.posture-truth ul { margin: 0; padding-inline-start: var(--s-5); color: var(--muted); font-size: .89rem; }
.region-columns li,
.posture-truth li { margin-bottom: var(--s-2); }
.region-stop { margin-top: var(--s-4); padding: var(--s-4) var(--s-5); border-radius: var(--radius-md); background: var(--wash-danger); }
.region-stop strong { color: var(--danger); }
.region-stop p { margin: var(--s-1) 0 0; color: #e0d3d0; font-size: .89rem; }

.posture-truth {
  padding: var(--section-y) 0;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: var(--s-7);
  align-items: start;
  border-top: 1px solid var(--line);
}
.posture-truth > div > p:not(.eyebrow) { color: var(--text); }

.link-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.link-grid a {
  min-height: 156px;
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.link-grid a:hover { border-color: var(--line-strong); background: var(--veil); }
.link-grid span { color: var(--gold); font-size: .72rem; font-weight: 600; }
.link-grid b { color: var(--cream); line-height: 1.55; }

/* ---------- 11. Library ------------------------------------------------ */
.page-hero--library { padding-bottom: var(--s-7); }
.search-box {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--veil);
}
.search-box span { color: var(--gold); font-size: var(--step--1); font-weight: 700; }
.search-field { position: relative; display: flex; align-items: center; }
.search-box input {
  width: 100%;
  min-height: 52px;
  padding: var(--s-3) var(--s-4);
  padding-inline-end: 3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--cream);
  background: rgba(0, 0, 0, .2);
  font: inherit;
}
.search-box input::placeholder { color: #7f7c82; }
.search-box input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.search-clear {
  position: absolute;
  inset-inline-end: var(--s-2);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.search-clear:hover { color: var(--cream); background: var(--veil-strong); }
.search-clear[hidden] { display: none; }
.search-status { margin: 0; color: var(--muted); font-size: var(--step--1); min-height: 1.4em; }

.library-grid { padding: var(--section-y) 0 var(--s-6); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.library-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--veil);
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease);
}
.library-card:hover { border-color: var(--line-strong); }
.library-card[hidden] { display: none; }
.library-card summary {
  min-height: 240px;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  list-style: none;
}
.library-card summary::-webkit-details-marker { display: none; }
.library-card summary > span { color: var(--gold); font-size: .74rem; font-weight: 600; }
.library-card summary h2 { margin: var(--s-6) 0 var(--s-3); font-size: var(--step-1); font-family: var(--font-ui); line-height: 1.6; }
.library-card summary small { margin-top: auto; color: var(--muted); font-size: .83rem; line-height: 1.75; }
.library-card[open] { grid-column: span 2; border-color: var(--line-strong); }
.library-card[open] summary { min-height: 0; padding-bottom: var(--s-3); }
.library-card > p { padding: 0 var(--s-5) var(--s-5); max-width: none; color: var(--text); }
.empty-state {
  margin: 0 0 var(--s-8);
  padding: var(--s-6);
  max-width: none;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}
.empty-state[hidden] { display: none; }

.source-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.source-list a {
  min-height: 200px;
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.source-list a:hover { border-color: rgba(157, 186, 168, .55); background: var(--veil); }
.source-list span { color: var(--sage); font-size: .72rem; font-weight: 700; }
.source-list b { margin: var(--s-6) 0 var(--s-2); color: var(--cream); line-height: 1.55; }
.source-list small { color: var(--muted); line-height: 1.7; }
.update-policy {
  margin-top: var(--s-4);
  padding: var(--s-5);
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: var(--s-4);
  border: 1px solid rgba(157, 186, 168, .3);
  border-radius: var(--radius-md);
  background: var(--wash-sage);
}
.update-policy strong { color: var(--sage); }
.update-policy p { margin: 0; max-width: none; color: var(--muted); }

/* Numeric ranges must stay in logical order inside RTL copy. */
.ltr-num {
  /* Isolate so "8–12" is not reordered to "12–8" by the RTL paragraph,
     while keeping the block itself aligned to the Arabic reading edge. */
  unicode-bidi: isolate;
  direction: ltr;
  text-align: right;
}

/* ---------- 12. Next-step pager --------------------------------------- */
.page-nav {
  padding: var(--section-y) 0 var(--s-6);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
.page-nav a {
  min-height: 116px;
  padding: var(--s-4) var(--s-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.page-nav a:hover { border-color: var(--line-strong); background: var(--veil); }
.page-nav span { color: var(--gold); font-size: var(--step--1); font-weight: 600; }
.page-nav strong { color: var(--cream); font-size: var(--step-1); line-height: 1.5; }
.page-nav small { color: var(--muted); font-size: .84rem; line-height: 1.7; }
/* Prev hugs the start (right in RTL), next hugs the end — each card's text
   sits on the side it sends you toward. */
.page-nav a { text-align: start; }
.page-nav a:not(.is-prev) { text-align: end; }

/* ---------- 13. 404 ---------------------------------------------------- */
.notfound { padding: clamp(4rem, 14vh, 9rem) 0; text-align: center; }
.notfound .code {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 9rem);
  line-height: 1;
  opacity: .85;
}
.notfound h1 { max-width: none; margin: var(--s-5) auto var(--s-4); }
.notfound p { margin-inline: auto; }
.notfound .actions { justify-content: center; }

/* ---------- 14. Responsive -------------------------------------------- */
@media (max-width: 900px) {
  /* The toggle must stay clickable on top of the open drawer. */
  .nav-toggle { display: block; position: relative; z-index: 2; }
  .site-nav {
    position: fixed;
    z-index: 1;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(320px, 86vw);
    padding: calc(84px + var(--s-5)) var(--s-5) var(--s-6);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-2);
    border-inline-start: 1px solid var(--line);
    background: var(--ink-soft);
    box-shadow: var(--shadow);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform var(--dur-3) var(--ease), visibility 0s linear var(--dur-3);
    overflow-y: auto;
  }
  body.nav-open .site-nav {
    transform: translateX(0);
    visibility: visible;
    transition: transform var(--dur-3) var(--ease), visibility 0s;
  }
  .site-nav a {
    min-height: var(--tap);
    display: flex;
    align-items: center;
    padding: var(--s-3) var(--s-4);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--ink); background: var(--cream); }
  .site-nav a:hover { border-color: var(--line); }

  .hero { padding-top: var(--s-7); grid-template-columns: 1fr; }
  .hero-panel { max-width: 640px; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
  .safety { grid-template-columns: 1fr; }
  .page-hero--split,
  .page-hero--library { grid-template-columns: 1fr; gap: var(--s-5); }
  .program-rule,
  .decision-grid,
  .timeline,
  .link-grid { grid-template-columns: repeat(2, 1fr); }
  .session-grid { grid-template-columns: 1fr; }
  .library-grid,
  .source-list { grid-template-columns: repeat(2, 1fr); }
  .body-map { grid-template-columns: 1fr; }
  .body-nav { grid-template-columns: repeat(3, 1fr); }
  .region-panel { min-height: 0; }
}

@media (max-width: 580px) {
  :root { --gutter: 16px; }
  :root { --header-h: 74px; }
  .site-header { min-height: 74px; }
  .brand strong { font-size: 1.25rem; }
  .brand small { font-size: .68rem; }
  .site-nav { padding-top: calc(74px + var(--s-4)); }
  .hero { padding: var(--s-6) 0 var(--s-7); }
  .actions { display: grid; }
  .actions .button { width: 100%; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice { min-height: 0; }
  .choice h3 { margin-top: var(--s-5); }
  .safety { padding: var(--s-5); }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: var(--s-5); }
  .check-grid,
  .radio-grid,
  .program-rule,
  .decision-grid,
  .timeline,
  .region-columns,
  .posture-truth,
  .link-grid,
  .library-grid,
  .source-list,
  .update-policy { grid-template-columns: 1fr; }
  .screen-card { padding: var(--s-4); }
  .check-grid label,
  .radio-grid label { min-height: 60px; }
  .program-rule div { min-height: 108px; border-inline-start: 0; border-bottom: 1px solid var(--line); }
  .program-rule div:last-child { border-bottom: 0; }
  .body-nav { grid-template-columns: repeat(2, 1fr); }
  .region-panel { padding: var(--s-4); }
  .library-card[open] { grid-column: span 1; }
  .library-card summary { min-height: 0; }
  .page-nav { grid-template-columns: 1fr; }
  .page-nav a,
  .page-nav a:not(.is-prev) { text-align: start; }
  .session li { padding: var(--s-4); }
  .source-strip { align-items: flex-start; flex-direction: column; }
  .timeline h3 { margin-top: var(--s-5); }
  .source-list a,
  .link-grid a { min-height: 0; }
  .source-list b { margin-top: var(--s-4); }
}

/* ---------- 15. Motion & print ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
  .button:hover,
  .choice:hover { transform: none; }
}

@media print {
  .site-header, .nav-toggle, .nav-scrim, .skip-link, footer { display: none !important; }
  body { background: #fff; color: #111; }
}


/* bf-ds v2 map: start — يولّده _unify/sync-ds.mjs؛ لا تعدّل هنا */
:root{color-scheme:light;--ink:var(--bf-bg);--ink-soft:var(--bf-surface-2);--ink-raise:var(--bf-surface);--panel:var(--bf-surface);--veil:rgb(23 56 63 / 3%);--veil-strong:rgb(23 56 63 / 5%);--line:var(--bf-border);--line-soft:var(--bf-border);--line-strong:var(--bf-border-strong);--cream:var(--bf-text);--text:var(--bf-text);--muted:var(--bf-text-2);--faint:var(--bf-text-2);--gold:var(--bf-movement);--rose:var(--bf-connection);--sage:var(--bf-primary);--danger:var(--bf-danger);--wash-gold:var(--bf-movement-tint);--wash-rose:var(--bf-connection-tint);--wash-sage:var(--bf-primary-tint);--wash-danger:var(--bf-danger-tint);--font-ui:var(--bf-font);--font-display:var(--bf-font)}
body{font-family:var(--bf-font)}
/* bf-ds v2 map: end */
