/*
 * PhysioPH visual refinement
 *
 * This file is intentionally loaded after page-level styles. It aligns legacy
 * and feature-specific components with the shared solid-color healthcare
 * design language without changing their markup or behavior.
 */

:root {
  --pg-primary: #176b67;
  --pg-primary-hover: #115652;
  --pg-primary-soft: #e8f3f1;
  --pg-secondary: #344b53;
  --pg-accent: #4e8f89;
  --pg-mint: #e8f5ee;
  --pg-lilac: #eef2f3;
  --pg-coral: #f8eeee;
  --pg-warning: #9a6700;
  --pg-danger: #b42336;
  --pg-success: #26734d;
  --pg-info: #246b81;
  --pg-ink: #172d35;
  --pg-muted: #60727a;
  --pg-border: #dce4e5;
  --pg-border-strong: #c7d3d5;
  --pg-surface: #ffffff;
  --pg-background: #f5f7f7;
  --pg-surface-subtle: #f8fafa;
  --pg-radius-sm: 0.5rem;
  --pg-radius: 0.75rem;
  --pg-radius-lg: 0.875rem;
  --pg-shadow-sm: none;
  --pg-shadow: 0 0.75rem 2rem rgb(23 45 53 / 8%);
  --bs-primary: var(--pg-primary);
  --bs-primary-rgb: 23, 107, 103;
  --bs-body-color: var(--pg-ink);
  --bs-body-bg: var(--pg-background);
  --bs-border-color: var(--pg-border);
  --bs-link-color: var(--pg-primary);
  --bs-link-hover-color: var(--pg-primary-hover);
}

body {
  color: var(--pg-ink);
  background: var(--pg-background);
  font-family: Inter, "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--pg-font-size-body);
  line-height: var(--pg-line-height-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--pg-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--pg-font-size-page-title);
}

h2 {
  font-size: var(--pg-font-size-section-title);
}

:focus-visible {
  outline-color: #c2820b !important;
}

.text-muted {
  color: var(--pg-muted) !important;
}

.site-header,
.onboarding-header,
.dashboard-header {
  border-color: var(--pg-border);
  background: var(--pg-surface);
  backdrop-filter: none;
}

.site-header .navbar {
  min-height: 4.5rem;
}

.brand-mark {
  border-radius: var(--pg-radius-sm);
  background: var(--pg-primary);
}

.brand-tagline {
  color: var(--pg-muted);
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible {
  background: var(--pg-primary-soft);
}

.site-footer,
.onboarding-footer {
  border-color: var(--pg-border);
  background: var(--pg-surface);
}

/* Actions */
.btn {
  min-height: 2.75rem;
  border-radius: var(--pg-radius-sm);
  font-size: var(--pg-font-size-button);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-tight);
  letter-spacing: -0.005em;
  box-shadow: none !important;
}

.btn-lg {
  min-height: 3rem;
  border-radius: 0.625rem;
}

.btn-primary {
  --bs-btn-bg: var(--pg-primary);
  --bs-btn-border-color: var(--pg-primary);
  --bs-btn-hover-bg: var(--pg-primary-hover);
  --bs-btn-hover-border-color: var(--pg-primary-hover);
  --bs-btn-active-bg: var(--pg-primary-hover);
  --bs-btn-active-border-color: var(--pg-primary-hover);
}

.btn-outline-primary {
  --bs-btn-color: var(--pg-primary);
  --bs-btn-border-color: #79a9a5;
  --bs-btn-hover-color: var(--pg-primary-hover);
  --bs-btn-hover-bg: var(--pg-primary-soft);
  --bs-btn-hover-border-color: var(--pg-primary);
  --bs-btn-active-color: var(--pg-primary-hover);
  --bs-btn-active-bg: var(--pg-primary-soft);
}

.btn-outline-secondary {
  --bs-btn-color: var(--pg-secondary);
  --bs-btn-border-color: var(--pg-border-strong);
  --bs-btn-hover-color: var(--pg-ink);
  --bs-btn-hover-bg: #eef2f2;
  --bs-btn-hover-border-color: #aebfc1;
}

