/* The same trim line runs around every spread. Each scene uses its own
   composition, with widths relative to the space between the two fixed bars. */
#story > :is(#shelf, #exercise, #inside, #faq, #purchase) {
  --trim: clamp(20px, 4.5vw, 82px);
  --spread-width: min(1440px, calc(100% - var(--trim) * 2));
  --spread-rule: color-mix(in srgb, var(--ink) 30%, transparent);
  --scene-title: clamp(48px, min(6.6vw, 12cqh), 108px);
  color: var(--ink);
  background: var(--paper);
}
:where(#story) :is(#shelf, #exercise, #inside, #faq, #purchase) h2 {
  font: 550 var(--scene-title)/0.96 var(--display, var(--sans));
  letter-spacing: -0.048em;
  word-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}
:where(#story) :is(#shelf, #exercise, #inside, #faq, #purchase) h2 em {
  color: inherit;
  font: italic 400 1.04em/0.9 var(--serif);
  letter-spacing: -0.044em;
}
#story :is(#shelf, #exercise, #inside, #faq, #purchase) :is(button, summary) {
  -webkit-tap-highlight-color: transparent;
}

/* Six bound workshop openers and the reading notes for the selected spine. */
.story-ready #shelf {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.95fr);
  grid-template-areas: "heading heading" "shelf notes";
  justify-content: stretch;
  align-content: safe center;
  align-items: center;
  gap: clamp(20px, 5.5cqh, 58px) clamp(22px, 4vw, 75px);
  padding: clamp(18px, 5cqh, 58px) max(var(--trim), calc((100% - 1440px) / 2));
}
#shelf .shelf-caption {
  grid-area: heading;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: end;
  gap: 24px;
  padding-bottom: clamp(14px, 2.5cqh, 28px);
  border-bottom: 1px solid var(--spread-rule);
}
#shelf .shelf-caption p {
  max-width: 25ch;
  font: 500 clamp(15px, 1.2vw, 19px)/1.3 var(--sans);
  color: var(--muted);
}
#shelf .shelf-scroll {
  --folio-height: clamp(195px, min(45cqh, 29vw), 445px);
  --folio-depth: clamp(30px, 3.4vw, 57px);
  grid-area: shelf;
  margin: 0;
  align-self: stretch;
  display: grid;
  align-content: center;
  min-width: 0;
  background: var(--surface, #e6e8df);
  border-bottom: 2px solid var(--ink);
}
#shelf .shelf-row {
  padding: max(16px, 3.4cqh) 20px;
  gap: clamp(6px, 0.55vw, 10px);
}
#shelf .shelf-row::before {
  bottom: 8%;
  opacity: 0.55;
}
#shelf .shelf-info {
  grid-area: notes;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: start;
  gap: clamp(17px, 3.3cqh, 37px);
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
#shelf .shelf-controller {
  order: -1;
  gap: 10px;
}
#shelf .shelf-controller button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--spread-rule);
  border-radius: 50%;
  color: var(--ink);
}
#shelf .shelf-number {
  font: 500 13px/1 var(--mono);
  color: var(--muted);
}
#shelf .shelf-description {
  grid-area: auto;
}
#shelf .shelf-description h3 {
  font: 540 clamp(26px, min(3.45vw, 6.4cqh), 55px)/1.03 var(--display, var(--sans));
  letter-spacing: -0.05em;
  text-wrap: balance;
}
#shelf .shelf-description p {
  max-width: 38ch;
  margin: 13px 0 0;
  font: 400 clamp(16px, 1.35vw, 21px)/1.45 var(--sans);
}
#shelf .shelf-read,
#purchase .buy {
  min-height: 45px;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 11px 22px;
  background: var(--ink);
  color: var(--paper);
  font: 650 16px/1.15 var(--sans);
  transition:
    color 0.18s,
    background 0.18s,
    transform 0.18s;
}
#shelf .shelf-read:hover,
#purchase .buy:hover:where(:not(:disabled)) {
  background: var(--teal);
  color: white;
  transform: translateY(-2px);
}
#shelf .shelf-read:active,
#purchase .buy:active {
  transform: translateY(1px);
}

