/* ==========================================================================
   مساري — الأنماط الرئيسية
   ========================================================================== */

:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #6366f1;
  --brand-strong: #4f46e5;
  --brand-ink: #4338ca;
  --teal: #14b8a6;
  --teal-ink: #0f766e;
  --gold: #f59e0b;
  --gold-ink: #451a03;
  --focus: #4f46e5;
  --danger: #b91c1c;
  --on-strong: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 30px -12px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 60px -24px rgba(79, 70, 229, .35);

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;

  --f-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", Tahoma, "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", Tahoma, "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
:root[lang="fr"] {
  --f-head: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #111833;
  --surface-2: #19223f;
  --ink: #e8ecf8;
  --muted: #a3adc8;
  --line: #26304f;
  --brand: #818cf8;
  --brand-strong: #a5b4fc;
  --brand-ink: #a5b4fc;
  --teal-ink: #5eead4;
  --focus: #a5b4fc;
  --danger: #fca5a5;
  --on-strong: #0b1020;
  --shadow: none;
  --shadow-lg: none;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --surface: #111833;
    --surface-2: #19223f;
    --ink: #e8ecf8;
    --muted: #a3adc8;
    --line: #26304f;
    --brand: #818cf8;
    --brand-strong: #a5b4fc;
    --brand-ink: #a5b4fc;
    --teal-ink: #5eead4;
    --focus: #a5b4fc;
    --danger: #fca5a5;
    --on-strong: #0b1020;
    --shadow: none;
    --shadow-lg: none;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-wrap: break-word;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; line-height: 1.5; margin: 0 0 .6rem; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6.4vw, 3.4rem); line-height: 1.35; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand-ink); text-underline-offset: .2em; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 35%, transparent); }
[hidden] { display: none !important; }

.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -5rem; z-index: 100;
  background: var(--gold); color: var(--gold-ink); padding: .7rem 1.1rem; border-radius: var(--r-s); font-weight: 600;
}
.skip-link:focus { top: .8rem; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.ico { width: 1.25rem; height: 1.25rem; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.2rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); font-family: var(--f-head); font-weight: 700; font-size: 1.5rem; }
.brand-mark { width: 2.6rem; height: 2.6rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.brand-mark svg { width: 2.1rem; height: 2.1rem; }
.main-nav ul { list-style: none; display: flex; gap: .25rem; }
.main-nav a {
  display: flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-size: .98rem; font-weight: 500;
}
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.header-tools { display: flex; gap: .5rem; }
.icon-btn {
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); border-radius: 14px; color: var(--ink);
}
.icon-btn:hover { border-color: var(--brand); }
[data-theme-icon="sun"] { display: none; }
:root[data-theme="dark"] [data-theme-icon="moon"] { display: none; }
:root[data-theme="dark"] [data-theme-icon="sun"] { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-icon="moon"] { display: none; }
  :root:not([data-theme="light"]) [data-theme-icon="sun"] { display: block; }
}

@media (max-width: 860px) {
  body { padding-block-end: calc(5.2rem + env(safe-area-inset-bottom, 0px)); }
  /* backdrop-filter على الترويسة يجعلها مرجعًا لعناصر position:fixed ويُفسد شريط التنقل السفلي */
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
  .main-nav {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-block-start: 1px solid var(--line);
    padding: .4rem .6rem calc(.4rem + env(safe-area-inset-bottom, 0px));
  }
  .main-nav ul { justify-content: space-around; gap: 0; }
  .main-nav li { flex: 1; }
  .main-nav a { flex-direction: column; gap: .15rem; font-size: .74rem; padding: .4rem .2rem; border-radius: 14px; line-height: 1.5; text-align: center; }
  .main-nav .ico { width: 1.5rem; height: 1.5rem; }
  .main-nav a[aria-current="page"] { background: var(--surface-2); color: var(--brand-ink); }
  .brand { font-size: 1.35rem; }
}

