:root {
    --type-body: 1rem;
    --type-meta: .875rem;
    --type-page: 1.5rem;
    --type-section: 1.25rem;
    --type-card: 1.125rem;
}

body.site-type {
    font-size: var(--type-body);
    line-height: 1.75;
    font-weight: 400;
    font-synthesis: none;
}

body.site-type :is(h1, h2, h3, h4, h5, h6) {
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: normal;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

body.site-type h1 { font-size: var(--type-page); }
body.site-type h2 { font-size: var(--type-section); }
body.site-type :is(h3, h4) { font-size: var(--type-card); }
body.site-type :is(h5, h6) { font-size: var(--type-body); }

body.site-type .text-sm {
    font-size: var(--type-body);
    line-height: 1.75;
}

body.site-type :is(.text-xs, small, .small) {
    font-size: var(--type-meta);
    line-height: 1.6;
}

body.site-type .font-light { font-weight: 400; }
body.site-type :is(.font-bold, .font-extrabold, .font-black) { font-weight: 600; }

body.site-type :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
    font-family: 'Sarabun', sans-serif;
    font-size: var(--type-body);
    font-weight: 400;
    line-height: 1.5;
}

body.site-type :is(label, th) {
    font-size: var(--type-meta);
    line-height: 1.6;
    font-weight: 600;
}

body.site-type label:has(input[type=checkbox]),
body.site-type label:has(input[type=radio]) {
    font-weight: 400;
}

body.site-type :is(nav, footer, table) .text-sm,
body.site-type.site-type-admin .text-sm {
    font-size: var(--type-meta);
    line-height: 1.6;
}

body.site-type nav { line-height: 1.6; }
body.site-type .site-header-nav > a,
body.site-type .site-header-nav button { padding-inline: .5rem; }
body.site-type :is(button, .btn) { line-height: 1.5; }
body.site-type :is(code, pre, .font-mono, .kpi-num) { font-variant-numeric: tabular-nums; }
body.site-type footer :is(h2, h3, h4, .footer-nav-heading) { font-size: 1rem; }

body.site-type .home-page :is(h2, .module-card-title) {
    font-weight: 600;
    line-height: 1.6;
}
body.site-type .home-page h2 { font-size: var(--type-section); }
body.site-type .home-page .module-card-title { font-size: var(--type-card); }

@media (min-width: 640px) {
    :root {
        --type-page: 1.75rem;
        --type-section: 1.375rem;
    }
}