/* A worked balance sheet occupies the left page of the dark green spread. */
#story > #exercise {
  background: var(--teal);
  color: var(--paper);
  padding-block: clamp(18px, 5cqh, 60px);
}
#exercise > .wrap {
  width: var(--spread-width);
  margin-inline: auto;
}
#exercise .exercise-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "numbers question";
  gap: clamp(30px, 6vw, 100px);
  align-items: center;
}
#exercise .question {
  grid-area: question;
}
#exercise .question h2 {
  max-width: 10ch;
  white-space: normal;
  margin: 0 0 clamp(16px, 3.6cqh, 38px);
}
#exercise .question h2 em {
  color: var(--amber);
}
#exercise .question p:not(.eyebrow) {
  margin: 0;
  max-width: 36ch;
  font: 400 clamp(17px, 1.65vw, 26px)/1.4 var(--sans);
  color: var(--paper);
}
#exercise .question p strong {
  font-weight: 650;
}
#exercise .mo-wh__text {
  --ink: var(--paper);
  --bg: var(--teal);
  --accent: var(--amber);
  letter-spacing: normal;
}
#exercise .choices {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(18px, 4cqh, 37px);
}
#exercise .choices button {
  border: 1px solid #f8f5ed8c;
  border-radius: 0;
  min-height: 44px;
  padding: 9px 15px;
  font: 550 15px/1.2 var(--sans);
  color: var(--paper);
}
#exercise .choices button:is(:hover, [aria-pressed="true"]) {
  background: var(--paper);
  color: var(--teal);
}
#exercise .snapshot {
  grid-area: numbers;
  padding: clamp(15px, 2.8vw, 47px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--paper);
  color: var(--ink);
}
#exercise .snapshot-top {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--spread-rule);
  color: var(--teal);
  font: 600 14px/1.15 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
#exercise .snapshot-top .micro {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0;
}
#exercise .snapshot-body {
  padding: clamp(20px, 6cqh, 67px) 0 clamp(14px, 2cqh, 24px);
  gap: 12px;
}
#exercise .big-value {
  font: 550 clamp(50px, min(6.7vw, 12cqh), 108px)/0.96 var(--display, var(--sans));
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
}
#exercise .big-value span {
  font-size: 0.5em;
}
#exercise .days {
  padding-left: clamp(12px, 2vw, 28px);
  border-color: var(--spread-rule);
}
#exercise .days strong {
  color: var(--teal);
  font: 520 clamp(30px, 4vw, 58px)/1 var(--display, var(--sans));
  letter-spacing: -0.08em;
}
#exercise .snapshot-body p,
#exercise .days span {
  margin: 5px 0 0;
  font: 450 clamp(12px, 1.1vw, 16px)/1.3 var(--sans);
  letter-spacing: 0;
}
#exercise .stream {
  display: block;
  margin: 0;
  width: 100%;
  height: clamp(70px, 16cqh, 172px);
}
#exercise .chart {
  padding: 8px 0 0;
}
#exercise .chart-row {
  font: 500 clamp(13px, 1.1vw, 17px)/1.25 var(--sans);
  margin: clamp(7px, 1.5cqh, 14px) 0;
}
#exercise .bar-track {
  background: #dfdfd2;
}
#exercise .adjuster {
  border-color: #f8f5ed55;
  margin-top: clamp(12px, 4cqh, 46px);
  padding-top: clamp(10px, 2cqh, 26px);
}
#exercise .exercise-end {
  color: var(--paper);
}