/* ---------- buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.4rem; border-radius: 14px; border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.4; background: var(--surface); color: var(--ink);
}
.btn-primary { background: var(--brand-strong); color: var(--on-strong); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.btn .ico { width: 1.1rem; height: 1.1rem; }
.btn-sm { min-height: 2.5rem; padding: .4rem 1rem; font-size: .95rem; border-radius: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: .35rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .95rem; text-decoration: none;
}
button.chip:hover, a.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pill { display: inline-block; padding: .1rem .7rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .85rem; margin: .15rem .1rem; line-height: 1.8; }

/* ---------- sections ---------- */
.section { padding-block: 3rem; }
.section + .section { padding-block-start: 1rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-block-end: 1.4rem; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); }
.page-head { padding-block: 2.6rem 1.2rem; }
.page-head p { color: var(--muted); max-width: 46rem; font-size: 1.1rem; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-block-end: .8rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span[aria-hidden] { margin-inline: .4rem; }

.notice { padding: .9rem 1.1rem; border-radius: var(--r-m); background: var(--surface-2); color: var(--muted); font-size: .95rem; border: 1px solid var(--line); }
.notice strong { color: var(--ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.3rem; }

.grid { display: grid; gap: 1rem; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } .g4.keep2 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: 3.2rem 2.4rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1rem; align-items: center; }
.hero-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero-art path.road { fill: none; stroke: var(--line); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.hero-art path.trail { fill: none; stroke: var(--brand); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s .3s ease-out forwards; }
.hero-art circle { fill: var(--surface); stroke: var(--brand); stroke-width: 3; }
.hero-art circle.goal { fill: var(--gold); stroke: var(--gold); }
.hero-art text { font-family: var(--f-body); font-size: 15px; font-weight: 600; fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { display: none; } }
.hero-inner { position: relative; }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 36rem; }
.fork { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block-start: 1.6rem; }
.door {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.4rem; border-radius: var(--r-l);
  text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .15s;
}
.door:hover { border-color: var(--brand); }
.door h2 { font-size: 1.25rem; margin: 0; }
.door p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.75; }
.door .ico-tile { width: 2.9rem; height: 2.9rem; border-radius: 14px; display: grid; place-items: center; margin-block-end: .6rem; }
.door.known { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.door.known p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.door.known .ico-tile { background: color-mix(in srgb, var(--bg) 16%, transparent); }
.door.unknown .ico-tile { background: var(--gold); color: var(--gold-ink); }
.door .go { margin-block-start: auto; padding-block-start: .6rem; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .95rem; }
@media (max-width: 640px) { .fork { grid-template-columns: 1fr; } }

/* stage chips */
.stages { display: flex; flex-wrap: wrap; gap: .6rem; }
.stages .chip { min-height: 2.9rem; padding-inline: 1.2rem; }

/* ---------- families ---------- */
[data-fam="engineering"] { --fam: #557fa6; }
[data-fam="computing"]   { --fam: #5b6fbd; }
[data-fam="health"]      { --fam: #c9695f; }
[data-fam="business"]    { --fam: #b98a2c; }
[data-fam="law-politics"]{ --fam: #8a6fb0; }
[data-fam="creative"]    { --fam: #b95d8a; }
[data-fam="science"]     { --fam: #2f9a90; }
[data-fam="human"]       { --fam: #6f9a48; }
.fam-tile {
  width: 2.8rem; height: 2.8rem; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--fam, var(--brand)) 16%, var(--surface));
  color: color-mix(in srgb, var(--fam, var(--brand)) 70%, var(--ink));
}
.fam-card {
  display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  border-inline-start: 4px solid var(--fam);
}
.fam-card:hover { border-color: var(--fam); }
.fam-card h3 { margin: 0 0 .15rem; font-size: 1.02rem; }
.fam-card p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.7; }
.fam-card small { color: var(--muted); font-size: .82rem; }

/* ---------- careers ---------- */
.career-card {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
}
.career-card:hover { border-color: var(--brand); }
.career-card .emoji { width: 3rem; height: 3rem; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; background: color-mix(in srgb, var(--fam, var(--brand)) 14%, var(--surface)); margin-block-end: .3rem; }
.career-card h3 { margin: 0; }
.career-card p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.75; }
.career-card .pills { margin-block-start: auto; padding-block-start: .5rem; }
.tools { display: grid; gap: .9rem; margin-block-end: 1.2rem; }
.search-input {
  width: 100%; min-height: 3.1rem; padding: .7rem 1.1rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink);
}
.search-input:focus-visible { border-color: var(--focus); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.count { color: var(--muted); font-size: .92rem; margin-block-end: .8rem; }
.empty { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-m); }

.career-hero { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.career-hero .emoji { width: 4.6rem; height: 4.6rem; border-radius: 20px; display: grid; place-items: center; font-size: 2.4rem; background: color-mix(in srgb, var(--fam, var(--brand)) 15%, var(--surface)); border: 1px solid var(--line); }
.career-hero h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.fam-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none; font-size: .95rem; }
.fam-link:hover { color: var(--brand-ink); }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.bullets { list-style: none; }
.bullets li { position: relative; padding-inline-start: 1.3rem; margin-block-end: .35rem; }
.bullets li::before { content: ""; position: absolute; inset-inline-start: 0; top: .85em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--teal); }

/* timeline (a real sequence, so numbered) */
.timeline { list-style: none; counter-reset: st; position: relative; }
.timeline li { counter-increment: st; overflow-wrap: anywhere; position: relative; padding-block: .5rem .95rem; padding-inline: 3.2rem 0; min-height: 3rem; }
.timeline li::before {
  content: counter(st); position: absolute; inset-inline-start: 0; top: .3rem; width: 2.1rem; height: 2.1rem;
  border-radius: 50%; background: var(--brand-strong); color: var(--on-strong); display: grid; place-items: center; font-weight: 700; font-size: .95rem; font-family: var(--f-head);
}
.timeline li::after { content: ""; position: absolute; inset-inline-start: 1.02rem; top: 2.5rem; bottom: -.1rem; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li:last-child::before { background: var(--gold); color: var(--gold-ink); }
.timeline.plain li::before { content: ""; width: 1rem; height: 1rem; inset-inline-start: .55rem; top: .75rem; background: var(--surface); border: 3px solid var(--brand); }
.timeline.plain li::after { inset-inline-start: 1.02rem; top: 1.75rem; }

/* ---------- quiz ---------- */
.quiz-shell { max-width: 46rem; }
.quiz-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.6rem; }
.progress { height: .5rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-block-end: 1.3rem; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s; border-radius: 999px; }
.q-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .92rem; margin-block-end: .6rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend.q-text { font-family: var(--f-head); font-size: clamp(1.15rem, 3.4vw, 1.4rem); line-height: 1.7; font-weight: 600; padding: 0; margin-block-end: 1.1rem; min-height: 4.5rem; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 4rem; padding: .5rem .35rem;
  border: 2px solid var(--line); border-radius: 14px; background: var(--bg); font-size: .92rem; line-height: 1.5;
}
.opt input:hover + span { border-color: var(--brand); }
.opt input:checked + span { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-strong); font-weight: 600; }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 640px) {
  .scale { grid-template-columns: 1fr; }
  .opt span { min-height: 3.2rem; justify-content: flex-start; padding-inline: 1rem; font-size: 1rem; }
}
.quiz-nav { display: flex; justify-content: space-between; gap: 1rem; margin-block-start: 1.4rem; }
.result h2 { margin-block-end: .3rem; }
.dim-bars { display: grid; gap: .55rem; margin-block: 1rem 1.6rem; }
.dim { display: grid; grid-template-columns: 9.5rem 1fr 3.6rem; gap: .7rem; align-items: center; font-size: .95rem; }
.dim .bar { height: .7rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.dim .bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.dim.top .bar i { background: var(--gold); }
.dim b { font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .dim { grid-template-columns: 7rem 1fr 3rem; font-size: .88rem; } }
.rank { list-style: none; display: grid; gap: .7rem; margin-block: 1rem 1.6rem; }
.rank li { display: flex; gap: 1rem; align-items: center; padding: 1rem; background: var(--surface-2); border-radius: var(--r-m); border-inline-start: 4px solid var(--fam); }
.rank .score { margin-inline-start: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank a { color: var(--ink); font-weight: 600; text-decoration: none; }

/* ---------- roadmap ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
label.field { display: block; font-weight: 600; margin-block-end: .35rem; }
select.select, input.input {
  width: 100%; min-height: 3.1rem; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
}
.road-out { margin-block-start: 1.6rem; }

/* رأس الرحلة */
.journey-head { display: grid; grid-template-columns: 1fr minmax(2.5rem, 6rem) 1fr; gap: .8rem; align-items: center; text-align: center; background: var(--ink); color: var(--bg); border-radius: var(--r-l); padding: 1.4rem 1.1rem; }
.journey-head .node { display: grid; gap: .2rem; justify-items: center; }
.journey-head .node .dot { position: relative; width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: color-mix(in srgb, var(--bg) 16%, transparent); }
.journey-head .node.goal .dot { background: var(--gold); color: var(--gold-ink); }
.journey-head small { color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: .8rem; }
.journey-head b { font-family: var(--f-head); font-size: 1.02rem; line-height: 1.5; }
.journey-head .dash { display: block; width: 100%; height: 3px; border-radius: 3px; background: repeating-linear-gradient(to left, color-mix(in srgb, var(--bg) 45%, transparent) 0 6px, transparent 6px 14px); }
@media (max-width: 420px) { .journey-head { padding: 1.1rem .7rem; gap: .5rem; } .journey-head b { font-size: .92rem; } .journey-head .node .dot { width: 2.7rem; height: 2.7rem; font-size: 1.3rem; } }

/* شريط الإنجاز */
.journey-progress { display: flex; align-items: center; gap: .8rem; margin-block: 1.2rem; }
.journey-progress .bar { flex: 1; height: .6rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.journey-progress .bar i { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 999px; transition: width .35s ease; }
.journey-progress b { font-variant-numeric: tabular-nums; font-size: .92rem; white-space: nowrap; }

/* محطات الرحلة */
.journey { list-style: none; position: relative; margin: 0; padding: 0; }
.journey > li { position: relative; padding-inline-start: 3.4rem; padding-block-end: 1rem; }
.journey > li::after { content: ""; position: absolute; inset-inline-start: 1.32rem; top: 2.6rem; bottom: -.4rem; width: 3px; background: var(--line); border-radius: 3px; }
.journey > li:last-child::after { display: none; }
.jnode {
  position: absolute; inset-inline-start: 0; top: .5rem; width: 2.8rem; height: 2.8rem; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: 1rem;
  background: var(--surface); color: var(--brand-ink); border: 3px solid var(--line);
}
.jcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1rem 1.1rem; }
.jcard h3 { margin: 0; font-size: 1.05rem; }
.jcard p { margin: .2rem 0 0; color: var(--muted); font-size: .94rem; }

/* المحطة الحالية */
.journey > li.now .jnode { background: var(--brand-strong); color: var(--on-strong); border-color: var(--brand-strong); }
.journey > li.now .jcard { border-color: var(--brand); border-inline-start: 4px solid var(--brand); }
.now-flag { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--brand-ink); background: var(--surface-2); border-radius: 999px; padding: .1rem .7rem; margin-block-end: .4rem; }
.now-flag .ping { width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); animation: ping 2s ease-out infinite; }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); } 50% { box-shadow: 0 0 0 .38rem color-mix(in srgb, var(--brand) 0%, transparent); } }

