/* The fixed rail is already outside main. Chapter geometry stays inside the available main width. */
.chapter-section {
  width: 100%;
  padding: clamp(86px, 9vw, 140px) clamp(24px, 5vw, 76px) 35px;
  color: var(--ink);
  background: var(--paper);
  overflow: clip;
}

.chapter-intro,
.chapter-sequence {
  width: min(100%, 1240px);
  margin-right: auto;
  margin-left: auto;
}

.chapter-kicker,
.chapter-stage,
.chapter-caption-label {
  margin: 0;
  color: #97543b;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.chapter-kicker {
  font-size: 12px;
}

.chapter-intro h2,
.chapter h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.07;
  text-wrap: balance;
}

.chapter-intro h2 {
  max-width: 960px;
  margin-top: 24px;
  font-size: clamp(50px, 5.2vw, 78px);
}

.chapter-intro-copy {
  max-width: 660px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 1.35vw, 21px);
  line-height: 1.5;
}

.chapter-sequence {
  display: grid;
  gap: clamp(68px, 8vw, 112px);
  margin-top: clamp(62px, 7vw, 100px);
}

.chapter {
  min-width: 0;
}

.chapter-stage {
  font-size: 13px;
}

.chapter h3 {
  max-width: 620px;
  margin-top: 20px;
  font-size: clamp(36px, 3.4vw, 50px);
}

.chapter-plan {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: stretch;
  background: var(--sage-light);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chapter-plan-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(46px, 5vw, 76px) clamp(34px, 5vw, 72px) clamp(48px, 5vw, 76px) clamp(34px, 4.3vw, 64px);
}

.chapter-plan-copy > p:not(.chapter-stage),
.chapter-identity-caption > p:not(.chapter-stage),
.chapter-website-copy > p:not(.chapter-stage):not(.chapter-website-detail) {
  max-width: 540px;
  margin: 28px 0 0;
  font-size: clamp(17px, 1.22vw, 20px);
  line-height: 1.5;
}

.chapter-plan-spread {
  margin: 0;
  overflow: hidden;
  position: relative;
  min-width: 0;
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px clamp(24px, 3.8vw, 58px) 26px;
  background: #f0e9df;
  border-left: 1px solid var(--line);
  isolation: isolate;
}

.chapter-plan-spread::before {
  display: none;
  content: "";
  position: absolute;
  z-index: -1;
  inset: 27px clamp(22px, 3vw, 44px) 62px clamp(22px, 3vw, 44px);
  background: var(--paper-light);
  border: 1px solid rgba(25, 58, 50, 0.16);
  box-shadow: 11px 12px 0 rgba(25, 58, 50, 0.06);
  transform: rotate(-1.15deg);
}

.chapter-plan-spread::after {
  display: none;
  content: "";
  position: absolute;
  z-index: 0;
  top: 28px;
  bottom: 63px;
  left: 50%;
  width: 1px;
  background: rgba(25, 58, 50, 0.12);
}

.chapter-plan-spread img {
  position: relative;
  z-index: 1;
  width: 165%;
  max-width: none;
  margin-left: -65%;
  height: auto;
  max-height: none;
  display: block;
  object-fit: contain;
}