/* An index at the top pairs the excerpt titles with full page facsimiles. */
.story-ready #inside {
  width: 100%;
  padding: clamp(18px, 5cqh, 58px) max(var(--trim), calc((100% - 1440px) / 2));
}
#inside .section-intro {
  display: flex;
  gap: clamp(20px, 4vw, 70px);
  justify-content: space-between;
  align-items: end;
  margin: 0 0 clamp(20px, 4cqh, 46px);
}
#inside .section-intro p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font: 400 clamp(16px, 1.25vw, 20px)/1.4 var(--sans);
}
#inside .preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(17px, 2.7vw, 55px);
}
#inside .preview-card {
  display: grid;
  grid-template-areas: "meta" "title" "page";
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-content: start;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--spread-rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
#inside .preview-meta {
  grid-area: meta;
  margin: 0;
  text-align: start;
  letter-spacing: 0.025em;
  color: var(--muted);
  font: 500 clamp(11px, 0.95vw, 14px)/1.2 var(--mono);
  text-transform: none;
}
#inside .preview-name {
  grid-area: title;
  margin: 8px 0 14px;
  font: 550 clamp(20px, 2.1vw, 34px)/1.04 var(--display, var(--sans));
  letter-spacing: -0.05em;
  text-wrap: balance;
}
#inside .mini-stage {
  grid-area: page;
  height: clamp(190px, 42cqh, 480px);
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface, #e6e8df);
  place-items: center;
}
#inside .preview-card:nth-child(2) .mini-stage {
  background: #ebd8b1;
}
#inside .preview-card:nth-child(3) .mini-stage {
  background: #c4d1c4;
}
#inside .mini-stage .thumb-page {
  width: auto;
  min-height: 0;
  height: 91%;
  max-width: 88%;
  padding: 0;
  aspect-ratio: 612/792;
  transform: none;
  box-shadow: 2px 5px 12px #20221d25;
  transition: transform 0.24s ease;
}
#inside .mini-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#inside .preview-card:hover .thumb-page {
  transform: scale(1.025);
}
#inside .preview-card .zoom {
  border-color: transparent;
  background: var(--ink);
  color: var(--paper);
  right: 8px;
  bottom: 8px;
}

/* The blank worksheet sits opposite the four practical buying questions. */
.story-ready #faq {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-content: safe center;
  align-items: center;
  gap: clamp(24px, 6vw, 100px);
  padding: clamp(16px, 5cqh, 58px) max(var(--trim), calc((100% - 1440px) / 2));
}
#story > #faq {
  background: var(--surface, #e6e8df);
}
#faq .faq-heading h2 {
  margin: 0 0 clamp(15px, 4cqh, 40px);
}
#faq .faq-sheet {
  height: clamp(128px, 34cqh, 350px);
  overflow: hidden;
  border-bottom: 1px solid var(--spread-rule);
  background: #d0d8cc;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(14px, 3cqh, 30px) 10% 0;
}
#faq .faq-sheet img {
  width: 100%;
  max-width: 420px;
  height: auto;
  box-shadow: 1px 5px 15px #20221d24;
}
#faq .faq-list details {
  border-color: var(--spread-rule);
}
#faq .faq-list summary {
  min-height: 52px;
  padding: clamp(15px, 3.3cqh, 35px) 0;
  align-items: center;
  font: 550 clamp(19px, 1.9vw, 30px)/1.15 var(--display, var(--sans));
  letter-spacing: -0.035em;
}
#faq .faq-list summary::after {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--spread-rule);
  display: grid;
  place-content: center;
  font: 400 21px/1 var(--sans);
  color: var(--teal);
}
#faq .faq-list p {
  font: 400 clamp(15px, 1.2vw, 19px)/1.5 var(--sans);
  max-width: 54ch;
}

/* The product in use closes the book. Keep a full-bleed photograph on one
   side, and the decision, price and digital delivery detail on the other. */
.story-ready #purchase {
  display: grid;
  padding: 0;
  justify-content: stretch;
  align-items: stretch;
}
#purchase .final-grid {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}
#purchase .order-art {
  min-height: 0;
}
#purchase .order-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% center;
}
#purchase .order-copy {
  align-self: center;
  padding: clamp(18px, 4cqh, 48px) var(--trim);
}
#purchase .order-copy h2 {
  max-width: 12ch;
  margin: 0 0 clamp(18px, 3.8cqh, 39px);
  font-size: clamp(47px, min(6vw, 12.5cqh), 92px);
}
#purchase .order-copy > p:not(.purchase-detail) {
  max-width: 42ch;
  color: var(--muted);
  font: 400 clamp(16px, 1.4vw, 22px)/1.5 var(--sans);
  margin: 0;
}
#purchase .order-copy .purchase-action {
  margin: clamp(18px, 4.3cqh, 44px) 0 10px;
}
#purchase .purchase-detail {
  font: 500 clamp(11px, 1.05vw, 15px)/1.35 var(--sans);
  color: var(--muted);
  margin: 0;
}