/* المحطة الأخيرة */
.journey > li.goal .jnode { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-size: 1.3rem; }
.journey > li.goal .jcard { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }

/* قائمة المهام */
.todo { list-style: none; display: grid; gap: .5rem; margin-block-start: .8rem; }
.todo li { margin: 0; }
.todo label { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; min-height: 2.8rem; line-height: 1.7; }
.todo label:hover { border-color: var(--teal); }
.todo input { width: 1.3rem; height: 1.3rem; margin: .25rem 0 0; accent-color: var(--teal-ink); flex: none; }
.todo input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--teal); }

/* ظهور متدرج لمحطات الرحلة: لحظة واحدة عند توليد الخريطة */
.journey > li { animation: rise .45s ease-out backwards; }
.journey > li:nth-child(1) { animation-delay: .02s }
.journey > li:nth-child(2) { animation-delay: .09s }
.journey > li:nth-child(3) { animation-delay: .16s }
.journey > li:nth-child(4) { animation-delay: .23s }
.journey > li:nth-child(5) { animation-delay: .3s }
.journey > li:nth-child(6) { animation-delay: .37s }
.journey > li:nth-child(7) { animation-delay: .44s }
.journey > li:nth-child(n+8) { animation-delay: .5s }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- exams ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr; } }
details.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin-block-end: .7rem; }
details.acc summary { list-style: none; cursor: pointer; padding: 1rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 600; font-family: var(--f-head); font-size: 1rem; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand-ink); }
details.acc[open] summary::after { content: "−"; }
details.acc .acc-body { padding: 0 1.2rem 1.2rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 30rem; }
th, td { padding: .7rem .9rem; text-align: start; border-block-end: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-block-end: 0; }
.ext { display: inline-flex; align-items: center; gap: .3rem; }
.ext .ico { width: .95rem; height: .95rem; }
.tag { display: inline-block; font-size: .78rem; padding: 0 .55rem; border-radius: 999px; background: color-mix(in srgb, var(--teal) 22%, var(--surface)); color: var(--teal-ink); margin-inline-start: .3rem; }
.tag.ext-tag { background: var(--surface-2); color: var(--muted); }

