/* ReInk: from designer-preview/css/premium.css @ 827d893 (oldDesigner-redesign). Everything below this line is that file,
   unchanged. When the prototype changes it, carry the change across: docs/syncing.md. */
/*
	premium.css: "Studio Pro" premium facelift for the customer Designer

	Direction: a crisp, precise professional editor (the feel of a professional design tool). Cool, exact
	neutrals; one white sheet (logo, save bar, rail, panel) beside a plain, calm grey workspace, with a crisp edge;
	a glassy compact zoom pill; a red indicator on the active rail item; sharp ink focus rings; 1px lines;
	8px painted radii. Secondary buttons: white, a thin light-grey outline, dark text. Red
	primaries stay solid, flat Sterling red. Sterling red rgb(234 0 41), logo ink rgb(4 0 0) and white stay the brand.

	Loaded LAST, after css/facelift.css and css/panel-collapse.css, whose techniques it reuses:
	  - nothing moves or resizes and no click area changes: only colour, background, border-colour,
	    border-image (paint), box-shadow, outline, filter on decoration, backdrop-filter, clip-path on
	    pointer-events:none ripples, and pointer-events:none pseudo-elements that take no layout;
	  - clickable boxes keep their baseline (square) corners: rounded tiles and outlines are PAINTED with 9-slice
	    border-image kits (white corner pieces, on white surfaces) or, on the glass pill, with corner-less
	    border-images painted outside the box (border-image-outset is ink overflow: no layout, no hit-test change);
	  - aside secondary buttons are flush with the rail line (x 60) or the sheet edge (x 400), so their outlined
	    tile is inset 2px inside the box (a 2px white gutter); free-standing modal buttons take it on the box edge;
	  - the zoom bar's real box still runs from its left edge to past the window's right edge; it is painted
	    transparent and the pill is a decoration BEHIND its buttons, exactly as wide as its content;
	  - every selected / pushed / checked look follows the same class or state as before;
	  - red means "on" (pushed, checked, active, primary); keyboard AND field focus is an ink ring;
	  - motion is colour / shadow only, 150ms, none under prefers-reduced-motion (MUI's press ripple included);
	    the modal scrim is a plain tint (no blur), so focus rings that Tab reaches behind it stay crisp;
	  - forced colours: every painted kit is switched off; the system draws plain lines; text buttons get a
	    1px ButtonText frame at rest and a 3px CanvasText frame on keyboard focus.

	Palette (contrast on white unless noted)
	  red         rgb(234 0 41)    primary fill, active glyph, pushed ring   4.64 (white text on it 4.64)
	  red-hover   rgb(212 0 37)    hover on red fills                        white text 5.49
	  red-press   rgb(184 0 32)    pressed red fill, error toast             white text 6.87
	  red-text    rgb(207 0 36)    red text                                  5.71 (5.08 on red-tint, 5.24 on rail)
	  red-tint    rgb(254 238 240) selected / pushed / active tile
	  ink         rgb(4 0 0)       logo black: headings, every focus ring    20.89
	  ink-2       rgb(24 26 31)    body, field and secondary-button text     17.41
	  ink-3       rgb(76 82 94)    labels, rail labels, icons in the pill    7.85 (7.20 on rail, 6.76 on workspace)
	  ink-4       rgb(100 107 120) hints, placeholders                       5.36
	  workspace   rgb(237 238 241) canvas surround (beside the engine's #eee rulers)
	  rail        rgb(244 245 248) rail tone while the panel is open         1.09 vs the panel (+ the line below)
	  hairline    rgb(231 233 237) structural 1px lines (save bar, dividers)
	  line        rgb(218 220 224) the outline grey: secondary buttons, rail/panel divider, pill and tab edge
	                               1.37 (decorative: the label names each control)
	  line-hover  rgb(176 181 190) outline on hover                          2.06 (plus a 1.12 fill change)
	  field       rgb(128 135 148) field / control boundary, dropzone dash   3.61
	  track       rgb(140 146 158) slider track                              3.12
	  toasts      success rgb(21 104 66) 6.79, warning rgb(138 80 0) 6.51, error = red-press 6.87 (white text)
*/