.btn-outline-danger {
  --bs-btn-color: var(--pg-danger);
  --bs-btn-border-color: #dfabb3;
  --bs-btn-hover-bg: var(--pg-danger);
  --bs-btn-hover-border-color: var(--pg-danger);
}

/* Surfaces and information hierarchy */
.card,
.dashboard-card,
.metric-card,
.feature-card,
.state-card,
.care-preview,
.therapist-directory-card,
.marketplace-card,
.marketplace-filter-panel .offcanvas-body,
.therapist-profile-hero,
.therapist-profile-section,
.therapist-verification-card,
.verification-card,
.booking-list-card,
.booking-panel,
.appointment-details-card,
.appointment-history-card,
.schedule-card,
.rehab-card,
.rehab-program-card,
.rehab-template-card,
.rehab-exercise-card,
.rehab-activity-card,
.rehab-progress-card,
.progress-panel,
.progress-clinical-tools,
.therapist-progress-card,
.caregiver-panel,
.caregiver-access-card,
.caregiver-patient-card,
.caregiver-invitation-card,
.caregiver-registration-card,
.messaging-conversation-list,
.messaging-start-panel,
.messaging-thread,
.messaging-composer,
.payment-card,
.payment-panel,
.payment-detail-hero,
.payment-reconciliation,
.payment-empty,
.analytics-section,
.analytics-filters,
.analytics-metrics article,
.analytics-rate-grid article {
  border-color: var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  box-shadow: none;
}

.card-header,
.dashboard-card-header {
  border-color: var(--pg-border);
  background: var(--pg-surface-subtle);
}

.metric-card-primary,
.metric-card-mint,
.metric-card-coral,
.metric-card-lilac,
.analytics-metrics article:first-child {
  border-color: var(--pg-border);
  background: var(--pg-surface);
}

.metric-icon,
.metric-card-mint .metric-icon,
.metric-card-coral .metric-icon,
.metric-card-lilac .metric-icon,
.feature-icon,
.feature-icon-mint,
.feature-icon-lilac,
.state-icon,
.empty-state-icon,
.rehab-heading-icon,
.caregiver-heading-icon,
.booking-section-heading > span,
.schedule-card > header > span {
  color: var(--pg-primary);
  background: var(--pg-primary-soft);
}

.care-plan-card,
.public-profile-hero,
.caregiver-invitation-page,
.messaging-thread,
.payment-detail-hero,
.analytics-section-attention {
  background: var(--pg-surface);
}

.care-plan-card::after,
.public-profile-hero::after,
.therapist-profile-page::before,
.therapist-verification-card::after {
  display: none;
}

.empty-state,
.booking-empty,
.rehab-empty,
.caregiver-empty,
.messaging-empty,
.marketplace-empty,
.therapist-directory-empty,
.analytics-empty {
  border-color: var(--pg-border);
  background: var(--pg-surface-subtle);
  box-shadow: none;
}

/* Forms */
.form-label,
fieldset legend {
  color: var(--pg-ink);
  font-weight: 650;
}

.form-control,
.form-select,
.input-group-text,
.marketplace-filter-field select,
.marketplace-filter-field input,
.marketplace-sort select {
  min-height: 2.875rem;
  border-color: var(--pg-border-strong);
  border-radius: var(--pg-radius-sm);
  color: var(--pg-ink);
  background-color: var(--pg-surface);
}