/* ---------- misc pages ---------- */
.hub-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.hub-card:hover { border-color: var(--brand); }
.hub-card h3 { margin: 0 0 .2rem; }
.hub-card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.75; }
.hub-card .fam-tile { --fam: var(--brand); }
.qr-box { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.qr-box > svg { width: 9.5rem; height: 9.5rem; border-radius: var(--r-m); border: 1px solid var(--line); flex: none; }
.link-list { list-style: none; display: grid; gap: .4rem; margin-block-start: .6rem; }
.kv { display: grid; gap: .7rem; margin-block: 1rem; }
.kv > div { min-width: 0; padding-inline-start: 1rem; border-inline-start: 3px solid var(--teal); overflow-wrap: anywhere; }
.kv b { display: block; font-size: .92rem; color: var(--muted); font-weight: 600; }
.inst-head { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.stack > * + * { margin-block-start: 1.4rem; }
.error-page { text-align: center; padding-block: 5rem; }
.error-page .big { font-family: var(--f-head); font-size: clamp(4rem, 16vw, 8rem); font-weight: 700; color: var(--brand); line-height: 1.2; }

/* ---------- footer ---------- */
.site-footer { margin-block-start: 3rem; background: var(--ink); color: color-mix(in srgb, var(--bg) 88%, transparent); padding-block: 2.6rem 1.4rem; }
:root[data-theme="dark"] .site-footer { background: #0a1118; }
.site-footer a { color: inherit; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; } }
.site-footer h2 { font-size: 1rem; color: #fff; margin-block-end: .6rem; }
.site-footer ul { list-style: none; display: grid; gap: .1rem; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 2.5rem; }
.site-footer p { font-size: .93rem; margin: 0 0 .6rem; }
.footer-bottom { margin-block-start: 1.6rem; padding-block-start: 1rem; border-block-start: 1px solid rgba(255, 255, 255, .15); font-size: .85rem; }

/* ---------- search dialog ---------- */
dialog.search-dialog { width: min(640px, calc(100% - 1.5rem)); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); color: var(--ink); padding: 1.1rem; margin-block-start: 8vh; }
dialog.search-dialog::backdrop { background: rgba(6, 14, 22, .55); }
.search-row { display: flex; gap: .6rem; }
.results { margin-block-start: .9rem; display: grid; gap: .4rem; max-height: 55vh; overflow: auto; }
.result-item { display: flex; gap: .8rem; align-items: center; padding: .7rem .9rem; border-radius: 12px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.result-item:hover, .result-item:focus-visible { background: var(--surface-2); border-color: var(--line); }
.result-item .emoji { font-size: 1.4rem; width: 2rem; text-align: center; }
.result-item small { display: block; color: var(--muted); line-height: 1.5; }

@media print {
  .site-header, .main-nav, .site-footer, .btn-row, .quiz-nav { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art path.trail { animation: none; stroke-dashoffset: 0; }
  .progress > i, .journey-progress .bar i { transition: none; }
  .journey > li { animation: none; }
  .now-flag .ping { animation: none; }
}

/* helpers */
.mt { margin-block-start: 1rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.flush { margin: 0 !important; }
.center-x { margin-inline: auto; }
.center-row { justify-content: center; }

@media (max-width: 640px) {
  .fam-card { flex-direction: column; gap: .6rem; padding: .95rem; }
  .fam-card p { display: none; }
}

@media (max-width: 560px) {
  table { min-width: 0; font-size: .88rem; }
  th, td { padding: .55rem .6rem; }
  th { white-space: normal; }
}

.journey-head .dash-wrap { display: grid; gap: .35rem; justify-items: center; }
.journey-head .dash-wrap small { font-size: .74rem; }

/* بطاقات مسارات ما بعد الباكالوريا */
.track-card { display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.track-card h3 { margin: 0 0 .3rem; font-size: 1rem; }
.track-card p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.7; }
.track-card b { color: var(--ink); font-weight: 600; }
.track-card .fam-tile, .hub-card .fam-tile, .inst-head .fam-tile { --fam: var(--brand); color: var(--brand-ink); }
.track-card .ico, .hub-card .ico, .inst-head .ico { width: 1.4rem; height: 1.4rem; stroke-width: 1.9; }

/* أيقونة داخل عنوان الأكورديون وفي رقائق المستويات */
.sum-label { display: flex; align-items: center; gap: .55rem; }
.sum-label .ico { color: var(--brand-ink); }
.stages .chip .ico { color: var(--brand-ink); }

/* بطاقة تثبيت التطبيق */
.install-card { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); }
.install-card > div { flex: 1; min-width: 12rem; }
.install-card h3 { margin: 0 0 .15rem; }
.install-card p { margin: 0; font-size: .93rem; }
.install-card .fam-tile { --fam: var(--gold); color: var(--gold-ink); }

/* ---------- خريطة مستقبلي: الخطوات الثلاث ---------- */
.road-steps { list-style: none; display: flex; gap: .5rem; margin-block-end: 1.4rem; counter-reset: none; }
.road-steps li { flex: 1; display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .92rem; font-weight: 600; }
.road-steps li span { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); font-size: .85rem; flex: none; }
.road-steps li.on { background: var(--ink); color: var(--bg); }
.road-steps li.on span { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.road-steps li.done span { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (max-width: 420px) { .road-steps li { flex-direction: column; gap: .2rem; border-radius: 14px; font-size: .8rem; padding: .5rem .3rem; text-align: center; } }

.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .8rem; margin-block-start: .8rem; }
.level-card, .goal-card {
  display: flex; align-items: center; gap: .7rem; text-align: start; min-height: 3.6rem; padding: .9rem 1rem;
  border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font-weight: 600;
}
.level-card .ico { width: 1.6rem; height: 1.6rem; color: var(--brand-ink); }
.level-card:hover, .goal-card:hover { border-color: var(--brand); }
.level-card[aria-pressed="true"] { border-color: var(--brand-strong); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem; }
@media (max-width: 360px) { .goal-grid, .level-grid { grid-template-columns: 1fr; } }
.goal-card { font-weight: 500; font-size: .92rem; padding: .7rem .8rem; gap: .5rem; line-height: 1.5; }
.goal-card .emoji { font-size: 1.4rem; }
.goal-card[hidden] { display: none; }
.change-row { margin-block: .8rem 0; }

.phase { margin-block-start: 2rem; }
.phase-title { display: flex; align-items: center; gap: .6rem; }
.phase-title span { width: 2.2rem; height: 2.2rem; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); font-size: 1.05rem; flex: none; }
.jcard .journey-progress { margin-block: .9rem .2rem; }

.route-card { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--r-l); padding: 1.3rem; }
.route-head { display: flex; gap: .9rem; align-items: center; margin-block-end: .4rem; }
.route-head h3 { margin: .1rem 0 0; font-size: 1.15rem; }
.route-head .fam-tile { --fam: var(--brand); color: var(--brand-ink); }
.route-card h4, details.acc h4 { font-size: 1rem; margin: 1.1rem 0 .5rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-block: .8rem; }
.facts > div { min-width: 0; padding: .7rem .9rem; border-radius: 12px; background: var(--surface-2); font-size: .94rem; line-height: 1.75; overflow-wrap: anywhere; }
.facts b { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
a.track-card { text-decoration: none; color: var(--ink); }
a.track-card:hover { border-color: var(--brand); }

/* ---------- إضافات أكتوبر 2026 ---------- */
.kicker { display: inline-block; font-size: .92rem; font-weight: 600; color: var(--teal-ink); background: color-mix(in srgb, var(--teal) 14%, transparent); padding: .2rem .8rem; border-radius: 999px; margin-block-end: .8rem; }

/* زر الخدمة في الترويسة */
.header-pill { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border-radius: 14px; border: 1px dashed var(--gold); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.header-pill:hover, .header-pill[aria-current="page"] { background: color-mix(in srgb, var(--gold) 18%, transparent); }
@media (max-width: 520px) { .header-pill { display: none; } }

/* حالة مغلقة */
.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; padding: .15rem .75rem; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.status.closed { color: #9a5b00; background: color-mix(in srgb, var(--gold) 22%, var(--surface)); }
:root[data-theme="dark"] .status.closed { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status.closed { color: var(--gold); } }
.page-head .status { margin-block-end: .6rem; }

/* شريط الخدمة في الرئيسية */
.service-banner { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: var(--r-l); border: 1px solid var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--surface)); color: var(--ink); text-decoration: none; flex-wrap: wrap; }
.service-banner:hover { background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }
.service-banner .fam-tile { --fam: var(--gold); color: var(--gold-ink); }
.sb-text { flex: 1; min-width: 14rem; display: grid; gap: .15rem; }
.sb-text span { color: var(--muted); font-size: .95rem; line-height: 1.7; }
.service-card .btn:disabled { width: 100%; opacity: .6; }

/* بطاقة ملاحظة شخصية */
.note-card { background: var(--surface-2); border-radius: var(--r-l); padding: 1.5rem 1.6rem; border-inline-start: 5px solid var(--teal); }
.note-card h2 { font-size: 1.3rem; }
.note-card p { max-width: 62ch; }
.note-card > a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }

/* المستجدات */
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; }
.news-card h3 { margin: 0; font-size: 1.05rem; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover { color: var(--brand-ink); text-decoration: underline; }
.news-card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.75; }
.news-card .src { margin-block-start: auto; padding-block-start: .4rem; font-size: .85rem; }
.news-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .85rem; color: var(--muted); }
.news-meta .tag { margin: 0; }
.news-list { display: grid; gap: .9rem; max-width: 52rem; }

