/* =============================================================================
   Faces, served from this origin.

   These used to come from fonts.googleapis.com, which put TWO extra origins on
   the critical path of every page: a render blocking stylesheet from
   googleapis, and then the files themselves from gstatic -- each needing its
   own DNS lookup, TCP handshake and TLS negotiation before a single glyph
   could be requested. On a cold mobile connection that is most of the time
   between tapping a link and reading a sentence, and none of it is transfer,
   it is just introductions.

   Same origin means the connection is already open. There is no second
   stylesheet to block rendering, the files are fetched on the connection that
   delivered the HTML, and the one face the first paint needs is preloaded so it
   is in flight while this file is still being parsed.

   Generated by bin/build-fonts.sh from the licensed variable fonts in
   wp-content/Font/. Do not edit the ranges here: the files on disk are cut to
   exactly these unicode-ranges, and a wider range in the CSS than in the file is
   a silent fall through to a system font mid-sentence.

   -------------------------------------------------------------------------
   TWO FAMILIES, NOT FOUR
   -------------------------------------------------------------------------

   Faragiri Sans covers every Latin locale plus Cyrillic and Greek, so it replaced
   both Bricolage Grotesque (display) and Instrument Sans (text). Setting a page
   in one family across a 100..900 weight range is not a compromise forced by
   the licence -- it is the better typography here. The old pairing carried two
   grotesques whose difference a reader had to be told about; hierarchy now comes
   from weight, size and colour, which is what it was doing on this site anyway.

   It is also most of the speed win. An English page used to fetch three files
   totalling 123 kB before it could set a headline. It now fetches two, and the
   variable cut carries nine weights where the old pair carried four:

       before   bricolage-latin 78 kB + instrument-latin 30 kB + dm-mono 15 kB
       after    faragiri-sans-latin    35 kB + dm-mono          15 kB

   -------------------------------------------------------------------------
   WHY ONE VARIABLE CUT PER SCRIPT AND NOT ONE FILE PER WEIGHT
   -------------------------------------------------------------------------

   Both families ship static weights too. This site sets 400, 500, 600, 700 and
   800; as statics that is five files and five requests per script. The variable
   cut is smaller than two of them and carries every weight in between, so a
   heading can be retuned in CSS without a rebuild.

   -------------------------------------------------------------------------
   THE FALLBACK FACES AT THE BOTTOM
   -------------------------------------------------------------------------

   font-display: swap means text is readable immediately in a system font and
   is repainted when the real face lands. The repaint is only free if the two
   occupy the same space -- otherwise every line reflows and the layout jumps,
   which is a Core Web Vitals failure the visitor sees as the page lurching.

   The overrides below are measured from the real fonts (both are 1000 units per
   em; FaragiriSans rides 941/-267, IRANYekanX 900/-400), so the system font is forced
   into the same line box before the swap happens. size-adjust is deliberately
   NOT set: matching x-heights needs the metrics of whatever system font actually
   answers, which differs per platform and cannot be measured from here, and a
   wrong size-adjust is worse than none.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   Faragiri Sans -- Latin, Cyrillic and Greek. wght 100..900, one axis.
   Serves 16 of the 24 locales. Not Vietnamese: the family carries 16 of the 99
   characters that script needs, so vi keeps its own face.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Faragiri Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/faragiri-sans-latin-fg20261008.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: 'Faragiri Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/faragiri-sans-latin-ext-fg20261008.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;
}

/* The one italic. FaragiriSans' variable font is upright only, so this is a static at
   Regular -- the only weight prose sets italic at.

   Declaring it is free. A @font-face is requested when the page contains text
   matching BOTH its unicode-range and its font-style, so a page with no <em> on
   it never asks for this file. What it buys is the real italic instead of the
   browser shearing the roman by 12 degrees, which on a face with this much
   drawing in it is visible in a single word. */
@font-face {
  font-family: 'Faragiri Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/faragiri-sans-latin-italic-fg20261008.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: 'Faragiri Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/faragiri-sans-cyrillic-fg20261008.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Faragiri Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/faragiri-sans-greek-fg20261008.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* -----------------------------------------------------------------------------
   IRANYekanX -- Arabic script. wght 100..1000.

   The dots axis is pinned to its default in the cut rather than shipped: nothing
   in this theme varies it and keeping a second axis alive costs 10 kB in the
   delta sets. To use it, drop the instancer line in bin/build-fonts.sh, re-cut,
   and set font-variation-settings on the element -- naming 'wght' there too, or
   the weight resets to the axis default, which for this family is Thin.

   The range carries ZWNJ (U+200C) and the guillemets. ZWNJ is not decoration in
   Persian -- it is what separates «می‌شود» from «میشود» -- and no Latin cut has
   it, so it has to live here or Persian prose loses its half spaces.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'IRANYekanX';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(../fonts/iranyekanx-arabic.woff2) format('woff2');
  unicode-range: U+00AB, U+00B7, U+00BB, U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200D, U+2010-2011, U+2026, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

/* -----------------------------------------------------------------------------
   DM Mono -- the instrument voice. Eyebrows, ordinals, counts, the rail.

   Kept, because neither licensed family has a monospace and the fixed pitch is
   doing real work here: it is what makes an ordinal read as a coordinate rather
   than as a number in a sentence. Latin only, which is why the non Latin scripts
   take a different route to the same effect -- see script.css.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/dm-mono-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: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/dm-mono-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;
}

/* -----------------------------------------------------------------------------
   Metric matched fallbacks. Referenced from the font stacks in tokens.css, and
   never used to render a glyph of their own -- their whole job is to hold the
   line box at the right height for the ~200 ms before the real face lands.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'FaragiriSans Fallback';
  src: local('Helvetica Neue'), local('Arial'), local('Liberation Sans'), local('DejaVu Sans'), local('Roboto');
  ascent-override: 94.1%;
  descent-override: 26.7%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Yekan Fallback';
  src: local('Tahoma'), local('Segoe UI'), local('Geeza Pro'), local('Noto Sans Arabic'), local('DejaVu Sans');
  ascent-override: 90%;
  descent-override: 40%;
  line-gap-override: 0%;
}
