/* THE SHIFT, the writing series since 2026-11-14.
   Twelve short lessons in four chapters, each one idea from someone working
   on it, tested against something on this site. The page skeleton follows
   the research in the pull request that added it: the answer first
   (inverted pyramid, advance organizer), the terms before the argument
   (pre-training), one idea a section with a claim for a heading
   (segmenting, signaling), a concrete figure before an abstract one
   (concreteness fading), and two questions to close (retrieval practice).

   COLOR BY CHAPTER. Each chapter owns one hue, the accent of its drawing,
   and every lesson in it wears that hue: the hero ground, the figures, the
   numbers, the questions. The hues are interface colors here, so they are
   declared with measured rows in COLOR.md section 2 ("The Shift's chapter
   colors") rather than sampled out of the artwork, which section 6 forbids.
   Four roles each, and each role has one job:
     -fill    the hue itself; shapes only, never text (terracotta is 3.68:1
              on white)
     -ground  24% of the hue on white; charcoal 10.9-11.7:1, ink 4.8-4.9:1
     -soft    10% of the hue on white; ink 5.7-6.0:1
     -ink     the hue darkened until it reads on all three; white on it
              6.3-6.9:1, so it can carry a white number
   A page sets one chapter on <main> (or a landing band) with .shift-ch-N,
   and every rule below reads the four through --shift-*.

   WIDTH. The essay column stays at the measure, because that is where
   reading happens. From 64rem the figures, the hero, the terms, and the
   questions take the wider column or the whole container, from the same
   left edge, never floated beside the text (owner, 2026-11-14: the article
   template's margin layout left a paragraph alone beside an empty band). */

:root {
  --shift-sage-fill: #657d60;
  --shift-sage-ground: #dae0d9;
  --shift-sage-soft: #f0f2ef;
  --shift-sage-ink: #52634e;
  --shift-slate-fill: #56718c;
  --shift-slate-ground: #d6dde3;
  --shift-slate-soft: #eef1f4;
  --shift-slate-ink: #4a5f73;
  --shift-terracotta-fill: #c0714e;
  --shift-terracotta-ground: #f0ddd5;
  --shift-terracotta-soft: #f9f1ed;
  --shift-terracotta-ink: #85543e;
  --shift-plum-fill: #7a5a78;
  --shift-plum-ground: #dfd7df;
  --shift-plum-soft: #f2eef2;
  --shift-plum-ink: #6c526b;
}
.shift-ch-1 { --shift-fill: var(--shift-sage-fill); --shift-ground: var(--shift-sage-ground); --shift-soft: var(--shift-sage-soft); --shift-ink: var(--shift-sage-ink); }
.shift-ch-2 { --shift-fill: var(--shift-slate-fill); --shift-ground: var(--shift-slate-ground); --shift-soft: var(--shift-slate-soft); --shift-ink: var(--shift-slate-ink); }
.shift-ch-3 { --shift-fill: var(--shift-terracotta-fill); --shift-ground: var(--shift-terracotta-ground); --shift-soft: var(--shift-terracotta-soft); --shift-ink: var(--shift-terracotta-ink); }
.shift-ch-4 { --shift-fill: var(--shift-plum-fill); --shift-ground: var(--shift-plum-ground); --shift-soft: var(--shift-plum-soft); --shift-ink: var(--shift-plum-ink); }

/* ======================================================================
   SHARED PIECES
   ====================================================================== */
.shift-series-label {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--shift-ink, var(--color-accent-text));
}
.shift-series-label a { color: inherit; text-decoration: none; }
/* On the landing the label stands alone over the title, where a lesson sets
   it in .shift-series, which carries this same step under it. Without it
   the label sat on the title's first line. */
.shift-landing .case-hero .shift-series-label { margin-bottom: var(--space-md); }
/* The landing's dek marks the three things the series says a designer
   decides now (2026-11-16, owner: mark the words that explain the title).
   The site's tea-light highlighter is the hero's own ground here, so the
   mark takes the white a lesson's hero mark uses, at full strength. */
.shift-landing .case-hero .build-dek mark { background: var(--color-white); }
.shift-series-label a:hover { text-decoration: underline; }

/* A number in a disc: a lesson's place on the landing. */
.shift-disc {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--space-2xl);
  height: var(--space-2xl);
  border-radius: var(--radius-pill);
  background: var(--shift-ink);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--color-white);
}

/* ======================================================================
   A LESSON
   ====================================================================== */

/* ---- The hero: the chapter's ground, the question, its drawing ---- */
.shift-lesson .case-hero { background: var(--shift-ground); }
.shift-lesson .case-hero .case-kicker { color: var(--shift-ink); }
/* A lesson is short, so its question sits two steps under the site's title:
   48 at the widest where a case study's is 68, 28 on a phone where it is 34.
   The landing's title takes the same size, so the course reads as one set. */
