/* Platform type sizes. Two sections, which behave differently.
 *
 * The heading classes: a heading written from now on takes one of these for its
 * size, chosen by its role; the tag gives only its level. No rule in that section
 * matches markup that exists today, so no existing heading changes: Bootstrap's
 * h1-h6 element sizes, .headline and styles.css:7389's modal title all stay.
 *
 * Bootstrap's secondary-text helpers, at the foot: small, .text-muted and
 * .form-text put on the tokens, so they do change markup that uses them today, by
 * a quarter pixel and a near-identical grey. Decided 28 Sep 2026.
 *
 * Linked from _Layout after bootstrap-v5.css and styles.css, so a rule here beats
 * theirs of the same weight on source order.
 *
 * Longhands, not the font shorthand: the shorthand would reset font-family, and a
 * heading takes the page's family, which Theme.cshtml sets per tenant and audience.
 * No colour and no margins either. A heading inherits its container's colour, so
 * one inside a dark or tenant-coloured panel stays readable; the layout it sits in
 * spaces it.
 *
 * A dialog title is an h2: styles.css:7389 styles .modal-header h3 and h4 at
 * (0,1,1), which beats a single class, and does not name h2.
 *
 * Rule: UI-RULES.md → rule 12. Reasoning: docs/ui/typography.html */

.sw-heading-xl {
    font-size: var(--sw-heading-xl-size);
    line-height: var(--sw-heading-xl-line);
    font-weight: var(--sw-heading-weight);
}

.sw-heading-lg {
    font-size: var(--sw-heading-lg-size);
    line-height: var(--sw-heading-lg-line);
    font-weight: var(--sw-heading-weight);
}

.sw-heading-md {
    font-size: var(--sw-heading-md-size);
    line-height: var(--sw-heading-md-line);
    font-weight: var(--sw-heading-weight);
}

.sw-heading-sm {
    font-size: var(--sw-heading-sm-size);
    line-height: var(--sw-heading-sm-line);
    font-weight: var(--sw-font-weight-bold);
}

/* ------------------------------------------- Bootstrap's secondary-text helpers
 * The three a view uses for secondary text, put on the tokens: Bootstrap 5.0.2
 * sizes small and .form-text at .875em, which lands off the scale, and colours
 * .text-muted and .form-text with its own grey. Only these generic helpers:
 * Bootstrap's heading-sized helpers (.h1-.h6, .fs-*, .lead) and its weights are
 * left as Bootstrap has them. .text-muted is an !important utility, so this is. */

small,
.small {
    font-size: var(--sw-font-size-xs);
}

/* A small inside a heading is a subtitle, so it keeps Bootstrap's relative size. */
:is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
    .sw-heading-xl, .sw-heading-lg, .sw-heading-md, .sw-heading-sm) :is(small, .small) {
    font-size: .875em;
}

.form-text {
    font-size: var(--sw-font-size-xs);
    color: var(--sw-text-subtle);
}

.text-muted {
    color: var(--sw-text-subtle) !important;
}

/* Bootstrap 5.1 added .fw-semibold; this is 5.0.2, so until now the class did
 * nothing. Defined the way later Bootstrap does, an !important 600, from the token. */
.fw-semibold {
    font-weight: var(--sw-font-weight-bold) !important;
}
