.lesson-passage {
  --descent: 1;
  position: relative; isolation: isolate; overflow: clip;
  background: radial-gradient(ellipse at 20% 100%, #496849, #284b39 66%);
  color: #f8eed8;
}
.passage-inner {
  display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
  align-items: center; gap: 30px; max-width: 1240px; margin: auto;
  min-height: 315px; padding: 30px 42px 0;
}
.passage-copy { position: relative; z-index: 1; padding-bottom: 29px; }
.passage-copy .section-label { color: #ccdac0; margin-bottom: 10px; }
.passage-copy h2 { font: 400 clamp(34px, 4.7vw, 67px)/1.2 var(--heading); color: #f9eed6; }
.passage-link {
  display: inline-flex; align-items: center; gap: 19px; padding: 9px 0; min-height: 44px;
  color: #f9e7b5; border-bottom: 1px solid #c8d5ad; margin-top: 13px; font-size: .84rem;
}
.passage-link:hover span:last-child { transform: translateY(4px); }
.passage-link span:last-child { transition: transform .25s; }
.passage-link:focus-visible { outline-color: #f9e7b5; }
.stair-graphic {
  width: 100%; height: auto; align-self: end; max-height: 340px; display: block;
  transform-origin: center bottom; transform: translateY(calc((1 - var(--descent)) * 22px)) scale(calc(.9 + var(--descent) * .1));
}
.stair-route { stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--descent) * 100); }
.stair-light { opacity: calc(.14 + var(--descent) * .26); }
.experiment { isolation: isolate; }
.experiment::before { z-index: -1; pointer-events: none; }
.experiment-inner { grid-template-areas: "copy demo" "links demo"; row-gap: 12px; }
.experiment-copy { grid-area: copy; align-self: end; }
.experiment-actions { grid-area: links; align-self: start; }
.experiment-actions .lab-library-link { display: flex; width: max-content; max-width: 100%; margin-top: 3px; }
.home-demo {
  grid-area: demo;
  background: #fffdf4; border: 1px solid #d8dcc6; border-radius: 17px 17px 29px 17px;
  padding: clamp(16px, 2.7vw, 28px); box-shadow: 0 17px 44px #30452914; min-width: 0;
}
.demo-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 12px;
  padding-bottom: 12px; border-bottom: 1px solid #e3e0ce; color: #52684b; font-size: .79rem;
}
.demo-header span:first-child { font-weight: 500; color: #365840; }
.demo-header span:last-child { font-size: .71rem; }
.demo-controls { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.demo-option {
  min-height: 44px; padding: 8px 13px; border: 1px solid #bfccb2; border-radius: 9px;
  background: #f4f5e9; color: #31503d; font-size: .84rem; cursor: pointer;
  transition: transform .2s, background-color .25s;
}
.demo-option:hover { transform: translateY(-2px); background: #e5ecd9; }
.demo-option[aria-pressed=true] { color: #fffbee; background: #2c563e; border-color: #2c563e; }
.demo-option[data-nasb=after][aria-pressed=true] { background: #8a3b22; border-color: #8a3b22; }
.demo-option[data-result=correct] { background: #dbe9d2; border-color: #728f5e; }
.demo-option[data-result=wrong] { background: #f6e9d1; border-color: #b89155; }
.demo-paper {
  padding: 19px 16px 14px; background: linear-gradient(155deg, #f1ecd8, #faf7e9);
  border: 1px solid #ddd6ba; border-radius: 10px 10px 23px 10px;
}
.demo-phrase {
  min-height: 103px; align-content: center; text-align: center; color: #2b4536;
  font: 400 clamp(33px, 4.1vw, 57px)/1.75 var(--heading);
}
.demo-phrase.is-changing { animation: show-phrase .42s cubic-bezier(.16, 1, .3, 1); }
@keyframes show-phrase { from { opacity: .55; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.home-demo[data-state=after] .demo-phrase .word-hotspot:not(.has-ending) { background: #f1d59c; color: #65461b; box-shadow: inset 0 -2px #b58945; }
.vowel-compare { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: .74rem; }
.vowel-compare > span:not(:nth-child(2)) {
  display: flex; gap: 6px; align-items: center; border: 1px solid transparent; border-radius: 20px;
  padding: 3px 8px; color: #5b654e;
}
.vowel-compare b { font: 500 1.2rem/1.25 var(--body); }
.home-demo[data-state=before] .compare-before { background: #e4ebd7; border-color: #9eb38c; color: #214d37; }
.home-demo[data-state=after] .compare-after { background: #f5e3ce; border-color: #c18c68; color: #813a24; }
.demo-instruction { margin-top: 10px; color: #54644e; font-size: .77rem; line-height: 1.8; }
.demo-check { margin-top: 13px; border-top: 1px solid #e3e0ce; }
.demo-check summary {
  display: flex; justify-content: space-between; list-style: none; cursor: pointer; padding-top: 8px;
  min-height: 44px; color: #335440; font-size: .83rem;
}
.demo-check summary::-webkit-details-marker { display: none; }
.demo-check[open] summary span { transform: rotate(180deg); }
.demo-check p { color: #394f3d; font-size: .89rem; }
.demo-check .demo-controls { margin-block: 10px; }
.demo-check .demo-controls button { font: 400 1.28rem var(--heading); }
.demo-feedback { min-height: 24px; }
@media (max-width: 760px) {
  .passage-inner { grid-template-columns: 1fr; min-height: 0; gap: 0; padding: 28px 22px 0; }
  .passage-copy { padding-bottom: 6px; }
  .passage-copy h2 { font-size: 44px; }
  .stair-graphic { max-height: 215px; }
  .experiment-inner { grid-template-areas: "copy" "demo" "links"; row-gap: 24px; padding-block: 40px; }
  .experiment-copy h2 br { display: none; }
  .experiment-copy h2 em::before { content: " "; }
  .experiment-copy > p:not(.section-label) { margin-top: 12px; }
  .demo-phrase { min-height: 88px; }
}
@media (max-width: 390px) {
  .passage-copy h2 { font-size: 37px; }
  .demo-paper { padding-inline: 8px; }
  .demo-phrase { font-size: clamp(27px, 8.6vw, 34px); }
}
@media (prefers-reduced-motion: reduce) {
  .lesson-passage { --descent: 1 !important; }
  .stair-graphic { transform: none; }
}
