.five-c-layout-repair-active {
  overflow-x: clip;
}

.five-c-layout-repair-active *,
.five-c-layout-repair-active *::before,
.five-c-layout-repair-active *::after {
  box-sizing: border-box;
}

.five-c-layout-repair-active :where(main, article, section, aside, header, footer, nav, div) {
  min-width: 0;
}

.five-c-layout-repair-active :where(p, li, dd, figcaption, blockquote, h1, h2, h3, h4, h5, h6, a) {
  overflow-wrap: anywhere;
}

.five-c-layout-repair-active :where(img, svg, video, canvas) {
  max-width: 100%;
  height: auto;
}

.five-c-layout-repair-active :where(iframe, embed, object) {
  max-width: 100%;
}

.five-c-layout-repair-active :where(.wp-block-embed__wrapper, .video-embed, .responsive-video) {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.five-c-layout-repair-active :where(.wp-block-embed__wrapper, .video-embed, .responsive-video) iframe {
  width: 100%;
}

.five-c-layout-repair-active :where(.wp-block-table, .table-scroll, .woocommerce table.shop_table) {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.five-c-layout-repair-active table {
  max-width: 100%;
  border-collapse: collapse;
}

.five-c-layout-repair-active :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  max-width: 100%;
  font: inherit;
}

.five-c-layout-repair-active textarea {
  width: 100%;
  resize: vertical;
}

.five-c-layout-repair-active :where(.button, .wp-element-button, .wp-block-button__link, button, input[type="submit"]) {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.five-c-layout-repair-active :where(.wp-block-columns, .is-layout-flex, .button-row) {
  min-width: 0;
}

.five-c-layout-repair-active :where(.alignwide, .alignfull) {
  max-width: 100vw;
}

/*
 * Homepage book presentation stability.
 * The artwork is valid and loaded, so keep theme/plugin state changes from
 * fading, hiding, clipping, or deferring it after first paint.
 */
.home.five-c-layout-repair-active .home-hero .hero-visual {
  display: block !important;
  position: relative !important;
  min-height: 660px;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  content-visibility: visible !important;
}

.home.five-c-layout-repair-active .home-hero img.hero-book.fivec-book-presentation {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 2 !important;
  height: auto !important;
  aspect-ratio: 853 / 1271;
  object-fit: contain !important;
  opacity: 1 !important;
  visibility: visible !important;
  content-visibility: visible !important;
  animation: none !important;
  transition: none !important;
  transform: translate(-47%, -50%) !important;
}

.home.five-c-layout-repair-active .book-intro figure,
.home.five-c-layout-repair-active .book-intro img.fivec-book-presentation {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  content-visibility: visible !important;
  animation: none !important;
  transition: none !important;
}

.home.five-c-layout-repair-active .book-intro img.fivec-book-presentation {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 760px;
  margin-inline: auto;
  aspect-ratio: 853 / 1271;
  object-fit: contain !important;
}

/*
 * About-page portrait stability.
 * The source image is valid; keep sticky positioning, deferred rendering, and
 * later page-state changes from suppressing the author presentation.
 */
.five-c-layout-repair-active .about-biography .author-portrait {
  display: block !important;
  align-self: start;
  width: 100%;
  opacity: 1 !important;
  visibility: visible !important;
  content-visibility: visible !important;
  animation: none !important;
  transition: none !important;
}

.five-c-layout-repair-active .about-biography .author-portrait img {
  display: block !important;
  width: 100% !important;
  min-height: 570px;
  object-fit: cover !important;
  object-position: center 28% !important;
  opacity: 1 !important;
  visibility: visible !important;
  content-visibility: visible !important;
  animation: none !important;
  transition: none !important;
}

/*
 * Book page pathway containment.
 * The excerpt reader must remain on its own page. If another plugin injects
 * the complete reader inside a pathway link, hide it before the repair script
 * removes the invalid nested interface.
 */
.five-c-layout-repair-active .book-pathways > div:last-child > a > .fivec-public-book {
  display: none !important;
}

.five-c-layout-repair-active .book-pathways > div:last-child {
  align-items: stretch;
}

.five-c-layout-repair-active .book-pathways > div:last-child > a {
  min-width: 0;
  height: auto !important;
}

/*
 * Book Clubs six-session path.
 * WordPress can flatten the leading-number spans during an editor round-trip.
 * The script restores them; these rules keep every session compact and
 * readable once repaired.
 */
.five-c-layout-repair-active .discussion-plan {
  align-items: start;
}

.five-c-layout-repair-active .discussion-plan > div:first-child,
.five-c-layout-repair-active .discussion-plan > ol {
  min-height: 0 !important;
  height: auto !important;
}

.five-c-layout-repair-active .discussion-plan li.five-c-session-repaired {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: center;
  min-height: 0 !important;
  height: auto !important;
  line-height: 1.55;
}

.five-c-layout-repair-active .discussion-plan li.five-c-session-repaired > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-height: 34px;
  border: 1px solid rgba(179, 142, 79, .48);
  border-radius: 999px;
  background: rgba(179, 142, 79, .1);
}

/*
 * Shared form containment found during the full public-page audit.
 */
.five-c-layout-repair-active .request-form {
  width: min(1200px, 100%);
  margin-inline: auto;
}

.five-c-layout-repair-active .request-form :where(fieldset, .field-grid, .checkbox-grid, .location-fields, .location-detail-grid) {
  min-width: 0;
}

.five-c-layout-repair-active .request-form :where(label, input, select, textarea) {
  min-width: 0;
}

/*
 * Five C Dispatch signup
 * The Newsletter Engine limits this form to 720px and left-aligns it. The
 * public page is substantially wider, so the old rule creates a blank column.
 */
.five-c-layout-repair-active .fcn-signup {
  width: min(960px, calc(100% - clamp(32px, 8vw, 112px))) !important;
  max-width: 960px !important;
  margin: clamp(36px, 5vw, 72px) auto !important;
  padding: clamp(28px, 4vw, 52px) !important;
  border: 1px solid rgba(28, 66, 52, .18);
  border-top: 5px solid #b38e4f;
  border-radius: 10px;
  background: #faf8f3;
  box-shadow: 0 24px 64px rgba(20, 51, 41, .1);
}

.five-c-layout-repair-active .fcn-signup > h2 {
  max-width: 760px;
  margin: 0 0 14px;
  color: #183f32;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.035em;
}

.five-c-layout-repair-active .fcn-signup .fcn-form-intro {
  max-width: 760px;
  margin: 0 0 32px;
  color: #475a52;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.65;
}

.five-c-layout-repair-active .fcn-signup .fcn-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.five-c-layout-repair-active .fcn-signup > label,
.five-c-layout-repair-active .fcn-signup .fcn-fields > label,
.five-c-layout-repair-active .fcn-signup .fcn-location label {
  display: grid;
  gap: 9px;
  margin: 0 0 24px;
  color: #253d34;
  font-weight: 700;
  line-height: 1.35;
}

.five-c-layout-repair-active .fcn-signup :where(input:not([type="checkbox"]), select, textarea) {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #9ba8a2;
  border-radius: 6px;
  background: #fff;
  color: #172c24;
}

.five-c-layout-repair-active .fcn-signup :where(input:not([type="checkbox"]), select, textarea):focus {
  border-color: #183f32;
  outline: 3px solid rgba(179, 142, 79, .32);
  outline-offset: 2px;
}

.five-c-layout-repair-active .fcn-signup .fcn-location {
  min-width: 0;
  margin: 4px 0 26px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(28, 66, 52, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .62);
}

.five-c-layout-repair-active .fcn-signup .fcn-location legend {
  padding: 0 8px;
  color: #183f32;
  font-size: 1.1rem;
  font-weight: 800;
}

.five-c-layout-repair-active .fcn-signup .fcn-location > p {
  margin: 0 0 20px;
  color: #5b6963;
}

.five-c-layout-repair-active .fcn-signup .fcn-consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0 0 26px;
  font-weight: 500;
  line-height: 1.55;
}

