/* Shared type scale. Load after the page and design stylesheets. */
:root,
html[data-palette] {
    --site-font: 'Inter', Arial, sans-serif;
    --type-h1: clamp(48px, 3.65vw, 52px);
    --type-h2: clamp(34px, 2.65vw, 38px);
    --type-h3: 22px;
    --type-body: 16px;
    --type-intro: 18px;
    --type-label: 14px;
    --type-caption: 13px;
    --desktop-text-min: 13px;
}

/* Legacy components contain font shorthands, so the family is set explicitly. */
html body,
html body * {
    font-family: var(--site-font) !important;
}
body.lider-site {
    font-size: var(--type-body);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: normal;
}
.lider-site :is(h1, h2, h3, h4, h5, h6) {
    font-weight: 700 !important;
    letter-spacing: normal !important;
    text-transform: none;
}
.lider-site h1 {
    font-size: var(--type-h1) !important;
    line-height: 1.15 !important;
}
.lider-site h2 {
    font-size: var(--section-heading-size, var(--type-h2)) !important;
    line-height: 1.2 !important;
}
.lider-site :is(h3, h4) {
    font-size: var(--card-heading-size, var(--type-h3)) !important;
    line-height: 1.3 !important;
}
.lider-site :is(h1, h2, h3, h4) :is(span, b, strong, em) {
    font-size: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
}

/* A heading inside a form or a contact card is a card title, not a section. */
.lider-site :is(.wco-spec-card, .wco-contact-card, .wco-directory-card, .wco-document-card) {
    --section-heading-size: var(--type-h3);
}
.lider-site .wg-hero__request {
    --section-heading-size: 20px;
}
.lider-site .lead-modal {
    --section-heading-size: 28px;
    --copy-size: 14px;
}
.lider-site :is(.lead-capture__form-heading, .contacts-form) {
    --card-heading-size: 20px;
}

/* Paragraph roles keep introductions, descriptions and captions distinct. */
.lider-site p {
    font-size: var(--copy-size, var(--type-body)) !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
}
.lider-site :is(.wg-hero__copy, .lider-commerce-hero__copy, .wco-hero__copy,
    .wco-catalog-intro, .thanks-intro) {
    --copy-size: var(--type-intro);
}
.lider-site :is(.wg-hero__request, .wco-catalog-contact, .lead-capture__form-heading,
    .home-calc__geometry, .home-calc__glass-guide, .cookie-banner, .lider-footer) {
    --copy-size: var(--type-label);
}
.lider-site :is(.lider-caption, .lider-catalog-note, .wco-small,
    .wco-illustration-note, .wco-filter-status, .home-calc__hint, .home-calc__price-note,
    .home-calc__diagram-note, .home-calc__status, .lead-capture__hours,
    .repair-prices__scroll-hint, .lif-step__result) {
    --copy-size: var(--type-caption);
    font-size: var(--type-caption) !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}
