/* Self-hosted fonts for the console, served from the Pages edge with an
   immutable cache (see _headers). The theme's stack is Plus Jakarta Sans
   (packages/ui/src/theme.ts); Inter is only reached by the shared .aed-price
   rule in @winkyou/utils/currency.css. Both are variable fonts, so one file
   covers the whole weight range; latin and latin-ext are split by
   unicode-range exactly as Google serves them, so latin-ext is only fetched
   when the page renders a character that needs it. The console chrome is
   English; Arabic tenant data (names, catalog rows) renders in the OS Arabic
   face through the theme's fallback stack. The theme never named the Arabic
   family Google used to serve, so this is the same rendering as before, with
   two fewer font downloads. */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/PlusJakartaSans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 'WY Arabic Line' (named first in the Arabic UI stack, packages/ui/src/theme.ts):
   the Plus Jakarta Sans latin file again, covering ONLY the space, so it sets the
   line box and draws nothing but the (identical) space. Plus Jakarta Sans is
   ascent 103.8% / descent 22.2%, which centres Latin capitals and leaves Arabic
   0.13-0.18em low. Same 126% total, baseline 0.1em higher: Arabic sits level with
   the icon beside it, Latin digits in Arabic screens stay within 0.1em.

   SAFARI IGNORES ascent-override / descent-override / line-gap-override
   (measured 2026-11-20 in the system WebKit with a WKWebView snapshot: the
   overrides moved nothing, Playwright's own WebKit build does honour them, so
   tests looked fine). So the same numbers are also BAKED into the file this
   face loads (hhea, OS/2 typo with USE_TYPO_METRICS), made with fontTools from
   PlusJakartaSans-latin.woff2 (space only). The overrides below repeat the
   baked values, so every engine lands on the same baseline. Change both
   together and give a changed file a new name: /fonts/* is cached for a year
   as immutable. */
@font-face {
  font-family: 'WY Arabic Line';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/wy-arabic-line.woff2') format('woff2');
  unicode-range: U+0020;
  ascent-override: 93.8%;
  descent-override: 32.2%;
  line-gap-override: 0%;
}

/* Button label line height for Plus Jakarta Sans (read by packages/ui/src/theme.ts,
   MuiButton root). 1.3 is just above this font's ascent + descent (1.26), so
   Chromium's floored half leading is zero and 12.8-13px labels sit on the
   centre of the button instead of 0.6-1px high (measured 2026-11-20). It
   lives here, beside the face it is tuned for, so an app on the system font
   keeps the theme's 1.2. Arabic pages keep 1.2: there the line is set by
   'WY Arabic Line' and the Arabic letter band, measured -0.25px at 1.2 and
   +0.46px at 1.3, so 1.2 is the centred one. */
:root { --wy-button-lh: 1.3; }
html[dir='rtl'] { --wy-button-lh: 1.2; }
