/**
 * Web for AI Platform Typography & Readability Foundation V1
 * Version: 0.9.57.18
 *
 * Keeps the established heading hierarchy while lifting everyday interface
 * copy, labels, controls and supporting text to more readable desktop sizes.
 * All rules are scoped to platform interface roots.
 */

:where(
  .wfa-beacon-platform-entry,
  .wfa-portal-shell,
  .wfa-dashboard-shell,
  .wfa-customer-dashboard,
  .wfa-business-dashboard,
  .wfa-specialist-dashboard,
  .wfa-business-overview-v1,
  .wfa-business-help-requests-v1,
  .wfa-business-projects-v1,
  .wfa-business-proposal-review,
  .wfa-specialist-projects,
  .wfa-specialist-marketplace-entry,
  .wfa-marketplace-eligibility,
  .wfa-shared-account-centre,
  .wfa-project-progress,
  .wfa-milestone-plan,
  .wfa-milestone-delivery,
  .wfa-simplified-project-delivery,
  .wfa-email-verification,
  .wfa-access-page,
  .wfa-auth-shell,
  .wfa-account-centre-shell,
  .wfa-audit-dashboard-v2,
  .wfa-audit-detail-dashboard,
  .wfa-audits-dashboard,
  .wfa-archive-dashboard,
  .wfa-beacon-login-shell,
  .wfa-beacon-business-signup,
  .wfa-beacon-specialist-signup,
  .wfa-beacon-business-verification,
  .wfa-beacon-verification-card,
  .wfa-beacon-specialist-welcome
) {
  --wfa-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wfa-text-base: 16px;
  --wfa-text-small: 14px;
  --wfa-text-label: 15px;
  --wfa-text-control: 16px;
  font-family: var(--wfa-font-family) !important;
  font-size: var(--wfa-text-base);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Ensure descendants which previously inherited a theme font stay on Inter. */
:where(
  .wfa-beacon-platform-entry,
  .wfa-portal-shell,
  .wfa-dashboard-shell,
  .wfa-customer-dashboard,
  .wfa-business-dashboard,
  .wfa-specialist-dashboard,
  .wfa-business-overview-v1,
  .wfa-business-help-requests-v1,
  .wfa-business-projects-v1,
  .wfa-business-proposal-review,
  .wfa-specialist-projects,
  .wfa-specialist-marketplace-entry,
  .wfa-marketplace-eligibility,
  .wfa-shared-account-centre,
  .wfa-project-progress,
  .wfa-milestone-plan,
  .wfa-milestone-delivery,
  .wfa-simplified-project-delivery,
  .wfa-email-verification,
  .wfa-access-page,
  .wfa-auth-shell,
  .wfa-account-centre-shell,
  .wfa-audit-dashboard-v2,
  .wfa-audit-detail-dashboard,
  .wfa-audits-dashboard,
  .wfa-archive-dashboard,
  .wfa-beacon-login-shell,
  .wfa-beacon-business-signup,
  .wfa-beacon-specialist-signup,
  .wfa-beacon-business-verification,
  .wfa-beacon-verification-card,
  .wfa-beacon-specialist-welcome
) :where(p, li, label, input, select, textarea, button, a, small, dt, dd, th, td) {
  font-family: var(--wfa-font-family) !important;
}

/* Everyday body and supporting copy. */
:where(
  .wfa-portal-shell,
  .wfa-dashboard-shell,
  .wfa-customer-dashboard,
  .wfa-business-dashboard,
  .wfa-specialist-dashboard,
  .wfa-business-overview-v1,
  .wfa-business-help-requests-v1,
  .wfa-business-projects-v1,
  .wfa-business-proposal-review,
  .wfa-specialist-projects,
  .wfa-specialist-marketplace-entry,
  .wfa-marketplace-eligibility,
  .wfa-shared-account-centre,
  .wfa-project-progress,
  .wfa-milestone-plan,
  .wfa-milestone-delivery,
  .wfa-simplified-project-delivery,
  .wfa-email-verification,
  .wfa-access-page,
  .wfa-auth-shell,
  .wfa-account-centre-shell,
  .wfa-audit-dashboard-v2,
  .wfa-audit-detail-dashboard,
  .wfa-audits-dashboard,
  .wfa-archive-dashboard,
  .wfa-beacon-login-shell,
  .wfa-beacon-business-signup,
  .wfa-beacon-specialist-signup,
  .wfa-beacon-business-verification,
  .wfa-beacon-verification-card,
  .wfa-beacon-specialist-welcome
) :where(p, li, dd, td) {
  font-size: var(--wfa-text-base) !important;
  line-height: 1.55;
}

/* Labels, navigation, table headings and compact links. */
:where(
  .wfa-portal-shell,
  .wfa-dashboard-shell,
  .wfa-customer-dashboard,
  .wfa-business-dashboard,
  .wfa-specialist-dashboard,
  .wfa-business-overview-v1,
  .wfa-business-help-requests-v1,
  .wfa-business-projects-v1,
  .wfa-business-proposal-review,
  .wfa-specialist-projects,
  .wfa-specialist-marketplace-entry,
  .wfa-marketplace-eligibility,
  .wfa-shared-account-centre,
  .wfa-project-progress,
  .wfa-milestone-plan,
  .wfa-milestone-delivery,
  .wfa-simplified-project-delivery,
  .wfa-email-verification,
  .wfa-access-page,
  .wfa-auth-shell,
  .wfa-account-centre-shell,
  .wfa-audit-dashboard-v2,
  .wfa-audit-detail-dashboard,
  .wfa-audits-dashboard,
  .wfa-archive-dashboard,
  .wfa-beacon-login-shell,
  .wfa-beacon-business-signup,
  .wfa-beacon-specialist-signup,
  .wfa-beacon-business-verification,
  .wfa-beacon-verification-card,
  .wfa-beacon-specialist-welcome
) :where(label, dt, th, nav a) {
  font-size: var(--wfa-text-label) !important;
  line-height: 1.4;
}

/* Small print remains visually secondary, but no longer falls to 11–12px. */
:where(
  .wfa-portal-shell,
  .wfa-dashboard-shell,
  .wfa-customer-dashboard,
  .wfa-business-dashboard,
  .wfa-specialist-dashboard,
  .wfa-business-overview-v1,
  .wfa-business-help-requests-v1,
  .wfa-business-projects-v1,
  .wfa-business-proposal-review,
  .wfa-specialist-projects,
  .wfa-specialist-marketplace-entry,
  .wfa-marketplace-eligibility,
  .wfa-shared-account-centre,
  .wfa-project-progress,
  .wfa-milestone-plan,
  .wfa-milestone-delivery,
  .wfa-simplified-project-delivery,
  .wfa-email-verification,
  .wfa-access-page,
  .wfa-auth-shell,
  .wfa-account-centre-shell,
  .wfa-audit-dashboard-v2,
  .wfa-audit-detail-dashboard,
  .wfa-audits-dashboard,
  .wfa-archive-dashboard,
  .wfa-beacon-login-shell,
  .wfa-beacon-business-signup,
  .wfa-beacon-specialist-signup,
  .wfa-beacon-business-verification,
  .wfa-beacon-verification-card,
  .wfa-beacon-specialist-welcome
) small {
  font-size: var(--wfa-text-small) !important;
  line-height: 1.5;
}

/* Inputs and actions should be comfortably readable and touch-friendly. */
:where(
  .wfa-portal-shell,
  .wfa-dashboard-shell,
  .wfa-customer-dashboard,
  .wfa-business-dashboard,
  .wfa-specialist-dashboard,
  .wfa-business-overview-v1,
  .wfa-business-help-requests-v1,
  .wfa-business-projects-v1,
  .wfa-business-proposal-review,
  .wfa-specialist-projects,
  .wfa-specialist-marketplace-entry,
  .wfa-marketplace-eligibility,
  .wfa-shared-account-centre,
  .wfa-project-progress,
  .wfa-milestone-plan,
  .wfa-milestone-delivery,
  .wfa-simplified-project-delivery,
  .wfa-email-verification,
  .wfa-access-page,
  .wfa-auth-shell,
  .wfa-account-centre-shell,
  .wfa-audit-dashboard-v2,
  .wfa-audit-detail-dashboard,
  .wfa-audits-dashboard,
  .wfa-archive-dashboard,
  .wfa-beacon-login-shell,
  .wfa-beacon-business-signup,
  .wfa-beacon-specialist-signup,
  .wfa-beacon-business-verification,
  .wfa-beacon-verification-card,
  .wfa-beacon-specialist-welcome
) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea, button, .button, [role="button"]) {
  font-size: var(--wfa-text-control) !important;
  line-height: 1.4;
}