.lider-site :is(small, figcaption, .wg-hero__caption,
    .contacts-policy, .wg-consent, .lead-capture__consent > label,
    .lider-footer__bottom, .lider-footer__bottom button) {
    font-size: var(--type-caption) !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
}
.lider-site :is(b, strong) {
    font-weight: 700;
}
.lider-site :is(.lider-certificate-mark > p, .wco-contact-card .wco-contact-address) {
    font-size: var(--type-h3) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

/* Shared label and control rhythm, including the existing calculators. */
.lider-site :is(label, legend, .lider-kicker, .home-eyebrow, .wco-eyebrow,
    .lif-eyebrow, .lider-commerce-label, .wg-badge, .wco-crumbs,
    .wg-location-label, .home-calc__fieldset > legend) {
    font-size: var(--type-label) !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
}
.lider-site :is(.lider-kicker, .home-eyebrow, .wco-eyebrow, .lif-eyebrow,
    .lider-commerce-label, .wg-badge, .wg-hero-form__row > label > span,
    .contacts-form > label:not(.contacts-policy), .lead-capture__phone-field label) {
    font-size: var(--type-label) !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
}
.lider-site :is(input, select, textarea) {
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.5;
    letter-spacing: normal;
}
.lider-site :is(.btn, .contacts-submit, .lead-capture__submit,
    .home-calc__lead, .cookie-secondary, .lider-commerce-secondary) {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}
.lider-site :is([role='tab'], .home-tabs button, .wg-profile-tabs button,
    .wco-filter button, .wco-text-button, .lider-link,
    .home-calc__quiet-button, .home-calc__add, .home-calc__share,
    .home-calc__edit-head button, .home-calc__export button,
    .home-calc__presets button) {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
}
.lider-site summary {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
}
.lider-site :is(table, dl, .wco-checks li, .lider-order-sheet li) {
    font-size: 14px;
    line-height: 1.6;
}
.lider-site :is(.wco-checks li, .lider-order-sheet li,
    .home-calc__dimensions label > span, .home-calc__quantity > label) {
    font-size: 14px !important;
    letter-spacing: normal !important;
}
.lider-site :is(table th, table td, dl dt, dl dd, dl > div,
    .wg-trust-strip span, .wg-trust-strip a, .wg-profile-intro, .wg-product__profile,
    .wg-choice-row span, .wg-selection__result ul, .lider-catalog-specs,
    .lider-commerce-specs span, .wco-service-card li, .wco-role-result) {
    font-size: 14px !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
}
.lider-site :is(.wco-catalog-heading > span, .wco-service-card__image > span,
    .wco-works-stats span, .wco-scenario-grid > a > div > span,
    .wco-scenario-grid b, .lif-step__top > span:last-child) {
    font-size: 13px !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
}

/* Numbers keep the same width as values change or align in a price list. */
.lider-site :is([class*='price'], [class*='total'], table, dl, input,
    a[href^='tel:'], .lif-number, .home-calc__mobile-summary) {
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: normal;
}
.lider-site :is(.wg-product__price > strong, .home-product__price strong,
    .lider-commerce-price > strong, .wg-hero__price > strong,
    .home-calc__total > strong, .type-card .price) {
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: normal !important;
}

/* Header and footer use the same family without the old compressed tracking. */
.lider-site .lider-logo > span {
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.15;
    letter-spacing: normal !important;
}
.lider-site .lider-logo small {
    font-size: 10px !important;
    line-height: 1.45 !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
}
.lider-site :is(.site-header__nav a, .page-navigation a, .lider-footer nav a,
    .lider-footer__social a) {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
}
.lider-site :is(.lider-utility, .lider-utility a, .lider-header__contact > span, .lider-footer nav > span,
    .lider-footer__call > span) {
    font-size: 13px !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
}
.lider-site .lider-utility nav {
    font-size: inherit !important;
}
.lider-site .lider-header__contact > a {
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: normal !important;
}
.lider-site .lider-footer__call > a {
    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: normal !important;
}

@media (max-width: 1000px) {
    :root, html[data-palette] {
        --type-h1: 42px;
        --type-h2: 34px;
    }
    .lider-site .lider-header__cta { display: none; }
    .lider-site .lider-header__contact { margin-left: auto; }
}
@media (max-width: 760px) {
    :root, html[data-palette] {
        --type-h1: 32px;
        --type-h2: 28px;
        --type-h3: 20px;
        --type-intro: 16px;
    }
    .lider-site .lead-modal { --section-heading-size: 24px; }
    .lider-site .lider-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 32px;
        gap: 12px 18px;
        height: auto;
        padding-block: 14px;
    }
    .lider-site .lider-logo { grid-area: 1 / 1; }
    .lider-site .lider-logo > span { font-size: 21px !important; }
    .lider-site .lider-logo small { font-size: 10px !important; max-width: 220px; }
    .lider-site .lider-header__contact {
        grid-area: 2 / 1 / 3 / 3;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 12px;
        margin-left: 0;
        text-align: left;
    }
    .lider-site .lider-header__contact > a { font-size: 14px !important; }
    .lider-site .lider-header__contact > span { font-size: 10px !important; margin-top: 0; }
    .lider-site .lider-menu-toggle { grid-area: 1 / 2; justify-self: end; }
    .lider-site .lider-menu-toggle b { font-size: 10px !important; letter-spacing: normal; }
    .lider-site .wg-product__price > strong { font-size: 26px !important; }
    .lider-site .legal-intro h1 { font-size: clamp(28px, 8vw, 32px) !important; }
}

/* Keep long Russian product names inside a comfortable card width. */
@media (max-width: 600px) {
    .lider-site .wg-product-grid { grid-template-columns: minmax(0, 1fr); }
    .lider-site .wg-product { padding: 24px; }
    .lider-site .wg-product > img { height: 180px; }
    .lider-site .wg-product > h3 { min-height: 0; }
    .lider-site .wg-product dl > div { display: flex; justify-content: space-between; gap: 12px; }
    .lider-site .wg-product dd { text-align: right; font-size: 14px; }
}
.lider-site label.wg-consent,
.lider-site label.contacts-policy,
.lider-site .lead-capture__consent > label {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}
