/* =========================================================================
   NFM Lending — Component primitives
   Use this in addition to colors_and_type.css to avoid reinventing
   the same patterns across every file.

   Import after colors_and_type.css.
   ========================================================================= */

@import url('./colors_and_type.css');

/* -------- BUTTON ---------------------------------------------------------- */
/* Base + style + size composition. Apply: <button class="nfm-btn nfm-btn--primary nfm-btn--md">  */
.nfm-btn {
  font-family: var(--font-sans);
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  white-space: nowrap;
  transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
  text-decoration: none;
}
.nfm-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.nfm-btn:disabled, .nfm-btn.is-disabled {
  background: var(--nfm-gray-100) !important;
  color: var(--fg-disabled) !important;
  border-color: transparent !important;
  cursor: not-allowed;
}

/* Sizes — single source of truth, used across all audiences */
.nfm-btn--xs       { padding: 6px 10px;  font-size: 12px; min-height: 28px; border-radius: var(--radius-sm); }
.nfm-btn--sm       { padding: 8px 14px;  font-size: 13px; min-height: 32px; }
.nfm-btn--md       { padding: 10px 16px; font-size: 14px; min-height: 40px; }  /* operator default */
.nfm-btn--lg       { padding: 12px 20px; font-size: 15px; min-height: 44px; }  /* partner default */
.nfm-btn--touch    { padding: 16px 24px; font-size: 16px; min-height: 52px; border-radius: var(--radius-lg); }  /* borrower mobile */
.nfm-btn--block    { width: 100%; }