.chapter-plan-spread figcaption,
.chapter-website-figure figcaption {
  position: relative;
  z-index: 1;
  max-width: 360px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.chapter-caption-label {
  display: block;
  margin-bottom: 4px;
  color: var(--forest);
  font-size: 10px;
}

.chapter-identity {
  color: var(--paper-light);
  background: var(--forest);
}

.chapter-identity-figure {
  position: relative;
  min-height: clamp(570px, 50vw, 720px);
  margin: 0;
  overflow: hidden;
  isolation: isolate;
}

.chapter-identity-figure > img {
  position: absolute;
  z-index: 1;
  right: auto;
  bottom: 0;
  left: 0;
  width: auto;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: left bottom;
}

.chapter-identity-caption {
  position: absolute;
  z-index: 2;
  right: clamp(28px, 6vw, 94px);
  bottom: clamp(28px, 5vw, 72px);
  width: min(390px, 32%);
  padding: 30px 30px 32px;
  color: var(--ink);
  background: var(--paper-light);
  border-left: 6px solid var(--copper);
}

.chapter-identity-caption .chapter-stage {
  color: #97543b;
}

.chapter-identity-caption h3 {
  margin-top: 18px;
  font-size: clamp(34px, 2.9vw, 44px);
}

.chapter-identity-caption > p:not(.chapter-stage) {
  margin-top: 22px;
  font-size: clamp(16px, 1.2vw, 19px);
}

.chapter-website {
  display: grid;
  grid-template-columns: minmax(250px, 0.76fr) minmax(0, 1.24fr);
  gap: clamp(34px, 6vw, 92px);
  align-items: center;
  min-height: 500px;
  padding: clamp(48px, 5vw, 74px) clamp(32px, 4vw, 62px) 34px;
  background: var(--brass-light);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chapter-website-copy {
  min-width: 0;
  max-width: 430px;
}

.chapter-website-copy h3 {
  max-width: 450px;
}

.chapter-website-detail {
  max-width: 410px;
  margin: 30px 0 0;
  padding-top: 17px;
  color: var(--muted);
  border-top: 1px solid rgba(25, 58, 50, 0.32);
  font-size: 15px;
  line-height: 1.45;
}

.chapter-website-detail strong {
  display: block;
  margin-bottom: 4px;
  color: var(--forest);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chapter-website-figure {
  min-width: 0;
  align-self: end;
  margin: 0 -2% -24px -6%;
}

.chapter-website-figure img {
  width: 165%;
  max-width: none;
  height: auto;
  display: block;
  margin-left: -60%;
}

.chapter-website-figure figcaption {
  max-width: 310px;
  margin-top: 2px;
  margin-right: 4%;
  margin-left: auto;
  text-align: right;
}

@media (max-width: 1040px) {
  .chapter-plan {
    grid-template-columns: 1fr;
  }

  .chapter-plan-copy {
    padding: 48px clamp(32px, 6vw, 64px) 42px;
  }

  .chapter-plan-spread {
    min-height: 420px;
    padding-top: 34px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .chapter-identity-figure {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .chapter-identity-figure > img {
    position: relative;
    width: 110%;
    height: auto;
    margin-left: -5%;
  }

  .chapter-identity-caption {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 560px);
    margin: 0 0 0 auto;
  }

  .chapter-website {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: 0;
    padding: 50px clamp(32px, 6vw, 64px) 32px;
  }

  .chapter-website-copy {
    max-width: 650px;
  }

  .chapter-website-figure {
    width: 100%;
    max-width: 800px;
    margin: 0 auto -18px;
  }
}

@media (max-width: 760px) {
  .chapter-section {
    padding: 76px 18px 28px;
  }

  .chapter-intro h2 {
    margin-top: 18px;
    font-size: clamp(40px, 11vw, 55px);
  }

  .chapter-intro-copy {
    margin-top: 24px;
    font-size: 17px;
  }

  .chapter-sequence {
    gap: 56px;
    margin-top: 54px;
  }

  .chapter h3 {
    font-size: clamp(36px, 10vw, 49px);
  }

  .chapter-plan-copy {
    padding: 36px 22px 31px;
  }

  .chapter-plan-copy > p:not(.chapter-stage),
  .chapter-website-copy > p:not(.chapter-stage):not(.chapter-website-detail) {
    margin-top: 22px;
    font-size: 17px;
  }

  .chapter-plan-spread {
    min-height: 0;
    padding: 27px 16px 21px;
  }

  .chapter-plan-spread::before {
    inset: 18px 18px 52px;
  }

  .chapter-plan-spread::after {
    top: 19px;
    bottom: 53px;
  }

  .chapter-plan-spread img {
    max-height: none;
  }

  .chapter-plan-spread figcaption,
  .chapter-website-figure figcaption {
    font-size: 12px;
  }

  .chapter-identity-figure > img {
    width: 118%;
    margin-left: -9%;
  }

  .chapter-identity-caption {
    width: 100%;
    padding: 26px 22px 30px;
    border-left-width: 4px;
  }

  .chapter-identity-caption h3 {
    margin-top: 16px;
    font-size: clamp(35px, 9.8vw, 48px);
  }

  .chapter-identity-caption > p:not(.chapter-stage) {
    margin-top: 20px;
    font-size: 17px;
  }

  .chapter-website {
    gap: 27px;
    padding: 37px 22px 25px;
  }

  .chapter-website-detail {
    margin-top: 25px;
    font-size: 14px;
  }

  .chapter-website-figure {
    margin-bottom: -13px;
  }

  .chapter-website-figure img {
    width: 175%;
    margin-left: -68%;
  }
}