/* بطاقات الروابط الرسمية */
.link-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .7rem; margin-block-end: .4rem; }
.link-card { display: grid; gap: .15rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg); color: var(--ink); text-decoration: none; min-width: 0; }
.link-card:hover { border-color: var(--brand); }
.link-card b { display: flex; align-items: center; gap: .35rem; color: var(--brand-ink); font-size: .98rem; }
.link-card b .ico { width: 1rem; height: 1rem; }
.link-card span { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.link-card small { color: var(--muted); font-size: .78rem; direction: ltr; text-align: end; overflow-wrap: anywhere; }

/* ==========================================================================
   الإصدار الجديد: لوحة ألوان حديثة، صور، نسخة فرنسية، استمارة التسجيل
   ========================================================================== */
body { background:
  radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%),
  radial-gradient(900px 400px at 0% 0%, color-mix(in srgb, var(--teal) 8%, transparent), transparent 70%),
  var(--bg); background-repeat: no-repeat; }
.brand-mark { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.btn-primary { background: linear-gradient(135deg, var(--brand-strong), color-mix(in srgb, var(--brand-strong) 70%, var(--teal))); box-shadow: var(--shadow-lg); }
.card, .door, .fam-card, .career-card, .hub-card, .track-card, .news-card, .link-card { box-shadow: var(--shadow); }
.card { border-radius: var(--r-l); }
.main-nav a[aria-current="page"], .chip[aria-pressed="true"] { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-strong); }
.kicker { color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 12%, transparent); }
:root[lang="fr"] h1, :root[lang="fr"] h2, :root[lang="fr"] h3 { letter-spacing: -.01em; }
:root[lang="fr"] body { line-height: 1.7; }

