/* Self-hosted Manrope and DM Sans (SIL OFL 1.1, see fonts/README.md). Same weights the Google Fonts import used to serve. */
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/dm-sans-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:'DM Sans';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/dm-sans-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 Sans';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/dm-sans-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:'DM Sans';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/dm-sans-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 Sans';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/dm-sans-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:'DM Sans';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/dm-sans-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:Manrope;font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/manrope-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:Manrope;font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/manrope-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:Manrope;font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/manrope-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:Manrope;font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/manrope-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:Manrope;font-style:normal;font-weight:800;font-display:swap;src:url(/fonts/manrope-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:Manrope;font-style:normal;font-weight:800;font-display:swap;src:url(/fonts/manrope-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}

/*
 * Blur-in reveal that covers the font load.
 *
 * The inline script in partials/head.ejs sets .fonts-pending on <html> while the
 * real fonts load, so the page never flashes in a fallback face. It then swaps that
 * for .fonts-reveal, but only if the wait lasted over ~120ms: a warm navigation gets
 * its fonts almost at once and simply shows the page, with no animation to sit through.
 *
 * Only the top-level blocks are animated, so the page focuses in as a few layers
 * rather than one filter per text node. Dialogs are skipped because the
 * .dialog-fallback rules position them with their own transform.
 */
html.fonts-pending body>header,
html.fonts-pending body>main>:not(dialog),
html.fonts-pending body>footer{
  opacity:0;
  filter:blur(12px);
  /* Last resort if the script never runs to completion: show the page anyway. */
  animation:fonts-failsafe 1ms 3.5s forwards;
}
html.fonts-pending body>main>:not(dialog){transform:translateY(10px)}

html.fonts-reveal body>header,
html.fonts-reveal body>footer{
  animation:fonts-focus .55s cubic-bezier(.22,1,.36,1) var(--reveal-delay,0ms) backwards;
}
html.fonts-reveal body>main>:not(dialog){
  animation:fonts-focus-rise .65s cubic-bezier(.22,1,.36,1) var(--reveal-delay,0ms) backwards;
}
/* Top to bottom cascade, capped so a long page is never waiting on its own animation. */
html.fonts-reveal body>main>:nth-child(1){--reveal-delay:30ms}
html.fonts-reveal body>main>:nth-child(2){--reveal-delay:80ms}
html.fonts-reveal body>main>:nth-child(3){--reveal-delay:130ms}
html.fonts-reveal body>main>:nth-child(4){--reveal-delay:170ms}
html.fonts-reveal body>main>:nth-child(n+5){--reveal-delay:200ms}
html.fonts-reveal body>footer{--reveal-delay:200ms}

@keyframes fonts-focus{
  from{opacity:0;filter:blur(12px)}
  to{opacity:1;filter:blur(0)}
}
@keyframes fonts-focus-rise{
  from{opacity:0;filter:blur(12px);transform:translateY(10px)}
  to{opacity:1;filter:blur(0);transform:none}
}
@keyframes fonts-failsafe{
  to{opacity:1;filter:none;transform:none}
}
@keyframes fonts-fade{
  from{opacity:0}
  to{opacity:1}
}

/* No blur and no movement for people who ask for less: a short fade still hides the swap. */
@media(prefers-reduced-motion:reduce){
  html.fonts-pending body>header,
  html.fonts-pending body>main>:not(dialog),
  html.fonts-pending body>footer{filter:none;transform:none}
  html.fonts-reveal body>header,
  html.fonts-reveal body>main>:not(dialog),
  html.fonts-reveal body>footer{animation:fonts-fade .25s ease-out backwards}
}