/* Styles */
.nfm-btn--primary       { background: var(--action-primary-bg); color: var(--action-primary-fg); }
.nfm-btn--primary:hover { background: var(--action-primary-bg-hover); }
.nfm-btn--secondary       { background: var(--action-secondary-bg); color: var(--action-secondary-fg); border-color: var(--action-secondary-border); }
.nfm-btn--secondary:hover { background: var(--action-secondary-bg-hover); }
.nfm-btn--accent       { background: var(--action-accent-bg); color: var(--action-accent-fg); }
.nfm-btn--accent:hover { background: var(--action-accent-bg-hover); }
.nfm-btn--success       { background: var(--nfm-success); color: #fff; }
.nfm-btn--success:hover { filter: brightness(0.92); }
.nfm-btn--danger        { background: var(--nfm-error); color: #fff; }
.nfm-btn--danger:hover  { filter: brightness(0.92); }
.nfm-btn--ghost         { background: transparent; color: var(--fg-strong); }
.nfm-btn--ghost:hover   { background: var(--nfm-gray-50); }

/* Loading state — adds a spinner before content. Use aria-busy="true" too. */
.nfm-btn--loading { pointer-events: none; opacity: 0.85; }
.nfm-btn--loading::before {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nfm-spin 0.6s linear infinite;
}
@keyframes nfm-spin { to { transform: rotate(360deg); } }

/* -------- STATUS PILL ----------------------------------------------------- */
/* <span class="nfm-pill nfm-pill--success">…</span>
   Optionally add <span class="nfm-pill__dot"></span> as first child. */
.nfm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.nfm-pill__dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.nfm-pill--success { background: var(--nfm-success-bg); color: var(--nfm-success); border-color: var(--nfm-success-border); }
.nfm-pill--success .nfm-pill__dot { background: var(--nfm-success); }
.nfm-pill--warning { background: var(--nfm-warning-bg); color: var(--nfm-warning); border-color: var(--nfm-warning-border); }
.nfm-pill--warning .nfm-pill__dot { background: var(--nfm-warning-solid); }
.nfm-pill--error   { background: var(--nfm-error-bg); color: var(--nfm-error); border-color: var(--nfm-error-border); }
.nfm-pill--error .nfm-pill__dot   { background: var(--nfm-error-solid); }
.nfm-pill--info    { background: var(--nfm-info-bg); color: var(--nfm-info); border-color: var(--nfm-info-border); }
.nfm-pill--info .nfm-pill__dot    { background: var(--nfm-info-solid); }
.nfm-pill--neutral { background: var(--nfm-gray-100); color: var(--fg-muted); }
.nfm-pill--neutral .nfm-pill__dot { background: var(--fg-muted); }
.nfm-pill--brand   { background: var(--nfm-navy-50); color: var(--nfm-navy-600); border-color: var(--nfm-navy-100); }

/* Encompass loan-milestone variants (14) ---------------------------------- */
.nfm-pill--ms-gray       { background: #e8e8ec; color: #555;    border-color: #ccc; }
.nfm-pill--ms-gray       .nfm-pill__dot { background: #888; }
.nfm-pill--ms-bluegreen  { background: #d0f0e8; color: #0a6e4e; border-color: #80d4b4; }
.nfm-pill--ms-bluegreen  .nfm-pill__dot { background: #0a8e60; }
.nfm-pill--ms-yellow     { background: #fff4c4; color: #7a5c00; border-color: #e8d060; }
.nfm-pill--ms-yellow     .nfm-pill__dot { background: #c8a000; }
.nfm-pill--ms-teal       { background: #c8f0ec; color: #006858; border-color: #60ccc0; }
.nfm-pill--ms-teal       .nfm-pill__dot { background: #009080; }
.nfm-pill--ms-orange     { background: #ffe4c4; color: #a04800; border-color: #f0b060; }
.nfm-pill--ms-orange     .nfm-pill__dot { background: #d06000; }
.nfm-pill--ms-dkyellow   { background: #f0e0a0; color: #5a4200; border-color: #c8a830; }
.nfm-pill--ms-dkyellow   .nfm-pill__dot { background: #8a6800; }
.nfm-pill--ms-green      { background: #c8f0d0; color: #106828; border-color: #70d088; }
.nfm-pill--ms-green      .nfm-pill__dot { background: #188838; }
.nfm-pill--ms-ltblue     { background: #cce4ff; color: #1860a8; border-color: #80b8f0; }
.nfm-pill--ms-ltblue     .nfm-pill__dot { background: #2070c8; }
.nfm-pill--ms-ltpink     { background: #ffd8e4; color: #a83060; border-color: #f090b0; }
.nfm-pill--ms-ltpink     .nfm-pill__dot { background: #d04878; }
.nfm-pill--ms-dkpink     { background: #f0c0d4; color: #881040; border-color: #d87098; }
.nfm-pill--ms-dkpink     .nfm-pill__dot { background: #b01858; }
.nfm-pill--ms-ltred      { background: #ffc8c8; color: #b02020; border-color: #f08080; }
.nfm-pill--ms-ltred      .nfm-pill__dot { background: #d03030; }
.nfm-pill--ms-purple     { background: #e0c8f8; color: #6020a0; border-color: #b880e0; }
.nfm-pill--ms-purple     .nfm-pill__dot { background: #8030c8; }
.nfm-pill--ms-navy       { background: #c8d4e8; color: #182848; border-color: #8098c0; }
.nfm-pill--ms-navy       .nfm-pill__dot { background: #283860; }
.nfm-pill--ms-black      { background: #d0d0d4; color: #111;    border-color: #999; }
.nfm-pill--ms-black      .nfm-pill__dot { background: #222; }

/* -------- SECTION HEADER -------------------------------------------------- */
/* Single pattern for "title + sub + right-actions" across every surface.
   <header class="nfm-section-head">
     <h2 class="nfm-section-head__title">Title</h2>
     <span class="nfm-section-head__sub">12 of 24</span>
     <div class="nfm-section-head__actions">…</div>
   </header>
*/
.nfm-section-head { display: flex; align-items: baseline; gap: var(--space-3); padding-bottom: var(--space-3); }
.nfm-section-head__title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--fg-strong); margin: 0; letter-spacing: -0.005em; }
.nfm-section-head__sub { font-size: 13px; color: var(--fg-muted); }
.nfm-section-head__actions { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; }

/* -------- CARD / PANEL ---------------------------------------------------- */
.nfm-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.nfm-card--flat { box-shadow: none; }
.nfm-card--raised { box-shadow: var(--shadow-md); }
.nfm-card__head { padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 12px; }
.nfm-card__body { padding: 18px 20px; }
.nfm-card__foot { padding: 12px 20px; border-top: 1px solid var(--border-subtle); background: var(--bg-surface-alt); display: flex; align-items: center; gap: 12px; }

/* -------- PULSE TOP BAR --------------------------------------------------- */
/* Dark navy top bar. Tokens in colors_and_type.css (--pulse-*) drive theming.
   Override per-product by setting any --pulse-* token on a scope ancestor. */
.nfm-pulse {
  background: var(--pulse-bg);
  color: var(--pulse-fg);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  height: 56px;
}
.nfm-pulse__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--pulse-fg);}
.nfm-pulse__brand img { height: 22px; }
.nfm-pulse__brand .slash { color: var(--pulse-divider); font-weight: 300; }
.nfm-pulse__role { padding: 4px 10px; background: var(--pulse-role-bg); color: var(--pulse-role-fg); border-radius: var(--radius-md); font-size: 10px; font-weight: 800; letter-spacing: 0.10em; text-transform: uppercase; }
.nfm-pulse__nav { display: flex; gap: 2px; margin-left: 8px; }
.nfm-pulse__nav a { padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--pulse-fg-muted); text-decoration: none; border-radius: var(--radius-md); }
.nfm-pulse__nav a:hover { background: var(--pulse-surface); color: var(--pulse-fg); }
.nfm-pulse__nav a[aria-current="page"], .nfm-pulse__nav a.is-active { color: var(--pulse-fg); background: var(--pulse-surface); font-weight: 700; }
.nfm-pulse__spacer { flex: 1; }
.nfm-pulse__bell { width: 30px; height: 30px; border-radius: 50%; background: var(--pulse-surface); display: grid; place-items: center; color: var(--pulse-fg); border: 0; cursor: pointer; }
.nfm-pulse__bell:hover { background: var(--pulse-surface-hover); }
.nfm-pulse__user { display: flex; align-items: center; gap: 8px; }
.nfm-pulse__user .av { width: 28px; height: 28px; border-radius: 50%; background: var(--pulse-avatar-bg); color: var(--pulse-avatar-fg); display: grid; place-items: center; font-weight: 800; font-size: 11px; }

/* -------- FIELD (label + input + help/error) ----------------------------- */
/* <div class="nfm-field">
     <label class="nfm-field__label" for="…">Loan amount</label>
     <input class="nfm-field__input" id="…">
     <span class="nfm-field__help">Most common loan type</span>
     <span class="nfm-field__error">Required</span>   ← shown only when invalid
   </div>
*/
.nfm-field { display: flex; flex-direction: column; gap: 6px; }
.nfm-field__label { font-size: 13px; font-weight: 600; color: var(--fg-strong); line-height: 1.3; }
.nfm-field__input,
.nfm-field__select,
.nfm-field__textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--fg-strong);
  outline: 0;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.nfm-field__input:focus,
.nfm-field__select:focus,
.nfm-field__textarea:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--nfm-navy-50); }
.nfm-field__input[readonly] { background: var(--bg-surface-alt); }   /* read-only = subtle, NOT faded */
.nfm-field__input:disabled { background: var(--nfm-gray-50); color: var(--fg-disabled); cursor: not-allowed; }
.nfm-field__input[aria-invalid="true"] { border-color: var(--nfm-error); }
.nfm-field__help { font-size: 12px; color: var(--fg-muted); line-height: 1.4; }
.nfm-field__error { font-size: 12px; color: var(--nfm-error); font-weight: 600; line-height: 1.4; }
.nfm-field--touch .nfm-field__input { font-size: 16px; padding: 14px 16px; }  /* borrower-mobile */

/* -------- DATA TABLE ----------------------------------------------------- */
.nfm-table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); }
.nfm-table thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 800;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface);
  white-space: nowrap;
}
.nfm-table tbody td { padding: 12px 14px; font-size: 13px; color: var(--fg-default); border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.nfm-table tbody tr:hover td { background: var(--nfm-gray-25); }
.nfm-table th.num, .nfm-table td.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.nfm-table--compact tbody td { padding: 6px 14px; height: var(--row-compact); }
.nfm-table--comfortable tbody td { padding: 14px 16px; height: var(--row-comfortable); }

/* -------- KEY/VALUE GRID (loan summary, metadata) ------------------------ */
/* <div class="nfm-kv-grid">
     <div class="nfm-kv"><span class="nfm-kv__k">Loan #</span><span class="nfm-kv__v">10042193</span></div>
     …
   </div>
*/
.nfm-kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px 28px; }
.nfm-kv { display: flex; flex-direction: column; gap: 3px; }
.nfm-kv__k { font-size: 10px; font-weight: 800; color: var(--fg-muted); letter-spacing: 0.10em; text-transform: uppercase; }
.nfm-kv__v { font-size: 14px; font-weight: 700; color: var(--fg-strong); font-variant-numeric: tabular-nums lining-nums; }
.nfm-kv__v--warn { color: var(--nfm-warning); }
.nfm-kv__v--success { color: var(--nfm-success); }

/* -------- MODAL / DIALOG -------------------------------------------------- */
/* APG: must add role="dialog" aria-modal="true" aria-labelledby in production.
   <div class="nfm-modal" role="dialog">
     <div class="nfm-modal__scrim"></div>
     <div class="nfm-modal__dialog">
       <header class="nfm-modal__head">…</header>
       <div class="nfm-modal__body">…</div>
       <footer class="nfm-modal__foot">…</footer>
     </div>
   </div>
*/
.nfm-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--space-5); }
.nfm-modal__scrim { position: absolute; inset: 0; background: var(--scrim-bg); backdrop-filter: blur(2px); z-index: 0; }
.nfm-modal__dialog { position: relative; z-index: 1; background: var(--bg-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); width: 100%; max-width: 520px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.nfm-modal__head { padding: 20px 24px 14px; display: flex; align-items: center; gap: 14px; }
.nfm-modal__head .nfm-modal__title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--fg-strong); margin: 0; flex: 1; }
.nfm-modal__head .nfm-modal__close { width: 32px; height: 32px; border-radius: 50%; background: transparent; border: 0; color: var(--fg-muted); cursor: pointer; display: grid; place-items: center; }
.nfm-modal__head .nfm-modal__close:hover { background: var(--nfm-gray-50); color: var(--fg-strong); }
.nfm-modal__body { padding: 0 24px 20px; overflow-y: auto; }
.nfm-modal__body p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--fg-default); }
.nfm-modal__foot { padding: 16px 24px; border-top: 1px solid var(--border-subtle); background: var(--bg-surface-alt); display: flex; justify-content: flex-end; gap: 8px; }
.nfm-modal__dialog--danger { border-top: 4px solid var(--nfm-error); }

/* -------- MENU / POPOVER ------------------------------------------------- */
/* APG: must add role="menu" and items role="menuitem" + keyboard arrow nav in production. */
.nfm-menu { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; z-index: var(--z-popover); }
.nfm-menu__item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-md); font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--fg-default); cursor: pointer; user-select: none; }
.nfm-menu__item:hover { background: var(--nfm-gray-50); color: var(--fg-strong); }
.nfm-menu__item:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.nfm-menu__item .nfm-menu__icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--fg-muted); }
.nfm-menu__item:hover .nfm-menu__icon { color: var(--fg-strong); }
.nfm-menu__item .nfm-menu__shortcut { margin-left: auto; font-size: 11px; color: var(--fg-subtle); font-family: var(--font-mono); }
.nfm-menu__item--danger { color: var(--nfm-error); }
.nfm-menu__item--danger:hover { background: var(--nfm-error-bg); color: var(--nfm-error); }
.nfm-menu__item--danger .nfm-menu__icon { color: var(--nfm-error); }
.nfm-menu__divider { height: 1px; background: var(--border-subtle); margin: 4px 6px; }
.nfm-menu__label { padding: 8px 12px 4px; font-size: 10px; font-weight: 800; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* -------- TOAST ---------------------------------------------------------- */
/* Use aria-live="polite" container, role="status" per toast. */
.nfm-toast-stack { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: var(--z-toast); }
.nfm-toast { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); min-width: 320px; max-width: 440px; }
.nfm-toast__icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.nfm-toast__body { display: flex; flex-direction: column; gap: 2px; }
.nfm-toast__title { font-size: 14px; font-weight: 700; color: var(--fg-strong); line-height: 1.3; }
.nfm-toast__msg { font-size: 13px; color: var(--fg-muted); line-height: 1.4; }
.nfm-toast__close { width: 28px; height: 28px; border-radius: 50%; background: transparent; border: 0; color: var(--fg-muted); cursor: pointer; display: grid; place-items: center; }
.nfm-toast__close:hover { background: var(--nfm-gray-50); color: var(--fg-strong); }
.nfm-toast--success .nfm-toast__icon { background: var(--nfm-success-solid); }
.nfm-toast--success { border-left: 4px solid var(--nfm-success-solid); }
.nfm-toast--error .nfm-toast__icon { background: var(--nfm-error-solid); }
.nfm-toast--error { border-left: 4px solid var(--nfm-error-solid); }
.nfm-toast--info .nfm-toast__icon { background: var(--nfm-info-solid); }
.nfm-toast--info { border-left: 4px solid var(--nfm-info-solid); }
.nfm-toast--warning .nfm-toast__icon { background: var(--nfm-warning-solid); }
.nfm-toast--warning { border-left: 4px solid var(--nfm-warning-solid); }

/* -------- EMPTY STATE ---------------------------------------------------- */
.nfm-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 24px; text-align: center; }
.nfm-empty__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--nfm-navy-50); color: var(--nfm-navy-600); display: grid; place-items: center; }
.nfm-empty__title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--fg-strong); margin: 0; }
.nfm-empty__sub { font-size: 14px; color: var(--fg-muted); margin: 0; max-width: 360px; line-height: 1.5; }
.nfm-empty__actions { display: flex; gap: 10px; margin-top: 4px; }

/* =========================================================================
   FORM CONTROLS — Checkbox, Radio, Switch, Select, Search
   ========================================================================= */

/* -------- CHECKBOX -------------------------------------------------------- */
/* <label class="nfm-check"><input type="checkbox"><span class="nfm-check__box"></span><span class="nfm-check__label">Conventional</span></label> */
.nfm-check, .nfm-radio, .nfm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--fg-strong); user-select: none; min-height: 28px;}
.nfm-check input, .nfm-radio input, .nfm-switch input { position: absolute; opacity: 0; pointer-events: none;}
.nfm-check__box { width: 20px; height: 20px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-surface); display: grid; place-items: center; color: #fff; flex-shrink: 0; transition: all var(--motion-fast) var(--ease-standard);}
.nfm-check__box::after { content: ""; width: 12px; height: 12px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); opacity: 0; transition: opacity var(--motion-fast);}
.nfm-check input:checked ~ .nfm-check__box { background: var(--nfm-navy-600); border-color: var(--nfm-navy-600);}
.nfm-check input:checked ~ .nfm-check__box::after { opacity: 1;}
.nfm-check input:focus-visible ~ .nfm-check__box { outline: 2px solid var(--border-focus); outline-offset: 2px;}
.nfm-check input:disabled ~ .nfm-check__box { background: var(--nfm-gray-100); border-color: var(--border-default); cursor: not-allowed;}
.nfm-check--indeterminate .nfm-check__box { background: var(--nfm-navy-600); border-color: var(--nfm-navy-600);}
.nfm-check--indeterminate .nfm-check__box::after { background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cline x1='6' y1='12' x2='18' y2='12'/%3E%3C/svg%3E"); opacity: 1;}
.nfm-check--error .nfm-check__box { border-color: var(--nfm-error);}

/* -------- RADIO ----------------------------------------------------------- */
.nfm-radio__dot { width: 20px; height: 20px; border: 1.5px solid var(--border-strong); border-radius: 50%; background: var(--bg-surface); display: grid; place-items: center; flex-shrink: 0; transition: border-color var(--motion-fast);}
.nfm-radio__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--nfm-navy-600); opacity: 0; transform: scale(0.4); transition: all var(--motion-fast);}
.nfm-radio input:checked ~ .nfm-radio__dot { border-color: var(--nfm-navy-600);}
.nfm-radio input:checked ~ .nfm-radio__dot::after { opacity: 1; transform: scale(1);}
.nfm-radio input:focus-visible ~ .nfm-radio__dot { outline: 2px solid var(--border-focus); outline-offset: 2px;}
.nfm-radio input:disabled ~ .nfm-radio__dot { background: var(--nfm-gray-100); border-color: var(--border-default); cursor: not-allowed;}

