/* ==========================================================================
 * Medical Supplies US · msus-base.css · msus-core 1.1.0 (P3.2)
 * What Breakdance's stylesheet importer drops (design/tokens.css Part B):
 *   1. @font-face for Manrope 600/700 and Inter 400/600, latin, latin-ext
 *      and cyrillic WOFF2 subsets in ../fonts/ (assets/fonts/README.md).
 *      Per weight: cyrillic, latin-ext, latin (Google's order, so latin
 *      wins the combining marks both latin ranges list).
 *   2. Metric-matched fallbacks "Manrope Fallback" and "Inter Fallback".
 *   3. The site-wide :focus-visible ring.
 *   4. Hover for a real pointer only (not a registered breakpoint).
 *   5. Reduced motion and the "Turn off animations" switch (html.msus-calm).
 *   6. The display line sized from its .msus-fit container (cqi), which
 *      the importer cannot parse; Breakdance keeps the vw fallback.
 *   7. Breakdance's tag defaults (h1-h6 sizes, link hover) on the token roles.
 * Loaded on every front-end page by includes/design.php, before
 * Breakdance's own stylesheets. No request to fonts.googleapis.com or
 * fonts.gstatic.com, ever. Preload: manrope-700-latin.woff2 only.
 * ========================================================================== */

/* 1. Fonts ----------------------------------------------------------------- */

/* Manrope 600 */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Manrope 700 */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter 400 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter 600 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Metric-matched fallbacks (assets/fonts/README.md, "Fallback metrics":
 * Capsize method, measured on the shipped instances). Arial and Helvetica
 * share advance widths; Liberation Sans is Arial-metric (Linux, headless
 * Chrome). The Breakdance font registrations print these names after the
 * family, so every Manrope and Inter declaration carries them. */
@font-face {
  font-family: "Manrope Fallback";
  font-style: normal;
  font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Liberation Sans Bold"), local("LiberationSans-Bold");
  size-adjust: 99.38%;
  ascent-override: 107.26%;
  descent-override: 30.19%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Manrope Fallback";
  font-style: normal;
  font-weight: 700;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Liberation Sans Bold"), local("LiberationSans-Bold");
  size-adjust: 101.12%;
  ascent-override: 105.42%;
  descent-override: 29.67%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  font-style: normal;
  font-weight: 400;
  src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Liberation Sans"), local("LiberationSans");
  size-adjust: 107.08%;
  ascent-override: 90.47%;
  descent-override: 22.53%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  font-style: normal;
  font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Liberation Sans Bold"), local("LiberationSans-Bold");
  size-adjust: 101.54%;
  ascent-override: 95.40%;
  descent-override: 23.75%;
  line-gap-override: 0%;
}

/* 3. Focus everywhere: 3 px ring, 3 px away; the ground classes re-map
 * --msus-focus (White on Navy Ink). Controls with a msus- class carry
 * their own :focus-visible rule as well. */
