/* ============================================================================
   Material Symbols Rounded - SELF-HOSTED, SUBSETTED
   ----------------------------------------------------------------------------
   Previously these pages pulled the icon font from fonts.googleapis.com, which
   cost two extra DNS + TLS round trips to Google AND used `display=swap`, so the
   browser painted the raw ligature text ("work", "visibility", "smart_toy"...)
   as words until the icon font finally arrived.

   This file removes both problems:
     - the font is same-origin (one request, already in the initial wave)
     - it is subsetted to the 40 icons actually used site-wide: 6.2 KB
       (the full variable font is ~250 KB+)
     - `font-display: block` means nothing is painted until the font is ready,
       so the raw icon names can never flash as text
     - the file is preloaded from each page's <head>

   Regenerate after adding/removing an icon (see tools/build-icons-font.mjs).
   ============================================================================ */

@font-face {
    font-family: 'Material Symbols Rounded';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('/assets/fonts/material-symbols-rounded.woff2') format('woff2');
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
    /* Keep the ligature from ever reading as words if the font is unavailable:
       the fallback stays fully transparent instead of showing "work"/"add". */
    color: inherit;
}

/* If the icon font fails to load entirely, hide the ligature text rather than
   exposing it as prose. Modern browsers only apply this when the webfont is
   genuinely unavailable, so a normal load is unaffected. */
@supports (font-variation-settings: normal) {
    .material-symbols-rounded {
        font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    }
}