/* ===== 1. Tokens ===== */
:root {
  --sp-red: rgb(234 0 41);
  --sp-red-hover: rgb(212 0 37);
  --sp-red-press: rgb(184 0 32);
  --sp-red-text: rgb(207 0 36);
  --sp-red-tint: rgb(254 238 240);
  --sp-red-tint-strong: rgb(252 222 227);
  --sp-ink: rgb(4 0 0);
  --sp-ink-2: rgb(24 26 31);
  --sp-ink-3: rgb(76 82 94);
  --sp-ink-4: rgb(100 107 120);
  --sp-surface: rgb(255 255 255);
  --sp-workspace: rgb(237 238 241);
  --sp-rail: rgb(244 245 248);
  --sp-ruler: rgb(238 238 238);              /* FIXED: the engine paints the rulers #eee */
  --sp-hairline: rgb(231 233 237);
  --sp-line: rgb(218 220 224);
  --sp-line-hover: rgb(176 181 190);
  --sp-field: rgb(128 135 148);
  --sp-track: rgb(140 146 158);
  --sp-fill-hover: rgb(241 242 245);         /* outlined button: hover / pressed fills */
  --sp-fill-press: rgb(229 231 235);
  --sp-glass: rgb(255 255 255 / 0.96);       /* blurred pill (Chromium; near-opaque, so selection handles never tint it); Firefox: --sp-glass-ff */
  --sp-ease: 150ms cubic-bezier(0.2, 0, 0, 1);
  /* elevation: one crisp sheet edge (a short falloff, so the engine's #eee rulers stay flat), lifted pill / artboard / modal */
  --sp-shadow-sheet: 1px 0 0 rgb(16 24 40 / 0.08), 2px 0 4px -1px rgb(16 24 40 / 0.07);
  --sp-shadow-pill: 0 0 0 1px var(--sp-line), 0 1px 2px rgb(16 24 40 / 0.06), 0 8px 24px -8px rgb(16 24 40 / 0.18);
  --sp-shadow-card: 0 0 0 1px rgb(16 24 40 / 0.06), 0 1px 2px rgb(16 24 40 / 0.05), 0 12px 32px -12px rgb(16 24 40 / 0.18);

  /* A thin outline on the icon tools (the facelift's 40x40 r8 tool tile, plus a 1px ring on its edge), and on the trash */
  --sp-bi-tool-line: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3E%3Cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M5%205H23V23H5ZM13%205H15A8%208%200%200%201%2023%2013V15A8%208%200%200%201%2015%2023H13A8%208%200%200%201%205%2015V13A8%208%200%200%201%2013%205Z'/%3E%3Crect%20x='5.5'%20y='5.5'%20width='17'%20height='17'%20rx='7.5'%20fill='none'%20stroke='rgb(218,220,224)'%20stroke-width='1'/%3E%3C/svg%3E");
  --sp-bi-tool-line-hover: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3E%3Cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M5%205H23V23H5ZM13%205H15A8%208%200%200%201%2023%2013V15A8%208%200%200%201%2015%2023H13A8%208%200%200%201%205%2015V13A8%208%200%200%201%2013%205Z'/%3E%3Crect%20x='5.5'%20y='5.5'%20width='17'%20height='17'%20rx='7.5'%20fill='none'%20stroke='rgb(176,181,190)'%20stroke-width='1'/%3E%3C/svg%3E");
  --sp-bi-tool-line-focus: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3E%3Cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M5%205H23V23H5ZM13%205H15A8%208%200%200%201%2023%2013V15A8%208%200%200%201%2015%2023H13A8%208%200%200%201%205%2015V13A8%208%200%200%201%2013%205Z'/%3E%3Crect%20x='5.5'%20y='5.5'%20width='17'%20height='17'%20rx='7.5'%20fill='none'%20stroke='rgb(218,220,224)'%20stroke-width='1'/%3E%3Crect%20x='2'%20y='2'%20width='24'%20height='24'%20rx='11'%20fill='none'%20stroke='rgb(4,0,0)'%20stroke-width='2'/%3E%3C/svg%3E");
  --sp-bi-r8-line: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%3E%3Cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%200H18V18H0ZM8%200H10A8%208%200%200%201%2018%208V10A8%208%200%200%201%2010%2018H8A8%208%200%200%201%200%2010V8A8%208%200%200%201%208%200Z'/%3E%3Crect%20x='0.5'%20y='0.5'%20width='17'%20height='17'%20rx='7.5'%20fill='none'%20stroke='rgb(218,220,224)'%20stroke-width='1'/%3E%3C/svg%3E");
  --sp-bi-r8-line-hover: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%3E%3Cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M0%200H18V18H0ZM8%200H10A8%208%200%200%201%2018%208V10A8%208%200%200%201%2010%2018H8A8%208%200%200%201%200%2010V8A8%208%200%200%201%208%200Z'/%3E%3Crect%20x='0.5'%20y='0.5'%20width='17'%20height='17'%20rx='7.5'%20fill='none'%20stroke='rgb(176,181,190)'%20stroke-width='1'/%3E%3C/svg%3E");
  --sp-shadow-modal: 0 0 0 1px rgb(16 24 40 / 0.06), 0 2px 8px rgb(16 24 40 / 0.06), 0 32px 80px -16px rgb(16 24 40 / 0.34);
  --sp-shadow-toast: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 0 0 1px rgb(16 24 40 / 0.06), 0 2px 4px rgb(16 24 40 / 0.08), 0 12px 32px -8px rgb(16 24 40 / 0.28);
  --sp-shadow-artboard: drop-shadow(0 0 0.5px rgb(16 24 40 / 0.30)) drop-shadow(0 1px 2px rgb(16 24 40 / 0.06)) drop-shadow(0 12px 28px rgb(16 24 40 / 0.09)); /* FILTER value */

  /* the facelift's tokens, re-pointed so every facelift rule picks up the Studio Pro neutrals */
  --sm-red-hover: var(--sp-red-hover);
  --sm-red-press: var(--sp-red-press);
  --sm-red-text: var(--sp-red-text);
  --sm-red-tint: var(--sp-red-tint);
  --sm-red-tint-strong: var(--sp-red-tint-strong);
  --sm-ink-2: var(--sp-ink-2);
  --sm-ink-3: var(--sp-ink-3);
  --sm-ink-4: var(--sp-ink-4);
  --sm-workspace: var(--sp-workspace);
  --sm-subtle: rgb(249 250 251);
  --sm-tile: rgb(241 242 245);
  --sm-tile-hover: rgb(231 233 237);
  --sm-tile-press: rgb(220 223 229);
  --sm-hover: rgb(16 24 40 / 0.05);
  --sm-press: rgb(16 24 40 / 0.09);
  --sm-hover-solid: rgb(243 244 246);
  --sm-hairline: var(--sp-hairline);
  --sm-divider: rgb(224 226 231);
  --sm-track: var(--sp-track);
  --sm-border: var(--sp-field);
  --sm-border-strong: var(--sp-ink-3);
  --sm-scrim: rgb(16 20 28 / 0.30);
  --sm-shadow-card: var(--sp-shadow-card);
  --sm-shadow-float: var(--sp-shadow-toast);  /* toasts (rest); their hover takes the modal shadow. toastr's 3px radius is kept */
  --sm-shadow-modal: var(--sp-shadow-modal);
  --sm-info: var(--sp-ink-2);
  --sm-success: rgb(21 104 66);
  --sm-warning: rgb(138 80 0);
  --sm-error: var(--sp-red-press);
}

/* ===== 1b. Painted kits =====
   White corner pieces (as the facelift's kits) wherever the surface is white; rings drawn in the same image.
   Field / quantity rings: the cooler field grey at rest, ink-3 on hover, a 2px INK ring on focus (red would read as an
   error state, and focus is ink everywhere else); the red moves to the text caret.
   Outline kits (18x18, slice 8): -gap = r6 tile inset 2px (2px white gutter), ring on the tile edge; plain = r8 ring on the box edge.
   Dropzone (28x28, slice 10, round): 1px dashed r8 frame inset 2px. Pill kits: no corner pieces (the pill is glass). */
