/* Shared type hierarchy. Page themes own layout; this file owns heading rhythm. */
:root {
    --tf-font-sans: Arial, Helvetica, sans-serif;
    --tf-type-hero: clamp(38px, 4.4vw, 64px);
    --tf-type-display: clamp(48px, 5.8vw, 84px);
    --tf-type-section: clamp(28px, 2.9vw, 42px);
    --tf-type-card: clamp(21px, 1.8vw, 24px);
    --tf-type-panel: clamp(26px, 2.5vw, 34px);
}

body.tf-site { font-family: var(--tf-font-sans); }

/* Main-content scope keeps these rules authoritative over the older page themes
   without changing logo artwork, icon fonts, or technical evidence formatting. */
body.tf-site #main-content :is(h1,h2,h3,h4,h5,h6) {
    font-family: var(--tf-font-sans);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.02em;
    text-transform: none;
}
body.tf-site #main-content h1,
body.tf-site #main-content #report-title {
    font-size: var(--tf-type-hero);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.04em;
    text-wrap: balance;
}
body.tf-site #main-content h2 {
    font-size: var(--tf-type-section);
    line-height: 1.18;
    letter-spacing: -.03em;
    text-wrap: balance;
}
body.tf-site #main-content :is(.tf-page-intro,.hm-hero-intro) { line-height: 1.65; }

/* Marketing pages: consistent section and card sizes, with one display hero. */
body.tf-site #main-content .hm-hero h1 { font-size: var(--tf-type-display); line-height: 1.06; }
body.tf-site #main-content .hm-path h3 { font-size: clamp(24px, 2.2vw, 30px); }
body.tf-site #main-content .hm-process h2 { font-size: var(--tf-type-panel); }
body.tf-site #main-content .hm-steps h3 { font-size: 19px; }
body.tf-site #main-content .hm-deliverables h2 { max-width: none; }
body.tf-site #main-content :is(.hm-project-copy h3,.tf-editorial-grid h3) { font-size: var(--tf-type-card); }
body.tf-site #main-content .hm-delivery-list h3 { font-size: 21px; }
body.tf-site #main-content :is(.hm-people h3,.pm-about-people h2) {
    font-size: clamp(18px, 1.7vw, 23px);
    line-height: 1.3;
    letter-spacing: -.02em;
    text-wrap: initial;
}
body.tf-site #main-content .tf-catalogue-row h2 { font-size: clamp(22px, 2.1vw, 30px); line-height: 1.25; text-wrap: initial; }
body.tf-site #main-content .tf-catalogue-development h2 { font-size: var(--tf-type-panel); }
body.tf-site #main-content .tf-project-copy h3 { font-size: var(--tf-type-panel); }
body.tf-site #main-content :is(.tf-prose h3,.sc-scope-grid h3) { font-size: var(--tf-type-card); }

/* Forms and dashboards use the same family with a more compact hierarchy. */
body.tf-site #main-content :is(.tf-form-panel h2,.tf-tool-panel h2,.tf-dashboard h2) { font-size: var(--tf-type-panel); }
body.tf-site #main-content .tf-dash-split h2 { font-size: var(--tf-type-card); }
body.tf-site #main-content :is(.tf-dashboard h3,.tf-comp-card h3) { font-size: 22px; }
body.tf-site #main-content .tf-comp-header h2 { font-size: var(--tf-type-section); }
body.tf-site #main-content .tf-comp-cta-copy h3 { font-size: var(--tf-type-panel); }
body.tf-site #main-content .tf-dashboard h1 { font-size: clamp(36px, 4.2vw, 56px); }

/* Report titles and section labels retain their data-oriented hierarchy. */
body.tf-site #main-content #report-title { font-size: clamp(36px, 4.2vw, 56px); overflow-wrap: anywhere; }
body.tf-site #main-content :is(.sc-report h2,.tf-report h2,.tf-audit-progress h2) { font-size: var(--tf-type-panel); }
body.tf-site #main-content :is(.sc-measurements > h3,.tf-report-action h3,.tf-report-comparison h3,.tf-report-unlock-intro h3,.tf-report-next-step h3) {
    font-size: var(--tf-type-panel);
    line-height: 1.2;
    letter-spacing: -.025em;
}
body.tf-site #main-content :is(.sc-priority-title,.sc-all-observations h4,.sc-priority-map h3,.tf-audit-priority h4,.tf-report-improvement h4,.tf-report-next-step-list h4,.tf-report-public-positives h3) {
    font-family: var(--tf-font-sans);
    font-size: var(--tf-type-card);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.02em;
}
body.tf-site #main-content :is(.sc-report-metric h3,.tf-report-metric h3,.sc-report-alerts h3,.tf-audit-steps h3,.tf-dash-panel h4) { letter-spacing: 0; line-height: 1.4; }

/* Small numerical accents should support the content, not compete with titles. */
body.tf-site #main-content :is(.tf-number,.hm-steps li > span,.tf-dash-index,.sc-priority-number,.tf-report-step) {
    font-family: var(--tf-font-sans);
    font-weight: 500;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}
body.tf-site #main-content .tf-catalogue-row > .tf-number { font-size: 16px; }
body.tf-site #main-content .tf-editorial-grid .tf-number,
body.tf-site #main-content .hm-steps li > span { font-size: 22px; }

@media (max-width: 767px) {
    :root {
        --tf-type-hero: clamp(34px, 8.5vw, 44px);
        --tf-type-display: clamp(36px, 8.8vw, 48px);
        --tf-type-section: clamp(28px, 7vw, 34px);
        --tf-type-card: 21px;
        --tf-type-panel: 28px;
    }
    body.tf-site #main-content h1 { letter-spacing: -.035em; }
    body.tf-site #main-content :is(.hm-path h3,.tf-catalogue-row h2) { font-size: 24px; }
    body.tf-site #main-content .tf-catalogue-development h2 { font-size: 28px; }
    body.tf-site #main-content .hm-delivery-list h3 { font-size: 19px; }
    body.tf-site #main-content .tf-dashboard h1,
    body.tf-site #main-content #report-title { font-size: var(--tf-type-hero); }
    body.tf-site #main-content :is(.tf-report-metric h3,.sc-report-metric h3) { font-size: 12px; }
}
