/* ──────────────────────────────────────────────────────────────────────
   Unified Type System — www
   Strategy: hijack the existing --font-size-* tokens that minimal-modern,
   minimal-shared, main, and dashboard-page already use. Every rule in those
   files referencing var(--font-size-*) automatically picks up our values.
   For the few classes that hard-code font-size, we add explicit !important
   overrides below.
   Mobile-first: minimum readable sizes, bumped at tablet/desktop breakpoints.
   ────────────────────────────────────────────────────────────────────── */

:root {
    /* Mobile baseline */
    --font-size-xs:   0.78rem;   /* 12.5px — captions only */
    --font-size-sm:   0.86rem;   /* 13.8px */
    --font-size-base: 0.94rem;   /* 15px — body */
    --font-size-lg:   1.05rem;   /* 16.8px */
    --font-size-xl:   1.2rem;    /* 19.2px */
    --font-size-2xl:  1.4rem;    /* 22.4px */
    --font-size-3xl:  1.7rem;    /* 27.2px */
    --font-size-4xl:  2rem;      /* 32px */

    --t-line-tight:   1.25;
    --t-line-snug:    1.45;
    --t-line-body:    1.65;
}

/* ── Body baseline ────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }
body {
    font-size: var(--font-size-base) !important;
    line-height: var(--t-line-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ── Native heading defaults — guaranteed sizes ───────── */
body h1 { font-size: var(--font-size-3xl) !important; line-height: var(--t-line-tight); letter-spacing: -.02em; }
body h2 { font-size: var(--font-size-2xl) !important; line-height: var(--t-line-snug);  letter-spacing: -.015em; }
body h3 { font-size: var(--font-size-xl)  !important; line-height: var(--t-line-snug);  letter-spacing: -.01em; }
body h4 { font-size: var(--font-size-lg)  !important; line-height: var(--t-line-snug); }
body h5 { font-size: var(--font-size-base) !important; line-height: var(--t-line-snug); }

/* ── Body text ────────────────────────────────────────── */
body p,
body li,
body label {
    font-size: var(--font-size-base) !important;
    line-height: var(--t-line-body);
}

/* ── Hero classes (hard-coded clamps in minimal-modern) ── */
body .hero-title-minimal,
body .hero-title,
body .lo-title,
body .strategies-hero h1,
body .help-hero h1,
body .download-shell .hero h1,
body .pricing-shell .hero h1,
body .about-shell .hero h1 {
    font-size: clamp(1.55rem, 5vw, 2.4rem) !important;
    line-height: 1.18 !important;
    letter-spacing: -.025em;
}

body .hero-subtitle-minimal,
body .hero-subtitle,
body .lo-subtitle,
body .hero .lede {
    font-size: var(--font-size-base) !important;
    line-height: var(--t-line-body);
}

/* ── Section headers ──────────────────────────────────── */
body .section-title-minimal,
body .section-title,
body .help-title,
body .plan-title {
    font-size: var(--font-size-2xl) !important;
    line-height: var(--t-line-snug);
    letter-spacing: -.018em;
}
body .section-subtitle-minimal,
body .section-subtitle,
body .help-subtitle,
body .plan-subtitle {
    font-size: var(--font-size-base) !important;
    line-height: var(--t-line-body);
}

/* ── Feature / stat cards ─────────────────────────────── */
body .feature-title-minimal,
body .feature-title,
body .quick-link-title { font-size: var(--font-size-lg) !important; }
body .feature-description-minimal,
body .feature-description { font-size: var(--font-size-sm) !important; line-height: var(--t-line-body); }
body .stat-value-minimal,
body .stat-value { font-size: var(--font-size-2xl) !important; line-height: 1.1; }
body .stat-label-minimal,
body .stat-label { font-size: var(--font-size-sm) !important; }