.five-c-layout-repair-active .fcn-signup .fcn-consent input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
}

.five-c-layout-repair-active .fcn-signup > button[type="submit"] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  padding: 14px 24px;
  border: 1px solid #183f32;
  border-radius: 6px;
  background: #183f32;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.five-c-layout-repair-active .fcn-signup > button[type="submit"]:hover {
  background: #b38e4f;
  border-color: #b38e4f;
  color: #152c24;
}

.five-c-layout-repair-active .fcn-signup :where(.fcn-form-message, .fivec-form-delivery-status) {
  margin: 18px 0 0;
}

.five-c-layout-repair-active .five-c-connect-repaired.connect-next {
  display: block !important;
  padding: clamp(72px, 9vw, 128px) clamp(24px, 7vw, 120px) !important;
  background: radial-gradient(circle at 82% 18%, rgba(179, 142, 79, .22), transparent 34%), #183f32 !important;
  color: #fff;
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: clamp(42px, 8vw, 110px);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__copy {
  max-width: 690px;
}

.five-c-layout-repair-active .five-c-connect-repaired .eyebrow {
  color: #b38e4f;
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__copy h2 {
  max-width: 680px;
  margin: 0 0 24px;
  color: #fff;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__copy > p:last-child {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.6;
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__action {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(255, 255, 255, .22);
  border-top: 5px solid #b38e4f;
  border-radius: 8px;
  background: rgba(250, 248, 243, .09);
  box-shadow: 0 28px 65px rgba(13, 34, 27, .24);
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__action > span {
  display: block;
  margin-bottom: 12px;
  color: #b38e4f;
  font: 800 10px/1.4 Inter, "Source Sans 3", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__action > strong {
  display: block;
  color: #fff;
  font: 750 clamp(25px, 2.5vw, 34px)/1.15 Inter, "Source Sans 3", sans-serif;
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__action > p {
  margin: 16px 0 26px;
  color: rgba(255, 255, 255, .72);
  font-size: 16px;
  line-height: 1.55;
}

.five-c-layout-repair-active .five-c-connect-repaired .connect-next__action .button {
  width: 100%;
  margin: 0;
}

@media (max-width: 782px) {
  .five-c-layout-repair-active {
    overflow-x: hidden;
  }

  .five-c-layout-repair-active :where(.five-c-grid, .card-grid, .feature-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .five-c-layout-repair-active .wp-block-columns:not(.is-not-stacked-on-mobile) {
    flex-wrap: wrap !important;
  }

  .five-c-layout-repair-active .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 100% !important;
    width: 100%;
  }

  .five-c-layout-repair-active :where(.button-row, .wp-block-buttons) {
    align-items: stretch;
    flex-direction: column;
  }

  .five-c-layout-repair-active :where(.button-row, .wp-block-buttons) :where(.button, .wp-block-button, .wp-block-button__link) {
    width: 100%;
  }

  .home.five-c-layout-repair-active .home-hero .hero-visual {
    min-height: 560px;
  }

  .home.five-c-layout-repair-active .home-hero img.hero-book.fivec-book-presentation {
    width: min(410px, 76%) !important;
  }

  .five-c-layout-repair-active .about-biography .author-portrait {
    position: relative !important;
    top: auto !important;
    width: min(420px, 100%);
    margin-inline: auto;
  }

  .five-c-layout-repair-active .about-biography .author-portrait img {
    min-height: 0;
    aspect-ratio: 1028 / 1600;
  }

  .five-c-layout-repair-active .discussion-plan {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 34px !important;
  }

  .five-c-layout-repair-active .fcn-signup {
    width: calc(100% - 32px) !important;
    margin: 28px auto !important;
    padding: 26px 20px !important;
  }

  .five-c-layout-repair-active .fcn-signup .fcn-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .five-c-layout-repair-active .fcn-signup > button[type="submit"] {
    width: 100%;
  }

  .five-c-layout-repair-active .five-c-connect-repaired.connect-next {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  .five-c-layout-repair-active .five-c-connect-repaired .connect-next__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .five-c-layout-repair-active .five-c-connect-repaired .connect-next__copy h2 {
    font-size: clamp(40px, 13vw, 58px);
  }
}

@media (max-width: 480px) {
  .home.five-c-layout-repair-active .home-hero .hero-visual {
    min-height: 450px;
  }

  .home.five-c-layout-repair-active .home-hero img.hero-book.fivec-book-presentation {
    width: min(350px, 78%) !important;
    transform: translate(-49%, -50%) !important;
  }

  .five-c-layout-repair-active h1 {
    font-size: clamp(2rem, 11vw, 3.25rem);
  }

  .five-c-layout-repair-active h2 {
    font-size: clamp(1.75rem, 9vw, 2.75rem);
  }
}
