/* POLYMATH — storytelling sections: ticker, image with text, statement, columns, figures, stacking cards, horizontal
   scroll, feature ring, rich text, video, FAQ, newsletter, journal and gallery. */

/* ---------- Ticker ---------- */
.pm-ticker { position: relative; overflow: hidden; }
.pm-ticker__band { position: relative; padding-block: var(--band-pad, 1.1rem); background: var(--band-bg, transparent); color: var(--band-fg, inherit); }
.pm-ticker[data-size='small'] { --t-size: calc(1.1rem * var(--heading-scale)); --band-pad: .8rem; }
.pm-ticker[data-size='medium'] { --t-size: calc(clamp(1.6rem, 3vw, 2.6rem) * var(--heading-scale)); }
.pm-ticker[data-size='large'] { --t-size: calc(clamp(2.6rem, 6vw, 5.6rem) * var(--heading-scale)); }
.pm-ticker[data-size='huge'] { --t-size: calc(clamp(4rem, 11vw, 11rem) * var(--heading-scale)); --band-pad: .4rem; }
@media (prefers-reduced-motion: reduce) { .pm-ticker[data-size='huge'] { --t-size: calc(clamp(2.6rem, 7vw, 6.5rem) * var(--heading-scale)); } }
.pm-ticker .pm-marquee__group > * { display: inline-flex; align-items: center; gap: var(--gap-x); }
.pm-ticker__item { font-family: var(--font-heading); font-weight: var(--heading-weight); text-transform: var(--heading-case); letter-spacing: var(--heading-tracking); font-size: var(--t-size); line-height: 1.05; white-space: nowrap; }
.pm-ticker__item[data-style='outline'] { color: transparent; -webkit-text-stroke: max(1.5px, .02em) var(--band-fg, var(--fg)); paint-order: stroke fill; }
.pm-ticker__item[data-style='accent'] { color: var(--accent); }
.pm-ticker[data-style='tape'] .pm-ticker__band--1 .pm-ticker__item[data-style='accent'] { color: inherit; }
.pm-ticker__item[data-style='italic'] { font-family: var(--font-accent); font-style: var(--accent-style); font-weight: var(--accent-weight); text-transform: none; letter-spacing: 0; }
.pm-ticker__pill { display: inline-block; height: calc(var(--t-size) * .82); aspect-ratio: 2.1; border-radius: 999px; overflow: hidden; flex: none; }
.pm-ticker__pill img { width: 100%; height: 100%; object-fit: cover; }
.pm-ticker__sep { width: calc(var(--t-size) * .5); height: calc(var(--t-size) * .5); color: var(--accent); flex: none; }
.pm-ticker[data-style='tape'] { padding-block: clamp(2rem, 5vw, 4.5rem); }
.pm-ticker[data-style='tape'] .pm-ticker__band--1 { --band-bg: var(--accent); --band-fg: var(--on-accent); transform: rotate(-3deg) scale(1.06); z-index: 2; box-shadow: 0 18px 40px -20px rgb(0 0 0 / .5); }
.pm-ticker[data-style='tape'] .pm-ticker__band--1 .pm-ticker__sep { color: currentColor; }
.pm-ticker[data-style='tape'] .pm-ticker__band--2 { --band-bg: var(--fg); --band-fg: var(--bg); position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%) rotate(3deg) scale(1.06); z-index: 1; opacity: .96; }
.pm-ticker__pause { position: absolute; right: .5rem; top: .5rem; z-index: 3; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--fg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); opacity: .0; transition: opacity .3s; }
.pm-ticker:is(:hover, :focus-within) .pm-ticker__pause, .pm-ticker__pause[aria-pressed='true'] { opacity: 1; }
@media (hover: none) { .pm-ticker__pause { opacity: 1; } }
.pm-ticker__pause svg { width: .9rem; height: .9rem; }
.pm-ticker__pause [data-when='paused'], .pm-ticker__pause[aria-pressed='true'] [data-when='playing'] { display: none; }
.pm-ticker__pause[aria-pressed='true'] [data-when='paused'] { display: block; }
.no-js .pm-ticker__pause { display: none; }