.shift-lesson .case-title,
.shift-landing .case-title { font-size: var(--type-section); }
.shift-hero-grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}
.container.case-narrow > .shift-hero-grid,
.container.case-narrow > .shift-terms { max-width: none; }
.shift-hero-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}
.shift-series {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-md);
}
.shift-strip {
  display: grid;
  grid-template-columns: repeat(12, var(--space-md));
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.shift-strip li {
  height: var(--space-2xs);
  border-radius: var(--radius-pill);
  background: var(--color-white);
}
.shift-strip li.is-done { background: var(--shift-fill); }
.shift-strip li.is-here { background: var(--shift-ink); }
@media (min-width: 64rem) {
  .shift-hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-4xl); }
}

/* ---- Three terms before the argument: three cards across ---- */
.shift-terms { margin: var(--space-2xl) 0 0; }
.shift-terms-label {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--shift-ink, var(--color-charcoal));
}
.shift-terms dl { display: grid; gap: var(--space-sm); margin: 0; }
.shift-terms dl > div {
  padding: var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-xl);
}
.shift-terms dt {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--shift-ink, var(--color-charcoal));
}
.shift-terms dd {
  margin: var(--space-2xs) 0 0;
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
  color: var(--color-charcoal);
}
@media (min-width: 48rem) {
  .shift-terms dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
}

/* ---- One column, always; wider figures from 64rem ----
   The articles float a split, a pull, and a scene into a right margin from
   72rem and widen a flow past the measure (style.css, the margin layout).
   A lesson undoes that and instead lets every figure take the wide column
   from the essay's own left edge, under the text it explains. */
.writing-progress ~ main.shift-lesson .writing-measure > .writing-figure,
.writing-progress ~ main.shift-lesson .writing-measure > .writing-pull {
  float: none;
  clear: none;
  width: auto;
  max-width: none;
  margin: var(--space-2xl) 0;
}
@media (min-width: 64rem) {
  .writing-progress ~ main.shift-lesson .writing-measure > .writing-figure,
  .writing-progress ~ main.shift-lesson .writing-measure > .shift-check {
    width: var(--col-wide);
  }
}

/* ---- The figure panel: the chapter's soft ground around every figure ---- */
.shift-lesson .writing-measure > .writing-figure {
  padding: var(--space-xl);
  background: var(--shift-soft);
  border: 1px solid var(--rule-card);
  border-radius: var(--radius-xl);
}
.shift-lesson .writing-measure > .writing-figure > figcaption {
  margin-bottom: var(--space-lg);
  color: var(--shift-ink);
}
@media (min-width: 64rem) {
  .shift-lesson .writing-measure > .writing-figure { padding: var(--space-2xl); }
}

/* The highlighted line takes the chapter's ground, at half strength since
   2026-11-15 (owner: softer, where it sits on white). Every marked line in
   a lesson's column is on white today; one set on another ground would
   want the full color back, since half of a ground on its own soft is no
   mark at all. */
.shift-lesson .writing-measure mark {
  --shift-mark: color-mix(in srgb, var(--shift-ground) 50%, transparent);
  background: linear-gradient(var(--shift-mark), var(--shift-mark)) no-repeat 0 0 / 100% 100%;
  color: var(--color-charcoal);
}

/* ---- The diagram: the same tools loose, then gathered by one task ----
   Two columns straight on the figure's ground, with no card of their own:
   a white card inside the figure with rounded chips inside that was three
   rounded shapes deep, and three chips across could not hold "Driver
   hours" at a phone's width, so the words ran over the chip's edge (owner,
   2026-11-15). A tool is a true pill on its own row, so no name can
   outgrow it. Around the app the three stand loose. Around the task the
   same three sit inside one shape named for the task, which ends on the
   decision: the only filled shape in the figure.
   Everything here is UI text at one size. The essay's list and paragraph
   rules (.writing-measure li, p) would otherwise set it at the reading
   size and line height, hence the .writing-measure prefix throughout. */
.shift-diagram { display: grid; gap: var(--space-xl); align-items: start; }
.writing-measure .shift-diagram .shift-panel-head,
.writing-measure .shift-diagram .shift-app,
.writing-measure .shift-diagram .shift-task,
.writing-measure .shift-diagram .shift-decide,
.writing-measure .shift-diagram .shift-carry {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
  color: var(--color-charcoal);
}
.writing-measure .shift-diagram .shift-panel-head {
  margin-bottom: var(--space-sm);
  font-weight: var(--weight-semibold);
}
.writing-measure .shift-diagram .shift-apps {
  display: grid;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.writing-measure .shift-diagram .shift-app {
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--rule-card);
  border-radius: var(--radius-pill);
  font-weight: var(--weight-medium);
}
.writing-measure .shift-apps li::before { content: none; }
.writing-measure .shift-diagram .shift-carry {
  margin-top: var(--space-md);
  color: var(--color-muted-gray);
}
/* The task: one shape around the three tools. Its name lines up with the
   tools' names, a pill's inset and its 1px edge in from the shape's own. */