/* ── CTA / footer ─────────────────────────────────────── */
body .cta-title-minimal { font-size: var(--font-size-3xl) !important; line-height: var(--t-line-snug); }
body .cta-description-minimal { font-size: var(--font-size-base) !important; line-height: var(--t-line-body); }
body .footer-title { font-size: var(--font-size-sm) !important; }
body .footer-link-minimal,
body .footer-links a,
body .footer-copyright,
body .footer-company-info,
body .footer-company-info p { font-size: var(--font-size-sm) !important; }

/* ── Buttons / nav ────────────────────────────────────── */
body .btn-minimal,
body .btn,
body .btn-ice,
body .btn-ice-ghost,
body .btn-tier,
body .lo-btn,
body button,
body input[type="submit"],
body input[type="button"] {
    font-size: var(--font-size-sm) !important;
    line-height: 1.2;
}
body .btn-minimal.btn-sm,
body .btn-sm { font-size: var(--font-size-xs) !important; }

body .nav-link-minimal,
body .nav-link {
    font-size: var(--font-size-sm) !important;
}

/* Hero badge / eyebrow chips */
body .hero-badge,
body .hero-eyebrow,
body .lo-eyebrow,
body .st-eyebrow,
body .help-eyebrow,
body .section-eyebrow {
    font-size: var(--font-size-xs) !important;
    letter-spacing: .14em;
}

/* ── Forms ────────────────────────────────────────────── */
body input,
body select,
body textarea {
    font-size: var(--font-size-base) !important;
}
/* iOS: input ≥16px to prevent auto-zoom */
@media (max-width: 640px) {
    body input[type="text"],
    body input[type="email"],
    body input[type="password"],
    body input[type="number"],
    body input[type="search"],
    body select,
    body textarea {
        font-size: 16px !important;
    }
}
body .form-label { font-size: var(--font-size-sm) !important; }

/* ── Pricing tier card ────────────────────────────────── */
body .tier-name { font-size: var(--font-size-lg) !important; }
body .tier-tagline { font-size: var(--font-size-sm) !important; line-height: var(--t-line-body); }
body .tier-tag { font-size: var(--font-size-xs) !important; letter-spacing: .14em; }
body .price-now { font-size: var(--font-size-2xl) !important; line-height: 1.1; }
body .price-strike { font-size: var(--font-size-sm) !important; }
body .price-discount { font-size: var(--font-size-xs) !important; letter-spacing: .04em; }
body .tier-feats li,
body .tier-meta .row,
body .tier-meta .label,
body .tier-meta .val { font-size: var(--font-size-sm) !important; }
body .btn-tier { font-size: var(--font-size-sm) !important; }

/* ── Tables ───────────────────────────────────────────── */
body table,
body table.matrix,
body table.table { font-size: var(--font-size-sm) !important; }
body table th { font-size: var(--font-size-xs) !important; letter-spacing: .06em; }

/* ── Tablet bump (≥640px) ─────────────────────────────── */
@media (min-width: 640px) {
    :root {
        --font-size-xs:   0.78rem;
        --font-size-sm:   0.88rem;
        --font-size-base: 0.96rem;
        --font-size-lg:   1.08rem;
        --font-size-xl:   1.22rem;
        --font-size-2xl:  1.5rem;
        --font-size-3xl:  1.85rem;
        --font-size-4xl:  2.3rem;
    }
}

/* ── Desktop bump (≥1024px) ───────────────────────────── */
@media (min-width: 1024px) {
    :root {
        --font-size-xs:   0.78rem;
        --font-size-sm:   0.9rem;
        --font-size-base: 1rem;        /* 16px true desktop body */
        --font-size-lg:   1.12rem;
        --font-size-xl:   1.25rem;
        --font-size-2xl:  1.6rem;
        --font-size-3xl:  2rem;
        --font-size-4xl:  2.55rem;
    }
}

/* ── Small mobile (≤380px) — keep readable, never go below ── */
@media (max-width: 380px) {
    :root {
        --font-size-base: 0.92rem;
        --font-size-3xl:  1.55rem;
        --font-size-4xl:  1.9rem;
    }
    body .hero-title-minimal,
    body .hero-title,
    body .lo-title { font-size: clamp(1.45rem, 7vw, 1.8rem) !important; }
}