:root {
  --sm-bi-field: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H14V14H0ZM6 0H8A6 6 0 0 1 14 6V8A6 6 0 0 1 8 14H6A6 6 0 0 1 0 8V6A6 6 0 0 1 6 0Z'/%3E%3Crect x='0.5' y='0.5' width='13' height='13' rx='5.5' fill='none' stroke='rgb(128 135 148)' stroke-width='1'/%3E%3C/svg%3E");
  --sm-bi-field-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H14V14H0ZM6 0H8A6 6 0 0 1 14 6V8A6 6 0 0 1 8 14H6A6 6 0 0 1 0 8V6A6 6 0 0 1 6 0Z'/%3E%3Crect x='0.5' y='0.5' width='13' height='13' rx='5.5' fill='none' stroke='rgb(76 82 94)' stroke-width='1'/%3E%3C/svg%3E");
  --sm-bi-field-focus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H14V14H0ZM6 0H8A6 6 0 0 1 14 6V8A6 6 0 0 1 8 14H6A6 6 0 0 1 0 8V6A6 6 0 0 1 6 0Z'/%3E%3Crect x='1' y='1' width='12' height='12' rx='5' fill='none' stroke='rgb(4 0 0)' stroke-width='2'/%3E%3C/svg%3E");
  --sm-bi-qty: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H10V10H0ZM4 0H6A4 4 0 0 1 10 4V6A4 4 0 0 1 6 10H4A4 4 0 0 1 0 6V4A4 4 0 0 1 4 0Z'/%3E%3Crect x='0.5' y='0.5' width='9' height='9' rx='3.5' fill='none' stroke='rgb(128 135 148)' stroke-width='1'/%3E%3C/svg%3E");
  --sm-bi-qty-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H10V10H0ZM4 0H6A4 4 0 0 1 10 4V6A4 4 0 0 1 6 10H4A4 4 0 0 1 0 6V4A4 4 0 0 1 4 0Z'/%3E%3Crect x='0.5' y='0.5' width='9' height='9' rx='3.5' fill='none' stroke='rgb(76 82 94)' stroke-width='1'/%3E%3C/svg%3E");
  --sm-bi-qty-focus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H10V10H0ZM4 0H6A4 4 0 0 1 10 4V6A4 4 0 0 1 6 10H4A4 4 0 0 1 0 6V4A4 4 0 0 1 4 0Z'/%3E%3Crect x='1' y='1' width='8' height='8' rx='3' fill='none' stroke='rgb(4 0 0)' stroke-width='2'/%3E%3C/svg%3E");

  /* outlined secondary buttons */
  --sp-bi-line-gap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H18V18H0ZM8 2H10A6 6 0 0 1 16 8V10A6 6 0 0 1 10 16H8A6 6 0 0 1 2 10V8A6 6 0 0 1 8 2Z'/%3E%3Crect x='2.5' y='2.5' width='13' height='13' rx='5.5' fill='none' stroke='rgb(218 220 224)' stroke-width='1'/%3E%3C/svg%3E");
  --sp-bi-line-gap-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H18V18H0ZM8 2H10A6 6 0 0 1 16 8V10A6 6 0 0 1 10 16H8A6 6 0 0 1 2 10V8A6 6 0 0 1 8 2Z'/%3E%3Crect x='2.5' y='2.5' width='13' height='13' rx='5.5' fill='none' stroke='rgb(176 181 190)' stroke-width='1'/%3E%3C/svg%3E");
  --sp-bi-line-gap-focus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H18V18H0ZM8 2H10A6 6 0 0 1 16 8V10A6 6 0 0 1 10 16H8A6 6 0 0 1 2 10V8A6 6 0 0 1 8 2Z'/%3E%3Crect x='1' y='1' width='16' height='16' rx='7' fill='none' stroke='rgb(4 0 0)' stroke-width='2'/%3E%3C/svg%3E"); /* 2px ink ring in the gutter, concentric with the tile */
  --sp-bi-line-gap-push: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H18V18H0ZM8 2H10A6 6 0 0 1 16 8V10A6 6 0 0 1 10 16H8A6 6 0 0 1 2 10V8A6 6 0 0 1 8 2Z'/%3E%3Crect x='3' y='3' width='12' height='12' rx='5' fill='none' stroke='rgb(234 0 41)' stroke-width='2'/%3E%3C/svg%3E"); /* checked chip: 2px red ring ON the inset tile edge */
  --sp-bi-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H18V18H0ZM8 0H10A8 8 0 0 1 18 8V10A8 8 0 0 1 10 18H8A8 8 0 0 1 0 10V8A8 8 0 0 1 8 0Z'/%3E%3Crect x='0.5' y='0.5' width='17' height='17' rx='7.5' fill='none' stroke='rgb(218 220 224)' stroke-width='1'/%3E%3C/svg%3E");
  --sp-bi-line-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H18V18H0ZM8 0H10A8 8 0 0 1 18 8V10A8 8 0 0 1 10 18H8A8 8 0 0 1 0 10V8A8 8 0 0 1 8 0Z'/%3E%3Crect x='0.5' y='0.5' width='17' height='17' rx='7.5' fill='none' stroke='rgb(176 181 190)' stroke-width='1'/%3E%3C/svg%3E");

  /* dropzone */
  --sp-bi-drop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H28V28H0ZM10 2H18A8 8 0 0 1 26 10V18A8 8 0 0 1 18 26H10A8 8 0 0 1 2 18V10A8 8 0 0 1 10 2Z'/%3E%3Cpath fill='none' stroke='rgb(128 135 148)' stroke-width='1' d='M2.5 10A7.5 7.5 0 0 1 10 2.5M18 2.5A7.5 7.5 0 0 1 25.5 10M25.5 18A7.5 7.5 0 0 1 18 25.5M10 25.5A7.5 7.5 0 0 1 2.5 18'/%3E%3Cpath fill='none' stroke='rgb(128 135 148)' stroke-width='1' d='M12 2.5H16M12 25.5H16M2.5 12V16M25.5 12V16'/%3E%3C/svg%3E");
  --sp-bi-drop-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H28V28H0ZM10 2H18A8 8 0 0 1 26 10V18A8 8 0 0 1 18 26H10A8 8 0 0 1 2 18V10A8 8 0 0 1 10 2Z'/%3E%3Cpath fill='none' stroke='rgb(234 0 41 / 0.6)' stroke-width='1' d='M2.5 10A7.5 7.5 0 0 1 10 2.5M18 2.5A7.5 7.5 0 0 1 25.5 10M25.5 18A7.5 7.5 0 0 1 18 25.5M10 25.5A7.5 7.5 0 0 1 2.5 18'/%3E%3Cpath fill='none' stroke='rgb(234 0 41 / 0.6)' stroke-width='1' d='M12 2.5H16M12 25.5H16M2.5 12V16M25.5 12V16'/%3E%3C/svg%3E");
  --sp-bi-drop-drag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='rgb(255 255 255)' fill-rule='evenodd' d='M0 0H28V28H0ZM10 2H18A8 8 0 0 1 26 10V18A8 8 0 0 1 18 26H10A8 8 0 0 1 2 18V10A8 8 0 0 1 10 2Z'/%3E%3Cpath fill='none' stroke='rgb(234 0 41)' stroke-width='1' d='M2.5 10A7.5 7.5 0 0 1 10 2.5M18 2.5A7.5 7.5 0 0 1 25.5 10M25.5 18A7.5 7.5 0 0 1 18 25.5M10 25.5A7.5 7.5 0 0 1 2.5 18'/%3E%3Cpath fill='none' stroke='rgb(234 0 41)' stroke-width='1' d='M12 2.5H16M12 25.5H16M2.5 12V16M25.5 12V16'/%3E%3C/svg%3E");

  /* glass pill: 30x26 r8 hover / press tiles and a 34x30 ink focus ring, all painted OUTSIDE the 24x22 button box */
  --sp-bi-pill-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Crect width='20' height='20' rx='8' fill='rgb(16 24 40 / 0.07)'/%3E%3C/svg%3E");
  --sp-bi-pill-press: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Crect width='20' height='20' rx='8' fill='rgb(16 24 40 / 0.12)'/%3E%3C/svg%3E");
  --sp-bi-pill-focus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='1' y='1' width='22' height='22' rx='10' fill='none' stroke='rgb(4 0 0)' stroke-width='2'/%3E%3C/svg%3E");
  /* page chips on the glass: size-less SVG backgrounds, exact at the label's size */
  --sp-tile-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='8' fill='rgb(16 24 40 / 0.07)'/%3E%3C/svg%3E");
  --sp-tile-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' rx='7' style='width:calc(100%25 - 2px);height:calc(100%25 - 2px)' fill='rgb(254 238 240)' stroke='rgb(234 0 41)' stroke-width='2'/%3E%3C/svg%3E"); /* checked: tint + 2px red ring */
  --sp-tile-on-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' rx='7' style='width:calc(100%25 - 2px);height:calc(100%25 - 2px)' fill='rgb(252 222 227)' stroke='rgb(234 0 41)' stroke-width='2'/%3E%3C/svg%3E");
}