.shift-job {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-sm);
  background: var(--shift-ground);
  border: 1px solid var(--rule-card);
  border-radius: var(--radius-xl);
}
.writing-measure .shift-diagram .shift-task {
  padding: var(--space-2xs) calc(var(--space-lg) + 1px) var(--space-xs);
  font-weight: var(--weight-semibold);
}
.writing-measure .shift-diagram .shift-decide {
  padding: var(--space-sm) calc(var(--space-lg) + 1px);
  background: var(--shift-ink);
  border-radius: var(--radius-pill);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
}
@media (min-width: 48rem) {
  .shift-diagram { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
}

/* ---- Rows: a stack of parts, or stages in order ---- */
.shift-stack,
.shift-stages {
  display: grid;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Matched to the article's list rule (.writing-measure li), which would
   otherwise take the rows' inset away and leave the drawings on the edge. */
.writing-measure .shift-stack li,
.writing-measure .shift-stages li { margin: 0; }
.writing-measure .shift-stack li { padding: var(--space-lg) var(--space-xl); }
.writing-measure .shift-stages li { padding: var(--space-md) var(--space-lg); }
.writing-measure .shift-stack li::before,
.writing-measure .shift-stages li::before { content: none; }
.shift-stack li,
.shift-stages li {
  display: grid;
  gap: var(--space-xs) var(--space-md);
  align-items: center;
  background: var(--color-white);
  border: 1px solid var(--rule-card);
  border-radius: var(--radius-xl);
}
.shift-stack li { grid-template-columns: var(--space-3xl) minmax(0, 1fr); }
/* The icon leads the row where a number used to: it marks the row, and a
   number beside it would say the same thing twice. It carries its own pale
   tile, so it reads on the white rows and the marked one alike. */
/* The row's name is the semibold, as a stage's name is: it is the largest
   line in the row, and at regular weight it read thinner than its size. */
.shift-stack-name { font-weight: var(--weight-semibold); line-height: var(--leading-tight); }
.shift-stack-name small {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--color-muted-gray);
}
/* A figure the row carries, where a number is a quantity rather than a
   place in line: a stage's section count, under its subtitle. */
.shift-stack-name .shift-stack-count {
  font-weight: var(--weight-semibold);
  color: var(--shift-ink);
}
.shift-stack-q {
  grid-column: 2;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
  color: var(--color-charcoal);
}
/* The marked row is the chapter's ground, not charcoal: the icon's tile
   is the chapter's soft, which reads on it. */
.shift-stack li.is-mark { background: var(--shift-ground); }
.shift-stack li.is-mark .shift-stack-name small { color: var(--shift-ink); }
@media (min-width: 40rem) {
  .shift-stack li { grid-template-columns: var(--space-4xl) 11rem minmax(0, 1fr); }
  .shift-stack-art { grid-row: 1; align-self: center; width: var(--space-4xl); }
  .shift-stack-q { grid-column: auto; font-size: var(--text-base); }
}

.shift-stages li { grid-template-columns: minmax(0, 1fr); }
/* A name and the line under it are one thought: a 4px step between them, and
   the name on the heading line height, not the essay's 1.7, which set a
   16px name in a 27px line and put 16px of air before the note (owner,
   2026-11-15). The same pair in the stack rows and the terms below. */
.writing-measure .shift-stages li { row-gap: var(--space-2xs); }
.shift-stage-name {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--color-charcoal);
}
.shift-stage-note {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
  color: var(--color-charcoal);
}
/* A stage the point turns on: the chapter's ground, its ink on the note. */
.shift-stages li.is-gap { background: var(--shift-ground); border-color: var(--shift-ground); }
.shift-stages li.is-gap .shift-stage-note { font-weight: var(--weight-semibold); color: var(--shift-ink); }
@media (min-width: 40rem) {
  .shift-stages li { grid-template-columns: 8rem minmax(0, 1fr); }
  .shift-stage-note { font-size: var(--text-base); }
}

/* The split's lists sit on white inside the soft panel; the second, the
   one the lesson argues for, on the chapter's ground. */
.shift-lesson .writing-figure .writing-split > div {
  padding: var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-xl);
}
.shift-lesson .writing-figure .writing-split > div:last-child { background: var(--shift-ground); }
.shift-lesson .writing-figure .writing-split-head { color: var(--shift-ink); }

/* A flow inside the soft panel. The article's bars are tea-light, which on
   a chapter's soft ground is no edge at all: the rise the figure exists to
   show read as five pale smudges. Here the bars take the chapter's ground
   under an ink edge, and the marked stage, the one the lesson is about,
   is the chapter's fill, solid. Captions in charcoal at regular weight, so
   the stage name keeps the weight and both read on the panel. The rule
   under the labels goes: inside a panel it closes nothing and left a strip
   of empty card under the figure. */
.shift-lesson .writing-measure .writing-flow li::before {
  background: var(--shift-ground);
  border-color: var(--shift-ink);
}
.shift-lesson .writing-measure .writing-flow .writing-flow-mark::before {
  background: var(--shift-fill);
  border-color: var(--shift-ink);
}
.shift-lesson .writing-flow small { color: var(--color-charcoal); }
@media (min-width: 640px) {
  .shift-lesson .writing-flow small { font-size: var(--text-sm); }
  .shift-lesson .writing-flow { border-bottom: 0; }
  .shift-lesson .writing-measure .writing-flow li { padding-bottom: 0; }
  .shift-lesson .writing-measure .writing-flow .writing-flow-mark::before { border-color: var(--shift-ink); }
}

