/* Clean UI (USE_CLEAN_UI in js/core/flags.js, 1 Nov; DESIGN.md "Clean UI"). Loaded last. Every rule sits under
   html.uf-clean-ui, the class flags.js sets on <html> while the switch is on (tests/unit/clean-ui.test.cjs checks it), so
   with the switch off nothing here matches and every page is exactly as before. Three layers, in order:
   1. tokens: the fonts, the Apple type scale, spacing, corners and depth, for the two apps and the gym portal;
   2. components and the five page blocks of the two apps (hero, action row, card row, list, sheet);
   3. motion, from the Stageshow skill's values (.claude/skills/stageshow), rebuilt in CSS (no runtime added).
   Selectors repeat the scope of the rule they override and add html.uf-clean-ui, so they win by specificity, never by
   !important. RTL beside the rule it mirrors. */

/* ================= 1. tokens ================= */
/* the font stacks: Anton for display, Inter for text (the 'Inter Text' faces, css/fonts.css), Noto Kufi Arabic for Arabic */
html.uf-clean-ui{
  --cu-disp:'Anton','Inter Text','Inter',sans-serif;
  --cu-text:'Inter Text','Inter','Noto Kufi Arabic',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --cu-ar:'Noto Kufi Arabic','Inter Text','Inter',system-ui,sans-serif;
  --cu-ar-disp:'Noto Kufi Arabic','Anton','Inter Text',sans-serif;
  /* the motion values (section 6), from Stageshow's kit: arrive fast and settle long, leave by accelerating, numbers on
     their own counting curve; 120 ms presses, 240 ms moves, 280 ms exits, 550 ms for a big win's entrance */
  --cu-ease:cubic-bezier(.22,1,.36,1);--cu-ease-x:cubic-bezier(.55,0,1,.45);--cu-ease-n:cubic-bezier(.3,.75,.1,1);--cu-spring:cubic-bezier(.34,1.56,.64,1);
  --cu-t-press:120ms;--cu-t-move:240ms;--cu-t-exit:280ms;--cu-t-big:550ms;
  /* depth: two levels, soft (cards) and raised (sheets and pop-ups) */
  --cu-elev-1:0 1px 2px rgba(14,20,36,.04),0 4px 14px -6px rgba(14,20,36,.10);
  --cu-elev-2:0 18px 44px -14px rgba(14,20,36,.26),0 4px 12px -4px rgba(14,20,36,.10);
  /* shape: 8 chips and tags, 12 fields, 16 cards, 24 sheets and hero cards, pills for buttons */
  --cu-r-chip:8px;--cu-r-field:12px;--cu-r-card:16px;--cu-r-sheet:24px;
  --cu-gut:16px;--cu-gap:12px;--cu-sec:24px;
  /* the shared tokens */
  --font:var(--cu-text);--font-d:var(--cu-text);--font-text:var(--cu-text);--font-display:var(--cu-text);--font-ar:var(--cu-ar);
  --fs-1:12px;--fs-2:15px;--fs-3:16px;--fs-4:20px;--fs-5:28px;--fs-6:40px;--fs-7:64px;
  --fw-1:400;--fw-2:500;--fw-3:700;
  --r-1:8px;--r-2:12px;--r-3:16px;
  --elev-1:var(--cu-elev-1);--elev-2:var(--cu-elev-2);
  --t-1:var(--cu-t-press);--t-2:var(--cu-t-move);--t-3:300ms;
  /* the type layer (css/type-v2.css): Hero 64 and Display 40 in Anton, the Eyebrow and every other style in Inter; 600 is
     500 and 800 is 700; Page title 34, the large title */
  --ty-ff-text:var(--cu-text);--ty-ff-cond:var(--cu-text);--ty-ff-disp:var(--cu-disp);--ty-ff-eye:var(--cu-text);
  --ty-heavy:400;--ty-w6:500;--ty-hero-lh:1.02;--ty-display-lh:1.02;
  --ty-hero-fs:64px;--ty-display-fs:40px;--ty-eyebrow-fs:13px;--ty-page-fs:34px;--ty-section-fs:20px;--ty-bodyl-fs:17px;--ty-body-fs:15px;--ty-small-fs:13px;--ty-label-fs:12px;
  /* the pill buttons (css/btn-pill.css) */
  --pl-ff:var(--cu-text);
  font-variant-numeric:tabular-nums;font-synthesis-weight:none;
}
/* USE_GYM_FIXES: the gym portal (no skin on <html>) draws every hyphen from 'XB Hyphen' (css/fonts.css), the plain Inter
   hyphen, so tabular figures no longer widen it ("check-in", not "check - in") */
