/* Africa Invest
   Design: white masthead, deep navy bands with a fine grid for the hero, page heads,
   call-to-action and footer; vivid red for actions with a red-to-orange accent; white
   floating cards; light pages for reading. Orange marks Dubai, red marks African markets.
   Type: Plus Jakarta Sans for display, Inter for text, IBM Plex Sans Arabic in Arabic. */

:root {
  --paper: #F6F7FB;
  --paper-2: #EDEFF6;
  --card: #FFFFFF;
  --ink: #0F1733;
  --ink-2: #3C4562;
  --mist: #5A6380;         /* secondary text, 5.6:1 on paper */
  --line: #0F17331A;
  --line-2: #0F173330;
  --brand: #E11D2E;        /* red: actions */
  --brand-ink: #C01428;    /* red for text on light */
  --brand-soft: #E11D2E12;
  --brand-line: #E11D2E33;
  --on-brand: #FFFFFF;
  --gulf: #F26B12;         /* orange: Dubai and accents */
  --gulf-ink: #B4480A;
  --gulf-soft: #F26B121A;
  --africa: #E11D2E;
  --africa-ink: #C01428;
  --africa-soft: #E11D2E12;
  --success: #15803D;
  --success-soft: #16A34A1A;
  --focus: #E11D2E;
  --shadow: #0F173338;
  --mast-bg: #FFFFFF;
  --accent-grad: linear-gradient(90deg, #EF233C 0%, #F97316 100%);
  --route-line: var(--accent-grad);

  /* navy bands: the same in both themes */
  --night: #0E1638;
  --night-2: #19235C;
  --night-fg: #FFFFFF;
  --night-mist: #C3C9DE;
  --night-line: #FFFFFF1F;
  --night-line-2: #FFFFFF3D;
  --glass: #FFFFFF0F;
  --glass-2: #FFFFFF1C;
  --grid: #FFFFFF0C;
  --night-land: #1E2A62;
  --night-dot: #3B4A90;
  --night-dot-strong: #8593DB;
  --gulf-bright: #FF9A3D;
  --brand-bright: #FF6B5A;
  --africa-bright: #FF4D5E;
  --success-bright: #4ADE80;
  /* white cards on the navy hero stay white in both themes */
  --hc-bg: #FFFFFF;
  --hc-ink: #0F1733;
  --hc-mist: #5A6380;
  --hc-field: #EDEFF6;
  --hc-accent: #B4480A;
  --hc-success: #15803D;
  --hc-success-soft: #16A34A1A;
  --glow-red: #E11D2E47;
  --glow-violet: #7C3AED40;
  --glow-gulf: #F9731630;

  --f-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1320px;
  --measure: 43rem;
  --rail-w: 12.5rem;
  --note-w: 16rem;
  --col-gap: clamp(2rem, 4vw, 3.5rem);
  --mast-h: 4.4rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0B1124; --paper-2: #111A33; --card: #141D3B; --ink: #EEF1FA; --ink-2: #C7CDE0; --mist: #9AA3BD;
    --line: #EEF1FA1A; --line-2: #EEF1FA38; --brand-ink: #FF7884; --brand-soft: #FF4D5E1F; --brand-line: #FF4D5E40;
    --gulf: #FF9A3D; --gulf-ink: #FFB06A; --gulf-soft: #FF9A3D1F; --africa: #FF4D5E; --africa-ink: #FF7884; --africa-soft: #FF4D5E1F;
    --success: #4ADE80; --success-soft: #4ADE801F; --focus: #FF7884; --shadow: #00000099; --mast-bg: #0E1638;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0B1124; --paper-2: #111A33; --card: #141D3B; --ink: #EEF1FA; --ink-2: #C7CDE0; --mist: #9AA3BD;
  --line: #EEF1FA1A; --line-2: #EEF1FA38; --brand-ink: #FF7884; --brand-soft: #FF4D5E1F; --brand-line: #FF4D5E40;
  --gulf: #FF9A3D; --gulf-ink: #FFB06A; --gulf-soft: #FF9A3D1F; --africa: #FF4D5E; --africa-ink: #FF7884; --africa-soft: #FF4D5E1F;
  --success: #4ADE80; --success-soft: #4ADE801F; --focus: #FF7884; --shadow: #00000099; --mast-bg: #0E1638;
  color-scheme: dark;
}

:root[lang="ar"] {
  --f-display: "IBM Plex Sans Arabic", "Plus Jakarta Sans", Tahoma, system-ui, sans-serif;
  --f-text: "IBM Plex Sans Arabic", "Inter", Tahoma, system-ui, sans-serif;
  --f-ui: "IBM Plex Sans Arabic", "Inter", Tahoma, system-ui, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--mast-h) + 1.5rem); -webkit-tap-highlight-color: transparent; }
