/* polish.css: small, cheap wins. Everything here is either free or makes the page do LESS work. */

/* only the first 8 rows of a list play the pop-in; the rest just appear (dozens of staggered animations = dozens of style recalcs) */
html body .stagger-container > *:nth-child(n+9):not(#pla):not(#plb):not(#plc):not(#pld):not(#ple):not(#plf):not(#plg):not(#plh):not(#pli) { animation: none !important; }

/* long repeated rows: the browser skips drawing the ones that are off-screen */
html body .lb-row:not(#pla):not(#plb):not(#plc):not(#pld):not(#ple):not(#plf):not(#plg):not(#plh):not(#pli), html body .faq-item:not(#pla):not(#plb):not(#plc):not(#pld):not(#ple):not(#plf):not(#plg):not(#plh):not(#pli) { content-visibility: auto; contain-intrinsic-size: auto 84px; }

/* touch: no 300ms tap delay, no grey flash on tap, no accidental double-tap zoom on buttons */
html body :is(button, a, [role="button"], .nav-btn, summary, label):not(#pla):not(#plb):not(#plc):not(#pld):not(#ple):not(#plf):not(#plg):not(#plh):not(#pli) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* scrolling panels do not chain-scroll the page behind them */
html body :is(.glass-main-panel, .view-panel, [id$="-modal"] > div):not(#pla):not(#plb):not(#plc):not(#pld):not(#ple):not(#plf):not(#plg):not(#plh):not(#pli) { overscroll-behavior: contain; }

/* crisper text, steadier layout */
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeSpeed; }
html body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* people who asked their phone for less motion get none */
@media (prefers-reduced-motion: reduce) {
    html *, html *::before, html *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---- readability fixes found by the light/dark visibility audit ---- */

/* active filter chips / primary pills: white text always sits on a real brand colour (it turned white-on-white in light mode) */
html body button.bg-indigo-600.text-white:not(#pf1):not(#pf2):not(#pf3):not(#pf4):not(#pf5):not(#pf6):not(#pf7) { background-color: #6366f1 !important; background-image: linear-gradient(135deg, #6366f1, #8b5cf6) !important; color: #ffffff !important; border-color: transparent !important; }

/* notification bell: no red "0"; when there is something to read the badge is solid red with white text */
html body #ntf-badge:not(.ntf-on):not(#pf1):not(#pf2):not(#pf3):not(#pf4):not(#pf5):not(#pf6):not(#pf7) { display: none !important; }
html body #ntf-badge.ntf-on:not(#pf1):not(#pf2):not(#pf3):not(#pf4):not(#pf5):not(#pf6):not(#pf7) { background: #dc2626 !important; color: #ffffff !important; }

/* the tiniest labels (7px) were not readable: 8.5px is the smallest we allow */
html body .text-\[7px\]:not(#pf1):not(#pf2):not(#pf3):not(#pf4):not(#pf5):not(#pf6):not(#pf7) { font-size: 8.5px !important; }
