/*
 * Parallel render stability layer
 *
 * This file is intentionally loaded last in <head>. The application builds
 * parts of Pulse after the first paint, while remote font faces can also
 * finish loading at roughly the same time. Keep the final render identical
 * to the first, correct frame by making the typography source deterministic
 * and by avoiding font-metric transitions during hydration.
 */

:root {
  --parallel-ui-font: "Segoe UI", Arial, sans-serif;
  --parallel-number-font: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--parallel-ui-font) !important;
  font-synthesis: none;
}

/* Application text must inherit the stable UI face. Icon-font and SVG
   elements are excluded so glyph icons continue to render correctly. */
body :where(
  div,
  span,
  p,
  a,
  label,
  th,
  td,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6
):not([class^="ri-"]):not([class*=" ri-"]):not(.remixicon):not(.axiom-icon) {
  font-family: inherit !important;
}

/* Preserve the requested mono treatment for market figures without letting
   a late remote webfont alter character width after the first paint. */
body :where(
  .number,
  .numeric,
  .mono,
  .market-value,
  .token-price,
  .token-stat-value,
  .wallet-balance,
  .status-value,
  [data-number],
  [data-numeric]
) {
  font-family: var(--parallel-number-font) !important;
  font-variant-numeric: tabular-nums;
}

/* Camera is an image-hover affordance, never a permanent avatar badge. */
body :where(
  .token-camera,
  .camera-badge,
  .camera-overlay,
  .avatar-camera,
  .token-avatar-camera,
  [data-camera-overlay]
) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 140ms ease, visibility 140ms ease !important;
}

body :where(.token-avatar, .token-image, .token-cover, [data-token-image]):hover
  :where(
    .token-camera,
    .camera-badge,
    .camera-overlay,
    .avatar-camera,
    .token-avatar-camera,
    [data-camera-overlay]
  ) {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Avoid a layout animation replay when the JS render pass replaces the
   initial markup. Interactive hover transitions remain intact. */
html:not(.parallel-ready) body {
  animation: none !important;
}
