/* ═══════════════════════════════════════════════════════════════════════
   Self-hosted fonts (F-400). Replaces the render-blocking Google Fonts <link>
   that caused CLS 0.06–0.09 on every page. Latin subset, font-display: swap.
   Files in /static/fonts/. The critical above-the-fold faces (Instrument Serif
   400, DM Sans 400, DM Mono 400) are <link rel=preload>ed in base.html.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Instrument Serif — display / headlines / formula names ── */
@font-face {
    font-family: 'Instrument Serif';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url('/static/fonts/instrument-serif-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: italic; font-weight: 400; font-display: swap;
    src: url('/static/fonts/instrument-serif-400-italic.woff2') format('woff2');
}

/* ── DM Sans — body / UI ── */
@font-face {
    font-family: 'DM Sans';
    font-style: normal; font-weight: 300; font-display: swap;
    src: url('/static/fonts/dm-sans-300-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url('/static/fonts/dm-sans-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: italic; font-weight: 400; font-display: swap;
    src: url('/static/fonts/dm-sans-400-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal; font-weight: 500; font-display: swap;
    src: url('/static/fonts/dm-sans-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal; font-weight: 600; font-display: swap;
    src: url('/static/fonts/dm-sans-600-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal; font-weight: 700; font-display: swap;
    src: url('/static/fonts/dm-sans-700-normal.woff2') format('woff2');
}

/* ── DM Mono — data / percentages / CAS numbers / prices ── */
@font-face {
    font-family: 'DM Mono';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url('/static/fonts/dm-mono-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Mono';
    font-style: normal; font-weight: 500; font-display: swap;
    src: url('/static/fonts/dm-mono-500-normal.woff2') format('woff2');
}