/* ===== 2.1 The sheet: logo block, save bar, rail and panel ===== */
aside { background-color: var(--sp-surface); box-shadow: var(--sp-shadow-sheet); }
/* <=700px the panel stacks under the workspace: give the sheet a top edge there (paint only) */
@media (max-width: 700px) { aside { box-shadow: 0 -1px 0 rgb(16 24 40 / 0.07), 0 -10px 24px -12px rgb(16 24 40 / 0.16); } }
/* Firefox focuses the clipped rail as a scroller: an on-brand ink ring instead of the default blue one */
aside:focus-visible { outline: 2px solid var(--sp-ink); outline-offset: -2px; }   /* inside the box: the viewport would clip an outer ring */
aside input { caret-color: var(--sp-red); }

/* the logo's stand-in text is transparent, but site.app.css's "html a { text-shadow: 1px 1px 1px rgba(0,0,0,.004) !important }"
   smoothing hack still paints it as a grey ghost in Firefox: paint it out (paint only, so !important is needed to beat theirs) */
a.sterlingLogo, a.sterlingLogo:hover, a.sterlingLogo:focus, a.sterlingLogo:visited { text-shadow: none !important; }

/* ===== 2.2 Save bar: r8 ghost tiles, 1px x 20px dividers, one flat red CTA chip ===== */
#saveBar ul li:nth-child(even) { background-color: transparent; background-clip: border-box;
  background-image: linear-gradient(var(--sp-hairline), var(--sp-hairline)); background-repeat: no-repeat;
  background-position: 0 50%; background-size: 1px 20px; }                     /* 1px x 20px divider in the 2px slot */
#saveBar ul li button { border-image: var(--sm-bi-r8) 8 / 8px / 0 stretch; }       /* closed rail: panel-collapse's r6 rules (1,2,4) still win */
#saveBar ul li button:focus-visible { border-image: var(--sm-bi-r8-focus-out) 12 / 12px / 4px stretch; }
#saveBar ul li button .mui-btn__ripple-container { border-radius: 8px; }
#saveBar ul li button[onclick^="preview"] .material-icons { box-shadow: 0 1px 2px rgb(184 0 32 / 0.24); }   /* flat chip, one contact shadow */
/* with the label showing, "Add To Cart" is exactly as wide as the button, so a grey tile would end on its first and last
   letters: there the chip and the label carry hover and press (the 28px icon tile of the closed rail keeps its tile) */
body:not(.sm-panel-collapsed) #saveBar ul li button[onclick^="preview"]:is(:hover, :active) { background-color: transparent; }
body:not(.sm-panel-collapsed) #saveBar ul li button[onclick^="preview"] .mui-ripple { background-color: transparent; }
/* ... so the chip gains a soft red-tint halo on hover and press (a shape cue as well as the darker fill and label) */
body:not(.sm-panel-collapsed) #saveBar ul li button[onclick^="preview"]:is(:hover, :active) .material-icons {
  box-shadow: 0 0 0 3px var(--sp-red-tint-strong), 0 1px 2px rgb(184 0 32 / 0.24); }
@media not all and (max-width: 700px) {
  /* closed rail: the r6 focus ring sits inside the 28px tile, right on the 24px chip: a 1px white gap keeps it a ring */
  body.sm-panel-collapsed #saveBar ul li button[onclick^="preview"]:focus-visible .material-icons { box-shadow: inset 0 0 0 1px rgb(255 255 255); }
}

/* ===== 2.3 Rail ===== */
/* a whisper-toned rail and the grey line while the panel is open, so rail labels and panel labels never run together;
   white and line-less while closed (panel-collapse drops the line; the tone follows) */
.ui-tabs-vertical .ui-tabs-nav { background: var(--sp-rail); box-shadow: inset -1px 0 0 var(--sp-line); }
.ui-tabs-vertical .ui-tabs-nav li.ui-state-hover a,
.ui-tabs-vertical .ui-tabs-nav li.ui-state-focus a { color: var(--sp-ink); }
/* active: a quiet red-tint tile, red glyph and label, and a 3px red indicator on the rail's outer edge
   (a shape cue, so "active" never relies on hue alone). The indicator is a pointer-events:none pseudo-element. */
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active .menuIcon::before { background-color: var(--sp-red-tint); box-shadow: none; }
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active a { color: var(--sp-red-text); }
.ui-tabs-vertical .ui-tabs-nav .menuIcon::after { content: ""; position: absolute; top: 3px; left: 0; width: 3px; height: 24px;
  border-radius: 0 3px 3px 0; background-color: transparent; pointer-events: none; }     /* .menuIcon spans the rail (x 0-60); 24px on the 30px tile */
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active .menuIcon::after { background-color: var(--sp-red); }
/* keyboard focus on the active tab: the ink ring alone marks it (the indicator would cross the ring's left side) */
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active:focus-visible .menuIcon::after { background-color: transparent; }
@media not all and (max-width: 700px) {
  /* closed panel: nothing is highlighted (panel-collapse.css); the indicator and the tone follow */
  body.sm-panel-collapsed .ui-tabs-vertical .ui-tabs-nav { background: var(--sp-surface); }
  body.sm-panel-collapsed .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active .menuIcon::after { background-color: transparent; }
  body.sm-panel-collapsed .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active.ui-state-hover a,
  body.sm-panel-collapsed .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active.ui-state-focus a { color: var(--sp-ink); }
}