.form-control:hover,
.form-select:hover,
.marketplace-filter-field select:hover,
.marketplace-filter-field input:hover,
.marketplace-sort select:hover {
  border-color: #91a8aa;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.marketplace-filter-field select:focus,
.marketplace-filter-field input:focus,
.marketplace-sort select:focus {
  border-color: var(--pg-primary);
  box-shadow: 0 0 0 0.2rem rgb(23 107 103 / 14%);
}

.form-check-input:checked {
  border-color: var(--pg-primary);
  background-color: var(--pg-primary);
}

.field-validation,
.text-danger {
  color: var(--pg-danger) !important;
}

/* Alerts and statuses */
.alert {
  border-width: 1px;
  border-left-width: 0.25rem;
  border-radius: var(--pg-radius-sm);
  background-image: none;
  box-shadow: none;
}

.alert-success {
  --bs-alert-color: #195b3c;
  --bs-alert-bg: #edf7f1;
  --bs-alert-border-color: #9dcdb1;
}

.alert-warning {
  --bs-alert-color: #6f4a00;
  --bs-alert-bg: #fff8e8;
  --bs-alert-border-color: #e4c675;
}

.alert-danger {
  --bs-alert-color: #7d1f2e;
  --bs-alert-bg: #fff2f3;
  --bs-alert-border-color: #e4aeb7;
}

.alert-info,
.alert-light {
  --bs-alert-color: #285864;
  --bs-alert-bg: #eff6f7;
  --bs-alert-border-color: #b8d1d6;
}

.badge,
.status-pill,
.payment-status,
.verification-status,
.marketplace-verified,
.therapist-directory-verified {
  border-radius: 999px;
  font-weight: 700;
}

.text-bg-light,
.badge.bg-light {
  border: 1px solid var(--pg-border);
  color: var(--pg-secondary) !important;
  background: #f1f4f4 !important;
}

.status-success,
.payment-status-paid,
.payment-status-refunded {
  color: var(--pg-success);
  background: var(--pg-mint);
}

/* Tables */
.table-responsive,
.responsive-table-wrap,
.analytics-table {
  border-color: var(--pg-border);
  border-radius: var(--pg-radius-sm);
  background: var(--pg-surface);
  box-shadow: none;
}

.table thead th,
.responsive-table th,
.analytics-table th {
  border-color: var(--pg-border);
  color: var(--pg-muted);
  background: #f1f4f4;
  font-size: var(--pg-font-size-caption);
  letter-spacing: 0.01em;
  text-transform: none;
}

.table tbody tr:hover > *,
.analytics-table tbody tr:hover > * {
  background: #f8fafa;
}

/* Public landing and discovery */
.hero-section,
.therapist-directory-page,
.marketplace-page,
.therapist-profile-page,
.auth-panel {
  background: var(--pg-background);
}

.hero-section {
  padding-block: clamp(3rem, 8vw, 6rem);
  border-bottom: 1px solid var(--pg-border);
}

.hero-visual {
  min-height: 20rem;
}

.care-preview {
  border-color: var(--pg-border-strong);
}

.care-preview-grid > div,
.therapist-profile-facts > div,
.therapist-profile-services li {
  border-color: var(--pg-border);
  background: var(--pg-surface-subtle);
}

.progress-bar,
.care-plan-card .progress-bar,
.rehab-progress-fill {
  background: var(--pg-primary);
}

.feature-card:hover,
.therapist-directory-card:hover,
.marketplace-card:hover {
  border-color: #a9bfbe;
  box-shadow: none;
  transform: none;
}

.therapist-directory-trust {
  border-color: #115652;
  background: #124f4d;
  box-shadow: none;
}

.therapist-directory-trust::after {
  display: none;
}

.marketplace-query-control,
.marketplace-search-bar,
.marketplace-filter-panel {
  border-color: var(--pg-border-strong);
  box-shadow: none;
}

.marketplace-filter-group label > span,
.therapist-profile-modes span,
.marketplace-mode-list span {
  border-color: var(--pg-border);
  color: var(--pg-secondary);
  background: var(--pg-surface-subtle);
}

.marketplace-filter-group input:checked + span {
  border-color: var(--pg-primary);
  color: var(--pg-primary-hover);
  background: var(--pg-primary-soft);
}

.therapist-profile-hero::before {
  height: 0.25rem;
  background: var(--pg-primary);
}

.therapist-profile-photo-frame,
.therapist-verification-mark {
  border-color: var(--pg-border-strong);
  background: var(--pg-surface);
  box-shadow: none;
}

.therapist-verification-mark {
  color: #fff;
  background: var(--pg-primary);
}

.therapist-profile-section-icon,
.therapist-verification-mark,
.therapist-profile-section-icon-mint {
  color: var(--pg-primary);
  background: var(--pg-primary-soft);
}

.therapist-verification-mark {
  color: #fff;
  background: var(--pg-primary);
}

/* Authentication and onboarding */
.auth-body,
.auth-panel {
  background: var(--pg-surface);
}

.auth-story {
  background: #143f46;
}

.auth-help,
.verification-steps,
.verification-document,
.verification-option {
  border-color: var(--pg-border);
  background: var(--pg-surface-subtle);
}

.verification-card-header {
  border-color: var(--pg-border);
  background: var(--pg-surface-subtle);
}

/* Authenticated workspace */
.dashboard-body,
.dashboard-page,
.analytics-page,
.booking-page,
.rehab-page,
.caregiver-page,
.messaging-page,
.payment-page {
  background: var(--pg-background);
}

.dashboard-header {
  box-shadow: none;
}

.care-context,
.dashboard-icon-button,
.user-avatar,
.dashboard-account-menu {
  border-color: var(--pg-border);
  background: var(--pg-surface);
}

.dashboard-nav {
  border-color: #244a4f;
  background: #17383d;
  box-shadow: none;
}

.dashboard-nav-list > li > a,
.dashboard-more > summary {
  color: rgb(255 255 255 / 72%);
}

.dashboard-nav-list > li > a.active,
.dashboard-nav-list > li > a:hover,
.dashboard-more[open] > summary,
.dashboard-more > summary:hover {
  color: #fff;
}

.dashboard-nav-list > li > a.active .nav-icon,
.dashboard-nav-list > li > a:hover .nav-icon,
.dashboard-more[open] > summary .nav-icon,
.dashboard-more > summary:hover .nav-icon {
  color: #fff;
  background: rgb(255 255 255 / 12%);
}

.dashboard-page {
  padding-block: 1.25rem 2rem;
}

.dashboard-page-header {
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-page-header p {
  max-width: 44rem;
  color: var(--pg-muted);
}

.analytics-section-primary,
.analytics-section-attention {
  border-top-width: 1px;
}

.analytics-section-attention {
  border-left: 0.25rem solid var(--pg-warning);
}

.analytics-metrics article,
.analytics-rate-grid article,
.caregiver-progress-grid article {
  background: var(--pg-surface);
}

.messaging-thread-page,
.caregiver-invitation-page,
.public-profile-page {
  background: var(--pg-background);
}

.messaging-message.is-own article {
  color: #fff;
}

.messaging-message.is-other article {
  border: 1px solid var(--pg-border);
  background: var(--pg-surface-subtle);
}

.payment-detail-hero,
.caregiver-invitation-card {
  background-image: none;
}

.payment-reconciliation > header > span,
.rehab-video-badge,
.rehab-template-label,
.caregiver-count,
.messaging-unread-total,
.messaging-unread-badge {
  color: var(--pg-primary);
  background: var(--pg-primary-soft);
}

.rehab-activity-card.is-recorded {
  box-shadow: inset 0.2rem 0 0 var(--pg-success);
}

.physio-sticky-book {
  border-color: var(--pg-border);
  background: var(--pg-surface);
  box-shadow: 0 -0.5rem 1.5rem rgb(23 45 53 / 8%);
}

@media (max-width: 47.99rem) {
  .container,
  .dashboard-container,
  .dashboard-page {
    width: min(100% - 1.25rem, var(--pg-content));
  }

  .site-header .navbar-collapse {
    padding: 0.75rem 0 0.25rem;
  }

  .site-header .navbar-nav .btn {
    width: 100%;
  }

  .hero-section,
  .section-space {
    padding-block: 2.5rem;
  }

  .hero-visual {
    min-height: auto;
    padding: 0;
  }

  .marketplace-heading h1,
  .therapist-profile-identity h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  .marketplace-filter-panel {
    border-radius: 1rem 1rem 0 0;
  }

  .dashboard-page-header .btn,
  .dashboard-page-actions,
  .dashboard-page-actions .btn {
    width: 100%;
  }

  .dashboard-page-header {
    align-items: stretch;
  }

  .card-body,
  .dashboard-card-body,
  .analytics-section,
  .booking-panel,
  .rehab-card,
  .caregiver-panel,
  .payment-panel {
    padding: 0.875rem;
  }

  .analytics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .therapist-profile-highlights > div {
    padding-inline: 0.125rem;
  }
}

@media (min-width: 48rem) {
  .marketplace-search-bar {
    border-color: var(--pg-border-strong);
    background: var(--pg-surface);
  }

  .dashboard-page {
    padding-block: 1.75rem 3rem;
  }
}

@media (min-width: 62rem) {
  .dashboard-nav {
    border-color: #244a4f;
    border-radius: 0;
  }

  .dashboard-nav-list a:hover,
  .dashboard-nav-list a.active {
    background: rgb(255 255 255 / 9%);
  }

  .dashboard-nav-list > li > a.active .nav-icon,
  .dashboard-nav-list > li > a:hover .nav-icon,
  .dashboard-more[open] > summary .nav-icon,
  .dashboard-more > summary:hover .nav-icon {
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Responsive typography
 *
 * This final shared layer deliberately normalizes type after feature styles.
 * Small UI copy stays stable; only headings and metrics scale fluidly.
 */
body {
  font-size: var(--pg-font-size-body);
  font-weight: var(--pg-font-weight-regular);
  line-height: var(--pg-line-height-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  max-width: 100%;
  margin-top: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h1,
.h1,
.dashboard-page-header h1,
.marketplace-heading h1,
.therapist-profile-identity h1,
.analytics-heading h1,
.auth-copy h1,
.onboarding-title {
  font-size: var(--pg-font-size-page-title);
  font-weight: var(--pg-font-weight-bold);
  line-height: 1.15;
}

.hero-title,
.hero-copy h1,
.therapist-directory-intro h1 {
  font-size: var(--pg-font-size-hero-title);
  line-height: var(--pg-line-height-display);
}

h2,
.h2,
.section-heading,
.admin-section-heading h2,
.analytics-section-heading h2,
.booking-section-heading h2,
.caregiver-panel-heading h2,
.messaging-section-heading h2,
.payment-card-heading h2,
.progress-panel-heading h2,
.rehab-card-heading h2,
.therapist-profile-section-heading h2 {
  font-size: var(--pg-font-size-section-title);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-tight);
}

h3,
.h3 {
  font-size: var(--pg-font-size-card-title);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-card-title);
}

h4,
.h4 {
  font-size: var(--pg-font-size-body);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-card-title);
}

h5,
h6,
.h5,
.h6 {
  font-size: var(--pg-font-size-secondary);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-metadata);
}

.card-title,
.card h2,
.dashboard-card h2,
.card-header h2,
.card-header h3,
.card-header h4,
.dashboard-card-header h2,
.dashboard-card-header h3,
.feature-card h3,
.marketplace-card h2,
.therapist-directory-card-heading h3,
.booking-list-heading h2,
.caregiver-list-heading h2,
.messaging-conversation-title,
.payment-card-heading h3,
.profile-section-title,
.rehab-activity-heading h2,
.rehab-exercise-title,
.rehab-list-heading h2 {
  font-size: var(--pg-font-size-card-title);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-card-title);
}

.metric-value,
.analytics-hero-metric strong,
.analytics-metrics article > strong,
.analytics-rate-grid article > strong,
.admin-revenue-summary strong,
.patient-summary-metrics strong,
.payment-summary-grid strong,
.progress-metric-grid strong,
.rehab-progress-metrics strong {
  font-size: var(--pg-font-size-metric);
  font-weight: var(--pg-font-weight-bold);
  line-height: var(--pg-line-height-display);
}

p,
li,
dd {
  line-height: var(--pg-line-height-normal);
}

.text-secondary,
.secondary-text,
.dashboard-page-header p,
.marketplace-heading p,
.therapist-directory-summary,
.therapist-profile-summary,
.profile-summary,
.schedule-empty-copy {
  font-size: var(--pg-font-size-secondary);
  font-weight: var(--pg-font-weight-regular);
  line-height: var(--pg-line-height-normal);
}

small,
.small,
.caption,
.metric-caption,
.metric-label,
.booking-list-meta,
.caregiver-access-meta,
.profile-completion-meta,
.rehab-program-meta,
.rehab-progress-card-meta,
.verification-document-meta,
.progress-history-status,
.payment-label {
  font-size: var(--pg-font-size-caption);
  line-height: var(--pg-line-height-metadata);
}

.form-text,
.optional-label,
.eyebrow,
.brand-tagline {
  font-size: var(--pg-font-size-xs);
  line-height: var(--pg-line-height-metadata);
}

.form-label,
fieldset legend {
  font-size: var(--pg-font-size-secondary);
  font-weight: var(--pg-font-weight-medium);
  line-height: var(--pg-line-height-metadata);
}

.form-control,
.form-select,
.input-group-text,
.marketplace-filter-field select,
.marketplace-filter-field input,
.marketplace-sort select,
textarea,
input,
select {
  font-size: var(--pg-font-size-control);
  line-height: var(--pg-line-height-control);
}

.field-validation,
.invalid-feedback,
.validation-summary-errors,
.text-danger {
  font-size: var(--pg-font-size-caption);
  line-height: var(--pg-line-height-metadata);
}

.btn.btn,
button,
[role="button"] {
  font-size: var(--pg-font-size-button);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-tight);
}

