/* The 45-minute lesson on a projector (school-lesson.html). Loaded after school-pages.css and uses the same colours,
   restated here so this file stands alone.

   SIZED BY THE SCREEN'S HEIGHT, NOT ITS WIDTH, AND NEVER WIDER THAN 34em. At 1920 a 62em measure ran 146 characters
   a line, too long to follow from the back of a room. A slide must fit a 1024x768 or 1280x800 projector (both common in
   classrooms) and a 1920x1080 one with no scrollbar, and a short screen is what runs out first. So type is set in vh with
   a floor: read-aloud text never drops below 26px and the smallest line (a source) below 20px, which
   test/lesson.e2e.mjs measures at all three sizes.

   A BRIGHT ROOM WASHES OUT A DARK SLIDE. "Light screen" (L) swaps to dark ink on paper. It is not remembered: the lesson
   keeps nothing between visits, and one key press costs less than a promise about storage. */

:root {
  --ls-ink: #F4F6F0; --ls-dim: #C3CABA; --ls-bg: #080A07; --ls-panel: #111711; --ls-line: #2A3224;
  --ls-gold: #D8B76E; --ls-green: #8FC9A8;
  --ls-serif: "EB Garamond", Georgia, serif;
  --ls-ui: "Jost", system-ui, sans-serif;
  --ls-read: max(26px, 3.4vh);
  --ls-small: max(20px, 2.4vh);
  --ls-h: max(34px, 5vh);
}
.ls-light {
  --ls-ink: #14170F; --ls-dim: #3F4636; --ls-bg: #FAF8F1; --ls-panel: #FFFFFF; --ls-line: #C9C4B2;
  --ls-gold: #7A5A12; --ls-green: #1F5E3D;
}

.ls-body { background: var(--ls-bg); color: var(--ls-ink); font: 400 var(--ls-read)/1.38 var(--ls-serif); margin: 0; }
.ls-body a { color: var(--ls-green); }

.ls-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 1.4rem;
  border-bottom: 1px solid var(--ls-line); font: 500 var(--ls-small)/1.2 var(--ls-ui); }
.ls-brand { color: var(--ls-ink) !important; text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.ls-brand span { font-weight: 400; color: var(--ls-dim); margin-left: .6em; }
.ls-count { color: var(--ls-dim); }
.ls-tools { display: flex; gap: .5rem; }
.ls-tool, .ls-step { font: 500 var(--ls-small)/1 var(--ls-ui); min-height: 44px; padding: .35em .9em; border-radius: 6px;
  border: 1px solid var(--ls-line); background: var(--ls-panel); color: var(--ls-ink); cursor: pointer; }
.ls-tool[aria-pressed="true"] { border-color: var(--ls-gold); }
.ls-step:disabled { opacity: .35; cursor: default; }
.ls-tool:focus-visible, .ls-step:focus-visible, .ls-body a:focus-visible { outline: 3px solid var(--ls-gold); outline-offset: 2px; }

.ls-deck { max-width: 34em; margin: 0 auto; padding: 0 1.4rem; }
.ls-slide { padding: 1.6rem 0 2rem; border-bottom: 1px solid var(--ls-line); }
.ls-slide h1, .ls-slide h2 { font: 600 var(--ls-h)/1.12 var(--ls-serif); margin: .1em 0 .45em; }
.ls-slide h1:focus, .ls-slide h2:focus { outline: none; }
.ls-slide p { margin: 0 0 .5em; }
.ls-kicker { font: 600 var(--ls-small)/1.2 var(--ls-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ls-gold); }
.ls-src { font: 400 var(--ls-small)/1.25 var(--ls-ui); color: var(--ls-dim); margin: -.3em 0 .65em !important; }
.ls-src::before { content: "Source: "; }
.ls-help { font-size: calc(var(--ls-read) * .92); color: var(--ls-dim); border-left: 4px solid var(--ls-line); padding-left: .6em; }
.ls-you { font: 400 var(--ls-small)/1.35 var(--ls-ui); color: var(--ls-dim); border-top: 1px solid var(--ls-line);
  padding-top: .6em; margin-top: .9em !important; }
.ls-you::before { content: "For you: "; font-weight: 600; color: var(--ls-gold); }
.ls-list { margin: 0 0 .6em; padding-left: 1.2em; }
.ls-list li { margin: 0 0 .35em; }
.ls-teacher .ls-list { font-size: calc(var(--ls-read) * .9); }
.ls-tm { font: 400 var(--ls-small)/1.3 var(--ls-ui); color: var(--ls-dim); margin-top: .5em !important; }
.ls-srcs { font: 400 var(--ls-small)/1.3 var(--ls-ui) !important; overflow-wrap: anywhere; }
.ls-plan { border-collapse: collapse; font-size: calc(var(--ls-read) * .92); margin-bottom: .4em; }
.ls-plan th { text-align: left; font: 600 var(--ls-small)/1.2 var(--ls-ui); color: var(--ls-gold); padding: .2em 1em .2em 0; white-space: nowrap; }
.ls-plan td { padding: .2em 0; }
.ls-big { font-size: max(52px, 9vh) !important; }
.ls-lede { font-size: calc(var(--ls-read) * 1.2); }
.ls-quiet, .ls-limit { color: var(--ls-dim); font-style: italic; }
.ls-q { font-size: max(40px, 6.5vh) !important; max-width: 20em; }
.ls-q2 { font-size: calc(var(--ls-read) * 1.15); font-weight: 600; margin-top: .6em !important; }
.ls-go { margin: .8em 0 !important; }
.ls-go .sc-btn { font-size: var(--ls-read); min-height: 64px; padding: .45em 1.2em; }
.ls-nav { display: none; }
.ls-foot { max-width: 62em; margin: 0 auto; padding: 1rem 1.4rem 2rem; font-size: var(--ls-small); }

/* With the script: one slide fills the screen, the steps sit at the bottom, the footer waits for the last slide. */
.ls-js .ls-body { min-height: 100vh; display: flex; flex-direction: column; }
.ls-js .ls-deck { flex: 1; display: flex; width: 100%; }
.ls-js .ls-slide { display: none; border: 0; padding: 2.2vh 0 1vh; width: 100%; }
.ls-js .ls-slide.on { display: flex; flex-direction: column; justify-content: center; }
.ls-js .ls-title.on { justify-content: center; }
.ls-js .ls-nav { display: flex; justify-content: space-between; max-width: 34em; width: 100%; margin: 0 auto; padding: .4rem 1.4rem 1rem; }
.ls-js .ls-foot { display: none; }

/* A phone is not the target, but it must still work: let a long slide scroll rather than clip. */
@media (max-width: 700px) {
  :root { --ls-read: 20px; --ls-small: 16px; --ls-h: 28px; }
  .ls-big { font-size: 40px !important; } .ls-q { font-size: 30px !important; }
  .ls-js .ls-slide.on { justify-content: flex-start; }
  .ls-bar { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .ls-js .ls-slide.on { animation: ls-in .25s ease-out; }
  @keyframes ls-in { from { opacity: 0; } to { opacity: 1; } }
}
