/*
 * FuturaPT → Jost alias.
 *
 * The original Tilda export references font-family: 'FuturaPT' throughout
 * (in 850+ page HTMLs and 400+ CSS files), but no FuturaPT web font is
 * bundled with the static site and the Tilda CDN refuses to serve it
 * outside a Tilda subscription. Without a real font the browser falls
 * back to system sans-serif → different advance widths → absolutely
 * positioned Tilda blocks overlap (e.g. "Устали не понимать, где деньги?"
 * bleeding into the subtitle on the home page).
 *
 * Fix: register 'FuturaPT' as a custom family whose source is Jost
 * (OFL, free) served from jsDelivr (@fontsource/jost). Jost is a
 * geometric sans modelled on Futura, with narrow Cyrillic metrics
 * close to FuturaPT Book — verified in-browser on the home page
 * "Устали не понимать, где деньги?" wraps into 2 lines at 216px
 * matching the original Tilda block height (Manrope wrapped 3 lines
 * and overflowed).
 *
 * Weights covered: 300 (Light), 400 (Book/Regular), 500 (Medium),
 * 600 (Demi), 700 (Bold) — matches the weight set Tilda uses.
 */

/* 300 */
@font-face {
  font-family: 'FuturaPT';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-cyrillic-300-normal.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-latin-300-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* 400 */
@font-face {
  font-family: 'FuturaPT';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-cyrillic-400-normal.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-latin-400-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* 500 */
@font-face {
  font-family: 'FuturaPT';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-cyrillic-500-normal.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-latin-500-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* 600 */
@font-face {
  font-family: 'FuturaPT';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-cyrillic-600-normal.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-latin-600-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* 700 */
@font-face {
  font-family: 'FuturaPT';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-cyrillic-700-normal.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-latin-700-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Italic 400 — Jost has italics; use them. */
@font-face {
  font-family: 'FuturaPT';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-cyrillic-400-italic.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/@fontsource/jost@5.0.20/files/jost-latin-400-italic.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/*
 * Anti-overlap guard for Tilda Zero-block text atoms.
 *
 * Tilda's T396 (Zero block) renders each text block as an absolutely
 * positioned .t396__elem with an inline `height: XXXpx` hard-coded from
 * the editor. When the rendered font has slightly different metrics
 * (even with our FuturaPT→Jost alias, some Cyrillic strings still wrap
 * differently in the browser than they did in the Tilda editor), the
 * text block grows taller than its inline height and neighbouring
 * absolutely positioned blocks overlap.
 *
 * Letting text-typed atoms size by content (height: auto) prevents the
 * overlap. Image, shape, and group atoms keep their fixed heights.
 */
#allrecords .t396__elem[data-elem-type="text"],
#allrecords .t396__elem[data-elem-type="title"],
#allrecords .t396__elem[data-elem-type="html"] {
  height: auto !important;
  min-height: 0 !important;
}
#allrecords .t396__elem[data-elem-type="text"] .tn-atom,
#allrecords .t396__elem[data-elem-type="title"] .tn-atom,
#allrecords .t396__elem[data-elem-type="html"] .tn-atom {
  height: auto !important;
}