/* Status pills and eyebrow text can stay compact, but never microscopic. */
:where(
  .wfa-portal-shell,
  .wfa-dashboard-shell,
  .wfa-customer-dashboard,
  .wfa-business-dashboard,
  .wfa-specialist-dashboard,
  .wfa-business-overview-v1,
  .wfa-business-help-requests-v1,
  .wfa-business-projects-v1,
  .wfa-business-proposal-review,
  .wfa-specialist-projects,
  .wfa-specialist-marketplace-entry,
  .wfa-marketplace-eligibility,
  .wfa-shared-account-centre,
  .wfa-project-progress,
  .wfa-milestone-plan,
  .wfa-milestone-delivery,
  .wfa-simplified-project-delivery
) :where([class*="status"], [class*="eyebrow"], [class*="badge"], [class*="meta"]) {
  font-size: max(14px, 0.875rem);
}

/* Keep the intentionally spacious public entry page hierarchy intact. */
.wfa-beacon-platform-entry {
  font-size: 17px;
}

@media (max-width: 700px) {
  :where(
    .wfa-portal-shell,
    .wfa-dashboard-shell,
    .wfa-customer-dashboard,
    .wfa-business-dashboard,
    .wfa-specialist-dashboard,
    .wfa-business-overview-v1,
    .wfa-business-help-requests-v1,
    .wfa-business-projects-v1,
    .wfa-business-proposal-review,
    .wfa-specialist-projects,
    .wfa-specialist-marketplace-entry,
    .wfa-marketplace-eligibility,
    .wfa-shared-account-centre,
    .wfa-project-progress,
    .wfa-milestone-plan,
    .wfa-milestone-delivery,
    .wfa-simplified-project-delivery,
    .wfa-email-verification,
    .wfa-access-page,
    .wfa-auth-shell,
  .wfa-account-centre-shell,
  .wfa-audit-dashboard-v2,
  .wfa-audit-detail-dashboard,
  .wfa-audits-dashboard,
  .wfa-archive-dashboard,
  .wfa-beacon-login-shell,
  .wfa-beacon-business-signup,
  .wfa-beacon-specialist-signup,
  .wfa-beacon-business-verification,
  .wfa-beacon-verification-card,
  .wfa-beacon-specialist-welcome
  ) {
    --wfa-text-base: 16px;
    --wfa-text-small: 14px;
    --wfa-text-label: 15px;
    --wfa-text-control: 16px;
  }
}