/* ---- Check yourself: the chapter's ground, two questions to open ---- */
.shift-check {
  margin-top: var(--space-3xl);
  padding: var(--space-xl);
  background: var(--shift-ground);
  border-radius: var(--radius-xl);
}
.writing-measure .shift-check h2 { margin-top: 0; }
/* No sage rule over a heading on a card: the card's own fill and edge mark
   where it starts, and the bar (.case-overview h2::before in style.css) is
   for a heading that opens a section on the page's ground. TYPOGRAPHY.md
   section 4 has the rule. */
.case-overview .shift-check h2::before { content: none; }
.shift-q {
  margin-top: var(--space-sm);
  background: var(--color-white);
  border-radius: var(--radius-xl);
}
.shift-q summary {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-ui);
  color: var(--color-charcoal);
}
.shift-q summary::-webkit-details-marker { display: none; }
.shift-q summary::marker { content: ''; }
.shift-q-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--space-2xl);
  height: var(--space-2xl);
  border-radius: var(--radius-pill);
  background: var(--shift-ink);
  font-size: var(--text-sm);
  color: var(--color-white);
}
.shift-q-text { flex: 1; }
/* The site's disclosure mark, at the end of the row: a question is a
   control that opens its answer, and the card alone did not say so. */
.shift-q .disclosure-chev { color: var(--shift-ink); }
.shift-q[open] .disclosure-chev { transform: rotate(0deg); }
.shift-q summary:hover { color: var(--shift-ink); }
.shift-q summary:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
/* The answer sits close under its question: the summary's own foot was
   the whole gap, a line's worth, and read as two things (owner,
   2026-11-16). An open question gives its foot up. */
.shift-q[open] summary { padding-bottom: var(--space-2xs); }
.writing-measure .shift-q p {
  margin: 0;
  padding: 0 var(--space-lg) var(--space-lg) calc(var(--space-lg) + var(--space-2xl) + var(--space-md));
  color: var(--color-charcoal);
}
.shift-source {
  margin-top: var(--space-xl);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
  color: var(--color-charcoal);
}
@media (min-width: 64rem) {
  .shift-check { padding: var(--space-2xl); }
}

/* No Try it panel, since later on 2026-11-17 (Adam: "remove these cards
   from every lesson ... it's too much"). For a few hours each lesson had
   one above Check yourself: a worked example and an exercise, both closed.
   Check yourself is the lesson's last panel again. */

/* ======================================================================
   THE LANDING
   ====================================================================== */
.shift-landing .case-hero .container.case-narrow > .shift-hero-grid { max-width: none; }
.shift-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-xl);
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-charcoal);
}
.shift-facts strong {
  margin-right: var(--space-2xs);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-text);
}

/* The way in: one button under the facts (2026-11-15). A "Start here"
   card for lesson 1 sat over chapter 1, whose first row is lesson 1, so
   the same lesson was the next thing twice in one screen. */
.shift-begin { margin: var(--space-xl) 0 0; }

/* The chapters: one band each, the drawing beside its three lessons. */
.container.case-narrow > .shift-chapters { max-width: none; }
.shift-chapters {
  display: grid;
  gap: var(--space-2xl);
  margin: 0;
  padding: 0;
  list-style: none;
}
.shift-chapter {
  display: grid;
  gap: var(--space-xl);
  padding: var(--space-xl);
  background: var(--shift-soft);
  border: 1px solid var(--rule-card);
  border-radius: var(--radius-xl);
  scroll-margin-top: calc(var(--nav-height) + var(--space-xl));
}
.shift-chapter-head { display: grid; gap: var(--space-lg); align-content: start; }
.shift-chapter-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
}
.shift-chapter-num {
  display: block;
  margin-bottom: var(--space-xs);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--shift-ink);
}
.shift-chapter-label {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--type-subsection);
  font-weight: var(--weight-regular);
  line-height: var(--leading-heading);
  color: var(--color-charcoal);
}
.shift-chapter-dek {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-charcoal);
}
.shift-cards {
  display: grid;
  gap: var(--space-sm);
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shift-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--rule-card);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: box-shadow var(--motion-move) var(--ease);
}
.shift-card-title {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-ui);
  color: var(--color-charcoal);
}
.shift-card-dek {
  display: block;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-charcoal);
}
/* The landing's cards: whose idea the lesson tests. The read time came off
   on a phone on 2026-11-16 and everywhere on 2026-11-17 (Adam: "take off
   the three minute read label from all these cards"); each lesson's own
   kicker still states it. */
.shift-card-foot {
  display: block;
  margin-top: var(--space-2xs);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-muted-gray);
}
.shift-card-arrow {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  color: var(--shift-ink);
  transition: translate var(--motion-move) var(--ease);
}
a.shift-card:hover { box-shadow: var(--shadow-card); }
a.shift-card:hover .shift-card-title { color: var(--shift-ink); }
a.shift-card:hover .shift-card-arrow { translate: var(--space-2xs) 0; }
a.shift-card:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
.shift-card.is-coming { background: transparent; border-color: var(--rule-strong); }
.shift-card.is-coming .shift-disc { background: var(--color-muted-gray); }
@media (min-width: 64rem) {
  .shift-chapter { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); padding: var(--space-2xl); }
}

