/* ===================================================================
   education-centers-v2.css - the two Education Center pages (patient-education.html,
   professional-education.html) below their heroes: the look Vicky approved on 12 Nov 2026
   (D:\GEM Screenshots\.tools\handoff\to-B\010-assets\reference\patient.html and professional.html),
   ported class for class. Loaded on these two pages only, AFTER education-center.css, which still
   draws the two heroes and the patient page's closing band exactly as the live pages have them.
   The generator writes both pages (content/guides/build_guides.py).
   Fonts: the site's self-hosted Inter and Lora (tokens.css, styles.css); nothing from an outside host.
   Widths: every section's content sits in the site's .container (1120px, 1.25rem gutters), so the
   sections line up with the hero's words. Logical properties and the html[dir="rtl"] rules at the
   end mirror the Persian pages (fa-rtl.css, Linguise) without a second sheet.
   Glass: each glass element has a translucent solid colour first; the blur (12px at most) sits on
   top, so the look holds where backdrop-filter is off.
   The video rows glide as the homepage's Featured Patient Education does (fpe.css / fpe.js):
   a compositor transform keyframe 0 -> -50% over one cloned set; edu-centers.js sets --ec-dur from
   the measured set width so the speed is a constant px/s (the number is written on the row by the
   generator, data-ec-glide). Hover, keyboard focus, touch and a hidden tab pause it; reduced motion
   = no copies, no movement, a swipeable row; no JS = the same swipeable row.
   Round 2 (to-B 012 + 013, Vicky 12 Nov): the glide 50% faster (the generator's number), lighter glass play
   discs, two 16:9 patient video cards in view, full-colour topic pictures with a fade behind the title only,
   taller 3:2 surgical cards, the phone heroes, one section-title size, and the mouse-over family (lift,
   filled arrow circle with a sliding arrow, slow picture zoom) on the access pills, topic and research cards.
   =================================================================== */

.ec-sec, .ec-sec * { box-sizing: border-box; }
.ec-sec h2, .ec-sec h3, .ec-sec p, .ec-sec ul { margin: 0; }
.ec-sec ul { padding: 0; list-style: none; }
.ec-sec a { text-decoration: none; }
.ec-sec img { display: block; }
.ec-sec { font-family: var(--font-body); color: var(--text); }

/* ---- shared pieces ------------------------------------------------- */
/* the round arrow chip: a line version on the light cards, a glass version over a picture */
.ec-arr { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; }
.ec-arr svg { width: 16px; height: 16px; }
.ec-arr--line { border: 1.5px solid rgba(58, 42, 102, 0.45); color: var(--purple); background: rgba(255, 255, 255, 0.55); }
.ec-arr--glass { background: rgba(10, 12, 40, 0.42); border: 1px solid rgba(255, 255, 255, 0.7); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* section heads: the thin gold rule above, the heading, the line under it, the link at the right */
.ec-sechead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.ec-rule { display: block; width: 56px; height: 3px; border-radius: 2px; background: var(--gold); margin-bottom: 12px; }
/* Section titles (to-B 012 s5): one size on both pages and at most 80% of the page's hero title. Wider than 900px
   the professional hero title is clamp(1.8rem, 3.2vw, 2.5rem) (it stays: at 44.8px it wraps to three lines in its
   48% column at every width), so the titles follow 80% of it, a hair under (2.55vw, 1.43rem), up to 32px from
   1255px; under 900px both hero titles are 28.8px or more, so 23px (= 79.9% of 28.8). The patient closing title
   (education-center.css) and the professional closing title take the same size below. */
.ec-h2, .ec-h2--xl, .ec-close__h, .pec-closing .pec-closing__title { font-size: clamp(1.43rem, 2.55vw, 2rem); }
.ec-h2 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; color: var(--purple); }
.ec-sub { margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--text-warm); }
.ec-more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 16px; color: var(--purple-bright); }
.ec-more:hover { color: var(--purple); text-decoration: underline; }
.ec-more svg { width: 18px; height: 18px; flex: 0 0 auto; }
.ec-sec a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---- the glide (both pages) --------------------------------------- */
.ec-glide { position: relative; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; border-radius: 24px; container-type: inline-size; }
.js .ec-glide { overflow-x: hidden; }
.ec-glide__track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; }
.ec-glide__item { flex: 0 0 auto; display: flex; margin-inline-end: 24px; }
.js .ec-glide.is-animated .ec-glide__track { animation: ec-drift var(--ec-dur, 80s) linear infinite; will-change: transform; }
@keyframes ec-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
/* the pause and keyboard rules repeat .js and .is-animated, so they outrank the animation shorthand above */
.js .ec-glide.is-animated.is-paused .ec-glide__track { animation-play-state: paused; }
.js .ec-glide.is-animated.is-kbd .ec-glide__track { animation: none; }
.js .ec-glide.is-kbd { overflow-x: auto; }
.ec-glide.is-static .ec-glide__item--clone { display: none; }   /* one video, or a set that fits: no movement, no copies */
.ec-glide.is-static .ec-glide__track { animation: none !important; }

