/* One restrained type system for both legacy Tilda pages and native inserts. */
:root {
  --rli-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --rli-font-reading: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --rli-text: #1f1f1f;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: var(--rli-font-sans) !important;
  color: var(--rli-text);
}

/* Tilda puts font families directly into many blocks and text atoms. */
.t-title,
.t-name,
.t-descr,
.t-text,
.tn-atom,
.t-store__card,
.t-feed__post-popup__text,
.t-article__body,
.t-popup,
.t-form,
.t-menu,
main,
article,
aside,
footer,
header,
h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
label,
blockquote,
figcaption,
td,
th,
caption,
button,
input,
select,
textarea,
[style*="font-family"] {
  font-family: var(--rli-font-reading) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.t-title,
.t-name_xl,
.t-name_lg,
.t-store__card__title {
  font-family: var(--rli-font-sans) !important;
  font-weight: 700 !important;
  letter-spacing: -0.022em;
  line-height: 1.16 !important;
}

p,
li,
.t-text,
.t-descr,
.tn-atom,
.t-feed__post-popup__text,
.t-article__body {
  line-height: 1.55;
}

.t-btn,
.t-submit,
button,
input[type="submit"],
input[type="button"] {
  font-family: var(--rli-font-sans) !important;
  font-weight: 650 !important;
  letter-spacing: 0.025em;
}

.t-store__card__title,
.t-store__card__price,
.t-store__card__price_old {
  line-height: 1.25 !important;
}

@media (max-width: 640px) {
  html,
  body,
  #allrecords {
    max-width: 100%;
    overflow-x: hidden;
  }

  h1,
  h2,
  h3,
  .t-title,
  .t-name_xl,
  .t-name_lg {
    letter-spacing: -0.015em;
  }

  /*
   * Old Tilda covers often keep a desktop width and a 62/92 px inline font
   * on phones. Keep the original copy and composition, but let the title fit
   * the real viewport instead of clipping the right-hand side.
   */
  .t-cover .t-container,
  .t-cover .t-col,
  .t001,
  .t001__wrapper,
  .t032,
  .t032__wrapper,
  .t182,
  .t182__wrapper,
  .t182__content-wrapper,
  .t030,
  .t030__title {
    box-sizing: border-box;
    max-width: 100% !important;
  }

  .t001__title,
  .t032__title,
  .t182__title,
  .t030__title {
    box-sizing: border-box;
    width: calc(100vw - 40px) !important;
    max-width: calc(100vw - 40px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .t001__title [data-customstyle],
  .t001__title > span,
  .t032__title [data-customstyle],
  .t032__title > span,
  .t182__title [data-customstyle],
  .t182__title > span,
  .t030__title [data-customstyle],
  .t030__title span {
    max-width: 100% !important;
    font-size: clamp(32px, 10vw, 42px) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
  }

  /* Exact Zero Block atom on /esp; its exported desktop width is 401 px. */
  #rec533604652 .tn-elem__5336046521470210011265 {
    right: 20px !important;
    left: 20px !important;
    width: auto !important;
    max-width: calc(100% - 40px) !important;
  }

  /* The Oreiro article contains a fixed 640x360 player. */
  iframe[src*="jwplatform.com"] {
    width: 100% !important;
    max-width: 640px !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }
}