/* -------- SWITCH (role="switch") ----------------------------------------- */
.nfm-switch__track { width: 38px; height: 22px; background: var(--nfm-gray-300); border-radius: var(--radius-pill); position: relative; flex-shrink: 0; transition: background var(--motion-base);}
.nfm-switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: left var(--motion-base);}
.nfm-switch input:checked ~ .nfm-switch__track { background: var(--nfm-success);}
.nfm-switch input:checked ~ .nfm-switch__track::after { left: 18px;}
.nfm-switch input:focus-visible ~ .nfm-switch__track { outline: 2px solid var(--border-focus); outline-offset: 2px;}
.nfm-switch input:disabled ~ .nfm-switch__track { opacity: 0.5; cursor: not-allowed;}
.nfm-switch--lg .nfm-switch__track { width: 48px; height: 28px;}
.nfm-switch--lg .nfm-switch__track::after { width: 24px; height: 24px;}
.nfm-switch--lg input:checked ~ .nfm-switch__track::after { left: 22px;}

/* -------- SELECT ---------------------------------------------------------- */
.nfm-select { font-family: var(--font-sans); font-size: 14px; padding: 10px 36px 10px 12px; border: 1.5px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); color: var(--fg-strong); outline: 0; appearance: none; cursor: pointer; font-weight: 500; min-height: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23555E66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right 14px center; background-repeat: no-repeat; transition: border-color var(--motion-fast), box-shadow var(--motion-fast);}
.nfm-select:hover { border-color: var(--border-strong);}
.nfm-select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--nfm-navy-50);}
.nfm-select:disabled { background-color: var(--nfm-gray-50); color: var(--fg-muted); cursor: not-allowed;}
.nfm-select[aria-invalid="true"] { border-color: var(--nfm-error);}
.nfm-select--sm { padding: 6px 28px 6px 10px; font-size: 13px; min-height: 32px;}
.nfm-select--lg { padding: 14px 38px 14px 16px; font-size: 16px; min-height: 48px;}