html.uf-clean-ui.uf-gym-fixes:not([data-skin]){
  --cu-text:'XB Hyphen','Inter Text','Inter','Noto Kufi Arabic',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --cu-ar:'Noto Kufi Arabic','XB Hyphen','Inter Text','Inter',system-ui,sans-serif;
}
/* Futura Condensed ExtraBold first when USE_FUTURA_DISPLAY is on (no files shipped: an installed Futura, else Anton) */
html.uf-clean-ui.uf-futura-display{--cu-disp:'Futura Condensed ExtraBold','Futura PT Cond','Anton','Inter Text','Inter',sans-serif}
/* Arabic: Noto Kufi Arabic for every word, 800 for display, no capitals, line height 1.3; Latin digits from Inter or Anton */
html.uf-clean-ui[dir=rtl]{--font:var(--cu-ar);--font-d:var(--cu-ar);--font-text:var(--cu-ar);
  --ty-ff-text:var(--cu-ar);--ty-ff-cond:var(--cu-ar);--ty-ff-disp:var(--cu-ar-disp);--ty-ff-eye:var(--cu-ar);
  --ty-heavy:800;--ty-caps:none;--ty-ls-eye:0;--ty-hero-lh:1.3;--ty-display-lh:1.3;--pl-ff:var(--cu-ar)}
/* dark keeps no shadows, as today */
html.uf-clean-ui[data-theme=dark]{--elev-1:none;--elev-2:none;--cu-elev-1:none;--cu-elev-2:none}
@media (prefers-color-scheme:dark){html.uf-clean-ui:not([data-theme=light]){--elev-1:none;--elev-2:none;--cu-elev-1:none;--cu-elev-2:none}}