.site-header .nav-link,
.dashboard-nav-list > li > a,
.dashboard-more > summary,
.dashboard-desktop-nav-item,
.admin-navigation a,
.admin-mobile-navigation summary,
.admin-mobile-navigation a,
.therapist-profile-nav a {
  font-size: var(--pg-font-size-nav);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-metadata);
}

/* Legacy feature selectors that previously rendered readable text below 12px. */
.therapist-directory-specialty,
.therapist-directory-facts dt,
.therapist-directory-facts dd,
.marketplace-filter-count,
.marketplace-card-specialty,
.marketplace-mode-list span,
.therapist-profile-modes span,
.marketplace-card-facts dt,
.marketplace-card-facts dd,
.marketplace-rating small,
.marketplace-page-link,
.therapist-profile-photo-badge,
.therapist-profile-highlights dt,
.therapist-profile-facts dt,
.therapist-profile-safety-note,
.verification-steps li,
.analytics-range,
.analytics-metrics span,
.analytics-metrics small,
.analytics-breakdown,
.analytics-volume-list time,
.booking-list-date span,
.booking-list-heading p,
.booking-payment-note div,
.appointment-detail-list dt,
.appointment-history-card p,
.appointment-history-card small,
.schedule-clinic-address small,
.caregiver-permissions > p,
.caregiver-count,
.caregiver-access-card header p,
.caregiver-access-meta dt,
.caregiver-permission-editor summary,
.caregiver-patient-copy p,
.caregiver-back-link,
.caregiver-progress-grid span,
.caregiver-progress-grid small,
.caregiver-progress-note small,
.caregiver-invitation-details span,
.caregiver-invitation-details strong,
.caregiver-invitation-permissions li,
.user-greeting,
.care-context,
.metric-label,
.metric-caption,
.therapist-meta,
.therapist-availability,
.post-time,
.table-mobile-cards td::before,
.dashboard-nav-brand .brand-tagline,
.dashboard-nav-list .dashboard-nav-section,
.messaging-unread-total,
.messaging-conversation-title time,
.messaging-conversation-copy small,
.messaging-preview,
.messaging-empty p,
.messaging-candidate small,
.messaging-privacy-note p,
.messaging-thread-title p,
.messaging-message header strong,
.messaging-message header span,
.messaging-message footer,
.messaging-image-attachment,
.messaging-file-attachment strong,
.messaging-file-attachment small,
.messaging-composer-actions > small,
.payment-card-facts dt,
.payment-summary-grid dt,
.commission-breakdown dt,
.payment-reconciliation > header > span,
.payment-reconciliation li span,
.refund-list span,
.refund-list small,
.payment-panel > header p,
.payment-panel > header a,
.payment-policy-copy strong,
.payment-policy-copy span,
.payment-form small,
.payment-transaction-list span,
.payment-transaction-list small,
.payment-transaction-list a,
.payment-status-line,
.rehab-card-heading p,
.rehab-list-heading p,
.rehab-count,
.rehab-program-meta small,
.rehab-builder-select span,
.rehab-submit-bar,
.rehab-today-summary > strong,
.rehab-therapist-label,
.rehab-activity-heading p,
.rehab-recorded-note,
.rehab-progress-metrics small,
.rehab-progress-card header span,
.rehab-progress-card header > strong,
.progress-scope-note,
.progress-motivation,
.progress-metric-grid span,
.progress-metric-grid small,
.progress-week-breakdown dt,
.progress-week-breakdown dd,
.progress-legend,
.progress-day,
.progress-history-list p,
.progress-history-list small,
.progress-simple-list p,
.progress-simple-list small,
.progress-feedback-summary span,
.progress-feedback-summary strong small,
.progress-feedback-days > div,
.progress-pagination span,
.therapist-progress-identity p,
.therapist-progress-stats dt,
.follow-up-flag,
.follow-up-clear,
.progress-status-tools form {
  font-size: var(--pg-font-size-caption);
  line-height: var(--pg-line-height-metadata);
}