/* ---------- Image with text ---------- */
.pm-iwt { display: grid; gap: clamp(2rem, 5vw, 5.5rem); align-items: center; }
@media (min-width: 990px) {
  .pm-iwt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pm-iwt[data-side='right'] .pm-iwt__media { order: 2; }
  .pm-iwt[data-layout='overlap'] { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .pm-iwt[data-layout='overlap'] .pm-iwt__body { margin-left: -22%; z-index: 2; }
  .pm-iwt[data-layout='overlap'][data-side='right'] { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .pm-iwt[data-layout='overlap'][data-side='right'] .pm-iwt__body { margin-left: 0; margin-right: -22%; }
}
.pm-iwt__media { position: relative; }
.pm-iwt__frame { position: relative; aspect-ratio: var(--ratio, 4 / 5); border-radius: var(--radius-img); overflow: hidden; background: var(--surface); }
.pm-iwt__frame img, .pm-iwt__frame svg { width: 100%; height: 100%; object-fit: cover; }
.pm-iwt__second { position: absolute; width: 42%; right: -6%; bottom: -9%; aspect-ratio: 3 / 4; border-radius: var(--radius-img); overflow: hidden; border: 6px solid var(--bg); box-shadow: var(--shadow); }
.pm-iwt[data-side='right'] .pm-iwt__second { right: auto; left: -6%; }
.pm-iwt__second img { width: 100%; height: 100%; object-fit: cover; }
.pm-iwt__body { position: relative; display: grid; gap: clamp(1rem, 2vw, 1.5rem); justify-items: start; }
.pm-iwt[data-layout='overlap'] .pm-iwt__body { padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.pm-iwt__body > .rte { color: var(--fg-muted); max-width: 36rem; }
.pm-iwt__num { font-family: var(--font-accent); font-style: var(--accent-style); font-size: calc(clamp(4rem, 9vw, 8rem) * var(--heading-scale)); line-height: .8; color: var(--accent-text); }
.pm-iwt__list { display: grid; gap: .7rem; width: 100%; padding: 0; list-style: none; }
.pm-iwt__list li { display: flex; gap: .75rem; align-items: start; padding-top: .7rem; border-top: 1px solid var(--line); }
.pm-iwt__list svg { width: 1.2rem; height: 1.2rem; color: var(--accent-text); flex: none; margin-top: .15rem; }

/* ---------- Statement ---------- */
.pm-statement { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); justify-items: var(--jx, center); text-align: var(--ta, center); }
.pm-statement__text { font-size: calc(clamp(1.9rem, 4.4vw, 4.4rem) * var(--heading-scale)); line-height: 1.12; max-width: 60rem; }
.pm-statement__text p { margin: 0; }
/* Words not yet lit stay at a readable contrast (a colour mix, not a faint opacity). */
.js-motion .pm-statement__text[data-light] .pm-w { color: color-mix(in srgb, var(--fg) 55%, var(--bg)); transition: color .45s ease; }
.js-motion .pm-statement__text[data-light] .pm-w.is-lit { color: var(--fg); }
.js-motion .pm-statement__text[data-light] strong .pm-w.is-lit { color: var(--accent-text); }
.pm-statement__text img.pm-inline-img { display: inline-block; height: .82em; width: auto; aspect-ratio: 1.8; border-radius: 999px; object-fit: cover; vertical-align: -.08em; }
.pm-statement__by { display: flex; align-items: center; gap: .9rem; font-size: var(--t-small); }
.pm-statement__by .pm-media { width: 3rem; height: 3rem; border-radius: 50%; }

/* ---------- Columns ---------- */
.pm-cols { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem) var(--gap); grid-template-columns: 1fr; }
/* Phones: short card and centred columns pair up two per row instead of stacking into a long tower. */
@media (max-width: 749px) { .pm-cols:is([data-style='cards'], [data-align='center']):has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm-cols:is([data-style='cards'], [data-align='center']):has(> :nth-child(4)) .pm-col { padding: 1rem; } }
@media (min-width: 750px) { .pm-cols { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); } }
@media (min-width: 990px) { .pm-cols { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); } }
.pm-col { position: relative; display: grid; gap: .8rem; align-content: start; }
.pm-col__icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: calc(var(--radius) * .6 + 8px); background: var(--accent); color: var(--on-accent); transition: transform .6s var(--ease-back); }
.pm-col:hover .pm-col__icon { transform: rotate(-8deg) scale(1.08); }
.pm-col__icon svg { width: 1.5rem; height: 1.5rem; }
.pm-col__media { aspect-ratio: var(--ratio, 4 / 3); border-radius: var(--radius-img); overflow: hidden; margin-bottom: .4rem; }
.pm-col__media img { width: 100%; height: 100%; object-fit: cover; }
.pm-col__num { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: calc(clamp(2.4rem, 4vw, 3.6rem) * var(--heading-scale)); line-height: 1; color: var(--accent-text); letter-spacing: var(--heading-tracking); }
.pm-col .rte { color: var(--fg-muted); }
.pm-cols[data-style='cards'] .pm-col { padding: clamp(1.25rem, 2.4vw, 2rem); border-radius: var(--radius); background: var(--surface); }
.pm-cols[data-style='lined'] .pm-col { padding-top: 1.5rem; border-top: 1.5px solid var(--fg); }
.pm-cols[data-align='center'] .pm-col { justify-items: center; text-align: center; }