:focus-visible {
  outline: var(--msus-focus-width, 3px) solid var(--msus-focus, #1A5FC2);
  outline-offset: var(--msus-focus-offset, 3px);
}

/* 4. Hover for a real pointer only: touch leaves :hover stuck after a tap,
 * and a chip that looked half selected would mislead. */
@media (hover: hover) and (pointer: fine) {
  .msus-chip:hover {
    background-color: var(--msus-sky-tint);
  }

  .msus-chip[aria-pressed="true"]:hover {
    background-color: var(--msus-deep-sky);
  }
}

/* 5. Reduced motion and the "Turn off animations" switch. html.msus-calm is
 * treated exactly like prefers-reduced-motion: reduce. Colour and opacity
 * changes stay; travel, scale, scroll scenes and autoplay stop.
 * html:root (0,1,1) outranks the :root rule in Breakdance's variables file,
 * which loads after this one. */
@media (prefers-reduced-motion: reduce) {
  html:root {
    --msus-press-scale: 1;
    --rise: 0px;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, opacity !important;
    scroll-behavior: auto !important;
  }
}

html.msus-calm {
  --msus-press-scale: 1;
  --rise: 0px;
}

html.msus-calm *,
html.msus-calm *::before,
html.msus-calm *::after {
  animation: none !important;
  transition-property: color, background-color, border-color, outline-color, text-decoration-color, opacity !important;
  scroll-behavior: auto !important;
}

/* Breakdance's entrance animations (bd-animate) hide each marked element
 * (entrance.css: [data-entrance] { visibility: hidden }) until entrance.js
 * plays it with GSAP, and entrance.js ignores reduced motion. Under reduced
 * motion and the calm switch the element shows at rest instead: no travel,
 * no fade (!important outranks GSAP's inline styles). Without JavaScript,
 * includes/design.php prints the visibility rule in a <noscript> (P3.7). */
@media (prefers-reduced-motion: reduce) {
  [data-entrance] {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

html.msus-calm [data-entrance] {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

/* With motion on (1.3.6, P3.16 X-01 and Y-01): an element waiting for its entrance stays in the Tab order and the
 * accessibility tree. It waits at opacity 0 instead of visibility: hidden, and visibility: visible !important also
 * outranks the visibility: hidden that GSAP's autoAlpha writes inline while a tween starts, so a focused element is
 * never hidden. assets/js/entrance-guard.js shows a waiting element at once when focus moves into it
 * (.msus-entrance-shown) and plays what is already in view after load. Breakdance adds
 * html.breakdance-animation-enabled only when it runs entrances (never under reduced motion); the calm switch above
 * still wins with its !important. */
html.breakdance-animation-enabled [data-entrance] {
  visibility: visible !important;
}

html.breakdance-animation-enabled [data-entrance]:not(.is-animating):not(.is-animated) {
  opacity: 0;
}

html [data-entrance].msus-entrance-shown {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

/* 6. Display line sized from its container (design/tokens.css, .msus-display).
 * Breakdance's importer drops 100cqi, so the global .msus-display selector
 * keeps the viewport fallback, calc((100vw - 2 * margin) / (chars * k)).
 * .msus-fit sets container-type: inline-size; inside it the line fits its
 * own column. The extra class outranks the global selector, which loads
 * after this file; a browser without container units ignores the rule and
 * keeps the fallback. */
.msus-fit .msus-display {
  font-size: clamp(var(--msus-display-min), calc(100cqi / (var(--msus-display-chars) * var(--msus-display-k))), var(--msus-display-max));
}

/* 7. Breakdance's tag defaults on the token roles. Its global settings print
 * h1-h6 sizes from a 1.25 type scale (h1 48.8px) and one link colour for rest
 * and hover, as :root variables in global-settings.css, which loads after this
 * file. html:root (0,1,1) outranks those :root rules, so a heading without a
 * msus- class takes the token heading sizes, and a:hover (which outranks one
 * class) turns links Navy Ink like .msus-link. Classed elements set their own
 * values and are unaffected. Colours and fonts are set in the global settings
 * themselves (P3.2), from the same tokens. */
html:root {
  --bde-links-color-hover: var(--msus-link-hover);
  --bde-h1-font-size: var(--msus-type-h1);
  --bde-h2-font-size: var(--msus-type-h2);
  --bde-h3-font-size: var(--msus-type-h3);
  --bde-h4-font-size: var(--msus-type-h3);
  --bde-h5-font-size: var(--msus-type-h3);
  --bde-h6-font-size: var(--msus-type-h3);
}

/* 8. Catalog tiles (P3.9, 1.3.2): a closed "Product details" list takes no layout box. Chrome lays out the body
 * of a closed <details> when a script asks for its geometry, so the list's lines reported positions below their
 * card; display:none keeps them out of layout until the details opens. Nothing visible changes. Since 1.3.6 the
 * static cards' details also hold the full title and Maker and Model (§12), so every part but the summary. */
details.mc-features:not([open]) > :not(summary) {
  display: none;
}

/* 9. Catalog cards (1.3.3, the lead's call): the card details at the body step (16 px where cards sit), hierarchy by
 * weight and colour (labels and the description line Steel, values and tags Navy Ink, names Manrope 600). The design
 * system sets the labels and the description line at the help step (14 px); these rules restyle the static cards
 * (catalog and family pages) and the live widget. */
body .msus-catalog-static .mc-meta dt,
html body #msus-catalog .mc-meta dt {
  font-size: var(--msus-type-body);
  line-height: 1.45;
}
body .msus-catalog-static .mc-full,
html body #msus-catalog .mc-full {
  font-size: var(--msus-type-body);
}

/* 10. Skip link and the main landmark (1.3.4, changed in 1.5.11). Breakdance wraps the page content in
 * <main id="bde-main"> only while its skip-link setting is on, and then prints its own skip link (a.bde-skip-link)
 * straight after <body>, the first element in the DOM. That is now the site's one skip link: msus-core removes the
 * header's duplicate a.msus-skip at print time (includes/header.php), and the link is drawn here as the header's was:
 * out of sight until it takes focus. The jump's room for the sticky header is the page-wide scroll padding in §11. */
body a.bde-skip-link {
  position: absolute;
  top: var(--msus-space-12);
  left: var(--msus-margin);
  z-index: 300;
  padding: var(--msus-space-12) var(--msus-space-24);
  background-color: var(--msus-navy-ink);
  color: var(--msus-white);
  font-family: var(--msus-font-text);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-decoration-line: underline;
  text-underline-offset: 0.2em;
  white-space: nowrap;
  clip-path: inset(50%);
}
body a.bde-skip-link:focus {
  clip-path: none;
  outline: var(--msus-focus-width) solid var(--msus-white);
  outline-offset: 0;
}
body a.bde-skip-link:hover,
body a.bde-skip-link:visited {
  color: var(--msus-white);
}

/* 11. Focus and anchor scrolls clear the sticky header (1.3.6, P3.16 X-05 and X-16). The scroll padding is the
 * header's measured height at each breakpoint (88, 80, 72, 64 px) plus the admin bar and 16 px, so Shift+Tab, in-page
 * links and the skip link stop below the header. No smooth scrolling (Creative direction, Libraries), whatever
 * Breakdance's normalize sets; html:root (0,1,1) outranks its html rule. Section scroll margins add to this padding. */
html:root {
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 104px);
}

@media (max-width: 1119px) {
  html:root {
    scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px);
  }
}

@media (max-width: 767px) {
  html:root {
    scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 88px);
  }
}