/* ===== 2.4 Buttons ===== */
/* primary: flat Sterling red (r8 corners painted by the facelift kit). MUI's press ripple paints OVER the label, so a white
   one washes the held button out to pink (4.3:1) and a dark one dims the label: like the save-bar CTA and the pill, the
   press fill alone (red-press, white label 6.87:1) carries "pressed". The outlined secondaries (which keep class
   mui-btn--primary) keep their soft grey ripple at higher specificity below. */
.mui-btn--primary { background-image: none; }
.mui-btn--primary .mui-ripple { background-color: transparent; }

/* secondary (they keep class mui-btn--primary): outlined buttons. White fill, 1px line-grey outline, ink-2 text.
   The selector is the facelift's exact :is() list (its widest argument is (1,2,0), so a shorter list would lose) plus the
   Border chip. Every one sits flush with the rail line (x 60), the sheet edge (x 400) or the slider track, so the outlined
   tile is inset 2px. Checked Direction / Border: the facelift's !important pushed rule swaps in --sm-bi-push-k (2px red ring
   on the same inset edge) with the red tint. */
:is(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl, #borderSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"],
    #toolsMenu button[onclick^="toggleGuides"], #previewDiv .previewCloseButtonContainer .mui-btn),
:is(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl, #borderSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"],
    #toolsMenu button[onclick^="toggleGuides"], #previewDiv .previewCloseButtonContainer .mui-btn):focus
  { background-color: var(--sp-surface); color: var(--sp-ink-2);
    border-image: var(--sp-bi-line-gap) 8 / 8px / 0 stretch; --sm-bi-push-k: var(--sp-bi-line-gap-push); }
:is(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl, #borderSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"],
    #toolsMenu button[onclick^="toggleGuides"], #previewDiv .previewCloseButtonContainer .mui-btn):hover
  { background-color: var(--sp-fill-hover); color: var(--sp-ink); border-image: var(--sp-bi-line-gap-hover) 8 / 8px / 0 stretch; }
:is(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl, #borderSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"],
    #toolsMenu button[onclick^="toggleGuides"], #previewDiv .previewCloseButtonContainer .mui-btn):active
  { background-color: var(--sp-fill-press); }
:is(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl, #borderSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"],
    #toolsMenu button[onclick^="toggleGuides"], #previewDiv .previewCloseButtonContainer .mui-btn):focus-visible
  { outline: none; border-image: var(--sp-bi-line-gap-focus) 8 / 8px / 0 stretch; }
/* MUI's press ripple: lighter on white (the facelift's was for grey tiles), and inside the inset tile (the container is
   pointer-events:none, so clip-path is paint only) */
:is(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"],
    #toolsMenu button[onclick^="toggleGuides"], #previewDiv .previewCloseButtonContainer .mui-btn) .mui-ripple,
.modalEl .previewResultLinks :is(button.mui-btn:not(.mui-btn--primary):not(.mui-btn--accent), a.mui-btn--primary) .mui-ripple
  { background-color: rgb(16 24 40 / 0.2); }
aside :is(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"],
    #toolsMenu button[onclick^="toggleGuides"]) .mui-btn__ripple-container { clip-path: inset(2px round 6px); }

/* free-standing modal buttons (preview Close, shim result links): the outline on the box edge, r8 */
#previewDiv .previewCloseButtonContainer .mui-btn.mui-btn, #previewDiv .previewCloseButtonContainer .mui-btn.mui-btn:focus,
.modalEl .previewResultLinks :is(button.mui-btn:not(.mui-btn--primary):not(.mui-btn--accent), a.mui-btn--primary),
.modalEl .previewResultLinks :is(button.mui-btn:not(.mui-btn--primary):not(.mui-btn--accent), a.mui-btn--primary):focus
  { background-color: var(--sp-surface); color: var(--sp-ink-2); border-image: var(--sp-bi-line) 8 / 8px / 0 stretch; }
#previewDiv .previewCloseButtonContainer .mui-btn.mui-btn:hover,
.modalEl .previewResultLinks :is(button.mui-btn:not(.mui-btn--primary):not(.mui-btn--accent), a.mui-btn--primary):hover
  { background-color: var(--sp-fill-hover); color: var(--sp-ink); border-image: var(--sp-bi-line-hover) 8 / 8px / 0 stretch; }
#previewDiv .previewCloseButtonContainer .mui-btn.mui-btn:active,
.modalEl .previewResultLinks :is(button.mui-btn:not(.mui-btn--primary):not(.mui-btn--accent), a.mui-btn--primary):active
  { background-color: var(--sp-fill-press); }
#previewDiv .previewCloseButtonContainer .mui-btn.mui-btn:focus-visible,
.modalEl .previewResultLinks :is(button.mui-btn:not(.mui-btn--primary):not(.mui-btn--accent), a.mui-btn--primary):focus-visible
  { outline: none; border-image: var(--sm-bi-r8-focus) 8 / 8px / 0 stretch; }

/* simple-mode line clear (x): a ghost at rest (it sits 1px from the field ring, so a fill or outline would read as a
   double border); hover / press are the red tints, darker than rest in grayscale too */
#textBoxes .btn_x { background-color: transparent; }
#textBoxes .btn_x:hover { background-color: var(--sp-red-tint-strong); }
#textBoxes .btn_x:active { background-color: rgb(249 205 213); }

/* shape stroke swatches: the facelift's hover ring is cancelled by its ":focus { box-shadow: none }" once a swatch has been
   clicked (it keeps focus), so the hover ring is restated above that, except under keyboard focus (whose ring wins) */
#shapesMenu .colors-group .btn-color:hover:not(:focus-visible) { box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.9), inset 0 0 0 3px rgb(4 0 0 / 0.35); }

/* ===== 2.5 Range sliders: a 4px visual track painted inside the 6px track box; refined knob ===== */
/* the painted track (a size-less SVG, r2 ends) stops 3px short of the box end, so it never runs into the focus ring of the
   Reset button that sits right after it (the thumb's travel and the input box are unchanged) */
:root { --sp-track-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect y='1' width='100%25' height='4' rx='2' fill='rgb(140 146 158)'/%3E%3C/svg%3E"); }
aside input[type="range"]::-webkit-slider-runnable-track,
aside input[type="range"]:focus::-webkit-slider-runnable-track {
  background: var(--sp-track-img) 0 0 / calc(100% - 3px) 100% no-repeat; border-radius: 999px; }
aside input[type="range"]::-webkit-slider-thumb { border-color: rgb(255 255 255); background: rgb(234 0 41);
  box-shadow: 0 0 0 1px rgb(128 135 148), 0 1px 2px rgb(16 24 40 / 0.18), 0 3px 8px -2px rgb(16 24 40 / 0.22); }
aside input[type="range"]:hover::-webkit-slider-thumb { background: rgb(212 0 37); }
aside input[type="range"]:active::-webkit-slider-thumb { background: rgb(184 0 32); }
aside input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px rgb(128 135 148), 0 0 0 2px rgb(255 255 255), 0 0 0 4px rgb(4 0 0), 0 3px 8px -2px rgb(16 24 40 / 0.22); }
aside input[type="range"]::-moz-range-track { background: var(--sp-track-img) 0 0 / calc(100% - 3px) 100% no-repeat; border-radius: 999px; }
/* (Firefox's knob: the facelift's painted knob, unchanged) */

/* ===== 2.6 Dropzone: 1px dashed r8 frame inset 2px (the box spans x 60-400: an edge frame would fuse with the rail
   line and the sheet edge). The 2px border width stays; the frame is painted. ===== */
.dropzone { background-color: rgb(249 250 251); border-color: var(--sp-field); border-image: var(--sp-bi-drop) 10 / 10px / 0 round; }
.dropzone:hover { background-color: rgb(254 244 246); border-color: rgb(234 0 41 / 0.6); border-image: var(--sp-bi-drop-hover) 10 / 10px / 0 round; }
.dropzone.dz-drag-hover { background-color: var(--sp-red-tint); border-color: var(--sp-red); border-image: var(--sp-bi-drop-drag) 10 / 10px / 0 round; }

/* ===== 2.7 Workspace: plain background, artboard, main frame ===== */
/* No rule touches the ruler canvases. The frame's top/left edges take the ruler grey, the others the workspace. */
main { border-color: var(--sp-ruler) var(--sp-workspace) var(--sp-workspace) var(--sp-ruler); }   /* width stays 1px */
/* a plain workspace (the shorthand also clears site.app.css's blue grid); a 1px inset edge where the rulers meet the workspace */
#canvasParent { background: var(--sp-workspace);
  box-shadow: inset 1px 1px 0 rgb(16 24 40 / 0.07); }
#canvasBackground { filter: var(--sp-shadow-artboard); }   /* the engine's StaticCanvas (no input); round stamps paint it transparent */
html.sm-ws #smDesignFrame { --sm-ws-trim-shadow: 0 0 0 0.5px rgb(16 24 40 / 0.30), 0 1px 2px rgb(16 24 40 / 0.06), 0 12px 28px rgb(16 24 40 / 0.09); }   /* the Finished view's trim edge, the artboard's shadow as a box-shadow */

/* ===== Icon tools: the thin grey outline (at the user's request) =====
   Every icon tool (B / I / U, text alignment, the alignment row, layer order, the zoom tools, the shapes) keeps the
   facelift's 40x40 tile inside its 50x50 box, now with a 1px light-grey edge; darker on hover; the ink focus ring stays
   outside it. Pushed / checked tools keep their red ring (the facelift's !important rule swaps in --sm-bi-push-k).
   Paint only: border-image on the unchanged transparent 5px border, so nothing moves and no click area changes. */
aside input[type="image"].iconButtonBig, aside label.iconButton.iconButtonBig { border-image: var(--sp-bi-tool-line) 13 / 13px / 0 stretch; }
aside input[type="image"].iconButtonBig:hover, aside label.iconButton.iconButtonBig:hover { border-image-source: var(--sp-bi-tool-line-hover); }
aside input[type="image"].iconButtonBig:focus-visible { border-image: var(--sp-bi-tool-line-focus) 13 / 13px / 0 stretch; }
aside input[type="image"][onclick^="deleteObject"] { border-image: var(--sp-bi-r8-line) 8 / 8px / 0 stretch; }
aside input[type="image"][onclick^="deleteObject"]:hover { border-image-source: var(--sp-bi-r8-line-hover); }
aside input[type="image"][onclick^="deleteObject"]:focus-visible { border-image: var(--sm-bi-r8-focus) 8 / 8px / 0 stretch; }

/* ===== 2.8 Zoom bar: a glass pill behind the buttons ===== */
/* The bar's own box (left edge to past the window's right edge) is painted transparent; its click area is untouched. */
#floatingMenu { background-color: transparent; box-shadow: none; }
/* buttons: ghosts on glass. Hover / press are 30x26 r8 tiles and focus a 34x30 ink ring, painted outside the 24x22 box
   with border-image-outset (ink overflow: no layout, no hit-test change), so the glyph has room around it. */
#floatingMenu .floatingMenuButton button,
#floatingMenu .floatingMenuButton button:focus { background-color: transparent; border-image: none; }
#floatingMenu .floatingMenuButton button:hover { background-color: transparent; border-image: var(--sp-bi-pill-hover) 9 fill / 9px / 2px 3px stretch; }
#floatingMenu .floatingMenuButton button:active { background-color: transparent; border-image: var(--sp-bi-pill-press) 9 fill / 9px / 2px 3px stretch; }
#floatingMenu .floatingMenuButton button:focus-visible { outline: none; border-image: var(--sp-bi-pill-focus) 11 / 11px / 4px 5px stretch; }
#floatingMenu .floatingMenuButton button .mui-ripple { background-color: transparent; }   /* the press tile carries "pressed" (no tile in a tile) */
/* page chips (80x30 labels that abut, text centred 15px down): a 78x28 tile, 1px in from each side and flush with the label's
   top, so neighbouring tiles keep a 2px gap and the taller chip pill below leaves 6px of glass above them and 5px below */
#pageSelectButtonContainer > label { background-color: transparent; border-image: none; background-position: 1px 0; background-size: calc(100% - 2px) calc(100% - 2px); background-repeat: no-repeat; }
#pageSelectButtonContainer > label:hover { background-color: transparent; background-image: var(--sp-tile-hover); }
#pageSelectButtonContainer input[type="radio"]:checked + label { background-color: transparent; border-image: none; background-image: var(--sp-tile-on); color: var(--sp-red-text); }
#pageSelectButtonContainer input[type="radio"]:checked + label:hover { background-image: var(--sp-tile-on-hover); }

/* The pill: 35px tall, centred on the 22px buttons (bar top - 1px); 39px (4px deeper) when page chips show, so the chip
   tiles sit inside it with glass all round. Where CSS anchor positioning exists (Chromium, Safari) it is a fixed
   pseudo-element of the bar's cell, anchored to the bar (left, top) and to its last visible item (right), so it hugs the
   content at any zoom label width and its shadow is not clipped by the bar's overflow. It never takes clicks; the bar is
   raised one step so its buttons stay above the pill (nothing else overlaps the bar, so no hit-test changes). */
@supports (anchor-name: --sp-a) {
  #floatingMenu { anchor-name: --sp-zoombar; z-index: 100; }
  #floatingMenu > .floatingMenuButton, #floatingMenu > #pageSelectButtonContainer { anchor-name: --sp-zoombar-end; }  /* last rendered one wins */
  .rulerTable tr:last-child td:last-child::after { content: ""; position: fixed; z-index: 99; pointer-events: none;
    top: calc(anchor(--sp-zoombar top) - 1px); left: anchor(--sp-zoombar left); right: calc(anchor(--sp-zoombar-end right) - 5px); height: 35px;
    border-radius: 17.5px; background-color: var(--sp-glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
    box-shadow: var(--sp-shadow-pill); }
  /* page chips (multi-page products; the engine hides the container inline otherwise) need 4px more end room than icons */
  body:has(#pageSelectButtonContainer:not([style*="none"])) .rulerTable tr:last-child td:last-child::after { right: calc(anchor(--sp-zoombar-end right) - 9px);
    height: 39px; border-radius: 19.5px; }
}
/* Elsewhere (Firefox today) the pill is the bar's last flex item, stretched leftwards under the buttons and clipped by the bar
   at its left edge. Its left cap and straight edges are viewport-fixed gradients (the bar's left edge is known in each panel
   state); the straight layer stops at the content box, where the right cap (its own layer) begins. No blur here, so the glass
   is near-opaque. overflow: clip (not a scroll container, so no extra Tab stop) with a clip margin lets the 1px above the bar
   and a drop shadow that follows the painted caps show. */
@supports not (anchor-name: --sp-a) {
  /* --sp-ph / --sp-pr / --sp-pc: pill height, cap radius, cap tile width; --sp-ca..cd: the cap ring's stops around the radius
     (a full 1px band of line grey inside the radius, 0.5px soft edges), so the caps weigh the same as the 1px straight edges */
  #floatingMenu { --sp-zb-x: 466px; --sp-zb-b: 46px; --sp-glass-ff: rgb(255 255 255 / 0.96); --sp-ph: 35px; --sp-pr: 17.5px; --sp-pc: 18px;
    --sp-ca: -1.5px; --sp-cb: -1px; --sp-cc: 0px; --sp-cd: 0.5px; overflow: clip; overflow-clip-margin: 16px; }
  body.sm-panel-collapsed #floatingMenu { --sp-zb-x: calc(var(--sm-rail-w) + 66px); }     /* 66px from the panel edge, as 466 - 400 */
  #floatingMenu:has(> #pageSelectButtonContainer:not([style*="none"])) { --sp-ph: 39px; --sp-pr: 19.5px; --sp-pc: 20px; }   /* page chips: 4px deeper */
  #floatingMenu::after { content: ""; flex: none; align-self: flex-start; position: relative; z-index: -1; pointer-events: none;
    --sp-cap: var(--sp-glass-ff) calc(var(--sp-pr) + var(--sp-ca)), var(--sp-line) calc(var(--sp-pr) + var(--sp-cb)) calc(var(--sp-pr) + var(--sp-cc)), transparent calc(var(--sp-pr) + var(--sp-cd));
    --sp-pb: calc(var(--sp-zb-b) + 35px - var(--sp-ph));   /* the fixed layers' bottom offset: the pill grows downwards */
    box-sizing: border-box; width: 4000px; height: var(--sp-ph); margin: -6px 0 0 -3995px; padding-right: var(--sp-pc); border-radius: 0 var(--sp-pr) var(--sp-pr) 0;
    background:
      radial-gradient(circle at 0 50%, var(--sp-cap)) right top / var(--sp-pc) var(--sp-ph) no-repeat,
      radial-gradient(circle at var(--sp-pc) 50%, var(--sp-cap)) left var(--sp-zb-x) bottom var(--sp-pb) / var(--sp-pc) var(--sp-ph) no-repeat fixed,
      linear-gradient(var(--sp-line) 1px, var(--sp-glass-ff) 1px calc(100% - 1px), var(--sp-line) calc(100% - 1px)) left calc(var(--sp-zb-x) + var(--sp-pc)) bottom var(--sp-pb) / 100vw var(--sp-ph) no-repeat fixed content-box;
    filter: drop-shadow(0 1px 1px rgb(16 24 40 / 0.06)) drop-shadow(0 6px 10px rgb(16 24 40 / 0.10)); }
  /* the 200ms open / close: plain glass, no clip margin, while the bar slides */
  body.sm-panel-anim #floatingMenu { overflow-clip-margin: 0px; }
  body.sm-panel-anim #floatingMenu::after { background: var(--sp-glass-ff); filter: none; }
  #floatingMenu:has(> #pageSelectButtonContainer:not([style*="none"]))::after { margin-left: -3991px; }   /* page chips: 4px more end room */
}
/* (bar 40px tall, bottom 40px: pill bottom = 40 + 6. At 700px and below the bar sits at bottom 340px, left 60px.) */
@media (max-width: 700px) { #floatingMenu, body.sm-panel-collapsed #floatingMenu { --sp-zb-x: 60px; --sp-zb-b: 346px; } }

/* ===== 2.9 Collapse tab: part of the sheet, outlined like the secondary buttons ===== */
#panelCollapseHandle { border-color: var(--sp-line); background-color: var(--sp-surface); color: var(--sp-ink-3);
  box-shadow: 4px 1px 6px -2px rgb(16 24 40 / 0.10); }        /* panel-collapse's tight falloff (the rulers stay flat); border width unchanged, left border stays 0 */
#panelCollapseHandle:hover { border-color: var(--sp-line-hover); background-color: var(--sm-hover-solid); color: var(--sp-ink); }
#panelCollapseHandle:active { background-color: var(--sm-tile-hover); }

/* ===== 2.10 Modals ===== */
/* a tinted scrim only: no blur, so a focus ring that Tab reaches behind the modal (Chromium does not trap focus) stays crisp */
#mui-overlay { background-color: var(--sm-scrim); }
.modalEl, #previewDiv { box-shadow: var(--sp-shadow-modal); }
/* Firefox makes the scrolling preview a Tab stop: the ink ring, inside the box, instead of the default blue one */
#previewDiv:focus-visible { outline: 2px solid var(--sp-ink); outline-offset: -2px; }
#previewDiv .templateThumbnail, #previewDiv .templateThumbnailMulti, #previewDiv .cycle-slideshow { border-color: var(--sp-hairline); box-shadow: var(--sp-shadow-card); }
#previewDiv .previewAddToCartButton { border-image: var(--sm-bi-r8) 8 / 8px / 0 stretch; }
#previewDiv .previewAddToCartButton:focus-visible { border-image: var(--sm-bi-r8-focus) 8 / 8px / 0 stretch; }
#previewDiv .previewAddToCartButton .mui-btn__ripple-container { border-radius: 8px; }

/* ===== 2.11 Motion: colour and shadow only ===== */
@media (prefers-reduced-motion: no-preference) {
  .mui-btn, aside input[type="image"], aside .iconButton, .ui-tabs-vertical .ui-tabs-nav li a, .ui-tabs-vertical .ui-tabs-nav .menuIcon::before,
  .ui-tabs-vertical .ui-tabs-nav .menuIcon::after, aside input[type="text"], aside input[type="number"], aside select, .dropzone,
  #colourMenu .colSwatchContainer > label, #textBoxes .btn_x, #floatingMenu .floatingMenuButton button, #panelCollapseHandle
  { transition: background-color var(--sp-ease), color var(--sp-ease), box-shadow var(--sp-ease), border-color var(--sp-ease); }
}
/* the press ripple grows by transform: under reduced motion it appears at once, as a plain tint (pointer-events:none) */
@media (prefers-reduced-motion: reduce) { .mui-btn .mui-ripple { transition: none !important; } }

/* ===== 2.12 Windows High Contrast / forced colours ===== */
@media (forced-colors: active) {
  :root { --sm-bi-field: none; --sm-bi-field-hover: none; --sm-bi-field-focus: none; --sm-bi-qty: none; --sm-bi-qty-hover: none; --sm-bi-qty-focus: none;
    --sp-bi-line-gap: none; --sp-bi-line-gap-hover: none; --sp-bi-line-gap-focus: none; --sp-bi-line-gap-push: none; --sp-bi-line: none; --sp-bi-line-hover: none;
    --sp-bi-drop: none; --sp-bi-drop-hover: none; --sp-bi-drop-drag: none;
    --sp-bi-pill-hover: none; --sp-bi-pill-press: none; --sp-bi-pill-focus: none;
    --sp-tile-hover: none; --sp-tile-on: none; --sp-tile-on-hover: none; }
  /* text buttons read as buttons: a 1px system frame at rest. :where() = zero specificity, so the focus rule below and the
     checked rule (3px Highlight) still win. The aside's outlined secondaries take the frame 2px in, as their painted tiles
     (clear of the rail line, the sheet edge and the slider track). Save-bar and pill buttons stay frameless (icon tiles). */
  :where(aside .mui-btn--primary, #borderSwitchInputLbl, #previewDiv .mui-btn--primary, .modalEl .mui-btn) { outline: 1px solid ButtonText; outline-offset: -1px; }
  :where(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl, #borderSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"], #toolsMenu button[onclick^="toggleGuides"]) { outline-offset: -3px; }
  /* keyboard focus on a text button: a 3px CanvasText frame from the box edge inwards, so it covers the 1px rest frame and
     clearly thickens it (x3). The first line outranks the facelift's 2px rules (up to (1,2,0)); the others repeat the outlined
     secondaries' own focus selectors (which say outline: none at up to (1,4,0)). */
  :is(aside .mui-btn--primary, #previewDiv .mui-btn--primary, .modalEl .mui-btn):focus-visible,
  :is(#btnResetCharSpacing, #smCurveReset, #smSnapToggle, #bestFitBtn, #AppLines, #simpleDesignerButton, #advancedDesignerButton, #curveSwitchInputLbl, #borderSwitchInputLbl,
    #curvedTextMenu button[onclick^="setCurveSpacing"], #curvedTextMenu button[onclick^="setCurveRadius"],
    #toolsMenu button[onclick^="toggleGuides"], #previewDiv .previewCloseButtonContainer .mui-btn):focus-visible,
  #previewDiv .previewCloseButtonContainer .mui-btn.mui-btn:focus-visible,
  .modalEl .previewResultLinks :is(button.mui-btn:not(.mui-btn--primary):not(.mui-btn--accent), a.mui-btn--primary):focus-visible
    { outline: 3px solid CanvasText; outline-offset: -3px; }
  /* the save-bar CTA's white cart glyph sits on its own red chip, which forced colours would paint Canvas: keep the chip */
  #saveBar ul li button[onclick^="preview"] .material-icons { forced-color-adjust: none; }
  /* the preview's Add To Cart: the red is the button's fill (forced to Canvas), so drop the white cart image and let the
     icon font's own glyph draw in the button's text colour */
  #previewDiv .previewAddToCartButton .material-icons { background-image: none; color: ButtonText; }
  /* the pill stays, as a plain system-coloured frame behind the buttons */
  .rulerTable tr:last-child td:last-child::after { forced-color-adjust: none; background-color: Canvas; border: 1px solid CanvasText;
    box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  @supports not (anchor-name: --sp-a) {
    /* the Firefox fallback pill keeps its painted geometry, in system colours */
    #floatingMenu { --sp-glass-ff: Canvas; --sp-line: CanvasText; }
    #floatingMenu::after { forced-color-adjust: none; filter: none; }
  }
  /* sliders: the painted track would be forced to Canvas and vanish, so draw track and knob in system colours */
  aside input[type="range"] { forced-color-adjust: none; }
  aside input[type="range"]:is(:focus, :not(:focus))::-webkit-slider-runnable-track { background: linear-gradient(transparent 2px, CanvasText 2px 4px, transparent 4px) 0 0 / calc(100% - 3px) 100% no-repeat; }
  aside input[type="range"]:is(:focus-visible:hover, :focus-visible:active, :focus-visible, :hover, :active, :not(:focus-visible))::-webkit-slider-thumb {
    background: CanvasText; border-color: Canvas; box-shadow: 0 0 0 1px CanvasText; }   /* every state; focus = the facelift's outline on the input */
  aside input[type="range"]::-moz-range-track { background: linear-gradient(transparent 2px, CanvasText 2px 4px, transparent 4px) 0 0 / calc(100% - 3px) 100% no-repeat; }
  aside input[type="range"]:is(:focus-visible:hover, :focus-visible:active, :focus-visible, :hover, :active, :not(:focus-visible))::-moz-range-thumb { box-shadow: none;
    background: radial-gradient(circle closest-side, CanvasText 6px, Canvas 6.5px 9.5px, CanvasText 10px 11px, transparent 11.5px) border-box no-repeat; }
  .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active .menuIcon::after { forced-color-adjust: none; background-color: Highlight; }
  body.sm-panel-collapsed .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active .menuIcon::after { background-color: transparent; }
  #pageSelectButtonContainer input[type="radio"]:checked + label { outline: 3px solid Highlight; outline-offset: -3px; }
  #floatingMenu .floatingMenuButton button:focus-visible { outline: 2px solid CanvasText; outline-offset: 1px; }
  aside:focus-visible { outline-color: CanvasText; }
}
