/* Responsive source layouts: retain source artwork and readable content gutters
   beyond the original 1440px canvas instead of removing hero padding. */
@media(min-width:1101px){
.source-page{--platform-gutter:max(32px,calc((100% - 1040px)/2))}
.source-page .figma-page>div[class*="px-[200px]"],
.source-page .figma-page>div[class*="p-[200px]"]{padding-left:var(--platform-gutter)!important;padding-right:var(--platform-gutter)!important}
.source-page .figma-page>[data-name="Welcome Section"] :is(h1,h2){height:auto!important;line-height:1.1}
.source-page .figma-page>[data-name="Welcome Section"] p{line-height:1.45!important}
.source-page .figma-page>[data-name="Welcome Section"][class*="px-[200px]"]{
  width:100%!important;max-width:100%!important;padding:80px var(--platform-gutter)!important;
}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"]){
  width:100%!important;max-width:100%!important;padding:0!important;align-self:stretch;overflow:hidden;
}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"])>.inline-grid,
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"])>.inline-grid>.inline-grid{
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;width:100%;min-height:485px;zoom:1;position:relative;
}
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Texture 1"]{
  position:absolute;inset:0;width:100%!important;height:100%!important;margin:0!important;
}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"]) [data-name="Books 1"]{
  position:absolute;inset:0 0 0 auto;width:min(1050px,73%)!important;height:100%!important;margin:0!important;
}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"]) [data-name="Texture 1"]~.flex{
  grid-area:1/1;position:relative;width:451px;max-width:calc(100% - 64px);margin:0 0 0 var(--platform-gutter)!important;padding:80px 0;align-self:center;z-index:1;
 }
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"]) [data-name="Retreat Authors 1"]{
 position:absolute;inset:0 0 0 auto;width:min(905px,63%)!important;height:100%!important;margin:0!important;
}
}
/* Reflow source sections rather than scaling their text at tablet widths. */
.source-page .figma-page>[data-name="Welcome Section"]>div{zoom:1!important;min-width:0!important}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"]){width:100%!important;max-width:100%!important;padding:0!important;align-self:stretch;overflow:hidden}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"])>.inline-grid{position:relative;display:flex;flex-direction:column;width:100%;min-width:0}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"])>.inline-grid>.inline-grid{position:static}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"])>.inline-grid>.flex{position:relative;z-index:1;margin:0 0 0 var(--platform-gutter,24px)!important;padding:0 0 40px;gap:16px;flex-direction:row!important;flex-wrap:wrap;max-width:calc(100% - 48px)}
@media(max-width:1100px){
.source-page .figma-page>[data-name="Welcome Section"][class*="px-[200px]"]{padding:48px 24px!important;width:100%!important;gap:32px;flex-direction:column!important}
.source-page .figma-page>[data-name="Welcome Section"][class*="px-[200px]"]>div{width:100%!important;max-width:100%!important;flex-basis:auto!important}
.source-page .figma-page>[data-name="Welcome Section"]:has([data-name="Texture 1"])>.inline-grid>.inline-grid{display:flex;flex-direction:column;width:100%!important;min-width:0!important;min-height:0;position:static}
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Texture 1"]{position:absolute;inset:0;width:100%!important;height:100%!important;margin:0!important;max-width:none!important}
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Books 1"]{position:absolute;inset:0;width:100%!important;height:100%!important;margin:0!important;max-width:none!important;opacity:.25}
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Texture 1"]~.flex{position:relative;z-index:1;order:0;width:100%!important;max-width:100%!important;margin:0!important;padding:48px 24px;gap:24px}
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Retreat Authors 1"]{position:relative;order:1;width:100%!important;height:auto!important;aspect-ratio:905/485;margin:0!important;max-width:none!important;opacity:1}
.source-page .figma-page>[data-name="Welcome Section"] :is(h1,h2){font-size:clamp(32px,5vw,42px)!important;line-height:1.1!important;height:auto!important;min-width:0!important;max-width:100%!important;white-space:normal}
.source-page .figma-page>[data-name="Welcome Section"] p{line-height:1.45!important;white-space:normal;max-width:100%!important}
.source-page .figma-page>[data-name="Welcome Section"] a p{line-height:20px!important}
.source-page .figma-page>[data-name="Welcome Section"] [class~="min-w-full"]{min-width:0!important;width:100%!important}
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Texture 1"]~.flex>div{max-width:100%!important;min-width:0!important;width:100%!important}
}
/* Archive-specific legacy !important spacing must follow the same content grid. */
@media(min-width:1101px){
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Texture 1"]~.flex{width:451px!important;padding:80px 0!important;gap:30px!important;white-space:normal!important}
}
@media(max-width:1100px){
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Texture 1"]~.flex{padding:48px 24px!important;gap:24px!important;white-space:normal!important}
.source-page .figma-page>[data-name="Welcome Section"] [data-name="Books 1"]{opacity:.25!important}
}
/* The archive uses its current genuine cover montage as a CSS background,
   so apply the same small-screen contrast treatment to that background. */
