/* Retain the Lindas palette while meeting text and control contrast. */
blockquote, blockquote p {
    color: var(--main-font-color);
}
/* Extend the click area without changing the theme's visible dot size. */
:root {
    /* Ratio of the original Lindas SVG viewBox, independent of the image download. */
    --lindas-logo-aspect-ratio: 375 / 265;
    --lindas-carousel-hit-slop: -0.4375rem;
    --lindas-carousel-control-padding: .5rem;
    --lindas-carousel-inactive-opacity: .65;
    --lindas-handwriting-size: 4rem;
    --lindas-handwriting-inset: 1rem;
    /* The theme's existing light-mode heading ink, also on the fixed footer. */
    --lindas-footer-ink: #222;
}
.stagetop .islogocol img {
    aspect-ratio: var(--lindas-logo-aspect-ratio);
}
.ftrow1 {
    --fttxtfour: var(--lindas-footer-ink);
}
/* The English records retain their wording and existing editorial emphasis. */
.treelevel-root:lang(en) .maincontent .ce-bodytext .size-150,
.treelevel-root:lang(en) .postcontent .small-center .ce-bodytext h3.text-center {
    font-family: var(--headercaveat);
    font-size: var(--lindas-handwriting-size);
}
.treelevel-root:lang(en) .maincontent .ce-bodytext .size-150 {
    display: block;
}
/* Leave room for the handwriting's ink overhang at the viewport edges. */
.treelevel-root:lang(en) .postcontent .small-center .ce-bodytext h3.text-center {
    max-inline-size: calc(100% - 2 * var(--lindas-handwriting-inset));
    position: relative;
    inset-inline-start: var(--lindas-handwriting-inset);
}
.swiper-pagination-bullet { position: relative; }
.swiper {
    --swiper-pagination-bullet-inactive-color: var(--main-font-color);
    --swiper-pagination-bullet-inactive-opacity: var(--lindas-carousel-inactive-opacity);
}
html:is([data-theme="dark"], [data-theme="high-contrast"]) .swiper .swiper-controls :is(.swiper-button-prev, .swiper-button-next),
html:is([data-theme="dark"], [data-theme="high-contrast"]) .swiper .swiper-controls :is(.swiper-button-prev, .swiper-button-next)::after {
    color: var(--main-font-color);
}
.swiper-pagination-bullet::after {
    content: "";
    position: absolute;
    inset: var(--lindas-carousel-hit-slop);
}
/* Guest text owns its height; its controls follow every slide in normal flow. */
.swiper.swiper-combine-control:has(blockquote) > .swiper-controls {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding-block: var(--lindas-carousel-control-padding);
}
.swiper.swiper-combine-control:has(blockquote) > .swiper-controls .swiper-pagination {
    inset: auto;
    transform: none;
    text-wrap: balance;
}
.swiper.swiper-combine-control:has(blockquote) > .swiper-controls :is(.swiper-button-prev, .swiper-button-next) {
    inset: auto;
    margin: 0;
}
/* The cover fills its final frame before fonts, images and effects arrive. */
.herosize > .stage > .is-img-bg {
    min-height: var(--HeroSize, 100vh);
    overflow: clip;
}
.herosize .is-heropic img {
    display: block;
}

.ftrow2 {
    --ctwo: #805a28;
}
html[data-theme="dark"] .ftrow2 {
    --ctwo: #f1bbb3;
}

/* A legacy desktop width must not move later cover slides outside mobile view. */
.stage .swiper {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
}
html[data-theme="dark"] .maincontent :is(.ce-bodytext, .header-default),
html[data-theme="dark"] .maincontent :is(.ce-bodytext, .header-default) :is(h1, h2, h3, h4, h5, h6, p, li) {
    color: var(--main-font-color) !important;
}

/* The light zebra background requires the configured readable text color. */
.zebra-201 .ce_columns3.wcolor :is(h1, h2, h3, h4, h5, h6, p, li, a, label, legend, span) {
    color: var(--main-font-color) !important;
}

/* The existing Lindas card caption treatment, expressed as theme tokens. */
:root {
    --lindas-card-caption-surface: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.88) 100%);
    --lindas-card-caption-offset: 10%;
    --lindas-card-caption-padding: .2em .2em .2em 2em;
    --lindas-card-caption-width: 90%;
}
.ct-kian .card-back-link {
    background: var(--lindas-card-caption-surface);
    margin-bottom: var(--lindas-card-caption-offset);
    margin-right: var(--lindas-card-caption-offset);
    padding: var(--lindas-card-caption-padding);
    min-width: var(--lindas-card-caption-width);
}

:root { --lindas-postcontent-width: calc(var(--wrapper-width) * .6666); }
@media only screen and (min-width: 1024px) {
    .postcontent > .frame:has(> .frame .calendarWidget) {
        max-width: var(--lindas-postcontent-width);
        margin-inline: auto;
    }
}

/* Keep cover controls above the existing overlapping introduction panel. */
:root { --lindas-hero-controls-clearance: -100%; --lindas-hero-controls-z: 2; }
.is-hero-fullwidth > .swiper-controls {
    translate: 0 var(--lindas-hero-controls-clearance);
    z-index: var(--lindas-hero-controls-z);
}

/* An unpadded column frame has no gutter for Foundation's negative row margins. */
@media screen and (width < 40em) {
    .ce_columns3.sp0 > .ce_columns3-all.grid-margin-x {
        margin-inline: 0;
    }
}

/*
 * Text-and-media pictures: keep the drawn width of the former per-breakpoint sources (1920 / 1600 / 1280 / 640 / 360 px, capped by the column).
 * The responsive sources of min_sitecore carry the size of the delivered file instead, which would shrink small originals in the layout.
 */
.ce-textpic .ce-gallery picture > img.image-embed-item {
    width: 300px;
    max-width: 100%;
    height: auto;
}
@media screen and (min-width: 360px) {
    .ce-textpic .ce-gallery picture > img.image-embed-item { width: 360px; }
}
@media screen and (min-width: 640px) {
    .ce-textpic .ce-gallery picture > img.image-embed-item { width: 640px; }
}
@media screen and (min-width: 1024px) {
    .ce-textpic .ce-gallery picture > img.image-embed-item { width: 1280px; }
}
@media screen and (min-width: 1280px) {
    .ce-textpic .ce-gallery picture > img.image-embed-item { width: 1600px; }
}
@media screen and (min-width: 1600px) {
    .ce-textpic .ce-gallery picture > img.image-embed-item { width: 1920px; }
}

/* Normal editorial images obey their GalleryProcessor dimensions; heroes keep the legacy rules above. */
.ce-textpic .ce-gallery picture > img.image-gallery-sized { width: auto; }

/* Intrinsic branding must contribute its width to the header's shrink column. */
.stagetop .islogocol .frame,
.stagetop .islogocol .ce-textpic { container-type: normal; }
.stagetop .islogocol .ce-gallery { inline-size: max-content; }