/* ======================================================================
   BUILT AS IT IS READ
   shift.js marks a figure's parts with data-build and, once the figure is
   about to enter the viewport, data-shown. The contract is reveal.css's:
   the keyframe has a `from` and no `to`, nothing changes opacity, and the
   resting state is the finished figure, so a reader who asked for no
   motion, a page whose script never ran, and every check see the same
   thing. Each part travels in from the left, one after another, so a list
   of parts arrives as a list being built, and the highlighted line is
   drawn on like a marker.
   ====================================================================== */
@keyframes shift-build {
  from { translate: calc(var(--motion-rise) * -1) 0; }
}
@keyframes shift-mark {
  from { background-size: 0 100%; }
}
[data-build][data-shown] {
  animation: shift-build var(--motion-enter) var(--ease-enter) both;
  animation-delay: calc(var(--i, 0) * var(--motion-stagger) * 2);
}
.shift-lesson mark[data-build][data-shown] {
  animation: shift-mark var(--motion-ambient) var(--ease-enter) both;
}

/* The dek's one marked phrase (back since 2026-11-15; #1201 had taken it
   out). The hero already sits on the chapter's ground, so the mark there
   is the page's white: the same highlighter, read against the ground it is
   on. It is above the fold, so no observer arms it: it draws on once, after
   the page has risen, for a reader who has not asked for stillness. The
   keyframe has a `from` and no `to`, so the resting mark is the finished
   one for everybody else and for every check.
   Half the white, since 2026-11-15: at full strength it was the brightest
   thing in the hero and read as a box cut out of the ground (owner: "a bit
   softer"). Mixed with transparent, it lightens whichever chapter ground
   it sits on by half the distance to white, so the four stay in step. */
.shift-lesson .case-hero .build-dek mark {
  --shift-mark: color-mix(in srgb, var(--color-white) 50%, transparent);
  background: linear-gradient(var(--shift-mark), var(--shift-mark)) no-repeat 0 0 / 100% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .shift-lesson .case-hero .build-dek mark {
    animation: shift-mark var(--motion-ambient) var(--ease-enter) var(--motion-enter) both;
  }
}

/* ---- Edges and inks on the chapter grounds ----
   A card on a ground takes 1px solid var(--rule-card) (COLOR.md, Lines):
   white on a 24% ground is 1.31-1.37:1 and a ground on its own soft is
   under 1.2, so no fill here separates a card by itself. And a link on a
   chapter ground takes the chapter's ink, because the site's sage link is
   4.2-4.4:1 there. */
.shift-terms dl > div,
.shift-lesson .writing-figure .writing-split > div,
.shift-check,
.shift-q { border: 1px solid var(--rule-card); }
.shift-stages li.is-gap { border-color: var(--rule-card); }
.shift-lesson .writing-measure .shift-check a { color: var(--shift-ink); text-decoration-color: currentColor; }

/* Cards on a chapter ground take the chapter's own fill as their edge: the
   gray card rule composites to 1.18:1 on the slate ground, and the hue
   reads at 2.8-4.2:1 on its ground while making the page more its color. */
.shift-terms dl > div,
.shift-lesson .writing-figure .writing-split > div,
.shift-q,
.shift-stages li.is-gap { border-color: var(--shift-fill); }

/* The landing's chapter pictures are Product Systems diagrams on a
   transparent ground (2026-11-16): their cards sit straight on the band's
   soft ground, with no frame of their own. */
.shift-chapter-art { border-radius: 0; }

/* ---- The series bar: its own row under the navigation ----
   It sat beside the lesson's label, inside the title block, and read as
   unresolved there (owner, 2026-11-14). It is the first row of the hero
   now, ruled off from the title: left-aligned on a phone, centered on the
   page from 64rem, where its segments lengthen to fill the row. */
.shift-lesson .shift-series {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  margin: 0 0 var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--rule-card);
}
.container.case-narrow > .shift-series { max-width: none; }
@media (min-width: 64rem) {
  .shift-lesson .shift-series { align-items: center; margin-bottom: var(--space-3xl); }
  .shift-lesson .shift-strip { grid-template-columns: repeat(12, var(--space-2xl)); gap: var(--space-xs); }
}

/* ---- The series bar is the lesson navigation ----
   Each segment is a link to its lesson, with an arrow either side for the
   one before and the one after (owner, 2026-11-14: "an easy way to jump
   between the lessons"). The bar stays a thin line; each link's hit area
   is the full row height, so a segment is a target, not a sliver. */