@media (max-width: 479px) {
  html:root {
    scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 80px);
  }
}

/* 12. Catalog tiles to the mock (1.3.6, P3.16 X-07; design/product-catalog.html and family-protective-underwear.html).
 * The tile shows the name (three lines at most), size and HCPCS, Pack, Brand and Item. The static cards
 * (includes/catalog-render.php) print the feed's full title, Maker and Model inside "Product details". The live
 * widget's cards are restyled only: their description line goes, and their Maker and Model rows are hidden by
 * data-field (1.5.16; by position for the previous build). Its rows are Pack, Brand, Maker, Item #, Model, each only when the feed has it; the feed gives five rows to
 * 118 products and four, without Maker, to one. A product with Maker but no Model would lose its Item # instead. */
body .msus-catalog-static .mc-body > .mc-full,
html body #msus-catalog .mc-body > .mc-full {
  display: none;
}

body .msus-catalog-static .mc-name,
html body #msus-catalog .mc-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* Nov 2 widget (1.5.16): every row carries data-field (pack, brand, maker, item, model), so Maker and Model are hidden by name. */
html body #msus-catalog .mc-meta > [data-field="maker"],
html body #msus-catalog .mc-meta > [data-field="model"] {
  display: none;
}

/* Previous widget build (the rollback; rows have no data-field): by position, as before. */
html body #msus-catalog .mc-meta:not(:has(> dt[data-field])):has(> dt:nth-of-type(5)) > dt:nth-of-type(3),
html body #msus-catalog .mc-meta:not(:has(> dt[data-field])):has(> dt:nth-of-type(5)) > dd:nth-of-type(3),
html body #msus-catalog .mc-meta:not(:has(> dt[data-field])):has(> dt:nth-of-type(5)) > dt:nth-of-type(5),
html body #msus-catalog .mc-meta:not(:has(> dt[data-field])):has(> dt:nth-of-type(5)) > dd:nth-of-type(5),
html body #msus-catalog .mc-meta:not(:has(> dt[data-field])):not(:has(> dt:nth-of-type(5))) > dt:nth-of-type(4),
html body #msus-catalog .mc-meta:not(:has(> dt[data-field])):not(:has(> dt:nth-of-type(5))) > dd:nth-of-type(4) {
  display: none;
}