/* زر اللغة */
.lang-btn { font-weight: 700; font-size: .95rem; text-decoration: none; font-family: var(--f-body); }
.lang-btn:hover { border-color: var(--brand); color: var(--brand-ink); }

/* الصور */
.photo { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--surface-2); }
.hero-grid { grid-template-columns: 1.05fr .95fr; gap: 2.5rem; }
.hero h1 { max-width: 18ch; }
.hero-photo { position: relative; aspect-ratio: 10 / 11; border-radius: 32px; overflow: visible; }
.hero-photo .photo { border-radius: 0; }
.hero-photo { overflow: hidden; border-radius: 32px; box-shadow: var(--shadow-lg); outline: 1px solid var(--line); }
.hero-float { position: absolute; inset-inline-start: 1rem; bottom: 1rem; display: flex; gap: .7rem; align-items: center; max-width: 19rem; padding: .8rem 1rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; line-height: 1.5; }
.hero-float b { display: block; font-size: .85rem; color: var(--brand-ink); }
.hero-float small { display: block; font-size: .9rem; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 1.6rem; margin-block-start: 1.8rem; }
.hero-stats b { display: block; font-family: var(--f-head); font-size: 1.7rem; line-height: 1.2; color: var(--ink); }
.hero-stats span { color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero-photo { aspect-ratio: 4 / 3; max-height: 22rem; }
  .hero-photo::before { display: none; }
  .hero-float { inset-inline-start: .8rem; bottom: .8rem; max-width: calc(100% - 1.6rem); }
}

.page-head-wrap { border-block-end: 1px solid var(--line); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface-2) 60%, transparent)); }
.page-head.has-photo { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; }
.ph-photo { aspect-ratio: 9 / 6.4; border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-lg); }
@media (max-width: 860px) {
  .page-head.has-photo { grid-template-columns: 1fr; gap: 1rem; }
  .ph-photo { aspect-ratio: 16 / 7; order: -1; }
}
.story { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.6rem; align-items: stretch; }
.story-photo { border-radius: var(--r-l); overflow: hidden; min-height: 16rem; box-shadow: var(--shadow); }
.story .note-card { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } .story-photo { min-height: 0; aspect-ratio: 16 / 9; } }
.credit { color: var(--muted); }

/* الخريطة: تفاصيل المسارات */
.facts > div.wide { grid-column: 1 / -1; }
.facts b { display: flex; align-items: center; gap: .35rem; }
.facts b .ico { width: 1rem; height: 1rem; color: var(--brand-ink); }
.acc-body h3, .acc-body h4, .route-card h4 { margin-block: 1.1rem .5rem; font-size: 1rem; display: flex; align-items: center; gap: .4rem; }
.acc-body .card h3, .acc-body .card h4, .route-card .card h4 { margin-block-start: 0; }
.acc-body .card, .route-card .card { padding: 1rem 1.1rem; box-shadow: none; background: var(--surface-2); border-color: transparent; }
.cal { list-style: none; display: grid; gap: .45rem; }
.cal li { display: grid; grid-template-columns: minmax(7rem, 9.5rem) 1fr; gap: .8rem; padding: .6rem .8rem; border-radius: 12px; background: var(--surface-2); line-height: 1.7; font-size: .95rem; }
.cal b { color: var(--brand-ink); }
@media (max-width: 520px) { .cal li { grid-template-columns: 1fr; gap: .1rem; } }
.cal-acc { margin-block-start: 1rem; }
.jcard .cal-acc { background: transparent; }

