/* ScaanMe Arabic typography layer -- GENERATED, do not hand-edit.
   Source: resources/build/build-arabic-css.py

   Fixes, for any card page that serves Arabic and has no Arabic face of its own:
     1. a real Arabic typeface (IBM Plex Sans Arabic, self-hosted)
     2. letter-spacing / word-spacing neutralised for Arabic only
     3. line-height floored so ascenders and diacritics stop clipping
     4. word breaking prevented inside Arabic words
   Latin is untouched everywhere: the typeface is bound by unicode-range, the
   metric rules are bound to [dir=rtl] / :lang(ar).
*/

/* ---- 1. The face itself, under its own name, for anything that asks for it. ---- */
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/scaanme-arabic/ibm-plex-sans-arabic-400-arabic.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/scaanme-arabic/ibm-plex-sans-arabic-500-arabic.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/scaanme-arabic/ibm-plex-sans-arabic-700-arabic.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}

/* A neutral handle for stacks that name no family at all (Tailwind's --font-sans). */
@font-face{font-family:'ScaanMe Arabic';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/scaanme-arabic/ibm-plex-sans-arabic-400-arabic.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:'ScaanMe Arabic';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/scaanme-arabic/ibm-plex-sans-arabic-500-arabic.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:'ScaanMe Arabic';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/scaanme-arabic/ibm-plex-sans-arabic-700-arabic.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}

/* ---- 3. Elements that name no family and fall to a Tailwind generic. Our face is
        FIRST, which is safe precisely because it holds no Latin glyphs. ---- */
:root{--font-sans:'ScaanMe Arabic',ui-sans-serif,system-ui,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';--default-font-family:var(--font-sans)}

/* ---- 4. Arabic metric repair. Scoped to a declared RTL or Arabic context so no
        Latin-language card is affected. [dir=rtl] catches themes that set the
        attribute; :lang(ar) catches the six vCard templates that set direction only
        in CSS and never emit a dir attribute at all. ---- */
[dir="rtl"],:lang(ar){
  /* Tracking on a joined script pulls the letters of a word apart and eats the
     word gap. Measured on /mtwfir: 1.5px tracking added 74px to a 17-character
     Arabic string. There is no correct positive value for Arabic. */
  letter-spacing:normal!important;word-spacing:normal!important;
  /* A joined Arabic word must never be split. break-all is used 82 times in the
     estate and splits Arabic mid-word, orphaning single letters onto the next line.
     overflow-wrap replaces it: it only breaks a run that cannot fit a line on its
     own, which is a long Latin URL, never an Arabic word. It is inherited and
     carries no !important, so a theme can still override it. */
  word-break:normal!important;overflow-wrap:break-word;hyphens:none!important;
  -webkit-hyphens:none!important;
}
/* Descendants inherit letter-spacing, but a class rule on a child re-applies it. */
[dir="rtl"] *,:lang(ar) *{letter-spacing:normal!important;word-spacing:normal!important;word-break:normal!important;hyphens:none!important;-webkit-hyphens:none!important}

/* Arabic ink runs taller than Latin: measured 51px of ink in a 36px line box on
   /mtwfir, 42% overflow. Only 18 line-height declarations in the whole estate
   exceed 1.45, so a floor at 1.45 raises the tight ones and lowers almost nothing. */
[dir="rtl"] h1,[dir="rtl"] h2,[dir="rtl"] h3,[dir="rtl"] h4,[dir="rtl"] h5,[dir="rtl"] h6,:lang(ar) h1,:lang(ar) h2,:lang(ar) h3,:lang(ar) h4,:lang(ar) h5,:lang(ar) h6{line-height:var(--sa-ar-lh-head,1.45)!important}
[dir="rtl"] p,[dir="rtl"] li,[dir="rtl"] dd,[dir="rtl"] blockquote,[dir="rtl"] figcaption,:lang(ar) p,:lang(ar) li,:lang(ar) dd,:lang(ar) blockquote,:lang(ar) figcaption{line-height:var(--sa-ar-lh-body,1.75)!important}

/* leading-none / leading-tight clip diacritics on small Arabic labels. */
[dir="rtl"] .leading-none,[dir="rtl"] .leading-tight,:lang(ar) .leading-none,:lang(ar) .leading-tight{line-height:1.4!important}

/* A theme that has done its own Arabic work opts out by setting either variable. */
