/* Store fixes (9 Nov, the pre-store review's polish): every rule under its switch's class on <html>
   (USE_PLUS_SCROLL → html.uf-plus-scroll, USE_WIDE_FIX → html.uf-wide-fix, USE_STORE_POLISH → html.uf-store-polish);
   with a switch off its rules are unused and the app is today's. Rules that must win over the review's sheets (lifted by
   :not(#u#r#e)) and the 7 Nov picks (:not(#a#g#l)) are lifted by :not(#s#f#x#y). */

/* ============ 1. the trainer's floating + slides away while the page scrolls down (USE_PLUS_SCROLL, D5) ============ */
html.uf-plus-scroll.uf-ui-review-8nov .u8-plus:not(#s#f#x#y){transition:transform .22s cubic-bezier(.2,.8,.2,1),opacity .22s ease,visibility 0s linear 0s}
html.uf-plus-scroll.uf-ui-review-8nov .u8-plus.sf-away:not(#s#f#x#y){transform:translateY(calc(var(--u8-plus-b) + 80px));opacity:0;visibility:hidden;pointer-events:none;
  transition:transform .22s cubic-bezier(.4,0,1,1),opacity .18s ease,visibility 0s linear .22s}
@media (prefers-reduced-motion:reduce){
  html.uf-plus-scroll.uf-ui-review-8nov .u8-plus:not(#s#f#x#y),html.uf-plus-scroll.uf-ui-review-8nov .u8-plus.sf-away:not(#s#f#x#y){transition:none}
}

/* ============ 3. the welcome screen's wordmark: the intro pages' XBAND FIT, in white and the dark blue on the dark page (USE_STORE_POLISH) ============ */
html.uf-store-polish.uf-onboarding-v2 .ob2 .sf-s1-w:not(#s#f#x#y){color:#FFFFFF}
html.uf-store-polish.uf-onboarding-v2 .ob2 .sf-s1-w b:not(#s#f#x#y){color:#5B78FF}

/* ============ 2. Export's period row fits a phone: tighter pills (Money's switch does the same below 400 px); the row itself
   scrolls (no scrollbar) rather than the page should a font run wider (USE_STORE_POLISH) ============ */
@media (max-width:429px){
  html.uf-store-polish.r6-ctl:is([data-skin=r]) .rv-exp .r6-per:not(#s#f#x#y){gap:0;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
  html.uf-store-polish.r6-ctl:is([data-skin=r]) .rv-exp .r6-per:not(#s#f#x#y)::-webkit-scrollbar{display:none}
  html.uf-store-polish.r6-ctl:is([data-skin=r]) .rv-exp .r6-per>button>span:not(#s#f#x#y){padding:0 8px}
  html.uf-store-polish.r6-ctl:is([data-skin=r]):not([dir=rtl]) .rv-exp .r6-per>button>span:not(#s#f#x#y){letter-spacing:.02em}
}

/* ============ 4. blue means tap: words that do not act are in ink, or in their status colour (USE_STORE_POLISH) ============ */
html.uf-store-polish:is([data-skin=r]) :is(.pk-word,.pk-st-n).blue:not(:is(button,a,[role=button]) *):not(#s#f#x#y){color:var(--pk-ink)}
html.uf-store-polish.uf-week-passport:is([data-skin=r]) .pk-wp-empty .pk-wp-in span.pk-wp-blue:not(#s#f#x#y){color:var(--pk-ink)}
html.uf-store-polish.uf-week-passport:is([data-skin=r]) .pk-wp-mini li.is-cur .pk-wp-pg:not(#s#f#x#y){color:var(--pk-ink)}
html.uf-store-polish.uf-punch-card:is([data-skin=r]) .pk-pc-h.k-booked:not(#s#f#x#y){color:var(--pk-ink)}
/* Analytics' pill: a status, so ink, and the positive status green when above the average or up (on its white pill over the
   blue card the light theme's values, fixed; on refresh 6's tinted pill the theme's own) */
html.uf-store-polish.uf-analytics-v3[data-skin=r] .av3-pill:not(#s#f#x#y){color:#0F1A2A}
html.uf-store-polish.uf-analytics-v3[data-skin=r] .av3-pill.sf-up:not(#s#f#x#y){color:#06744C}
html.uf-store-polish.r6-ana:is([data-skin=r]) .r6-av3-swp .av3-card .av3-pill:not(#s#f#x#y){color:var(--ink)}
html.uf-store-polish.r6-ana:is([data-skin=r]) .r6-av3-swp .av3-card .av3-pill.sf-up:not(#s#f#x#y){color:var(--ok)}

/* ============ 5. wide screens and iPad (USE_WIDE_FIX, D9) ============ */
/* the header art is measured from its page's padding box (R6Art), but on a page laid out as a grid (.scr.wide from 1100 px)
   its grid-column 1 / -1 made the content box (32 px further in) its containing block, so it stood 32 px past the window
   (trainee Home, trainer Trainees at 1366 and 1440): placed by the page's own edges again, inside the page */
html.uf-wide-fix.r6-art:is([data-skin=r]) .r6-art:not(html):not(#s#f#x#y){grid-column:auto;grid-row:auto}
/* and its faded icons stay inside the art's own box (an icon placed for a width the page had a moment before stood 4 px past
   the window on trainer Insights at 1180 px) */
html.uf-wide-fix.r6-art:is([data-skin=r]) .r6-art:not(html)>.r6-ics:not(#s#f#x#y){overflow:hidden}

/* ============ 7. Reports' first column (greports): when the table does not fit, a label wraps onto a second line instead
   of being cut at the column's 180 px (USE_STORE_POLISH; the gym portal, lifted over Gym UI v2's nowrap) ============ */
html.uf-store-polish.portal-v3:not([data-skin]) .tbl-wrap:not(.fits) .tbl.rep td:first-child:not(#s#f#x#y#a#b#c){white-space:normal;overflow-wrap:break-word;text-wrap:pretty}

/* ============ 6. contrast in dark mode (axe, USE_STORE_POLISH): white words never on the light act blue (#5B78FF, 3.8:1)
   but on the brand blue #3557F5 (5.5:1); the gym portal's links in the lighter blue #7C93FF (its own hover blue, 6.5:1 on a
   card) instead of #5B78FF (4.6:1, below 4.5 while a card fades in) ============ */
html.uf-store-polish.r6-ctl:is([data-skin=r][data-theme=dark]) .r6-per>button[aria-pressed=true]>span:not(#s#f#x#y),
html.uf-store-polish.r6-ctl:is([data-skin=r][data-theme=dark]) .r6-per>.r6-per-c[aria-pressed=true]>span:not(#s#f#x#y),
html.uf-store-polish.uf-playground-v2:is([data-skin=r][data-theme=dark]) .pg2-pill:not(.sec):not(#s#f#x#y){background:#3557F5}
@media (prefers-color-scheme:dark){
  html.uf-store-polish.r6-ctl:is([data-skin=r]):not([data-theme=light]) .r6-per>button[aria-pressed=true]>span:not(#s#f#x#y),
  html.uf-store-polish.r6-ctl:is([data-skin=r]):not([data-theme=light]) .r6-per>.r6-per-c[aria-pressed=true]>span:not(#s#f#x#y),
  html.uf-store-polish.uf-playground-v2:is([data-skin=r]):not([data-theme=light]) .pg2-pill:not(.sec):not(#s#f#x#y){background:#3557F5}
}
html.uf-store-polish.uf-gym-ui-v2.portal-v3:not([data-skin])[data-theme=dark]:not(#s#f#x#y#a#b#c){--p3-link:#7C93FF}
html.uf-store-polish.uf-gym-ui-v2.portal-v3:not([data-skin])[data-theme=dark] .link:not(.danger):not(.mute):not(.on-navy):not(#s#f#x#y#a#b#c){color:#7C93FF}
html.uf-store-polish.uf-gym-ui-v2.portal-v3:not([data-skin])[data-theme=dark] .p3-split:not(.secondary):not(.outline):not(#s#f#x#y#a#b#c){--pl-bg:#3557F5;--pl-bg-h:#2F4BE8;--pl-bg-p:#2A44D6;--pl-line:#3557F5}
@media (prefers-color-scheme:dark){
  html.uf-store-polish.uf-gym-ui-v2.portal-v3:not([data-skin]):not([data-theme=light]):not(#s#f#x#y#a#b#c){--p3-link:#7C93FF}
  html.uf-store-polish.uf-gym-ui-v2.portal-v3:not([data-skin]):not([data-theme=light]) .link:not(.danger):not(.mute):not(.on-navy):not(#s#f#x#y#a#b#c){color:#7C93FF}
  html.uf-store-polish.uf-gym-ui-v2.portal-v3:not([data-skin]):not([data-theme=light]) .p3-split:not(.secondary):not(.outline):not(#s#f#x#y#a#b#c){--pl-bg:#3557F5;--pl-bg-h:#2F4BE8;--pl-bg-p:#2A44D6;--pl-line:#3557F5}
}
/* light mode: the portal's muted words on a grey track (the Gym / Finance switch, a page's segmented control, the sidebar's
   count on the page open) at 4.3:1 take the darker grey #4A5A6E (5.5:1) */
html.uf-store-polish.uf-gym-ui-v2.portal-v3:not([data-skin])[data-theme=light] :is(.p3-seg>button:not(.on):not([aria-checked=true]),.p3-nrow.on .nav-c):not(#s#f#x#y#a#b#c){color:#4A5A6E}
@media (prefers-color-scheme:light){
  html.uf-store-polish.uf-gym-ui-v2.portal-v3:not([data-skin]):not([data-theme]) :is(.p3-seg>button:not(.on):not([aria-checked=true]),.p3-nrow.on .nav-c):not(#s#f#x#y#a#b#c){color:#4A5A6E}
}
