/* ============================================================
   Purple Login — Global polish layer  [v5.20.160]
   Safe, additive, site-wide refinements only. NO layout changes
   (no padding/margin/width/grid), NO colour rewrites, NO radius
   changes — those are done per-surface with visual verification.
   Loaded last (depends on pl-gap-enforce) so these refinements win,
   while deliberately touching only "feel" properties that can't
   break alignment or overwrite the palette.
   ============================================================ */

/* 1. Crisper, more legible text everywhere ------------------- */
html body,
html body input,
html body button,
html body textarea,
html body select {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 2. Smooth, consistent micro-transitions on interactive bits -
      makes hovers/taps feel intentional rather than instant. */
html body a,
html body button,
html body .up-btn,
html body .eng-tab,
html body .cpv-tab,
html body .pj-tab,
html body .cr-btn,
html body [role="button"],
html body input,
html body select,
html body textarea {
  transition: background-color .16s ease,
              color .16s ease,
              border-color .16s ease,
              box-shadow .16s ease,
              opacity .16s ease,
              transform .12s ease;
}

/* 3. Consistent keyboard focus ring (accessibility + tidiness).
      Only for keyboard users, so mouse clicks stay clean. */
html body :focus-visible {
  outline: 2px solid var(--c-primary, #5f5d58);
  outline-offset: 2px;
  border-radius: inherit;
}

/* 4. Refined, unobtrusive scrollbars (WebKit + Firefox) ------ */
html body * {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.22) transparent;
}
html body ::-webkit-scrollbar { width: 10px; height: 10px; }
html body ::-webkit-scrollbar-track { background: transparent; }
html body ::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.20);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
html body ::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,.34);
  background-clip: padding-box;
}

/* 5. Smoother avatar/media edges; avoid blurry upscaled images */
html body img,
html body .up-avatar img,
html body .cpv-logo,
html body .sidebar-profile img {
  image-rendering: auto;
}

/* 6. Kinder text wrapping in cards/labels (fewer awkward breaks) */
html body p,
html body .up-name,
html body .up-title,
html body .cpv-header-info,
html body .cr-card {
  overflow-wrap: anywhere;
  word-break: normal;
}