/* the revamp skin's tokens (on <html> and on each app shell, both carry data-skin=r) */
html.uf-clean-ui[data-skin=r]{
  --font-display:var(--cu-text);--font-text:var(--cu-text);--font-ar:var(--cu-ar);
  --rv-text:var(--cu-text);--rv-disp:var(--cu-text);--rv-num:var(--cu-text);--rv-loud:var(--cu-disp);
  --rv-lh-d:1.02;--rv-card-sh:var(--cu-elev-1);--r-hero:var(--cu-r-sheet);
  --rv-ty-page:34px;--rv-ty-page-lh:41px;--rv-ty-sec:20px;--rv-ty-sec-lh:25px;--rv-ty-row:17px;--rv-ty-body:15px;--rv-ty-meta:13px;--rv-ty-meta-lh:18px;--rv-ty-eye:12px;
  --rv-pop:var(--cu-ease);
}
html.uf-clean-ui [data-skin=r]{
  --font-display:var(--cu-text);--font-text:var(--cu-text);--font-ar:var(--cu-ar);
  --rv-text:var(--cu-text);--rv-disp:var(--cu-text);--rv-num:var(--cu-text);--rv-loud:var(--cu-disp);
  --rv-lh-d:1.02;--rv-card-sh:var(--cu-elev-1);--r-hero:var(--cu-r-sheet);
  --rv-ty-page:34px;--rv-ty-page-lh:41px;--rv-ty-sec:20px;--rv-ty-sec-lh:25px;--rv-ty-row:17px;--rv-ty-body:15px;--rv-ty-meta:13px;--rv-ty-meta-lh:18px;--rv-ty-eye:12px;
  --rv-pop:var(--cu-ease);
}
html.uf-clean-ui[dir=rtl][data-skin=r],html.uf-clean-ui[dir=rtl] [data-skin=r]{--rv-text:var(--cu-ar);--rv-disp:var(--cu-ar);--rv-num:var(--cu-text);--rv-loud:var(--cu-ar-disp);--rv-lh-d:1.3}
html.uf-clean-ui[data-theme=dark][data-skin=r],html.uf-clean-ui[data-theme=dark] [data-skin=r]{--rv-card-sh:none}
@media (prefers-color-scheme:dark){html.uf-clean-ui:not([data-theme=light])[data-skin=r],html.uf-clean-ui:not([data-theme=light]) [data-skin=r]{--rv-card-sh:none}}
/* the pages kept in their own look (rv-own) take the fonts and tokens only */
html.uf-clean-ui [data-skin=r].app .rv-own:not(#cu){--font:var(--cu-text);--font-d:var(--cu-text)}
html.uf-clean-ui[dir=rtl] [data-skin=r].app .rv-own:not(#cu){--font:var(--cu-ar);--font-d:var(--cu-ar)}

/* the gym portal (sections 1 to 3 only, no layout change) */
html.uf-clean-ui.portal-v3:not([data-skin]){--p3-ff:var(--cu-text);--p3-ff-cond:var(--cu-text);
  --p3-title-xl-fs:34px;--p3-title-xl-lh:41px;--p3-title-fs:28px;--p3-title-lh:34px;--p3-section-fs:22px;--p3-section-lh:28px;--p3-label-fs:13px;--p3-label-lh:18px;
  --p3-big-num-fs:64px;--p3-big-num-lh:66px;--p3-hero-num-fs:40px;--p3-hero-num-lh:42px;
  --p3-r-chip:8px;--p3-r-field:12px;--p3-r-tile:16px;--p3-r-card:16px;--p3-r-card-lg:24px}
html.uf-clean-ui.portal-v3:not([data-skin])[dir=rtl]{--p3-ff:var(--cu-ar);--p3-ff-cond:var(--cu-ar)}
@media (max-width:767px){html.uf-clean-ui.portal-v3:not([data-skin]){--p3-title-xl-fs:28px;--p3-title-xl-lh:34px;--p3-title-fs:28px;--p3-title-lh:34px;--p3-section-fs:20px;--p3-section-lh:25px;--p3-hero-num-fs:40px;--p3-hero-num-lh:42px;--p3-big-num-fs:40px;--p3-big-num-lh:42px}}
/* the portal's big numbers in Anton (64 and 40 only, never below 28) */
html.uf-clean-ui.portal-v3:not([data-skin]) .p3-big-num:not(#p1):not(#p2):not(#p3):not(#p4):not(#cu),
html.uf-clean-ui.portal-v3:not([data-skin]) .p3-hero-num:not(#p1):not(#p2):not(#p3):not(#p4):not(#cu){font-family:var(--cu-disp);font-weight:400;letter-spacing:0;line-height:1.02}
html.uf-clean-ui.portal-v3:not([data-skin])[dir=rtl] :is(.p3-big-num,.p3-hero-num):not(#p1):not(#p2):not(#p3):not(#p4):not(#cu){font-family:var(--cu-ar-disp);font-weight:800;line-height:1.3}

/* ================= 2. type, controls and the five blocks ================= */
/* large titles: 34, bold (Inter 700), the page's own; in Arabic 800 */
html.uf-clean-ui :is([data-skin=r]) :is(.rv-title,.h1):not(.rv-loud):not(.rv-own *):not(.sheet *):not(#rv7):not(#cu){font-family:var(--cu-text);font-weight:700;letter-spacing:-.01em;text-transform:none}
html.uf-clean-ui[dir=rtl] :is([data-skin=r]) :is(.rv-title,.h1):not(.rv-loud):not(.rv-own *):not(.sheet *):not(#rv7):not(#cu){font-family:var(--cu-ar);font-weight:800;letter-spacing:0}
html.uf-clean-ui :is([data-skin=r]) :is(.rv-h,.h2):not(.rv-loud):not(.rv-own *):not(.sheet-h *):not(#rv7):not(#cu){font-weight:700}
/* the loud type: Anton 400 caps (Noto Kufi 800 in Arabic) */
html.uf-clean-ui :is([data-skin=r]) .rv-loud:not(#cu){font-family:var(--cu-disp);font-weight:400;letter-spacing:0;line-height:1.02;text-transform:uppercase}
html.uf-clean-ui[dir=rtl] :is([data-skin=r]) .rv-loud:not(#cu){font-family:var(--cu-ar-disp);font-weight:800;line-height:1.3;text-transform:none}

/* cards: white on the light page, 16 corners, the soft level; sheets 24 corners and the raised level */
html.uf-clean-ui [data-skin=r] :is(.card,.rv-card):not(.rv-own *):not(#cu){border-radius:var(--cu-r-card)}
html.uf-clean-ui :is(.sheet,.rv-sheet,.overlay .sheet):not(#cu){border-start-start-radius:var(--cu-r-sheet);border-start-end-radius:var(--cu-r-sheet)}
html.uf-clean-ui [data-skin=r] :is(.chip,.rv-chip,.tag):not(#cu){border-radius:var(--cu-r-chip)}
html.uf-clean-ui [data-skin=r] :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not(#cu){border-radius:var(--cu-r-field)}

/* period choices (1W, 1M, 3M, …) keep refresh 6's Apple period buttons: plain options, the chosen one a filled blue pill,
   no grey track behind them (Ahmed's approval notes, 1 Nov) */

/* 1. the hero: the one big number of the page, Anton (64 or 40) where the type layer marks it Hero or Display */
/* 2. the action row: 2 to 4 equal buttons, an icon over at most two words */
html.uf-clean-ui .cu-acts{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));gap:8px;margin-block:var(--cu-gap)}
html.uf-clean-ui .cu-acts.n2{--n:2}html.uf-clean-ui .cu-acts.n4{--n:4}html.uf-clean-ui .cu-acts.n1{--n:1}
html.uf-clean-ui .cu-act{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:72px;min-width:44px;padding:10px 6px;border:0;border-radius:var(--cu-r-card);background:var(--surface);box-shadow:var(--cu-elev-1);color:var(--ink);font-family:var(--cu-text);font-size:13px;font-weight:500;line-height:1.2;text-align:center;cursor:pointer}
html.uf-clean-ui[dir=rtl] .cu-act{font-family:var(--cu-ar)}
html.uf-clean-ui .cu-act-i{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--fill);color:var(--rv-act,var(--blue-600))}
html.uf-clean-ui .cu-act.on .cu-act-i{background:var(--ok-soft,var(--fill));color:var(--ok,var(--blue-600))}
html.uf-clean-ui .cu-act-l{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.uf-clean-ui .cu-act-s{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:400;color:var(--ink-3)}
html.uf-clean-ui[data-theme=dark] .cu-act{border:1px solid var(--line)}
@media (prefers-color-scheme:dark){html.uf-clean-ui:not([data-theme=light]) .cu-act{border:1px solid var(--line)}}

/* 3. the card row: one big number, a ring or a bar, one short label; swipes and settles on a card (section 5); from 768
   px a row whose cards fit is a grid with no swipe */
html.uf-clean-ui .cu-cards{margin-block:var(--cu-gap)}
html.uf-clean-ui .cu-cards-t{display:flex;gap:var(--cu-gap);margin-inline:calc(-1 * var(--cu-gut));padding:2px var(--cu-gut) 8px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:var(--cu-gut);overscroll-behavior-x:contain;scrollbar-width:none}
html.uf-clean-ui .cu-cards-t::-webkit-scrollbar{display:none}
html.uf-clean-ui .cu-card-w{flex:0 0 148px;display:flex;scroll-snap-align:start;scroll-snap-stop:always}
html.uf-clean-ui .cu-card{flex:1 1 auto;width:100%;display:grid;grid-template-columns:1fr auto;grid-template-areas:'n m' 'l l';align-items:end;gap:8px 8px;min-height:112px;padding:16px;border:0;border-radius:var(--cu-r-card);background:var(--surface);box-shadow:var(--cu-elev-1);color:var(--ink);text-align:start;cursor:pointer}
html.uf-clean-ui[data-theme=dark] .cu-card{border:1px solid var(--line)}
@media (prefers-color-scheme:dark){html.uf-clean-ui:not([data-theme=light]) .cu-card{border:1px solid var(--line)}}
html.uf-clean-ui .cu-card-n{grid-area:n;font-family:var(--cu-disp);font-size:40px;line-height:1.02;font-weight:400;letter-spacing:0;font-variant-numeric:tabular-nums}
html.uf-clean-ui .cu-card-n small{margin-inline-start:2px;font-family:var(--cu-text);font-size:15px;font-weight:500;color:var(--ink-3)}
html.uf-clean-ui .cu-card-l{grid-area:l;font-family:var(--cu-text);font-size:13px;font-weight:500;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.uf-clean-ui[dir=rtl] .cu-card-l{font-family:var(--cu-ar)}
html.uf-clean-ui .cu-card-ring{grid-area:m;width:36px;height:36px}
html.uf-clean-ui .cu-card-ring svg{width:36px;height:36px;transform:rotate(-90deg)}
html.uf-clean-ui[dir=rtl] .cu-card-ring svg{transform:rotate(-90deg) scaleY(-1)}
html.uf-clean-ui .cu-card-ring circle{fill:none;stroke:var(--fill-2);stroke-width:5}
html.uf-clean-ui .cu-card-ring circle.on{stroke:var(--blue-600);stroke-linecap:round;transition:stroke-dasharray var(--cu-t-big) var(--cu-ease-n)}
html.uf-clean-ui .cu-card-bar{grid-area:m;align-self:center;width:44px;height:6px;border-radius:3px;background:var(--fill-2);overflow:hidden}
html.uf-clean-ui .cu-card-bar i{display:block;height:100%;width:calc(var(--p) * 100%);border-radius:3px;background:var(--blue-600);transition:width var(--cu-t-big) var(--cu-ease-n)}
@media (min-width:768px){html.uf-clean-ui .cu-cards:is(.n1,.n2,.n3,.n4) .cu-cards-t{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));overflow:visible;margin-inline:0;padding-inline:0}}

/* the up and down chip: green with an up arrow, red with a down arrow */
html.uf-clean-ui .cu-dlt{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:var(--cu-r-chip);background:var(--fill);color:var(--ink-2);font-family:var(--cu-text);font-size:13px;font-weight:500}
html.uf-clean-ui .cu-dlt.up{background:var(--ok-soft,var(--fill));color:var(--ok)}
html.uf-clean-ui .cu-dlt.down{background:var(--bad-soft,var(--fill));color:var(--bad)}
/* one chip to another page */
html.uf-clean-ui .cu-chip{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border:0;border-radius:var(--cu-r-chip);background:var(--fill);color:var(--ink);font-family:var(--cu-text);font-size:13px;font-weight:500;cursor:pointer;justify-self:start}

/* Home's body summary (no Body Twin figure on Home) */
html.uf-clean-ui .cu-bd{position:relative;display:grid;gap:12px;width:100%;margin-block:var(--cu-gap);padding:16px;border:0;border-radius:var(--cu-r-card);background:var(--surface);box-shadow:var(--cu-elev-1);color:var(--ink);text-align:start;cursor:pointer}
html.uf-clean-ui[data-theme=dark] .cu-bd{border:1px solid var(--line)}
@media (prefers-color-scheme:dark){html.uf-clean-ui:not([data-theme=light]) .cu-bd{border:1px solid var(--line)}}
html.uf-clean-ui .cu-bd .rv-hb-blur{display:grid;gap:12px}
html.uf-clean-ui .cu-bd-h{font-family:var(--cu-text);font-size:15px;font-weight:700;color:var(--ink)}
html.uf-clean-ui[dir=rtl] .cu-bd-h{font-family:var(--cu-ar)}
html.uf-clean-ui .cu-bd-r{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
html.uf-clean-ui .cu-bd-n b{font-family:var(--cu-disp);font-size:64px;line-height:1.02;font-weight:400}
html.uf-clean-ui .cu-bd-n small{margin-inline-start:4px;font-family:var(--cu-text);font-size:17px;font-weight:500;color:var(--ink-3)}
html.uf-clean-ui .cu-bd-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
html.uf-clean-ui .cu-bd-top .cu-dlt{flex:none}
html.uf-clean-ui .cu-spark{flex:none;overflow:visible}
html.uf-clean-ui .cu-spark>path{fill:none;stroke:var(--blue-600);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html.uf-clean-ui .cu-spark circle{fill:var(--blue-600)}
html.uf-clean-ui .cu-spark-s line{stroke:var(--line);stroke-width:1;stroke-dasharray:2 3}
html.uf-clean-ui .cu-spark-s text{fill:var(--ink-3);font-family:var(--cu-text);font-size:11px;font-variant-numeric:tabular-nums}
html.uf-clean-ui .cu-bd-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:12px;border-top:1px solid var(--line)}
html.uf-clean-ui .cu-bd-3>span{display:grid;gap:2px}
html.uf-clean-ui .cu-bd-3 small{font-family:var(--cu-text);font-size:12px;font-weight:500;color:var(--ink-3)}
html.uf-clean-ui[dir=rtl] .cu-bd-3 small{font-family:var(--cu-ar)}
html.uf-clean-ui .cu-bd-3 b{font-family:var(--cu-text);font-size:17px;font-weight:700}
html.uf-clean-ui .cu-bd.cu-inv{cursor:default}
html.uf-clean-ui .cu-inv-t{font-family:var(--cu-text);font-size:17px;font-weight:500}
html.uf-clean-ui[dir=rtl] .cu-inv-t{font-family:var(--cu-ar)}
html.uf-clean-ui .cu-inv-b{justify-self:start}
html.uf-clean-ui .cu-bd.rv-hb-lock{cursor:default}

/* trainee Home: one section gap (24) between the blocks */
html.uf-clean-ui [data-skin=r] .rv-th>.th-side>.rv-hr:not(#cu),html.uf-clean-ui [data-skin=r] .rv-th .rv-hr:not(#cu){margin-top:var(--cu-sec)}
html.uf-clean-ui [data-skin=r] .rv-th .rv-th-rows:not(#cu){margin-top:var(--cu-gap)}
html.uf-clean-ui [data-skin=r] .rv-th .rv-th-rows:empty:not(#cu),html.uf-clean-ui [data-skin=r] .rv-th .rv-th-coach:empty:not(#cu){display:none}

/* 4. lists: one line per item, numbers at the end in the secondary colour, inset hairlines, 44 px rows at least */
html.uf-clean-ui [data-skin=r] :is(.rv-row,.rv-hr,.hub-row):not(.rv-own *):not(#cu){min-height:44px}

/* ================= 5. pagers ================= */
/* every horizontal row of cards settles on a card (js/components/clean-ui.js settles what a browser leaves between two) */
html.uf-clean-ui :is(.r6-swp-t,.av3-sw-r,.rv-sc-trk,.rv-as-rail,.shx-tiles,[data-cu-snap]){scroll-snap-type:x mandatory}
html.uf-clean-ui :is(.r6-swp-t,.av3-sw-r,.rv-sc-trk,.rv-as-rail,.shx-tiles,[data-cu-snap])>*{scroll-snap-align:start;scroll-snap-stop:always}
html.uf-clean-ui :is(.av3-sw-r,.rv-as-rail,[data-cu-snap]){scroll-padding-inline:var(--cu-gut)}
html.uf-clean-ui .rv-sc-trk>*{scroll-snap-align:center}

/* the big wins: the full blue screen (a new record over the rest; the exercise done and the finish in the same blue) */
html.uf-clean-ui .cu-win{position:fixed;inset:0;z-index:calc(var(--z-over) + 12);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:calc(var(--safe-t,0px) + 24px) 24px calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--blue-600);color:#FFFFFF;text-align:center}
html.uf-clean-ui .cu-win-e{font-family:var(--cu-text);font-size:17px;font-weight:500;color:rgba(255,255,255,.86)}
html.uf-clean-ui .cu-win-t{font-family:var(--cu-disp);font-size:64px;line-height:1.02;font-weight:400;text-transform:uppercase}
html.uf-clean-ui .cu-win-v{font-family:var(--cu-disp);font-size:64px;line-height:1.02;font-weight:400;text-transform:uppercase}
html.uf-clean-ui .cu-win-v small{font-size:40px}
html.uf-clean-ui[dir=rtl] .cu-win-t{font-family:var(--cu-ar-disp);font-size:40px;font-weight:800;line-height:1.3;text-transform:none}
html.uf-clean-ui .cu-win-g{display:inline-flex;align-items:center;padding:6px 14px;border-radius:999px;background:#0F7B3E;color:#FFFFFF;font-family:var(--cu-text);font-size:17px;font-weight:700}
html.uf-clean-ui .cu-win-p{font-family:var(--cu-text);font-size:15px;color:rgba(255,255,255,.86)}
html.uf-clean-ui[dir=rtl] :is(.cu-win-e,.cu-win-p){font-family:var(--cu-ar)}
html.uf-clean-ui .cu-win-go{margin-top:24px;min-width:200px;min-height:52px;padding:0 28px;border:0;border-radius:999px;background:#FFFFFF;color:var(--blue-700);font-family:var(--cu-text);font-size:17px;font-weight:700;cursor:pointer}
html.uf-clean-ui[dir=rtl] .cu-win-go{font-family:var(--cu-ar)}
html.uf-clean-ui [data-skin=r] .rv-fin:not(#cu){background:var(--blue-600);color:#FFFFFF}
html.uf-clean-ui [data-skin=r] .rv-fin .rv-loud:not(#cu){color:#FFFFFF}
html.uf-clean-ui [data-skin=r] .rv-fin-c b em:not(#cu){color:#FFFFFF;opacity:.82}
html.uf-clean-ui [data-skin=r] .rv-fin-c span:not(#cu){color:rgba(255,255,255,.86)}
/* the X slam on the blue: its strokes a shade darker and lighter than the page, so it still reads */
html.uf-clean-ui [data-skin=r] .rv-xs .rv-xs-a:not(#cu){stroke:var(--blue-700)}
html.uf-clean-ui [data-skin=r] .rv-xs .rv-xs-b:not(#cu){stroke:var(--blue-500)}
html.uf-clean-ui [data-skin=r] .rv-xs .rv-xs-bar:not(#cu){fill:#FFFFFF}

/* ================= 6. motion ================= */
@media (prefers-reduced-motion:no-preference){
  /* every button, card and row presses at once */
  html.uf-clean-ui :is(.cu-act,.cu-card,.cu-bd,.cu-chip,.card.tap,.rv-row,.rv-hr,.hub-row,button.card){transition:transform var(--cu-t-press) var(--cu-ease),box-shadow var(--cu-t-move) var(--cu-ease),background-color var(--cu-t-move) var(--cu-ease)}
  html.uf-clean-ui :is(.cu-act,.cu-card,.cu-bd,.cu-chip,.card.tap,button.card):active:not(:disabled){transform:scale(.97)}
  html.uf-clean-ui :is(.rv-row,.rv-hr,.hub-row):active:not(:disabled){transform:scale(.99)}
  /* a finished thing ticks */
  html.uf-clean-ui .cu-act.on .cu-act-i{animation:cu-tick var(--cu-t-big) var(--cu-spring) both}
  /* added items slide and fade in; the card row and the action row arrive in a short cascade */
  html.uf-clean-ui :is(.cu-acts,.cu-cards-t)>*{animation:cu-in var(--cu-t-move) var(--cu-ease) both}
  html.uf-clean-ui :is(.cu-acts,.cu-cards-t)>:nth-child(2){animation-delay:40ms}
  html.uf-clean-ui :is(.cu-acts,.cu-cards-t)>:nth-child(3){animation-delay:80ms}
  html.uf-clean-ui :is(.cu-acts,.cu-cards-t)>:nth-child(4){animation-delay:120ms}
  /* toggles and segmented controls slide, never jump */
  html.uf-clean-ui :is(.tgl,button.tg,.seg,.p3-seg,.r6-tabs,.utabs) *{transition-timing-function:var(--cu-ease)}
  /* charts draw in once and move smoothly when the period changes */
  html.uf-clean-ui [data-skin=r] svg :is(path,rect,circle):not(.cu-spark *){transition:d var(--cu-t-move) var(--cu-ease),height var(--cu-t-move) var(--cu-ease),y var(--cu-t-move) var(--cu-ease),cx var(--cu-t-move) var(--cu-ease),cy var(--cu-t-move) var(--cu-ease)}
  html.uf-clean-ui .cu-spark>path{stroke-dasharray:400;stroke-dashoffset:400;animation:cu-draw var(--cu-t-big) var(--cu-ease) .1s forwards}
  /* the big wins: the full blue screen arrives, its words on a spring (Stageshow's big moments: 550 ms) */
  html.uf-clean-ui .cu-win{animation:cu-big var(--cu-t-big) var(--cu-ease) both}
  html.uf-clean-ui .cu-win>:is(.cu-win-t,.cu-win-v){animation:cu-pop var(--cu-t-big) var(--cu-spring) 120ms both}
  html.uf-clean-ui .cu-win>.cu-win-g{animation:cu-pop var(--cu-t-big) var(--cu-spring) 260ms both}
}
@keyframes cu-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cu-tick{0%{transform:scale(.6)}60%{transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes cu-draw{to{stroke-dashoffset:0}}
@keyframes cu-big{from{opacity:0;transform:scale(1.04)}to{opacity:1;transform:none}}
@keyframes cu-pop{from{opacity:0;transform:translateY(12px) scale(.92)}to{opacity:1;transform:none}}