/* ---------- Figures ---------- */
.pm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 0; }
@media (min-width: 990px) { .pm-stats { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); } }
.pm-stat { display: grid; gap: .5rem; align-content: start; padding-inline: clamp(1rem, 2vw, 2rem); border-left: 1px solid var(--line); }
.pm-stat:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 989px) { .pm-stat:nth-child(odd) { border-left: 0; padding-left: 0; } }
.pm-stat__value { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: calc(clamp(2.8rem, 6vw, 5.8rem) * var(--heading-scale)); line-height: .9; letter-spacing: var(--heading-tracking); font-variant-numeric: tabular-nums; }
.pm-stat__label { font-weight: 600; }
.pm-stat .rte { color: var(--fg-muted); font-size: var(--t-small); }

/* ---------- Stacking cards ---------- */
.pm-stack { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.pm-stack__card { position: sticky; top: calc(var(--header-h, 72px) + 1.25rem + var(--i, 0) * 1.4rem); display: grid; overflow: hidden; border-radius: var(--radius); min-height: min(38rem, calc(100svh - var(--header-h, 72px) - 4rem)); box-shadow: 0 -20px 60px -30px rgb(0 0 0 / .35); transform-origin: 50% 0; }
@media (min-width: 990px) { .pm-stack__card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pm-stack__card:nth-child(even) .pm-stack__media { order: 2; } }
.pm-stack__media { position: relative; min-height: 18rem; }
@media (max-width: 989px) { .pm-stack__card { min-height: 0; } .pm-stack__media { min-height: 0; aspect-ratio: 16 / 10; } .pm-stack__body { padding: 1.5rem 1.25rem 1.75rem; } }
.pm-stack__media img, .pm-stack__media svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pm-stack__body { display: grid; gap: 1.1rem; align-content: center; justify-items: start; padding: clamp(1.75rem, 5vw, 4.5rem); }
.pm-stack__body .rte { color: var(--fg-muted); max-width: 32rem; }
.pm-stack__num { font-size: var(--t-xs); letter-spacing: .16em; font-weight: 700; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .js-motion:not([data-motion='subtle']) .pm-stack__card:not(:last-child) { animation: pm-stack-back linear both; animation-timeline: view(); animation-range: exit-crossing 0% exit-crossing 100%; }
  }
}
@keyframes pm-stack-back { to { transform: scale(.9); filter: brightness(.7); } }
@media (prefers-reduced-motion: reduce) { .pm-stack__card { position: relative; top: 0; } }

/* ---------- Horizontal scroll ---------- */
.pm-hs__head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
/* The intro sits under the heading on phones and in the still (not pinned) row; inside the pinned row it becomes a
   text panel beside the pictures. Screen readers read it once, from the heading. */