/* ===================================================================
   PATIENT EDUCATION CENTER
   =================================================================== */
/* ---- the three access links on the seam (to-B 011, Vicky 12 Nov) --------------------------------------
   Above 900px the row of three pills straddles the hero's bottom edge: pulled up 32px over the picture, the
   lavender band starting directly under the hero beneath the pills' lower half. The pills are a little more
   solid than the 010 reference (.94 / .94 / .95) with a soft shadow, so they read over the photograph.
   Phones: no overlap - the three stacked under the hero. */
.ec-quick { position: relative; z-index: 2; margin-top: -32px; padding: 0; }
.ec-quick__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ec-quick__a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px 10px 18px; padding-inline: 18px 14px; border-radius: 16px; color: var(--purple); border: 1px solid rgba(58, 42, 102, 0.12); box-shadow: 0 10px 24px rgba(46, 33, 80, 0.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s ease-out; }
.ec-quick__a--rose { background: rgba(252, 233, 238, 0.94); border-color: #F1CFDB; }
.ec-quick__a--lav { background: rgba(236, 228, 248, 0.94); border-color: rgba(107, 79, 160, 0.22); }
.ec-quick__a--gold { background: rgba(250, 240, 222, 0.95); border-color: rgba(187, 134, 63, 0.36); }
.ec-quick__ic { width: 26px; height: 26px; flex: 0 0 auto; color: var(--purple-bright); }
.ec-quick__a--rose .ec-quick__ic { color: #A2456B; }
.ec-quick__a--gold .ec-quick__ic { color: var(--gold-deep); }
.ec-quick__t { font-family: var(--font-head); font-weight: 600; font-size: 18px; line-height: 1.25; }
.ec-quick__a .ec-arr { margin-inline-start: auto; }

/* ---- Patient Education Videos: the lavender band ------------------ */
.ec-band { padding: 92px 0 50px; margin-top: -32px; background: linear-gradient(180deg, #EFE9F8 0%, #F7F4FB 100%); border-top: 1px solid rgba(58, 42, 102, 0.08); border-bottom: 1px solid rgba(58, 42, 102, 0.08); }
/* two 16:9 cards in view (to-B 012 s3.1), 24px apart, together exactly as wide as the Explore Key Topics grid: the
   whole cover shows (a 16:9 picture in a 16:9 card); phones one 16:9 card */
.ec-vitem { width: calc((100cqw - 24px) / 2); }
@supports not (width: 1cqw) { .ec-vitem { width: min(528px, calc(50vw - 2rem)); } }
.ec-vcard { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; color: #fff; background: #1E1438; }
.ec-vcard:hover { color: #fff; }
.ec-vcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.ec-vcard__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 13, 40, 0.90) 0%, rgba(20, 13, 40, 0.50) 30%, rgba(20, 13, 40, 0) 58%), linear-gradient(to right, rgba(20, 13, 40, 0.50) 0%, rgba(20, 13, 40, 0) 46%); }
.ec-vcard__tag { position: absolute; inset-inline-start: 24px; top: 22px; padding: 7px 14px; border-radius: 999px; background: var(--gold); color: #1E1438; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
/* the play disc (to-B 012 s2, Vicky's decision of 12 Nov): centred, real glass - half of the earlier tint, no dark
   plate, a white sheen over the tint, a 1px rim, an inner light and shadow, a soft drop shadow; the blur with
   saturation. The patient page's tint is the header bar's light purple, the professional page's gold. The white
   triangle carries its own dark edge (drop-shadow) so it reads on a bright frame without the plate. Where
   backdrop-filter is not supported the tint is doubled (.56 / .62), still no plate. The card's hover and keyboard
   focus brighten the tint by .08, no size change. The patient disc is the professional disc's size now that the
   patient card is the professional card's size. */
.ec-play { position: absolute; left: 50%; top: 46%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background-color: rgba(199, 166, 241, 0.28); background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0) 46%);
  border: 1px solid rgba(255, 255, 255, 0.55); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -8px 16px rgba(10, 12, 40, 0.10), 0 10px 26px rgba(10, 12, 40, 0.30); transition: background-color .2s ease-out; }
.ec-play svg { width: 31px; height: 31px; margin-inline-start: 5px; filter: drop-shadow(0 0 1.5px rgba(10, 12, 40, 0.85)) drop-shadow(0 1px 3px rgba(10, 12, 40, 0.45)); }
.ec-play--pro { top: 44%; background-color: rgba(187, 134, 63, 0.31); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ec-play { background-color: rgba(199, 166, 241, 0.56); }
  .ec-play--pro { background-color: rgba(187, 134, 63, 0.62); }
}
.ec-vcard:focus-visible .ec-play { background-color: rgba(199, 166, 241, 0.36); }
.ec-vc__link:focus-visible .ec-play--pro { background-color: rgba(187, 134, 63, 0.39); }
@media (hover: hover) {
  .ec-vcard:hover .ec-play { background-color: rgba(199, 166, 241, 0.36); }
  .ec-vc__link:hover .ec-play--pro { background-color: rgba(187, 134, 63, 0.39); }
}
.ec-vcard__txt { position: absolute; inset-inline: 28px; bottom: 24px; }
.ec-vcard__title { margin: 0 0 10px; font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 1.2; color: #fff; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ec-vcard__line { font-size: 15px; color: #fff; opacity: .96; }

/* ---- Explore Key Topics -------------------------------------------- */
.ec-topics { padding: 40px 0 8px; }
.ec-tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
/* to-B 012 s3.2 (Vicky's option A): the picture at full colour, no shade over the whole card; a purple fade only
   behind the title - from transparent ~28px above the title's top edge to rgba(46,33,80,.86) at the card's bottom,
   so it follows the title's height (one line: it starts below the card's middle; two lines: at 40% from the top).
   The fade is the title's own ::before, so it is drawn under the words and over the picture. Measured on the worst
   pixel: 9.5:1 or better resting, 5.4:1 or better hovered (the fade at 80%, the picture at 1.05). */
.ec-tcard { position: relative; display: block; height: 160px; border-radius: 16px; overflow: hidden; color: #fff; background: var(--purple-mid); box-shadow: 0 1px 2px rgba(46, 33, 80, 0.10); outline: 2px solid transparent; outline-offset: 2px; transition: transform .2s ease-out, box-shadow .2s ease-out, outline-color .2s ease-out; }
.ec-tcard:hover { color: #fff; }
.ec-tcard:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.ec-tcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease-out; }
.ec-tcard__title { position: absolute; z-index: 1; inset-inline: 20px 64px; bottom: 18px; font-family: var(--font-head); font-weight: 600; font-size: 21px; line-height: 1.2; color: #fff; }
.ec-tcard__title::before { content: ""; position: absolute; z-index: -1; top: -28px; bottom: -18px; inset-inline: -20px -64px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(46, 33, 80, 0) 0, rgba(46, 33, 80, 0.86) 28px, rgba(46, 33, 80, 0.86) 100%); transition: opacity .5s ease-out; }   /* the ramp is the 28px above the title, full strength from its top edge down (a straight ramp to the bottom measured 2.4-3.8:1) */
.ec-tcard .ec-arr { position: absolute; z-index: 2; inset-inline-end: 16px; bottom: 16px; }

/* ===================================================================
   PROFESSIONAL EDUCATION CENTER
   =================================================================== */
/* the hero is the live one (education-center.css); only the photograph changes: the operating room in the
   right 46% of the band on desktop, fading in at its left edge, under the unchanged tint and wash */
/* to-B 017 (Vicky, 12 Nov 18:41), the laptop layout (900px up, where both heroes put the words over the picture): the
   professional hero as tall as the patient hero (education-center.css gives that one clamp(26rem, 38vw, 34rem); this one
   had clamp(24rem, 34vw, 30rem)), the photograph in the right 54% (was 46%), the navy tint over it .30 (was .50); the words,
   their sizes and left edge unchanged, centred top to bottom by the hero's own flex. The same photograph, no new crop:
   at 30% down the lamp, the surgeon's head and the monitor are all in view up to 1599px; from 1600 the box is too wide
   and short for all three, so the position moves to 45% and the monitor stays whole (the lamp's top is trimmed). */
@media (min-width: 56.25rem) {
  .pro-hero { min-height: clamp(26rem, 38vw, 34rem); }
  /* to-B 019 (Vicky, 12 Nov 19:51): the title the patient hero title's size at every width (education-center.css gives that one
     clamp(1.9rem, 3.6vw, 2.8rem) at line height 1.14; this one had clamp(1.8rem, 3.2vw, 2.5rem) at 1.16), on two lines: the
     title's own box widens to 13em (582px at 1440, scaling with the size) so "Improving Care. Together." fits on one line;
     the label and the paragraph keep their 48% boxes. */
  .pro-hero .pro-hero__title { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.14; max-width: 13em; }
  /* Fast lane (Vicky, 13 Nov 2026): the photograph shows clearly, the surgeon above all. The all-over navy tint .06
     (was .30, then .12); the left wash (education-center.css: .90 0%, .82 40%, .50 55%, 0 78%) is solid .90 to 46% -
     just past the lede (44-47%) and the title's first line (42-47.5%) - and gone by 56% (was 53% / 64% earlier today).
     "Together." (to 52.4% at 1280) sits on the start of the fade: worst pixel under any title line 8.87:1, the lede
     12.6:1, Chinese 12.4:1 or better, 900-1920px; no text-shadow needed. */
  .pro-hero .pro-hero__tint { background: rgba(var(--navy-rgb), 0.06); }
  .pro-hero .pro-hero__wash { background: linear-gradient(to right, rgba(var(--navy-rgb), 0.90) 0%, rgba(var(--navy-rgb), 0.90) 46%, rgba(var(--navy-rgb), 0) 56%); }
  .pro-hero .pro-hero__img--or { left: auto; right: 0; width: 54%; object-position: 50% 30%; -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 20%); mask-image: linear-gradient(to right, transparent 0%, #000 20%); }
}
@media (min-width: 100rem) {
  .pro-hero .pro-hero__img--or { object-position: 50% 45%; }
}
@media (max-width: 56.1875rem) {
  .pro-hero .pro-hero__img--or { object-position: 50% 30%; }
}
.pro-hero__pic { display: contents; }   /* the <picture> around the hero photograph adds no box */
/* to-B 012 s4.3: the phone hero (under 768px, where education-center.css lays the photograph under the words in a
   65svh box with a navy wash). The phone crop (pro-hero-or-phone-*.webp, the same photograph, full width, rows
   322-1307: the surgeon's head, the monitor with the laparoscopic view, the light as far as it fits) fills the
   space above the words, 32.5svh, and fades into the navy over its last 14px; the wash is clear over the picture
   (.25 at most, at its lower edge) and as solid as before behind the words (.88 to .94). The hero's height, the
   words and their sizes are education-center.css's, untouched. */
@media (max-width: 47.99rem) {
  /* to-B 015 s1 (Vicky 12 Nov): the picture band is taller - 82.05vw (320px at 390, scaling with the width) - with the
     SAME framing as before: the photograph at the width's scale, its top where the earlier 32.5svh box placed it
     (object-position y = (32.5svh - 985 x 100vw / 1280) / 2 = 16.25svh - 38.477vw), so the lamp, the surgeon's head
     and the monitor do not move and the extra height shows more at the bottom (the taller crop pro-hero-or-phone2,
     same top, left and right, rows 322-1480). The picture fades into the navy over its last 40px; the words start
     under the band (the hero's padding-top), lower by the added height; the wash is clear over the picture and
     .88 to .94 behind the words as before. */
  .pro-hero { padding-top: 82.05vw; }
  .pro-hero .pro-hero__img--or { height: 82.05vw; object-position: 50% calc(16.25vh - 38.477vw); object-position: 50% calc(16.25svh - 38.477vw); -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent 100%); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent 100%); }
  .pro-hero .pro-hero__wash { height: 100%; background: linear-gradient(to bottom, rgba(var(--navy-rgb), 0) 0, rgba(var(--navy-rgb), 0) calc(82.05vw - 40px), rgba(var(--navy-rgb), 0.25) calc(82.05vw - 1px), rgba(var(--navy-rgb), 0.88) 82.05vw, rgba(var(--navy-rgb), 0.94) 100%); }
  /* to-B 012 s3.3: the patient phone hero - the picture moves up inside the same box so the top of her hair sits
     42px below the hero's top (it is at 22.95% of the picture's height: 0.2295 x 65svh = 14.92svh). The picture
     keeps its size; the strip it leaves at the bottom lies under the wash (.92 or more there, the band's own rose)
     and the picture fades into it over its last 48px. */
  .pec-hero .pec-hero__img { top: calc(42px - 14.92vh); top: calc(42px - 14.92svh); -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent 100%); mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent 100%); }
}
.ec-sec--pro .ec-h2 { color: var(--navy); }
.ec-sec--pro .ec-arr--line { border-color: rgba(20, 50, 92, 0.45); color: var(--navy); background: rgba(255, 255, 255, 0.6); }

/* ---- Featured Surgical Videos: the light blue band ---------------- */
.ec-band--pro { margin-top: 0; padding: 46px 0 54px; background: linear-gradient(180deg, #E8F0FA 0%, #F3F7FC 100%); border-top: 1px solid rgba(20, 50, 92, 0.08); border-bottom: 1px solid rgba(20, 50, 92, 0.08); }
.ec-vctl { display: flex; align-items: center; justify-content: flex-end; gap: 8px 12px; flex-wrap: wrap; flex: 1 1 240px; text-align: end; }   /* the notice and the link share the heading's row; the link wraps under the notice before the pair drops under the heading */
.ec-sechead > div:first-child { flex: 0 1 auto; min-width: 0; }
.ec-notice { display: inline-flex; align-items: center; gap: 8px; margin-inline-end: 8px; font-size: 13px; line-height: 1.4; color: var(--text-warm); }
.ec-notice svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--gold-deep); }
.ec-glide--pro { border-radius: 24px; }
/* two cards in view, together exactly as wide as the Research & Guidelines row; 3:2 (to-B 012 s4.1: about 18%
   taller than 16:9), the frame centred, which also trims the footage's black side bars */
.ec-vc { width: calc((100cqw - 24px) / 2); }
@supports not (width: 1cqw) { .ec-vc { width: min(528px, calc(50vw - 2rem)); } }
.ec-vc__link { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: 24px; overflow: hidden; color: #fff; background: #0A1B33; }
.ec-vc__link:hover { color: #fff; }
.ec-vc__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.ec-vc__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 14, 30, 0.92) 0%, rgba(8, 14, 30, 0.58) 30%, rgba(8, 14, 30, 0) 60%), linear-gradient(to right, rgba(8, 14, 30, 0.50) 0%, rgba(8, 14, 30, 0) 46%); }
.ec-chip { position: absolute; inset-inline-start: 24px; top: 22px; padding: 7px 14px; border-radius: 999px; background: rgba(10, 12, 40, 0.62); border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ec-vc__txt { position: absolute; inset-inline: 28px; bottom: 24px; }
.ec-vc__title { margin: 0 0 10px; font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 1.2; color: #fff; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ec-vc__line { font-size: 15px; color: #fff; opacity: .96; }

/* ---- Research & Guidelines ---------------------------------------- */
/* to-B 038 1a (Maggie, 19 Nov 2026): the three cards about 30% taller, the same width - min-height 150 -> 195px on the card
   and its picture (from-B 057, measured there); the picture keeps its proportions (object-fit: cover), the hover unchanged */
/* 057 v2 (Vicky, 19 Nov 2026, 20:15): more picture, the words further right. The picture column is 50% of the card where the
   words keep their lines, else as near 50% as they allow, never under 44% (v1): max(44%, min(50%, 100% - R)), R = the room the
   words need for the lines they have in v1, per range below (measured every 5px from 320 to 1300 in from-B 057). The fade starts
   at 65% of the picture (was 50%; mirrored on /fa/). From 1120px the words start 3px further in (11px), so at 1440 they start
   24px further right than v1. The card's height is v1's exactly: 195px, or where v1's picture made it taller (one column, 600-899px)
   v1's height formula on the card's own width (33cqw + 1.34px); the picture now fills that height instead of setting it. The least height
   is 197px with the 1px border above and below (v1: the 195px picture plus that border). */
.ec-rc { container-type: inline-size; }
.ec-research { padding: 44px 0 10px; }
.ec-rgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 6px; }
.ec-rc__link { position: relative; display: grid; grid-template-columns: max(44%, min(50%, calc(100% - 172px))) minmax(0, 1fr); min-height: max(197px, calc(33cqw + 1.34px)); height: 100%; border-radius: 16px; overflow: hidden; color: var(--navy); background: #EEF3FA; border: 1px solid rgba(20, 50, 92, 0.14); transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s ease-out; }
.ec-rc__link:hover { color: var(--navy); }
.ec-rc__img { width: 100%; height: 0; min-height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(to right, #000 65%, transparent 100%); mask-image: linear-gradient(to right, #000 65%, transparent 100%); transition: transform .5s ease-out; }
.ec-rc__body { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 16px; padding-inline: 8px 56px; }
.ec-rc__icon { width: 30px; height: 30px; color: var(--navy); }
.ec-rc__title { font-family: var(--font-head); font-weight: 600; font-size: 20px; line-height: 1.22; }
.ec-rc .ec-arr { position: absolute; inset-inline-end: 14px; bottom: 14px; width: 32px; height: 32px; }
@media (min-width: 70rem) { .ec-rc__body { padding-inline: 11px 56px; } }                                                        /* 057 v2 */
@media (max-width: 56.1875rem) { .ec-rc__link { grid-template-columns: max(44%, min(50%, calc(100% - 362px))) minmax(0, 1fr); } }   /* 057 v2: one column */
@media (max-width: 37.4375rem) { .ec-rc__link { grid-template-columns: max(44%, min(50%, calc(100% - 252px))) minmax(0, 1fr); } }   /* 057 v2: under 600px */
@media (max-width: 29.9375rem) { .ec-rc__link { grid-template-columns: max(44%, min(50%, calc(100% - 231px))) minmax(0, 1fr); } }   /* 057 v2: under 480px */
@media (max-width: 27.75rem) { .ec-rc__link { grid-template-columns: max(44%, min(50%, calc(100% - 172px))) minmax(0, 1fr); } }     /* 057 v2: 444px and under */

/* ---- the closing band: a rounded box at the content width --------- */
.ec-proclose { padding: 44px 0 56px; }
.ec-close { position: relative; overflow: hidden; border-radius: 14px; background: var(--navy-deep); }
.ec-close__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.ec-close__veil { position: absolute; inset: 0; background: linear-gradient(to right, rgba(14, 35, 64, 0.94) 0%, rgba(20, 50, 92, 0.82) 42%, rgba(20, 50, 92, 0.40) 100%); }
.ec-close__in { position: relative; padding: 56px; }
.ec-close__rule { display: block; width: 56px; height: 3px; border-radius: 2px; background: var(--guide-gold-light, #E7C97A); margin-bottom: 14px; }
.ec-close__h { margin: 0 0 10px; max-width: 45rem; font-family: var(--font-head); font-style: italic; font-weight: 600; line-height: 1.2; color: #fff; }
.ec-close__p { margin: 0 0 24px; max-width: 46ch; font-size: 17px; line-height: 1.6; color: #fff; }
.ec-sec .ec-close__p { margin-block-end: 28px; }   /* to-B 012 s4.2: 28px to the button (24px on phones); .ec-sec p (0,1,1) had reset the rule above to 0 */
.ec-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 24px; border-radius: 999px; background: #fff; color: var(--navy-deep); font-weight: 600; font-size: 16px; }
.ec-btn:hover { background: #EEF3FA; color: var(--navy-deep); }
.ec-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---- hover and focus: the glide holds (edu-centers.js) and the card's picture zooms about 4% ------------ */
@media (hover: hover) {
  .ec-vcard:hover .ec-vcard__img, .ec-vc__link:hover .ec-vc__img { transform: scale(1.04); }
}
.ec-vcard:focus-visible .ec-vcard__img, .ec-vc__link:focus-visible .ec-vc__img { transform: scale(1.04); }

/* ---- the mouse-over family (to-B 013, Vicky 12 Nov): the access pills, the topic cards and the research cards
   lift a little with a deeper shadow, the arrow circle fills and its arrow turns and slides 3px toward the
   reading direction, the cards' pictures zoom slowly. On a mouse only (hover: hover), so nothing sticks after a
   tap; keyboard focus gives the same; a press (:active) brings the card back down, and on touch it is the only
   state (the arrow circle's fill). The gold outlines stay. Reduced motion: colours only, nothing moves. */
.ec-arr svg { transition: transform .2s ease-out; }
.ec-arr { transition: background-color .2s ease-out, border-color .2s ease-out, color .2s ease-out; }
@media (hover: hover) {
  .ec-quick__a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(46, 33, 80, 0.20); border-color: var(--gold); color: var(--purple); }
  .ec-tcard:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(46, 33, 80, 0.22); outline-color: var(--gold); }
  .ec-tcard:hover .ec-tcard__img { transform: scale(1.05); }
  .ec-tcard:hover .ec-tcard__title::before { opacity: .8; }
  .ec-rc__link:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(14, 35, 64, 0.18); border-color: var(--gold); }
  .ec-rc__link:hover .ec-rc__img { transform: scale(1.04); }
  .ec-quick__a:hover .ec-arr svg, .ec-tcard:hover .ec-arr svg, .ec-rc__link:hover .ec-arr svg { transform: translateX(3px); }
  .ec-quick__a--rose:hover .ec-arr { background-color: #A2456B; border-color: #A2456B; color: #fff; }
  .ec-quick__a--lav:hover .ec-arr { background-color: #6B4FA0; border-color: #6B4FA0; color: #fff; }
  .ec-quick__a--gold:hover .ec-arr { background-color: #8A6222; border-color: #8A6222; color: #fff; }
  .ec-tcard:hover .ec-arr { background-color: rgba(255, 255, 255, 0.96); border-color: rgba(255, 255, 255, 0.96); color: #3A2A66; }
  .ec-rc__link:hover .ec-arr { background-color: #14325C; border-color: #14325C; color: #fff; }
}
.ec-quick__a:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(46, 33, 80, 0.20); border-color: var(--gold); }
.ec-tcard:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(46, 33, 80, 0.22); }
.ec-tcard:focus-visible .ec-tcard__img { transform: scale(1.05); }
.ec-tcard:focus-visible .ec-tcard__title::before { opacity: .8; }
.ec-rc__link:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(14, 35, 64, 0.18); }
.ec-rc__link:focus-visible .ec-rc__img { transform: scale(1.04); }
.ec-quick__a:focus-visible .ec-arr svg, .ec-tcard:focus-visible .ec-arr svg, .ec-rc__link:focus-visible .ec-arr svg { transform: translateX(3px); }
.ec-quick__a--rose:focus-visible .ec-arr, .ec-quick__a--rose:active .ec-arr { background-color: #A2456B; border-color: #A2456B; color: #fff; }
.ec-quick__a--lav:focus-visible .ec-arr, .ec-quick__a--lav:active .ec-arr { background-color: #6B4FA0; border-color: #6B4FA0; color: #fff; }
.ec-quick__a--gold:focus-visible .ec-arr, .ec-quick__a--gold:active .ec-arr { background-color: #8A6222; border-color: #8A6222; color: #fff; }
.ec-tcard:focus-visible .ec-arr, .ec-tcard:active .ec-arr { background-color: rgba(255, 255, 255, 0.96); border-color: rgba(255, 255, 255, 0.96); color: #3A2A66; }
.ec-rc__link:focus-visible .ec-arr, .ec-rc__link:active .ec-arr { background-color: #14325C; border-color: #14325C; color: #fff; }
.ec-quick__a:active { transform: translateY(0); box-shadow: 0 10px 24px rgba(46, 33, 80, 0.14); }
.ec-tcard:active, .ec-rc__link:active { transform: translateY(0); }

/* ---- phones and tablets ------------------------------------------- */
@media (max-width: 56.1875rem) {   /* under 900px */
  /* to-B 015 s2 (Vicky 12 Nov): the three buttons continue the hero - the section takes the colour the hero ends with
     (cream from 768 to 899px, where the hero has no wash; the rose of the wash under 768px, below), no gap, no line;
     20px under "You are not alone." (pulled up into the hero's bottom padding, 5vw here), 56px buttons 10px apart,
     28px above the lavender band; a stronger 1.5px outline in each button's own accent at .45. */
  .ec-quick { margin-top: calc(20px - 5vw); padding: 0 0 28px; background: var(--cream); }
  .ec-quick__row { gap: 10px; }
  .ec-quick__a { min-height: 56px; padding-block: 8px; border-width: 1.5px; }
  .ec-quick__a--rose { border-color: rgba(162, 69, 107, 0.45); }
  .ec-quick__a--lav { border-color: rgba(107, 79, 160, 0.45); }
  .ec-quick__a--gold { border-color: rgba(138, 98, 34, 0.45); }
  .ec-band { margin-top: 0; padding-top: 44px; }
  .ec-quick__row { grid-template-columns: 1fr; }
  .ec-tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ec-h2, .ec-h2--xl, .ec-close__h, .pec-closing .pec-closing__title { font-size: 23px; }   /* 79.9% of the 28.8px hero title */
  .ec-sec .ec-close__p { margin-block-end: 24px; }
  .ec-glide, .ec-glide--pro { border-radius: 20px; }
  .ec-vitem { width: 100cqw; }   /* one 16:9 card in view: nothing of the cover cut */
  .ec-vcard { aspect-ratio: 16 / 9; border-radius: 20px; }
  .ec-vcard__shade { background: linear-gradient(to top, rgba(20, 13, 40, 0.94) 0%, rgba(20, 13, 40, 0.86) 36%, rgba(20, 13, 40, 0.45) 62%, rgba(20, 13, 40, 0) 80%); }   /* the shorter 16:9 phone card: a two-line title reaches higher, so the shade does (measured) */
  .ec-vcard__title { font-size: 18px; }   /* to-B 019: one step smaller (was 20px; 22px on laptop, was 26) */
  .ec-vcard__line { font-size: 13px; }
  .ec-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; top: 38%; }
  .ec-play svg { width: 24px; height: 24px; margin-inline-start: 4px; }
  .ec-vcard__tag { inset-inline-start: 16px; top: 16px; }
  .ec-vcard__txt { inset-inline: 18px; bottom: 18px; }
  .ec-vc { width: calc(100cqw - 56px); }
  .ec-vc__link { aspect-ratio: 1 / 1; border-radius: 20px; }
  .ec-vc__title { font-size: 18px; }   /* to-B 019: one step smaller (was 22px; 22px on laptop, was 26) */
  .ec-vc__shade { background: linear-gradient(to top, rgba(8, 14, 30, 0.94) 0%, rgba(8, 14, 30, 0.86) 36%, rgba(8, 14, 30, 0.45) 60%, rgba(8, 14, 30, 0) 78%); }   /* the square phone card: the three-line title sits higher, so the shade reaches higher (measured) */
  .ec-vc__line { font-size: 14px; }
  .ec-play--pro { width: 60px; height: 60px; margin: 0; left: auto; inset-inline-end: 16px; top: 16px; }
  .ec-play--pro svg { width: 22px; height: 22px; }
  .ec-chip { inset-inline-start: 16px; top: 16px; max-width: 62%; }
  .ec-vc__txt { inset-inline: 18px; bottom: 18px; }
  .ec-rgrid { grid-template-columns: 1fr; }
  .ec-vctl { flex-basis: 100%; justify-content: flex-start; text-align: start; }
  .ec-close__in { padding: 32px 24px; }
  .ec-close__veil { background: linear-gradient(to right, rgba(14, 35, 64, 0.94) 0%, rgba(20, 50, 92, 0.86) 55%, rgba(20, 50, 92, 0.76) 100%); }   /* phones: the words run the box's full width, over the brighter right of the picture (measured) */
}
@media (max-width: 47.99rem) {     /* under 768px: after the block above, so it wins */
  .ec-quick { margin-top: -4px; background: rgb(var(--pec-wash)); }   /* to-B 015 s2: under 768px the hero ends in the wash's rose and its bottom padding is 24px */
}
@media (max-width: 37.5rem) {      /* under 600px */
  .ec-tgrid { grid-template-columns: 1fr; }
}

/* ---- reduced motion: nothing moves by itself; the rows are static, swipeable ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ec-glide__item--clone { display: none; }
  .js .ec-glide .ec-glide__track { animation: none !important; }
  .js .ec-glide { overflow-x: auto; }
  .ec-vcard__img, .ec-vc__img, .ec-tcard, .ec-tcard__img, .ec-tcard__title::before, .ec-quick__a, .ec-rc__link, .ec-rc__img, .ec-arr, .ec-arr svg, .ec-play { transition: none !important; }
  .ec-vcard:hover .ec-vcard__img, .ec-vc__link:hover .ec-vc__img, .ec-vcard:focus-visible .ec-vcard__img, .ec-vc__link:focus-visible .ec-vc__img { transform: none; }
  /* 013 s4: no lift, no zoom, no slide - the colours only */
  .ec-quick__a:hover, .ec-quick__a:focus-visible, .ec-tcard:hover, .ec-tcard:focus-visible, .ec-rc__link:hover, .ec-rc__link:focus-visible,
  .ec-tcard:hover .ec-tcard__img, .ec-tcard:focus-visible .ec-tcard__img, .ec-rc__link:hover .ec-rc__img, .ec-rc__link:focus-visible .ec-rc__img,
  .ec-quick__a:hover .ec-arr svg, .ec-tcard:hover .ec-arr svg, .ec-rc__link:hover .ec-arr svg,
  .ec-quick__a:focus-visible .ec-arr svg, .ec-tcard:focus-visible .ec-arr svg, .ec-rc__link:focus-visible .ec-arr svg { transform: none; }
  html[dir="rtl"] .ec-arr svg, html[dir="rtl"] .ec-quick__a:hover .ec-arr svg, html[dir="rtl"] .ec-tcard:hover .ec-arr svg, html[dir="rtl"] .ec-rc__link:hover .ec-arr svg,
  html[dir="rtl"] .ec-quick__a:focus-visible .ec-arr svg, html[dir="rtl"] .ec-tcard:focus-visible .ec-arr svg, html[dir="rtl"] .ec-rc__link:focus-visible .ec-arr svg { transform: scaleX(-1); }
}

/* ---- right-to-left (fa-rtl.css serves /fa/ with dir="rtl") ------------------------------------------------ */
/* the glide keeps its left-to-right track (as the homepage's does); each card's own text is right-to-left */
html[dir="rtl"] .ec-glide { direction: ltr; }
html[dir="rtl"] .ec-glide__item > * { direction: rtl; }
html[dir="rtl"] .ec-arr svg, html[dir="rtl"] .ec-more svg, html[dir="rtl"] .ec-btn svg { transform: scaleX(-1); }
html[dir="rtl"] .ec-vcard__shade { background: linear-gradient(to top, rgba(20, 13, 40, 0.90) 0%, rgba(20, 13, 40, 0.50) 30%, rgba(20, 13, 40, 0) 58%), linear-gradient(to left, rgba(20, 13, 40, 0.50) 0%, rgba(20, 13, 40, 0) 46%); }
html[dir="rtl"] .ec-vc__shade { background: linear-gradient(to top, rgba(8, 14, 30, 0.92) 0%, rgba(8, 14, 30, 0.58) 30%, rgba(8, 14, 30, 0) 60%), linear-gradient(to left, rgba(8, 14, 30, 0.50) 0%, rgba(8, 14, 30, 0) 46%); }
/* the arrows slide toward the reading direction: left here (the flip comes first, so +3px reads as -3px) */
@media (hover: hover) {
  html[dir="rtl"] .ec-quick__a:hover .ec-arr svg, html[dir="rtl"] .ec-tcard:hover .ec-arr svg, html[dir="rtl"] .ec-rc__link:hover .ec-arr svg { transform: scaleX(-1) translateX(3px); }
}
html[dir="rtl"] .ec-quick__a:focus-visible .ec-arr svg, html[dir="rtl"] .ec-tcard:focus-visible .ec-arr svg, html[dir="rtl"] .ec-rc__link:focus-visible .ec-arr svg { transform: scaleX(-1) translateX(3px); }
html[dir="rtl"] .ec-rc__img { -webkit-mask-image: linear-gradient(to left, #000 65%, transparent 100%); mask-image: linear-gradient(to left, #000 65%, transparent 100%); }   /* 057 v2: the fade from 65%, mirrored */
html[dir="rtl"] .ec-close__veil { background: linear-gradient(to left, rgba(14, 35, 64, 0.94) 0%, rgba(20, 50, 92, 0.82) 42%, rgba(20, 50, 92, 0.40) 100%); }
@media (min-width: 56.25rem) {
  html[dir="rtl"] .pro-hero .pro-hero__img--or { right: auto; left: 0; -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 20%); mask-image: linear-gradient(to left, transparent 0%, #000 20%); }
}
@media (max-width: 56.1875rem) {
  html[dir="rtl"] .ec-play--pro { left: auto; right: auto; inset-inline-end: 16px; }
  /* the phone shades and veil as in left-to-right (the rules above would otherwise outrank them) */
  html[dir="rtl"] .ec-vcard__shade { background: linear-gradient(to top, rgba(20, 13, 40, 0.94) 0%, rgba(20, 13, 40, 0.86) 36%, rgba(20, 13, 40, 0.45) 62%, rgba(20, 13, 40, 0) 80%); }
  html[dir="rtl"] .ec-vc__shade { background: linear-gradient(to top, rgba(8, 14, 30, 0.94) 0%, rgba(8, 14, 30, 0.86) 36%, rgba(8, 14, 30, 0.45) 60%, rgba(8, 14, 30, 0) 78%); }
  html[dir="rtl"] .ec-close__veil { background: linear-gradient(to left, rgba(14, 35, 64, 0.94) 0%, rgba(20, 50, 92, 0.86) 55%, rgba(20, 50, 92, 0.76) 100%); }
}

/* to-B 020 (13 Nov 2026): on /zh-cn/ the professional hero title is Maggie's 医学前沿 · 改善诊疗 · 携手同行 (a Chinese
   half from the generator, shown by styles.css's [data-story-lang] rule). Each phrase keeps the dot after it in one
   .zh-nobr span, so the title may wrap only after a dot and never inside a phrase. Size unchanged (the rule above). */
.pro-hero__title .zh-nobr { white-space: nowrap; }
