/*
 * NBICCS Global Readability Layer
 * Loaded after all page and inline head styles by config.php / admin UI.
 * Purpose: make text clearly larger without changing layouts or database logic.
 */

:root {
  --nb-font-body: 17px;
  --nb-font-body-mobile: 16.5px;
  --nb-font-small: 14px;
  --nb-font-label: 15px;
  --nb-font-button: 15px;
  --nb-font-table: 15.5px;
  --nb-font-table-head: 13.5px;
  --nb-readable-line-height: 1.62;
}

html {
  font-size: 17px !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body {
  font-size: var(--nb-font-body) !important;
  line-height: var(--nb-readable-line-height) !important;
}

/* General reading text */
body p,
body li,
body dd,
body dt,
body .description,
body .subtitle,
body .muted,
body .help-text,
body .helper-text,
body .notice,
body .payment-box,
body .remark-note,
body .portal-alert,
body .alert,
body .message,
body .empty-state {
  font-size: 16px !important;
  line-height: 1.65 !important;
}

body small,
body .small,
body .meta,
body .timestamp,
body .date,
body .caption,
body .hint {
  font-size: var(--nb-font-small) !important;
  line-height: 1.5 !important;
}

/* Navigation and identity */
body .nav-link,
body .nav-links a,
body .nb-public-links a,
body .nbiccs-admin-nav .nav-link,
body .sidebar a,
body .menu a,
body .dropdown-menu a {
  font-size: 16px !important;
  line-height: 1.4 !important;
}

body .brand,
body .nb-public-brand {
  font-size: 17px !important;
}

body .brand small,
body .nb-public-brand small,
body .side-user small,
body .nbiccs-admin-user-card small {
  font-size: 13.5px !important;
  line-height: 1.4 !important;
}

body .side-user strong,
body .nbiccs-admin-user-card strong {
  font-size: 16.5px !important;
}

body .topline,
body .topline .container,
body .nb-public-topbar {
  font-size: 14.5px !important;
  line-height: 1.5 !important;
}

/* Headings */
body h1 { font-size: clamp(2rem, 4vw, 3.4rem) !important; line-height: 1.15 !important; }
body h2 { font-size: clamp(1.45rem, 2.6vw, 2.15rem) !important; line-height: 1.22 !important; }
body h3 { font-size: clamp(1.12rem, 2vw, 1.45rem) !important; line-height: 1.28 !important; }
body h4 { font-size: 1.08rem !important; line-height: 1.35 !important; }

body .topbar h1,
body .member-hero h1,
body .nb-page-hero h1,
body .nbiccs-comm-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.55rem) !important;
}

body .topbar p,
body .section-title p,
body .hero p,
body .nb-page-hero p,
body .member-hero p {
  font-size: 16.5px !important;
  line-height: 1.65 !important;
}

/* Forms and action controls */
body label,
body .form label,
body .field-label {
  font-size: var(--nb-font-label) !important;
  line-height: 1.45 !important;
}

body input,
body select,
body textarea {
  font-size: 16px !important;
  line-height: 1.45 !important;
}

body button,
body .btn,
body [class*="-btn"],
body input[type="submit"],
body input[type="button"],
body input[type="reset"] {
  font-size: var(--nb-font-button) !important;
  line-height: 1.3 !important;
}

/* Cards, dashboards and workspaces */
body .summary-card span,
body .mini-card span,
body .stat-card span,
body .metric-card span,
body .loan-service-stat span,
body .lc-loan-summary small {
  font-size: 14.5px !important;
  line-height: 1.45 !important;
}

body .summary-card small,
body .mini-item small,
body .stat-card small,
body .metric-card small {
  font-size: 13.5px !important;
}

body .summary-card h2,
body .summary-card strong,
body .stat-card strong,
body .metric-card strong {
  line-height: 1.25 !important;
}

body .feature-card p,
body .card p,
body .panel p,
body .dashboard-preview p,
body .nbiccs-admin-workspace p,
body .member-action-card p {
  font-size: 16px !important;
  line-height: 1.65 !important;
}

body .feature-card h3,
body .dashboard-actions h3,
body .quick-actions-row h3,
body .member-action-card h3 {
  font-size: 19px !important;
}

/* Tables and financial records */
body table th,
body .table th,
body [class*="table"] th {
  font-size: var(--nb-font-table-head) !important;
  line-height: 1.4 !important;
}

body table td,
body .table td,
body [class*="table"] td {
  font-size: var(--nb-font-table) !important;
  line-height: 1.55 !important;
}

body .tag,
body [class*="badge"],
body [class*="status"],
body [class*="pill"] {
  font-size: 13px !important;
  line-height: 1.3 !important;
}

/* Admin workspace */
body.nbiccs-admin-ui,
body.nbiccs-member-modern,
body.loan-center-page,
body.loan-service-page,
body.payment-desk-page,
body.nbiccs-comm-page {
  font-size: var(--nb-font-body) !important;
}

body.nbiccs-admin-ui .nbiccs-admin-nav-heading,
body.nbiccs-admin-ui .nbiccs-admin-sidebar-search label,
body.nbiccs-admin-ui .nbiccs-admin-eyebrow {
  font-size: 13.5px !important;
}

body.nbiccs-admin-ui .nbiccs-admin-workspace-links a,
body.nbiccs-admin-ui .nbiccs-admin-result-item a,
body.nbiccs-admin-ui .nbiccs-admin-standalone-bar a {
  font-size: 15px !important;
}

/* Live chat and messages */
body .nb-chat-bubble,
body .mm-bubble,
body .chat-message,
body .message-bubble {
  font-size: 16px !important;
  line-height: 1.62 !important;
}

body .nb-chat-bubble small,
body .mm-bubble .meta,
body .nb-thread-item small {
  font-size: 13.5px !important;
}

/* Footer */
body .footer p,
body .footer a,
body .footer-bottom,
body .designer-credit,
body .admin-footer-credit {
  font-size: 14.5px !important;
  line-height: 1.6 !important;
}

@media (max-width: 760px) {
  html { font-size: 16.5px !important; }
  body { font-size: var(--nb-font-body-mobile) !important; }
  body p,
  body li,
  body .feature-card p,
  body .card p,
  body .panel p { font-size: 15.5px !important; }
  body .nav-link,
  body .nav-links a,
  body .nb-public-links a,
  body .sidebar a { font-size: 15.5px !important; }
  body table td,
  body [class*="table"] td { font-size: 14.5px !important; }
  body table th,
  body [class*="table"] th { font-size: 13px !important; }
  body button,
  body .btn,
  body [class*="-btn"] { font-size: 14.5px !important; }
}
