/* ALMAJD 1.1.14 — bilingual LTR contract */
html[dir="ltr"], html[dir="ltr"] body {
  direction:ltr;
  text-align:left;
  --font-sans:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;
  --font-mono:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;
}
html[dir="ltr"] body,
html[dir="ltr"] body *,
html[dir="ltr"] button,
html[dir="ltr"] input,
html[dir="ltr"] textarea,
html[dir="ltr"] select,
html[dir="ltr"] table,
html[dir="ltr"] th,
html[dir="ltr"] td {
  font-family:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif!important;
}

/* Desktop shell mirrors cleanly in English. */
html[dir="ltr"] .master-shell { padding-right:0!important; }
html[dir="ltr"] .master-shell.sidebar-open { padding-right:0!important; padding-left:var(--sidebar-w)!important; }
html[dir="ltr"] .side-panel { right:auto!important; left:calc(-1 * var(--sidebar-w))!important; border-left:0!important; border-right:1px solid var(--border-soft)!important; direction:ltr; }
html[dir="ltr"] .side-panel.mobile-open { right:auto!important; left:0!important; }
html[dir="ltr"] .sidebar-close-btn { left:auto!important; right:10px!important; }
html[dir="ltr"] .topbar, html[dir="ltr"] .top-actions, html[dir="ltr"] .status-line { direction:ltr; }
html[dir="ltr"] .current-title, html[dir="ltr"] .current-meta { text-align:left; }

@media screen and (min-width:1280px) {
  html[dir="ltr"] .almajd-floating-rail { left:auto!important; right:14px!important; }
  html[dir="ltr"] .almajd-rail-more { left:auto!important; right:76px!important; direction:ltr!important; transform:translate(8px,-50%); }
  html[dir="ltr"] .almajd-rail-more.is-open { transform:translate(0,-50%); }
  html[dir="ltr"] .almajd-rail-btn::after { left:auto!important; right:calc(100% + 11px)!important; direction:ltr!important; transform:translate(4px,-50%); }
  html[dir="ltr"] .almajd-rail-btn:hover::after,
  html[dir="ltr"] .almajd-rail-btn:focus-visible::after { transform:translate(0,-50%); }
}