/* -------- SEARCH INPUT --------------------------------------------------- */
.nfm-search { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-surface); border: 1.5px solid var(--border-default); border-radius: var(--radius-md); transition: border-color var(--motion-fast);}
.nfm-search:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--nfm-navy-50);}
.nfm-search i { color: var(--fg-muted); flex-shrink: 0; width: 14px; height: 14px;}
.nfm-search input { flex: 1; min-width: 0; border: 0; outline: 0; font-family: inherit; font-size: 14px; color: var(--fg-strong); background: transparent;}
.nfm-search input::placeholder { color: var(--fg-muted);}
.nfm-search .nfm-search__clear { width: 20px; height: 20px; border-radius: 50%; background: var(--nfm-gray-200); border: 0; display: grid; place-items: center; color: var(--fg-muted); cursor: pointer; flex-shrink: 0;}
.nfm-search .nfm-search__clear:hover { background: var(--fg-muted); color: #fff;}

/* =========================================================================
   NAVIGATION — Tabs, Breadcrumbs, Pagination
   ========================================================================= */

/* -------- TABS (APG: role=tablist / tab / tabpanel; arrow-key nav in JS) - */
.nfm-tabs { border-bottom: 1px solid var(--border-default);}
.nfm-tabs__list { display: flex; gap: 0;}
.nfm-tabs__tab { padding: 12px 18px; background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--fg-muted); display: inline-flex; align-items: center; gap: 8px; transition: color var(--motion-fast);}
.nfm-tabs__tab:hover { color: var(--fg-strong);}
.nfm-tabs__tab[aria-selected="true"] { color: var(--nfm-navy-600); border-bottom-color: var(--nfm-navy-600); font-weight: 700;}
.nfm-tabs__tab:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;}
.nfm-tabs__tab .count { padding: 1px 7px; border-radius: var(--radius-pill); background: var(--nfm-gray-100); color: var(--fg-muted); font-size: 11px; font-weight: 700;}
.nfm-tabs__tab[aria-selected="true"] .count { background: var(--nfm-navy-600); color: #fff;}
/* Pill variant */
.nfm-tabs--pill { border-bottom: 0; padding: 4px; background: var(--nfm-gray-50); border-radius: var(--radius-lg); display: inline-flex;}
.nfm-tabs--pill .nfm-tabs__list { gap: 2px;}
.nfm-tabs--pill .nfm-tabs__tab { padding: 8px 14px; border-bottom: 0; border-radius: var(--radius-md); margin: 0;}
.nfm-tabs--pill .nfm-tabs__tab[aria-selected="true"] { background: var(--bg-surface); box-shadow: var(--shadow-xs); color: var(--nfm-navy-600);}

/* -------- BREADCRUMBS ---------------------------------------------------- */
.nfm-crumbs { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: 13px; color: var(--fg-muted); flex-wrap: wrap;}
.nfm-crumbs a { color: var(--fg-muted); text-decoration: none;}
.nfm-crumbs a:hover { color: var(--fg-strong); text-decoration: underline;}
.nfm-crumbs__sep { color: var(--fg-subtle); user-select: none;}
.nfm-crumbs__current { color: var(--fg-strong); font-weight: 700;}

/* -------- PAGINATION ----------------------------------------------------- */
.nfm-pagination { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-sans);}
.nfm-pagination__btn { width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--fg-default); font-size: 13px; font-weight: 600; cursor: pointer; display: grid; place-items: center; font-variant-numeric: tabular-nums; transition: background var(--motion-fast);}
.nfm-pagination__btn:hover { background: var(--nfm-gray-50); border-color: var(--border-strong);}
.nfm-pagination__btn[aria-current="page"] { background: var(--nfm-navy-600); color: #fff; border-color: var(--nfm-navy-600);}
.nfm-pagination__btn:disabled { color: var(--fg-disabled); cursor: not-allowed;}
.nfm-pagination__ellipsis { color: var(--fg-subtle); padding: 0 6px;}
.nfm-pagination__meta { margin-left: 12px; font-size: 13px; color: var(--fg-muted); font-variant-numeric: tabular-nums;}
.nfm-pagination__meta b { color: var(--fg-strong); font-weight: 700;}

/* =========================================================================
   DISPLAY — Avatar, Spinner, Skeleton, Divider, Tooltip
   ========================================================================= */

/* -------- AVATAR --------------------------------------------------------- */
.nfm-avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--nfm-blue-400); color: #fff; font-family: var(--font-sans); font-weight: 800; flex-shrink: 0; overflow: hidden; position: relative;}
.nfm-avatar img { width: 100%; height: 100%; object-fit: cover;}
.nfm-avatar--xs { width: 20px; height: 20px; font-size: 9px;}
.nfm-avatar--sm { width: 28px; height: 28px; font-size: 11px;}
.nfm-avatar--md { width: 36px; height: 36px; font-size: 13px;}
.nfm-avatar--lg { width: 48px; height: 48px; font-size: 16px;}
.nfm-avatar--xl { width: 64px; height: 64px; font-size: 20px;}
.nfm-avatar--square { border-radius: var(--radius-md);}
.nfm-avatar--navy { background: var(--nfm-navy-600);}
.nfm-avatar--success { background: var(--nfm-success);}
.nfm-avatar--warning { background: var(--nfm-warning-solid);}
.nfm-avatar--muted { background: var(--nfm-gray-300); color: var(--fg-strong);}
.nfm-avatar__group { display: inline-flex;}
.nfm-avatar__group .nfm-avatar { border: 2px solid var(--bg-surface); margin-left: -8px;}
.nfm-avatar__group .nfm-avatar:first-child { margin-left: 0;}