.pm-hs__intro-top { margin-top: 1rem; max-width: 36rem; color: var(--fg-muted); }
.pm-hs__text-panel { display: none; }
@media (min-width: 990px) {
  .js-motion .pm-hs[data-pinned] .pm-hs__intro-top { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .js-motion .pm-hs[data-pinned] .pm-hs__text-panel { display: grid; }
}
.pm-hs__track { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); padding-bottom: .5rem; }
.pm-hs__track::-webkit-scrollbar { display: none; }
.pm-hs__panel { flex: none; width: min(78vw, var(--pw, 26rem)); scroll-snap-align: center; display: grid; gap: .9rem; align-content: start; }
/* The row starts at its beginning: centre-snapping the first item would load it scrolled past the intro. */
.pm-hs__track > :first-child { scroll-snap-align: start; }
.pm-hs__panel[data-size='wide'] { --pw: 44rem; }
.pm-hs__panel[data-size='tall'] { --pw: 22rem; }
.pm-hs__media { position: relative; aspect-ratio: var(--ratio, 4 / 5); border-radius: var(--radius-img); overflow: hidden; background: var(--surface); }
.pm-hs__panel[data-size='wide'] .pm-hs__media { aspect-ratio: 16 / 11; }
.pm-hs__panel[data-size='tall'] .pm-hs__media { aspect-ratio: 3 / 5; }
.pm-hs__media img, .pm-hs__media svg { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.pm-hs__panel:hover .pm-hs__media img { transform: scale(1.05); }
.pm-hs__caption { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.pm-hs__caption .h4 { font-size: var(--t-h4); }
.pm-hs__caption span { font-size: var(--t-xs); letter-spacing: .14em; color: var(--fg-muted); }
.pm-hs__text-panel { flex: none; width: min(78vw, 24rem); align-content: center; gap: 1.25rem; padding-inline: clamp(0rem, 2vw, 2rem); }
.pm-hs__progress { display: none; height: 2px; margin: 1.75rem var(--gutter) 0; background: var(--line); position: relative; overflow: hidden; }
@media (min-width: 990px) { .js-motion .pm-hs[data-pinned] .pm-hs__progress { display: block; } }
.pm-hs__progress span { position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(var(--p, 0)); }
/* Pinned mode (large screens with motion): vertical scrolling moves the row sideways. */
@media (min-width: 990px) {
  .js-motion .pm-hs[data-pinned] { height: var(--pin-h, 300vh); }
  .js-motion .pm-hs[data-pinned] .pm-hs__sticky { position: sticky; top: var(--header-h, 0px); height: calc(100svh - var(--header-h, 0px)); display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; overflow: hidden; }
  .js-motion .pm-hs[data-pinned] .pm-hs__track { overflow: visible; scroll-snap-type: none; width: max-content; transform: translateX(var(--hs-x, 0)); will-change: transform; }
}

/* ---------- Feature ring ---------- */
.pm-ring { position: relative; display: grid; gap: 2rem; }
.pm-ring__stage { position: relative; width: min(100%, 44rem); aspect-ratio: 1; margin-inline: auto; display: none; }
.pm-ring__mobile { display: grid; gap: 1.75rem; }
@media (min-width: 990px) { .pm-ring__stage { display: block; } .pm-ring__mobile { display: none; } }
.pm-ring__center { position: absolute; inset: 22%; border-radius: 50%; overflow: hidden; background: var(--surface); box-shadow: 0 30px 80px -30px rgb(0 0 0 / .35); }
.pm-ring__center img { width: 100%; height: 100%; object-fit: cover; }
.pm-ring__orbit { position: absolute; inset: 9%; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--fg) 30%, transparent); }
@supports (animation-timeline: view()) { @media (prefers-reduced-motion: no-preference) { .js-motion .pm-ring__orbit { animation: pm-ring-turn linear both; animation-timeline: view(); } } }
@keyframes pm-ring-turn { to { transform: rotate(120deg); } }
.pm-ring__item { position: absolute; left: 50%; top: 50%; width: 13.5rem; margin: -2.2rem 0 0 -6.75rem; transform: rotate(var(--a)) translateY(calc(-1 * var(--r, 20.5rem))) rotate(calc(-1 * var(--a))); }
.pm-ring__card { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; padding: .7rem .9rem .7rem .7rem; border-radius: calc(var(--radius) * .6 + 14px); background: var(--bg); box-shadow: var(--shadow); font-size: var(--t-small); transition: transform .5s var(--ease-back); }
.pm-ring__card:hover { transform: scale(1.06); }
.pm-ring__card strong { display: block; font-size: var(--t-body); line-height: 1.2; }
.pm-ring__card span:not(.pm-ring__dot) { color: var(--fg-muted); line-height: 1.35; display: block; }
.pm-ring__dot { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); overflow: hidden; }
.pm-ring__dot svg { width: 1.2rem; height: 1.2rem; }
.pm-ring__dot img { width: 100%; height: 100%; object-fit: cover; }
.pm-ring__list { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .pm-ring__list { grid-template-columns: 1fr 1fr; } }
.pm-ring__list .pm-ring__card { box-shadow: none; background: var(--surface); }
.pm-ring__list-media { border-radius: var(--radius-img); overflow: hidden; aspect-ratio: 1; max-width: 22rem; margin-inline: auto; }

