/* Shared spacing and typography for the homepage. */
.living-home {
  --challenge-surface: #f7ebd8;
  --home-edge: clamp(32px, 4vw, 56px);
  --home-near-rope: 24px;
  --home-before-rope: 22px;
  --home-gutter: clamp(16px, 4vw, 48px);
  --home-gap: clamp(14px, 2vw, 24px);
  --home-card-padding: clamp(14px, 1.7vw, 22px);
  --home-title: clamp(1.85rem, 3.3vw, 3rem);
  --home-card-title: clamp(1.13rem, 1.75vw, 1.48rem);
  font-family: system-ui, sans-serif;
  font-size: clamp(16px, 1.24vw, 18px);
  line-height: 1.55;
}

.living-home :is(.wrap, .header-inner) {
  width: min(calc(100% - 2 * var(--home-gutter)), 1216px);
  max-width: none;
}

.living-home :is(.chloe-thought, .humpty-thought, .scrolly-thought, .book-talk-bubble, .rewards-cheer, .rewards-chase-thought, .founder-greeting) {
  font-family: var(--story-hand);
}

.living-home :is(#nav, .button, button, summary) { font-family: system-ui, sans-serif; }

.living-home .button {
  min-height: 44px;
  padding: .55rem .92rem;
  font-size: .88rem;
  line-height: 1.28;
}

.living-home #main h2 {
  font-size: var(--home-title);
  line-height: 1.23;
}

.living-home #main h3 {
  font-size: var(--home-card-title);
  line-height: 1.3;
}

.living-home #main > .section {
  padding-block: var(--home-edge);
}

.living-home #main > :is(.rope-divider, .challenge-banner) + .section {
  padding-block-start: var(--home-near-rope);
}

.living-home #main > .section:has(+ .rope-divider) {
  padding-block-end: var(--home-before-rope);
}

.living-home .rope-divider {
  --rope-depth: clamp(43px, 5.4vw, 76px);
  height: calc(var(--rope-depth) + 9px);
  min-height: 0;
}

.living-home .rope-ghaf { --tree-width: clamp(64px, 8vw, 120px); }
.living-home .rope-humpty { width: clamp(46px, 5vw, 76px); }
.living-home .rope-camel { width: clamp(47px, 5.2vw, 80px); }
.living-home .rope-perch { width: clamp(50px, 5.3vw, 82px); }
.living-home .rope-divider--schools .rope-perch { left: 22%; }
.living-home .rope-divider--schools .rope-humpty { max-width: 68px; }
.living-home :is(.humpty-thought, .scrolly-thought) {
  padding: .33rem .55rem;
  font-size: .83rem;
  line-height: 1.2;
}
.living-home .humpty-thought { bottom: 24%; max-width: min(49vw, 15rem); }
.living-home .scrolly-thought { bottom: 38%; }

html:has(.living-home) { scroll-behavior: auto; }
@view-transition { navigation: none; }

