/* Epilog 2.7.0: Arial and fluid, word-preserving typography. */
:root {
    --epilog-sans: Arial, Helvetica, sans-serif;
    --epilog-serif: var(--epilog-sans);
    --global-body-font-family: var(--epilog-sans);
    --global-heading-font-family: var(--epilog-sans);
    --global-primary-nav-font-family: var(--epilog-sans);
    --epilog-text-size: clamp(1rem, .9375rem + .25vw, 1.125rem);
    --epilog-lead-size: clamp(1.0625rem, .9375rem + .5vw, 1.3125rem);
    --epilog-title-size: clamp(1.75rem, 1.125rem + 2.2vw, 3.5rem);
    --epilog-heading-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.625rem);
    --epilog-subheading-size: clamp(1.125rem, 1rem + .4vw, 1.5rem);
}

/* Text in the custom templates and in standard Kadence pages.
 * Target text elements instead of icon-font elements or the WP admin bar. */
body,
.epilog-page,
.epilog-page :is(h1, h2, h3, h4, h5, h6, p, a, li, dt, dd, span, strong, b, em,
    small, blockquote, figcaption, summary, label, legend, button, input,
    textarea, select, option, th, td),
body #wrapper :is(h1, h2, h3, h4, h5, h6, p, a, li, dt, dd, span, strong, b, em,
    small, blockquote, figcaption, summary, label, legend, button, input,
    textarea, select, option, th, td) {
    font-family: var(--epilog-sans) !important;
}

body,
.epilog-page {
    font-size: var(--epilog-text-size);
    line-height: 1.6;
}

/* Font sizes leave room for long Russian words even in narrow columns.
 * Do not use break-word/anywhere on headings: they orphan final letters. */
body #wrapper :is(h1, h2, h3, h4, h5, h6),
.epilog-page :is(h1, h2, h3, h4, h5, h6) {
    max-width: 100%;
    min-width: 0;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    white-space: normal !important;
    text-wrap: balance;
    letter-spacing: normal;
}

body #wrapper h1,
.epilog-page h1 {
    font-size: var(--epilog-title-size) !important;
    line-height: 1.16 !important;
}

body #wrapper h2,
.epilog-page h2 {
    font-size: var(--epilog-heading-size) !important;
    line-height: 1.22 !important;
}

body #wrapper :is(h3, h4, h5, h6),
.epilog-page :is(h3, h4, h5, h6) {
    font-size: var(--epilog-subheading-size) !important;
    line-height: 1.35 !important;
}

.epilog-page .epilog-procedure-title__main,
.epilog-page .epilog-procedure-title__accent {
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Main reading text; secondary labels keep their smaller hierarchy. */
.epilog-page main p,
.epilog-page main li,
.epilog-page main summary,
body #wrapper .entry-content :is(p, li, summary) {
    font-size: var(--epilog-text-size) !important;
    line-height: 1.6;
}

.epilog-page main :is(.epilog-hero__lead, .epilog-procedure-hero__lead),
.epilog-page .epilog-contacts-hero__copy > p:not(.epilog-kicker) {
    font-size: var(--epilog-lead-size) !important;
    line-height: 1.55;
}

.epilog-page main .epilog-kicker,
.epilog-page main .epilog-result-card__meta,
.epilog-page main .epilog-demo-note {
    font-size: .875rem !important;
    line-height: 1.5;
}

.epilog-page .epilog-benefit p,
.epilog-page .epilog-step p {
    font-size: clamp(.875rem, .8125rem + .2vw, 1rem) !important;
    line-height: 1.5;
}

/* Card titles are smaller than section headings. */
body #wrapper .epilog-result-card--real h2,
.epilog-page .epilog-result-card--real h2 {
    font-size: var(--epilog-subheading-size) !important;
    line-height: 1.35 !important;
}

.epilog-page .epilog-site-footer p {
    font-size: .875rem;
    line-height: 1.6;
}

.epilog-page .epilog-btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    font-size: clamp(.875rem, .8125rem + .2vw, 1rem);
    line-height: 1.4;
}

.epilog-page .epilog-btn img {
    flex-shrink: 0;
}

/* Let content columns shrink while keeping the established layout. */
.epilog-page :is(.epilog-procedure-intro, .epilog-about__grid,
    .epilog-contacts-hero__grid, .epilog-find-grid) > * {
    min-width: 0;
}

/* At tablet widths the intro needs a full line for long headings. */
@media (max-width: 61.25em) {
    .epilog-procedure-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
    }
}