.shift-jump {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.shift-lesson .shift-strip li {
  height: auto;
  background: none;
  border-radius: 0;
}
.shift-strip a {
  display: flex;
  align-items: center;
  height: var(--space-2xl);
  text-decoration: none;
}
.shift-strip a::before {
  content: '';
  flex: 1;
  height: var(--space-2xs);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  transition: height var(--motion-state) var(--ease), background-color var(--motion-state) var(--ease);
}
.shift-strip li.is-done a::before { background: var(--shift-fill); }
.shift-strip li.is-here a::before { background: var(--shift-ink); height: var(--space-xs); }
.shift-strip a:hover::before { background: var(--shift-ink); height: var(--space-xs); }
.shift-strip a:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; border-radius: var(--radius-pill); }
.shift-step {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--space-2xl);
  height: var(--space-2xl);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  border: 1px solid var(--rule-card);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--shift-ink);
  text-decoration: none;
  transition: background-color var(--motion-state) var(--ease), color var(--motion-state) var(--ease);
}
.shift-step:hover { background: var(--shift-ink); color: var(--color-white); }
.shift-step:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
@media (pointer: coarse) {
  .shift-step { width: var(--space-4xl); height: var(--space-4xl); }
  .shift-strip a { height: var(--space-4xl); }
}
/* Under 64rem the arrows ride the label's row and the twelve segments
   take the whole row under it. Squeezed between the arrows, a segment was
   14px wide on a phone, under the 24px WCAG 2.5.8 floor, with neighbours
   closer than that (2026-11-15). Across the full row each is 28px or more,
   its bar inset so the run still reads as twelve. */
@media (max-width: 63.999rem) {
  .shift-lesson .shift-series {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: var(--space-sm);
  }
  .shift-lesson .shift-series .shift-jump { display: contents; }
  /* The label names the lesson's chapter after the series (2026-11-17,
     owner: say why the ground changed color). Beside the arrows on a
     phone the longer names take two lines, balanced like a headline so
     the second is not one word. */
  .shift-lesson .shift-series-label { grid-column: 1; grid-row: 1; text-wrap: balance; }
  .shift-lesson .shift-series .shift-step:first-child { grid-column: 2; grid-row: 1; }
  .shift-lesson .shift-series .shift-step:last-child { grid-column: 3; grid-row: 1; }
  .shift-lesson .shift-series .shift-strip {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0;
  }
  .shift-lesson .shift-strip a { padding-inline: calc(var(--space-2xs) / 2); }
}
@media (min-width: 64rem) {
  .shift-jump .shift-strip { grid-template-columns: repeat(12, var(--space-2xl)); }
}

/* ---- A chapter band: its name on a row of its own, then the drawing
   with one line under it beside the three lessons (owner, 2026-11-14).
   The name reads first, across the band; the line under the drawing is a
   caption, not a second heading: the lesson hero's caption, the serif's
   italic centered under the picture (owner, 2026-11-16). */
.shift-chapter { grid-template-areas: "title" "head" "cards"; }
.shift-chapter > .shift-chapter-label { grid-area: title; }
.shift-chapter > .shift-chapter-head { grid-area: head; gap: var(--space-sm); }
.shift-chapter > .shift-cards { grid-area: cards; }
.shift-chapter .shift-chapter-dek {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--color-charcoal);
  text-align: center;
}
/* The line sits right under the drawing, and the two sit centered beside
   the three lessons (owner, 2026-11-16). The chapter pictures are 16:9 with
   the diagram across the middle and a transparent margin above and below
   it; the band crops that margin to each picture's ink, so the line meets
   the cards rather than a band of empty ground, and the band's own padding
   is the only space under it. Chapters 1, 2 and 4 ink 279 to 662 of 900
   and keep 260 to 680; chapter 3's checklist runs 166 to 743 and keeps
   140 to 760. */
.shift-chapter .shift-chapter-art { aspect-ratio: 80 / 21; object-fit: cover; object-position: 50% 54%; }
.shift-chapter.shift-ch-3 .shift-chapter-art { aspect-ratio: 80 / 31; object-position: 50% 50%; }
@media (min-width: 64rem) {
  .shift-chapter > .shift-chapter-head,
  .shift-chapter > .shift-cards { align-self: center; }
}
/* The emblem fills the band's left column again (owner, 2026-11-15). For
   a day it was a 10rem mark over its line, on the reasoning that the
   hero's mosaic, since removed, already showed the four large; at that size the engraving
   lost its detail and the column under it stood empty. */

/* On a phone a white card inside the band narrowed each title to a
   quarter of the screen and four lines. Under 48rem the rows sit on the
   band itself, a hairline between them: the band is the surface, a row is
   a line of it. */
@media (max-width: 47.999rem) {
  .shift-cards { gap: 0; }
  .shift-card {
    padding: var(--space-md) 0;
    background: none;
    border: 0;
    border-radius: 0;
  }
  .shift-cards li + li .shift-card { border-top: 1px solid var(--rule-card); }
  a.shift-card:hover { box-shadow: none; }
  /* The titles had a little over half the row (owner, 2026-11-18: "I don't
     like how much the text wraps"). On a phone the number is a smaller disc
     on the title's first line, centered on that line's box rather than on
     the whole row, the arrow goes (the row and its hairline already read
     as a link, and the title turns sage under a press), and the band's
     inset steps down one, so a title runs most of the screen's width. */
  .shift-chapter { padding: var(--space-lg); }
  .shift-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-sm);
    align-items: start;
  }
  .shift-card .shift-disc {
    width: var(--space-xl);
    height: var(--space-xl);
    margin-top: calc((var(--text-base) * var(--leading-ui) - var(--space-xl)) / 2);
    font-size: var(--text-xs);
  }
  .shift-card-arrow { display: none; }
}
@media (min-width: 64rem) {
  .shift-chapter {
    grid-template-areas: "title title" "head cards";
    row-gap: var(--space-xl);
  }
}
/* The site's section h2 brings its own bottom margin; in the band the grid
   gap is the only space between the name and what it heads. */