/* -------- SPINNER -------------------------------------------------------- */
.nfm-spinner { display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: nfm-spin 0.6s linear infinite; color: var(--nfm-navy-600);}
.nfm-spinner--sm { width: 14px; height: 14px;}
.nfm-spinner--md { width: 20px; height: 20px;}
.nfm-spinner--lg { width: 32px; height: 32px; border-width: 3px;}
.nfm-spinner--inverse { color: #fff;}
.nfm-spinner--muted { color: var(--fg-muted);}

/* -------- SKELETON ------------------------------------------------------- */
.nfm-skeleton { display: block; background: linear-gradient(90deg, var(--nfm-gray-100) 25%, var(--nfm-gray-50) 50%, var(--nfm-gray-100) 75%); background-size: 200% 100%; border-radius: var(--radius-sm); animation: nfm-shimmer 1.4s infinite linear;}
.nfm-skeleton--text { height: 14px; width: 100%; border-radius: var(--radius-sm);}
.nfm-skeleton--title { height: 22px; width: 60%;}
.nfm-skeleton--circle { border-radius: 50%; width: 36px; height: 36px;}
.nfm-skeleton--rect { height: 80px; border-radius: var(--radius-md);}
@keyframes nfm-shimmer { 0% { background-position: 200% 0;} 100% { background-position: -200% 0;}}
@media (prefers-reduced-motion: reduce) { .nfm-skeleton { animation-duration: 0.01ms;}}

/* -------- DIVIDER -------------------------------------------------------- */
.nfm-divider { border: 0; border-top: 1px solid var(--border-default); margin: var(--space-5) 0;}
.nfm-divider--strong { border-top-color: var(--border-strong);}
.nfm-divider--vertical { border-top: 0; border-left: 1px solid var(--border-default); height: auto; align-self: stretch; margin: 0 var(--space-3);}
.nfm-divider__label { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0; color: var(--fg-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;}
.nfm-divider__label::before, .nfm-divider__label::after { content: ""; flex: 1; height: 1px; background: var(--border-default);}

/* -------- TOOLTIP -------------------------------------------------------- */
/* Use with [data-tooltip="text"] or as a positioned popover. Production needs JS for positioning. */
.nfm-tooltip { display: inline-block; padding: 6px 10px; background: var(--nfm-navy-800); color: #fff; font-family: var(--font-sans); font-size: 12px; font-weight: 500; border-radius: var(--radius-md); max-width: 260px; line-height: 1.4; box-shadow: var(--shadow-md); position: relative;}
.nfm-tooltip::after { content: ""; position: absolute; border: 5px solid transparent;}
.nfm-tooltip--top::after { top: 100%; left: 50%; transform: translateX(-50%); border-top-color: var(--nfm-navy-800);}
.nfm-tooltip--bottom::after { bottom: 100%; left: 50%; transform: translateX(-50%); border-bottom-color: var(--nfm-navy-800);}
.nfm-tooltip--right::after { right: 100%; top: 50%; transform: translateY(-50%); border-right-color: var(--nfm-navy-800);}
.nfm-tooltip--left::after { left: 100%; top: 50%; transform: translateY(-50%); border-left-color: var(--nfm-navy-800);}

/* =========================================================================
   FEEDBACK — Banner, Progress, Stepper
   ========================================================================= */

/* -------- BANNER (persistent inline alert; toast is transient) ----------- */
.nfm-banner { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-lg); border: 1px solid; font-family: var(--font-sans);}
.nfm-banner__icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0;}
.nfm-banner__body { display: flex; flex-direction: column; gap: 2px; line-height: 1.45;}
.nfm-banner__title { font-size: 14px; font-weight: 700;}
.nfm-banner__msg { font-size: 13px; color: var(--fg-default);}
.nfm-banner__action { padding: 7px 14px; font-family: inherit; font-size: 13px; font-weight: 700; background: transparent; border: 1.5px solid currentColor; border-radius: var(--radius-md); cursor: pointer; white-space: nowrap;}
.nfm-banner__dismiss { width: 28px; height: 28px; border-radius: 50%; background: transparent; border: 0; color: inherit; cursor: pointer; display: grid; place-items: center; opacity: 0.65;}
.nfm-banner__dismiss:hover { opacity: 1;}
.nfm-banner--success { background: var(--nfm-success-bg); color: var(--nfm-success); border-color: var(--nfm-success-border);} .nfm-banner--success .nfm-banner__icon { background: var(--nfm-success-solid);}
.nfm-banner--info { background: var(--nfm-info-bg); color: var(--nfm-info); border-color: var(--nfm-info-border);} .nfm-banner--info .nfm-banner__icon { background: var(--nfm-info-solid);}
.nfm-banner--warning { background: var(--nfm-warning-bg); color: var(--nfm-warning); border-color: var(--nfm-warning-border);} .nfm-banner--warning .nfm-banner__icon { background: var(--nfm-warning-solid);}
.nfm-banner--error { background: var(--nfm-error-bg); color: var(--nfm-error); border-color: var(--nfm-error-border);} .nfm-banner--error .nfm-banner__icon { background: var(--nfm-error-solid);}

/* -------- PROGRESS BAR --------------------------------------------------- */
.nfm-progress { height: 8px; background: var(--nfm-gray-100); border-radius: var(--radius-pill); overflow: hidden;}
.nfm-progress__fill { height: 100%; background: var(--nfm-navy-600); border-radius: var(--radius-pill); transition: width var(--motion-slow) var(--ease-emphasized);}
.nfm-progress__fill--success { background: var(--nfm-success);}
.nfm-progress__fill--warning { background: var(--nfm-warning-solid);}
.nfm-progress__fill--error { background: var(--nfm-error-solid);}
.nfm-progress--sm { height: 4px;}
.nfm-progress--lg { height: 12px;}
.nfm-progress--striped .nfm-progress__fill { background-image: linear-gradient(45deg, rgba(255,255,255,0.18) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.18) 75%, transparent 75%); background-size: 16px 16px;}

