/* The real-lesson panel on /schools/ (section#lesson, 12 Nov 2026): three
   figures from a Year 8 lesson, then the lesson clock as their proof. Drawn
   from the page's own tokens (css/home.css). The clock's finished picture is
   in the page; js/lesson.js only plays it. A photo and a quote can be
   switched on later (see the note in the page): the two-column layout below
   keys off the photo being there. Screen only, the section is .no-print. */

.lsn-sec { padding-top: 8px; }
.lsn {
  --green: #4ade80;
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "media" "label" "quote" "figs" "clock" "close";
  padding: 34px 40px 30px;
  border: 1px solid rgba(140, 217, 255, 0.24); border-radius: 18px;
  background:
    radial-gradient(640px 220px at 0% 0%, rgba(74, 222, 128, 0.06), rgba(74, 222, 128, 0) 70%),
    linear-gradient(180deg, rgba(140, 217, 255, 0.045), rgba(140, 217, 255, 0.015)),
    #0e1125;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 50px rgba(140, 217, 255, 0.07);
}

/* The label: a lit green stud says this one is real, not the demo. */
.lsn .lsn-label {
  grid-area: label;
  display: flex; align-items: center; gap: 10px; margin: 0 0 24px;
  font-size: 13px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--ink);
}
.lsn-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16), 0 0 12px rgba(74, 222, 128, 0.8); }

.lsn .lsn-close {
  grid-area: close;
  margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.55; color: var(--ink-2);
}

/* ---- The three figures ---- */
.lsn-figs { grid-area: figs; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.lsn-fig { margin: 0; padding: 2px 28px 0; border-left: 1px solid var(--line); }
.lsn-fig:first-child { padding-left: 0; border-left: 0; }
.lsn-fig dt {
  margin: 0 0 8px; white-space: nowrap;
  font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; font-variant-numeric: tabular-nums;
  color: var(--bolt); text-shadow: 0 0 26px rgba(140, 217, 255, 0.38);
}
.lsn-fig dt small { font-size: 0.42em; font-weight: 700; letter-spacing: 0; }
.lsn-fig.done dt { color: var(--green); text-shadow: 0 0 26px rgba(74, 222, 128, 0.36); }
.lsn-fig dd { margin: 0; max-width: 22ch; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.lsn .ds { display: none; }

/* ---- The lesson clock: two tracks on a computer, one rail on a phone ---- */
.lsn-clock { grid-area: clock; min-width: 0; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.lsn-clock svg { display: block; overflow: visible; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-variant-numeric: tabular-nums; }
.lsn-clock .lsn-h { width: calc(100% - 40px); margin: 0 20px; }
.lsn-clock .lsn-v { display: none; width: 100%; }
@media (max-width: 739px) {
  .lsn-clock .lsn-h { display: none; }
  .lsn-clock .lsn-v { display: block; }
}
.lsn-clock .ttl { fill: var(--ink); font-size: 15px; font-weight: 700; }
.lsn-clock .ttl.g { fill: var(--green); }
.lsn-clock .cap { fill: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.lsn-clock .sub { fill: var(--ink-3); font-size: 13px; font-weight: 600; }
.lsn-clock .tick { stroke: rgba(140, 217, 255, 0.35); stroke-width: 1; }
.lsn-clock .tlab { fill: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.lsn-clock .axis { stroke: rgba(140, 217, 255, 0.3); stroke-width: 1; }
.lsn-clock .rail { stroke: rgba(140, 217, 255, 0.12); stroke-width: 2; stroke-linecap: round; }
.lsn-clock .jd { fill: var(--bolt); filter: drop-shadow(0 0 5px rgba(140, 217, 255, 0.7)); }
.lsn-clock .pd-o { fill: none; stroke: #5a6190; stroke-width: 1.5; }
.lsn-clock .pd { fill: var(--green); filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.7)); }
.lsn-clock .pulse { fill: none; stroke: var(--green); stroke-width: 1.5; }
.lsn-clock .mk { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 3 4; }
.lsn-clock .mk-lab { fill: var(--ink); font-size: 14px; font-weight: 700; }
.lsn-clock .ph { stroke: var(--bolt); stroke-width: 1.5; }
.lsn-clock .ph-lab { fill: var(--bolt); font-size: 12.5px; font-weight: 700; }

/* ---- Later: the photo and the quote, only once they are in the page ---- */
.lsn-media { grid-area: media; margin: 0 0 22px; }
.lsn-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 1px solid rgba(140, 217, 255, 0.24); }
.lsn-quote { grid-area: quote; margin: 0 0 26px; }
.lsn-quote p { margin: 0 0 10px; font-size: 23px; line-height: 1.38; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.lsn-quote cite { font-style: normal; font-size: 14px; font-weight: 600; color: var(--ink-3); }

@media (min-width: 900px) {
  /* Photo beside the label, quote and figures; the clock full width under. */
  .lsn:has(> .lsn-media) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 44px;
    grid-template-rows: 1fr auto auto auto 1fr auto auto;
    grid-template-areas: "media ." "media label" "media quote" "media figs" "media ." "clock clock" "close close";
  }
  .lsn:has(> .lsn-media) .lsn-media { align-self: center; margin: 0; }
  .lsn:has(> .lsn-media) .lsn-fig dt { font-size: 40px; }
  .lsn:has(> .lsn-media) .lsn-fig { padding: 0 18px; }
  .lsn:has(> .lsn-media) .lsn-fig:first-child { padding-left: 0; }
  .lsn:has(> .lsn-media) .lsn-fig dd { font-size: 14.5px; }
  .lsn:has(> .lsn-media) .lsn-clock { margin-top: 30px; }
}

/* Phones and narrow tablets: the three figures in one compact row, short captions. */
@media (max-width: 760px) {
  .lsn-figs { grid-template-columns: repeat(3, max-content); justify-content: space-between; }
  .lsn-fig { padding: 0 0 0 14px; }
  .lsn-fig:first-child { padding-left: 0; }
  .lsn-fig dt { font-size: 27px; margin-bottom: 3px; text-shadow: 0 0 16px rgba(140, 217, 255, 0.36); }
  .lsn-fig.done dt { text-shadow: 0 0 16px rgba(74, 222, 128, 0.34); }
  .lsn-fig dd { font-size: 13px; line-height: 1.35; white-space: nowrap; }
  .lsn .dl { display: none; }
  .lsn .ds { display: inline; }
  .lsn-clock { margin-top: 18px; padding-top: 18px; }
  .lsn .lsn-close { margin-top: 14px; padding-top: 14px; }
}
@media (max-width: 600px) {
  .lsn-sec { padding-top: 0; }
  .lsn { padding: 24px 20px 22px; border-radius: 16px; }
  .lsn .lsn-label { margin-bottom: 18px; font-size: 12px; letter-spacing: 1.5px; }
  .lsn .lsn-close { font-size: 15px; }
  .lsn-quote p { font-size: 20px; }
  .lsn-quote { margin-bottom: 20px; }
  .lsn-media { margin: -6px -6px 20px; }
  .lsn-clock .ttl { font-size: 14px; }
}