.case-section .shift-chapter > .shift-chapter-label { margin: 0; }
@media (min-width: 64rem) { .shift-chapter { row-gap: var(--space-lg); } }
/* No sage rule above a chapter's name (owner, 2026-11-14): the band's own
   edge already marks where the chapter starts, as with .glance-head, so the
   head is the eyebrow and the headline alone. */
.case-overview .shift-chapter-label::before { content: none; }

/* ======================================================================
   PICTURES IN THE LESSONS
   One drawing per lesson: the hero. The body is the argument and the
   figures built in code; the scene and concept drawings that sat between
   its paragraphs came out on 2026-11-15 (owner: the pictures were louder
   than a three-minute read), each concept's one line kept as a paragraph.
   What stays drawn in the body is small and inside a code figure: a pair's
   two pictures, and the icon that leads a row (.has-art). */

/* A pair's picture is a Product Systems diagram on a transparent ground
   (2026-11-16): its cards sit straight on the column, with no frame, edge,
   or blend around them (owner: the frame did not need to be there). */
.shift-pair-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}

/* The pair: two drawings, each over a one-line label. */
.shift-pair {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}
.writing-measure .shift-pair li { margin: 0; padding: 0; }
.writing-measure .shift-pair li::before { content: none; }
/* The label is a caption under a centered drawing, so it takes the hero
   caption's style below: one caption style in the lessons for every
   centered picture (owner, 2026-11-16). SPACING.md, section 4. */
.shift-pair-label { display: block; }
@media (min-width: 40rem) {
  .shift-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A list of steps with an icon on each row: the icon leads the row, one
   outlined glyph in its own pale tile in the chapter's soft and ink, so it
   reads alike on the white rows and on the chapter's ground of the row the
   point turns on. */
.shift-stage-art {
  display: block;
  width: var(--space-3xl);
  height: auto;
  aspect-ratio: 1;
  grid-column: 1;
  grid-row: 1 / span 2;
}
.shift-stages.has-art li { grid-template-columns: var(--space-3xl) minmax(0, 1fr); }
.shift-stages.has-art .shift-stage-name,
.shift-stages.has-art .shift-stage-note { grid-column: 2; }
@media (min-width: 40rem) {
  .shift-stages.has-art li { grid-template-columns: var(--space-4xl) 8rem minmax(0, 1fr); }
  .shift-stages.has-art .shift-stage-art { grid-row: 1; width: var(--space-4xl); }
  .shift-stages.has-art .shift-stage-name { grid-column: 2; }
  .shift-stages.has-art .shift-stage-note { grid-column: 3; }
}

/* ---- A lesson's hero: the lesson's diagram beside the title ----
   Since 2026-11-16 each hero is a Product Systems diagram (writing/
   PRODUCT_SYSTEMS.md): the decision or mechanism the lesson turns on, drawn
   as interface cards on a transparent ground, 16:9, so its cards sit
   straight on the chapter's ground with no frame around them (owner,
   2026-11-16: the bordered rectangle did not need to be there). The kicker
   and title run the full width of the frame; under them, from 64rem, the dek
   takes the left and the diagram the right, as After Send's hero does.
   Below 64rem the diagram follows the dek at the width of the column. Its small labels are detail at
   phone width: the alt text and the caption under it carry the point. The
   Narrative Ink engravings before it were free-standing ink multiplied onto
   the ground (2026-11-15 to 2026-11-16). The three terms follow on white.
   The landing keeps its own hero (.shift-landing). */
.shift-lesson .case-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
}
/* The hero's ground is the chapter's color, flat. For a day (2026-11-15)
   a grain sat over it, charcoal through a mask of noise; it added nothing
   and darkened every hero, so it is gone (owner, the same day). */
.shift-lesson .shift-hero-grid { display: block; }
.shift-lesson .shift-hero-art {
  width: 100%;
  max-width: 100%;
  height: auto;
  /* Cut to the drawing's own height, so its shape is the file's. */
  aspect-ratio: auto;
  margin: var(--space-lg) 0 0;
}
/* The caption under the diagram says what the lesson is about in the
   picture's own terms, with a dry second line. It is the serif's italic, a
   different voice from the dek's, centered under the panel. */
.shift-lesson .shift-hero-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}
/* About 20px from the drawing's lowest card to the caption's first line
   (owner, 2026-11-16): the file keeps a 24px margin under the card's
   shadow, a few pixels at the column's width, and the caption adds 8.
   Every caption under a centered picture in a lesson is this one: the
   hero's, and a pair's labels (SPACING.md, section 4). */
