/* Public readability layer. Load after brand and page styles so compact
   component rules cannot shrink mobile instructions back to 8–12px. */
:root.tf-public-site {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Public pages use light cards, including checkout and account forms.
       A device or saved admin dark theme must not turn their labels white.
       Keep this boundary on the public root, rather than changing Tidy.UI's
       saved preferences or overriding text in intentionally dark panels. */
    color-scheme: light;
    color-scheme: only light;
    --tidy-bg: #f6f7f8;
    --tidy-surface: #ffffff;
    --tidy-surface-subtle: #f1f5f9;
    --tidy-surface-hover: #eaf0f4;
    --tidy-text: #18222b;
    --tidy-text-strong: #101820;
    --tidy-muted: #6b747c;
    --tidy-muted-soft: #929ba2;
    --tidy-border: #dce2e6;
    --tidy-border-strong: #cbd5dc;
    --tidy-primary: #3d6483;
    --tidy-primary-hover: #2e4e68;
    --tidy-primary-soft: #dbe7ef;
    --tidy-primary-contrast: #ffffff;
    --tidy-accent: #a84632;
    --tidy-accent-hover: #7f3326;
    --tidy-accent-soft: #f5dad4;
    --tidy-accent-muted: #df9182;
    --tidy-warning: #7a5300;
    --bs-primary: #3d6483;
    --bs-primary-rgb: 61, 100, 131;
    --bs-link-color: #3d6483;
    --bs-link-color-rgb: 61, 100, 131;
    --bs-link-hover-color: #2e4e68;
    --bs-link-hover-color-rgb: 46, 78, 104;
    --bs-body-bg: #f6f7f8;
    --bs-body-bg-rgb: 246, 247, 248;
    --bs-body-color: #18222b;
    --bs-body-color-rgb: 24, 34, 43;
    --bs-emphasis-color: #101820;
    --bs-emphasis-color-rgb: 16, 24, 32;
    --bs-secondary-color: #6b747c;
    --bs-secondary-color-rgb: 107, 116, 124;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;
    --bs-tertiary-color: #596579;
    --bs-tertiary-color-rgb: 89, 101, 121;
    --bs-tertiary-bg: #f1f5f9;
    --bs-tertiary-bg-rgb: 241, 245, 249;
    --bs-border-color: #dce2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, .175);
    --bs-warning: #7a5300;
    --bs-warning-rgb: 122, 83, 0;
    --bs-warning-text-emphasis: #5f4100;
    --bs-warning-bg-subtle: #fff4d6;
    --bs-warning-border-subtle: #e8cf8a;
    --bs-form-valid-color: #198754;
    --bs-form-valid-border-color: #198754;
    --bs-form-invalid-color: #dc3545;
    --bs-form-invalid-border-color: #dc3545;
}

