/* ── Real fonts (self-hosted WOFF2) ───────────────────────── */
@font-face {font-family:'DM Sans';src:url('../fonts/dm-sans-v17-latin-regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;}
@font-face {font-family:'DM Sans';src:url('../fonts/dm-sans-v17-latin-italic.woff2') format('woff2');font-weight:400;font-style:italic;font-display:swap;}
@font-face {font-family:'DM Sans';src:url('../fonts/dm-sans-v17-latin-500.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap;}
@font-face {font-family:'DM Sans';src:url('../fonts/dm-sans-v17-latin-600.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap;}
@font-face {font-family:'DM Sans';src:url('../fonts/dm-sans-v17-latin-700.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap;}
@font-face {font-family:'JetBrains Mono';src:url('../fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;}
@font-face {font-family:'JetBrains Mono';src:url('../fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap;}

/* ── Metric-matched fallbacks (prevent CLS on font swap) ──
   Before the real font arrives, the browser uses the fallback. Normally this
   causes layout shift when the swap happens because metrics differ. By giving
   the fallback ascent/descent/size overrides that match the real font, any
   swap causes ZERO reflow. Values calibrated against the real DM Sans and
   JetBrains Mono metrics (from the fontsource/screenspan calculator).
   ─────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'DM Sans Fallback';
    src: local('Arial');
    ascent-override: 92.37%;
    descent-override: 24.40%;
    line-gap-override: 0%;
    size-adjust: 105.82%;
}
@font-face {
    font-family: 'JetBrains Mono Fallback';
    src: local('Courier New');
    ascent-override: 76.20%;
    descent-override: 25.40%;
    line-gap-override: 0%;
    size-adjust: 128.00%;
}
