/* Shared interface weights. Component styles use these tokens with fallbacks
   so embedded panels also keep the same hierarchy outside the main shell. */
:root {
    --ui-weight-regular: 400;
    --ui-weight-medium: 500;
    --ui-weight-strong: 600;
}

html :is(h1, h2, h3, h4, h5, h6) {
    font-weight: var(--ui-weight-medium);
}

html :is(b, strong) {
    font-weight: var(--ui-weight-strong);
}

html th {
    font-weight: var(--ui-weight-medium);
}

/* Existing templates and dynamic components use both utility libraries.
   The html prefix wins over library utilities loaded later by page templates. */
html .font-medium,
html .font-semibold,
html .fw-medium,
html .fw-semibold {
    font-weight: var(--ui-weight-medium) !important;
}

html .font-bold,
html .font-extrabold,
html .font-black,
html .fw-bold,
html .fw-bolder,
html .font-weight-bold,
html .font-weight-bolder {
    font-weight: var(--ui-weight-strong) !important;
}

html .font-normal,
html .fw-normal,
html .font-weight-normal {
    font-weight: var(--ui-weight-regular) !important;
}

/* The campaign editor runs in an embedded document with its own UI styles. */
body[data-campaign-admin] :is(button, label, summary) {
    font-weight: var(--ui-weight-medium);
}

body[data-campaign-admin] :is(.wordmark, .eyebrow, .badge, .reward-dialog summary) {
    font-weight: var(--ui-weight-strong);
}

body[data-campaign-admin] :is(.wordmark span, small, .help) {
    font-weight: var(--ui-weight-regular);
}
