/* Shared client type scale, matching the product-import dialogs.
   Keep the existing root size, phone geometry and icon sizes. */
html[data-client-ui] {
    --client-text: .95rem;
    --client-detail: .88rem;
    --client-caption: .78rem;
    --client-control: max(1rem, 16px);
}
html[data-client-ui] body { font-size: var(--client-text); line-height: 1.6; }
html[data-client-ui] body :is(p, .page-subtitle, .section-subtitle, .hero-subtitle, .directory-intro, .card-description) {
    font-size: var(--client-text); line-height: 1.65;
}
html[data-client-ui] body :is(.page-title, .directory h1) { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.2; }
html[data-client-ui] body .hero-title { font-size: clamp(2.15rem, 5vw, 4rem); line-height: 1.15; }
html[data-client-ui] body .section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.25; }
html[data-client-ui] body :is(.eyebrow, .login-eyebrow, .kicker) { font-size: var(--client-caption); line-height: 1.6; }

/* Navigation and actions: text only, leaving symbol-only controls unchanged. */
html[data-client-ui] body :is(.nav-link, .nav-link-mobile, .btn-primary, .btn-secondary, .btn-hero-primary, .btn-hero-secondary, .btn-cta, .btn-checkout, .btn-submit-order, .btn-add-to-cart-modal, .btn-submit, .filter-btn, .company-action-primary, .company-action-secondary, .company-form-back, .company-settings-trigger, .company-tabs button, .login-back, .login-discord, .direction-back-button, .direction-page button, .product-add-button) {
    font-size: var(--client-text); line-height: 1.45;
}
html[data-client-ui] body :is(.filter-btn, .company-tabs button) { white-space: normal; }
html[data-client-ui] body :is(.hero-promises > span, .harvest-item > span, .showcase-footer, .footer-section p, .footer-section ul li a, .footer-bottom p) {
    font-size: var(--client-detail); line-height: 1.6;
}
html[data-client-ui] body .footer-section h4 { font-size: 1rem; }

/* Product cards retain their two-column phone layout and image sizes. */
html[data-client-ui] body :is(.product-name, .product-info h3) { font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
html[data-client-ui] body :is(.product-category, .category-badge, .product-info .product-description, .product-info .product-weight, .product-original-price) {
    font-size: var(--client-detail); line-height: 1.5;
}
html[data-client-ui] body :is(.product-badge, .product-label) { font-size: var(--client-caption); line-height: 1.35; }
html[data-client-ui] body .product-price { font-size: 1.25rem; line-height: 1.3; }
html[data-client-ui] body .product-footer { flex-wrap: wrap; row-gap: 8px; }
html[data-client-ui] body .products-count { font-size: var(--client-text); }
html[data-client-ui] body .product-weight { flex-wrap: wrap; }

/* Forms and feedback share one readable size on every client page. */
html[data-client-ui] body :is(label, .form-group label, .company-settings-fields label) { font-size: var(--client-text); line-height: 1.5; }
html[data-client-ui] body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea, .input-group .input, .search-container input, .quantity-input, .modal-qty-input, .company-settings-fields input) {
    font-size: var(--client-control); line-height: 1.5;
}
html[data-client-ui] body :is(.cart-sync-feedback, .checkout-quote-error, .checkout-price-breakdown, .company-permission-hint, .company-history-note, .company-employees-description, .company-form-description, .login-session-note, .login-restriction, .login-footer, .login-error) {
    font-size: var(--client-detail); line-height: 1.6;
}
html[data-client-ui] body :is(.cart-item-details h4, .quantity-product-info h3, .checkout-item) { font-size: 1rem; line-height: 1.45; }
html[data-client-ui] body :is(.item-price, .qty-product-price, .user-info, .user-info-mobile, .summary-row) { font-size: var(--client-text); line-height: 1.5; }
html[data-client-ui] body .summary-row.total { font-size: 1.35rem; }

/* Account, login and directory dialogs. Explicit IDs override old mobile rules. */
html[data-client-ui] body :is(#phoneLoginModal, #quantityModal, #checkoutModal, #companySettingsModal, #companyRemoveModal, .directory-dialog) :is(p, label, .phone-account-details strong, .company-manager-info, .company-permission-switch, .company-tabs button) {
    font-size: var(--client-text); line-height: 1.6;
}
html[data-client-ui] body :is(#phoneLoginModal, #quantityModal, #checkoutModal, #companySettingsModal, #companyRemoveModal, .directory-dialog) h2 { font-size: 1.6rem; line-height: 1.25; }
html[data-client-ui] body #phoneLoginModal .phone-login-eyebrow { font-size: var(--client-caption); }
html[data-client-ui] body :is(#phoneLoginModal, #companySettingsModal) :is(.phone-login-body, .phone-login-progress, .company-employee-row span, .company-permission-hint) { font-size: var(--client-detail); line-height: 1.6; }
html[data-client-ui] body #companyEmployeeList .company-employee-row strong { font-size: 1rem; line-height: 1.45; }
html[data-client-ui] body #companyEmployeeList .company-employee-row > div:first-child > span { font-size: var(--client-detail); line-height: 1.5; }
html[data-client-ui] body #companyEmployeeList .company-permission-switch > span:last-child { font-size: var(--client-detail); }
html[data-client-ui] body :is(.company-order-meta, .company-order-person, .company-order-quantity, .company-product-list, .directory-total, .directory-count, .directory-role, .directory-phone) { font-size: var(--client-detail); line-height: 1.6; }
html[data-client-ui] body .directory-company-name { font-size: 1.25rem; line-height: 1.3; }

/* Recruitment and management screens in the client application. */
html[data-client-ui] body #recrutement :is(p, label, button[type="submit"]) { font-size: var(--client-text); line-height: 1.6; }
html[data-client-ui] body #recrutement :is(input, textarea) { font-size: var(--client-control); }
html[data-client-ui] body #recrutement .recruitment-intro > span { font-size: var(--client-caption); }
html[data-client-ui] body #recrutement :is(.recruitment-field-error, #recruitment-error-age) { font-size: var(--client-detail); }
html[data-client-ui] body #recrutement h2 { font-size: 1.6rem; line-height: 1.3; }
html[data-client-ui] body :is(.admin-page td, .admin-page th, .product-panel-meta, .product-tile-price, .direction-grid article p, .login-card-description, .login-story-description, .login-story-details) { font-size: var(--client-text); line-height: 1.6; }
html[data-client-ui] body :is(.product-tile-status, .product-tile-label) { font-size: var(--client-caption); }
html[data-client-ui] body .product-tile strong { font-size: 1rem; }

@media (max-width: 768px) {
    html[data-client-ui] body :is(.page-title, .directory h1) { font-size: 2rem; }
    html[data-client-ui] body .section-title { font-size: 1.8rem; }
    html[data-client-ui] body .cart-item { flex-wrap: wrap; }
    html[data-client-ui] body .cart-item-info { min-width: 0; }
    html[data-client-ui] body .cart-item-actions { margin-left: auto; }
    html[data-client-ui] body .nav-link-mobile { white-space: normal; }
    html[data-client-ui] body .cart-search-row .search-container input { font-size: var(--client-control); }
    html[data-client-ui] body .cart-search-row .cart-json-trigger { font-size: var(--client-text); }
}