.tf-public-site .form-select {
    /* Bootstrap otherwise uses a white arrow when data-bs-theme is dark. */
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Light surfaces need dark secondary text; dark panels have separate rules.
   Do not apply a blanket color to all paragraphs, spans, or headings. */
.tf-public-site .tf-confidence-grid small,
.tf-public-site .tf-checkout-price-chip small,
.tf-public-site .tf-price-chip-copy small,
.tf-public-site .tf-price-unit span,
.tf-public-site .tf-pricing-extra-label,
.tf-public-site .tf-use-index,
.tf-public-site .tf-section-header p,
.tf-public-site .tf-receive-price-matrix small,
.tf-public-site .tf-receive-plan-copy small,
.tf-public-site .tf-receive-confidence-grid small,
.tf-public-site .tf-receive-agency-note,
.tf-public-site .tf-receive-tiers-footnote,
.tf-public-site .tfd-count-pill,
.tf-public-site .tf-checkout-card .text-muted,
.tf-public-site .tf-checkout-card .form-text,
.tf-public-site .tf-addon-price-rows {
    color: #475569 !important;
}

.tf-public-site .tf-preview-id,
.tf-public-site .tf-preview-foot,
.tf-public-site .site-footer .footer-meta,
.tf-public-site .site-footer .footer-description {
    color: #cbd5e1 !important;
}

.tf-public-site .form-control::placeholder {
    color: #596579;
    opacity: 1;
}

/* Small but useful information has a readable floor on desktop too. */
.tf-public-site .tf-checkout-price-chip small,
.tf-public-site .tf-price-chip-copy small,
.tf-public-site .tf-confidence-grid small,
.tf-public-site .tf-preview-id,
.tf-public-site .tf-preview-foot,
.tf-public-site .tfd-count-pill,
.tf-public-site .tf-pricing-extra-label {
    font-size: .875rem !important;
    line-height: 1.5;
}

@media (max-width: 767.98px) {
    html.tf-public-site {
        font-size: 100%;
    }

    .tf-public-site main p,
    .tf-public-site .tf-checkout-card .tf-checkout-heading p {
        font-size: 1rem !important;
        line-height: 1.65 !important;
    }

    .tf-public-site main small,
    .tf-public-site main .small,
    .tf-public-site main .form-text,
    .tf-public-site .tf-checkout-card .form-text,
    .tf-public-site .tf-checkout-card .tf-upload-zone .small,
    .tf-public-site .tf-checkout-card .tf-step-label span:not(.tf-step-number),
    .tf-public-site .tf-checkout-card .tf-addon-toggle .small,
    .tf-public-site .tf-checkout-card .tf-addon-toggle .fw-semibold,
    .tf-public-site .tf-checkout-card .tf-price-summary,
    .tf-public-site .tf-checkout-card .tf-fax-retry-details,
    .tf-public-site .tf-fax-return-heading span,
    .tf-public-site .tf-fax-return-heading a,
    .tf-public-site .tf-addon-copy small,
    .tf-public-site .tf-addon-price,
    .tf-public-site .tf-addon-price-rows,
    .tf-public-site .tf-checkout-assurance,
    .tf-public-site .tf-checkout-assurance span,
    .tf-public-site .tf-privacy-note,
    .tf-public-site .tf-privacy-note span,
    .tf-public-site .tf-price-unit,
    .tf-public-site .tf-receive-service-description,
    .tf-public-site .tf-receive-service-billing,
    .tf-public-site .tf-receive-tier-status,
    .tf-public-site .tf-receive-service-rate,
    .tf-public-site .tfd-search-note,
    .tf-public-site .tfd-breadcrumbs,
    .tf-public-site .tfd-verified-pill,
    .tf-public-site .tfd-fax-label,
    .tf-public-site .tfd-card-link {
        font-size: .875rem !important;
        line-height: 1.5 !important;
    }

    .tf-public-site .form-control,
    .tf-public-site .form-select,
    .tf-public-site .tf-checkout-card .form-control,
    .tf-public-site .tf-checkout-card .form-select,
    .tf-public-site .tf-checkout-card .tf-fax-return-options select.form-select,
    .tf-public-site .tf-country-static,
    .tf-public-site .tf-country-static span,
    .tf-public-site .form-label,
    .tf-public-site .tf-field-label,
    .tf-public-site .tf-checkout-card .tf-step-label strong,
    .tf-public-site .tf-addon-copy strong,
    .tf-public-site .tf-checkout-card .tf-checkout-submit {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    .tf-public-site .form-control,
    .tf-public-site .form-select,
    .tf-public-site .tf-country-static {
        min-height: 48px !important;
    }

    .tf-public-site .tf-checkout-heading {
        flex-wrap: wrap;
    }

    .tf-public-site .tf-preview-foot,
    .tf-public-site .tf-checkout-assurance {
        flex-wrap: wrap;
        gap: .5rem .75rem;
    }

    .tf-public-site .tfd-count-pill,
    .tf-public-site .tfd-verified-pill,
    .tf-public-site .tfd-fax-label {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .tf-public-site .site-footer,
    .tf-public-site .site-footer .footer-meta {
        font-size: .875rem;
        line-height: 1.6;
    }
}
