/* Shared, locally hosted tenders.gy fonts and heading typography. */

:is(h1, h2),
:is(h1, h2) * {
    letter-spacing: normal !important;
}

@font-face {
    font-family: 'ABC Social';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/_app-assets/fonts/ABCSocial-Book.woff2') format('woff2');
}

@font-face {
    font-family: 'ABC Social';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/_app-assets/fonts/ABCSocial-BookItalic.woff2') format('woff2');
}

@font-face {
    font-family: 'ABC Social';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/_app-assets/fonts/ABCSocial-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'ABC Social';
    font-style: italic;
    font-weight: 500;
    font-display: swap;
    src: url('/_app-assets/fonts/ABCSocial-MediumItalic.woff2') format('woff2');
}

/* Semantic headings are Medium across app, WordPress and admin. The scoped
 * priority also covers rich-text headings with inline editor formatting. */
:is(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    [role='heading'],
    [data-slot='card-title'],
    [data-slot='alert-title']
),
:is(
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        [role='heading'],
        [data-slot='card-title'],
        [data-slot='alert-title']
    )
    :where(a, span, strong, b, em) {
    font-family: var(--tg-font-heading, 'ABC Social', system-ui, sans-serif);
    font-weight: var(--tg-weight-heading, 500) !important;
}

body {
    font-family: var(--tg-font-body, 'ABC Social', system-ui, sans-serif);
    font-weight: var(--tg-weight-regular, 400);
    font-synthesis-weight: none;
}

/* Preserve emphasis semantics without introducing a third visual weight. */
strong,
b {
    font-weight: inherit;
}

/* Browsers make table headers and some controls bold by default. */
:where(
    button,
    input,
    select,
    textarea,
    label,
    legend,
    dt,
    th,
    caption,
    summary
) {
    font-family: inherit;
    font-weight: var(--tg-weight-regular, 400);
}

/* Button typography is shared by app controls and link-style calls to action. */
:is(
    button,
    [data-slot='button'],
    [role='button'],
    .button,
    .public-primary-button,
    .public-secondary-button,
    .marketing-button,
    .header-trial-status,
    input[type='button'],
    input[type='submit'],
    input[type='reset']
),
:is(button, [data-slot='button'], [role='button']) * {
    font-weight: var(--tg-weight-button) !important;
}
