/*
 * Embedded UI fonts, shared by editor, viewer and print/export.
 *
 * Why this exists: the default text font stack used to be the system stack
 * (-apple-system, "Segoe UI", Roboto, sans-serif). None of those fonts exist
 * on a typical Linux server, so the headless-Chrome PDF/PNG exporter fell back
 * to DejaVu/Liberation — wider, taller metrics than San Francisco/Segoe — and
 * text overflowed element boxes (overlap with images, wrapped lines). The
 * editor/viewer looked fine on a Mac because Chrome there resolves -apple-system
 * to San Francisco, but the server-side export did not match.
 *
 * Shipping real font files and making Inter the default means editor, viewer
 * and export all lay text out with byte-identical glyph metrics regardless of
 * OS — true WYSIWYG. The system stack is kept only as a pre-load fallback.
 *
 * Inter is the default (closest to the San Francisco metrics decks are authored
 * against). Roboto, Open Sans, Noto Sans, Albert Sans and Liberation Sans are
 * also embedded and selectable per-element in the editor's font picker. Every
 * face here is a full latin-ext font, so Croatian diacritics (č ć ž š đ …) and
 * € / smart-quote punctuation render correctly — no tofu, no fallback swap.
 *
 * font-display:block keeps text invisible (rather than fallback-then-swap)
 * until the face loads, so a capture that races font load never measures
 * fallback metrics. The exporter additionally waits on document.fonts.ready
 * (handlers.printReadyScript), so by capture time the real font is in.
 *
 * Albert Sans ships as two variable-font files (upright + italic) covering the
 * whole 100–900 weight range, so its two faces use a font-weight range.
 */

/* ---- Inter (default) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/Inter-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/Inter-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/Inter-BoldItalic.woff2") format("woff2");
}

/* ---- Roboto ---- */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/Roboto-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/Roboto-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/Roboto-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/Roboto-BoldItalic.woff2") format("woff2");
}

/* ---- Open Sans ---- */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/OpenSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/OpenSans-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/OpenSans-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/OpenSans-BoldItalic.woff2") format("woff2");
}

/* ---- Noto Sans ---- */
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/NotoSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/NotoSans-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/NotoSans-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/NotoSans-BoldItalic.woff2") format("woff2");
}

/* ---- Albert Sans (variable, 100–900) ---- */
@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url("/static/fonts/AlbertSans.woff2") format("woff2");
}
@font-face {
  font-family: "Albert Sans";
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
  src: url("/static/fonts/AlbertSans-Italic.woff2") format("woff2");
}

/* ---- Liberation Sans (Arial-metric) ---- */
@font-face {
  font-family: "Liberation Sans";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/LiberationSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Liberation Sans";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/LiberationSans-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Liberation Sans";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/LiberationSans-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Liberation Sans";
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url("/static/fonts/LiberationSans-BoldItalic.woff2") format("woff2");
}
