/*
 * Program Explorer component styles.
 *
 * Loaded by the Program Explorer content layout, once per page, only on pages
 * that carry the component. Everything is scoped to .pex and built on the
 * site tokens from main0610.css, which the page already loads; this file
 * holds only what the site has no classes for. Per-instance values (the
 * photo, the rows shown) and the script's measurements stay on the elements
 * as custom properties.
 *
 * When this file changes, bump the ?v= on the layout's <link>, so browsers
 * holding the old copy fetch the new one alongside the new markup.
 */
/* Site classes such as .frame set display, which would beat [hidden]. */
.pex [hidden] { display: none !important; }
/* .region (main0610.css) gives the section equal space above and below:
   --space-xl, --space-3xl from 64em, or --region-space if a page sets
   it. Its overflow: hidden would cut off a long preview or an open
   dropdown at the section's bottom edge, so it is undone here; the waves
   clip themselves (.pex-waves). */
.pex.region { overflow: visible; }
/* Sizes and spacing follow the Figma file "widget" (page "widget alone
   for clicks", frames "Filter Degrees" and "Preview Program"), in fixed
   rem rather than the site's fluid --size-step-* and --space-* tokens,
   which grow and shrink with the window and so never quite match it.
   Corners there are 20px. */
.pex { --pex-tint: #DDEBF9; --pex-radius: 1.25rem; --pex-gap: var(--space-m, 1.5rem); display: grid; gap: 2.5rem; }
/* The phone and tablet waves: the same art as the inline desktop waves, as
   a background image (see .pex-hero::after). */
.pex.has-waves { --pex-waves-mobile: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201440%20940%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20fill%3D%22%23005A8B%22%20d%3D%22M1452.0%20345.6L1452.0%20484.7C1328.7%20447.5%201222.6%20463.3%201123.9%20501.7C1099.6%20489.5%201075.4%20477.5%201051.2%20466.2C1184.9%20425.4%201319.5%20374.2%201452.0%20345.6Z%22%2F%3E%3Cpath%20fill%3D%22%23005A8B%22%20d%3D%22M1451.0%20345.6L1752.0%20280.8L1752.0%20575.2L1451.0%20484.7Z%22%2F%3E%3Cpath%20fill%3D%22%230379BF%22%20d%3D%22M1452.0%20259.0L1452.0%20345.6C1319.5%20374.2%201184.9%20425.4%201051.2%20466.2C871.3%20381.4%20694.8%20329.9%20487.0%20478.0C457.1%20464.0%20427.5%20446.7%20398.3%20425.5C238.1%20309.6%2067.3%20308.0%20-107.0%20345.6L-107.0%20259.0C-49.8%20241.6%208.7%20226.1%2070.5%20216.1C71.6%20216.8%2072.7%20217.5%2073.7%20218.2C239.1%20326.0%20415.6%20324.0%20595.8%20286.9C599.9%20288.6%20604.2%20290.3%20608.4%20292.1C975.9%20448.3%201200.9%20335.4%201452.0%20259.0Z%22%2F%3E%3Cpath%20fill%3D%22%230379BF%22%20d%3D%22M1451.0%20259.0L1752.0%20167.7L1752.0%20280.8L1451.0%20345.6Z%22%2F%3E%3Cpath%20fill%3D%22%230379BF%22%20d%3D%22M-106.0%20345.6L-407.0%20410.3L-407.0%20350.3L-106.0%20259.0Z%22%2F%3E%3Cpath%20fill%3D%22%2378AFE9%22%20d%3D%22M1452.0%20141.5L1452.0%20217.8C1191.3%20312.8%201004.7%20279.1%20829.7%20225.3C1040.6%20162.9%201252.0%2096.3%201452.0%20141.5Z%22%2F%3E%3Cpath%20fill%3D%22%2378AFE9%22%20d%3D%22M1451.0%20141.5L1581.2%20170.7L1581.2%20170.7L1451.0%20217.8Z%22%2F%3E%3Cpath%20fill%3D%22%23005A8B%22%20d%3D%22M1051.2%20466.2C1075.4%20477.5%201099.5%20489.5%201123.9%20501.7C828.1%20616.6%20598.1%20934.3%20169.8%20639.9C262.8%20618.2%20362.6%20571.5%20471.6%20489.3C476.7%20485.4%20481.9%20481.6%20487.0%20478.0C667.0%20562.3%20858.1%20525.1%201051.2%20466.2Z%22%2F%3E%3Cpath%20fill%3D%22%23132245%22%20d%3D%22M487.0%20478.0C694.8%20329.9%20871.3%20381.4%201051.2%20466.2C858.1%20525.1%20667.0%20562.3%20487.0%20478.0Z%22%2F%3E%3Cpath%20fill%3D%22%23005A8B%22%20d%3D%22M487.0%20478.0C481.9%20481.6%20476.7%20485.4%20471.6%20489.3C362.6%20571.5%20262.8%20618.2%20169.8%20639.9C157.3%20631.3%20144.6%20622.2%20131.8%20612.5C44.8%20547.2%20-34.1%20506.7%20-107.0%20484.7L-107.0%20345.6C67.3%20308.0%20238.1%20309.6%20398.3%20425.5C427.5%20446.7%20457.1%20464.0%20487.0%20478.0Z%22%2F%3E%3Cpath%20fill%3D%22%23005A8B%22%20d%3D%22M-106.0%20484.7L-375.8%20403.6L-375.8%20403.6L-106.0%20345.6Z%22%2F%3E%3Cpath%20fill%3D%22%23132245%22%20d%3D%22M131.8%20612.5C144.6%20622.2%20157.3%20631.3%20169.8%20639.9C70.6%20663.1%20-20.7%20657.9%20-107.0%20637.4L-107.0%20484.7C-34.1%20506.7%2044.8%20547.2%20131.8%20612.5Z%22%2F%3E%3Cpath%20fill%3D%22%23132245%22%20d%3D%22M-106.0%20637.4L-407.0%20566.1L-407.0%20394.2L-106.0%20484.7Z%22%2F%3E%3Cpath%20fill%3D%22%230379BF%22%20d%3D%22M70.5%20216.1C217.7%20192.3%20383.8%20199.7%20595.8%20286.9C415.7%20324.0%20239.1%20326.0%2073.7%20218.2C72.7%20217.5%2071.6%20216.8%2070.5%20216.1Z%22%2F%3E%3Cpath%20fill%3D%22%23005A8B%22%20d%3D%22M1452.0%20218.7L1452.0%20259.9C1200.9%20336.3%20975.9%20449.3%20608.4%20293.1C604.2%20291.3%20600.0%20289.5%20595.8%20287.8C673.3%20271.8%20751.5%20249.3%20829.7%20226.2C1004.7%20280.0%201191.3%20313.7%201452.0%20218.7Z%22%2F%3E%3Cpath%20fill%3D%22%23005A8B%22%20d%3D%22M1451.0%20218.7L1752.0%20109.4L1752.0%20168.6L1451.0%20259.9Z%22%2F%3E%3Cpath%20fill%3D%22%23005A8B%22%20d%3D%22M-2.7%20177.3C364.8%2037.2%20586.0%20151.2%20829.7%20226.2C751.5%20249.3%20673.3%20271.8%20595.8%20287.8C383.8%20200.7%20217.7%20193.3%2070.5%20217.1C46.4%20201.6%2022.0%20188.4%20-2.7%20177.3Z%22%2F%3E%3Cpath%20fill%3D%22%23055F9F%22%20d%3D%22M-2.7%20177.3C22.0%20188.4%2046.4%20201.6%2070.5%20217.1C8.7%20227.0%20-49.8%20242.5%20-107.0%20259.9L-107.0%20218.7C-87.2%20211.5%20-67.0%20203.6%20-46.3%20194.9C-31.5%20188.6%20-17.0%20182.8%20-2.7%20177.3Z%22%2F%3E%3Cpath%20fill%3D%22%23055F9F%22%20d%3D%22M-106.0%20259.9L-407.0%20351.2L-407.0%20327.8L-106.0%20218.7Z%22%2F%3E%3Cpath%20fill%3D%22%2378AFE9%22%20d%3D%22M-107.0%20141.5C-71.8%20149.4%20-37.0%20160.8%20-2.7%20176.3C-17.0%20181.8%20-31.5%20187.7%20-46.3%20193.9C-67.0%20202.6%20-87.2%20210.6%20-107.0%20217.8L-107.0%20141.5Z%22%2F%3E%3Cpath%20fill%3D%22%2378AFE9%22%20d%3D%22M-106.0%20217.8L-407.0%20326.9L-407.0%2074.2L-106.0%20141.5Z%22%2F%3E%3C%2Fsvg%3E"); }
/* Section heading and subhead, centred above both panels: 36px on 43px
   ("Desktop(1440x900)/H2"), then 20px down to a 16px-on-24px subhead set
   about 800px wide. */
.pex-intro { text-align: center; color: var(--color-blue, #005A8B); max-width: 52rem; margin-inline: auto; --flow-space: 1.25rem; }
.pex-intro__heading { font-size: 2.25rem; line-height: 1.2; color: var(--color-blue, #005A8B); }
.pex-intro__subhead { font-size: 1rem; line-height: 1.5; max-width: 50rem; margin-inline: auto; }
/* The two panels sit in the site's .wrapper (85rem wide at most, with
   the site's --gutter either side), so they line up with the page's
   other content. The waves stay outside it, in .pex-stage, which spans
   the section. */
.pex-stage > .wrapper { display: grid; gap: var(--pex-gap); }
.pex-explorer { background: var(--pex-tint); border-radius: var(--pex-radius); padding: var(--space-l, 2rem) var(--space-s, 1rem); }
/* 20px above the title, 3rem each side (the fields are 404px of the
   card's 504px), 2rem below the last row or link. Between blocks 1rem,
   with the exceptions set on the blocks themselves: 20px from the intro
   to the filters, 8px from the search box to the chips. */
.pex-card { border-radius: var(--pex-radius); padding: 1.25rem 3rem 2rem; box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25); --flow-space: 1rem; }
.pex-card > [data-pex-form] { --flow-space: 1.25rem; }
.pex-card > .pex-chipbar { --flow-space: 0.5rem; }
.pex-card__head { text-align: center; color: var(--color-blue, #005A8B); --flow-space: 0.25rem; }
/* 24px bold title over a 14px line wrapped to about 300px. */
.pex-card__title { font-size: 1.5rem; line-height: 1.2; font-weight: 700; color: var(--color-blue, #005A8B); }
.pex-card__intro { font-size: 0.875rem; max-width: 20rem; margin-inline: auto; }
/* 14px bold labels on a 24px line, 5px above their field. */
.pex-label { display: block; font-weight: 700; font-size: 0.875rem; line-height: 1.5rem; padding: 0; margin-bottom: 0.3125rem; }
.pex form > * + * { margin-top: 1.25rem; }
.pex-multi { border: 0; padding: 0; margin: 0; min-width: 0; position: relative; }
/* The options keep the spacing they had before the card's --flow-space
   shrank, which they would otherwise inherit. */
.pex-panel { --flow-space: 1.5rem; }
/* Dropdowns 52px tall with 16px corners and 16px text. The search box
   below is held to the same height. */
.pex-trigger { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 3.25rem; box-sizing: border-box; background: var(--color-light, #fff); color: var(--color-dark, #201F1F); border: 1px solid var(--color-gray, #DEDEDE); border-radius: 1rem; padding: 0 1rem; font: inherit; font-size: 1rem; text-align: left; cursor: pointer; }
.pex-trigger::after { font-family: 'Material Symbols Outlined'; content: '\e5cf'; font-size: 1.5rem; line-height: 1; transition: transform 250ms ease; }
.pex-trigger[aria-expanded="true"]::after { transform: rotate(180deg); }
.pex-trigger:focus-visible, .pex-chip:focus-visible, .pex-close:focus-visible, .pex-finder-cta:focus-visible { outline: 3px dashed var(--color-blue, #005A8B); outline-offset: 3px; }
.pex.is-enhanced .pex-panel { position: absolute; z-index: 5; inset-inline: 0; top: 100%; margin-top: var(--space-3xs, 0.25rem); background: var(--color-light, #fff); border: 1px solid var(--color-gray, #DEDEDE); border-radius: 0.75rem; box-shadow: 0 6px 16px rgba(19, 34, 69, 0.18); padding: var(--space-s, 1rem) var(--space-m, 1.5rem); max-height: 22rem; overflow-y: auto; }
/* The site's search pill is 4.5rem tall (a 3rem circle in 0.75rem of
   padding); here it matches the dropdowns' 52px, with the circle cut to
   2.5rem (39px in Figma). */
.pex .filter__form { margin: 0; border: 1px solid var(--color-blue, #005A8B); height: 3.25rem; box-sizing: border-box; padding: 0 0.3125rem 0 0.5rem; }
.pex .filter__form .button-circle { width: 2.5rem; height: 2.5rem; }
/* An input's default min-width is its ~20ch intrinsic size, which in the
   narrow explorer column (60-75em) pushed the button out of the pill. */
.pex .filter__input { min-width: 0; }
/* main0610.css makes .filter__input bold, placeholder included; the design
   sets the placeholder in regular weight. */
.pex .filter__input::placeholder { font-weight: 400; }
/* umass-extra-css.css colours every .material-symbols-outlined
   var(--color-dark), which beats the white .button-circle passes down and
   left the magnifier dark on the blue circle. */
.pex .button-circle .material-symbols-outlined { color: inherit; }
/* Chips stay on one row and scroll sideways. While some are cut off on
   the right they fade out there and a chevron scrolls them along; once
   scrolled, the left
   edge does the same, mirrored. The chevrons sit beside the strip, never
   over a chip. */
.pex-chipbar { display: flex; align-items: center; gap: var(--space-3xs, 0.25rem); }
.pex-chips { flex: 1; min-width: 0; display: flex; gap: 0.375rem; overflow-x: auto; scrollbar-width: none; padding-block: 3px; }
.pex-chips::-webkit-scrollbar { display: none; }
.pex-chips { --pex-fade-start: 0px; --pex-fade-end: 0px; -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--pex-fade-start), #000 calc(100% - var(--pex-fade-end)), transparent); mask-image: linear-gradient(to right, transparent, #000 var(--pex-fade-start), #000 calc(100% - var(--pex-fade-end)), transparent); }
.pex-chips.is-clipped-start { --pex-fade-start: 3rem; }
.pex-chips.is-clipped-end { --pex-fade-end: 3rem; }
.pex-chips-more { flex: none; display: flex; background: none; border: 0; padding: 0; color: var(--color-dark, #201F1F); cursor: pointer; }
.pex-chips-more::before { font-family: 'Material Symbols Outlined'; content: '\e5cc'; font-size: 1.75rem; line-height: 1; }
.pex-chips-more[data-pex-chips-more="back"]::before { content: '\e5cb'; }
/* Chips 32px tall: 14px text, 12px in from the left, an 18px x 8px from
   the right. */
.pex-chip { flex: none; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2rem; box-sizing: border-box; background: var(--color-light, #fff); color: var(--color-dark, #201F1F); border: 1px solid var(--color-gray, #DEDEDE); border-radius: 0.5rem; padding: 0 0.5rem 0 0.75rem; font: inherit; font-size: 0.875rem; line-height: 1.25rem; cursor: pointer; white-space: nowrap; }
.pex-chip::after { font-family: 'Material Symbols Outlined'; content: '\e5cd'; font-size: 1.125rem; }
.pex-chip:hover { border-color: var(--color-blue, #005A8B); }
/* A link, centred under the filters at the width of its text. */
.pex-finder-cta { display: block; width: fit-content; margin-inline: auto; font-size: 1rem; font-weight: 700; color: var(--color-dark, #201F1F); text-decoration: underline; text-decoration-color: #78AFE9; text-decoration-thickness: 3px; text-underline-offset: 0.35em; cursor: pointer; }
.pex-finder-cta:hover { text-decoration-color: var(--color-blue, #005A8B); }
/* The script sets the exact height of the first --pex-rows rows; this
   estimate (a one-line row) holds until it runs. */
.pex-results[data-pex-rows] { max-height: calc(var(--pex-rows) * 4rem); overflow-y: auto; }
/* main0610.css stacks .button-program in a column below 64em (its grid
   cards); the explorer's list is narrow at every width, so keep one row:
   name left, arrow right. */
/* The link itself stays dark, as on the program finder (whose links take
   currentColor), because its arrow glyph (::after) takes the link's
   colour: a dark outline circle that fills solid on hover. Only the name
   is blue. */
/* Rows about 51px tall: less padding than the site's
   .button-program, and the arrow's line box trimmed to the glyph. */
.pex .pex-listing { --flow-space: 0.3125rem; }
.pex-count { font-size: 0.875rem; line-height: 1.5rem; }
.pex-results .button-program { color: var(--color-dark, #201F1F); font-size: 1rem; font-weight: 700; text-decoration: none; flex-direction: row; align-items: center; text-align: start; padding-block: 0.625rem; }
.pex-results .button-program::after { flex: none; margin-left: auto; line-height: 1; }
/* Hover as on the program finder (/academics/program-finder/), whose rows
   are .button-program.image-link with the name in an h2: .button-program
   already slides the blue line in and fills the arrow; the name, styled
   there by .image-link h2, is underlined at rest and loses it on hover.
   The names here are spans (a heading per row would flood the outline),
   so those .image-link rules are restated for them. The name, not the
   link, carries the underline, which would otherwise run under the arrow
   glyph (its ::after) too. The open program keeps the hover look. */
.pex-results .button-program [data-pex-name] { color: var(--color-blue, #005A8B); text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.1em; transition: color var(--transition, 250ms ease); }
.pex-results .button-program:hover [data-pex-name], .pex-results .button-program[aria-current="true"] [data-pex-name] { text-decoration: none; }
.pex-results .button-program[aria-current="true"] { background-size: 0 2px, 100% 2px; }
.pex-results .button-program[aria-current="true"]::after { font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 72; }
/* The photo panel. Every photo, the default included, shows at 80%
   opacity, so the wave art behind the panels shows through it. */
.pex-hero { position: relative; border-radius: var(--pex-radius); }
.pex-hero::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--pex-photo, none) center / cover no-repeat; opacity: 0.8; }
/* While the preview is open over the photo (wide screens), the photo
   fades out, leaving the waves behind the preview; it fades back in as the preview slides away (.is-closing).
   The modal preview on phones leaves the photo alone. */
.pex-hero:has(> .pex-preview[open]:not(:modal):not(.is-closing))::before { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .pex:not(.no-motion) .pex-hero::before { transition: opacity 400ms ease; }
}
/* Room at the top for the close button in the corner; the wide,
   non-modal preview takes its own padding further down. */
.pex-preview { box-sizing: border-box; border: 0; border-radius: var(--pex-radius); padding: 3.5rem var(--space-m, 1.5rem) var(--space-l, 2rem); width: min(44rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto; color: var(--color-dark, #201F1F); background: var(--color-light, #fff); box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25); }
.pex-preview::backdrop { background: rgba(0, 90, 139, 0.55); }
/* 12px bold degree and format over a 32px bold serif title on a 43px
   line, then 16px-on-24px copy and a 14px button as wide as its text. */
.pex-preview__title { font-family: var(--font-heading, serif); font-size: 2rem; line-height: 1.35; font-weight: 700; color: var(--color-blue, #005A8B); outline: none; }
.pex-preview .program__options { color: var(--color-blue, #005A8B); font-size: 0.75rem; line-height: 1.5; text-transform: uppercase; }
.pex-preview__overview { font-size: 1rem; line-height: 1.5; }
.pex-preview__body { display: grid; gap: var(--space-m, 1.5rem); }
.pex-preview__text { --flow-space: var(--space-m, 1.5rem); }
/* Squircle: the top-left corner square,
   the other three rounded by about 30% of the image's width. */
.pex-preview .frame { border-radius: 0 30% 30% 30%; }
.pex-preview .button { width: auto; font-size: 0.875rem; background: var(--color-yellow, #FEDE42); color: var(--color-blue-dark, #132245); }
.pex-preview .button:hover { background: var(--color-ecru, #FEF4BD); }
.pex-preview__fallback { font-style: italic; opacity: 0.75; }
/* The site's own close button, .close-action: a plain dark x in a 3.5rem
   box, the one on the home page's notice under the hero video, so the
   preview closes the way the rest of the site does. Only its place and
   colour are set here, the glyph sitting where the old 2.25rem circled x
   did. Icon only; the label stays for screen readers, and the glyph's
   alt text is empty (the "/ ''" form, with a plain fallback for browsers
   without it) so the private-use character is never read out. */
.pex .pex-close { position: absolute; top: 0.375rem; right: 0.375rem; color: var(--color-dark, #201F1F); cursor: pointer; }
.pex .pex-close::before { content: '\e5cd'; content: '\e5cd' / ''; line-height: 1; }
/* Desktop waves (drawn inline, see $pexWaveSvg). Parallax on arrival:
   when the waves first scroll into view the script adds .is-playing, and
   the whole composition swings in behind the card and photo, which stay
   put, and settles within exactly 5s, then stays still for good. 5s
   keeps it inside WCAG 2.2.2 (motion that starts on its own may run up
   to 5s without a pause control). Without the script, with
   'motion' => false (Disable animation) or for readers who ask for
   reduced motion, the waves simply sit at rest.

   Battery: only transform animates, on one whole element, so the GPU
   slides a ready-painted layer and nothing is repainted per frame.
   will-change holds that layer only while playing; when it finishes the
   script adds .is-done, which drops the animation and the layer. */
.pex-waves { display: none; }
/* One smooth glide: the waves drift in from the left and a little below
   and come to rest, without overshooting or turning back. Two keyframes
   and a decelerating curve whose output stays within 0..1, so both axes
   only ever move one way, fast at first and easing to a stop at 5s.
   Offsets are % of the art's own 1440 x 940 box, so they scale with it:
   -8.333% is 120 units, inside the 300-unit extensions at each end; 1.489%
   is 14 units down, inside the 40 units of room below the bottom swell
   (.pex-waves reaches into the region's padding). */
@keyframes pex-glide { from { transform: translate(-8.333%, 1.489%); } to { transform: none; } }
@media (min-width: 60em) and (prefers-reduced-motion: no-preference) {
  /* Waiting at the start pose (the animation's 0%) until in view. */
  .pex.is-enhanced:not(.no-motion) .pex-waves__art { transform: translate(-8.333%, 1.489%); }
  .pex.is-enhanced:not(.no-motion) .pex-waves.is-playing .pex-waves__art { will-change: transform; animation: pex-glide 5000ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
  /* Outranks the two rules above. */
  .pex.is-enhanced:not(.no-motion) .pex-waves.is-playing.is-done .pex-waves__art { animation: none; transform: none; will-change: auto; }
}
/* Mobile and tablet, stacked: the white card first,
   then the photo as its own rounded panel, on a white page. The waves
   run from halfway down the card to below the photo and out to the
   section's edges. They hang off the photo panel (::after), so they
   follow it however tall the card grows, and sit at z-index -1 inside the
   isolated stage: under the card and under the photo, which they show
   through. */
@media (max-width: 59.99em) {
  /* The column floats clear of the page edges. */
  /* 1rem gutters, and 4rem from the subhead to the card.
     Vertical spacing is .region's alone. */
  .pex { margin-inline: 1rem; gap: 4rem; }
  /* The waves hang 90px below the photo, so they are added to the
     region's bottom space, which then follows the waves, not the photo. */
  .pex.region.has-waves { padding-bottom: calc(var(--region-space, var(--space-xl, 3rem)) + 5.625rem); }
  /* A size container, so the photo can take its height from the
     column's width (cqw) below. */
  .pex-stage { position: relative; isolation: isolate; container-type: inline-size; }
  /* The 1rem gutters already come from .pex, so the wrapper
     adds none of its own here. */
  .pex-stage > .wrapper { gap: var(--space-s, 1rem); padding-inline: 0; }
  /* Visual order only: the photo panel holds nothing to read on phones
     (the preview opens as a modal), so the reading order is unaffected. */
  .pex-explorer { order: -1; background: none; padding: 0; }
  .pex-card { border: 1px solid var(--color-gray, #DEDEDE); box-shadow: none; padding: var(--space-s, 1rem) var(--space-s, 1rem) var(--space-l, 2rem); }
  /* Inside the gutters, the card's width, rounded corners.
     7:8 up to 30rem tall, set as a height: with aspect-ratio, the height
     cap would narrow the panel instead (420px of a 736px column). */
  .pex-hero { height: min(100cqw * 8 / 7, 30rem); }
  /* Full window width: --pex-hero-x and --pex-vw come from the script
     (the window's width without its scrollbar, and the photo's offset
     from its left edge); without it, the 1rem gutters. */
  /* The Figma file "widget" (frame "First View", 375 wide, "explorer
     draft v3") draws the desktop art here too, not squeezed to the phone
     but larger and cropped: 1.08896 times as wide as drawn and 1.0373
     times as tall (art x -107..1452 across 1697.69px, art rows
     110.9..761.6 down 675px), so only a slice about 345 art units wide
     shows. That slice is kept at that fixed size whatever the width;
     wider screens show more of the art either side. Its art x 0 sits
     314.5px left of a 375px window, so 502px left of the photo's centre
     (50cqw in from the photo's left edge, which --pex-hero-x is in from
     the window's), and its visible bottom 90px below the photo, with the
     art's last 178.4 rows (185px) below that. The box runs 675px up from
     there, to the waves' top edge. Whole art: 1440 x 1.08896 = 1568.1px
     by 940 x 1.0373 = 975.1px. */
  .pex.has-waves .pex-hero::after { content: ''; position: absolute; z-index: -1; top: calc(100% - 585px); bottom: -5.625rem; left: calc(-1 * var(--pex-hero-x, 1rem)); width: var(--pex-vw, calc(100% + 2rem)); background: var(--pex-waves-mobile) no-repeat; background-size: 1568.1px 975.1px; background-position: left calc(var(--pex-hero-x, 1rem) + 50cqw - 502px) bottom -185px; pointer-events: none; }
}
/* The preview slides in from the left and back out
   on close; the script waits for the slide-out before closing. On wide
   screens it slides a shorter way and fades, from behind the white card,
   so it never shows to the card's left. */
@keyframes pex-slide-in { from { transform: translateX(calc(-100% - 2rem)); } }
@keyframes pex-slide-out { to { transform: translateX(calc(-100% - 2rem)); } }
@keyframes pex-slide-out-wide { to { transform: translateX(-45%); opacity: 0; } }
@keyframes pex-slide-in-wide { from { transform: translateX(-45%); opacity: 0; } }
@keyframes pex-fade-in { from { opacity: 0; } }
@keyframes pex-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .pex:not(.no-motion) .pex-preview[open] { animation: pex-slide-in 400ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  .pex:not(.no-motion) .pex-preview:modal::backdrop { animation: pex-fade-in 400ms ease; }
  .pex:not(.no-motion) .pex-preview.is-closing { animation: pex-slide-out 280ms ease-in forwards; }
  .pex:not(.no-motion) .pex-preview.is-closing::backdrop { animation: pex-fade-out 280ms ease-in forwards; }
  .pex:not(.no-motion) .pex-hero .pex-preview[open]:not(:modal) { animation-name: pex-slide-in-wide; }
  .pex:not(.no-motion) .pex-hero .pex-preview.is-closing:not(:modal) { animation-name: pex-slide-out-wide; }
}
@media (min-width: 40em) {
  /* Image column about 290px to the text's 410px, tops aligned. */
  .pex-preview__body.has-image { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: var(--space-l, 2rem); }
}
@media (min-width: 60em) {
  .pex { container-type: inline-size; }
  /* .region's bottom space is 7.5rem at 1440 (its --space-3xl); the Figma
     frames end 5rem below the card. A page's own --region-space still
     wins. */
  .pex.region { padding-bottom: var(--region-space, 5rem); }
  /* align-content: start sizes the row to the panels, not to the
     stage's wave min-height below, so the photo panel (which stretches
     to the row) ends where the white card does. */
  .pex-stage > .wrapper { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; align-content: start; }
  /* The white card stands on the waves itself; it sits above the photo
     panel so the preview slides out from behind it. */
  .pex-explorer { grid-row: 1; grid-column: 1; background: none; padding: 0; position: relative; z-index: 2; }
  /* The panel runs the full height of the row, so it ends with the white
     card and the preview inside it can end there too. The photo keeps
     its 5:3 at the top of it as an in-flow grid item, so a card shorter
     than the photo still leaves the whole photo showing. */
  .pex-hero { grid-row: 1; grid-column: 2; align-self: stretch; display: grid; align-content: start; background: none; }
  .pex-hero::before { position: relative; inset: auto; align-self: start; aspect-ratio: 5 / 3; }
  /* One wave composition behind both panels, out to the section's edges,
     placed and proportioned as in the Figma file "widget" (frame "Filter
     Degrees"), whose waves are this same art stretched to 1731 x 595 on
     a 1440 page: 1.1103 times as wide as drawn (the art's x -107..1452
     across 1731) and 0.9138 times as tall, starting at the window's left
     edge, its top 41px above the panels and its bottom 554px below their
     top edge (12px under the starting card there). --pex-art-w is the
     art's width: the window's, and never under 1440 (shrinking it pushes
     the top wave into the card), so narrower rows crop its right. The
     minimum height ends the stage 2.25rem below the waves (their bottom
     is 594.64px of art below their top edge, which is 41px above the
     panels, see .pex-waves svg), so with the
     5rem below (see .pex.region) the section ends 116px under them, as in
     that frame; a card running past the waves (the results) ends 5rem
     above the section's edge instead, as in "Preview Program". */
  .pex.has-waves .pex-stage { --pex-art-w: max(var(--pex-vw, 100cqw), 1440px); position: relative; isolation: isolate; padding: 3rem 0 0; min-height: calc(3rem - 2.5625rem + 594.64px + 2.25rem); }
  /* Reaches 40 art rows below the stage, into .region's bottom padding,
     so the swell is never cut off flat while the art glides, without
     adding space below the component. */
  /* Spans the whole window, not just the section: --pex-stage-x is the
     stage's offset from the window's left edge and --pex-vw the window's
     width without its scrollbar (both from the script, so the page never
     scrolls sideways); without the script, the section's width. The art
     starts at the window's left edge and is sized to the window. */
  .pex-waves { display: block; position: absolute; top: 0; bottom: -40px; left: calc(-1 * var(--pex-stage-x, 0px)); width: var(--pex-vw, 100%); z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
  /* max-width: none, or the site's svg { max-width: 100% } shrinks it. */
  /* In art units: x -107 lands on the window's left edge (107 x 1.1103
     = 118.8px in), and y 0 sits 142.37px above the panels at 1440 (the
     Figma waves' 41px plus the 101.37px of art above their top edge,
     110.9 art rows x 0.9138). Width 1440 x 1.1103, height 940 x 0.9138.
     On windows wider than 1440 only the width grows: the art stretches
     sideways across the window but keeps its 1440 height and its top
     edge 41px (2.5625rem) above the panels, inside the stage's 3rem top
     padding. */
  .pex-waves svg { overflow: visible; position: absolute; left: calc(var(--pex-art-w) * 118.8 / 1440); top: calc(3rem - 2.5625rem - 101.37px); width: calc(var(--pex-art-w) * 1.1103); max-width: none; height: 858.97px; }
  /* Non-modal on wide screens: the preview opens over the photo, as wide
     as it, and may run past the photo's bottom. */
  /* Padding: 4.5rem above the content, 2.5rem right, 3rem below and a
     narrow 1.25rem left of the image; the close button 1.25rem from the
     top, lined up with the right padding. */
  /* Kept at its own height and moved down so its bottom edge lines up
     with the white card's (the panel's bottom, see .pex-hero), rather
     than stretched to meet it. max-height keeps a long overview from
     pushing its top above the panels; it scrolls inside instead. */
  .pex-hero .pex-preview:not(:modal) { position: absolute; inset: auto 0 0; max-height: 100%; margin: 0; width: auto; z-index: 1; padding: 4.5rem 2.5rem 3rem 1.25rem; }
  .pex-hero .pex-preview:not(:modal) .pex-close { top: 0.625rem; right: 1.875rem; }
}