@media(max-width:1100px){
.source-page[data-source-page="best-seller-track-record"] [data-family-hero]{
 background-image:linear-gradient(rgba(22,65,112,.82),rgba(22,65,112,.82)),url('/assets/bookretreat/bestseller-track-record/header-preview.png'),url('/assets/family/705ac4036b364d6f.webp');
 background-position:center,40vw top,center;background-size:cover,auto 100%,cover;background-repeat:no-repeat;
}
}

/* Preserve complete diagram artwork and embedded labels at every width. */
.reading-section img[src$=".svg"]{height:auto;max-height:none;object-fit:contain}

/* Small-screen reading copy should reflow with readable leading, not inherit
   the source canvas's condensed normal metrics or justified short lines. */
@media(max-width:1100px){
.source-page .figma-page p[class*="Sofia_Pro"][class*="leading-[normal]"],
.source-page .figma-page [class*="Sofia_Pro"] p[class*="leading-[normal]"]{line-height:1.5!important}
.source-page .figma-page [class~="text-justify"]{text-align:left!important}
.source-page .figma-page .inline-grid>h1{margin-bottom:24px!important}
.source-page .figma-page :is(h1,h2,h3){height:auto!important;min-height:0;line-height:1.15!important}
}

/* Mobile testimonial cards must fit their actual quotations instead of
   reserving desktop text heights and hundred-pixel empty padding. */
@media(max-width:767px){
.source-page .figma-page div[class*="font-['Sofia_Pro:"][class*="h-["][class~="whitespace-pre-wrap"]{height:auto!important;min-height:0}
.source-page .figma-page .rounded-\[20px\][class*="py-[100px]"]:has([class~="whitespace-pre-wrap"]){padding-top:100px!important;padding-bottom:32px!important}
}

/* These two-colour testimonial titles inherit a zero-size parent; give the
   existing word boundary its visible space without altering the wording. */
.source-page p[class*="text-[0px]"]>span[class*="text-[35px]"]+span[class*="text-[35px]"]{margin-left:.2em}

/* A paragraph nested inside the two-colour Case Studies title is display
   text; it inherits heading leading rather than body-copy leading. */
.source-page .figma-page>[data-name="Welcome Section"] h1 p{line-height:inherit!important}

/* Display paragraphs in mixed-colour hero titles keep heading leading. */
@media(max-width:1100px){
.source-page .figma-page>[data-name="Welcome Section"] [class*="Chronicle_Deck"] p{line-height:1.1!important}
}

/* Keep the two service choices centered as a responsive pair. */
@media(max-width:1100px){
.source-page .figma-page [data-service-hierarchy="custom-and-platform-in-a-box"]>div:last-child{flex-direction:row!important;flex-wrap:wrap!important;justify-content:center!important;align-items:flex-end!important;width:100%!important;gap:40px!important}
}

/* Tablet quote cards need a readable centered column, not a narrow desktop slot. */
@media(min-width:768px) and (max-width:1100px){
.source-page .figma-page .flex:has(>.inline-grid>.rounded-\[20px\][class*="py-[100px]"]){align-items:center!important}
.source-page .figma-page .inline-grid:has(>.rounded-\[20px\][class*="py-[100px]"]){width:min(100%,560px)!important;grid-template-columns:minmax(0,1fr)!important}
.source-page .figma-page .inline-grid>.rounded-\[20px\][class*="py-[100px]"]{width:100%!important;padding:100px 32px 32px!important;box-sizing:border-box}
.source-page .figma-page .rounded-\[20px\][class*="py-[100px]"]>[class~="whitespace-pre-wrap"]{width:100%!important;height:auto!important;min-height:0}
.source-page .figma-page .inline-grid:has(>.rounded-\[20px\][class*="py-[100px]"])>[class*="size-[163px]"]{margin-left:0!important;justify-self:center!important}
}