/* استمارة التسجيل (معطلة) */
.reg-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(1.1rem, 3vw, 2rem); box-shadow: var(--shadow); }
.reg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.reg-head h2 { margin: 0; }
.reg-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.reg-form fieldset[disabled] { opacity: .62; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 1rem; margin-block-start: 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: .95rem; }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; min-height: 2.9rem; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.field textarea { resize: vertical; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea, fieldset[disabled] button { cursor: not-allowed; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; margin-block-start: .3rem; }
.check { display: flex; align-items: flex-start; gap: .55rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: .93rem; line-height: 1.6; }
.check input { width: 1.1rem; height: 1.1rem; margin: .3rem 0 0; accent-color: var(--brand-strong); flex: none; }
label.check.mt { display: flex; }
.service-card h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }

/* الطباعة */
@media print {
  .site-header, .main-nav, .site-footer, .road-steps, .change-row, .btn-row, .search-dialog, .ph-photo, .hero-photo { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  details { display: block; } details > * { display: block; }
  .card, .route-card { box-shadow: none; break-inside: avoid; }
}

/* صور المؤسسات الحقيقية (Wikimedia Commons) */
.wm { margin: 0; min-width: 0; }
.wm-img { aspect-ratio: 3 / 2; border-radius: var(--r-m); overflow: hidden; background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--brand) 12%, var(--surface-2))); }
.wm figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .6rem; padding-block-start: .45rem; font-size: .86rem; line-height: 1.6; color: var(--muted); }
.wm figcaption span { color: var(--ink); font-weight: 600; }
.wm figcaption a { color: var(--muted); font-size: .8rem; }
.wm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem 1rem; }
@media (max-width: 860px) { .wm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .wm-grid { grid-template-columns: 1fr; } }
.card-wm { margin-block-end: 1rem; }
.card-wm .wm-img { aspect-ratio: 16 / 7; }
.route-wm { margin-block-end: .8rem; max-width: 34rem; }
.route-wm .wm-img { aspect-ratio: 16 / 8; }
.ph-wm .wm-img { aspect-ratio: 9 / 6.4; border-radius: var(--r-l); box-shadow: var(--shadow-lg); }
@media (max-width: 860px) { .ph-wm { order: -1; } .ph-wm .wm-img { aspect-ratio: 16 / 8; } }

/* رسالة الترحيب، قصة صاحب المشروع، بطاقات النصائح */
.greeting { margin: 0 0 .4rem; font-weight: 600; color: var(--teal-ink); min-height: 1.9em; }
.developer-story { border-inline-start-color: var(--brand-strong); }
.signature { margin: 0; font-weight: 600; color: var(--brand-ink); }
.tip-card { padding: 1rem 1.1rem; border-radius: var(--r-m); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.tip-card b { display: block; margin-block-end: .3rem; }
.tip-card p { margin: 0; font-size: .97rem; line-height: 1.8; }

/* اختبار الميول: تشجيع، كشف النتيجة، نسب التوافق */
.q-cheer { margin: .8rem 0 0; padding: .5rem .9rem; border-radius: 12px; background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal-ink); font-weight: 600; font-size: .95rem; animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.reveal { text-align: center; }
.reveal .muted { max-width: 34rem; margin-inline: auto; }
.reveal-burst { font-size: 3.4rem; line-height: 1; margin-block-end: .6rem; animation: bounce 1.4s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.center-row { justify-content: center; }
.profile-hero { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.2rem; border-radius: var(--r-l); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--teal) 12%, var(--surface))); margin-block-end: 1.4rem; animation: pop .5s ease-out; }
.profile-emoji { flex: none; width: 4.2rem; height: 4.2rem; display: grid; place-items: center; font-size: 2.3rem; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.profile-hero h2 { margin-block-end: .3rem; }
.profile-hero .kicker { margin-block-end: .3rem; }
@media (max-width: 520px) { .profile-hero { flex-direction: column; } }
.match-list { list-style: none; display: grid; gap: .8rem; margin-block-end: 1rem; }
.match { padding: .8rem 1rem; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); }
.match.best { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.match-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-block-end: .4rem; }
.match-top a { font-weight: 700; color: var(--ink); text-decoration: none; }
.match-top b { font-family: var(--f-head); font-size: 1.3rem; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.match .bar { display: block; height: .6rem; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.match .bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand-strong), var(--teal)); transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.dim-bars .bar i { transition: width 1s ease-out; }
.next-box { margin-block: 1.4rem .4rem; padding: 1.2rem; border-radius: var(--r-l); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.next-box h3 { margin-block-start: 0; }
@media (prefers-reduced-motion: reduce) { .q-cheer, .profile-hero, .reveal-burst { animation: none; } .match .bar i, .dim-bars .bar i { transition: none; } }

/* مذكرة المراجعة */
.pl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.pl-stat { padding: 1rem; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.pl-stat b { display: block; font-family: var(--f-head); font-size: 1.7rem; line-height: 1.3; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.pl-stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) { .pl-stats { grid-template-columns: repeat(2, 1fr); } }
.pl-form h2, .pl-head h2 { font-size: 1.25rem; margin: 0; }
.pl-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-block-end: .6rem; }
.pl-msg { color: var(--danger); margin: .6rem 0 0; }
.pl-list { list-style: none; display: grid; gap: .5rem; margin-block-start: .8rem; }
.pl-item { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border-radius: 12px; background: var(--surface-2); }
.pl-item label { flex: 1; display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; min-width: 0; }
.pl-item input { width: 1.25rem; height: 1.25rem; margin-block-start: .35rem; accent-color: var(--teal); flex: none; }
.pl-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.6; }
.pl-text small { color: var(--muted); }
.pl-text em { color: var(--danger); font-style: normal; }
.pl-item.done .pl-text b { text-decoration: line-through; color: var(--muted); }
.pl-del { width: 2.5rem; height: 2.5rem; flex: none; font-size: .9rem; }
.badge-grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: .8rem .5rem; border-radius: var(--r-m); border: 1px dashed var(--line); line-height: 1.5; transition: transform .2s; }
.badge .b-ico { font-size: 1.8rem; }
.badge small { color: var(--muted); font-size: .8rem; }
.badge.locked .b-ico { filter: grayscale(1); opacity: .45; }
.badge.unlocked { border-style: solid; border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }
.badge.unlocked .b-ico { animation: pop .4s ease-out; }
.toast { position: fixed; z-index: 80; inset-inline: 1rem; bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); margin-inline: auto; max-width: 26rem; padding: .8rem 1.1rem; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; text-align: center; box-shadow: var(--shadow-lg); animation: pop .3s ease-out; }
@media (min-width: 861px) { .toast { bottom: 2rem; } }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

