/* Legal document pages (privacy + terms + accessibility) — scoped to .page-privacy / .page-terms / .page-accessibility.
   Does not alter header, footer, or other pages. */

.page-privacy,
.page-terms,
.page-accessibility {
    --th-bg: #ffffff;
    --th-ink: #101828;
    --th-ink-soft: #1f2937;
    --th-muted: #5c6570;
    --th-navy: #0a1a3d;
    --th-accent: #1868c9;
    --th-line: #e3e8ef;
    --pv-read: 800px; /* centered reading column ~760–820 */
    --th-header-h: 68px;
    background: var(--th-bg);
    color: var(--th-ink);
    /* Explicit site stack — NOT inherit.
       .page-* is on <body>, so font-family:inherit would pull the UA default
       (Times New Roman) from <html> and override body { font-family: var(--ic-font) }. */
    font-family: var(--ic-font);
}

.page-privacy .pv-rail,
.page-terms .pv-rail,
.page-accessibility .pv-rail {
    width: min(100% - 3rem, var(--pv-read));
    max-width: var(--pv-read);
    margin-inline: auto;
}

/* —— Hero: white, no checkerboard, no fixed height —— */
.page-privacy .pv-hero,
.page-terms .pv-hero ,
.page-accessibility .pv-hero {
    background: #fff;
    padding-block: 40px 8px;
}

.page-privacy .pv-hero__eyebrow,
.page-terms .pv-hero__eyebrow ,
.page-accessibility .pv-hero__eyebrow {
    display: block;
    margin: 0 0 12px;
    font-family: var(--ic-font);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.4;
    color: var(--th-muted);
}

.page-privacy .pv-hero__title,
.page-terms .pv-hero__title ,
.page-accessibility .pv-hero__title {
    margin: 0 0 10px;
    font-family: var(--ic-font-display);
    font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.625rem); /* ~28–42; targets 38–44 desktop */
    font-weight: 700;
    line-height: 1.2;
    color: var(--th-navy);
    text-wrap: pretty;
    text-align: start;
    max-width: none;
}

.page-privacy .pv-hero__date,
.page-terms .pv-hero__date ,
.page-accessibility .pv-hero__date {
    margin: 0;
    font-family: var(--ic-font);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--th-muted);
    text-align: start;
}

/* —— Content: tight gap from hero —— */
.page-privacy .pv-content,
.page-terms .pv-content ,
.page-accessibility .pv-content {
    padding-block: 20px 64px;
    background: #fff;
}

.page-privacy .pv-body,
.page-terms .pv-body ,
.page-accessibility .pv-body {
    max-width: var(--pv-read);
    min-width: 0;
    text-align: start;
    unicode-bidi: plaintext;
    font-family: var(--ic-font);
}

.page-privacy .pv-body > *:first-child,
.page-terms .pv-body > *:first-child ,
.page-accessibility .pv-body > *:first-child {
    margin-top: 0;
}

.page-privacy .pv-body p,
.page-terms .pv-body p ,
.page-accessibility .pv-body p {
    margin: 0 0 1.15rem;
    font-family: var(--ic-font);
    font-size: 1.125rem; /* 18px */
    line-height: 1.7;
    color: var(--th-ink-soft);
    text-align: start;
    text-justify: auto;
    height: auto;
    max-height: none;
}

.page-privacy .pv-body h2,
.page-terms .pv-body h2 ,
.page-accessibility .pv-body h2 {
    margin: 2.25rem 0 0.85rem; /* ~36px before, ~13.6px after */
    font-family: var(--ic-font-display);
    font-size: clamp(1.4375rem, 1.2rem + 0.6vw, 1.5625rem); /* ~23–25 desktop */
    font-weight: 700;
    line-height: 1.3;
    color: var(--th-navy);
    text-align: start;
    height: auto;
    max-height: none;
    scroll-margin-top: calc(var(--th-header-h) + 16px);
}

.page-privacy .pv-body h2:first-child,
.page-terms .pv-body h2:first-child ,
.page-accessibility .pv-body h2:first-child {
    margin-top: 0;
}

