/* ==========================================================================
   T2 Hub · Arabic layer
   Loaded after site.rtl.css (the mirrored copy of site.css) on /ar/ only.
   1. Thmanyah typeface   2. Arabic type rhythm   3. RTL corrections
   ========================================================================== */

/* 1. Thmanyah ─ files are used exactly as supplied (the licence forbids editing them) */
@font-face { font-family: "Thmanyah Sans"; src: url("../assets/fonts/thmanyahsans-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../assets/fonts/thmanyahsans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../assets/fonts/thmanyahsans-Medium.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../assets/fonts/thmanyahsans-Bold.woff2") format("woff2"); font-weight: 700 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../assets/fonts/thmanyahsans-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../assets/fonts/thmanyahserifdisplay-Medium.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../assets/fonts/thmanyahserifdisplay-Bold.woff2") format("woff2"); font-weight: 700 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../assets/fonts/thmanyahserifdisplay-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --font: "Thmanyah Sans", "Helvetica Neue", Tahoma, Arial, sans-serif;
  --font-text: "Thmanyah Sans", "Helvetica Neue", Tahoma, Arial, sans-serif;
  --font-arabic: "Thmanyah Sans", Tahoma, sans-serif;
  --font-quote: "Thmanyah Serif Display", "Thmanyah Sans", serif;
}

/* 2. Arabic type rhythm ─ joined letters must never be tracked, and need more air between lines */
html[dir="rtl"] *, html[dir="rtl"] *::before, html[dir="rtl"] *::after { letter-spacing: 0 !important; }
html[dir="rtl"] body { font-family: var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; font-kerning: normal; }
html[dir="rtl"] i, html[dir="rtl"] em { font-style: normal; }
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select, html[dir="rtl"] button { font-family: var(--font-text); }
html[dir="rtl"] .x-nav .ar-l { font-family: var(--font); }

/* 3. RTL corrections */
/* Hero backdrop: mirror the whole painted layer so the navy corner sits behind the logo (now top right) */
html[dir="rtl"] .v10 .v10-bleed::before { transform: scaleX(-1); }
/* Process arrows follow the reading direction */
html[dir="rtl"] .rl-loop div:not(:last-child)::after { content: "←"; }

/* Headlines: Thmanyah Bold reads younger and clearer than the Latin medium weight, with room for dots and shadda */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] .h1, html[dir="rtl"] .h2 { font-weight: 700; }
html[dir="rtl"] .hn h1, html[dir="rtl"] .f-hero h1, html[dir="rtl"] .hl h1 { line-height: 1.14; }
/* Rails page headline only: room for the shadda in "توقّف" on the second line to clear the letters hanging from the first */
html[dir="rtl"] #p-Rails .hl-h { line-height: 1.26; }
@media (max-width: 700px) { html[dir="rtl"] .pw #p-Rails .hl-h { line-height: 1.2 !important; } }
html[dir="rtl"] .vx-hero h1 { line-height: 1.18; }
html[dir="rtl"] h3, html[dir="rtl"] h4 { font-weight: 700; }

/* Machine view: Arabic has no real monospace, so the summary is set in Thmanyah and read right to left */
html[dir="rtl"] .v8-machine pre:not(.mpre) { font-family: var(--font-text); font-size: 17px; line-height: 31px; text-align: right; }
html[dir="rtl"] .v8-machine pre .u, html[dir="rtl"] .v8-machine pre .c { direction: ltr; unicode-bidi: isolate; display: inline-block; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .86em; }
html[dir="rtl"] .v8-machine pre .k { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .86em; }
html[dir="rtl"] .mpre { direction: ltr; text-align: left; }
@media (max-width: 700px) { html[dir="rtl"] .v8-machine pre:not(.mpre) { font-size: 14px; line-height: 26px; } }

/* Wojod mock: the domain ending is Latin, so it keeps its own order (.sa, not sa.) */
html[dir="rtl"] .sc-wd .search { direction: ltr; }
html[dir="rtl"] .sc-wd .search em { margin: 0; }
html[dir="rtl"] .sc-wd .search b { order: -1; margin-right: auto; }

/* Phones: the shared corner in site.rtl.css is already flattened to clear the hero paragraph (1 Dec 2026),
   so the Arabic-only override that used to live here was removed. */

/* Homepage headline: the two source strings form one sentence in Arabic, so they flow as one line of text
   (the second part keeps its coral colour) instead of breaking into two blocks. */
html[dir="rtl"] .hn h1 span { display: inline; }
html[dir="rtl"] .hn h1 span + span::before { content: " "; }