body .msus-catalog-static .mc-features > .mc-full {
  margin: var(--msus-space-8) 0 0;
}

body .msus-catalog-static .mc-features > .mc-meta {
  margin: var(--msus-space-12) 0 0;
}

/* Opening "Product details" gives the whole name back (1.3.7): the clamp lifts, and the live widget's card shows its
 * full feed title again under the name. The static cards print that title inside the details. */
body .msus-catalog-static .mc-card:has(details.mc-features[open]) .mc-name,
html body #msus-catalog .mc-card:has(details.mc-features[open]) .mc-name {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: none;
  overflow: visible;
}

html body #msus-catalog .mc-card:has(details.mc-features[open]) .mc-body > .mc-full {
  display: block;
}

/* 13. Footer social links (1.3.6, P3.16 X-12 and Y-05): the Container Link prints its text with a space before the
 * icon, and the underline ran under that space. As an inline flex box the text's edge spaces drop, so the underline
 * ends at the word, as in design/partials/footer.html; the icon keeps its 6 px margin and sits 2 px low as there. */
body .msus-ftr__smalllinks a.msus-ftr__a:has(> .msus-ftr__ext) {
  display: inline-flex;
  align-items: baseline;
}

body .msus-ftr__smalllinks a.msus-ftr__a > .msus-ftr__ext {
  position: relative;
  top: 2px;
}

/* 14. Pack the box, the label panel (1.3.6, P3.16 X-13): once an item is ticked the empty-state line goes, with or
 * without JavaScript, so the panel never contradicts the chips; assets/js/packbox-list.js lists the ticked items in
 * its place (P5.4 brings the packing label itself). */
.msus-home-pack__form:has(input[name="items"]:checked) .msus-home-pack__empty,
.msus-home-pack__label [hidden] {
  display: none !important;
}