@media (pointer: fine) { html { overscroll-behavior: none; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 1.0625rem/1.72 var(--f-text); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:root[lang="ar"] body { font-size: 1.12rem; line-height: 1.95; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--mast-bg); }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; touch-action: manipulation; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; color: var(--ink); }
p { margin: 0; text-wrap: pretty; }
strong { font-weight: 650; }
code { font-family: var(--f-ui); font-size: .92em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: var(--gutter-l); top: calc(env(safe-area-inset-top, 0px) + .5rem); z-index: 80; background: var(--brand); color: var(--on-brand); padding: .6rem 1rem; border-radius: 10px; font: 600 .95rem var(--f-ui); transform: translateY(-200%); }
.skip:focus { transform: none; }
.icon { display: block; width: 1.25rem; height: 1.25rem; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3rem;
  padding: .75rem 1.35rem; border: 0; border-radius: 10px; background: var(--brand); color: var(--on-brand);
  font: 650 1rem/1.2 var(--f-ui); text-decoration: none; cursor: pointer; text-align: center;
  box-shadow: 0 10px 22px -14px #E11D2ECC;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn:hover { background: #C8142A; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.05rem; height: 1.05rem; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-small { min-height: 2.6rem; padding: .5rem 1.05rem; font-size: .95rem; }

/* ---------- masthead ---------- */
.masthead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; view-transition-name: masthead; background: var(--mast-bg); border-bottom: 1px solid var(--line); }
.masthead-inner { max-width: var(--max); margin-inline: auto; min-height: var(--mast-h); padding-inline: var(--gutter-l) var(--gutter-r); display: flex; align-items: center; gap: 1.25rem; }
:root[dir="rtl"] .masthead-inner { padding-inline: var(--gutter-r) var(--gutter-l); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); flex: none; }
.brand .mark { width: 2.35rem; height: 2.35rem; border-radius: 11px; box-shadow: 0 8px 18px -10px #E11D2E99; }
.brand-name { font: 800 1.15rem/1 "Plus Jakarta Sans", "Inter", system-ui, sans-serif; letter-spacing: -.025em; }
.brand-accent { color: var(--brand); }
.site-footer .brand-accent { color: #FF5A68; }
.nav-primary { flex: 1; min-width: 0; }
.nav-primary > ul { display: flex; flex-wrap: nowrap; gap: .25rem clamp(.9rem, 1.3vw, 1.5rem); list-style: none; margin: 0; padding: 0; justify-content: center; }
.nav-primary a, .nav-more summary { position: relative; display: inline-block; padding: .45rem 0; font: 500 .94rem/1.2 var(--f-ui); white-space: nowrap; text-decoration: none; color: var(--mist); cursor: pointer; }
.nav-primary a:hover, .nav-more summary:hover { color: var(--ink); }
.nav-primary a[aria-current="page"], .nav-more summary[data-current] { color: var(--ink); font-weight: 600; }
.nav-mark { position: absolute; inset-inline: 0; bottom: -.2rem; height: 3px; background: var(--accent-grad); border-radius: 2px; view-transition-name: nav-mark; }
.nav-more { position: relative; }
.nav-more summary { list-style: none; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: ""; display: inline-block; width: .4rem; height: .4rem; margin-inline-start: .4rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.2rem) rotate(45deg); }
.nav-more ul { position: absolute; top: calc(100% + .8rem); inset-inline-start: -1rem; min-width: 13rem; list-style: none; margin: 0; padding: .5rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 50px -28px var(--shadow); }
.nav-more ul a { display: block; padding: .5rem 0; }
.masthead-tools { display: flex; align-items: center; gap: .75rem; flex: none; }
.lang-switch { display: flex; list-style: none; margin: 0; padding: 3px; gap: 2px; background: var(--paper-2); border-radius: 10px; }
.lang-switch a { display: grid; place-items: center; min-width: 2.2rem; height: 2rem; padding-inline: .5rem; font: 650 .82rem/1 "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif; text-decoration: none; color: var(--ink-2); border-radius: 8px; }
.lang-switch a[lang="ar"] { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: .9rem; }
.lang-switch a:hover { color: var(--ink); background: var(--card); }
.lang-switch a[aria-current] { background: var(--card); color: var(--ink); box-shadow: 0 2px 6px -2px var(--shadow); }
.theme-toggle { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.theme-toggle:hover { background: var(--paper-2); color: var(--ink); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.nav-menu { display: none; position: static; }
.nav-menu summary { list-style: none; cursor: pointer; font: 600 .95rem/1 var(--f-ui); padding: .7rem 1rem; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { background: var(--ink); color: var(--paper); box-shadow: none; }
.nav-menu:not([open]) .nav-menu-panel { display: none; }
.nav-menu-panel { position: absolute; inset-inline: 0; top: 100%; background: var(--mast-bg); border-bottom: 1px solid var(--line); box-shadow: 0 30px 50px -40px var(--shadow); padding: 1rem var(--gutter-r) 1.5rem var(--gutter-l); overscroll-behavior: contain; max-height: calc(100dvh - var(--mast-h) - env(safe-area-inset-top, 0px)); overflow-y: auto; }
.nav-menu-panel ul { list-style: none; margin: 0 auto; padding: 0; max-width: var(--max); display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .25rem 2rem; }
.nav-menu-panel a { display: block; padding: .75rem 0; border-bottom: 1px solid var(--line); font: 600 1.05rem/1.2 var(--f-ui); text-decoration: none; }
.nav-menu-panel a[aria-current="page"] { color: var(--brand-ink); }

@media (max-width: 1260px) {
  .nav-primary { display: none; }
  .nav-menu { display: block; }
  .masthead-inner { justify-content: space-between; }
}
@media (max-width: 600px) {
  .nav-contact { display: none; }
  .masthead-inner { gap: .5rem; }
  .brand { gap: .45rem; }
  .brand .mark { width: 2rem; height: 2rem; border-radius: 9px; }
  .brand-name { font-size: .95rem; }
  .masthead-tools { gap: .3rem; }
  .theme-toggle { width: 2.2rem; height: 2.2rem; }
  .lang-switch a { min-width: 1.9rem; padding-inline: .3rem; }
  .nav-menu summary { padding: .6rem .7rem; font-size: .9rem; }
}
@media (max-width: 480px) { .masthead-tools > .theme-toggle { display: none; } }
@media (max-width: 380px) { .brand-name { font-size: .84rem; } .lang-switch a { min-width: 1.65rem; } }
.menu-theme { display: flex; align-items: center; gap: .6rem; width: 100%; margin-top: 1rem; padding: .7rem .9rem; border: 1px solid var(--line-2); border-radius: 10px; background: transparent; color: var(--ink); font: 600 .95rem var(--f-ui); cursor: pointer; }
.menu-theme .i-sun { display: none; }
:root[data-theme="dark"] .menu-theme .i-sun { display: block; }
:root[data-theme="dark"] .menu-theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .menu-theme .i-sun { display: block; } :root:not([data-theme="light"]) .menu-theme .i-moon { display: none; } }
@media (min-width: 481px) { .menu-theme { display: none; } }

/* ---------- navy bands: hero, page heads, call to action, footer ---------- */
.band {
  position: relative; isolation: isolate; color: var(--night-fg);
  background:
    radial-gradient(36rem 28rem at -4% 45%, var(--glow-red), transparent 70%),
    radial-gradient(40rem 30rem at 104% 35%, var(--glow-violet), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%);
}
.band :focus-visible { outline-color: #FFFFFF; }
.band h1, .band h2 { color: var(--night-fg); }

/* ---------- home hero ---------- */
.hero { max-width: var(--max); margin-inline: auto; padding: clamp(2.75rem, 7vw, 6rem) var(--gutter-r) clamp(3.5rem, 7vw, 6rem) var(--gutter-l); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
:root[dir="rtl"] .hero { padding-inline-start: var(--gutter-r); padding-inline-end: var(--gutter-l); }
.hero-text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; justify-items: start; min-width: 0; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .9rem; border: 1px solid var(--night-line-2); border-radius: 999px; background: var(--glass); font: 600 .82rem/1.3 var(--f-ui); color: var(--night-fg); }
.hero-badge .icon { width: 1rem; height: 1rem; color: var(--success-bright); }
.hero h1 { font: 800 clamp(2.6rem, 1.1rem + 4.6vw, 4.7rem)/1.02 var(--f-display); letter-spacing: -.035em; color: var(--night-fg); }
:root[lang="ar"] .hero h1 { font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.1rem); line-height: 1.3; letter-spacing: 0; font-weight: 700; }
.h1-accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .lede { max-width: 36rem; font-size: clamp(1.08rem, 1rem + .3vw, 1.24rem); line-height: 1.6; color: var(--night-mist); }

.finder { display: flex; align-items: center; gap: .45rem; width: 100%; max-width: 42rem; padding: .45rem; background: var(--hc-bg); color: var(--hc-ink); color-scheme: light; border-radius: 16px; box-shadow: 0 24px 44px -26px #000000CC; }
.finder-icon { flex: none; padding-inline: .55rem .1rem; color: var(--hc-mist); }
.finder select { flex: 1 1 0; min-width: 0; height: 3rem; padding-inline: .6rem; border: 0; border-radius: 10px; background: transparent; color: var(--hc-ink); font: 500 1rem var(--f-ui); cursor: pointer; }
.finder select + label + select { background: var(--hc-field); }
.finder select:focus-visible { outline: 2px solid #E11D2E; outline-offset: 0; }
.finder .btn { flex: none; height: 3rem; white-space: nowrap; }
.nav-contact { white-space: nowrap; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 42rem; }
.quick-label { font: 500 .92rem var(--f-ui); color: var(--night-mist); margin-inline-end: .15rem; }
.quick-list { display: contents; list-style: none; margin: 0; padding: 0; }
.quick-list li { display: contents; }
.quick-list a { display: inline-block; padding: .36rem .85rem; border: 1px solid var(--night-line-2); border-radius: 999px; background: var(--glass); color: var(--night-fg); font: 500 .9rem/1.35 var(--f-ui); text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.quick-list a:hover { background: var(--glass-2); border-color: #FFFFFF80; }

.hero-visual { position: relative; min-width: 0; }
.hero-visual::before { content: ""; position: absolute; inset: 5% -3% -3% 6%; z-index: 0; border-radius: 40px; background: linear-gradient(135deg, #E11D2E 0%, #7C3AED 100%); filter: blur(44px); opacity: .42; pointer-events: none; }
.float-card { position: absolute; z-index: 4; top: -1.4rem; inset-inline-start: -2rem; display: flex; align-items: center; gap: .75rem; max-width: 17.5rem; padding: .75rem 1.1rem .75rem .75rem; background: var(--hc-bg); color: var(--hc-ink); border-radius: 16px; box-shadow: 0 26px 50px -26px #000000D9; }
.float-icon { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--hc-success-soft); color: var(--hc-success); }
.float-label { display: block; font: 500 .78rem/1.3 var(--f-ui); color: var(--hc-mist); }
.float-value { display: block; font: 750 1rem/1.3 var(--f-display); color: var(--hc-ink); }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { margin-top: 1.25rem; }
  .float-card { top: -1.35rem; inset-inline-start: .9rem; }
}
@media (max-width: 560px) {
  .finder { flex-wrap: wrap; padding: .5rem; }
  .finder-icon { display: none; }
  .finder select { flex: 1 1 100%; background: var(--hc-field); }
  .finder .btn { flex: 1 1 100%; }
}

/* ---------- corridor map ---------- */
.corridor {
  position: relative; z-index: 1; isolation: isolate; margin: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "chart" "ticket" "chips"; gap: 1rem;
  padding: clamp(.85rem, 2vw, 1.5rem); border-radius: 26px; color: var(--night-fg);
  background: radial-gradient(60% 45% at 100% 0%, var(--glow-gulf), transparent 70%), radial-gradient(70% 60% at 30% 60%, #7C3AED26, transparent 70%), linear-gradient(160deg, #1E296B 0%, #111943 60%);
  box-shadow: 0 44px 80px -50px #000000, inset 0 0 0 1px var(--night-line);
  view-transition-name: corridor;
}
.corridor :focus-visible { outline-color: #FFFFFF; }
.corridor-chart { grid-area: chart; position: relative; }
.ticket { grid-area: ticket; }
.hub-list { grid-area: chips; }
@media (min-width: 981px) {
  .corridor { grid-template-areas: "chart" "chips"; }
  .ticket { grid-area: chart; align-self: end; justify-self: left; width: min(17.5rem, 40%); margin: 0 0 3% 0; z-index: 2; }
  .corridor[data-mode="home"] .ticket { margin: 0 0 4% -2.6rem; }
}
.corridor-chart svg { display: block; width: 100%; height: auto; direction: ltr; overflow: visible; }
.dots { fill: none; stroke-linecap: round; stroke-width: 6.2; }
.dots-other { stroke: var(--night-land); }
.dots-africa { stroke: var(--night-dot); }
.dots-country { stroke: var(--night-dot-strong); transition: stroke .25s ease; }
.dots-uae { stroke: var(--gulf-bright); stroke-width: 7.4; }
.st-gulf { stop-color: var(--gulf-bright); }
.st-brand { stop-color: var(--brand-bright); }
.st-africa { stop-color: var(--africa-bright); }
.route { fill: none; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: opacity .25s ease, stroke-width .25s ease; }
.comet { fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-dasharray: .05 1.2; stroke-dashoffset: .05; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .route { animation: route-draw 1.15s cubic-bezier(.35, .6, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 75ms + 250ms); }
  .comets.intro .comet { animation: comet 1.5s cubic-bezier(.45, .05, .35, 1) calc(var(--i, 0) * 110ms + 1.3s) 1 both; }
  .corridor[data-selected] .comet.is-on { animation: comet-again 1.5s cubic-bezier(.45, .05, .35, 1) 0s 3 both; }
  .origin-ring { transform-box: fill-box; transform-origin: center; animation: origin-pulse 2.4s ease-out 2; }
}
@keyframes route-draw { from { stroke-dashoffset: 1; } }
@keyframes comet { 0% { stroke-dashoffset: .05; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes comet-again { 0% { stroke-dashoffset: .05; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes origin-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }
.hub { cursor: pointer; }
.hub-hit { fill: transparent; }
.hub-halo { fill: var(--africa-bright); opacity: .18; transition: opacity .2s ease; }
.hub:hover .hub-halo { opacity: .34; }
.hub-dot { fill: #FFFFFF; stroke: var(--africa-bright); stroke-width: 2.4; transition: fill .2s ease; }
.hub text, .hub-origin text { font: 700 13px "Plus Jakarta Sans", "Inter", system-ui, sans-serif; fill: var(--night-mist); paint-order: stroke; stroke: #111943; stroke-opacity: .75; stroke-width: 4px; stroke-linejoin: round; letter-spacing: .02em; }
.hub-origin text { font-size: 15px; font-weight: 800; fill: var(--gulf-bright); }
.origin-dot { fill: var(--gulf-bright); stroke: #111943; stroke-width: 2.4; }
.origin-halo { fill: var(--gulf-bright); opacity: .22; }
.origin-ring { fill: none; stroke: var(--gulf-bright); stroke-width: 1.5; opacity: 0; }
.corridor[data-selected] .route { opacity: .16; }
.corridor[data-selected] .route.is-on { opacity: 1; stroke-width: 3.4; }
.dots-country.is-on { stroke: var(--africa-bright); }
.hub.is-on .hub-dot { fill: var(--africa-bright); stroke: #FFFFFF; }
.hub.is-on .hub-halo { opacity: .42; }
.hub.is-on text { fill: #FFFFFF; }

.ticket { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; align-items: baseline; padding: 1rem 1.2rem 1.1rem; background: var(--glass); border: 1px solid var(--night-line); border-radius: 16px; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .ticket { -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
}
.ticket-route { display: flex; align-items: center; gap: .6rem; font: 800 1.55rem/1 "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--night-fg); }
.ticket-route .ticket-code:first-child { color: var(--gulf-bright); }
.ticket-arc { width: 3.2rem; height: 1rem; flex: none; }
.ticket-arc path { fill: none; stroke: var(--africa-bright); stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.ticket-place { font: 650 1.02rem/1.3 var(--f-ui); }
.ticket-dist { font: 500 .93rem/1.3 var(--f-ui); color: var(--night-mist); font-variant-numeric: tabular-nums; }
.ticket-link { margin-top: .35rem; font: 500 .93rem/1.4 var(--f-ui); color: var(--night-fg); text-decoration-color: var(--africa-bright); text-underline-offset: .22em; }
.corridor[data-selected] .ticket-link { font-weight: 650; }
/* on the home hero the readout is a white floating card, like the badge above it */
.corridor[data-mode="home"] .ticket { background: var(--hc-bg); color: var(--hc-ink); border-color: transparent; box-shadow: 0 26px 50px -26px #000000D9; -webkit-backdrop-filter: none; backdrop-filter: none; }
.corridor[data-mode="home"] .ticket-route { color: var(--hc-ink); }
.corridor[data-mode="home"] .ticket-route .ticket-code:first-child { color: var(--hc-accent); }
.corridor[data-mode="home"] .ticket-arc path { stroke: var(--brand); }
.corridor[data-mode="home"] .ticket-dist { color: var(--hc-mist); }
.corridor[data-mode="home"] .ticket-link { color: var(--hc-ink); text-decoration-color: var(--brand); }
.corridor[data-mode="home"] .ticket :focus-visible { outline-color: #E11D2E; }

.hub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; }
@media (max-width: 1180px) and (min-width: 981px) { .hub-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hub-chip { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: .5rem .7rem; text-align: start; color: var(--night-fg); background: var(--glass); border: 1px solid var(--night-line); border-radius: 12px; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.hub-chip:hover { background: var(--glass-2); border-color: var(--night-line-2); }
.hub-chip[aria-pressed="true"] { background: var(--brand); color: #FFFFFF; border-color: var(--brand); }
.chip-code { font: 800 .9rem/1.2 "Plus Jakarta Sans", system-ui, sans-serif; }
.chip-dist { font: 500 .76rem/1.3 var(--f-ui); font-variant-numeric: tabular-nums; opacity: .8; white-space: nowrap; }
.chip-name { font: 500 .84rem/1.25 var(--f-ui); overflow-wrap: anywhere; }
@media (max-width: 980px) { .hub-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .hub-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .corridor { border-radius: 20px; } }

/* ---------- home sections ---------- */
.home-lead { position: relative; z-index: 2; max-width: var(--max); margin: -2.25rem auto 0; padding-inline: var(--gutter-l) var(--gutter-r); }
.home-lead > p { max-width: 58rem; padding: 1.35rem 1.6rem; background: var(--card); border-radius: 18px; border-inline-start: 4px solid var(--brand); box-shadow: 0 24px 50px -36px var(--shadow); font: 500 clamp(1.05rem, 1rem + .25vw, 1.18rem)/1.6 var(--f-ui); color: var(--ink-2); }
.home-sections { max-width: var(--max); margin-inline: auto; padding: 1.5rem var(--gutter-r) 2rem var(--gutter-l); }
:root[dir="rtl"] .home-sections, :root[dir="rtl"] .home-lead { padding-inline-start: var(--gutter-r); padding-inline-end: var(--gutter-l); }
.home .section { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 46rem); column-gap: clamp(2rem, 5vw, 5rem); row-gap: 1.25rem; align-items: start; padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.home .section:first-child { border-top: 0; }
.home .section > h2 { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--mast-h) + env(safe-area-inset-top, 0px) + 1.5rem); padding-top: 1.2rem; font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.3rem); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.home .section > h2::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 3rem; height: 4px; border-radius: 2px; background: var(--accent-grad); }
:root[lang="ar"] .home .section > h2 { line-height: 1.45; letter-spacing: 0; font-weight: 700; }
.home .section-body { grid-column: 2; grid-row: 1; min-width: 0; }
.home .section-body > :first-child { margin-top: 0; }
.home .section-body p { margin-bottom: 1rem; }
@media (max-width: 860px) {
  .home .section { grid-template-columns: minmax(0, 1fr); }
  .home .section > h2 { grid-row: auto; position: relative; top: auto; }
  .home .section-body { grid-column: 1; grid-row: auto; }
}

/* ---------- page head (inside a navy band) ---------- */
.page-head { max-width: var(--max); margin-inline: auto; padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter-r) clamp(2.5rem, 5vw, 4.5rem) var(--gutter-l); display: grid; gap: 1.1rem; }
.page-head.has-art { grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); column-gap: clamp(2rem, 5vw, 5rem); row-gap: 2rem; align-items: center; }
.page-head-text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; min-width: 0; align-content: center; justify-items: start; }
:root[dir="rtl"] .page-head, :root[dir="rtl"] .page-body, :root[dir="rtl"] .next-stop, :root[dir="rtl"] .related, :root[dir="rtl"] .footer-inner { padding-inline-start: var(--gutter-r); padding-inline-end: var(--gutter-l); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .35rem .85rem; border: 1px solid var(--night-line-2); border-radius: 999px; background: var(--glass); font: 500 .85rem/1.3 var(--f-ui); color: var(--night-mist); }
.crumb a { color: var(--night-fg); text-decoration: none; }
.crumb a:hover { text-decoration: underline; text-underline-offset: .2em; }
.page-head h1 { max-width: 22ch; font-size: clamp(2.2rem, 1.2rem + 3.3vw, 3.8rem); line-height: 1.05; font-weight: 800; letter-spacing: -.033em; }
:root[lang="ar"] .page-head h1 { max-width: 26ch; line-height: 1.35; letter-spacing: 0; font-weight: 700; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.2rem); }
.page-head .lede { max-width: 42rem; font-size: clamp(1.08rem, 1rem + .3vw, 1.22rem); line-height: 1.6; color: var(--night-mist); }
.reviewed { font: 500 .86rem/1.3 var(--f-ui); color: var(--night-mist); }
.page-art { position: relative; isolation: isolate; margin: 0; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 24px; }
.page-art::before { content: ""; position: absolute; inset: 6% -4% -4% 6%; z-index: -1; border-radius: 32px; background: linear-gradient(135deg, #E11D2E 0%, #7C3AED 100%); filter: blur(36px); opacity: .45; pointer-events: none; }
.page-art svg { display: block; width: 100%; height: 100%; border-radius: 24px; clip-path: inset(0 round 24px); background: radial-gradient(70% 60% at 85% 12%, var(--glow-gulf), transparent 70%), radial-gradient(60% 60% at 8% 96%, var(--glow-red), transparent 70%), linear-gradient(155deg, #1E296B, #111943 70%); box-shadow: inset 0 0 0 1px var(--night-line); }
@media (max-width: 900px) {
  .page-head.has-art { grid-template-columns: minmax(0, 1fr); }
  .page-art { aspect-ratio: 16 / 9; }
}

/* ---------- page body: rail, prose, margin ---------- */
.page-body { max-width: var(--max); margin-inline: auto; padding: clamp(2rem, 4vw, 3rem) var(--gutter-r) 3rem var(--gutter-l); display: grid; grid-template-columns: var(--rail-w) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: var(--col-gap); align-items: start; }
.rail { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--mast-h) + env(safe-area-inset-top, 0px) + 1.5rem); max-height: calc(100dvh - var(--mast-h) - 3rem); overflow-y: auto; overscroll-behavior: contain; padding-block: .25rem 1rem; }
.prose { grid-column: 2; grid-row: 1; min-width: 0; }
.rail-details > summary { list-style: none; font: 650 .85rem/1.2 var(--f-ui); color: var(--mist); margin-bottom: .9rem; cursor: default; }
.rail-details > summary::-webkit-details-marker { display: none; }
.rail-list { --progress: 0%; position: relative; list-style: none; margin: 0; padding: 0 0 0 1.4rem; display: grid; gap: .15rem; }
:root[dir="rtl"] .rail-list { padding: 0 1.4rem 0 0; }
.rail-list::before, .rail-list::after { content: ""; position: absolute; inset-inline-start: .38rem; top: .7rem; width: 2px; border-radius: 1px; }
.rail-list::before { bottom: .7rem; background: var(--line-2); }
.rail-list::after { height: var(--progress); max-height: calc(100% - 1.4rem); background: linear-gradient(var(--brand), var(--gulf)); transition: height .2s linear; }
.rail-list a { position: relative; display: block; padding: .38rem 0; font: 500 .88rem/1.35 var(--f-ui); color: var(--mist); text-decoration: none; }
.rail-list a::before { content: ""; position: absolute; inset-inline-start: -1.4rem; top: .62rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--paper); border: 2px solid var(--line-2); box-sizing: border-box; z-index: 1; transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.rail-list a:hover { color: var(--ink); }
.rail-list a[data-state="passed"]::before { background: var(--brand); border-color: var(--brand); }
.rail-list a[aria-current="location"] { color: var(--ink); font-weight: 650; }
.rail-list a[aria-current="location"]::before { background: var(--paper); border-color: var(--brand); border-width: 3px; transform: scale(1.25); }

/* sections do not contain floats, so margin notes never stretch them */
.prose .section { padding-top: 3.25rem; }
.prose .section:first-of-type { padding-top: .5rem; }
.prose h2 { position: relative; font-size: clamp(1.55rem, 1.2rem + 1vw, 2.05rem); line-height: 1.15; font-weight: 800; letter-spacing: -.028em; margin-bottom: 1.1rem; padding-top: 1.35rem; }
.prose h2::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 3rem; height: 4px; border-radius: 2px; background: var(--accent-grad); }
:root[lang="ar"] .prose h2 { line-height: 1.5; letter-spacing: 0; font-weight: 700; }
.prose h2:has(.h2-icon) { display: flex; align-items: center; gap: .9rem; padding-top: 0; }
.prose h2:has(.h2-icon)::before { display: none; }
.h2-icon { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); }
.h2-icon .icon { width: 1.55rem; height: 1.55rem; }
.h2-text { min-width: 0; }
.prose .section:nth-of-type(even) .h2-icon { background: var(--gulf-soft); color: var(--gulf-ink); }
.prose h3 { font-size: 1.2rem; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; margin: 2rem 0 .6rem; }
:root[lang="ar"] .prose h3 { line-height: 1.6; letter-spacing: 0; }
:is(.prose, .home-sections) :is(p, ul, ol.ol) { margin: 0 0 1.05rem; }
:is(.prose, .home-sections) :is(ul, ol.ol) { padding-inline-start: 1.3rem; }
:is(.prose, .home-sections) li { margin-bottom: .45rem; padding-inline-start: .2rem; }
:is(.prose, .home-sections) ul > li::marker { color: var(--brand); content: "●  "; font-size: .6em; }
:is(.prose, .home-sections) ol.ol > li::marker { color: var(--brand-ink); font: 700 .95rem var(--f-ui); }
:is(.prose, .home-sections) a:not(.btn) { color: var(--ink); text-decoration-color: var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
:is(.prose, .home-sections) a:not(.btn):hover { text-decoration-thickness: 2px; color: var(--brand-ink); }
:is(.prose, .home-sections) a.xref { text-decoration-color: var(--brand-line); text-decoration-thickness: 2px; }
:is(.prose, .home-sections) a.xref:hover { text-decoration-color: var(--brand); }
:is(.prose, .home-sections) strong { color: var(--ink); }

.pull { margin: 2.2rem 0; padding: 0; }
.pull::before { content: ""; display: block; width: 5rem; height: 4px; margin-bottom: 1rem; border-radius: 2px; background: var(--accent-grad); }
.pull p { font: 750 clamp(1.35rem, 1.1rem + .9vw, 1.75rem)/1.3 var(--f-display); letter-spacing: -.015em; color: var(--ink); margin: 0; }
:root[lang="ar"] .pull p { line-height: 1.65; letter-spacing: 0; }

/* margin notes and dossiers */
.sidenote { margin: 1.5rem 0; padding: 1.05rem 1.2rem; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 16px; font: 450 .95rem/1.6 var(--f-ui); color: var(--ink-2); }
.sidenote p { margin: 0 0 .6rem; }
.sidenote p:last-child { margin: 0; }
.sidenote::before { content: ""; display: block; width: 2.2rem; height: 4px; margin-bottom: .7rem; border-radius: 2px; background: var(--accent-grad); }
.dossier { position: relative; overflow: hidden; margin: .5rem 0 1.6rem; padding: 1.2rem 1.2rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 44px -36px var(--shadow); }
.dossier::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent-grad); }
.dossier dl { margin: 0; display: grid; gap: .6rem; }
.dossier dl > div { display: grid; gap: .05rem; padding-bottom: .55rem; border-bottom: 1px dashed var(--line-2); }
.dossier dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.dossier dt { font: 550 .78rem/1.3 var(--f-ui); color: var(--mist); }
.dossier dd { margin: 0; font: 600 .96rem/1.45 var(--f-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
:root[lang="ar"] .dossier dt { font-size: .85rem; }

@media (min-width: 1240px) {
  .prose .table-wrap { clear: inline-end; margin-inline-end: calc(-1 * (var(--note-w) + var(--col-gap))); }
  .prose .sidenote, .prose .dossier { float: inline-end; clear: inline-end; width: var(--note-w); margin-block: .35rem 1.2rem; margin-inline-end: calc(-1 * (var(--note-w) + var(--col-gap))); }
}

/* key figures: tiles, the first one on a navy panel */
.ledger { margin: 1.6rem 0 2rem; }
.ledger dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.ledger-row { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "value" "label"; grid-template-rows: auto auto 1fr; row-gap: .45rem; padding: 1.15rem 1.25rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.ledger-row::before { content: ""; grid-area: bar; width: 2.4rem; height: 4px; margin-bottom: .35rem; border-radius: 2px; background: var(--brand); }
.ledger-row:nth-child(odd)::before { background: var(--gulf); }
.ledger-value { grid-area: value; margin: 0; font: 800 clamp(1.6rem, 1.2rem + 1vw, 2.1rem)/1.08 "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); overflow-wrap: anywhere; }
:root[lang="ar"] .ledger-value { font-family: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: 0; line-height: 1.35; }
.ledger-value.is-long { font-size: clamp(1.25rem, 1rem + .6vw, 1.5rem); line-height: 1.18; }
.ledger-row dt { grid-area: label; font: 500 .98rem/1.45 var(--f-ui); color: var(--ink-2); }
.ledger-row:first-child { grid-column: 1 / -1; color: var(--night-fg); border-color: transparent; background: radial-gradient(70% 140% at 100% 0%, var(--glow-violet), transparent 70%), radial-gradient(50% 120% at 0% 100%, var(--glow-red), transparent 70%), linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(150deg, var(--night-2), var(--night) 70%); }
.ledger-row:first-child::before { background: var(--accent-grad); width: 3.5rem; }
.ledger-row:first-child .ledger-value { color: var(--night-fg); font-size: clamp(2.1rem, 1.5rem + 2vw, 3.1rem); }
.ledger-row:first-child dt { color: var(--night-fg); font-size: 1.05rem; }
.ledger-row:first-child:nth-last-child(2n) ~ .ledger-row:last-child { grid-column: 1 / -1; }

/* steps: a real sequence */
.steps, :is(.prose, .home-sections) .steps { list-style: none; margin: 1.5rem 0 2rem; padding: 0; }
.steps > li::marker { content: none; }
.step { position: relative; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); column-gap: 1rem; padding-bottom: 1.75rem; }
.step::before { content: ""; position: absolute; inset-inline-start: 1.24rem; top: 3.2rem; bottom: .3rem; width: 2px; border-radius: 1px; background: linear-gradient(var(--brand), var(--gulf)); opacity: .4; }
.step:last-child::before { display: none; }
.step-no { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 12px; background: var(--brand); color: var(--on-brand); font: 800 1.05rem/1 "Plus Jakarta Sans", "IBM Plex Sans Arabic", system-ui, sans-serif; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 5px var(--brand-soft); }
.step-body h3 { margin-top: .3rem; }
.step-body > :last-child { margin-bottom: 0; }

/* FAQ and glossary */
.faq { display: grid; gap: .7rem; margin: 1rem 0 2rem; }
.faq-item { padding: 1.15rem 1.3rem .45rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.faq-item h3 { margin: 0 0 .55rem; font-size: 1.12rem; }
.glossary { margin: 1rem 0 2rem; display: grid; border-top: 1px solid var(--line-2); }
.glossary > div { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: .3rem 1.5rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.glossary dt { font: 700 1rem/1.4 var(--f-ui); color: var(--brand-ink); }
.glossary dd { margin: 0; }
@media (max-width: 560px) { .glossary > div { grid-template-columns: minmax(0, 1fr); } }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.4rem 0 1.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.table-wrap table { width: 100%; min-width: 34rem; border-collapse: collapse; font: 450 .92rem/1.5 var(--f-ui); font-variant-numeric: tabular-nums; }
.table-wrap thead th { text-align: start; font-weight: 700; font-size: .84rem; color: var(--ink-2); background: var(--paper-2); padding: .75rem .9rem .65rem; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.table-wrap tbody th { text-align: start; font-weight: 650; color: var(--ink); }
.table-wrap td, .table-wrap tbody th { padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }

/* call to action on a navy band */
.cta-band { margin: 2.2rem 0 1rem; border-radius: 22px; overflow: hidden; color: var(--night-fg); box-shadow: inset 0 0 0 1px var(--night-line); }
.cta-band::after { content: ""; position: absolute; z-index: -1; inset-inline-end: -4rem; top: -5rem; width: 12rem; height: 12rem; border-radius: 50%; border: 1.5px dashed var(--night-line-2); pointer-events: none; }
.cta-inner { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; padding: 1.5rem 1.6rem 1.6rem; }
.cta-text { flex: 1 1 18rem; min-width: 0; }
.cta-text p { margin: 0; font: 550 1.08rem/1.5 var(--f-ui); color: var(--night-fg); }

/* directory on the home page */
.directory, :is(.prose, .home-sections) .directory { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.directory li { margin: 0; padding: 0; }
.directory li::marker { content: none; }
.directory a { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); grid-template-areas: "icon name" "icon summary"; column-gap: .95rem; row-gap: .2rem; align-items: start; align-content: start; height: 100%; padding: 1rem 1.05rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.directory a:hover { border-color: var(--brand-line); box-shadow: 0 20px 40px -30px var(--shadow); }
.dir-icon { grid-area: icon; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.directory li:nth-child(4n+2) .dir-icon, .directory li:nth-child(4n+3) .dir-icon { background: var(--gulf-soft); color: var(--gulf-ink); }
.dir-name { grid-area: name; font: 750 1.06rem/1.3 var(--f-display); letter-spacing: -.01em; color: var(--ink); padding-top: .1rem; }
.directory a:hover .dir-name { color: var(--brand-ink); }
.dir-summary { grid-area: summary; font: 450 .92rem/1.45 var(--f-ui); color: var(--mist); }
@media (max-width: 640px) { .directory, :is(.prose, .home-sections) .directory { grid-template-columns: minmax(0, 1fr); } }

/* read also */
.related { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter-r) 2rem var(--gutter-l); }
.related-title { font: 800 1.35rem/1.2 var(--f-display); letter-spacing: -.02em; margin-bottom: 1rem; }
:root[lang="ar"] .related-title { letter-spacing: 0; font-weight: 700; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.related-list a { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); grid-template-areas: "icon name" "icon summary"; column-gap: .9rem; row-gap: .2rem; align-content: start; height: 100%; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.related-list a:hover { border-color: var(--brand-line); box-shadow: 0 20px 40px -30px var(--shadow); }
.rel-icon { grid-area: icon; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.related-list li:nth-child(2) .rel-icon { background: var(--gulf-soft); color: var(--gulf-ink); }
.rel-name { grid-area: name; font: 750 1.02rem/1.3 var(--f-display); color: var(--ink); }
.related-list a:hover .rel-name { color: var(--brand-ink); }
.rel-summary { grid-area: summary; font: 450 .9rem/1.45 var(--f-ui); color: var(--mist); }
@media (max-width: 860px) { .related-list { grid-template-columns: minmax(0, 1fr); } }

/* next stop */
.next-stop { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter-r) 3.5rem var(--gutter-l); }
.next-stop a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label arrow" "name arrow" "summary arrow"; gap: .3rem 1.5rem; align-items: center; padding: 1.5rem 1.6rem 1.6rem; background: var(--card); border: 1px solid var(--line); border-radius: 22px; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.next-stop a:hover { border-color: var(--brand-line); box-shadow: 0 26px 50px -38px var(--shadow); }
.next-label { grid-area: label; font: 550 .9rem var(--f-ui); color: var(--mist); }
.next-name { grid-area: name; font: 800 clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem)/1.1 var(--f-display); letter-spacing: -.03em; color: var(--ink); }
:root[lang="ar"] .next-name { line-height: 1.45; letter-spacing: 0; font-weight: 700; }
.next-stop a:hover .next-name { color: var(--brand-ink); }
.next-summary { grid-area: summary; font: 450 1rem/1.5 var(--f-ui); color: var(--ink-2); max-width: 40rem; }
.next-arrow { grid-area: arrow; display: grid; place-items: center; width: 3.3rem; height: 3.3rem; border-radius: 14px; background: var(--brand); color: var(--on-brand); box-shadow: 0 12px 24px -14px #E11D2ECC; transition: transform .2s ease; }
.next-arrow .icon { width: 1.35rem; height: 1.35rem; }
:root[dir="rtl"] .next-arrow .icon { transform: scaleX(-1); }
.next-stop a:hover .next-arrow { transform: translateX(4px); }
:root[dir="rtl"] .next-stop a:hover .next-arrow { transform: translateX(-4px); }
@media (max-width: 560px) { .next-stop a { padding: 1.2rem 1.2rem 1.3rem; column-gap: 1rem; } .next-arrow { width: 2.8rem; height: 2.8rem; } }

/* contact composer */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: 2rem; align-items: start; margin: 1rem 0 2rem; }
.composer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.field { display: grid; gap: .35rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field legend { font: 600 .9rem/1.3 var(--f-ui); color: var(--ink); padding: 0; }
.field input, .field select, .field textarea { width: 100%; min-height: 3rem; padding: .65rem .85rem; background: var(--card); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; font: 450 1rem/1.4 var(--f-ui); transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { resize: vertical; min-height: 6.5rem; }
.field input::placeholder { color: var(--mist); opacity: 1; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-line); }
.stage-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.stage { position: relative; display: inline-flex; }
.stage input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.stage span { display: inline-block; padding: .55rem .95rem; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .9rem/1.2 var(--f-ui); cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.stage input:checked + span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.stage input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.composer-preview { padding: 1rem 1.15rem; background: var(--paper-2); border-radius: 14px; }
.preview-label { font: 600 .82rem var(--f-ui); color: var(--mist); }
.preview-text { font: 450 .98rem/1.55 var(--f-ui); white-space: pre-line; overflow-wrap: anywhere; }
.composer-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.composer-actions a.btn:not([href]) { opacity: .7; pointer-events: none; }
.composer-note { font: 450 .86rem/1.45 var(--f-ui); color: var(--mist); }
.contact-card { position: relative; overflow: hidden; display: grid; gap: 1.1rem; padding: 1.35rem 1.25rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 44px -36px var(--shadow); }
.contact-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent-grad); }
.contact-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label btn" "value value"; gap: .15rem .75rem; align-items: center; }
.contact-label { grid-area: label; font: 550 .8rem var(--f-ui); color: var(--mist); }
.contact-value { grid-area: value; font: 650 1rem/1.35 var(--f-ui); overflow-wrap: anywhere; user-select: all; }
.contact-line .copy { grid-area: btn; }
:root[dir="rtl"] .contact-value[dir="ltr"] { text-align: right; }
.contact-links { list-style: none; margin: 0; padding: .9rem 0 0; border-top: 1px dashed var(--line-2); display: grid; gap: .45rem; font: 550 .95rem var(--f-ui); }
.contact-links a { text-decoration-color: var(--brand); text-underline-offset: .2em; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .composer { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer on a navy band ---------- */
.site-footer { margin-top: 2rem; color: var(--night-mist); }
.site-footer .brand { color: var(--night-fg); }
.footer-inner { max-width: var(--max); margin-inline: auto; padding: 3rem var(--gutter-r) calc(2rem + env(safe-area-inset-bottom, 0px)) var(--gutter-l); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem; font: 450 .92rem/1.55 var(--f-ui); }
.footer-brand { display: grid; gap: .9rem; align-content: start; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; align-content: start; }
.footer-links a { color: var(--night-fg); text-decoration: none; }
.footer-links a:hover { color: #FF8A94; }
.footer-advisor { display: grid; gap: .6rem; align-content: start; }
.footer-advisor a { color: var(--night-fg); text-decoration-color: #FF5A68; text-underline-offset: .2em; }
.footer-contact { color: var(--night-fg); }
.footer-disclaimer { grid-column: 1 / -1; padding-top: 1.2rem; border-top: 1px solid var(--night-line); font-size: .84rem; color: var(--night-mist); max-width: 60rem; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand, .footer-advisor { grid-column: 1 / -1; } }

.lang-list { display: flex; gap: 1rem; list-style: none; padding: 0; font: 600 1.05rem var(--f-ui); }

/* ---------- responsive page body ---------- */
@media (max-width: 1239px) { .page-body { grid-template-columns: var(--rail-w) minmax(0, 1fr); } .prose { max-width: var(--measure); } }
@media (max-width: 860px) {
  .page-body { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; grid-row: auto; max-height: none; overflow: visible; margin-bottom: 1rem; padding: .95rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
  .rail-details > summary { cursor: pointer; margin: 0; font-size: .95rem; color: var(--ink); display: flex; justify-content: space-between; }
  .rail-details > summary::after { content: "+"; font-weight: 700; color: var(--brand); }
  .rail-details[open] > summary { margin-bottom: .8rem; }
  .rail-details[open] > summary::after { content: "–"; }
  .prose { grid-column: 1; grid-row: auto; }
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed; z-index: 45; display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); right: max(1.25rem, calc(env(safe-area-inset-right, 0px) + .75rem));
  border: 0; border-radius: 14px; background: var(--brand); color: var(--on-brand); cursor: pointer;
  box-shadow: 0 14px 30px -12px #E11D2EB3, 0 0 0 1px #FFFFFF26 inset;
  opacity: 0; visibility: hidden; transform: translateY(.75rem);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s, background-color .15s ease;
}
:root[dir="rtl"] .to-top { right: auto; left: max(1.25rem, calc(env(safe-area-inset-left, 0px) + .75rem)); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s, background-color .15s ease; }
.to-top:hover { background: #C8142A; }
.to-top:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.to-top .icon { width: 1.3rem; height: 1.3rem; }
@media (prefers-reduced-motion: reduce) { .to-top, .to-top.is-visible { transition: none; transform: none; } }
@media (max-width: 560px) { .to-top { width: 2.75rem; height: 2.75rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); } }

/* ---------- view transitions (cross-document) ---------- */
@view-transition { navigation: auto; }
:root { --duration-exit: 140ms; --duration-enter: 200ms; --duration-move: 380ms; }
::view-transition-old(root) { animation: var(--duration-exit) ease-in both vt-fade reverse; }
::view-transition-new(root) { animation: var(--duration-enter) ease-out var(--duration-exit) both vt-fade; }
::view-transition-group(masthead) { animation: none; z-index: 100; }
::view-transition-old(masthead) { display: none; }
::view-transition-new(masthead) { animation: none; }
::view-transition-group(nav-mark) { animation-duration: 260ms; animation-timing-function: cubic-bezier(.5, 0, .2, 1); z-index: 101; }
::view-transition-old(nav-mark), ::view-transition-new(nav-mark) { animation: none; height: 100%; }
::view-transition-group(corridor) { animation-duration: var(--duration-move); }
::view-transition-image-pair(corridor) { animation-name: vt-via-blur; }
@keyframes vt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vt-via-blur { 30% { filter: blur(3px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*), ::view-transition-new(*), ::view-transition-group(*) { animation-duration: 0s !important; animation-delay: 0s !important; }
}

@media print {
  .masthead, .rail, .site-footer, .next-stop, .related, .hub-list, .page-art, .finder, .quick, .to-top { display: none; }
  body, .band { background: #fff; color: #000; }
  .band h1, .band h2, .hero .lede, .page-head .lede { color: #000; }
}

/* list resets for components that sit inside prose */
:is(.prose, .home-sections) :is(.hub-list, .contact-links) { margin: 0; padding: 0; list-style: none; }
:is(.prose, .home-sections) :is(.hub-list, .contact-links, .steps, .directory) > li { margin: 0; padding-inline-start: 0; }
:is(.prose, .home-sections) :is(.hub-list, .contact-links, .steps, .directory) > li::marker { content: none; }
:is(.prose, .home-sections) .steps > li { padding-bottom: 1.75rem; }
:is(.prose, .home-sections) .corridor { margin: 1.5rem 0 2rem; }
:is(.prose, .home-sections) .corridor a:not(.btn) { color: var(--night-fg); text-decoration-color: var(--africa-bright); }
:is(.prose, .home-sections) .cta-band a:not(.btn) { color: var(--night-fg); }

/* language suggestion, shown only when the browser prefers another edition */
.lang-hint { max-width: var(--max); margin: .75rem auto; padding-inline: var(--gutter-l) var(--gutter-r); }
.lang-hint-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .65rem 1rem; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 12px; font: 500 .92rem/1.4 var(--f-ui); }
.lang-hint a { font-weight: 650; color: var(--brand-ink); text-decoration-color: currentColor; text-underline-offset: .2em; }
.lang-hint button { margin-inline-start: auto; background: none; border: 0; padding: .3rem .5rem; font: 600 .85rem var(--f-ui); color: var(--mist); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.lang-hint button:hover { color: var(--ink); }