.almajd-language-btn { position:relative; }
.almajd-language-btn .almajd-lang-code { position:absolute; right:2px; bottom:1px; min-width:17px; height:14px; padding:0 3px; display:grid; place-items:center; border-radius:7px; background:#d4af37; color:#0b2545; font-size:7px; font-weight:950; line-height:1; border:1px solid rgba(255,255,255,.8); }
html[dir="ltr"] .almajd-language-btn .almajd-lang-code { right:auto; left:2px; }

.almajd-language-mobile { display:none; }
@media screen and (max-width:1279px) {
  .almajd-language-mobile { position:fixed; z-index:980; top:calc(10px + env(safe-area-inset-top)); left:10px; display:inline-flex; align-items:center; gap:5px; min-width:50px; height:36px; padding:0 9px; border:1px solid rgba(23,54,95,.16); border-radius:999px; background:rgba(255,255,255,.94); color:#17365f; box-shadow:0 9px 24px rgba(11,37,69,.15); backdrop-filter:blur(12px); }
  html[dir="ltr"] .almajd-language-mobile { left:auto; right:10px; }
  .almajd-language-mobile svg { width:17px; height:17px; }
  .almajd-language-mobile b { font-size:10px; font-weight:900; }
}
@media print { .almajd-language-mobile, .almajd-language-btn { display:none!important; } }

/* Foundation-only notice for pages not translated yet. */
:host .almajd-i18n-pending { position:absolute; z-index:9999; top:8px; left:50%; transform:translateX(-50%); max-width:76%; padding:7px 12px; display:flex; align-items:center; gap:9px; border:1px solid rgba(180,138,37,.28); border-radius:999px; background:rgba(255,252,240,.96); color:#17365f; box-shadow:0 8px 18px rgba(11,37,69,.08); font-family:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif!important; direction:ltr; pointer-events:none; }
:host .almajd-i18n-pending b { font-size:8px; font-weight:800; }
:host .almajd-i18n-pending span { font-size:7px; color:#7a8797; }

/* Shadow DOM / page layout LTR rules. */
:host { direction:ltr!important; --font-sans:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif!important; --font-mono:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif!important; }
:host *, :host *::before, :host *::after { font-family:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif!important; }
:host .cover-page,
:host .op-sheet,
:host .g2-page,
:host .cs-gate,
:host .week-page,
:host .cs-governance-page { direction:ltr!important; }
:host .om-header,
:host .om-brand,
:host .om-leader-grid,
:host .om-role,
:host .g2-topbar,
:host .g2-brand,
:host .g2-hero,
:host .g2-act-head,
:host .g2-meta,
:host .g2-measure,
:host .cs-gate-head,
:host .cs-gate-main,
:host .cs-gate-footer,
:host .week-head,
:host .week-meta,
:host .cs-gov-head,
:host .cs-gov-groups { direction:ltr!important; }
:host .om-leader-copy,
:host .om-role,
:host .g2-hero-copy,
:host .g2-title,
:host .g2-goal,
:host .g2-summary,
:host .g2-desc,
:host .g2-meta,
:host .g2-measure,
:host .cs-gate-copy,
:host .cs-gate-summary,
:host .cs-gov-head h1,
:host .cs-gov-group,
:host .cs-gov-item { text-align:left!important; }
:host .g2-grid { direction:ltr!important; }
:host .g2-index { border-left:0!important; border-right:1px solid var(--g2-accent-soft)!important; }
:host .g2-index span { writing-mode:vertical-lr!important; transform:none!important; }
:host .g2-execution-table { direction:ltr!important; }
:host .g2-execution-table th,
:host .g2-execution-table td { text-align:left!important; }
:host .tm-schedule { text-align:center!important; }
:host .tm-kpi { box-shadow:inset 3px 0 0 var(--g2-accent)!important; }
:host .tm-evidence > div:last-child { padding-right:0!important; padding-left:8px!important; }
:host .tm-evidence > div:last-child::before { right:auto!important; left:0!important; }
:host .cs-gate-summary { padding-right:0!important; padding-left:17px!important; border-right:0!important; border-left:3px solid var(--cs-gold)!important; }
:host .cs-gate-kicker::before { margin:0!important; }
:host .program-table,
:host .governance-table { direction:ltr!important; }
:host .program-table th,
:host .program-table td,
:host .governance-table .program-cell,
:host .governance-table .governance-cell { text-align:left!important; }
:host .program-table td:first-child { text-align:left!important; }
:host .governance-table .activity-ref { direction:ltr!important; }
:host .cs-gov-item { padding:8px 10px 8px 37px!important; }
:host .cs-gov-item::before { right:auto!important; left:9px!important; }

/* Mobile semantic reader becomes native English LTR. */
html[dir="ltr"] #almajdMobileReflow,
html[dir="ltr"] #almajdMobileReflow * { direction:ltr; text-align:left; font-family:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif!important; }
html[dir="ltr"] #almajdMobileReflow .mr-activity-top,
html[dir="ltr"] #almajdMobileReflow .mr-meta,
html[dir="ltr"] #almajdMobileReflow .mr-week header,
html[dir="ltr"] #almajdMobileReflow .mr-footer { direction:ltr; }

/* Book spreads: smaller page belongs on the left in LTR. */
html[dir="ltr"] body[data-reader-mode="book"] almajd-page.reader-left-page { order:1; }
html[dir="ltr"] body[data-reader-mode="book"] almajd-page.reader-right-page { order:2; }

/* Book layout must also switch its flex direction contract from the Arabic stage. */
html[dir="ltr"] body[data-reader-mode="book"] .book { direction:ltr!important; }
html[dir="ltr"] body[data-reader-mode="book"] .book::after { content:'Use Previous / Next or the mouse wheel to turn pages'; left:auto; right:24px; }

/* 1.1.14 — English opening section (pages 2–18). */
:host .page-003-bismillah,
:host .page-004-plan-identity,
:host .page-007-achievements,
:host .page-011-vision-values,
:host .page-014-sources,
:host .page-016-general-objectives,
:host .p01718-page { direction:ltr!important; }

:host .p004-header,:host .p004-main,:host .p004-brand,:host .p004-panel,
:host .p007-header,:host .p007-main,:host .p007-brand,:host .p007-cards,
:host .p011-header,:host .p011-brand,:host .p011-main,
:host .p014-header,:host .p014-brand,:host .p014-main,:host .p014-source-card,
:host .p016-header,:host .p016-brand,:host .p016-main,:host .p016-objectives-grid,
:host .p01718-header,:host .p01718-brand,:host .p01718-main,:host .p01718-title-row,:host .p017-grid,:host .p018-grid {
  direction:ltr!important;
}

:host .p004-intro,:host .p004-card,:host .p004-card-heading,:host .p004-card-title,
:host .p007-intro,:host .p007-card,:host .p007-card-title,:host .p007-card-text,:host .p007-note,
:host .p011-main,:host .p011-card,:host .p011-card-title,:host .p011-card-text,
:host .p014-main,:host .p014-source-text,
:host .p016-main,:host .p016-objective-card,:host .p016-objective-title,:host .p016-objective-text,
:host .p01718-main,:host .p01718-title-group,:host .p01718-card,:host .p01718-card-title,:host .p01718-list li {
  text-align:left!important;
}

:host .p004-lead { padding-right:0!important; padding-left:16px!important; border-right:0!important; border-left:4px solid var(--p004-gold)!important; }
:host .p007-subtitle { padding-right:0!important; padding-left:16px!important; border-right:0!important; border-left:2px solid var(--p007-gold)!important; }
:host .p007-note { border-right:0!important; border-left:4px solid var(--p007-gold)!important; }
:host .om-goal-quote,
:host .om-leader-copy .om-lead-quote { border-right:0!important; border-left:3px solid var(--om-gold)!important; padding-right:0!important; padding-left:4mm!important; }
:host .om-team-lead-card::after { right:auto!important; left:0!important; }
:host .om-team-lead-card::before { left:auto!important; right:6mm!important; }
:host .om-team-no { right:auto!important; left:4mm!important; }
:host .om-pass-card::after { left:auto!important; right:6mm!important; }
:host .om-pass-card .bar { right:auto!important; left:0!important; }
:host .om-principle::after { right:auto!important; left:0!important; }
:host .om-swot-card::before { left:auto!important; right:7mm!important; }
:host .om-swot-card ul { padding:0 0 0 4mm!important; }
:host .om-swot-card li { padding-right:0!important; padding-left:1mm!important; }

:host .p014-source-index { border-left:0!important; border-right:2px solid var(--p014-gold)!important; }
:host .p014-source-index::after { left:auto!important; right:-2px!important; }
:host .p014-source-index--blue { border-right-color:var(--p014-blue)!important; }
:host .p014-source-card:hover { transform:translateX(5px)!important; }

:host .p018-grid--ordered { direction:ltr!important; }
:host .p01718-list li { padding:7px 0 7px 18px!important; }
:host .p01718-list li::before { right:auto!important; left:0!important; }
:host .p01718-card-head { direction:ltr!important; }

:host .p003-english-invocation {
  margin:7mm 0 0;
  color:#49627f;
  font-size:13px;
  line-height:1.55;
  font-weight:650;
  letter-spacing:.02em;
  text-align:center!important;
  direction:ltr!important;
}

/* English copy tends to be wider: tune the opening typography instead of shrinking globally. */
:host .p004-card-heading { line-height:1.35!important; }
:host .p007-card-text { line-height:1.72!important; }
:host .om-team-lead-card strong { font-size:14px!important; }
:host .om-team-lead-card span { font-size:8.2px!important; }
:host .om-team-person strong { font-size:8.9px!important; }
:host .om-pass-card strong { font-size:14px!important; line-height:1.38!important; }
:host .p011-card-text { line-height:1.72!important; }
:host .om-principle h3 { font-size:10.5px!important; }
:host .om-principle p { font-size:7.7px!important; line-height:1.65!important; }
:host .p014-source-text p { line-height:1.4!important; }
:host .p014-source-text small { line-height:1.35!important; }
:host .om-swot-card li { font-size:7.35px!important; line-height:1.38!important; }
:host .p016-objective-title { line-height:1.25!important; }
:host .p016-objective-text { line-height:1.46!important; }
:host .p01718-card-title { font-size:14.1px!important; line-height:1.34!important; }
:host .p01718-list li { font-size:11.4px!important; line-height:1.38!important; }
:host .p01718-card--dense .p01718-list li { font-size:10.9px!important; line-height:1.34!important; }
:host .p018-primary .p01718-list li { font-size:10.8px!important; line-height:1.32!important; }

@media print {
  :host .p014-source-card:hover { transform:none!important; }
}

:host .cs-wayfinding{direction:ltr!important;}
:host .cs-wayfinding b{direction:ltr!important;}

/* 1.1.14 — academic calendar and monitoring section (pages 55–78). */
:host .cs-semester-gate,
:host .cs-annual-review,
:host .cs-calendar-control { direction:ltr!important; text-align:left!important; }
:host .cs-sem-head,
:host .cs-sem-main,
:host .cs-sem-copy,
:host .cs-sem-stat,
:host .cs-sem-timeline,
:host .cs-review-head,
:host .cs-review-body,
:host .cs-review-kpis,
:host .cs-review-panels,
:host .cs-calendar-head,
:host .cs-calendar-body,
:host .cs-calendar-grid,
:host .cs-event,
:host .cs-calendar-rule { direction:ltr!important; }
:host .cs-sem-copy,
:host .cs-sem-copy h1,
:host .cs-sem-copy p,
:host .cs-sem-date,
:host .cs-review-head,
:host .cs-review-head h1,
:host .cs-review-head p,
:host .cs-review-kpi,
:host .cs-review-panel,
:host .cs-review-line,
:host .cs-calendar-head,
:host .cs-calendar-head h1,
:host .cs-calendar-card,
:host .cs-calendar-card h2,
:host .cs-event,
:host .cs-calendar-rule { text-align:left!important; }
:host .cs-sem-timeline::before { right:auto!important; left:58px!important; }
:host .cs-sem-point { right:auto!important; left:47px!important; }
:host .cs-sem-date { right:auto!important; left:88px!important; }
:host .cs-sem-months { left:auto!important; right:28px!important; text-align:right!important; direction:ltr!important; }
:host .cs-sem-weeks { left:auto!important; right:27px!important; }
:host .cs-review-panel h2::before { margin-left:0!important; margin-right:7px!important; }
:host .cs-event { grid-template-columns:minmax(0,1fr) auto!important; }
:host .cs-event time { direction:ltr!important; }
:host .cs-year-track::before { direction:ltr!important; }
:host .week-card,
:host .week-card * { direction:ltr; }
:host .week-title,
:host .week-date,
:host .week-meta span { text-align:center!important; }
:host .week-month { left:auto!important; right:9px!important; }
:host .week-progress { left:auto!important; right:9px!important; }
:host .semester-close-band { direction:ltr!important; }

@media screen and (max-width:767px) {
  :host .cs-sem-main { grid-template-columns:1fr!important; }
}

/* 1.1.14 — final English section (pages 79–90). */
:host .section-open-page,
:host .ledger,
:host .cs-transition-gate,
:host .cs-governance-gate,
:host .cs-closing-gate,
:host .back-cover-page { direction:ltr!important; text-align:left!important; }

:host .sec-header,
:host .sec-brand,
:host .sec-brand-copy,
:host .sec-footer,
:host .p079-main,
:host .p079-copy,
:host .p084-main,
:host .p084-copy,
:host .p084-line-two,
:host .ledger-title,
:host .footer-inner,
:host .cs-transition-main,
:host .cs-transition-keys,
:host .cs-gov-main,
:host .cs-gov-keys,
:host .cs-closing-main,
:host .cs-cycle,
:host .back-cover-layout,
:host .back-cover-main,
:host .bottom-row,
:host .back-cover-side { direction:ltr!important; }

:host .sec-brand-copy,
:host .p079-copy,
:host .p084-copy,
:host .ledger-title,
:host .ledger-title h1,
:host .ledger-title p,
:host .ledger-table th,
:host .ledger-table td,
:host .empty-note,
:host .cs-transition-main,
:host .cs-transition-main h1,
:host .cs-transition-main p,
:host .cs-gov-main,
:host .cs-gov-main h1,
:host .cs-gov-main p,
:host .cs-closing-main,
:host .cs-closing-quote,
:host .back-cover-main,
:host .back-cover-main .copy,
:host .back-cover-main .lead,
:host .bottom-copy,
:host .copyright { text-align:left!important; }

:host .sec-chip { margin-left:0!important; margin-right:78px!important; }
:host .p079-diamond { right:auto!important; left:-74px!important; }
:host .p079-title span::after { right:auto!important; left:0!important; }
:host .p084-line-two { margin-right:0!important; margin-left:64px!important; }
:host .p084-line-three { margin-right:0!important; margin-left:120px!important; }
:host .p084-sync { left:auto!important; right:220px!important; text-align:right!important; }

:host .ledger-table { direction:ltr!important; }
:host .ledger-table th,
:host .ledger-table td { text-align:left!important; }
:host .ledger-table .check-cell { text-align:center!important; }
:host .ledger-table .program-name::before { margin-left:0!important; margin-right:1.3mm!important; }
:host .ledger-table .activity-id-badge { margin-left:0!important; margin-right:1.1mm!important; }
:host .add-program { left:auto!important; right:21mm!important; }
:host .empty-note { right:auto!important; left:31mm!important; }

/* English program names are naturally wider; preserve readability without row overflow. */
:host .ledger-table td { font-size:2.55mm!important; line-height:1.12!important; padding:.85mm 1.25mm!important; }
:host .ledger-table th { font-size:2.72mm!important; line-height:1.15!important; }
:host .ledger-title h1 { font-size:5.45mm!important; line-height:1.18!important; }
:host .ledger-title p { font-size:2.55mm!important; line-height:1.25!important; }

:host .cs-transition-gate h1,
:host .cs-governance-gate h1 { text-align:left!important; }
:host .cs-gov-axis { right:auto!important; left:72px!important; }
:host .cs-closing-quote { text-align:left!important; }
:host .cs-cycle { direction:ltr!important; }

:host .back-cover-layout { direction:ltr!important; }
:host .back-cover-side { text-align:left!important; }
:host .back-cover-page .brand-logo { object-position:left center!important; }

@media print {
  :host .ledger-table td { font-size:2.5mm!important; }
}

:host .p004-designer-credit { direction:ltr!important; }
:host .p004-designer-name { direction:ltr!important; }
:host .exec-page-status-badge { left:auto!important; right:12px!important; direction:ltr!important; }
