html,
body {
    font-family: var(--font-family-base, "Montserrat", Arial, sans-serif);
}

body {
    font-weight: var(--font-weight-regular, 400);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Form controls, Yii2 Bootstrap5 widgets, buttons, dropdowns and tooltips. */
body :is(button,
    input,
    select,
    textarea,
    optgroup,
    .form-control,
    .form-select,
    .btn,
    .dropdown-menu,
    .dropdown-item,
    .popover,
    .tooltip,
    .vks-template-trigger,
    .vks-template-menu,
    .vks-template-option) {
    font-family: var(--font-family-base, "Montserrat", Arial, sans-serif);
}

/* Body text 400; control contents 400; button labels 600. */
body :is(input, select, textarea, optgroup, .form-control, .form-select) {
    font-weight: var(--font-weight-regular, 400);
}

body :is(button, .btn, .settings-action-link, .settings-save-button, .settings-collapse-button) {
    font-weight: var(--font-weight-semibold, 600);
}

/* Headings and emphasis use loaded Montserrat weights rather than synthetic bold. */
body :is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--font-family-base, "Montserrat", Arial, sans-serif);
    letter-spacing: -0.02em;
}

body :is(h1, h2) {
    font-weight: var(--font-weight-extrabold, 800);
}

body :is(h3, h4, h5, h6, b, strong) {
    font-weight: var(--font-weight-bold, 700);
}

body :is(.form-label, .control-label) {
    font-weight: var(--font-weight-semibold, 600);
}

/* Key V2 labels: maintain a consistent visual hierarchy. */
body :is(.settings-card__title,
    .settings-card__section-title,
    .settings-manager__list-title,
    .settings-toolbar__title > strong,
    .settings-ux-step__head strong) {
    font-weight: var(--font-weight-bold, 700);
}