#purchase .order-art {
  position: relative;
  margin: 0;
  overflow: hidden;
}
#purchase .order-art img {
  position: absolute;
  inset: 0;
}

@media (min-width: 701px) {
  /* Shared text rows align the top and bottom of all three actual pages,
     including when one excerpt title wraps. */
  #inside .preview-grid {
    grid-template-rows: repeat(3, auto);
    row-gap: 0;
  }
  #inside .preview-card {
    grid-row: span 3;
    grid-template-rows: subgrid;
  }
}

@media (max-width: 700px) {
  #story > :is(#shelf, #exercise, #inside, #faq, #purchase) {
    --trim: clamp(16px, 5vw, 28px);
    --scene-title: clamp(35px, min(11.7vw, 8.8cqh), 61px);
  }
  .story-ready #shelf {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "shelf" "notes";
    align-items: start;
    gap: min(2.5cqh, 20px);
    padding: min(3.2cqh, 25px) var(--trim);
  }
  #shelf .shelf-caption {
    display: block;
    padding-bottom: 0;
    border: 0;
  }
  #shelf .shelf-caption p {
    max-width: none;
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.28;
  }
  #shelf .shelf-scroll {
    --folio-height: clamp(145px, min(36.5cqh, 64vw), 330px);
    --folio-depth: clamp(29px, 7vw, 43px);
    margin: 0 calc(-1 * var(--trim));
    padding: 0;
  }
  #shelf .shelf-row {
    padding: min(2.2cqh, 18px) var(--trim);
  }
  #shelf .shelf-info {
    grid-template-columns: 1fr auto;
    grid-template-areas: "description description" "control read";
    align-items: center;
    gap: min(2cqh, 16px) 10px;
    padding: 0;
  }
  #shelf .shelf-description {
    grid-area: description;
  }
  #shelf .shelf-controller {
    grid-area: control;
  }
  #shelf .shelf-read {
    grid-area: read;
  }
  #shelf .shelf-description h3 {
    font-size: clamp(23px, 6vw, 33px);
    text-wrap: initial;
  }
  #shelf .shelf-description p {
    margin-top: 6px;
    max-width: none;
    font-size: 15px;
    line-height: 1.35;
  }

  #story > #exercise {
    padding-block: min(3.4cqh, 28px);
  }
  #exercise .exercise-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "question" "numbers";
    gap: min(3cqh, 22px);
  }
  #exercise .question h2 {
    max-width: none;
    margin-bottom: min(2cqh, 14px);
  }
  #exercise .question p:not(.eyebrow) {
    max-width: none;
    font-size: clamp(16px, 4.2vw, 22px);
    line-height: 1.35;
  }
  #exercise .choices {
    margin-top: 14px;
  }
  #exercise .choices button {
    padding-inline: 10px;
    font-size: 14px;
  }
  #exercise .snapshot {
    padding: clamp(13px, 4vw, 24px);
  }
  #exercise .snapshot-body {
    padding: min(3.1cqh, 23px) 0 min(1.8cqh, 15px);
  }
  #exercise .big-value {
    font-size: clamp(48px, min(15vw, 9cqh), 74px);
  }
  #exercise .stream {
    height: clamp(41px, 10.5cqh, 82px);
  }
  #exercise .chart-row {
    margin: 7px 0;
  }

  .story-ready #inside {
    padding: min(3.6cqh, 28px) var(--trim);
  }
  #inside .section-intro {
    display: block;
    margin-bottom: min(4cqh, 26px);
  }
  #inside .section-intro p {
    max-width: 44ch;
    margin-top: 12px;
    font-size: clamp(15px, 3.9vw, 18px);
    line-height: 1.4;
  }
  #inside .preview-grid {
    grid-template-columns: 1fr;
    gap: min(2cqh, 15px);
  }
  #inside .preview-card {
    grid-template-areas: "meta page" "title page";
    grid-template-columns: minmax(0, 1fr) 31%;
    grid-template-rows: auto auto;
    column-gap: clamp(10px, 4vw, 20px);
    align-content: center;
    padding: min(2cqh, 12px) 0 0;
  }
  #inside .preview-meta {
    align-self: end;
  }
  #inside .preview-name {
    margin: 5px 0 0;
    align-self: start;
    font-size: clamp(21px, min(6.5vw, 4.5cqh), 30px);
    text-wrap: initial;
  }
  #inside .mini-stage {
    height: clamp(66px, min(12cqh, 27vw), 106px);
  }
  #inside .preview-card .zoom {
    width: 22px;
    height: 22px;
    right: 3px;
    bottom: 3px;
  }
  .story-ready #faq {
    grid-template-columns: 1fr;
    gap: min(3.5cqh, 30px);
    padding: min(3.6cqh, 28px) var(--trim);
  }
  #faq .faq-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(78px, 0.57fr);
    align-items: center;
    gap: 18px;
  }
  #faq .faq-heading h2 {
    margin: 0;
    text-align: left;
  }
  #faq .faq-sheet {
    height: clamp(65px, 16cqh, 135px);
    padding: 7px 6px 0;
  }
  #faq .faq-list summary {
    min-height: 48px;
    font-size: clamp(19px, 5vw, 25px);
    padding: min(2.1cqh, 19px) 0;
  }

  #purchase .final-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(74px, 1fr);
  }
  #purchase .order-copy {
    grid-row: 1;
    padding: clamp(20px, 5.8cqh, 56px) var(--trim);
  }
  #purchase .order-copy h2 {
    max-width: 16ch;
    margin-bottom: 14px;
    font-size: var(--scene-title);
    text-wrap: initial;
  }
  #purchase .order-copy > p:not(.purchase-detail) {
    max-width: 47ch;
    font-size: clamp(15px, 4vw, 19px);
    line-height: 1.43;
  }
  #purchase .order-copy .purchase-action {
    margin: min(3.4cqh, 24px) 0 7px;
  }
  #purchase .order-art {
    grid-row: 2;
    min-height: 74px;
  }
  #purchase .order-art img {
    object-position: 50% 53%;
  }
}