.msus-home-pack__lines {
  display: grid;
  gap: var(--msus-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 15. Motion layer (1.5.0, P5.5, P5.6; assets/js/msus-motion.js). html.msus-js is set by the inline calm-head.js, so the
 * waiting state below applies only when script will run. Without script nothing here applies and every page reads at
 * rest. Reduced motion and html.msus-calm show everything at rest (section 5), and none of this applies there.
 * Entrances: a waiting element sits at opacity 0 (never visibility: hidden, so it stays in the Tab order and the
 * accessibility tree). msus-motion.js plays each once, in view, with the numbers its bd-animate marker carries.
 * If msus-motion.js never arrives (html.msus-motion-ready missing after 3 s) the elements simply show. */
@media (prefers-reduced-motion: no-preference) {
  html.msus-js:not(.msus-calm) [data-entrance]:not(.is-animating):not(.is-animated) {
    opacity: 0;
  }

  html.msus-js:not(.msus-calm):not(.msus-motion-ready) [data-entrance]:not(.is-animating):not(.is-animated) {
    animation: msus-late-show 1ms 3s forwards;
  }
}

@keyframes msus-late-show {
  to {
    opacity: 1;
  }
}

/* Agencies, "Off your plate": each line is struck through as it is read (msus-motion.js adds .is-struck in reading
 * order). The strike is a 3 px band in the middle of each text line, drawn left to right; the text is never hidden or
 * dimmed. At rest (no script, reduced motion, calm, or no 1lh support) the lines carry the static text-decoration. */
@supports (height: 1lh) {
  @media (prefers-reduced-motion: no-preference) {
    html.msus-js:not(.msus-calm) .msus-hca-plate__list li {
      text-decoration-line: none;
    }

    html.msus-js:not(.msus-calm) .msus-hca-plate__list li > div {
      width: fit-content;
      max-width: 100%;
      background-image: linear-gradient(to bottom, transparent calc(var(--msus-strike-y, 54%) - var(--msus-strike-width) / 2), var(--msus-navy-ink) 0, var(--msus-navy-ink) calc(var(--msus-strike-y, 54%) + var(--msus-strike-width) / 2), transparent 0);
      background-repeat: repeat-y;
      background-size: 0% 1lh;
      transition: background-size 700ms var(--ease-in-out) calc(var(--strike-i, 0) * 140ms);
    }

    html.msus-js:not(.msus-calm) .msus-hca-plate__list li.is-struck > div {
      background-size: 100% 1lh;
    }

    html.msus-js:not(.msus-calm):not(.msus-motion-ready) .msus-hca-plate__list li > div {
      animation: msus-late-strike 1ms 3s forwards;
    }
  }
}

@keyframes msus-late-strike {
  to {
    background-size: 100% 1lh;
  }
}

/* 16. Cross-document view transitions (1.5.0, P5.6). A short cross-fade between pages; the sticky header holds still. Off
 * under reduced motion (the rule sits in a no-preference query) and under html.msus-calm (the old and new snapshots swap
 * with no animation). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-group(root) {
    animation-duration: var(--t-ui, 240ms);
    animation-timing-function: var(--ease-soft, ease-out);
  }

  .msus-hdr {
    view-transition-name: msus-hdr;
  }
}

html.msus-calm::view-transition-group(*),
html.msus-calm::view-transition-old(*),
html.msus-calm::view-transition-new(*) {
  animation: none !important;
}

/* 17. Inner-page hero drift (1.5.0, P5.6): the hero picture eases from 1.04 to 1 as the hero scrolls out. A scale of 4%,
 * no travel (house limits: no parallax over 4%). Chrome and Edge for now (animation-timeline: view()); elsewhere the
 * picture stays at rest. The Home hero is excluded (P5.1). Off under reduced motion and html.msus-calm. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html:not(.msus-calm) [class*="-hero"]:not(.msus-home-hero) :is(.msus-frame, .msus-pp-figure):has(> :is(img, picture, video)) {
      overflow: clip;
    }

    html:not(.msus-calm) [class*="-hero"]:not(.msus-home-hero) :is(.msus-frame, .msus-pp-figure) > :is(img, picture, video) {
      animation: msus-hero-drift linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
      transform-origin: 50% 50%;
    }
  }
}

@keyframes msus-hero-drift {
  from {
    transform: scale(1.04);
  }

  to {
    transform: scale(1);
  }
}

/* 18. The catalog swap holds still (1.5.0, P5 task 7; qa/p3.8-p3.9.md section 4, "the swap itself"). The static catalog is
 * replaced by the live widget once the feed has loaded, and the two top bands were not the same height: the static family
 * links (.msus-cat-filter) and the widget's search and chips (.mc-controls) wrap differently, and the first family head
 * wraps differently on phones (the static title is the longer "Pull-on protective underwear"). The first card moved
 * +30 px at 1440, -38 at 768 and -89 at 390 (up to -180 at 460). Both bands now take the same minimum height at each width,
 * the larger of the two natural heights (measured with the feed stubbed, 320 to 1920 px in 20 px steps; a window of 20 px
 * around each step takes the larger value). The shorter band gains white space at its bottom, on the same White ground.
 * CSS only; the widget's markup and logic are untouched. */
body .msus-cat-filter,
body #msus-catalog .mc-controls {
  box-sizing: border-box;
}

body .msus-cat-filter,
body #msus-catalog .mc-controls { min-height: 230px; }

@media (min-width: 1440px) and (max-width: 1539px) {
  body .msus-cat-filter,
  body #msus-catalog .mc-controls { min-height: 260px; }
}

@media (min-width: 1040px) and (max-width: 1439px) {
  body .msus-cat-filter,
  body #msus-catalog .mc-controls { min-height: 286px; }
}

@media (min-width: 600px) and (max-width: 1039px) {
  body .msus-cat-filter,
  body #msus-catalog .mc-controls { min-height: 354px; }
}

@media (min-width: 480px) and (max-width: 599px) {
  body .msus-cat-filter,
  body #msus-catalog .mc-controls { min-height: 410px; }
}

@media (max-width: 479px) {
  body .msus-cat-filter,
  body #msus-catalog .mc-controls { min-height: 522px; }
}

@media (max-width: 439px) {
  body .msus-catalog-static .mc-family:first-child .mc-family-head,
  body #msus-catalog .mc-family:first-child .mc-family-head { min-height: 99px; }
}

@media (min-width: 440px) and (max-width: 599px) {
  body .msus-catalog-static .mc-family:first-child .mc-family-head,
  body #msus-catalog .mc-family:first-child .mc-family-head { min-height: 69px; }
}

/* section 13 (1.5.1, P5.6 pill flash): with JavaScript, the header pill is held from first paint while the page's first
   section (#main) carries a primary button, or on the referral page, until pill-hold.js has made its first decision and
   added html.msus-hold-ready (header-hold.js adds it too, as a failsafe). html.msus-js comes from calm-head.js in <head>,
   so without JavaScript the pill always shows. */
html.msus-js:not(.msus-hold-ready) body:has(#main .msus-btn) .msus-hdr .msus-hdr__action,
html.msus-js:not(.msus-hold-ready) body.msus-referral-page .msus-hdr .msus-hdr__action { display: none; }

/* section 14 (1.5.7, nov6-N): the Pack the box picture (a stack of layers on the square plate, placed by inline fractions
   from includes/packbox.php), the family hero cut-outs, and the How it works station drawings (W5, msus-ill-*.svg) in the
   place of the 24 px pictograms. The frame keeps its 1:1 and 4:5 ratios, so nothing shifts as layers load. */
.msus-packbox-pic__layer { position: absolute; display: block; }
.msus-packbox-pic__layer img { display: block; width: 100%; height: auto; }
.msus-packbox-pic__pack { transform-origin: 50% 100%; }
.msus-pfam-hero__pic--pack { background-color: var(--msus-stone); }
.msus-pfam-hero__pack { display: flex; align-items: center; justify-content: center; }
.msus-pfam-hero__pack picture { display: contents; }
.msus-pfam-hero__pack-img { display: block; width: 78%; height: auto; filter: drop-shadow(0 14px 14px rgba(26, 35, 50, 0.22)); }
body .msus-hiw-steps__line .msus-line__stop { grid-template-columns: var(--msus-station-size) minmax(0, 1fr) 120px; }
body .msus-hiw-steps__line .msus-pictogram { width: 120px; height: auto; align-self: start; }
body .msus-hiw-steps__line .msus-pictogram .msus-ill { display: block; width: 100%; height: auto; }
@media (max-width: 767px) {
  body .msus-hiw-steps__line .msus-line__stop { grid-template-columns: var(--msus-station-size) minmax(0, 1fr) 72px; }
  body .msus-hiw-steps__line .msus-pictogram { width: 72px; }
}

/* section 15 (1.5.11): Pack the box's 4XL chip is off until Tab-style briefs is ticked (packbox-list.js); the note beside
   the size chips; and the referral page's prefill note (assets/js/referral-prefill.js, printed by includes/widgets.php). */
.msus-chip:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.msus-home-pack__4xl[hidden] { display: none; }
.msus-ref-note { max-width: var(--msus-form-max); margin: 0; }
.msus-ref-note:empty { display: none; }
.msus-ref-note:not(:empty) { margin: 0 0 var(--msus-space-24); padding: var(--msus-space-16) var(--msus-space-24); border-left: 4px solid var(--msus-deep-sky); background-color: var(--msus-sky-tint); color: var(--msus-navy-ink); font-size: 16px; line-height: 1.5; }
.msus-ref-note p { margin: 0; }
.msus-ref-note__change { margin-top: var(--msus-space-8) !important; }

/* 19. Home, "We work with every Illinois Medicaid health plan" (1.5.14, Nov 7): one card per plan.
 * Each plan is its own Linen card with a check badge, the plan name and an arrow at the foot: separate plans we work
 * with, not steps in a sequence. Cards in a row share one height, so a name on two lines ("Blue Cross Community") keeps
 * the rows even. These rules outrank the Breakdance class rules for .msus-home-plans__index and __name on purpose; the
 * index's old station dot (li::before) becomes the badge. */
.msus-home-plans__grid .msus-home-plans__index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-flow: row;
  gap: var(--msus-space-16);
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  list-style: none;
}
.msus-home-plans__grid .msus-home-plans__index li {
  --pl-pad: var(--msus-space-24);
  --pl-badge: 32px;
  position: relative;
  display: flex;
  min-width: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}
/* The check badge: we work with this plan. */
.msus-home-plans__grid .msus-home-plans__index li::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: var(--pl-pad);
  left: var(--pl-pad);
  width: var(--pl-badge);
  height: var(--pl-badge);
  border: 0;
  border-radius: var(--msus-radius-round);
  background: var(--msus-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a5fc2' stroke-width='2.5' stroke-linecap='square'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 18px no-repeat;
  pointer-events: none;
  transition: background-color var(--t-hover) ease;
}
.msus-home-plans__grid .msus-home-plans__index li::after {
  content: none;
}
.msus-home-plans__grid .msus-home-plans__name,
.msus-home-plans__grid .msus-home-plans__name:visited {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--msus-space-24);
  min-height: 176px;
  padding: calc(var(--pl-pad) + var(--pl-badge) + var(--msus-space-16)) var(--pl-pad) var(--pl-pad);
  border: 1px solid transparent;
  background-color: var(--msus-linen);
  color: var(--msus-navy-ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-hover) var(--ease-out), box-shadow var(--t-hover) ease;
}
/* The arrow, at the foot of every card. */
.msus-home-plans__grid .msus-home-plans__name::after {
  content: "";
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: auto;
  background-color: var(--msus-deep-sky);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='square'%3E%3Cpath d='M3 12h16M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='square'%3E%3Cpath d='M3 12h16M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--t-hover) var(--ease-out);
}
.msus-home-plans__grid .msus-home-plans__name:hover,
.msus-home-plans__grid .msus-home-plans__name:focus-visible {
  border-color: var(--msus-deep-sky);
  background-color: var(--msus-white);
  color: var(--msus-deep-sky);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px rgba(61, 66, 82, 0.35);
}
.msus-home-plans__grid .msus-home-plans__index li:has(.msus-home-plans__name:hover)::before,
.msus-home-plans__grid .msus-home-plans__index li:has(.msus-home-plans__name:focus-visible)::before {
  background-color: var(--msus-sky-tint);
  transform: translateY(-2px);
}
.msus-home-plans__grid .msus-home-plans__name:hover::after,
.msus-home-plans__grid .msus-home-plans__name:focus-visible::after {
  transform: translateX(6px);
}
@media (prefers-reduced-motion: reduce) {
  .msus-home-plans__grid .msus-home-plans__name:hover,
  .msus-home-plans__grid .msus-home-plans__name:focus-visible,
  .msus-home-plans__grid .msus-home-plans__index li:has(.msus-home-plans__name:hover)::before,
  .msus-home-plans__grid .msus-home-plans__index li:has(.msus-home-plans__name:focus-visible)::before {
    transform: none;
  }
}
@media (max-width: 1023px) {
  .msus-home-plans__grid .msus-home-plans__index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .msus-home-plans__grid .msus-home-plans__name,
  .msus-home-plans__grid .msus-home-plans__name:visited {
    min-height: 156px;
    font-size: 20px;
  }
}
@media (max-width: 479px) {
  .msus-home-plans__grid .msus-home-plans__index {
    gap: var(--msus-space-12);
  }
  .msus-home-plans__grid .msus-home-plans__index li {
    --pl-pad: var(--msus-space-16);
    --pl-badge: 28px;
  }
  .msus-home-plans__grid .msus-home-plans__index li::before {
    background-size: 16px;
  }
  .msus-home-plans__grid .msus-home-plans__name,
  .msus-home-plans__grid .msus-home-plans__name:visited {
    gap: var(--msus-space-16);
    min-height: 132px;
    padding-top: calc(var(--pl-pad) + var(--pl-badge) + var(--msus-space-12));
    font-size: 17px;
  }
  .msus-home-plans__grid .msus-home-plans__name::after {
    width: 20px;
    height: 20px;
  }
}

