/* The lessons arriving (tools/courses/render/new_lessons.py; design rounds docs/design/courses-2026-11/new-lessons/, the
   pick of round 3, "the week as the quarry cut"): the "New lessons" section (no line under the lead, the owner, 1 Dec 2026): the newest lesson
   opened at its first level, "In plain words", in the stone panel of the front page's lesson preview, then the week as the
   front page's quarry diagram, one band a day stepping in. The front page carries it after its hero; the catalogue carries
   it compact in the filters' column. The Readability figures of the round's FEATURES.md: the ink at 12:1 or more on every
   ground it meets (stone, bands, page), the quiet tones at 7:1 or more; titles and body 18 px, nothing under 15 px. */
.new-lessons {
  --nl-ink: #111610;
  --nl-quiet: #3D4540;
  --nl-mark: #154828;
  --nl-rule: #5E5950;
  --nl-stone: #E4DDD1;
  --nl-on-mark: #FFFFFF;
  --nl-on-band: #2E3631;
  --nl-band-1: #DCEEE3; --nl-band-2: #CFE7D8; --nl-band-3: #C3E0CE; --nl-band-4: #B6DAC4;
}
:root[data-theme=sepia] .new-lessons { --nl-stone: #EDE5D6; }
:root[data-theme=dark] .new-lessons {
  --nl-ink: #F4F5F0;
  --nl-quiet: #C6CDD7;
  --nl-mark: #8FD6A9;
  --nl-rule: #8B97A8;
  --nl-stone: #1A212C;
  --nl-on-mark: #0C1017;
  --nl-on-band: #D3D9E1;
  --nl-band-1: #16291F; --nl-band-2: #1A3326; --nl-band-3: #16291F; --nl-band-4: #1A3326;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .new-lessons {
    --nl-ink: #F4F5F0;
    --nl-quiet: #C6CDD7;
    --nl-mark: #8FD6A9;
    --nl-rule: #8B97A8;
    --nl-stone: #1A212C;
    --nl-on-mark: #0C1017;
    --nl-on-band: #D3D9E1;
    --nl-band-1: #16291F; --nl-band-2: #1A3326; --nl-band-3: #16291F; --nl-band-4: #1A3326;
  }
}

/* Words on the page's own ground take the host page's tones where it has them (--lp-*, the hand front page, whose looks
   follow its own rules), else this sheet's. */