@media (max-width: 700px) and (max-height: 680px) {
  #story > :is(#shelf, #exercise, #inside, #faq, #purchase) {
    --scene-title: clamp(31px, min(10.4vw, 8.1cqh), 47px);
  }
  .story-ready #shelf {
    padding-block: 8px;
    gap: 8px;
  }
  #shelf .shelf-caption p {
    font-size: 13px;
    margin-top: 3px;
  }
  #shelf .shelf-scroll {
    --folio-height: clamp(116px, min(27.5cqh, 58vw), 163px);
    --folio-depth: 26px;
  }
  #shelf .shelf-row {
    padding-block: 10px;
  }
  #shelf .folio-spine {
    padding-block: 7px;
  }
  #shelf .folio-name {
    font-size: 14px;
  }
  #shelf .shelf-description h3 {
    font-size: 21px;
  }
  #shelf .shelf-description p {
    font-size: 14px;
    margin-top: 4px;
  }
  #shelf .shelf-info {
    row-gap: 6px;
  }
  #shelf .shelf-controller button {
    width: 44px;
    height: 44px;
  }
  #shelf .shelf-read {
    padding: 9px 15px;
    font-size: 14px;
  }
  #exercise .choices {
    gap: 6px;
    margin-top: 10px;
  }
  #exercise .choices button {
    padding-inline: 9px;
    font-size: 13px;
  }
  #exercise .snapshot-top {
    padding-bottom: 7px;
  }
  #inside .section-intro {
    margin-bottom: 13px;
  }
  #inside .section-intro p {
    margin-top: 6px;
    font-size: 14px;
  }
  #inside .preview-grid {
    gap: 7px;
  }
  #inside .preview-card {
    padding-top: 6px;
  }
  #inside .mini-stage {
    height: clamp(53px, 11.5cqh, 73px);
  }
  #inside .preview-name {
    font-size: 20px;
  }
  #purchase .order-copy {
    padding-block: min(4.2cqh, 22px);
  }
  #purchase .order-copy h2 {
    margin-bottom: 9px;
  }
  #purchase .order-copy .purchase-action {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #inside .preview-card .thumb-page,
  #shelf .shelf-read,
  #purchase .buy {
    transition: none;
  }
}