/* -------- STEPPER -------------------------------------------------------- */
.nfm-stepper { display: flex; align-items: center; gap: 0;}
.nfm-stepper__step { display: flex; align-items: center; gap: 10px; flex: 0 0 auto;}
.nfm-stepper__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-sans); font-weight: 700; font-size: 13px; background: var(--bg-surface); border: 2px solid var(--border-strong); color: var(--fg-muted); flex-shrink: 0;}
.nfm-stepper__label { font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--fg-muted); white-space: nowrap;}
.nfm-stepper__step--done .nfm-stepper__dot { background: var(--nfm-navy-600); border-color: var(--nfm-navy-600); color: #fff;}
.nfm-stepper__step--done .nfm-stepper__label { color: var(--nfm-navy-600); font-weight: 600;}
.nfm-stepper__step--active .nfm-stepper__dot { background: var(--bg-surface); border-color: var(--nfm-navy-600); color: var(--nfm-navy-600); box-shadow: 0 0 0 4px var(--nfm-navy-50);}
.nfm-stepper__step--active .nfm-stepper__label { color: var(--nfm-navy-600); font-weight: 700;}
.nfm-stepper__line { flex: 1; min-width: 24px; height: 2px; background: var(--border-default); margin: 0 12px;}
.nfm-stepper__line--done { background: var(--nfm-navy-600);}

/* =========================================================================
   DISCLOSURE — Accordion, Drawer, Dropzone
   ========================================================================= */

/* -------- ACCORDION (use <details> for semantics) ------------------------ */
.nfm-accordion { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden;}
.nfm-accordion__item { border-bottom: 1px solid var(--border-subtle);}
.nfm-accordion__item:last-child { border-bottom: 0;}
.nfm-accordion__trigger { width: 100%; padding: 16px 20px; background: transparent; border: 0; cursor: pointer; display: flex; align-items: center; gap: 12px; font-family: var(--font-sans); font-size: 15px; font-weight: 600; color: var(--fg-strong); text-align: left;}
.nfm-accordion__trigger:hover { background: var(--nfm-gray-25);}
.nfm-accordion__trigger:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px;}
.nfm-accordion__chev { margin-left: auto; color: var(--fg-muted); transition: transform var(--motion-base) var(--ease-standard);}
.nfm-accordion__item[open] .nfm-accordion__chev { transform: rotate(180deg);}
.nfm-accordion__body { padding: 0 20px 18px; font-size: 14px; line-height: 1.6; color: var(--fg-default);}