.shift-lesson .shift-hero-caption,
.shift-lesson .shift-pair-label {
  margin: var(--space-xs) 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--color-charcoal);
  text-align: center;
}
.shift-terms-band { padding-top: var(--space-2xl); }
.shift-terms-band .shift-terms { margin: 0; }
.shift-terms-band .shift-terms dl > div { background: var(--shift-soft); }
@media (min-width: 64rem) {
  /* Two halves (owner, 2026-11-16): the kicker, title, dek, and Listen in
     the left, the diagram and its caption in the right, centered on the
     words. The text is the taller half on every lesson, so a diagram cut
     to its own height never moves the page. */
  .shift-lesson .shift-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--space-4xl);
    align-items: center;
  }
  /* The dek runs the width of its column, as the title does (owner,
     2026-11-16: a 27rem cap left it wrapping short of the column). */
  .shift-lesson .case-hero .build-dek { max-width: none; }
  /* The diagram takes the whole right column (2026-11-16, Product
     Systems). The engraving sat a third of the row wide, centered in the
     room the title left; a diagram's labels need the full half to stay
     legible, and a 16:9 panel fills the column's width without the
     right-justified look the narrower drawing had. */
  .shift-lesson .shift-hero-figure {
    width: 100%;
    justify-self: stretch;
  }
  .shift-lesson .shift-hero-art {
    max-width: 100%;
    max-height: none;
    margin: 0;
  }
}

/* ---- From my work: one picture of the project a lesson cites ----
   Every lesson tests its idea against something on this site, and until
   2026-11-16 the only trace of it was a link in a sentence (owner: "at
   least one good visual for each project and a clear link to discover
   more"). The picture sits under the paragraph that cites the project, on
   the chapter's soft ground with the chapter's edge, and its caption ends
   on the link. A 2x capture carries half its pixels as width and height,
   so it is never printed above that. */
.shift-work {
  padding: var(--space-md);
  background: var(--shift-soft);
  border: 1px solid var(--shift-fill);
  border-radius: var(--radius-xl);
}
.shift-work img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  box-shadow: var(--shadow-card);
}
.shift-lesson .writing-measure .shift-work figcaption {
  max-width: none;
  text-align: left;
  font-style: normal;
  display: grid;
  gap: var(--space-2xs);
  margin-top: var(--space-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
  color: var(--color-charcoal);
}
.shift-lesson .shift-work .shift-work-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--shift-ink);
}
.shift-lesson .shift-work .shift-work-link {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  justify-self: start;
  margin-top: var(--space-2xs);
  font-weight: var(--weight-semibold);
  color: var(--shift-ink);
  text-decoration: underline;
  text-underline-offset: var(--space-2xs);
}
.shift-lesson .shift-work .shift-work-link:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .shift-lesson .shift-work .shift-work-link:hover { color: var(--color-charcoal); }
}
@media (min-width: 40rem) {
  .shift-work { padding: var(--space-lg); }
}

/* ---- The foot: the next lesson, with its drawing ----
   The next lesson's hero, small, beside its title (owner, 2026-11-16): the
   same 16:9 diagram, its cards straight on the footer's ground.
   On a phone it sits over the words, on the same left edge; from 40rem it
   takes the right of the row and the words keep the left. */
.shift-next { display: grid; gap: var(--space-lg); }
.shift-next-text { display: block; }
.shift-next-art {
  order: -1;
  display: block;
  width: auto;
  max-width: 100%;
  height: calc(var(--space-4xl) * 2.5);
}
@media (min-width: 40rem) {
  .shift-next {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2xl);
    align-items: center;
  }
  .shift-next-art { order: 0; height: calc(var(--space-4xl) * 3); }
}

/* ======================================================================
   THE HOMEPAGE BAND (2026-11-16)
   The series on index.html, between How I Work and Built end to end: the
   landing's hero grid and its one drawing on the warm ground, so the page
   alternates warm, charcoal, warm, white, charcoal. The header is the
   homepage's own .section-head; only its spacing is taken back here,
   because the grid, not the head, sets the gap to the drawing.
   ====================================================================== */
.shift-band { background: var(--color-warm); padding: var(--space-section) 0; }
.shift-band .section-head { margin-bottom: 0; }
@media (min-width: 64rem) {
  .shift-band .shift-hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
}
/* The band's one drawing (2026-11-17). The file has no alpha: its paper
   is pure white, which multiply reads as nothing, so the drawing sits
   straight on the warm ground with no plate and keeps its own tints. It
   fills its half of the grid; stacked, on a phone, it fills the column.
   The figure takes no .reveal: a transform isolates it, and the image
   would then multiply against nothing and show its white plate. */
.shift-band-art { display: flex; flex-direction: column; align-items: center; margin: 0; }
.shift-band-art img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
/* A little smaller beside the words, with one line under it (owner,
   2026-11-17): from 64rem the drawing takes five sixths of its half,
   centered, and the caption is the lesson hero's, the serif's italic
   centered under the picture, saying what the series is about in the
   picture's own terms. Stacked, the drawing still fills the column. */
@media (min-width: 64rem) {
  .shift-band .shift-band-art img { width: calc(100% * 5 / 6); }
}
/* The writing landing's hero carries the same figure in place of the four
   chapter tiles (owner, 2026-11-17). Its column is the narrower five of
   twelve, so the drawing fills it there. */
.shift-band-art .shift-band-caption {
  margin: var(--space-xs) 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--color-charcoal);
  text-align: center;
  text-wrap: balance;
}