.marketplace-filter-field > label,
.marketplace-filter-group > legend,
.marketplace-sort label,
.marketplace-filter-group label > span,
.analytics-filters label,
.booking-date-form > label,
.booking-address-field > label,
.appointment-status-form > label,
.schedule-card label > span,
.booking-slot-grid label > span,
.booking-type-grid label > span,
.schedule-payment-settings legend,
.schedule-payment-settings > label > span,
.schedule-payment-methods label,
.caregiver-form .form-label,
.caregiver-registration-form .form-label,
.caregiver-permission-option,
.payment-form label > span,
.payment-review-form label > span,
.payment-refund-form label > span,
.rehab-form .form-label,
.rehab-dose-grid span,
.rehab-activity-form label > span,
.progress-tool-card .form-label,
.progress-tool-card label > span {
  font-size: var(--pg-font-size-secondary);
  font-weight: var(--pg-font-weight-medium);
  line-height: var(--pg-line-height-metadata);
}

.dropdown-menu,
.dropdown-item,
.modal,
.offcanvas {
  font-size: var(--pg-font-size-secondary);
  line-height: var(--pg-line-height-normal);
}

.modal-title,
.offcanvas-title {
  font-size: var(--pg-font-size-card-title);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-card-title);
}

.alert,
.empty-state,
.booking-empty,
.rehab-empty,
.caregiver-empty,
.messaging-empty,
.payment-empty,
.analytics-empty {
  font-size: var(--pg-font-size-secondary);
  line-height: var(--pg-line-height-normal);
}

