/* FCMM soft-surface system: no sharp rectangular controls or card corners. */
:root {
  --fcmm-radius-xs: 7px;
  --fcmm-radius-sm: 11px;
  --fcmm-radius-md: 15px;
  --fcmm-radius-lg: 20px;
  --fcmm-radius-pill: 999px;
}

/* Form controls use a calm, tactile radius rather than the former square outline. */
body :is(input:not([type='checkbox']):not([type='radio']), select, textarea) {
  border-radius: var(--fcmm-radius-sm) !important;
}
body :is(input[type='checkbox'], input[type='radio']) {
  border-radius: 5px !important;
}
body :is(input, select, textarea):focus-visible {
  outline-offset: 3px;
}

/* Buttons deliberately distinguish primary pills from compact rectangular actions. */
body :is(.button, .gold-button, .line-button, .nh-button, .universe-cta, .contact-link, .mobile-contact, .replica-contact, .outline-button, .session-chip) {
  border-radius: var(--fcmm-radius-pill) !important;
}
body :is(.social-auth button, .calc-outline-button, .tab, .tabs, .calc-type-switch, .show-password, .chat-send, .modal-close, .chat-close, .universe-login-menu a, .universe-mobile-login > button) {
  border-radius: var(--fcmm-radius-sm) !important;
}

/* Elevated and bordered surfaces share a moderate, consistent corner radius. */
body :is(
  .info-card, .product-card, .resource-card, .portal-card, .metric,
  .calculator-form, .calc-result, .table-wrap, .split-panel, .visual-panel,
  .portal-top, .broker-activity, .resource-toolbar, .modal-card, .dropzone,
  .notification-list article, .chat-window, .chat-message, .toast,
  .calc-workspace, .calc-comparison, .calc-strategy, .calc-schedule,
  .calc-split, .calc-validation, .calc-summary-grid, .calc-type-switch,
  .replica-paths > a, .replica-product-grid, .replica-product-grid > a,
  .nh-product-card, .nh-insight-card, .nh-subscribe, .nh-social span,
  .universe-login-menu, .universe-mobile-menu:not([hidden]),
  .site-nav.menu-open .links, .mobile-menu, .auth-panel
) {
  border-radius: var(--fcmm-radius-md) !important;
}

/* Clip joined layouts at their outer radius without rounding internal dividers. */
body :is(.calc-workspace, .calc-comparison, .calc-strategy, .calc-schedule, .calc-type-switch, .calc-summary-grid, .replica-product-grid, .tabs, .nh-subscribe) {
  overflow: hidden;
}

/* Nested rows retain the visual group while still softening standalone cards. */
body :is(.calc-summary-grid > div, .calc-strategy-values > div, .compare-card, .nh-product-card, .replica-product-grid > a) {
  border-radius: 0;
}
body .social-auth button { min-height: 44px; }
body .auth-form .field-action input { border-radius: var(--fcmm-radius-sm) !important; }
body .resource-card .latest { border-radius: var(--fcmm-radius-pill); }

@media (max-width: 680px) {
  :root { --fcmm-radius-md: 13px; --fcmm-radius-lg: 17px; }
  body :is(.social-auth button, .calc-outline-button) { min-height: 46px; }
}