/* -------- DRAWER --------------------------------------------------------- */
.nfm-drawer { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; pointer-events: none;}
.nfm-drawer__scrim { position: absolute; inset: 0; background: var(--scrim-bg); opacity: 0; transition: opacity var(--motion-slow);}
.nfm-drawer__panel { position: relative; background: var(--bg-surface); width: 460px; max-width: 90vw; box-shadow: var(--shadow-xl); transform: translateX(100%); transition: transform var(--motion-slow) var(--ease-emphasized); display: flex; flex-direction: column; margin-left: auto; pointer-events: auto;}
.nfm-drawer[aria-hidden="false"] { pointer-events: auto;}
.nfm-drawer[aria-hidden="false"] .nfm-drawer__scrim { opacity: 1;}
.nfm-drawer[aria-hidden="false"] .nfm-drawer__panel { transform: translateX(0);}
.nfm-drawer__head { padding: 20px 24px 14px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 14px;}
.nfm-drawer__title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--fg-strong); margin: 0; flex: 1;}
.nfm-drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px;}
.nfm-drawer__foot { padding: 16px 24px; border-top: 1px solid var(--border-subtle); background: var(--bg-surface-alt); display: flex; justify-content: flex-end; gap: 8px;}
.nfm-drawer--left .nfm-drawer__panel { transform: translateX(-100%); margin-left: 0; margin-right: auto;}
.nfm-drawer--left[aria-hidden="false"] .nfm-drawer__panel { transform: translateX(0);}

/* -------- DROPZONE / FILE UPLOAD ----------------------------------------- */
.nfm-dropzone { padding: 24px 20px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-surface); text-align: center; cursor: pointer; transition: all var(--motion-fast);}
.nfm-dropzone:hover, .nfm-dropzone--active { border-color: var(--nfm-navy-600); background: var(--nfm-navy-50);}
.nfm-dropzone__icon { width: 36px; height: 36px; border-radius: 50%; background: var(--nfm-gray-50); color: var(--fg-muted); display: grid; place-items: center; margin: 0 auto 10px;}
.nfm-dropzone:hover .nfm-dropzone__icon, .nfm-dropzone--active .nfm-dropzone__icon { background: var(--nfm-navy-600); color: #fff;}
.nfm-dropzone__title { font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--fg-strong); margin: 0 0 4px;}
.nfm-dropzone__hint { font-size: 12px; color: var(--fg-muted); margin: 0;}
.nfm-dropzone__hint b { color: var(--nfm-navy-600); font-weight: 700;}