.living-home :focus-visible {
  outline: 3px solid #23573e;
  outline-offset: 4px;
}
.living-home #nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Keep the animated mask centered on each printed emblem as its artwork scales. */
.artwork-ring {
  position: absolute;
  inset: var(--ring-y) auto auto var(--ring-x);
  width: calc(var(--ring-width) * 1%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: hidden;
  mask-image: radial-gradient(circle closest-side, #000 86%, transparent 99%);
  pointer-events: none;
}
.artwork-ring-spin {
  display: block;
  position: absolute;
  inset: 0;
  animation: artwork-ring-spin 5s linear infinite;
}
.artwork-ring-spin img {
  position: absolute;
  inset: 50% auto auto 50%;
  width: calc(10000% / var(--ring-width));
  height: auto;
  max-width: none;
  transform: translate(calc(-1 * var(--ring-x)), calc(-1 * var(--ring-y)));
}
.artwork-ring--challenge-shirt { --ring-x: 48.65%; --ring-y: 44.29%; --ring-width: 8.75; }
.artwork-ring--challenge-trophy { --ring-x: 84.9%; --ring-y: 13.15%; --ring-width: 6; }
@keyframes artwork-ring-spin {
  to { transform: rotate(1turn); }
}
@media (prefers-reduced-motion: reduce) {
  .artwork-ring { display: none; }
}
.challenge-banner { margin-block-start: -1px; }

.challenge-banner {
  position: relative;
  isolation: isolate;
  background: var(--challenge-surface);
}
.challenge-scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  overflow: clip;
  background: #eaf1dc url("assets/brain-story/picture-book-meadow.webp") center bottom / cover no-repeat;
}
.challenge-right-art {
  position: relative;
  width: min(104%, 38rem);
  justify-self: start;
  margin-inline-start: -8%;
  container-type: inline-size;
  pointer-events: none;
}
.challenge-right-art > img {
  display: block;
  width: 100%;
  height: auto;
  /* Retain Sparky and the track from the existing transparent illustration. */
  clip-path: polygon(31% 0, 100% 0, 100% 100%, 31% 100%, 31% 72%, 32% 64%, 32% 53%, 27% 50%, 24.8% 47%, 24.8% 42%, 27% 37%, 31% 32%);
}
.challenge-poster-copy {
  display: grid;
  justify-items: center;
  gap: clamp(.9rem, 2vw, 1.6rem);
  padding: 1.5rem 0 1.65rem var(--home-gutter);
  text-align: center;
}
.challenge-label {
  width: min(80%, 23rem);
  height: auto;
}
.living-home #main #challenge-title {
  margin: 0;
  color: #174529;
  font: 850 clamp(2rem, 4.6vw, 4.75rem)/1.05 system-ui, sans-serif;
  letter-spacing: -.055em;
}
#challenge-title span {
  display: block;
  color: #9b4004;
}
/* Match the inset fabric panels to the illustrated flags at every artwork size. */
.challenge-flag-art {
  position: absolute;
  inset: 0;
}
.challenge-flag {
  position: absolute;
  inset: var(--flag-top) auto auto var(--flag-left);
  width: var(--flag-width);
  height: var(--flag-height);
  display: grid;
  place-items: center;
  isolation: isolate;
  color: #fff;
  font: 850 3.5cqw/1.03 system-ui, sans-serif;
  text-align: center;
  white-space: nowrap;
}
.challenge-flag::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  clip-path: var(--flag-panel);
  background: var(--flag-fill);
}
.challenge-flag > span {
  transform: rotate(-5deg);
  text-shadow: 0 .12cqw .32cqw #29100d90;
}
.challenge-flag small {
  display: block;
  margin-block-start: .25cqw;
  font-size: .75em;
}
.challenge-flag--one {
  --flag-left: 63.76%;
  --flag-top: 66.72%;
  --flag-width: 22.30%;
  --flag-height: 12.41%;
  --flag-panel: polygon(0.0% 15.3%, 28.9% 2.4%, 48.4% 0.0%, 69.9% 7.6%, 92.2% 10.0%, 90.2% 32.4%, 91.4% 54.7%, 100.0% 81.2%, 87.5% 87.6%, 70.3% 91.8%, 46.9% 90.6%, 25.0% 92.9%, 7.4% 100.0%);
  --flag-fill: linear-gradient(120deg, #8514bc, #6e05a4);
}
.challenge-flag--two {
  --flag-left: 78.31%;
  --flag-top: 49.93%;
  --flag-width: 18.73%;
  --flag-height: 10.44%;
  --flag-panel: polygon(0.0% 17.5%, 21.4% 5.6%, 42.8% 0.0%, 64.7% 1.4%, 85.1% 7.0%, 96.3% 3.5%, 93.5% 33.6%, 93.5% 53.8%, 100.0% 86.7%, 84.2% 94.4%, 63.7% 95.8%, 41.4% 94.4%, 9.8% 100.0%);
  --flag-fill: linear-gradient(120deg, #0b83e4, #0464c7);
}
.challenge-flag--three {
  --flag-left: 72.30%;
  --flag-top: 35.18%;
  --flag-width: 18.47%;
  --flag-height: 10.00%;
  --flag-panel: polygon(0.0% 15.3%, 19.3% 5.8%, 39.2% 0.0%, 59.9% 2.2%, 77.8% 5.8%, 93.4% 2.2%, 91.0% 30.7%, 91.0% 48.2%, 100.0% 81.0%, 84.4% 89.1%, 66.5% 92.7%, 40.6% 92.0%, 12.3% 100.0%);
  --flag-fill: linear-gradient(120deg, #ff8b09, #ef6501);
}
.challenge-flag--four {
  --flag-left: 79.97%;
  --flag-top: 21.09%;
  --flag-width: 17.16%;
  --flag-height: 9.27%;
  --flag-panel: polygon(0.0% 17.3%, 22.8% 5.5%, 45.2% 0.0%, 64.0% 3.1%, 81.2% 7.1%, 95.9% 0.0%, 91.9% 32.3%, 91.4% 52.0%, 100.0% 86.6%, 83.8% 93.7%, 61.9% 93.7%, 41.1% 92.1%, 9.1% 100.0%);
  --flag-fill: linear-gradient(120deg, #f51e5d, #d40544);
}
.family-week[id^="balance-up-week-"] { scroll-margin-top: 6rem; }
.warm-up-banner a {
  display: grid;
  width: clamp(6.25rem, 11vw, 8.5rem);
  aspect-ratio: 1;
  align-content: center;
  justify-items: center;
  gap: .45rem;
  border: 3px solid #f6ce62;
  border-radius: 50%;
  background: linear-gradient(#237947, #105531);
  box-shadow: 0 .32rem 0 #154329, 0 .65rem 1rem #1e452a2e;
  color: #fff;
  font: 800 clamp(.95rem, 1.7vw, 1.3rem)/1.1 system-ui, sans-serif;
  text-decoration: none;
}
.challenge-play-icon {
  display: grid;
  width: 2.1rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #ffe08a;
}
.challenge-play-icon::before {
  content: "";
  margin-inline-start: .15rem;
  border-block: .38rem solid transparent;
  border-inline-start: .62rem solid #174529;
}
.warm-up-banner a:hover { background: #165f39; }
.warm-up-banner a:focus-visible { outline-offset: 5px; }

@media (prefers-reduced-motion: no-preference) {
  .warm-up-banner a { transition: transform 150ms ease; }
  .warm-up-banner a:hover { transform: translateY(-2px); }
  .warm-up-banner a:active { transform: translateY(2px); }
}

@media (max-width: 760px) {
  .challenge-scene {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "artwork" "heading";
    reading-flow: grid-rows;
  }

  .challenge-right-art {
    grid-area: artwork;
    width: min(130%, 35rem);
    justify-self: end;
    margin-inline: 0 max(0px, calc((100% - 26rem) / 2));
  }

  .challenge-poster-copy {
    grid-area: heading;
    padding: .25rem var(--home-gutter) 1.65rem;
  }

  .challenge-label {
    width: min(75%, 17rem);
  }

  .living-home #main #challenge-title {
    font-size: clamp(2rem, 7vw, 3.3rem);
  }
}

.start-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: var(--home-gap);
  align-items: start;
}
.living-home .start-spread > :is(.featured-activity, .sample-story) {
  display: grid;
  grid-template: none;
  grid-column: auto;
  gap: clamp(.7rem, 1.4vw, 1.1rem);
  min-width: 0;
  margin: 0;
  padding: var(--home-card-padding);
  border: 1px solid #e3d4b7;
  border-radius: 1.25rem 2.6rem 1.4rem 1.85rem;
  background: #f8efd9;
}
.living-home .start-spread .sample-story { background: #edf1e3; border-color: #d5ddc5; }
.start-spread :is(.featured-copy, .featured-photo) { grid-area: auto; }
.start-spread .featured-photo { margin: 0; }
.living-home .start-spread :is(.featured-photo img, .sample-story .story-cover-link img) {
  display: block;
  width: 100%;
  height: auto;
  max-height: 15rem;
  object-fit: contain;
  border-radius: .85rem 1.8rem 1rem 1.3rem;
}
.living-home .start-spread .sample-story .story-copy { padding: 0; }
.start-spread .eyebrow { margin: 0 0 .25rem; }
.sample-page-turn { position: relative; display: block; overflow: hidden; border-radius: .85rem 1.8rem 1rem 1.3rem; }
@media (prefers-reduced-motion: no-preference) {
  .sample-page-turn.page-revealed::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(93deg, #f4e1bc 0%, #fff7e2 85%, #d5b689 100%);
    transform-origin: left center;
    animation: sample-paper-turn .46s ease-out both;
  }
}
@keyframes sample-paper-turn {
  0% { transform: perspective(600px) rotateY(0); opacity: 1; }
  100% { transform: perspective(600px) rotateY(-90deg); opacity: 0; }
}

.living-home .brand .brand-mark,
.living-home .chloe-flight img,
.living-home .book-talk * { animation: none; }
.living-home .book-talk .book-talk-bubble { opacity: 1; }
.living-home .story-cover-link img,
.living-home :is(.cast-lineup img, .rope-row-character, .sparky-art img) { transition: none; }
.living-home :is(.story > img, .story-cover-link img):is(:hover, :focus-visible),
.living-home .story-cover-link:focus-visible img { transform: none; box-shadow: none; }
.living-home .rope-rows { padding-top: 0; background: none; }
.living-home .rope-rows > :is(details, a) {
  background: none;
  border-bottom: 1px solid #c9c7ae;
}
.living-home .rope-row-humpty { flex: none; }

.home-intro { max-width: 55ch; margin-block: .55rem .75rem; }

.program-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: var(--home-gap);
  align-items: stretch;
}
.benefits-summary,
.benefit-practise {
  border-radius: 2rem 3.15rem 2.75rem 1.8rem;
}
.program-steps { padding: clamp(1rem, 3.2vw, 2.45rem); }
.trail-heading h2 { max-width: 17ch; }
.trail-map {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(1.25rem, 5vw, 4.8rem) .65rem;
}
.trail-map .trail-scene { width: min(86%, 445px); }
.trail-steps {
  display: grid;
  gap: .45rem;
  margin: .95rem 0;
  padding: 0;
  list-style: none;
}
.trail-steps li { min-width: 0; margin: 0; }
.trail-steps a {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 58px;
  padding: .4rem .55rem;
  color: var(--deep);
  text-decoration: none;
  border-radius: 1.1rem 1.9rem 1.1rem 1.5rem;
}
.trail-steps a:is(:hover, :focus-visible) { background: #f0ead8; }
.trail-steps a:is(:hover, :focus-visible) h3 { text-decoration: underline; text-underline-offset: .16em; }
.trail-step-copy p { margin: .14rem 0 0; color: #455542; font-size: .84rem; }
.living-home .trail-next { justify-content: flex-start; gap: .55rem; }
.living-home .trail-next .rope-link {
  flex: 1 1 9rem;
  min-width: 0;
  min-height: 44px;
  padding: .35rem .6rem;
  border: 1px solid #d9cba8;
  border-radius: 1.25rem 1.8rem 1.25rem 1.55rem;
  box-shadow: none;
}
.living-home .trail-next .rope-row-character { width: 2rem; height: 2rem; }

.home-benefits {
  display: grid;
  gap: var(--home-gap);
  min-width: 0;
  margin-block-start: var(--home-gap);
  scroll-margin-top: 1.25rem;
}
.benefits-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  column-gap: clamp(1rem, 4vw, 3.15rem);
  padding: clamp(1rem, 3.2vw, 2.45rem);
  background: #e0ebdc;
  color: #284833;
  border: 1px solid #c3d4bc;
  scroll-margin-top: 1rem;
}
.living-home #main #learning-title {
  color: var(--deep);
  font-size: clamp(1.45rem, 3.25vw, 2.65rem);
  line-height: 1.28;
}
.benefits-summary .home-intro { margin-block: .6rem .8rem; }
.benefits-summary .play-together-art {
  width: clamp(142px, 24vw, 260px);
  margin: 0;
}
.play-together-art img { display: block; width: 100%; height: auto; border-radius: 2rem 3rem 2.7rem 1.6rem; }
.benefit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.benefit-chips li {
  margin: 0;
  padding: .27rem .58rem;
  border: 1px solid #d9e5c7;
  border-radius: 99px;
  background: #f9f6e7;
  color: #244732;
  font-size: .8rem;
  font-weight: 650;
}
.benefit-skills > summary {
  min-height: 48px;
  padding: .55rem .8rem;
  border-block: 1px solid #d4c8a9;
  color: var(--deep);
  font-weight: 680;
}
.benefit-skills > summary::after { content: "+"; margin-inline-start: auto; }
.benefit-skills[open] > summary::after { content: "−"; }
.benefit-skills > .activity-picker,
.benefit-skills > .benefit-practise { margin-block-start: var(--home-gap); }
.skill-picker .activity-picker-menu {
  border-radius: 1.6rem 2rem 1.75rem 1.3rem;
  background: #f8f1dd;
}
.skill-picker .activity-picker-menu a { border-radius: 999px; }
.skill-picker .activity-picker-menu a::after {
  border: 1px solid currentColor;
  width: .38rem;
  height: .38rem;
  border-radius: 50%;
  rotate: none;
}
.skill-picker .activity-picker-menu a[aria-current]::after { background: currentColor; }
.skill-panels { display: grid; gap: .5rem; min-width: 0; }
.benefit-skill {
  align-content: center;
  display: grid;
  min-height: clamp(115px, 17vw, 215px);
  padding: clamp(1.1rem, 3.4vw, 2.25rem);
  border-radius: 2.4rem 3.5rem 2.15rem 3.25rem;
  background: #fff4d9;
  border: 1px solid #e1c994;
  scroll-margin-top: 1rem;
}
.benefit-skill:nth-child(4n + 2) { background: #e4edda; border-color: #c0d2b5; }
.benefit-skill:nth-child(4n + 3) { background: #f7e6d9; border-color: #dfc5b6; }
.benefit-skill:nth-child(4n + 4) { background: #ede8f5; border-color: #d9cfe8; }
.benefit-skill h5 {
  margin: 0;
  color: var(--deep);
  font: 700 clamp(1.15rem, 2.5vw, 1.95rem)/1.35 var(--display);
}
.benefit-skill p { max-width: 51ch; margin: .45rem 0 0; color: #394e3e; line-height: 1.55; }
.benefit-practise {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: var(--home-gap);
  padding: clamp(.65rem, 2vw, 1.25rem);
  background: #fbf3de;
}
.benefit-practise p { margin: .35rem 0 0; max-width: 64ch; }
.benefit-practise .learning-picture { width: clamp(95px, 19vw, 195px); padding: .25rem; }
.living-home .learning-skill > details > summary { font-family: system-ui, sans-serif; font-size: .9rem; min-height: 46px; }

.living-home .shelf-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .52fr);
  grid-template-areas: "copy chloe";
  gap: var(--home-gap);
  align-items: center;
  margin-bottom: var(--home-gap);
}
.shelf-heading > :not(.chloe-flight) { grid-area: copy; }
.living-home .shelf-heading .chloe-flight { grid-area: chloe; justify-self: end; margin: 0; }
.living-home .cast-lineup--shelf { margin: .5rem 0 0; }
.living-home .shelf-heading .eyebrow { margin-bottom: .35rem; }

.living-home .story-grid { gap: var(--home-gap); }
.living-home .story { padding: .55rem; background: transparent; }
.living-home .story-grid > .shelf-interlude { grid-column: 1 / -1; }
.living-home .shelf-interlude { grid-template-columns: minmax(0, 6rem) minmax(0, 1fr); }
.living-home .story-grid .story-copy { padding-inline: 0; }
.living-home :is(.story > img, .story-cover-link > img) { height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
.living-home .shelf-interlude { align-self: stretch; padding: var(--home-card-padding); }
.living-home .school-guide,
.living-home .rewards-passport,
.living-home .rewards-quiz-journal {
  padding: var(--home-card-padding);
}
.living-home .featured-activity {
  gap: clamp(18px, 3.3vw, 40px);
  margin-block: var(--home-gap) clamp(24px, 3vw, 36px);
}

.living-home .more-activities-title { margin-block: 0 .95rem; }
.activity-picker {
  --activity-edge: #d8c9a5;
}
.activity-picker:has(.activity-picker-menu:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.4fr);
  align-items: start;
  gap: var(--home-gap);
}
.activity-picker-menu {
  display: grid;
  gap: .3rem;
  padding: .55rem;
  border: 1px solid var(--activity-edge);
  border-radius: .8rem 1.5rem .8rem .8rem;
  background: #f1ebd8;
}
.activity-picker-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 46px;
  padding: .44rem .65rem;
  border: 1px solid transparent;
  border-radius: .58rem;
  color: var(--deep);
  font-weight: 680;
  line-height: 1.3;
  text-decoration: none;
}
.activity-picker-menu a::after {
  content: "";
  flex: none;
  width: .42rem;
  height: .42rem;
  margin-inline-end: .17rem;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  rotate: 45deg;
}
.activity-picker-menu a:is(:hover, :focus-visible) {
  background: #fff9eb;
  border-color: var(--activity-edge);
}
.activity-picker-menu a[aria-current] { background: #28523c; color: #fffae8; border-color: #28523c; }
.activity-pictures { display: grid; gap: var(--home-gap); min-width: 0; }
.activity-panel {
  display: grid;
  gap: .65rem;
  min-width: 0;
  padding: clamp(.65rem, 1.7vw, 1.2rem);
  border: 1px solid var(--activity-edge);
  border-radius: .85rem 1.9rem .85rem .85rem;
  background: #fff8e9;
  scroll-margin-top: 1rem;
}
.activity-panel h4 {
  margin: 0;
  color: var(--deep);
  font: 700 clamp(1.25rem, 2.5vw, 1.9rem)/1.35 var(--display);
}
.activity-panel figure { margin: 0; }
.activity-panel figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 435px;
  object-fit: contain;
  border-radius: .5rem 1.35rem .5rem .5rem;
  background: #f2ead4;
}
.activity-panel .activity-edition { margin: 0; }
.activity-panel details { border-block-start: 1px solid var(--activity-edge); }

@media (max-width: 760px) {
  .activity-picker:has(.activity-picker-menu:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .activity-picker-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-picker-menu a { font-size: .88rem; }
}

.living-home #main > .rewards-journey { padding-block-start: 0; }
.living-home .rewards-rope { height: clamp(145px, 12vw, 172px); margin-block-end: 16px; }
.rewards-intro { margin-block-end: var(--home-gap); }
.living-home .rewards-quiz-journal { margin: 0 0 var(--home-gap); }
.living-home .rewards-layout { gap: var(--home-gap); }
.living-home .rewards-copy .rewards-steps { margin-block: .65rem; gap: .5rem; }
.living-home .rewards-illustration { width: min(100%, 390px); justify-self: end; }
.living-home .rewards-passport { margin-top: var(--home-gap); gap: .65rem; }
.living-home .rewards-stamps { gap: .65rem; }

.living-home .program-grid { gap: var(--home-gap); }
.living-home .founder-feature { gap: var(--home-gap); }
.living-home .founder-portrait { width: min(100%, 370px); justify-self: start; }
.living-home .founder-title { text-align: left; }
.living-home .founder-welcome-body { max-width: 58ch; font-size: clamp(.95rem, 1.65vw, 1.08rem); }

.living-home .bookshop { text-align: left; }
.living-home .bookshop-editions {
  gap: var(--home-gap);
  margin: var(--home-gap) 0 .75rem;
}
.living-home .bookshop-stage {
  width: min(100%, 410px);
  margin: 0;
  aspect-ratio: 4 / 3;
}
.living-home .bookshop-stage img { display: block; object-fit: contain; }
.living-home .book-talk {
  margin: .5rem 0 0 auto;
  --sticker-width: clamp(32px, 4vw, 48px);
  width: min(100%, 26rem);
  max-width: none;
}
.living-home .book-talk-speaker { width: min(10.5rem, 43vw); }
.living-home .book-talk-bubble { font-size: .88rem; margin-bottom: .42rem; padding: .3rem .5rem; }
.living-home .book-talk-speaker img { width: var(--sticker-width); }
.book-follow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--home-gap);
  margin-block-start: .85rem;
}
.book-follow .book-updates { align-self: center; }
.living-home .book-follow .book-talk { margin: 0; }
.living-home .book-follow .book-talk-speaker { display: flex; align-items: center; gap: .35rem; }
.living-home .book-follow .book-talk-speaker img { flex: 0 0 var(--sticker-width); }
.living-home .book-follow .book-talk-bubble { margin: 0; }
.living-home .book-follow .book-talk-bubble::before,
.living-home .book-follow .book-talk-bubble::after { inset: auto -.24rem .55rem auto; }
.living-home .book-follow .book-talk-bubble::after { right: -.47rem; bottom: .48rem; }

.book-extras {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: var(--home-gap);
  margin-block-start: var(--home-gap);
  align-items: start;
}
.living-home .book-extras > section {
  padding: var(--home-card-padding);
  border: 1px solid #ddc9a0;
  border-radius: .75rem 1.5rem .85rem .8rem;
  background: #fff9ea;
}
.book-extras :is(.shop-wrap, .shop-lead) { max-width: none; }
.book-extras .shop-feature { padding: 0; gap: .75rem; background: none; }
.book-extras .shop-lead { font-size: .95rem; margin: .35rem 0 0; }
.book-extras .shop-preview { width: min(100%, 225px); justify-self: end; }
.book-extras .shop-characters { margin-block-start: .4rem; text-align: left; }
.book-extras .shop-cast { gap: .45rem; }
.book-extras .shop-cast li { padding: .38rem; min-width: 0; overflow-wrap: anywhere; }
.living-home .book-extras h3 + p { margin-block: .35rem .55rem; }

@media (min-width: 960px) {
  .living-home .story-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .living-home .story-grid > * { grid-column: auto; }
}

@media (max-width: 760px) {
  .living-home { --home-edge: 30px; --home-near-rope: 16px; --home-before-rope: 20px; }
  .start-spread { grid-template-columns: minmax(0, 1fr); }
  .living-home .header-inner { width: calc(100% - 2 * var(--home-gutter)); }
  .living-home .rope-divider { height: calc(var(--rope-depth) + 10px); }
  .living-home .rope-divider--perched { height: calc(var(--rope-depth) + 16px); }
  .program-overview { grid-template-columns: minmax(0, 1fr); }
  .program-steps { padding: 1rem; }
  .trail-heading h2 { max-width: 18ch; margin-inline: auto; text-align: center; }
  .trail-steps { gap: .2rem; margin: .65rem 0; }
  .trail-steps a { gap: .48rem; padding-inline: .3rem; }
  .living-home #main .trail-steps h3 { font-size: 1.03rem; }
  .trail-map { padding: 1.15rem .75rem 1.5rem; }
  .trail-map .trail-scene { width: min(86%, 365px); }
  .living-home .skill-picker .activity-picker-menu a {
    min-height: 46px;
    padding-inline: .47rem;
    font-size: .85rem;
  }
  .skill-picker .activity-picker-menu a::after { display: none; }
  .benefit-skill { border-radius: 1.6rem 2.15rem 1.65rem 2.35rem; }
  .living-home .trail-next small { font-size: .73rem; }
  .benefits-summary { column-gap: .8rem; }
  .benefits-summary .play-together-art { width: clamp(105px, 37vw, 190px); }
  .living-home .shelf-heading { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "chloe"; gap: .65rem; }
  .living-home .shelf-heading .chloe-flight { justify-self: start; width: min(100%, 15rem); }
  .living-home .rewards-illustration { justify-self: start; }
  .living-home .bookshop-editions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-extras { grid-template-columns: minmax(0, 1fr); }
  .book-extras .shop-feature { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
  .book-extras .shop-intro { text-align: left; }
  .living-home .founder-portrait { width: min(100%, 310px); }
}

@media (max-width: 480px) {
  .living-home .header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .living-home .menu-button { grid-column: 2; }
  .living-home #nav[hidden] + .header-action { display: none; }
  .living-home .header-action { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin-bottom: .55rem; }
  .living-home .questions summary { overflow-wrap: anywhere; }
  .living-home .questions .rope-row-humpty { width: 2.75rem; }
  .living-home .questions .rope-row-humpty .rope-row-character { width: 100%; }
  .start-spread .actions .button { margin: 0; }
  .benefits-summary { grid-template-columns: minmax(0, 1fr); row-gap: .95rem; }
  .benefits-summary .play-together-art {
    width: min(72%, 205px);
    justify-self: center;
  }
  .living-home .rope-divider--schools .scrolly-thought {
    right: auto;
    left: -2.35rem;
    max-width: 39vw;
    font-size: .76rem;
  }
  .living-home .rope-divider--schools .humpty-thought { max-width: 43vw; }
  .living-home .rewards-rope { height: 150px; }
  .living-home .bookshop-edition p { font-size: .9rem; }
  .living-home .bookshop-edition .text-link { font-size: .8rem; }
}

/* Chapter backdrops use the original illustrations as watercolor washes. */
.living-home {
  --field-green: #235942;
  --field-marking: #72957463;
}
.living-home .site-header { border-bottom: 0; }
.living-home .button.primary { background: var(--field-green); border-color: var(--field-green); }
.living-home .button.primary:is(:hover, :focus-visible) { background: #194730; }
.living-home .button.outline { border-color: #6b8a67; }

.living-home #main > :is(.start-chapter, .chapter-trail, .stories, .more-activities, .parents, .schools, .about, .book-section, .questions) {
  background:
    linear-gradient(to bottom, var(--chapter-paper) 0, transparent 2rem, transparent 64%, var(--chapter-paper)) top right / 100% var(--scene-depth) no-repeat,
    linear-gradient(90deg, var(--chapter-paper) 19%, color-mix(in srgb, var(--chapter-paper) 96%, transparent) 46%, color-mix(in srgb, var(--chapter-paper) 78%, transparent) 100%) top right / 100% var(--scene-depth) no-repeat,
    var(--chapter-scene) top right / min(83%, 1050px) var(--scene-depth) no-repeat,
    var(--chapter-paper);
  --scene-depth: clamp(11rem, 39vw, 27rem);
}
.living-home .start-chapter {
  --chapter-paper: #fffbf1;
  --chapter-scene: url("assets/brain-story/play-1080.webp");
}
.living-home .chapter-trail {
  --chapter-paper: var(--trail-paper);
  --chapter-scene: url("assets/brain-story/forest-1080.webp");
}
.living-home .stories {
  --chapter-paper: var(--stories-paper);
  --chapter-scene: url("assets/brain-story/spark-1080.webp");
}
.living-home .more-activities {
  --chapter-paper: #fffbf1;
  --chapter-scene: url("assets/brain-story/friends-1080.webp");
}
.living-home .parents {
  --chapter-paper: #f1edda;
  --chapter-scene: url("assets/botanical/hero-read-balance-up-720.webp");
}
.living-home .schools {
  --chapter-paper: #e7eee5;
  --chapter-scene: url("assets/storybook/learning-schoolchildren-480.webp");
}
.living-home .about {
  --chapter-paper: #fffbf1;
  --chapter-scene: url("assets/brain-story/forest-480.webp");
}
.living-home .book-section {
  --chapter-paper: #f7ecd3;
  --chapter-scene: url("assets/brain-story/spark-480.webp");
}
.living-home .questions {
  --chapter-paper: var(--paper);
  --chapter-scene: url("assets/brain-story/celebration-480.webp");
}

.start-spread .sample-story .story-cover-link { background: #dae4cc; }
.start-spread .featured-photo { background: #f1e3c3; border-radius: .85rem 1.8rem 1rem 1.3rem; }
.living-home .start-spread .featured-activity { background: #fff4dc; }
.living-home .start-spread .sample-story { background: #e7efd9; }
.trail-map {
  background:
    radial-gradient(ellipse at center, transparent 31%, var(--field-marking) 31.35% 31.8%, transparent 32.2%),
    linear-gradient(90deg, transparent calc(50% - .5px), var(--field-marking) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
    #e0ebd5;
  border: 1px solid #c1d1b1;
  border-radius: 2.9rem 1.7rem 2.8rem 1.8rem;
}
.living-home .story-grid .story > img {
  border: 1px solid #c9d0ad;
  border-radius: .65rem 1.55rem .85rem 1.15rem;
}
.living-home .story-grid .story:nth-child(2) > img { border-color: #c9b9ce; }
.living-home .story-grid .story:nth-child(3) > img { border-color: #c5c7dc; }
.living-home .story-grid .story:nth-child(4) > img { border-color: #d9bc8b; }
.living-home .more-activities .activity-picker-menu {
  background: #edf1df;
  border-color: #ccd5b8;
}
.living-home .more-activities .activity-panel {
  background: #fff8e8;
  border-color: #d9c9a6;
  border-radius: 1.3rem 2.4rem 1.45rem 1.8rem;
}
.living-home .more-activities .activity-picker-menu [aria-current] {
  background: var(--field-green);
}
@media (max-width: 760px) {
  .living-home #main > :is(.start-chapter, .chapter-trail, .stories, .more-activities, .parents, .schools, .about, .book-section, .questions) {
    background-size: 100% var(--scene-depth), 100% var(--scene-depth), 100% var(--scene-depth), auto;
    --scene-depth: max(12rem, 54vw);
  }
  .trail-map { border-radius: 2rem 1.2rem 1.8rem 1.4rem; }
}
