/* VIP polish layer — loaded after every other stylesheet. Scoped additions only; motion = transform/opacity. */
:root { --vip-ink: #0b1a2a; --vip-ink-2: #13293f; --vip-gold: #c9a15a; --vip-gold-2: #e6c88f; }

/* ---------- 1. opening card: once per session, ~1.2s, never blocks input ---------- */
.vip-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(70% 50% at 50% 40%, #1d3a5c 0%, transparent 70%), linear-gradient(170deg, var(--vip-ink), var(--vip-ink-2));
  color: #fff; pointer-events: none; animation: vl-out .5s ease 1.05s forwards; }
.vl-name { font-family: "Aref Ruqaa", serif; font-size: clamp(40px, 11vw, 72px); line-height: 1.2;
  background: linear-gradient(100deg, #fff 30%, var(--vip-gold-2) 50%, #fff 70%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: vl-rise .6s cubic-bezier(.2,.7,.2,1) both, vl-sheen 1.2s .2s ease-out both; }
.vl-line { width: min(220px, 50vw); height: 1px; background: linear-gradient(90deg, transparent, var(--vip-gold), transparent);
  transform: scaleX(0); animation: vl-line .7s .25s cubic-bezier(.2,.7,.2,1) forwards; }
.vl-sub { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 13px; letter-spacing: .12em; color: var(--vip-gold-2); opacity: 0; animation: vl-fade .5s .45s forwards; }
@keyframes vl-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes vl-sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes vl-line { to { transform: scaleX(1); } }
@keyframes vl-fade { to { opacity: 1; } }
@keyframes vl-out { to { opacity: 0; visibility: hidden; } }
html.vl-seen .vip-loader { display: none; }
@media (prefers-reduced-motion: reduce) { .vip-loader { display: none; } }

/* ---------- 2. header brand: name + role instead of a loose label ---------- */
.brand { text-decoration: none; }
.brand-txt { display: grid; line-height: 1.15; min-width: 0; }
.brand-name { font-family: "Aref Ruqaa", serif; font-size: 22px; color: var(--navy-deep, #14294a); white-space: nowrap; }
.brand-sub { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 11.5px; letter-spacing: .08em; color: var(--copper, #b0763a); white-space: nowrap; }
.brand-sub::before { content: ""; display: inline-block; width: 14px; height: 1px; background: currentColor; vertical-align: middle; margin-inline-end: 6px; opacity: .7; }
[data-theme="dark"] .brand-name { color: #f1e6d0; }
.brand .mark-img { transition: transform .3s ease-out; }
.brand:hover .mark-img { transform: scale(1.06); }
header.site-head { backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }

/* ---------- 3. outlet logos: readable at any size, in both themes ---------- */
img[src*="logo-eay"].sc-logo { max-width: 92px !important; height: 16px !important; }
.o-chip img[src*="logo-eay"] { max-width: 86px; height: 16px; }
img[src*="logo-eay"].k-logo { max-width: 120px !important; }
[data-theme="dark"] .sc-logo, [data-theme="dark"] .k-logo, [data-theme="dark"] .o-chip img {
  background: #fff; padding: 2px 6px; border-radius: 6px; box-sizing: content-box; }
[data-theme="dark"] .ol-item img { background: #fff; padding: 8px 12px; border-radius: 10px; filter: none; opacity: 1; }
.ol-item img { opacity: .9; }

/* ---------- 4. home: author photo + his words (cited) ---------- */
.vx-words { padding: clamp(36px, 6vw, 76px) 0; background: linear-gradient(170deg, var(--vip-ink), var(--vip-ink-2)); color: #f4ecdc; overflow: hidden; }
.vx-in { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(22px, 5vw, 60px); align-items: center; }
.vx-photo { position: relative; margin: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.45); max-width: 420px; justify-self: center; }
.vx-photo img { display: block; width: 100%; height: auto; aspect-ratio: 860 / 1147; object-fit: cover; }
.vx-photo figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 30px 16px 12px; font-size: 12.5px; color: #f4ecdc;
  background: linear-gradient(transparent, rgba(8,18,30,.85)); }
.vx-kicker { color: var(--vip-gold-2); font-size: 14px; letter-spacing: .1em; margin: 0 0 6px; }
.vx-h { font-family: "Aref Ruqaa", serif; font-size: clamp(30px, 5vw, 46px); margin: 0 0 18px; color: #fff; }
.vx-quotes { list-style: none; margin: 0; padding: 0; display: grid; }
.vx-quotes li { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .6s; pointer-events: none; }
.vx-quotes li.on { opacity: 1; transform: none; pointer-events: auto; }
.vx-quotes blockquote { margin: 0; font-family: "Aref Ruqaa", serif; font-size: clamp(24px, 4vw, 36px); line-height: 1.75; color: #fff; }
.vx-quotes blockquote::before { content: "”"; display: block; font-size: 64px; line-height: .6; color: var(--vip-gold); font-family: serif; }
.vx-cite { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--vip-gold-2); text-decoration: none; min-height: 44px; }
a.vx-cite:hover { text-decoration: underline; }
.vx-dots { display: flex; gap: 6px; margin-top: 18px; }
.vx-dots button { width: 44px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.vx-dots button::after { content: ""; width: 26px; height: 3px; border-radius: 2px; background: rgba(230,200,143,.3); transition: background .3s; }
.vx-dots button[aria-current="true"]::after { background: var(--vip-gold-2); }
.vx-dots button:focus-visible { outline: 2px solid var(--vip-gold); outline-offset: -6px; border-radius: 8px; }
.vx-next { display: inline-flex; align-items: center; gap: .4em; margin-top: 8px; color: var(--vip-gold-2); font-weight: 600; text-decoration: none; min-height: 44px; }
@media (max-width: 860px) {
  .vx-in { grid-template-columns: 1fr; text-align: center; }
  .vx-photo { max-width: 280px; }
  .vx-dots { justify-content: center; }
}

/* ---------- 5. career: chapter navigator + chapter cards ---------- */
.ch-rail { position: sticky; top: var(--vip-head, 72px); z-index: 20; margin: 8px 0 18px; padding: 8px 4px;
  background: color-mix(in srgb, var(--ivory, #fdfaf3) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-block: 1px solid var(--line, #e5dcc8); }
.ch-rail ol { list-style: none; margin: 0; padding: 0 2px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.ch-rail ol::-webkit-scrollbar { display: none; }
.ch-rail a { scroll-snap-align: center; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 10px; border-radius: 999px;
  border: 1px solid var(--line, #e5dcc8); background: var(--paper, #fff); color: var(--ink, #1a1a1a); white-space: nowrap; text-decoration: none; font-size: 14px;
  transition: background .25s, border-color .25s, color .25s; }
.ch-rail a b { font-family: "Aref Ruqaa", serif; font-size: 20px; color: var(--copper, #b0763a); line-height: 1; }
.ch-rail a small { font-size: 11.5px; color: var(--copper, #b0763a); opacity: .85; }
.ch-rail a[aria-current="true"] { background: var(--vip-ink); border-color: var(--vip-ink); color: #f4ecdc; }
.ch-rail a[aria-current="true"] b, .ch-rail a[aria-current="true"] small { color: var(--vip-gold-2); }
.ch-prog { height: 2px; margin-top: 6px; background: var(--line, #e5dcc8); border-radius: 2px; overflow: hidden; }
.ch-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--vip-gold), var(--copper, #b0763a)); transform-origin: right; transform: scaleX(var(--p, 0)); transition: transform .3s ease-out; }

.chapter { position: relative; padding: 0 !important; overflow: hidden; border-radius: 22px !important; scroll-margin-top: calc(var(--vip-head, 72px) + 76px); }
.chapter .ch-top { margin: 0; padding: 20px 22px; gap: 16px; color: #f4ecdc;
  background: radial-gradient(80% 120% at 100% 0%, #1d3a5c 0%, transparent 60%), linear-gradient(160deg, var(--vip-ink), var(--vip-ink-2)); }
.chapter .ch-top h3 { color: #fff !important; font-family: "Aref Ruqaa", serif; font-size: clamp(24px, 4vw, 30px); line-height: 1.3; }
.chapter .ch-num { font-size: 52px; color: var(--vip-gold-2); min-width: 1ch; text-align: center; }
.chapter .ch-logo { height: 52px; border: 0; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.chapter .ch-years { display: inline-block; margin-top: 4px; padding: 2px 12px; border-radius: 999px; border: 1px solid rgba(230,200,143,.4); color: var(--vip-gold-2); font-size: 12.5px; }
.chapter > :not(.ch-top) { margin-inline: 22px; }
.chapter .ch-role { margin-top: 18px; font-family: "Aref Ruqaa", serif; font-size: 22px; font-weight: 400; }
.chapter .ch-role::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--vip-gold); vertical-align: middle; margin-inline-end: 10px; }
.chapter > .chip-row:last-of-type, .chapter > .ch-next { margin-bottom: 20px; }
.ch-next { display: flex; justify-content: flex-end; }
.ch-next a { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--vip-ink); color: #f4ecdc; text-decoration: none; font-weight: 600; font-size: 14px; }
.ch-next a:hover { background: var(--vip-ink-2); color: var(--vip-gold-2); }
.ch-next a:focus-visible, .ch-rail a:focus-visible { outline: 3px solid var(--vip-gold); outline-offset: 2px; }
@media (max-width: 640px) {
  .chapter .ch-top { display: grid; grid-template-columns: auto 1fr; padding: 18px 16px; }
  .chapter .ch-logo { grid-column: 2; grid-row: 1; justify-self: start; height: 44px; }
  .chapter .ch-top > div:last-child { grid-column: 1 / -1; }
  .chapter > :not(.ch-top) { margin-inline: 16px; }
  .ch-next { justify-content: center; }
}
/* career lead: photo + cited words */
.cr-lead { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; margin: 6px 0 26px; padding: 18px; border-radius: 22px;
  background: linear-gradient(160deg, var(--vip-ink), var(--vip-ink-2)); color: #f4ecdc; }
.cr-lead img { width: 100%; height: auto; aspect-ratio: 760 / 1013; object-fit: cover; border-radius: 16px; display: block; }
.cr-lead blockquote { margin: 0; font-family: "Aref Ruqaa", serif; font-size: clamp(21px, 3.4vw, 28px); line-height: 1.8; color: #fff; }
.cr-lead .vx-cite { margin-top: 6px; }
@media (max-width: 640px) { .cr-lead { grid-template-columns: 1fr; text-align: center; } .cr-lead img { max-width: 200px; justify-self: center; } }

/* vertical timeline: each stop a quiet card */
.vt li { padding: 8px 0; }
.vt-body { background: var(--paper, #fff); border: 1px solid var(--line, #e5dcc8); border-radius: 14px; padding: 10px 14px; }
.vt-body .src-chip { margin-top: 4px; }

/* ---------- 6. mobile reading: justify, centre, consistent controls ---------- */
.cta, .lx-btn, .tl-more, .src-chip, .o-chip, .li-chip { min-height: 44px; }
.src-chip, .tl-more, .o-chip { display: inline-flex; align-items: center; }
.mobile-bar a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 860px) {
  main p:not([class*="lx-"]):not([class*="nl-"]):not([class*="cal-"]):not(.vx-kicker):not(.foot-note),
  .ch-story, .dc-sum, .card p, .bk-body p {
    text-align: justify; text-align-last: start; text-justify: inter-word; }
  .lx-h, .chart-h, .ch-h { justify-content: center; text-align: center; }
  .chart-h + .sub, section.block .sub { text-align: center; }
  .lx-section > .container > .tl-more, .lx-section .container > a.tl-more { display: flex; justify-content: center; }
  .chip-row { justify-content: center; }
  .lx-cta { flex-wrap: nowrap; }
  .lx-cta .lx-btn { flex: 1 1 0; justify-content: center; white-space: nowrap; padding: 0 14px; min-height: 50px; }
  .card { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { .vx-quotes li, .ch-prog i, .ch-rail a { transition: none; } }
.vx-cite bdi, .vx-photo bdi { white-space: nowrap; }
@media (max-width: 860px) { .vx-photo img { aspect-ratio: 1 / 1.05; object-position: 50% 22%; } }

/* ---------- 7. dark theme: the v9 :root block redefined the tokens after the dark block, so dark never applied ---------- */
html[data-theme="dark"] {
  --paper: #161c25; --ivory: #10151c; --card: #1b2230;
  --ink: #ece5d8; --navy: #9dbfe8; --navy-deep: #cfe0f5; --deep: #0b111a;
  --copper: #dcae6f; --copper-light: #b8874a; --mist: #a99f8f; --line: #2c3441;
  --shadow-soft: 0 2px 8px rgba(0,0,0,.3), 0 16px 44px rgba(0,0,0,.35);
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--ivory); color: var(--ink); }
html[data-theme="dark"] .mast-name, html[data-theme="dark"] header.site-head { background: color-mix(in srgb, var(--paper) 92%, transparent); }
html[data-theme="dark"] .lx-band, html[data-theme="dark"] .lx-cal, html[data-theme="dark"] .lx-news { background: #131a23; }
html[data-theme="dark"] .ol-item, html[data-theme="dark"] .otd-card, html[data-theme="dark"] .tl-card, html[data-theme="dark"] .lw-card,
html[data-theme="dark"] .card, html[data-theme="dark"] .vt-body, html[data-theme="dark"] .src-chip, html[data-theme="dark"] .o-chip,
html[data-theme="dark"] .ch-rail a, html[data-theme="dark"] .mobile-bar { background: var(--card); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .tl-year { background: #131a23; }
html[data-theme="dark"] .lx-h, html[data-theme="dark"] .ol-name, html[data-theme="dark"] section.block h2, html[data-theme="dark"] .card h3 { color: #f1e6d0; }
html[data-theme="dark"] .mobile-bar a { color: var(--ink); }
html[data-theme="dark"] .mobile-bar a.active { background: #2a2216 !important; color: var(--copper) !important; }
html[data-theme="dark"] .nl-form input[type="email"] { background: var(--card); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .ch-rail { background: color-mix(in srgb, var(--ivory) 88%, transparent); }

/* ---------- 8. no sideways scroll: grid tracks may shrink below their content ---------- */
.grid > *, .dc-grid > * { min-width: 0; }
@media (max-width: 860px) { .grid.cols-2, .grid.cols-3, .dc-grid { grid-template-columns: minmax(0, 1fr); } }
.card a, .card .meta, .dc-meta { overflow-wrap: anywhere; }

/* ---------- 9. «سطور تُروى» v2: self-running quotes, even spacing ---------- */
.vx-words { padding: clamp(44px, 7vw, 88px) 0; }
.vx-in { align-items: center; }
.vx-copy { display: grid; align-content: center; min-width: 0; }
.vx-kicker { margin: 0 0 4px; }
.vx-h { margin: 0 0 clamp(14px, 2.4vw, 22px); line-height: 1.3; }
.vx-quotes { min-height: 15.5em; }
.vx-quotes li { align-self: center; transform: translateY(14px); transition: opacity .7s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.vx-quotes li.on { transition-delay: .15s; }
.vx-quotes blockquote::before { margin-bottom: 10px; }
.vx-quotes li:not(.on) { transition-duration: .4s; transition-delay: 0s; }
.vx-w { display: inline-block; opacity: 0; transform: translateY(.35em); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.vx-live .vx-quotes li.on .vx-w { opacity: 1; transform: none; transition-delay: calc(var(--d, 0ms) + .2s); }
.vx-quotes li:not(.on) .vx-w { transition-delay: 0s; transition-duration: .3s; }
.vx-cite { margin-top: 12px; line-height: 1.6; }
.vx-quotes { cursor: pointer; }
.vx-quotes a { cursor: pointer; }
/* active dot = a 7s progress bar, so the motion reads as intentional */
.vx-dots { margin-top: 10px; gap: 2px; }
.vx-dots button { position: relative; }
.vx-dots button::before { content: ""; position: absolute; width: 26px; height: 3px; border-radius: 2px; left: 50%; top: 50%; margin: -1.5px 0 0 -13px;
  background: var(--vip-gold-2); transform: scaleX(0); transform-origin: right; z-index: 1; }
.vx-dots button.run::before { animation: vx-run var(--vx-dur, 7000ms) linear forwards; }
.vx-dots button[aria-current="true"]:not(.run)::before { transform: scaleX(1); }
.vx-dots button[aria-current="true"]::after { background: rgba(230,200,143,.3); }
@keyframes vx-run { to { transform: scaleX(1); } }
.vx-photo { transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity 1s; }
.vx-words.reveal:not(.on) .vx-photo { opacity: 0; transform: translateY(18px) scale(.98); }
@media (max-width: 860px) {
  .vx-in { gap: 22px; }
  .vx-photo { max-width: 250px; border-radius: 18px; }
  .vx-photo img { aspect-ratio: 4 / 4.6; object-position: 50% 18%; }
  .vx-photo figcaption { font-size: 11.5px; padding: 26px 10px 9px; text-align: center; }
  .vx-copy { justify-items: center; text-align: center; }
  .vx-quotes { min-height: 13.5em; width: 100%; }
  .vx-quotes blockquote { font-size: clamp(22px, 6.2vw, 28px); line-height: 1.8; text-align: center; text-align-last: center; }
  .vx-quotes blockquote::before { margin-inline: auto; }
  .vx-cite { justify-content: center; font-size: 12.5px; }
  .vx-next { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .vx-w, .vx-photo { transition: none; opacity: 1; transform: none; } .vx-dots button.run::before { animation: none; transform: scaleX(1); } }
@media (max-width: 860px) {
  .vx-words .vx-quotes blockquote { text-align: center !important; text-align-last: center !important; }
  .vx-words .vx-cite { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; text-align: center; }
}

/* footer mobile */
@media (max-width:640px){
.site-foot .foot-grid{display:block}
.site-foot .foot-brand p{display:none}
.site-foot .foot-col h4{margin:1em 0 .35em;font-size:.95rem}
.site-foot .foot-col a{display:inline-block;margin-inline-end:1em;padding:.12em 0;font-size:.9rem}
.site-foot .foot-note{margin-top:.5em;font-size:.8rem}
.site-foot .foot-base{margin-top:1em;padding-top:.9em;font-size:.78rem;line-height:2}
.site-foot .foot-flagrow{margin-bottom:.35em}
.site-foot .container{padding-top:1.2em;padding-bottom:1em}
}