/* =========================================================================
   MORTGAGE-SPECIFIC PRIMITIVES
   ========================================================================= */

/* -------- CURRENCY INPUT ------------------------------------------------- */
/* <div class="nfm-input-currency"><span class="nfm-input-currency__pfx">$</span><input value="425,000.00"></div> */
.nfm-input-currency, .nfm-input-percent { display: inline-flex; align-items: stretch; border: 1.5px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); overflow: hidden; transition: border-color var(--motion-fast);}
.nfm-input-currency:focus-within, .nfm-input-percent:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--nfm-navy-50);}
.nfm-input-currency__pfx, .nfm-input-percent__sfx { display: grid; place-items: center; padding: 0 14px; background: var(--nfm-gray-50); color: var(--fg-muted); font-family: var(--font-sans); font-size: 16px; font-weight: 700;}
.nfm-input-currency__pfx { border-right: 1px solid var(--border-default);}
.nfm-input-percent__sfx { border-left: 1px solid var(--border-default);}
.nfm-input-currency input, .nfm-input-percent input { flex: 1; border: 0; outline: 0; padding: 10px 14px; font-family: var(--font-sans); font-size: 16px; font-weight: 700; color: var(--nfm-navy-600); font-variant-numeric: tabular-nums lining-nums; min-width: 0; background: transparent;}
.nfm-input-currency--lg input, .nfm-input-percent--lg input { font-size: 22px; padding: 12px 16px;}
.nfm-input-currency[aria-invalid="true"], .nfm-input-percent[aria-invalid="true"] { border-color: var(--nfm-error);}

/* -------- BPS DISPLAY ---------------------------------------------------- */
.nfm-bps { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-sans); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums lining-nums;}
.nfm-bps--up { color: var(--nfm-success);}
.nfm-bps--down { color: var(--nfm-error);}
.nfm-bps--flat { color: var(--fg-muted);}

/* -------- FORMATTED LOAN ID --------------------------------------------- */
.nfm-loan-id { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--nfm-blue-400); text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;}
.nfm-loan-id:hover { color: var(--nfm-navy-600);}
.nfm-loan-id__copy { opacity: 0; transition: opacity var(--motion-fast); width: 12px; height: 12px;}
.nfm-loan-id:hover .nfm-loan-id__copy { opacity: 0.6;}

/* -------- RATE DISPLAY --------------------------------------------------- */
.nfm-rate { display: flex; flex-direction: column; gap: 2px;}
.nfm-rate__value { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--nfm-navy-600); letter-spacing: -0.01em; line-height: 1; font-variant-numeric: tabular-nums lining-nums;}
.nfm-rate__qual { font-family: var(--font-sans); font-size: 11px; color: var(--fg-muted); font-weight: 500;}
.nfm-rate--lg .nfm-rate__value { font-size: 32px;}
.nfm-rate--xl .nfm-rate__value { font-size: 42px;}
.nfm-rate--inline { flex-direction: row; align-items: baseline; gap: 8px;}
.nfm-rate--inline .nfm-rate__value { font-size: 18px;}

/* -------- ADDRESS BLOCK ------------------------------------------------- */
.nfm-address { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-sans); font-size: 14px; line-height: 1.4; color: var(--fg-default);}
.nfm-address__street { font-weight: 600; color: var(--fg-strong);}
.nfm-address__line2 { font-size: 13px; color: var(--fg-muted);}

/* =========================================================================
   LAYOUT UTILITIES
   ========================================================================= */
.nfm-container { max-width: 1320px; margin: 0 auto; padding: 0 var(--space-5);}
.nfm-container--sm { max-width: 720px;}
.nfm-container--md { max-width: 960px;}
.nfm-container--lg { max-width: 1280px;}
.nfm-container--xl { max-width: 1440px;}
.nfm-stack { display: flex; flex-direction: column; gap: var(--space-4);}
.nfm-stack--xs { gap: var(--space-1);} .nfm-stack--sm { gap: var(--space-2);} .nfm-stack--md { gap: var(--space-4);} .nfm-stack--lg { gap: var(--space-5);} .nfm-stack--xl { gap: var(--space-7);}
.nfm-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;}
.nfm-row--end { justify-content: flex-end;}
.nfm-row--between { justify-content: space-between;}

/* =========================================================================
   PAGE HEADER
   ========================================================================= */
.nfm-page-head { display: flex; align-items: flex-end; gap: var(--space-5); padding-bottom: var(--space-5); border-bottom: 1px solid var(--border-default); margin-bottom: var(--space-5);}
.nfm-page-head__titles { flex: 1;}
.nfm-page-head__eyebrow { font-family: var(--font-sans); font-size: 11px; font-weight: 700; color: var(--fg-muted); letter-spacing: 0.12em; text-transform: uppercase;}
.nfm-page-head__title { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--nfm-navy-600); letter-spacing: -0.02em; margin: 8px 0 0;}
.nfm-page-head__sub { color: var(--fg-muted); font-size: 14px; margin: 6px 0 0;}
.nfm-page-head__actions { display: flex; align-items: center; gap: var(--space-2); padding-bottom: 4px;}