.page-privacy .pv-body a,
.page-terms .pv-body a ,
.page-accessibility .pv-body a {
    color: var(--th-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-privacy .pv-body a:hover,
.page-terms .pv-body a:hover ,
.page-accessibility .pv-body a:hover {
    color: var(--th-navy);
}

.page-privacy .pv-body a:focus-visible,
.page-terms .pv-body a:focus-visible ,
.page-accessibility .pv-body a:focus-visible {
    outline: 2px solid var(--th-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.page-privacy .pv-body strong,
.page-privacy .pv-body b,
.page-terms .pv-body strong,
.page-terms .pv-body b ,
.page-accessibility .pv-body b {
    font-weight: 700;
    color: inherit;
}

/* Isolate LTR runs (emails, EN proper nouns) inside RTL body */
.page-privacy .pv-body [dir="ltr"],
.page-privacy .pv-body .ltr,
.page-terms .pv-body [dir="ltr"],
.page-terms .pv-body .ltr ,
.page-accessibility .pv-body .ltr {
    unicode-bidi: isolate;
    direction: ltr;
}

/* Kill leftover shared hero/article bleed if old classes appear */
.page-privacy .hero--compact::before,
.page-terms .hero--compact::before ,
.page-accessibility .hero--compact::before {
    display: none !important;
}
.page-privacy .section--raised,
.page-privacy .section--tight-top,
.page-terms .section--raised,
.page-terms .section--tight-top ,
.page-accessibility .section--tight-top {
    background: transparent;
}

/* —— Mobile —— */
@media (max-width: 720px) {
    .page-privacy,
    .page-terms {
        --pv-read: 100%;
    }

    .page-privacy .pv-rail,
    .page-terms .pv-rail,
    .page-accessibility .pv-rail {
        width: calc(100% - 2.75rem); /* ~22px each side → 20–24px */
        max-width: none;
    }

    .page-privacy .pv-hero,
    .page-terms .pv-hero {
        padding-block: 28px 4px;
    }

    .page-privacy .pv-hero__title,
    .page-terms .pv-hero__title {
        font-size: clamp(1.75rem, 5.5vw, 2rem); /* 28–32 */
    }

    .page-privacy .pv-hero__date,
    .page-terms .pv-hero__date {
        font-size: 0.875rem;
    }

    .page-privacy .pv-content,
    .page-terms .pv-content {
        padding-block: 16px 48px;
    }

    .page-privacy .pv-body p,
    .page-terms .pv-body p,
    .page-accessibility .pv-body p {
        font-size: 1.0625rem; /* 17px */
        line-height: 1.7;
        margin-bottom: 1.05rem;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .page-privacy .pv-body h2,
    .page-terms .pv-body h2 {
        font-size: clamp(1.25rem, 3.8vw, 1.4375rem); /* 20–23 */
        margin-top: 2rem; /* ~32px */
        margin-bottom: 0.75rem; /* ~12px */
    }
}

/* —— Print (legal document pages only; shared header/footer print unchanged) —— */
@media print {
    .page-privacy,
    .page-terms {
        background: #fff !important;
        color: #111 !important;
        font-family: var(--ic-font) !important;
    }

    .page-privacy .pv-hero,
    .page-privacy .pv-content,
    .page-terms .pv-hero,
    .page-terms .pv-content {
        background: #fff !important;
        padding-block: 0.5rem 1rem !important;
    }

    .page-privacy .pv-hero__title,
    .page-privacy .pv-body h2,
    .page-terms .pv-hero__title,
    .page-terms .pv-body h2,
    .page-accessibility .pv-hero__title,
    .page-accessibility .pv-body h2 {
        color: #0a1a3d !important;
        font-family: var(--ic-font-display) !important;
    }

    .page-privacy .pv-hero__date,
    .page-privacy .pv-hero__eyebrow,
    .page-terms .pv-hero__date,
    .page-terms .pv-hero__eyebrow,
    .page-accessibility .pv-hero__date,
    .page-accessibility .pv-hero__eyebrow {
        color: #444 !important;
    }

    .page-privacy .pv-body p,
    .page-terms .pv-body p {
        color: #222 !important;
        overflow: visible !important;
        max-height: none !important;
        font-family: var(--ic-font) !important;
    }

    .page-privacy .pv-rail,
    .page-terms .pv-rail {
        width: 100% !important;
        max-width: none !important;
    }

    .page-privacy .pv-body a,
    .page-terms .pv-body a,
    .page-accessibility .pv-body a {
        color: #1868c9 !important;
        text-decoration: underline !important;
    }
}