/* Keep buyer cards readable before three columns can contain their padding. */
@media(min-width:761px) and (max-width:1100px){
.program-area .program-grid{grid-template-columns:minmax(0,560px)!important;grid-template-rows:none!important;justify-content:center;gap:28px!important}
.program-area .program-grid .program{display:flex!important;grid-row:auto!important;height:auto!important;min-width:0}
.program-area .program-grid .program>*{min-width:0;max-width:100%}
.program-area .program-grid .program h3,.program-area .program-grid .program-label{min-height:0}
}
/* Restore the original book-cover crop proportions on small screens. */
@media(max-width:1100px){
/* Preserve the five genuine book-cover crops instead of stretching their masks. */
.source-page .figma-page [data-node-id="2004:1632"]{flex-direction:row!important;flex-wrap:wrap!important;justify-content:center!important;gap:24px!important;width:100%!important}
.source-page .figma-page [data-node-id="2004:1632"]>div{width:190px!important;height:343.275px!important;flex:none!important}
.source-page .figma-page [data-node-id="2004:1632"]>div>img{width:100%!important;object-fit:cover!important}
.source-page .figma-page [data-node-id="2004:1632"]>[data-name="AI Superpowers"]{width:270px!important;height:327px!important}
.source-page .figma-page [data-name="AI Superpowers"]>div>img{width:258.98%!important;max-width:none!important}
}

/* Keep the Why-page divider within its responsive content column. */
@media(max-width:1100px){
.source-page .figma-page [data-node-id="2001:493"]{margin-left:0!important;width:100%!important}
}

/* Readable credentials in the six testimonial attribution blocks. */
.source-page .figma-page [data-node-id="2006:3310"],.source-page .figma-page [data-node-id="2006:3320"],.source-page .figma-page [data-node-id="2006:3370"],.source-page .figma-page [data-node-id="2006:3380"],.source-page .figma-page [data-node-id="2006:3391"],.source-page .figma-page [data-node-id="2006:3411"]{line-height:1.4!important;height:auto!important}

/* Keep desktop testimonial quotes as readable as their phone and tablet counterparts. */
@media(min-width:1101px){.source-page .figma-page [data-node-id="2006:3231"],.source-page .figma-page [data-node-id="2006:3301"],.source-page .figma-page [data-node-id="2006:3311"],.source-page .figma-page [data-node-id="2006:3321"],.source-page .figma-page [data-node-id="2006:3371"],.source-page .figma-page [data-node-id="2006:3381"],.source-page .figma-page [data-node-id="2006:3392"],.source-page .figma-page [data-node-id="2006:3412"]{line-height:1.5!important;text-align:left!important;height:auto!important}}

/* Readable closing invitation on narrow screens. */
@media(max-width:1100px){.source-page .family-consult>p{line-height:1.5!important}}

/* Hide obsolete testimonial underlays before genuine portraits finish loading. */
.source-page .figma-page [data-node-id="8001:35"],.source-page .figma-page [data-node-id="8001:39"],.source-page .figma-page [data-node-id="8001:43"]{visibility:hidden!important}

/* Let long historical book descriptions use the phone content column. */
@media(max-width:600px){
[data-source-page="best-seller-track-record"] .family-first-timeline,
[data-source-page="best-seller-track-record"] .family-archive-panel{width:calc(100% - 48px);max-width:100%}
[data-source-page="best-seller-track-record"] .family-book-row{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;width:100%;min-height:0;padding:36px 0;border-bottom:1px solid #ddd}
[data-source-page="best-seller-track-record"] .family-book-row>figure,
[data-source-page="best-seller-track-record"] .family-book-row:nth-child(even)>figure{grid-column:1;grid-row:1;display:block;padding:0;border:0;text-align:center}
[data-source-page="best-seller-track-record"] .family-book-row>figure img,
[data-source-page="best-seller-track-record"] .family-book-row:nth-child(even)>figure img{width:auto;max-width:144px;max-height:220px;height:auto;margin:0 auto}
[data-source-page="best-seller-track-record"] .family-book-row>div,
[data-source-page="best-seller-track-record"] .family-book-row:nth-child(even)>div{grid-column:1;grid-row:2;padding:0;border:0;text-align:left;min-width:0}
[data-source-page="best-seller-track-record"] .family-book-row h2{line-height:1.4!important}
[data-source-page="best-seller-track-record"] .family-book-row p{line-height:1.5!important}
}

/* Keep the long process-link label inside narrow-phone button bounds. */
@media(max-width:380px){
.source-page .figma-page [data-node-id="4015:3198"]{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box}
.source-page .figma-page [data-node-id="4015:3199"]{width:100%!important;min-width:0!important;white-space:normal!important}
.source-page .figma-page [data-node-id="4015:3199"] p{white-space:normal!important}
}
