/*!
 * Traveleak Media Grid System v1.1 (geometry FROZEN: do not edit ratios, gaps, columns or mobile behaviour).
 * v1.1 = the 12 v1.0 layouts byte-for-byte unchanged + 3 new layouts (mosaic-five-wide, four-tall-right, four-tall-left) in the block marked "v1.1" below.
 * Markup: core/group.tl-media.tl-media--{variant} > core/gallery.tl-media__grid > core/image.tl-media__item x N
 *         + p.tl-media__caption + p.tl-media__credit
 * One file for the front end (.article-body) and the block editor (.editor-styles-wrapper).
 * Selectors are descendant (not child) so editor wrapper elements do not break them.
 */
/* Text-to-media rule: 24px (20px mobile) so image groups stay attached to the text around them */
:is(.article-body,.editor-styles-wrapper) .tl-media{margin:24px 0;}
:is(.article-body,.editor-styles-wrapper) .tl-media .tl-media__grid{display:grid;gap:var(--g,6px);aspect-ratio:3/2;margin:0;padding:0;overflow:hidden;}
:is(.article-body,.editor-styles-wrapper) .tl-media__item{position:relative;margin:0;padding:0;min-width:0;min-height:0;overflow:hidden;background:#f1f1f0;width:auto;flex:none;}
:is(.article-body,.editor-styles-wrapper) .tl-media__item a{position:absolute;inset:0;display:block;cursor:zoom-in;border:0;text-decoration:none;}
:is(.article-body,.editor-styles-wrapper) .tl-media__item a:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px;}
:is(.article-body,.editor-styles-wrapper) .tl-media__item img{position:absolute;inset:0;width:100%;height:100%;max-width:none;margin:0;object-fit:cover;transition:transform .5s ease;}
:is(.article-body,.editor-styles-wrapper) .tl-media__item a:hover img{transform:scale(1.02);}
/* enlarge affordance: pure CSS, no extra markup */
:is(.article-body,.editor-styles-wrapper) .tl-media__item a::after{content:"";position:absolute;right:10px;bottom:10px;width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.88) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171614' stroke-width='2'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center/14px no-repeat;}
:is(.article-body,.editor-styles-wrapper) .tl-media--single .tl-media__grid{grid-template-columns:1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--pair .tl-media__grid{grid-template-columns:1fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic .tl-media__grid{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic .tl-media__item:first-child{grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--three .tl-media__grid{grid-template-columns:repeat(3,1fr);}
:is(.article-body,.editor-styles-wrapper) .tl-media__caption{margin:10px 0 0;font-family:var(--text-caption-family);font-size:var(--text-caption-size);font-weight:var(--text-caption-weight);line-height:var(--text-caption-line);color:var(--color-text-muted);}
:is(.article-body,.editor-styles-wrapper) .tl-media__credit{display:inline;margin:0 0 0 8px;opacity:.75;font-family:var(--text-caption-family);font-size:var(--text-caption-size);font-weight:var(--text-caption-weight);line-height:var(--text-caption-line);color:var(--color-text-muted);}
:is(.article-body,.editor-styles-wrapper) .tl-media__credit::before{content:"|";margin-right:8px;opacity:.5;}

/* ===== Layouts and gap (v1.0). --g = media gap ===== */
:is(.article-body,.editor-styles-wrapper) .tl-media{--g:6px;}
:is(.article-body,.editor-styles-wrapper) .tl-media .tl-media__grid{gap:var(--g);}
/* asymmetric: WHOLE block is the 3:2 canvas. The two stacked landscapes are exactly 16:9: width pw = (16/9)*(H-g)/2 with H = 2W/3  =>  pw = 16W/27 - 8g/9. The portrait takes the remaining width. */
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-left .tl-media__grid,:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-right .tl-media__grid{--pw:calc(16*100cqw/27 - 8*var(--g)/9);}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-left .tl-media__grid,
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-right .tl-media__grid{aspect-ratio:3/2;overflow:hidden;grid-template-rows:1fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-left .tl-media__item,
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-right .tl-media__item{aspect-ratio:auto;}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-left .tl-media__grid{grid-template-columns:1fr var(--pw);}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-left .tl-media__item:nth-child(1){grid-column:1;grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-left .tl-media__item:nth-child(2){grid-column:2;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-left .tl-media__item:nth-child(3){grid-column:2;grid-row:2;}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-right .tl-media__grid{grid-template-columns:var(--pw) 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-right .tl-media__item:nth-child(1){grid-column:1;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-right .tl-media__item:nth-child(2){grid-column:1;grid-row:2;}
:is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-right .tl-media__item:nth-child(3){grid-column:2;grid-row:1 / 3;}
/* grid-four: canvas 3:2 too (images ~3:2) */
:is(.article-body,.editor-styles-wrapper) .tl-media--grid-four .tl-media__grid{aspect-ratio:3/2;overflow:hidden;grid-template-rows:1fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--grid-four .tl-media__item{aspect-ratio:auto;}
:is(.article-body,.editor-styles-wrapper) .tl-media--grid-four .tl-media__grid{grid-template-columns:1fr 1fr;}
/* mosaic-five: the WHOLE block is the standard 3:2 canvas; columns/rows are subdivided inside it. */
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five .tl-media__grid{aspect-ratio:3/2;overflow:hidden;grid-template-columns:1fr 3fr 1fr;grid-template-rows:1fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-b .tl-media__grid{grid-template-columns:1fr 2fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five .tl-media__item{aspect-ratio:auto;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five .tl-media__item:nth-child(1){grid-column:1;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five .tl-media__item:nth-child(2){grid-column:1;grid-row:2;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five .tl-media__item:nth-child(3){grid-column:2;grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five .tl-media__item:nth-child(4){grid-column:3;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five .tl-media__item:nth-child(5){grid-column:3;grid-row:2;}
/* mosaic-five option C (staggered): canvas 3:2. side width w = .24W - .36g so that 9:16 (h=16w/9) + 1:1 (h=w) + g == H.
   rows: w / (7w/9 - g) / w. Left: 9:16 on top, square below. Right: square on top, 9:16 below. */
:is(.article-body,.editor-styles-wrapper) .tl-media{container-type:inline-size;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-c{--w:calc(.24*100cqw - .36*var(--g));}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-c .tl-media__grid{grid-template-columns:var(--w) 1fr var(--w);grid-template-rows:var(--w) calc(7*var(--w)/9 - var(--g)) var(--w);}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-c .tl-media__item:nth-child(1){grid-column:1;grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-c .tl-media__item:nth-child(2){grid-column:1;grid-row:3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-c .tl-media__item:nth-child(3){grid-column:2;grid-row:1 / 4;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-c .tl-media__item:nth-child(4){grid-column:3;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-c .tl-media__item:nth-child(5){grid-column:3;grid-row:2 / 4;}
/* mosaic-six: canvas 3:2. Same side geometry as mosaic-five option C (w = .24W - .36g). Centre column split at the left seam. */
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__grid{aspect-ratio:3/2;overflow:hidden;--w:calc(.24*100cqw - .36*var(--g));grid-template-columns:var(--w) 1fr var(--w);grid-template-rows:var(--w) calc(7*var(--w)/9 - var(--g)) var(--w);}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__item{aspect-ratio:auto;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__item:nth-child(1){grid-column:1;grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__item:nth-child(2){grid-column:1;grid-row:3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__item:nth-child(3){grid-column:2;grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__item:nth-child(4){grid-column:2;grid-row:3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__item:nth-child(5){grid-column:3;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__item:nth-child(6){grid-column:3;grid-row:2 / 4;}
/* mosaic-six flip: the small centre landscape moves to the top (aligned with the right seam), the large one goes below. */
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six.is-flip .tl-media__item:nth-child(3){grid-column:2;grid-row:2 / 4;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six.is-flip .tl-media__item:nth-child(4){grid-column:2;grid-row:1;}
/* mosaic half: existing mosaic split into two equal columns (1fr / 1fr). Canvas stays 3:2. */
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic.is-half .tl-media__grid{grid-template-columns:1fr 1fr;}
/* mosaic half-right: mirror of the 50/50 mosaic. Large image on the right, stacked pair on the left. */
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic.is-half-right .tl-media__grid{grid-template-columns:1fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic.is-half-right .tl-media__item:nth-child(1){grid-column:2;grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic.is-half-right .tl-media__item:nth-child(2){grid-column:1;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic.is-half-right .tl-media__item:nth-child(3){grid-column:1;grid-row:2;}
/* ===== v1.1 additions (3 layouts). Canvas is the standard 3:2 for the WHOLE block, like every other layout; rows are 2fr / 1fr, so the wide image and the
   bottom images come out at 3:2 (within 1%: the gap makes them 1.49 to 1.51). No container-query units, so no @supports fallback is needed. Mobile: the
   layouts scale with the block; the gap is --g (3px at 640px and below). ===== */
/* mosaic-five-wide: 6 columns, 2 rows. Top: wide image (cols 1-4, 3:2) + portrait image (cols 5-6, about 3:4). Bottom: three images (2 cols each, 3:2).
   The seam of the top row lines up with the second seam of the bottom row. */
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five-wide .tl-media__grid{aspect-ratio:3/2;overflow:hidden;grid-template-columns:repeat(6,1fr);grid-template-rows:2fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five-wide .tl-media__item{aspect-ratio:auto;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five-wide .tl-media__item:nth-child(1){grid-column:1 / 5;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five-wide .tl-media__item:nth-child(2){grid-column:5 / 7;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five-wide .tl-media__item:nth-child(3){grid-column:1 / 3;grid-row:2;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five-wide .tl-media__item:nth-child(4){grid-column:3 / 5;grid-row:2;}
:is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five-wide .tl-media__item:nth-child(5){grid-column:5 / 7;grid-row:2;}
/* four-tall-right / four-tall-left: 3 equal columns, 2 rows. Wide image (2 columns, 3:2) + two images (3:2) beside one tall image (1 column x 2 rows, about 1:2). */
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-right .tl-media__grid,:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-left .tl-media__grid{aspect-ratio:3/2;overflow:hidden;grid-template-columns:repeat(3,1fr);grid-template-rows:2fr 1fr;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-right .tl-media__item,:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-left .tl-media__item{aspect-ratio:auto;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-right .tl-media__item:nth-child(1){grid-column:1 / 3;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-right .tl-media__item:nth-child(2){grid-column:1;grid-row:2;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-right .tl-media__item:nth-child(3){grid-column:2;grid-row:2;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-right .tl-media__item:nth-child(4){grid-column:3;grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-left .tl-media__item:nth-child(1){grid-column:1;grid-row:1 / 3;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-left .tl-media__item:nth-child(2){grid-column:2 / 4;grid-row:1;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-left .tl-media__item:nth-child(3){grid-column:2;grid-row:2;}
:is(.article-body,.editor-styles-wrapper) .tl-media--four-tall-left .tl-media__item:nth-child(4){grid-column:3;grid-row:2;}
@media (max-width:640px){
 :is(.article-body,.editor-styles-wrapper) .tl-media{--g:3px;margin:20px 0;}
 /* zoom button, mobile: 20px visual, 9px icon (85% black), 4px from the edge, translucent white .78 + 1px rgba(255,255,255,.55) border. The tap target is the whole tile link (a{position:absolute;inset:0}), so the 22px circle is purely visual. */
 :is(.article-body,.editor-styles-wrapper) .tl-media__item a::after{right:4px;bottom:4px;width:20px;height:20px;box-sizing:border-box;border:1px solid rgba(255,255,255,.55);background-color:rgba(255,255,255,.78);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171614' stroke-opacity='.85' stroke-width='2'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E");background-size:9px;box-shadow:none;}

}

/* ===== WordPress core overrides =====
   Core gallery CSS uses sibling selectors with two #ids (e.g. ...:nth-last-child(2) ~ figure:not(#individual-image)),
   so the item rules repeat :not(#tl) three times to out-specify them. */
:is(.article-body,.editor-styles-wrapper) .tl-media .tl-media__grid.wp-block-gallery{display:grid;flex-wrap:nowrap;margin:0;padding:0;}
:is(.article-body,.editor-styles-wrapper) .tl-media .tl-media__grid.has-nested-images figure.wp-block-image.tl-media__item:not(#tl):not(#tl):not(#tl){display:block;flex:none;width:auto;max-width:none;margin:0;padding:0;}
:is(.article-body,.editor-styles-wrapper) .tl-media .tl-media__grid.has-nested-images figure.wp-block-image.tl-media__item:not(#tl):not(#tl):not(#tl) img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:cover;object-position:var(--tl-focal,50% 50%);}
:is(.article-body,.editor-styles-wrapper) .tl-media .tl-media__grid.has-nested-images figure.wp-block-image.tl-media__item:not(#tl):not(#tl):not(#tl) figcaption{display:none;}
:is(.article-body,.editor-styles-wrapper) .tl-media .tl-media__grid > .blocks-gallery-caption{display:none;}
/* caption + credit: two paragraphs, shown on one line */
:is(.article-body,.editor-styles-wrapper) .tl-media p.tl-media__caption{display:inline-block;margin:10px 0 0;}
:is(.article-body,.editor-styles-wrapper) .tl-media p.tl-media__credit{display:inline;}
/* caption + credit, mobile (<=640px): credit goes on its own line, left-aligned with the caption, no "|" */
@media (max-width:640px){
 :is(.article-body,.editor-styles-wrapper) .tl-media p.tl-media__caption{display:block;}
 :is(.article-body,.editor-styles-wrapper) .tl-media p.tl-media__credit{display:block;margin:0;}
 :is(.article-body,.editor-styles-wrapper) .tl-media p.tl-media__credit::before{content:none;margin:0;}
}

/* ===== Browsers without container query units: fr-based approximations of the same layouts ===== */
@supports not (width:1cqw){
 :is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-left .tl-media__grid{grid-template-columns:1fr 59%;}
 :is(.article-body,.editor-styles-wrapper) .tl-media--asymmetric-right .tl-media__grid{grid-template-columns:59% 1fr;}
 :is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-five.is-c .tl-media__grid,
 :is(.article-body,.editor-styles-wrapper) .tl-media--mosaic-six .tl-media__grid{grid-template-columns:24% 1fr 24%;grid-template-rows:9fr 7fr 9fr;}
}

/* front end only: empty caption / credit paragraphs take no space */
.article-body .tl-media p.tl-media__caption:empty,
.article-body .tl-media p.tl-media__credit:empty{display:none;}
