/* Step Ahead In Ten · free lesson pages.
   Layout and behaviour follow the learner page pattern of Simi's learning engine (reused read only,
   D-19): four parts (Explain, Show, Practice, Keep), a progress strip on phones, a contents rail on
   wide screens, a check with feedback. Colours, type and radii are this site's own (site.css).
   Radii: documents and options 12px, panels 18px, buttons pills. */

.lesson-page { max-width: 1080px; margin: 0 auto; padding-inline: var(--gutter); }
.rail { display: none; }
.lesson-body { min-width: 0; max-width: 700px; }

@media (min-width: 1100px) {
  .lesson-page { display: grid; grid-template-columns: 200px minmax(0, 700px); column-gap: 72px; justify-content: center; }
  .rail { display: block; position: sticky; top: 61px; align-self: start; padding: 56px 0 32px; }
}

/* Progress: one bar per part, filled as the reader goes */
.parts, .strip-parts { list-style: none; margin: 0; padding: 0; }
.parts li { position: relative; padding-left: 18px; margin-bottom: 4px; }
.parts .bar { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; }
.parts a, .strip-parts a { display: block; text-decoration: none; color: var(--muted); }
.parts a { padding: 8px 0; }
.pn { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.1rem; }
.parts li.on a, .parts li.done a, .strip-parts li.on a { color: var(--text); }
.bar { display: block; position: relative; overflow: hidden; border-radius: 999px; background: var(--line); }
.fill { position: absolute; inset: 0; background: var(--tomato); transform-origin: 0 0; }
.parts .fill { transform: scaleY(0); }
.strip-parts .fill { transform: scaleX(0); }

.strip {
  position: sticky; top: 61px; z-index: 10;
  margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter) 2px;
  background: var(--page); border-bottom: 1px solid var(--line);
}
.strip-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.strip-parts a { min-height: 44px; font-size: 0.95rem; }
.strip-parts .pn { font-family: inherit; font-size: inherit; font-weight: 400; }
.strip-parts li.on .pn { font-weight: 700; }
.strip-parts .bar { height: 4px; margin-bottom: 8px; }
@media (min-width: 1100px) { .strip { display: none; } }

/* Top */
.lesson-hero { padding: 36px 0 28px; }
.lesson-meta { color: var(--muted); margin-bottom: 14px; }
.lesson-hero h1 { font-size: clamp(2.1rem, 7vw, 3.2rem); margin-bottom: 16px; }
.lesson-hero .lede { font-size: 1.25rem; margin: 0; max-width: 34em; }

/* Parts */
.part { padding: 44px 0 12px; border-top: 2px solid var(--text); scroll-margin-top: 120px; }
.strip + .part { border-top: 0; }
.part h2 { margin-bottom: 22px; }
.part h3 { margin: 30px 0 10px; }
.part h2 + h3 { margin-top: 0; }
.part p { max-width: 62ch; }

/* Show: the request before and after */
.setting { color: var(--muted); }
.compare-docs { display: grid; gap: 4px 20px; }
@media (min-width: 760px) { .compare-docs { grid-template-columns: 1fr 1fr; } }
.doc-label { font-weight: 700; margin: 10px 0 6px; }
.doc { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--soft-moss); font-family: "Fraunces", Georgia, serif; font-size: 1.1rem; line-height: 1.5; }
.doc.after { background: var(--soft-saffron); }
.note { margin-top: 16px; }

/* Practice: numbered steps, words to copy, a check with feedback */
.steps { list-style: none; margin: 0 0 8px; padding: 0; }
.steps > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; margin-bottom: 18px; }
.steps .num {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
  background: var(--text); color: var(--page); font-weight: 700;
}
.steps p { margin: 4px 0 10px; }
.prompt-text { line-height: 1.6; }
mark.slot { background: var(--soft-saffron); color: inherit; padding: 0 3px; border-radius: 4px; }

.item { margin: 30px 0 8px; padding: 20px 18px; border: 2px solid var(--text); border-radius: var(--radius); background: var(--surface); }
.item h3 { margin: 0 0 8px; }
.question { font-weight: 700; font-size: 1.15rem; line-height: 1.4; }
.opts { display: grid; gap: 10px; }
.opt {
  min-height: 48px; padding: 12px 16px; text-align: left;
  border: 2px solid var(--line); border-radius: 12px; background: var(--page); color: var(--text);
  font: inherit; cursor: pointer;
}
.opt:hover { border-color: var(--text); }
.opt[aria-pressed="true"] { border-color: var(--text); background: var(--soft-saffron); }
.opt.right[aria-pressed="true"] { background: var(--soft-moss); }
.why { margin: 14px 0 0; min-height: 1.5em; }
.why b { font-weight: 700; }

/* Keep */
.keepcard { position: relative; max-width: 34rem; margin: 6px 0 22px; padding: 26px 40px; text-align: center; }
.keepcard p { margin: 0 auto; font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: clamp(1.4rem, 5.4vw, 1.9rem); line-height: 1.2; text-wrap: balance; }
.keepcard .bracket { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--tomato); }
.tomorrow { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; font-weight: 700; }
.tomorrow span { display: block; font-family: "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 1rem; font-weight: 400; color: var(--muted); }
.lesson-more { display: grid; gap: 12px; justify-items: start; margin: 22px 0 48px; }
.lesson-more p { margin: 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