/* 20. Header on phones (1.5.15, Nov 7): once the "Request supplies" pill shows, the logo, Menu, Call and the pill fit on
 * one row down to 375 px (the label is two characters longer than "Refer a client" was). */
@media (max-width: 479px) {
  .msus-hdr .msus-hdr__logo img {
    width: 128px;
    height: auto;
  }
  .msus-hdr .msus-hdr__action {
    min-height: 40px;
    padding: 0 10px;
    font-size: 14px;
  }
}
@media (max-width: 379px) {
  .msus-hdr .msus-hdr__logo img {
    width: 112px;
  }
}

/* 18. Photo bands (.msus-band, the /partners farmhouse band), 1.5.32. The band's parallax was background-attachment:
 * fixed, which Chrome repaints on the main thread on every scroll frame; while the band's fade entrance and the
 * page's scroll work ran, the fixed photo lagged the scroll and jumped as the band came into view. Where scroll-driven
 * animations exist (Chrome, Edge), the photo now rides a ::before layer that moves on the compositor instead: the same
 * picture, scrolled at about half speed through the band, so it moves smoothly with the page. Other browsers keep the
 * band as it was. Off under reduced motion and html.msus-calm, where the photo simply sits still. */
@supports (animation-timeline: view()) {
  html body .msus-band {
    position: relative;
    overflow: clip; /* not hidden: a hidden box is a scroll container, which would become the ::before's view() scroller and freeze the pan */
    isolation: isolate;
    background-attachment: scroll;
  }

  html body .msus-band::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -25%;
    bottom: -25%;
    z-index: -1;
    background-image: inherit;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 72%; /* keeps the parcel at the door in view on wide screens */
    pointer-events: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    html:not(.msus-calm) body .msus-band::before {
      animation: msus-band-pan linear both;
      animation-timeline: view();
      will-change: transform;
    }
  }
}

@keyframes msus-band-pan {
  from { transform: translate3d(0, -16%, 0); }
  to { transform: translate3d(0, 16%, 0); }
}

/* 19. Step timelines (.msus-line), 1.5.33. The line was a fixed 4-column grid, so a guide with 5 steps (the switching
 * guide: Send, Check, Doctor, Stop, Door) pushed the last stop onto a second row under the rail. From tablet width up,
 * the stops now share one row whatever their number. Phones keep the vertical list.
 * 1.5.34: the vertical variant (/families "How it works for you", /care-coordinators/ccu "What happens next") is
 * excluded; it stays a single-column list at every width. */
@media (min-width: 768px) {
  html body .msus-line:not(.msus-line--vertical) {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}
