:root {
    --reading-font: system-ui, "Segoe UI", sans-serif;
    --text-body: clamp(15px, 14px + .32vw, 18px);
    --text-detail: clamp(14px, 13px + .25vw, 16px);
    --text-caption: clamp(12px, 11px + .22vw, 14px);
    --text-section: clamp(21px, 17px + 1.1vw, 32px);
    --text-subhead: clamp(17px, 15px + .6vw, 23px);
    --text-secondary: #eee2f6;
    --text-amount: #ffe5b2;
}

/* Keep the existing scale of layout units and make reading sizes independent of it. */
body,
body.dice-demo {
    font-family: var(--reading-font);
    font-size: var(--text-body);
    line-height: 1.6;
}

small { font-size: var(--text-caption); }

.main-content :where(h1, h2, h3, h4, h5, h6) {
    line-height: 1.24;
    overflow-wrap: anywhere;
}

.main-content :where(h1) { font-size: clamp(26px, 20px + 1.95vw, 46px); }
.main-content :where(h2) { font-size: var(--text-section); }
.main-content :where(h3) { font-size: var(--text-subhead); }
.main-content :where(h4, h5, h6) { font-size: var(--text-detail); }

.main-content :where(p, dd, label) { line-height: 1.55; }
.main-content :where(p) { margin-block-end: .85em; }

.main-content :where(.blackjack-rules, .hilow-rules, .mines-rules, .plinko-rules, .poker-rules),
.legal-content :is(p, li),
.game-help-content {
    font-size: var(--text-body);
    line-height: 1.65;
}

.main-content :where(.blackjack-rules, .hilow-rules, .mines-rules, .plinko-rules, .poker-rules) { max-width: 72ch; }
.legal-content :is(p, li) { max-width: 72ch; }
.legal-content li + li { margin-block-start: .65em; }

.landing-page :is(.intro, .home-feature-copy > p:not(.eyebrow)),
.support-pages :is(.auth-card > p, .public-heading p:not(.eyebrow)) {
    font-size: var(--text-body);
    line-height: 1.65;
}

.landing-page :is(.game-card p, .game-note p, .steps p, .world-strip p:not(.eyebrow)) {
    font-size: var(--text-detail);
    line-height: 1.55;
}

.main-content :is(.slots-history-balances, .treasure-history-count, .games-count, .field-validation-error),
.support-pages :is(.auth-note, .support-note),
.history-page-summary {
    font-size: var(--text-caption);
    line-height: 1.5;
}

.table :is(td, th), .table-row { font-size: var(--text-detail); line-height: 1.45; }
.table > thead > tr > th { font-size: var(--text-caption); }
.table[data-table-layout="stacked"] [data-table-label]::before,
[data-responsive-row][data-table-layout="stacked"] > [data-table-label]::before {
    font-size: var(--text-caption);
}

.bb, .economy-card strong, .history-pagination, .oil-pump-warehouse { font-variant-numeric: tabular-nums; }

.ptc-toolbar {
    font-size: clamp(12px, 11px + .3vw, 14px);
    line-height: 1.45;
}

.ptc-info > div { font-size: var(--text-detail); }