/* ---------- Rich text ---------- */
.pm-rich { display: grid; gap: clamp(1rem, 2vw, 1.5rem); justify-items: var(--jx, center); text-align: var(--ta, center); max-width: var(--mw, 48rem); margin-inline: auto; }
.pm-rich[data-align='left'] { --jx: start; --ta: left; margin-inline: 0; }
.pm-rich > .rte { color: var(--fg-muted); }

/* ---------- Video ---------- */
.pm-video { position: relative; aspect-ratio: var(--ratio, 16 / 9); border-radius: var(--radius-img); overflow: hidden; background: #000; isolation: isolate; }
.pm-video__poster { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; color: #fff; }
.pm-video__poster img, .pm-video__poster svg.placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform 1.4s var(--ease); }
.pm-video__poster::after { content: ''; position: absolute; inset: 0; background: rgb(0 0 0 / .25); z-index: -1; }
.pm-video__poster:hover img { transform: scale(1.04); }
.pm-video__play { display: grid; place-items: center; width: clamp(4.5rem, 9vw, 7rem); height: clamp(4.5rem, 9vw, 7rem); border-radius: 50%; background: rgb(255 255 255 / .92); color: #111; transition: transform .5s var(--ease-back); }
.pm-video__play svg { width: 34%; height: 34%; margin-left: 6%; }
.pm-video__poster:hover .pm-video__play { transform: scale(1.1); }
.pm-video iframe, .pm-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pm-video__caption { position: absolute; left: clamp(1rem, 3vw, 2.5rem); bottom: clamp(1rem, 3vw, 2.5rem); max-width: 34rem; text-align: left; }

/* ---------- FAQ ---------- */
.pm-faq { display: grid; gap: clamp(2rem, 5vw, 5rem); }
@media (min-width: 990px) { .pm-faq { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .pm-faq__head { position: sticky; top: calc(var(--header-h, 72px) + 2rem); align-self: start; } }
.pm-faq__head { display: grid; gap: 1rem; justify-items: start; }
.pm-faq__head .rte { color: var(--fg-muted); }
/* ---------- Newsletter ---------- */
.pm-news { display: grid; gap: clamp(1.25rem, 3vw, 2rem); justify-items: center; text-align: center; }
.pm-news__form { width: min(100%, 34rem); }
.pm-news[data-layout='split'] { justify-items: start; text-align: left; }
@media (min-width: 990px) { .pm-news[data-layout='split'] { grid-template-columns: 1fr 1fr; align-items: end; gap: 2rem 5rem; } .pm-news[data-layout='split'] .pm-news__form { justify-self: end; } }
.pm-news[data-layout='giant'] .pm-news__title { font-size: calc(clamp(3rem, 10vw, 10rem) * var(--heading-scale)); line-height: .88; padding-bottom: .14em; }
.pm-news .rte { color: var(--fg-muted); max-width: 36rem; }
.pm-news__form .pm-inline-form { gap: .5rem; }
.pm-news__form .input { min-height: 3.6rem; }
.pm-news__form .btn { min-height: 3.6rem; }
@media (max-width: 599px) { .pm-news__form .pm-inline-form { flex-direction: column; } }
.pm-news__legal { font-size: var(--t-xs); color: var(--fg-muted); margin-top: .75rem; }

/* ---------- Journal ---------- */
.pm-journal { display: grid; gap: calc(var(--gap) * 1.6) var(--gap); grid-template-columns: 1fr; }
@media (min-width: 750px) { .pm-journal { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); } }
.pm-post { position: relative; display: grid; gap: .9rem; align-content: start; }
.pm-post__media { aspect-ratio: var(--ratio, 4 / 3); border-radius: var(--radius-img); overflow: hidden; background: var(--surface); }
.pm-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.pm-post:hover .pm-post__media img { transform: scale(1.05); }
.pm-post__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
.pm-post__title { font-size: var(--t-h4); }
.pm-post__title a { text-decoration: none; }
.pm-post__title a::after { content: ''; position: absolute; inset: 0; }
.pm-post:has(a:focus-visible) { outline: 2px solid currentColor; outline-offset: 4px; }
.pm-post__title a:focus-visible { outline: 0; }
.pm-post__excerpt { color: var(--fg-muted); font-size: var(--t-small); }
@media (min-width: 990px) {
  .pm-journal[data-layout='feature'] { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .pm-journal[data-layout='feature'] > li:first-child { grid-row: span 6; }
  .pm-journal[data-layout='feature'] > li:first-child .pm-post__media { aspect-ratio: 4 / 5; }
  .pm-journal[data-layout='feature'] > li:first-child .pm-post__title { font-size: var(--t-h2); }
  .pm-journal[data-layout='feature'] > li:not(:first-child) .pm-post { grid-template-columns: 12rem 1fr; align-items: center; gap: 1.5rem; padding-bottom: calc(var(--gap) * 1.6); border-bottom: 1px solid var(--line); }
  .pm-journal[data-layout='feature'] > li:not(:first-child) .pm-post__media { aspect-ratio: 1; }
  /* Three posts or fewer: a square lead and two stacked cards end on the same line. */
  .pm-journal[data-layout='feature']:not(:has(> li:nth-child(4))) > li:first-child .pm-post__media { aspect-ratio: 1; }
  .pm-journal[data-layout='feature']:not(:has(> li:nth-child(4))) > li:not(:first-child) .pm-post { grid-template-columns: 1fr; gap: .9rem; padding-bottom: 0; border-bottom: 0; }
  .pm-journal[data-layout='feature']:not(:has(> li:nth-child(4))) > li:not(:first-child) .pm-post__media { aspect-ratio: 16 / 10; }
  .pm-journal[data-layout='feature']:not(:has(> li:nth-child(4))) > li:first-child { grid-row: span 2; }
}

/* ---------- Gallery ---------- */
/* An even grid: every tile shares one shape, so rows line up and nothing is left orphaned. The first tile is larger
   when the rest still fill whole rows, which gives the grid a focal point. */
.pm-gallery { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
@media (min-width: 990px) { .pm-gallery { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); } }
.pm-gallery__item { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-img); overflow: hidden; display: block; background: var(--surface); }
@media (min-width: 990px) { .pm-gallery[data-feature] > :first-child { grid-column: span 2; grid-row: span 2; } .pm-gallery[data-feature] > :first-child .pm-gallery__item { height: 100%; aspect-ratio: auto; } }
@media (max-width: 989px) { .pm-gallery > :last-child:nth-child(odd) { grid-column: 1 / -1; } .pm-gallery > :last-child:nth-child(odd) .pm-gallery__item { aspect-ratio: 16 / 10; } }
.pm-gallery__item :is(img, svg) { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.pm-gallery__item:hover img { transform: scale(1.05); }
.pm-gallery__cap { position: absolute; left: .75rem; bottom: .75rem; right: .75rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: var(--radius-btn); background: var(--glass); backdrop-filter: blur(10px); font-size: var(--t-small); font-weight: 600; transform: translateY(130%); transition: transform .5s var(--ease); }
.pm-gallery__item:is(:hover, :focus-visible) .pm-gallery__cap { transform: none; }
@media (hover: none) { .pm-gallery__cap { transform: none; } }
.pm-gallery__cap svg { width: 1rem; height: 1rem; }
@media (max-width: 749px) { .pm-iwt__second { right: 0; width: 38%; } .pm-iwt[data-side='right'] .pm-iwt__second { left: 0; } .pm-iwt__media:has(.pm-iwt__second) { margin-bottom: 14%; } }
@media (prefers-reduced-motion: reduce) { .pm-ticker__pause { display: none; } }
