body[data-site-typography] {
    --site-font-system: system-ui, sans-serif;
    --site-font-arial: Arial, Helvetica, sans-serif;
    --site-font-georgia: Georgia, "Times New Roman", serif;
    --site-font-verdana: Verdana, Geneva, sans-serif;
    --site-font-trebuchet: "Trebuchet MS", Arial, sans-serif;
    --site-font-tahoma: Tahoma, "Segoe UI", sans-serif;
    --site-font-palatino: "Palatino Linotype", Palatino, Georgia, serif;
    --site-font-times: "Times New Roman", Times, serif;
}

[data-site-body-font="system"] { --site-body-font: var(--site-font-system); }
[data-site-body-font="arial"] { --site-body-font: var(--site-font-arial); }
[data-site-body-font="georgia"] { --site-body-font: var(--site-font-georgia); }
[data-site-body-font="verdana"] { --site-body-font: var(--site-font-verdana); }
[data-site-body-font="trebuchet"] { --site-body-font: var(--site-font-trebuchet); }
[data-site-body-font="tahoma"] { --site-body-font: var(--site-font-tahoma); }
[data-site-body-font="palatino"] { --site-body-font: var(--site-font-palatino); }
[data-site-body-font="times"] { --site-body-font: var(--site-font-times); }

[data-site-heading-font="system"] { --site-heading-font: var(--site-font-system); }
[data-site-heading-font="arial"] { --site-heading-font: var(--site-font-arial); }
[data-site-heading-font="georgia"] { --site-heading-font: var(--site-font-georgia); }
[data-site-heading-font="verdana"] { --site-heading-font: var(--site-font-verdana); }
[data-site-heading-font="trebuchet"] { --site-heading-font: var(--site-font-trebuchet); }
[data-site-heading-font="tahoma"] { --site-heading-font: var(--site-font-tahoma); }
[data-site-heading-font="palatino"] { --site-heading-font: var(--site-font-palatino); }
[data-site-heading-font="times"] { --site-heading-font: var(--site-font-times); }

/* Theme components share these variables with the typography settings. */
body[data-site-body-font] {
    --design-body-font: var(--site-body-font);
    font-family: var(--site-body-font);
}

body[data-site-heading-font] {
    --design-heading-font: var(--site-heading-font);
}

/* The original design has no theme variables. Override its component fonts directly. */
body[data-site-body-font]:not([data-site-theme]) .page-wrapper :is(p, .text, input, select, textarea, button, .theme-btn, th, td),
body[data-site-body-font]:not([data-site-theme]) .main-header .main-menu .navigation li a,
body[data-site-body-font]:not([data-site-theme]) .main-header :is(.header-top .links li, .header-upper .info-box li),
body[data-site-body-font]:not([data-site-theme]) .main-footer :is(.list li a, .copyright-text) {
    font-family: var(--site-body-font);
}

body[data-site-heading-font]:not([data-site-theme]) .page-wrapper :is(h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a) {
    font-family: var(--site-heading-font);
}

body[data-site-typography~="body_size"] {
    --site-navigation-size: clamp(0.875rem, calc(var(--site-body-size) * 0.9), 1.15rem);
    font-size: var(--site-body-size);
    line-height: 1.65;
}

body[data-site-typography~="body_size"] .page-wrapper :is(p, .text, label, table, th, td, input, select, textarea, .theme-btn, .accordion-box .acc-btn),
body[data-site-typography~="body_size"] .banner-section .banner-carousel .content-box :is(.text, .text p),
body[data-site-typography~="body_size"] .contact-form .form-group :is(input, select, textarea, .custom-file-label),
body[data-site-typography~="body_size"] .sidebar .search-box .form-group :is(input, select),
body[data-site-typography~="body_size"] .subscribe-section .form-column input,
body[data-site-typography~="body_size"] .contact-section .info-column .contact-info li,
body[data-site-typography~="body_size"] .main-footer :is(.list li a, .copyright-text) {
    font-size: var(--site-body-size);
}

body[data-site-typography~="body_size"] .page-wrapper :is(p, .text, label, th, td) {
    line-height: 1.65;
    overflow-wrap: anywhere;
}

body[data-site-typography~="body_size"] .contact-form .custom-file :is(.custom-file-input, .custom-file-label),
body[data-site-typography~="body_size"] .contact-form .custom-file {
    height: calc(var(--site-body-size) * 1.5 + 0.75rem + 2px);
}

body[data-site-typography~="body_size"] .contact-form .custom-file-label {
    line-height: 1.5;
}

body[data-site-typography~="body_size"] .contact-form .custom-file-label::after {
    height: calc(100% - 1px);
}

body[data-site-typography~="body_size"] .main-header .main-menu .navigation li a,
body[data-site-typography~="body_size"] .main-header :is(.header-top .links li, .header-upper .info-box li, .advisor-btn) {
    font-size: var(--site-navigation-size);
}

body[data-site-typography~="heading_size"] {
    --site-responsive-heading: clamp(1.75rem, calc(var(--site-heading-size) * 0.58 + 3.4vw), var(--site-heading-size));
}

body[data-site-typography~="heading_size"] .page-wrapper h1,
body[data-site-typography~="heading_size"] .banner-section .banner-carousel .content-box h1,
body[data-site-typography~="heading_size"] .page-wrapper .page-title h1 {
    font-size: var(--site-responsive-heading);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

body[data-site-typography~="section_size"] {
    --site-responsive-section: clamp(1.125rem, calc(var(--site-section-size) * 0.75 + 1.4vw), var(--site-section-size));
}

body[data-site-typography~="section_size"] .page-wrapper h2,
body[data-site-typography~="section_size"] .page-wrapper :is(.sec-title, .subscribe-section) h2,
body[data-site-typography~="section_size"] .page-wrapper :is(.service-detail .inner-box, .project-detail .lower-content) h2 {
    font-size: var(--site-responsive-section);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

body[data-site-typography~="section_size"] .main-footer h2.widget-title {
    font-size: min(var(--site-responsive-section), 1.5rem);
}

body[data-site-typography]:not([data-site-theme]) .design-preview-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    padding: 0.6rem 1rem;
    background: #222c3f;
    color: #fff;
    font: 600 0.95rem/1.45 system-ui, sans-serif;
    text-align: center;
}

body[data-site-typography]:not([data-site-theme]) .design-preview-notice button {
    padding: 0.4rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 0.25rem;
    background: transparent;
    color: inherit;
    font: inherit;
}

body[data-site-typography]:not([data-site-theme]) .design-preview-notice button:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 3px;
}