.wm.img-failed, .photo-failed { display: none !important; }
.hero-grid:has(.photo-failed), .story:has(.photo-failed) { grid-template-columns: 1fr; }
.wm-img .photo { object-position: center 35%; }
.wm-credit { color: var(--muted); font-size: .8rem; }

/* اختبار الميول: شكل البطاقات */
.qz { padding: clamp(1.1rem, 3vw, 1.8rem); }
.qz-head { display: flex; align-items: center; justify-content: space-between; padding-block-end: .9rem; margin-block-end: 1rem; border-block-end: 1px solid var(--line); }
.qz-title { font-family: var(--f-head); font-weight: 700; font-size: 1.25rem; }
.qz-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-block-end: 1rem; }
.qz-chip { padding: .3rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand-ink); font-size: .86rem; font-weight: 600; line-height: 1.6; }
.qz-chip.on { background: var(--brand-strong); color: var(--on-strong); }
.qz-chip.done { background: color-mix(in srgb, var(--teal) 16%, var(--surface)); color: var(--teal-ink); }
.qz .progress { height: .45rem; background: color-mix(in srgb, var(--brand) 14%, var(--surface-2)); margin-block-end: 1.2rem; }
.qz .progress > i { background: linear-gradient(90deg, var(--brand-strong), var(--brand)); transition: width .35s ease; }
.qz-count { margin: 0 0 .4rem; color: var(--brand-ink); font-weight: 700; font-size: .95rem; }
.qz legend.q-text { min-height: 0; margin-block-end: .3rem; font-size: clamp(1.2rem, 3.6vw, 1.55rem); }
.qz-hint { margin: 0 0 1rem; color: var(--muted); }
.qz .q-cheer { margin: 0 0 1rem; }
.qz-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.qz-grid .qz-opt:last-child { grid-column: 1 / -1; }
.qz-opt span { display: flex; align-items: center; gap: .8rem; min-height: 4.4rem; padding: .8rem 1.1rem; border: 2px solid color-mix(in srgb, var(--brand) 20%, var(--line)); border-radius: 18px; background: var(--surface); text-align: start; font-size: 1.02rem; line-height: 1.5; transition: border-color .15s, background .15s, transform .15s; }
.qz-opt span i { font-style: normal; font-size: 1.8rem; line-height: 1; flex: none; }
.qz-opt span b { font-weight: 600; }
.qz-opt input:hover + span { border-color: var(--brand); transform: translateY(-1px); }
.qz-opt input:checked + span { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); border-color: var(--brand-strong); color: var(--ink); }
.qz-opt input:checked + span b { font-weight: 700; }
@media (max-width: 640px) { .qz-grid { grid-template-columns: 1fr 1fr; } .qz-opt span { min-height: 4rem; padding: .7rem .8rem; font-size: .95rem; gap: .55rem; } .qz-opt span i { font-size: 1.5rem; } }
.qz-foot { display: flex; align-items: center; gap: .7rem; margin-block-start: 1.4rem; padding-block-start: 1.1rem; border-block-start: 1px solid var(--line); }
.qz-foot .qz-num { margin-inline-end: auto; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.qz-foot .btn { min-width: 7.5rem; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .qz-opt span { transition: none; } }
.qz-opt input { z-index: 2; }
@media (max-width: 640px) { .qz-chip:not(.on) .qz-chip-name { display: none; } .qz-chip { padding: .3rem .65rem; } .qz-chips { gap: .35rem; } }