.badge,
.status-pill,
.payment-status,
.verification-status,
.marketplace-verified,
.therapist-directory-verified,
.messaging-unread-badge,
.rehab-video-badge,
.rehab-template-label {
  font-size: var(--pg-font-size-caption);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-metadata);
  letter-spacing: 0;
}

.table,
.responsive-table,
.analytics-table {
  font-size: var(--pg-font-size-table);
  line-height: var(--pg-line-height-metadata);
}

.table thead th,
.responsive-table th,
.analytics-table th {
  font-size: var(--pg-font-size-caption);
  font-weight: var(--pg-font-weight-semibold);
  line-height: var(--pg-line-height-metadata);
  letter-spacing: 0.01em;
  text-transform: none;
}

.pagination,
.page-link,
.marketplace-pagination,
.payment-pagination,
.progress-pagination,
.breadcrumb,
.breadcrumb-item {
  font-size: var(--pg-font-size-secondary);
  line-height: var(--pg-line-height-metadata);
}

.rehab-instructions,
.rehab-activity-card p,
.progress-feedback-summary,
.messaging-message article {
  max-width: 75ch;
  font-size: var(--pg-font-size-body);
  line-height: var(--pg-line-height-relaxed);
  overflow-wrap: anywhere;
}

.messaging-conversation-card,
.messaging-thread-title,
.payment-card-facts,
.marketplace-card-facts {
  font-size: var(--pg-font-size-secondary);
  line-height: var(--pg-line-height-normal);
}

@media (min-width: 62rem) {
  :root {
    --pg-font-size-xs: 0.8125rem;
    --pg-font-size-caption: 0.875rem;
    --pg-font-size-secondary: 0.9375rem;
    --pg-font-size-button: 1rem;
    --pg-font-size-table: 0.9375rem;
    --pg-font-size-nav: 1rem;
    --pg-font-size-card-title: 1.25rem;
  }
}

@media (min-width: 90rem) {
  :root {
    --pg-font-size-body: 1.0625rem;
    --pg-font-size-control: 1.0625rem;
  }
}