.new-lessons { color: var(--nl-ink); font-family: "Hanken Grotesk", sans-serif; font-size: 18px; line-height: 1.5; }
.new-lessons h2 { margin: 0 0 18px; color: var(--lp-ink, var(--nl-ink)); font-size: 30px; line-height: 1.15; font-weight: 650; letter-spacing: 0; }
.new-lessons .nl-lay { display: grid; gap: 28px; }
.new-lessons a { color: var(--nl-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.new-lessons a:hover { text-decoration-thickness: 2px; }
.new-lessons a:focus-visible { outline: 3px solid var(--nl-mark); outline-offset: 2px; border-radius: 3px; }

/* The newest lesson, in the stone panel of the front page's own lesson preview. */
.new-lessons .nl-newest { margin: 0; padding: 22px 20px 20px; background: var(--nl-stone); border-radius: 8px; }
.new-lessons .nl-meta { margin: 6px 0 0; color: var(--nl-quiet); font-size: 15px; line-height: 1.4; }
.new-lessons .nl-title { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 650; }
.new-lessons .nl-courses { color: var(--nl-on-band); }
.new-lessons .nl-title a { text-decoration-thickness: 2px; text-underline-offset: 5px; }
.new-lessons .nl-level { margin: 16px 0 0; display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 1.4; font-weight: 650; }
.new-lessons .nl-one {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--nl-mark); color: var(--nl-on-mark); font-size: 15px; font-weight: 650;
}
/* The newest lesson's own picture when it is a card of key points: its first three, on the band green of level 1. */
.new-lessons .nl-points { margin: 14px 0 0; padding: 12px 16px 12px 34px; background: var(--nl-band-1); border-left: 2px solid var(--nl-rule); }
.new-lessons .nl-points li { margin: 0; padding-block: 2px; font-size: 18px; line-height: 1.45; }
.new-lessons .nl-points li::marker { color: var(--nl-ink); }
.new-lessons .nl-plain { margin: 6px 0 0; font-size: 18px; line-height: 1.55; max-width: 62ch; }
.new-lessons .nl-start { margin: 6px 0 0; }
.new-lessons .nl-start a { display: inline-block; padding-block: 10px; font-weight: 650; text-decoration: none; }
.new-lessons .nl-start a:hover { text-decoration: underline; }

/* The week as one column of bands: one band a day, newest at the top, the greens alternating, one frame round them all.
   The day and its count are quiet; the lessons lead. (The bands stepped in like the hero's quarry cut until 30 Nov 2026,
   when the owner found the staircase "really weird".) */
.new-lessons .nl-days { margin: 0; padding: 0; list-style: none; }
.new-lessons .nl-day {
  margin: 0; padding: 10px 14px 8px;
  background: var(--nl-band, var(--nl-band-1)); border-inline: 2px solid var(--nl-rule);
}
.new-lessons .nl-day:first-child { border-top: 2px solid var(--nl-rule); }
.new-lessons .nl-day:last-child { border-bottom: 2px solid var(--nl-rule); }
.new-lessons .nl-day:nth-child(1) { --nl-band: var(--nl-band-1); }
.new-lessons .nl-day:nth-child(2) { --nl-band: var(--nl-band-2); }
.new-lessons .nl-day:nth-child(3) { --nl-band: var(--nl-band-3); }
.new-lessons .nl-day:nth-child(4) { --nl-band: var(--nl-band-4); }
/* A week of more days goes on alternating the greens, so no two days in a row share a band. */
.new-lessons .nl-day:nth-child(5) { --nl-band: var(--nl-band-3); }
.new-lessons .nl-day:nth-child(6) { --nl-band: var(--nl-band-4); }
.new-lessons .nl-day:nth-child(n+7) { --nl-band: var(--nl-band-3); }
.new-lessons .nl-when { margin: 0; color: var(--nl-on-band); font-size: 15px; line-height: 1.4; }
.new-lessons .nl-lessons { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; column-gap: 20px; }
.new-lessons .nl-lessons li { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* Each link is a 44 px row on a phone (the owner's target size). */
.new-lessons .nl-lessons a { display: inline-block; padding-block: 10px; font-size: 18px; line-height: 1.35; }
/* Each lesson's course on its own line under its title, at every width: set inline after the title, a long title pushed
   "· Boxing" onto a line of its own on a phone. */
.new-lessons .nl-course { display: block; color: var(--nl-on-band); font-size: 15px; line-height: 1.4; }

/* On a phone the week shows two lessons a day: the day's count still says how many went live. */
@media (max-width: 599.98px) {
  .new-lessons:not(.nl-compact) .nl-lessons li:nth-child(n+3) { display: none; }
}
@media (min-width: 768px) {
  .new-lessons h2 { font-size: 40px; margin-bottom: 24px; }
  .new-lessons .nl-newest { padding: 30px 34px 26px; }
  .new-lessons .nl-title { font-size: 34px; }
}
@media (min-width: 1040px) {
  .new-lessons .nl-lay { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; align-items: start; }
  /* A band: its day on the left, then its lessons in as many columns as fit at 9em (up to three), each with its course
     under it. The days' column is a container, so a narrow one (below) puts each day above its lessons. */
  .new-lessons:not(.nl-compact) .nl-days { container: nl-days / inline-size; }
  .new-lessons:not(.nl-compact) .nl-day {
    display: grid; grid-template-columns: 9.5em minmax(0, 1fr); column-gap: 18px; align-items: start; padding: 14px 18px 12px;
  }
  /* The day sits level with the first line of its first lesson (a link is an inline block, whose baseline is its last line). */
  .new-lessons:not(.nl-compact) .nl-when { padding-top: 6px; }
  .new-lessons:not(.nl-compact) .nl-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9em), 1fr)); column-gap: 18px; }
  .new-lessons:not(.nl-compact) .nl-lessons li { padding-block: 0 4px; }
  .new-lessons .nl-lessons a { padding-block: 4px; }
}

/* A narrow days' column (the host's hand front page at 1440 px, whose container is narrower; this page from 1040 to about
   1240 px): each day above its lessons, as on a phone, so the lessons take the band's width and no word splits. */
@container nl-days (max-width: 680px) {
  .new-lessons:not(.nl-compact) .nl-day { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .new-lessons:not(.nl-compact) .nl-when { padding-top: 0; }
}

/* The front page this exporter writes: the section between the hero and the courses. */
.front > .new-lessons { margin: 48px 0 8px; }

/* The catalogue's column (compact: the newest 4 days, one lesson a day with its course). */
.cc-filters .new-lessons { margin-block: 22px 6px; }
.cc-filters .new-lessons h2 { font-size: 20px; margin-bottom: 10px; }
.cc-filters .new-lessons .nl-day { padding: 8px 10px 6px; }
.cc-filters .new-lessons .nl-lessons li { padding-block: 0; }
.cc-filters .new-lessons .nl-course { white-space: normal; }
@media (min-width: 600px) and (max-width: 1039.98px) {
  .cc-filters:has(.new-lessons) { flex-wrap: wrap; }
  .cc-filters .new-lessons { flex: 1 0 100%; }
}
@media (min-width: 1040px) {
  .cc-filters .new-lessons { margin-block: 28px 0; padding-top: 22px; border-top: 1px solid var(--nl-rule); }
  /* The column is sticky: the subjects give up the section's height, so the whole column stays inside the window. */
  .cc-filters:has(.new-lessons) .cc-subject-keys { max-height: max(120px, calc(100dvh - 560px)); }
}
